Skip to content

Commit d15614d

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 82a96b3 commit d15614d

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
@@ -153,6 +153,9 @@ export class VolCopyTemplateGridComponent implements OnInit, OnDestroy {
153153
statcat_filter: templateConfig.statcat_filter?.toString() || '',
154154
owning_lib: this.org.get( templateConfig.owning_lib )?.shortname() || '',
155155
copy_number: templateConfig.copy_number?.toString() || '',
156+
label_class: templateConfig.label_class?.toString() || '',
157+
prefix: templateConfig.prefix?.toString() || '',
158+
suffix: templateConfig.suffix?.toString() || '',
156159
debug: JSON.stringify(templateConfig)
157160
};
158161

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

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

0 commit comments

Comments
 (0)