Skip to content

Commit a301e43

Browse files
mmorgannoblebmagic007
authored andcommitted
LP#2131031: Holdings Template Editor call number fields
Add the classification, prefix and suffix fields as choices to the Holdings Template Editor grid. Release-note: Adds call number fields to Holdings Template Editor grid. Signed-off-by: Michele Morgan <[email protected]> Signed-off-by: blake <[email protected]> Signed-off-by: Jane Sandberg <[email protected]>
1 parent ce9d75f commit a301e43

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

Open-ILS/src/eg2/src/app/staff/cat/volcopy/template-grid.component.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ <h2 class="mt-3" i18n>Holdings Templates</h2>
127127

128128
<eg-grid-column name="templateName" [index]="true" i18n-label label="Template Name" name="templateName"></eg-grid-column>
129129
<eg-grid-column name="age_protect" [hidden]="true" i18n-label label="Age Protect"></eg-grid-column>
130+
<eg-grid-column name="label_class" [hidden]="true" i18n-label label="Call Number Classification"></eg-grid-column>
131+
<eg-grid-column name="prefix" [hidden]="true" i18n-label label="Call Number Prefix"></eg-grid-column>
132+
<eg-grid-column name="suffix" [hidden]="true" i18n-label label="Call Number Suffix"></eg-grid-column>
130133
<eg-grid-column name="circ_as_type" [hidden]="true" i18n-label label="Circ As Type"></eg-grid-column>
131134
<eg-grid-column name="circ_lib" [hidden]="false" i18n-label label="Circ Lib"></eg-grid-column>
132135
<eg-grid-column name="circ_modifier" [hidden]="false" i18n-label label="Circ Modifier"></eg-grid-column>

Open-ILS/src/eg2/src/app/staff/cat/volcopy/template-grid.component.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ export class VolCopyTemplateGridComponent implements OnInit, OnDestroy {
154154
statcat_filter: templateConfig.statcat_filter?.toString() || '',
155155
owning_lib: this.org.get( templateConfig.owning_lib )?.shortname() || '',
156156
copy_number: templateConfig.copy_number?.toString() || '',
157+
label_class: templateConfig.label_class?.toString() || '',
158+
prefix: templateConfig.prefix?.toString() || '',
159+
suffix: templateConfig.suffix?.toString() || '',
157160
debug: JSON.stringify(templateConfig)
158161
};
159162

@@ -183,6 +186,24 @@ export class VolCopyTemplateGridComponent implements OnInit, OnDestroy {
183186
row.floating = group ? group.name() : row.floating;
184187
}
185188

189+
if (row.label_class) {
190+
const label_class = this.volcopy.commonData.acn_class
191+
.find(p => p.id() === Number(row.label_class));
192+
row.label_class = label_class ? label_class.name() : row.label_class;
193+
}
194+
195+
if (row.prefix) {
196+
const prefix = this.volcopy.commonData.acn_prefix
197+
.find(p => p.id() === Number(row.prefix));
198+
row.prefix = prefix ? prefix.label() : row.prefix;
199+
}
200+
201+
if (row.suffix) {
202+
const suffix = this.volcopy.commonData.acn_suffix
203+
.find(p => p.id() === Number(row.suffix));
204+
row.suffix = suffix ? suffix.label() : row.suffix;
205+
}
206+
186207
if (row.loan_duration) {
187208
row.loan_duration = {
188209
1: $localize`Short`,

0 commit comments

Comments
 (0)