When a call number is loaded in the editor whose label is an empty
string, avoid applying a default values to the label so it's clear in
the UI that the call number label is blank.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Ruth Frasur <rfrasur@library.in.gov>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
this.volcopy.fetchRecordVolLabels(this.context.recordId)
.then(labels => this.recordVolLabels = labels)
.then(_ => this.volcopy.fetchBibParts(this.context.getRecordIds()))
- .then(_ => this.addStubCopies());
+ .then(_ => this.addStubCopies())
+ // It's possible the loaded data is not strictly allowed,
+ // e.g. empty string call number labels
+ .then(_ => this.emitSaveChange());
}
copyStatLabel(copy: IdlObject): string {
// in a previous iteration of this loop.
if (vol.label()) { return; }
+ // Avoid applying call number labels to existing call numbers
+ // that don't already have a label. This allows the user to
+ // see that an action needs to be taken on the volume.
+ if (!vol.isnew()) { return; }
+
promise = promise.then(_ => {
return this.net.request(
'open-ils.cat',