</div>
</li>
<li class="list-group-item">
+ <div class="form-check form-check-inline">
+ <input class="form-check-input" type="checkbox"
+ id="hide-use_checkdigit-column"
+ [(ngModel)]="volcopy.defaults.hidden.use_checkdigit">
+ <label class="form-check-label" for="hide-use_checkdigit-column" i18n>
+ Hide Use Checkdigit
+ </label>
+ </div>
+ </li>
+ <li class="list-group-item">
<!--
Copy_number_vc distinguishes from copy_number so the field
can appear in the volcopy UI and/or attr editor independently.
</ng-container>
</div>
<div class="p-1" [ngStyle]="{flex: flexAt(10)}">
- <ng-container *ngIf="displayColumn('copy_part')">
- <ng-container *ngIf="!recordHasParts(volNode.target.record())">
- <label i18n>N/A</label>
- </ng-container>
- <ng-container *ngIf="recordHasParts(volNode.target.record())">
- <eg-combobox
- [selectedId]="copyNode.target.parts()[0] ? copyNode.target.parts()[0].id() : null"
- [smallFormControl]="true"
- (onChange)="copyPartChanged(copyNode, $event)">
- <eg-combobox-entry
- *ngFor="let part of volcopy.bibParts[volNode.target.record()]"
- [entryId]="part.id()" [entryLabel]="part.label()">
- </eg-combobox-entry>
- </eg-combobox>
- </ng-container>
+ <ng-container *ngIf="displayColumn('copy_part')">
+ <eg-combobox
+ [selectedId]="copyNode.target.parts()[0] ? copyNode.target.parts()[0].id() : null"
+ [smallFormControl]="true" [allowFreeText]="true"
+ (onChange)="copyPartChanged(copyNode, $event)">
+ <eg-combobox-entry
+ *ngFor="let part of volcopy.bibParts[volNode.target.record()]"
+ [entryId]="part.id()" [entryLabel]="part.label()">
+ </eg-combobox-entry>
+ </eg-combobox>
</ng-container>
</div>
<div class="p-1" [ngStyle]="{flex: flexAt(11)}">
if (entry) {
- const newPart =
- this.volcopy.bibParts[copy.call_number().record()]
- .filter(p => p.id() === entry.id)[0];
+ let newPart;
+ if (entry.freetext) {
+ newPart = this.idl.create('bmp');
+ newPart.isnew(true);
+ newPart.record(copy.call_number().record());
+ newPart.label(entry.label);
- // Nothing to change?
- if (part && part.id() === newPart.id()) { return; }
+ } else {
+
+ newPart =
+ this.volcopy.bibParts[copy.call_number().record()]
+ .filter(p => p.id() === entry.id)[0];
+
+ // Nothing to change?
+ if (part && part.id() === newPart.id()) { return; }
+ }
copy.parts([newPart]);
copy.ischanged(true);
i18n>Print Labels?</label>
</div>
- <ng-container *ngIf="tab === 'holdings' &&
- volcopy.defaults.hidden.generate_barcodes !== true">
+ <ng-container *ngIf="tab === 'holdings'">
<!--
These actions could cause confusion or unintended
consequences if visible on any other tabs
-->
- <div class="form-check form-check-inline">
- <input class="form-check-input" type="checkbox" id="use-checkdigit"
- (change)="toggleCheckbox('use_checkdigit')"
- [ngModel]="volcopy.defaults.values.use_checkdigit"/>
- <label class="form-check-label" for="use-checkdigit" i18n>
- Use Checkdigit
- </label>
- </div>
- <button class="btn btn-sm btn-outline-dark label-with-material-icon"
- (click)="volcopy.genBarcodesRequested.emit()">
- <span i18n>Generate Barcodes</span>
- <span class="material-icons">refresh</span>
- </button>
+ <ng-container *ngIf="volcopy.defaults.hidden.use_checkdigit !== true">
+ <div class="form-check form-check-inline">
+ <input class="form-check-input" type="checkbox" id="use-checkdigit"
+ (change)="toggleCheckbox('use_checkdigit')"
+ [ngModel]="volcopy.defaults.values.use_checkdigit"/>
+ <label class="form-check-label" for="use-checkdigit" i18n>
+ Use Checkdigit
+ </label>
+ </div>
+ </ng-container>
+ <ng-container *ngIf="volcopy.defaults.hidden.generate_barcodes !== true">
+ <button class="btn btn-sm btn-outline-dark label-with-material-icon"
+ (click)="volcopy.genBarcodesRequested.emit()">
+ <span i18n>Generate Barcodes</span>
+ <span class="material-icons">refresh</span>
+ </button>
+ </ng-container>
</ng-container>
<div class="flex-1"> </div>
if (recordIds.length === 0) { return; }
- // Avoid doubling up
- if (this.bibParts[recordIds[0]]) { return; }
+ // All calls fetch updated data since we may be creating
+ // new mono parts during editing.
this.pcrud.search('bmp',
{record: recordIds, deleted: 'f'})