+ {{ 'Number of days after due date' | translate }}:
+
+
+ {{ data.number_of_days_after_due_date }}
+
+
+
+
+
+ {{ 'Number of days before due date' | translate }}:
+
+
+ {{ data.number_of_days_before_due_date }}
+
+
+
+
+
+ {{ 'Reminder fee amount' | translate }}:
+
+
+ {{ data.reminder_fee_amount }}
+
+
+
+
+
+
{{ 'Application' | translate }}
+
+
+
+
+
+
diff --git a/projects/admin/src/app/record/detail-view/circ-policy-detail-view/circ-policy-detail-view.component.ts b/projects/admin/src/app/record/detail-view/circ-policy-detail-view/circ-policy-detail-view.component.ts
new file mode 100644
index 000000000..ea8495062
--- /dev/null
+++ b/projects/admin/src/app/record/detail-view/circ-policy-detail-view/circ-policy-detail-view.component.ts
@@ -0,0 +1,62 @@
+/*
+ * RERO ILS UI
+ * Copyright (C) 2019 RERO
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, version 3 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+import { Component, OnInit, OnDestroy } from '@angular/core';
+import { Observable } from 'rxjs';
+
+@Component({
+ selector: 'admin-circ-policy-detail-view',
+ templateUrl: './circ-policy-detail-view.component.html'
+})
+
+export class CircPolicyDetailViewComponent implements OnInit, OnDestroy {
+
+ /** The observable resolving record data */
+ record$: Observable;
+
+ /** The resource type */
+ type: string;
+
+ /** The record */
+ record: any;
+
+ /** The settings to display */
+ settings = new Map();
+
+ /** The observer to the record observable */
+ private recordObs = null;
+
+ /** On init hook */
+ ngOnInit() {
+ this.recordObs = this.record$.subscribe(record => {
+ this.record = record;
+ if (record.metadata.settings) {
+ record.metadata.settings.forEach(setting => {
+ if (!this.settings.has(setting.patron_type.pid)) {
+ this.settings.set(setting.patron_type.pid, [setting.item_type.pid]);
+ } else {
+ this.settings.get(setting.patron_type.pid).push(setting.item_type.pid);
+ }
+ });
+ }
+ });
+ }
+
+
+ /** On destroy hook */
+ ngOnDestroy() { this.recordObs.unsubscribe(); }
+}
diff --git a/projects/admin/src/app/record/detail-view/circ-policy-detail-view/collapse-list/collapse-list.component.html b/projects/admin/src/app/record/detail-view/circ-policy-detail-view/collapse-list/collapse-list.component.html
new file mode 100644
index 000000000..b14ed4d62
--- /dev/null
+++ b/projects/admin/src/app/record/detail-view/circ-policy-detail-view/collapse-list/collapse-list.component.html
@@ -0,0 +1,33 @@
+
+
+
diff --git a/projects/admin/src/app/record/detail-view/circ-policy-detail-view/collapse-list/collapse-list.component.ts b/projects/admin/src/app/record/detail-view/circ-policy-detail-view/collapse-list/collapse-list.component.ts
new file mode 100644
index 000000000..ff4f70a52
--- /dev/null
+++ b/projects/admin/src/app/record/detail-view/circ-policy-detail-view/collapse-list/collapse-list.component.ts
@@ -0,0 +1,35 @@
+/*
+ * RERO ILS UI
+ * Copyright (C) 2019 RERO
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, version 3 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+import { Component, OnInit, Input } from '@angular/core';
+
+@Component({
+ selector: 'admin-collapse-list',
+ templateUrl: './collapse-list.component.html'
+})
+export class CollapseListComponent {
+
+ /** Patron type */
+ @Input() patronType: string;
+
+ /** Item types */
+ @Input() itemTypes: string[];
+
+ /** Is collapsed */
+ isCollapsed = true;
+
+}
diff --git a/projects/admin/src/app/service/record-routing.service.ts b/projects/admin/src/app/service/record-routing.service.ts
index 33c160022..dd666c10a 100644
--- a/projects/admin/src/app/service/record-routing.service.ts
+++ b/projects/admin/src/app/service/record-routing.service.ts
@@ -39,6 +39,7 @@ import { DocumentEditorComponent } from '../document-editor/document-editor.comp
import { UserService } from './user.service';
import { LibraryDetailViewComponent } from '../record/detail-view/library-detail-view/library-detail-view.component';
import { RecordPermissionMessageService } from './record-permission-message.service';
+import { CircPolicyDetailViewComponent } from '../record/detail-view/circ-policy-detail-view/circ-policy-detail-view.component';
@Injectable({
providedIn: 'root'
@@ -228,7 +229,8 @@ export class RecordRoutingService {
{
key: 'circ_policies',
label: 'Circulation Policies',
- component: CircPoliciesBriefViewComponent
+ component: CircPoliciesBriefViewComponent,
+ detailComponent: CircPolicyDetailViewComponent
}
]
}
diff --git a/projects/admin/src/app/translate/i18n/en_US.json b/projects/admin/src/app/translate/i18n/en_US.json
index 77b208886..d291d8984 100644
--- a/projects/admin/src/app/translate/i18n/en_US.json
+++ b/projects/admin/src/app/translate/i18n/en_US.json
@@ -6,6 +6,8 @@
"Additional Materials": "Additional Materials",
"Address": "Address",
"Address must be at least 4 characters long.": "Address must be at least 4 characters long.",
+ "Allow checkout": "Allow checkout",
+ "Allow requests": "Allow requests",
"Application": "Application",
"Applies to patron types": "Applies to patron types",
"Apply": "Apply",
@@ -75,6 +77,7 @@
"Integer only.": "Integer only.",
"Interval is required.": "Interval is required.",
"Interval must greater than 0.": "Interval must greater than 0.",
+ "Is default": "Is default",
"Is part of": "Is part of",
"Item": "Item",
"Item infos": "Item infos",
@@ -95,6 +98,8 @@
"No request corresponding to the given item has been found.": "No request corresponding to the given item has been found.",
"Notes": "Notes",
"Notifications and fees": "Notifications and fees",
+ "Number of days after due date": "Number of days after due date",
+ "Number of days before due date": "Number of days before due date",
"Number of renewals": "Number of renewals",
"OK": "OK",
"Online Access": "Online Access",
@@ -119,6 +124,7 @@
"Record Updated!": "Record Updated!",
"Record created!": "Record created!",
"Record deleted": "Record deleted",
+ "Reminder fee amount": "Reminder fee amount",
"Renewal duration": "Renewal duration",
"Renewal duration is required.": "Renewal duration is required.",
"Repeat each": "Repeat each",