From 6cc7045ec560db37280835f202e22e43198dcf12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Marie=CC=81thoz?= Date: Tue, 7 Jan 2025 14:46:29 +0100 Subject: [PATCH 1/7] primeng: admin entities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-by: Johnny Mariéthoz Co-Authored-by: Bertrand Zuchuat --- projects/admin/src/app/app.component.html | 88 +++++++-------- .../app/menu/menu-app/menu-app.component.html | 4 +- .../menu-dashboard.component.html | 16 ++- .../entities-local-detail-view.component.html | 34 +++--- .../local/entities-local-global.component.ts | 2 +- ...al-organisation-detail-view.component.html | 4 +- .../local-page-detail.component.html | 37 ++++--- .../local-person-detail-view.component.html | 2 +- .../local-place-detail-view.component.html | 2 +- .../local-topic-detail-view.component.html | 6 +- ...entities-remote-detail-view.component.html | 102 +++++++++--------- ...entities-remote-detail-view.component.scss | 5 + ...es-organisation-detail-view.component.html | 6 +- .../remote-page-detail.component.html | 28 ++--- ...entities-person-detail-view.component.html | 6 +- .../remote-topic-detail-view.component.html | 24 +++-- .../document-record-search.component.html | 1 - projects/admin/src/app/scss/styles.scss | 5 + .../core/brief-view/brief-view.component.html | 16 ++- .../entity-brief-view.component.ts | 4 +- 20 files changed, 207 insertions(+), 185 deletions(-) create mode 100644 projects/admin/src/app/record/detail-view/entities-detail-view/remote/entities-remote-detail-view.component.scss diff --git a/projects/admin/src/app/app.component.html b/projects/admin/src/app/app.component.html index 39310c5bd..5bd039d85 100644 --- a/projects/admin/src/app/app.component.html +++ b/projects/admin/src/app/app.component.html @@ -14,62 +14,52 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> - +

Loading…

-@if (user) { -
-
+@if (user?.hasAdminUiAccess) { +
+ +
+
+ + +
+
+ {{ message.summary }}
- - - - -
- } @else { - -
-

Permission required

- {{ 'You do not have sufficient permissions to view this page' | translate }} -
- } - - +

+
+ + + + + +} @else { +
+

Permission required

+ {{ 'You do not have sufficient permissions to view this page' | translate }} +
} - - + diff --git a/projects/admin/src/app/menu/menu-app/menu-app.component.html b/projects/admin/src/app/menu/menu-app/menu-app.component.html index d28df2b90..325ca7539 100644 --- a/projects/admin/src/app/menu/menu-app/menu-app.component.html +++ b/projects/admin/src/app/menu/menu-app/menu-app.component.html @@ -27,11 +27,11 @@ @if (item.icon) { } - {{ item.label }} + {{ item.label }} @if (item.shortcut) { {{ item.shortcut }} - + } @if (item.items) { diff --git a/projects/admin/src/app/menu/menu-dashboard/menu-dashboard.component.html b/projects/admin/src/app/menu/menu-dashboard/menu-dashboard.component.html index 3e9cc7d19..94218d58e 100644 --- a/projects/admin/src/app/menu/menu-dashboard/menu-dashboard.component.html +++ b/projects/admin/src/app/menu/menu-dashboard/menu-dashboard.component.html @@ -14,20 +14,19 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> -
+ + + } diff --git a/projects/admin/src/app/record/detail-view/entities-detail-view/local/entities-local-global.component.ts b/projects/admin/src/app/record/detail-view/entities-detail-view/local/entities-local-global.component.ts index 655dcdee0..1f31771b0 100644 --- a/projects/admin/src/app/record/detail-view/entities-detail-view/local/entities-local-global.component.ts +++ b/projects/admin/src/app/record/detail-view/entities-detail-view/local/entities-local-global.component.ts @@ -20,7 +20,7 @@ import { Component, Input } from '@angular/core'; @Component({ selector: 'admin-entities-local-global', template: ` -
+
+ + } + } diff --git a/projects/admin/src/app/record/detail-view/entities-detail-view/remote/entities-remote-detail-view.component.scss b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/entities-remote-detail-view.component.scss new file mode 100644 index 000000000..5f03076b8 --- /dev/null +++ b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/entities-remote-detail-view.component.scss @@ -0,0 +1,5 @@ +admin-remote-entities-remote-detail-view { + dl.metadata { + @extend .p-0; + } +} diff --git a/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-organisation-detail-view/remote-entities-organisation-detail-view.component.html b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-organisation-detail-view/remote-entities-organisation-detail-view.component.html index f10d16463..fd1f763dd 100644 --- a/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-organisation-detail-view/remote-entities-organisation-detail-view.component.html +++ b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-organisation-detail-view/remote-entities-organisation-detail-view.component.html @@ -15,6 +15,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> + diff --git a/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-page-detail/remote-page-detail.component.html b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-page-detail/remote-page-detail.component.html index bd01ebd25..b0acbe15a 100644 --- a/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-page-detail/remote-page-detail.component.html +++ b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-page-detail/remote-page-detail.component.html @@ -14,9 +14,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> -
- @if (record) { - - + - } - @if (error) { - - } - -
+} + +@if (error) { + +} + + diff --git a/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-person-detail-view/remote-entities-person-detail-view.component.html b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-person-detail-view/remote-entities-person-detail-view.component.html index 69328a0bc..d59512e5f 100644 --- a/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-person-detail-view/remote-entities-person-detail-view.component.html +++ b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-person-detail-view/remote-entities-person-detail-view.component.html @@ -15,6 +15,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> + diff --git a/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-topic-detail-view/remote-topic-detail-view.component.html b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-topic-detail-view/remote-topic-detail-view.component.html index c03beb4c2..e31d7ede6 100644 --- a/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-topic-detail-view/remote-topic-detail-view.component.html +++ b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-topic-detail-view/remote-topic-detail-view.component.html @@ -15,6 +15,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> +
{{ item.title }}
-
    +
      @if (item.match) { @for(match of item.match; track match) {
    • @@ -126,4 +128,4 @@ }
-
\ No newline at end of file +
diff --git a/projects/admin/src/app/record/search-view/document-record-search/document-record-search.component.html b/projects/admin/src/app/record/search-view/document-record-search/document-record-search.component.html index 06fdc2ec8..fd862cf66 100644 --- a/projects/admin/src/app/record/search-view/document-record-search/document-record-search.component.html +++ b/projects/admin/src/app/record/search-view/document-record-search/document-record-search.component.html @@ -15,7 +15,6 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> - @if (iconTemplate) {
- +
}
@if (titleTemplate) { - + } @else {
@if (link) { @@ -42,16 +45,19 @@
@if (contentTemplate) {
- +
}
@if (tagsTemplate) { - + } @else { @if (tags) { @for (tag of tags; track tag) { - + } } } diff --git a/projects/shared/src/lib/component/entities/entity-brief-view/entity-brief-view.component.ts b/projects/shared/src/lib/component/entities/entity-brief-view/entity-brief-view.component.ts index 87c9fb002..77afaa7ed 100644 --- a/projects/shared/src/lib/component/entities/entity-brief-view/entity-brief-view.component.ts +++ b/projects/shared/src/lib/component/entities/entity-brief-view/entity-brief-view.component.ts @@ -118,8 +118,10 @@ export class EntityBriefViewComponent implements ResultItem, OnInit, AfterViewIn this.routerLink = ['/records', 'local_entities', 'detail', this.record.metadata.pid]; this.tags = [ {label: this.record.metadata.resource_type, type: 'local'}, - {label: this.record.metadata?.source_catalog} ]; + if (this.record.metadata.source_catalog) { + this.tags.push({label: this.record.metadata.source_catalog}); + } } this.entityTitle = this.record.metadata.authorized_access_point; } From 309d127c2d06612fafe05974871094c1708ac971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Marie=CC=81thoz?= Date: Wed, 8 Jan 2025 08:26:09 +0100 Subject: [PATCH 2/7] primeng: admin inventories MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-by: Johnny Mariéthoz Co-Authored-by: Bertrand Zuchuat --- .../issues-brief-view.component.ts | 2 +- .../items-brief-view.component.html | 18 +++++++------- projects/admin/src/app/routes/items-route.ts | 24 ++++++++++++------- 3 files changed, 26 insertions(+), 18 deletions(-) diff --git a/projects/admin/src/app/record/brief-view/issues-brief-view/issues-brief-view.component.ts b/projects/admin/src/app/record/brief-view/issues-brief-view/issues-brief-view.component.ts index 2e9b1246f..8cee7caaf 100644 --- a/projects/admin/src/app/record/brief-view/issues-brief-view/issues-brief-view.component.ts +++ b/projects/admin/src/app/record/brief-view/issues-brief-view/issues-brief-view.component.ts @@ -20,7 +20,7 @@ import { ResultItem } from '@rero/ng-core'; import { IssueItemStatus } from '@rero/shared'; @Component({ - selector: 'admin-inventory-brief-view', + selector: 'admin-issues-brief-view', templateUrl: './issues-brief-view.component.html', }) export class IssuesBriefViewComponent implements ResultItem, OnInit { diff --git a/projects/admin/src/app/record/brief-view/items-brief-view/items-brief-view.component.html b/projects/admin/src/app/record/brief-view/items-brief-view/items-brief-view.component.html index f5560769a..8baaa08fa 100644 --- a/projects/admin/src/app/record/brief-view/items-brief-view/items-brief-view.component.html +++ b/projects/admin/src/app/record/brief-view/items-brief-view/items-brief-view.component.html @@ -16,18 +16,18 @@ along with this program. If not, see . --> -
+
{{ record.metadata.ui_title_text }}
-
+ diff --git a/projects/admin/src/app/routes/items-route.ts b/projects/admin/src/app/routes/items-route.ts index 794c3843d..4544a232d 100644 --- a/projects/admin/src/app/routes/items-route.ts +++ b/projects/admin/src/app/routes/items-route.ts @@ -164,35 +164,43 @@ export class ItemsRoute extends BaseRoute implements RouteInterface { { label: _('Relevance'), value: 'bestmatch', - defaultQuery: true + defaultQuery: true, + icon: 'fa fa-sort-amount-desc' }, { label: _('Barcode'), - value: 'barcode' + value: 'barcode', + icon: 'fa fa-sort-alpha-asc' }, { label: _('Barcode (desc)'), - value: '-barcode' + value: '-barcode', + icon: 'fa fa-sort-alpha-desc' }, { label: _('Call number'), - value: 'call_number' + value: 'call_number', + icon: 'fa fa-sort-alpha-asc' }, { label: _('Call number (desc)'), - value: '-call_number' + value: '-call_number', + icon: 'fa fa-sort-alpha-desc' }, { label: _('Second call number'), - value: 'second_call_number' + value: 'second_call_number', + icon: 'fa fa-sort-alpha-asc' }, { label: _('Second call number (desc)'), - value: '-second_call_number' + value: '-second_call_number', + icon: 'fa fa-sort-alpha-desc' }, { label: _('Current requests'), - value: 'current_requests' + value: 'current_requests', + icon: 'fa fa-sort-amount-desc' } ] } From 0ae2c504e483d4d3ea65f40a5052d1c5130dbd44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Marie=CC=81thoz?= Date: Wed, 8 Jan 2025 11:27:52 +0100 Subject: [PATCH 3/7] primeng: admin fees MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-by: Johnny Mariéthoz Co-Authored-by: Bertrand Zuchuat --- package-lock.json | 293 ++---------------- package.json | 2 +- projects/admin/src/app/app.module.ts | 2 - ...n-transaction-event-default.component.html | 24 +- ...ron-transaction-event-default.component.ts | 3 +- ...n-transaction-event-overdue.component.html | 18 +- ...ron-transaction-event-overdue.component.ts | 3 +- ...ansaction-events-brief-view.component.html | 76 +++-- ...ansaction-events-brief-view.component.scss | 86 ----- ...transaction-events-brief-view.component.ts | 23 +- .../holding-organisation.component.html | 2 +- .../item-request/item-request.component.html | 2 +- .../item-transactions.component.html | 2 +- .../local-field/local-field.component.html | 2 +- .../patron-permissions.component.html | 2 +- .../payments-data/payment-data.scss | 31 -- .../payments-data.component.html | 32 +- .../payments-data/payments-data.component.ts | 3 +- .../pie/payment-data-pie.component.html | 22 +- .../pie/payment-data-pie.component.scss | 57 ---- .../pie/payment-data-pie.component.ts | 51 +-- .../table/payments-data-table.component.html | 15 +- .../table/payments-data-table.component.scss | 43 --- .../table/payments-data-table.component.ts | 3 +- .../primeng-import/primeng-import.module.ts | 4 +- 25 files changed, 158 insertions(+), 643 deletions(-) delete mode 100644 projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-events-brief-view.component.scss delete mode 100644 projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/payment-data.scss delete mode 100644 projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/pie/payment-data-pie.component.scss delete mode 100644 projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/table/payments-data-table.component.scss diff --git a/package-lock.json b/package-lock.json index 0ab17e20a..b2e911ffd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,9 +29,9 @@ "@ngx-loading-bar/router": "^6.0.0", "@ngx-translate/core": "^15.0.0", "@rero/ng-core": "^17.3.0", - "@swimlane/ngx-charts": "^20.5.0", "@vpoppy/ngx-translate-extract": "^9.0.0", "bootstrap": "^4.6.2", + "chart.js": "^4.4.7", "crypto-js": "^4.2.0", "easymde": "^2.18.0", "font-awesome": "^4.7.0", @@ -3243,6 +3243,11 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@kurkle/color": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.4.tgz", + "integrity": "sha512-M5UknZPHRu3DEDWoipU6sE8PdkZ6Z/S+v4dD+Ke8IaNlpdSQah50lz1KtcFBa2vsdOnwbbnxJwVM4wty6udA5w==" + }, "node_modules/@leichtgewicht/ip-codec": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", @@ -4443,38 +4448,6 @@ "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==", "dev": true }, - "node_modules/@swimlane/ngx-charts": { - "version": "20.5.0", - "resolved": "https://registry.npmjs.org/@swimlane/ngx-charts/-/ngx-charts-20.5.0.tgz", - "integrity": "sha512-PNBIHdu/R3ceD7jnw1uCBVOj4k3T6IxfdW6xsDsglGkZyoWMEEq4tLoEurjLEKzmDtRv9c35kVNOXy0lkOuXeA==", - "dependencies": { - "d3-array": "^3.1.1", - "d3-brush": "^3.0.0", - "d3-color": "^3.1.0", - "d3-ease": "^3.0.1", - "d3-format": "^3.1.0", - "d3-hierarchy": "^3.1.0", - "d3-interpolate": "^3.0.1", - "d3-sankey": "^0.12.3", - "d3-scale": "^4.0.2", - "d3-selection": "^3.0.0", - "d3-shape": "^3.2.0", - "d3-time-format": "^3.0.0", - "d3-transition": "^3.0.1", - "rfdc": "^1.3.0", - "tslib": "^2.0.0" - }, - "peerDependencies": { - "@angular/animations": ">=12.0.0", - "@angular/cdk": ">=12.0.0", - "@angular/common": ">=12.0.0", - "@angular/core": ">=12.0.0", - "@angular/forms": ">=12.0.0", - "@angular/platform-browser": ">=12.0.0", - "@angular/platform-browser-dynamic": ">=12.0.0", - "rxjs": "^6.5.3 || ^7.4.0" - } - }, "node_modules/@tufjs/canonical-json": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz", @@ -6368,6 +6341,17 @@ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, + "node_modules/chart.js": { + "version": "4.4.7", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.7.tgz", + "integrity": "sha512-pwkcKfdzTMAU/+jNosKhNL2bHtJc/sSmYgVbuGTEDhzkrhmyihmP7vUc/5ZK9WopidMDHNe3Wm7jOd/WhuHWuw==", + "dependencies": { + "@kurkle/color": "^0.3.0" + }, + "engines": { + "pnpm": ">=8" + } + }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", @@ -7119,238 +7103,6 @@ "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", "dev": true }, - "node_modules/d3-array": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", - "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", - "dependencies": { - "internmap": "1 - 2" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-brush": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.0.tgz", - "integrity": "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==", - "dependencies": { - "d3-dispatch": "1 - 3", - "d3-drag": "2 - 3", - "d3-interpolate": "1 - 3", - "d3-selection": "3", - "d3-transition": "3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-color": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", - "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-dispatch": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz", - "integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-drag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.0.tgz", - "integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==", - "dependencies": { - "d3-dispatch": "1 - 3", - "d3-selection": "3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-ease": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", - "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-format": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", - "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-hierarchy": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz", - "integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-interpolate": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", - "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", - "dependencies": { - "d3-color": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-path": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", - "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-sankey": { - "version": "0.12.3", - "resolved": "https://registry.npmjs.org/d3-sankey/-/d3-sankey-0.12.3.tgz", - "integrity": "sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==", - "dependencies": { - "d3-array": "1 - 2", - "d3-shape": "^1.2.0" - } - }, - "node_modules/d3-sankey/node_modules/d3-array": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz", - "integrity": "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==", - "dependencies": { - "internmap": "^1.0.0" - } - }, - "node_modules/d3-sankey/node_modules/d3-path": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz", - "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==" - }, - "node_modules/d3-sankey/node_modules/d3-shape": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz", - "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==", - "dependencies": { - "d3-path": "1" - } - }, - "node_modules/d3-sankey/node_modules/internmap": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz", - "integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==" - }, - "node_modules/d3-scale": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", - "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", - "dependencies": { - "d3-array": "2.10.0 - 3", - "d3-format": "1 - 3", - "d3-interpolate": "1.2.0 - 3", - "d3-time": "2.1.1 - 3", - "d3-time-format": "2 - 4" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-selection": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", - "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-shape": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", - "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", - "dependencies": { - "d3-path": "^3.1.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-time": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", - "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", - "dependencies": { - "d3-array": "2 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-time-format": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-3.0.0.tgz", - "integrity": "sha512-UXJh6EKsHBTjopVqZBhFysQcoXSv/5yLONZvkQ5Kk3qbwiUYkdX17Xa1PT6U1ZWXGGfB1ey5L8dKMlFq2DO0Ag==", - "dependencies": { - "d3-time": "1 - 2" - } - }, - "node_modules/d3-time-format/node_modules/d3-array": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz", - "integrity": "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==", - "dependencies": { - "internmap": "^1.0.0" - } - }, - "node_modules/d3-time-format/node_modules/d3-time": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-2.1.1.tgz", - "integrity": "sha512-/eIQe/eR4kCQwq7yxi7z4c6qEXf2IYGcjoWB5OOQy4Tq9Uv39/947qlDcN2TLkiTzQWzvnsuYPB9TrWaNfipKQ==", - "dependencies": { - "d3-array": "2" - } - }, - "node_modules/d3-time-format/node_modules/internmap": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz", - "integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==" - }, - "node_modules/d3-timer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", - "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-transition": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.1.tgz", - "integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==", - "dependencies": { - "d3-color": "1 - 3", - "d3-dispatch": "1 - 3", - "d3-ease": "1 - 3", - "d3-interpolate": "1 - 3", - "d3-timer": "1 - 3" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "d3-selection": "2 - 3" - } - }, "node_modules/date-format": { "version": "4.0.14", "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", @@ -9637,14 +9389,6 @@ "node": ">=8" } }, - "node_modules/internmap": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", - "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", - "engines": { - "node": ">=12" - } - }, "node_modules/ip-address": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", @@ -13409,7 +13153,8 @@ "node_modules/rfdc": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", - "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==" + "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==", + "dev": true }, "node_modules/rimraf": { "version": "3.0.2", diff --git a/package.json b/package.json index 43feffbd4..08f621c7c 100644 --- a/package.json +++ b/package.json @@ -85,9 +85,9 @@ "@ngx-loading-bar/router": "^6.0.0", "@ngx-translate/core": "^15.0.0", "@rero/ng-core": "^17.3.0", - "@swimlane/ngx-charts": "^20.5.0", "@vpoppy/ngx-translate-extract": "^9.0.0", "bootstrap": "^4.6.2", + "chart.js": "^4.4.7", "crypto-js": "^4.2.0", "easymde": "^2.18.0", "font-awesome": "^4.7.0", diff --git a/projects/admin/src/app/app.module.ts b/projects/admin/src/app/app.module.ts index 388f2b533..de47581c3 100644 --- a/projects/admin/src/app/app.module.ts +++ b/projects/admin/src/app/app.module.ts @@ -36,7 +36,6 @@ import { TranslateLoader, TruncateTextPipe } from '@rero/ng-core'; import { AppSettingsService, ItemHoldingsCallNumberPipe, MainTitlePipe, SharedModule, UserService } from '@rero/shared'; -import { NgxChartsModule } from '@swimlane/ngx-charts'; import { FileUploadModule } from 'primeng/fileupload'; import { MenubarModule } from 'primeng/menubar'; import { TableModule } from "primeng/table"; @@ -339,7 +338,6 @@ export function appInitFactory(appInitializerService: AppInitializerService): () AppRoutingModule, BrowserAnimationsModule, BrowserModule, - NgxChartsModule, FormsModule, HttpClientModule, ReactiveFormsModule, diff --git a/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-event-default.component.html b/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-event-default.component.html index e3b2a139b..020118b49 100644 --- a/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-event-default.component.html +++ b/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-event-default.component.html @@ -15,16 +15,14 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> -
- @if (parent.note) { -
- [{{ 'Note' | translate }}: {{ parent.note }}] -
- } -
-
Patron
-
- {{ parent.patron.pid | patronName | async }} -
-
-
+@if (parent.note) { +
+ [{{ 'Note' | translate }}: {{ parent.note }}] +
+} + diff --git a/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-event-default.component.ts b/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-event-default.component.ts index 86186258e..dcfa01e64 100644 --- a/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-event-default.component.ts +++ b/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-event-default.component.ts @@ -21,8 +21,7 @@ import { PatronTransaction, PatronTransactionEvent } from '../../../classes/patr @Component({ selector: 'admin-patron-transaction-event-default', - templateUrl: './patron-transaction-event-default.component.html', - styleUrls: ['./patron-transaction-events-brief-view.component.scss'] + templateUrl: './patron-transaction-event-default.component.html' }) export class PatronTransactionEventDefaultComponent { diff --git a/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-event-overdue.component.html b/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-event-overdue.component.html index 9e8cea162..c1c65fe0c 100644 --- a/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-event-overdue.component.html +++ b/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-event-overdue.component.html @@ -15,28 +15,27 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> -
-
+
@if (parent.document) { {{ parent.document.title | mainTitle }} } @else if (parent.note) { [{{ 'Note' | translate }}: {{ parent.note }}] }
-
+ -
diff --git a/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-event-overdue.component.ts b/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-event-overdue.component.ts index 37665ee25..334835bf6 100644 --- a/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-event-overdue.component.ts +++ b/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-event-overdue.component.ts @@ -21,8 +21,7 @@ import { PatronTransactionEventDefaultComponent } from './patron-transaction-eve @Component({ selector: 'admin-patron-transaction-event-overdue', - templateUrl: './patron-transaction-event-overdue.component.html', - styleUrls: ['./patron-transaction-events-brief-view.component.scss'] + templateUrl: './patron-transaction-event-overdue.component.html' }) export class PatronTransactionEventOverdueComponent extends PatronTransactionEventDefaultComponent { diff --git a/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-events-brief-view.component.html b/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-events-brief-view.component.html index 2f41744e7..5d46e9ed4 100644 --- a/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-events-brief-view.component.html +++ b/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-events-brief-view.component.html @@ -17,51 +17,47 @@ --> @defer(when loaded) { -
- @switch (parent.type) { - @case ('overdue') { - - +
+
+ @switch (parent.type) { + @case ('overdue') { + + } + @default { + + } } - @default { - - - } - } - - @if (event.type !== eventTypes.DISPUTE) { - {{ event.amount | currency : organisation.default_currency }} +
+ + @if (event().type !== eventTypes.DISPUTE) { + {{ event().amount | currency : organisation.default_currency }} } @else { {{ 'dispute' | translate }} } - +
-
- @if (event.operator) { - {{ event.operator.name }} - } - @if (event.library) { - {{ event.library.name }} - } - {{ parent.type | translate }} - {{ event.creation_date | date : 'short' }} -
-} @loading { -
-
- -
- - - - -
+
+
+ @if (event().operator) { + +  {{ event().operator.name }} + + } + @if (event().library) { + +  {{ event().library.name }} + + } + +  {{ parent.type | translate }} +
- -
-
- - - + + +  {{ event().creation_date | date : 'short' }} +
} +@placeholder { +  {{ 'Loading in progress…' | translate }} +} diff --git a/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-events-brief-view.component.scss b/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-events-brief-view.component.scss deleted file mode 100644 index b4b554fd2..000000000 --- a/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-events-brief-view.component.scss +++ /dev/null @@ -1,86 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2019-2022 RERO - * Copyright (C) 2019-2022 UCLouvain - * - * 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 'bootstrap/scss/functions'; -@import 'bootstrap/scss/variables'; -@import 'bootstrap/scss/bootstrap'; -@import '../../../scss/variables'; - -:host{ - margin: 0; - display: block; - - .content{ - position: relative; - display: flex; - align-items: flex-start; - - *:nth-child(1){ - flex-grow: 2; - } - - @each $type, $badge in (fee, danger), (payment, success), (dispute, warning), (cancel, dark) { - .badge-#{$type}{ - @extend .badge-#{$badge}; - font-variant: small-caps; - } - } - } - - dt, dd{ - margin:0; - } - - .meta{ - display: flex; - margin-top: 0.5rem; - - *{ - font-size: 0.75rem; - background-color: $gray-300; - color: $gray-600; - border-radius: 0.75rem; - padding: 2px 10px; - } - - .operator:before{ - font-family: 'FontAwesome'; - content: " \f2be"; - padding-right: 0.5rem; - } - .library:before{ - font-family: 'FontAwesome'; - content: " \f19c"; - padding-right: 0.5rem; - } - .transaction-type:before{ - font-family: 'FontAwesome'; - content: " \f0ec"; - padding-right: 0.5rem; - } - .creation-date { - margin-left: auto; - &:before{ - font-family: 'FontAwesome'; - content: " \f017"; - padding-right: 0.5rem; - } - } - } - -} diff --git a/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-events-brief-view.component.ts b/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-events-brief-view.component.ts index 9733b2513..7c1001363 100644 --- a/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-events-brief-view.component.ts +++ b/projects/admin/src/app/record/brief-view/patron-transaction-events-brief-view/patron-transaction-events-brief-view.component.ts @@ -15,7 +15,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -import { Component, inject, Input, OnInit } from '@angular/core'; +import { Component, computed, inject, Input, OnInit, signal, WritableSignal } from '@angular/core'; import { ResultItem } from '@rero/ng-core'; import { PatronTransaction, PatronTransactionEvent, PatronTransactionEventType } from '@app/admin/classes/patron-transaction'; import { OrganisationService } from '@app/admin/service/organisation.service'; @@ -24,8 +24,7 @@ import { PatronTransactionsService } from '../../../service/patron-transactions. @Component({ selector: 'admin-patron-transaction-events-brief-view', - templateUrl: './patron-transaction-events-brief-view.component.html', - styleUrls: ['./patron-transaction-events-brief-view.component.scss'] + templateUrl: './patron-transaction-events-brief-view.component.html' }) export class PatronTransactionEventsBriefViewComponent implements ResultItem, OnInit { @@ -43,20 +42,32 @@ export class PatronTransactionEventsBriefViewComponent implements ResultItem, On /** is all data are loaded */ loaded = false; /** transaction object representation from record */ - event: PatronTransactionEvent; + event: WritableSignal = signal(null); /** Parent parent transaction */ parent: PatronTransaction; /** current organisation */ organisation: Organisation; /** reference to PatronTransactionEventType */ eventTypes = PatronTransactionEventType; + severity = computed(() => { + switch(this.event().type) { + case 'fee': + return 'danger'; + case 'payment': + return 'success'; + case 'dispute': + return 'warning'; + default: + return 'contrast'; + } + }); /** OnInit hook */ ngOnInit(): void { this.organisation = this.organisationService.organisation; - this.event = new PatronTransactionEvent(this.record.metadata); + this.event.set(new PatronTransactionEvent(this.record.metadata)); this.patronTransactionService - .getPatronTransaction(this.event.parent.pid) + .getPatronTransaction(this.event().parent.pid) .subscribe((parent: PatronTransaction) => { this.parent = parent; this.loaded = true; diff --git a/projects/admin/src/app/record/detail-view/document-detail-view/holding-organisation/holding-organisation.component.html b/projects/admin/src/app/record/detail-view/document-detail-view/holding-organisation/holding-organisation.component.html index e308a6077..6e1dd9fe1 100644 --- a/projects/admin/src/app/record/detail-view/document-detail-view/holding-organisation/holding-organisation.component.html +++ b/projects/admin/src/app/record/detail-view/document-detail-view/holding-organisation/holding-organisation.component.html @@ -25,5 +25,5 @@
Other organisations
} } @loading { - loading in progress... + Loading in progress… } diff --git a/projects/admin/src/app/record/detail-view/document-detail-view/item-request/item-request.component.html b/projects/admin/src/app/record/detail-view/document-detail-view/item-request/item-request.component.html index bb35d4750..98337c1f0 100644 --- a/projects/admin/src/app/record/detail-view/document-detail-view/item-request/item-request.component.html +++ b/projects/admin/src/app/record/detail-view/document-detail-view/item-request/item-request.component.html @@ -81,5 +81,5 @@
} @placeholder { -  {{ 'loading in progress...' | translate }} +  {{ 'Loading in progress…' | translate }} } diff --git a/projects/admin/src/app/record/detail-view/item-detail-view/item-transactions/item-transactions.component.html b/projects/admin/src/app/record/detail-view/item-detail-view/item-transactions/item-transactions.component.html index 3bd98e088..a8fdb7137 100644 --- a/projects/admin/src/app/record/detail-view/item-detail-view/item-transactions/item-transactions.component.html +++ b/projects/admin/src/app/record/detail-view/item-detail-view/item-transactions/item-transactions.component.html @@ -71,7 +71,7 @@
No pending request
} } @placeholder { -  {{ 'loading in progress...' | translate }} +  {{ 'Loading in progress…' | translate }} }
diff --git a/projects/admin/src/app/record/detail-view/local-field/local-field.component.html b/projects/admin/src/app/record/detail-view/local-field/local-field.component.html index 12eaf74f5..302922876 100644 --- a/projects/admin/src/app/record/detail-view/local-field/local-field.component.html +++ b/projects/admin/src/app/record/detail-view/local-field/local-field.component.html @@ -60,5 +60,5 @@ } } @placeholder { -  {{ 'loading in progress...' | translate }} +  {{ 'Loading in progress…' | translate }} } diff --git a/projects/admin/src/app/record/detail-view/patron-detail-view/patron-permissions/patron-permissions.component.html b/projects/admin/src/app/record/detail-view/patron-detail-view/patron-permissions/patron-permissions.component.html index ac880263a..550c9a024 100644 --- a/projects/admin/src/app/record/detail-view/patron-detail-view/patron-permissions/patron-permissions.component.html +++ b/projects/admin/src/app/record/detail-view/patron-detail-view/patron-permissions/patron-permissions.component.html @@ -36,5 +36,5 @@ }
} @placeholder { -  {{ 'loading in progress...' | translate }} +  {{ 'Loading in progress…' | translate }} } diff --git a/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/payment-data.scss b/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/payment-data.scss deleted file mode 100644 index 8f27166bf..000000000 --- a/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/payment-data.scss +++ /dev/null @@ -1,31 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -/* - * RERO ILS UI - * Copyright (C) 2019-2022 RERO - * Copyright (C) 2019-2022 UCLouvain - * - * 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 'bootstrap/scss/functions'; -@import 'bootstrap/scss/variables'; - -.card-body { - font-size: .9rem; - color: $body-color; - background-color: $card-cap-bg; -} - -button { - font-size: 12px; -} diff --git a/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/payments-data.component.html b/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/payments-data.component.html index 54bcd5425..2c07f18a0 100644 --- a/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/payments-data.component.html +++ b/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/payments-data.component.html @@ -16,23 +16,21 @@ along with this program. If not, see . --> @if (data.total > 0) { -
-
- - -
-
- @switch (mode) { - @case ('table') { - - } - @case ('pie') { - - } + + +
+ Amount received + +
+
+ @switch (mode) { + @case ('table') { + } -
-
+ @case ('pie') { + + } + } + } diff --git a/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/payments-data.component.ts b/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/payments-data.component.ts index 73fc81459..cec7b6263 100644 --- a/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/payments-data.component.ts +++ b/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/payments-data.component.ts @@ -20,8 +20,7 @@ import { PaymentData } from '../interfaces'; @Component({ selector: 'admin-payments-data', - templateUrl: './payments-data.component.html', - styleUrls: ['./payment-data.scss'] + templateUrl: './payments-data.component.html' }) export class PaymentsDataComponent { diff --git a/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/pie/payment-data-pie.component.html b/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/pie/payment-data-pie.component.html index 21cc47f71..769dc85cb 100644 --- a/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/pie/payment-data-pie.component.html +++ b/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/pie/payment-data-pie.component.html @@ -15,23 +15,9 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> -
-
- - - {{ model.label }} - {{ model.value | currency: org_currency : 'symbol' }} - - +@if (values) { +
+
-
+} diff --git a/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/pie/payment-data-pie.component.scss b/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/pie/payment-data-pie.component.scss deleted file mode 100644 index d3a2608ff..000000000 --- a/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/pie/payment-data-pie.component.scss +++ /dev/null @@ -1,57 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -/* - * RERO ILS UI - * Copyright (C) 2019-2022 RERO - * Copyright (C) 2019-2022 UCLouvain - * - * 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 'bootstrap/scss/functions'; -@import 'bootstrap/scss/variables'; - -:host { - height: 100%; - width: 100%; - - .chart-container { - padding-left: map-get($spacers, 4); - padding-right: map-get($spacers, 4); - margin-bottom: map-get($spacers, 3); - - .payment-pie-chart { - width: 230px; - margin: 0 auto; - } - } - - // HACK ngx-charts css classes to display legend as we want. - .chart-legend { - - display: block; - - .legend-labels { - background: transparent; - } - .legend-label { - margin: 0; - } - .legend-label-color { - height: 8px; - width: 8px; - } - li { - display: block !important; - } - } -} diff --git a/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/pie/payment-data-pie.component.ts b/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/pie/payment-data-pie.component.ts index d45b35388..805d2719b 100644 --- a/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/pie/payment-data-pie.component.ts +++ b/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/pie/payment-data-pie.component.ts @@ -15,20 +15,16 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -import { Component, inject, Input, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, inject, Input, OnInit } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { LegendPosition } from '@swimlane/ngx-charts'; import { OrganisationService } from '../../../../../service/organisation.service'; import { PaymentData } from '../../interfaces'; @Component({ selector: 'admin-payments-data-pie', templateUrl: './payment-data-pie.component.html', - styleUrls: ['./payment-data-pie.component.scss'], - encapsulation: ViewEncapsulation.ShadowDom, }) export class PaymentDataPieComponent implements OnInit { - private organisationService: OrganisationService = inject(OrganisationService); private translateService: TranslateService = inject(TranslateService); @@ -36,29 +32,36 @@ export class PaymentDataPieComponent implements OnInit { /** The payment data to display. */ @Input() data: PaymentData; - /** variable used to display pie-chart with ngx-charts. */ - values: any[] = []; - view: any[] = [230, 230]; - legendDisplay = true; - legendTitle = ''; - legendPosition = LegendPosition.Below; - animation = false; - - - // GETTER & SETTER ========================================================== - /** Organisation currency */ - get org_currency() { - return this.organisationService.organisation.default_currency; - } + values: any; + options: any; /** OnInit hook */ ngOnInit() { if (this.data.subtypes) { - this.data.subtypes.map(subtype => this.values.push({ - name: this.translateService.instant(subtype.name), - value: subtype.total - })); + this.values = { + labels: [], + datasets: [ + { + data: [], + }, + ], + }; + this.data.subtypes.map((subtype) => { + this.values.labels.push(this.translateService.instant(subtype.name)); + this.values.datasets[0].data.push(subtype.total); + }); } + this.options = { + plugins: { + tooltip: { + callbacks: { + label: (context) => { + let label = context.formattedValue || ''; + return ` ${label} ${this.organisationService.organisation.default_currency}`; + }, + }, + }, + }, + }; } - } diff --git a/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/table/payments-data-table.component.html b/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/table/payments-data-table.component.html index a2205e994..f8828005d 100644 --- a/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/table/payments-data-table.component.html +++ b/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/table/payments-data-table.component.html @@ -16,18 +16,19 @@ along with this program. If not, see . --> -
    +
      @for (subtype of data.subtypes; track subtype) {
    • -
      - {{ subtype.name | translate }} - {{ subtype.total | currency: org_currency: 'symbol' }} +
      + {{ subtype.name | translate }} + {{ subtype.total | currency: org_currency: 'symbol' }}
    • } -
    • - Total - {{ data.total | currency: org_currency: 'symbol' }} + +
    • + Total + {{ data.total | currency: org_currency: 'symbol' }}
    diff --git a/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/table/payments-data-table.component.scss b/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/table/payments-data-table.component.scss deleted file mode 100644 index 1c3d320f2..000000000 --- a/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/table/payments-data-table.component.scss +++ /dev/null @@ -1,43 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -/* - * RERO ILS UI - * Copyright (C) 2019-2022 RERO - * Copyright (C) 2019-2022 UCLouvain - * - * 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 'bootstrap/scss/functions'; -@import 'bootstrap/scss/variables'; - -ul { - padding: map-get($spacers, 3) map-get($spacers, 2) map-get($spacers, 3) map-get($spacers, 3); - - li { - .amount { - font-size: .8rem; - padding-left: map-get($spacers, 2); - color: $secondary; - } - - &.total { - border-top: 1px solid $border-color; - margin-top: map-get($spacers, 2); - padding-top: map-get($spacers, 2); - - span { - font-weight: bold; - } - } - } -} diff --git a/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/table/payments-data-table.component.ts b/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/table/payments-data-table.component.ts index 71dfaf48f..625e9fd06 100644 --- a/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/table/payments-data-table.component.ts +++ b/projects/admin/src/app/record/search-view/patron-transaction-event-search-view/payments-data/table/payments-data-table.component.ts @@ -21,8 +21,7 @@ import { PaymentData } from '../../interfaces'; @Component({ selector: 'admin-payments-data-table', - templateUrl: './payments-data-table.component.html', - styleUrls: ['./payments-data-table.component.scss'] + templateUrl: './payments-data-table.component.html' }) export class PaymentsDataTableComponent { diff --git a/projects/admin/src/app/shared/primeng-import/primeng-import.module.ts b/projects/admin/src/app/shared/primeng-import/primeng-import.module.ts index eae08b150..3515cd7f2 100644 --- a/projects/admin/src/app/shared/primeng-import/primeng-import.module.ts +++ b/projects/admin/src/app/shared/primeng-import/primeng-import.module.ts @@ -39,6 +39,7 @@ import { TooltipModule } from 'primeng/tooltip'; import { CardModule } from 'primeng/card'; import { TableModule } from 'primeng/table'; import { FieldsetModule } from 'primeng/fieldset'; +import { ChartModule } from 'primeng/chart'; @NgModule({ exports: [ @@ -63,7 +64,8 @@ import { FieldsetModule } from 'primeng/fieldset'; TabViewModule, CardModule, TableModule, - FieldsetModule + FieldsetModule, + ChartModule ] }) export class PrimengImportModule { } From 59cc94973cb8a9ea2638baddf7d1c88b2ed32948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Marie=CC=81thoz?= Date: Wed, 8 Jan 2025 13:59:14 +0100 Subject: [PATCH 4/7] primeng: admin stat configurations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-by: Johnny Mariéthoz Co-Authored-by: Bertrand Zuchuat --- .../statistics-cfg-brief-view-component.ts | 22 +++---- .../report-data/report-data.component.html | 2 +- .../reports-list/reports-list.component.html | 4 +- .../statistics-cfg-detail-view.component.html | 63 +++++++++---------- 4 files changed, 45 insertions(+), 46 deletions(-) diff --git a/projects/admin/src/app/record/brief-view/statistics-cfg-brief-view-component.ts b/projects/admin/src/app/record/brief-view/statistics-cfg-brief-view-component.ts index c42d9ba57..1241c29f6 100644 --- a/projects/admin/src/app/record/brief-view/statistics-cfg-brief-view-component.ts +++ b/projects/admin/src/app/record/brief-view/statistics-cfg-brief-view-component.ts @@ -21,23 +21,23 @@ import { ResultItem } from '@rero/ng-core'; @Component({ selector: 'admin-statistics-cfg-brief-view', template: ` -
    +
    - {{ record.metadata.name }}
    -
    + > {{ record.metadata.name }} +
    @if (record.metadata.description) {
    } -
    - Category: {{ record.metadata.category.type | translate }} -
    -
    - Indicator: {{ record.metadata.category.indicator.type | translate }} -
    +
    ` }) diff --git a/projects/admin/src/app/record/detail-view/statistics-cfg-detail-view/report-data/report-data.component.html b/projects/admin/src/app/record/detail-view/statistics-cfg-detail-view/report-data/report-data.component.html index e94c9d0eb..5324a69cd 100644 --- a/projects/admin/src/app/record/detail-view/statistics-cfg-detail-view/report-data/report-data.component.html +++ b/projects/admin/src/app/record/detail-view/statistics-cfg-detail-view/report-data/report-data.component.html @@ -26,5 +26,5 @@ } @else { -

    No result

    +

    No result

    } diff --git a/projects/admin/src/app/record/detail-view/statistics-cfg-detail-view/reports-list/reports-list.component.html b/projects/admin/src/app/record/detail-view/statistics-cfg-detail-view/reports-list/reports-list.component.html index 62651d4cd..837035e81 100644 --- a/projects/admin/src/app/record/detail-view/statistics-cfg-detail-view/reports-list/reports-list.component.html +++ b/projects/admin/src/app/record/detail-view/statistics-cfg-detail-view/reports-list/reports-list.component.html @@ -25,7 +25,7 @@ - + @@ -33,5 +33,5 @@ } @else { -

    No result

    +

    No result

    } diff --git a/projects/admin/src/app/record/detail-view/statistics-cfg-detail-view/statistics-cfg-detail-view.component.html b/projects/admin/src/app/record/detail-view/statistics-cfg-detail-view/statistics-cfg-detail-view.component.html index ec566fcd0..609958ac7 100644 --- a/projects/admin/src/app/record/detail-view/statistics-cfg-detail-view/statistics-cfg-detail-view.component.html +++ b/projects/admin/src/app/record/detail-view/statistics-cfg-detail-view/statistics-cfg-detail-view.component.html @@ -15,28 +15,28 @@ along with this program. If not, see . --> @if (record) { -
    +

    {{ record.metadata.name }}

    -
    -
    -
    Library
    -
    {{ record.metadata.library.$ref | getRecord: 'libraries' : 'field' : 'name' | async }}
    +
    + -
    +
    - + @if (liveData) { - + } @if (liveDataError) { Date: Wed, 8 Jan 2025 15:37:57 +0100 Subject: [PATCH 5/7] primeng: admin circulatin policies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-by: Johnny Mariéthoz Co-Authored-by: Bertrand Zuchuat --- .../circ-policies-brief-view.component.ts | 21 +- .../circ-policy-detail-view.component.html | 258 ++++++++---------- .../cipo-patron-type-item-type.component.html | 30 +- .../cipo-patron-type-item-type.component.ts | 2 +- .../class/settings.ts | 4 +- .../app/routes/circulation-policies-route.ts | 2 + 6 files changed, 146 insertions(+), 171 deletions(-) diff --git a/projects/admin/src/app/record/brief-view/circ-policies-brief-view.component.ts b/projects/admin/src/app/record/brief-view/circ-policies-brief-view.component.ts index 017b697db..c0dc5f22f 100644 --- a/projects/admin/src/app/record/brief-view/circ-policies-brief-view.component.ts +++ b/projects/admin/src/app/record/brief-view/circ-policies-brief-view.component.ts @@ -21,25 +21,20 @@ import { ResultItem } from '@rero/ng-core'; @Component({ selector: 'admin-circ-policies-brief-view', template: ` -
    - {{ record.metadata.name }} - - +
    + {{ record.metadata.name }}  + @if (record.metadata.policy_library_level) { {{ 'Library' | translate }} } @else { {{ 'Organisation' | translate }} } - - +
    -
    - @if (record.metadata.description) { - {{ record.metadata.description }} - } -
    - `, - styles: [] + @if (record.metadata.description) { + + } + ` }) export class CircPoliciesBriefViewComponent implements ResultItem { diff --git a/projects/admin/src/app/record/detail-view/circ-policy-detail-view/circ-policy-detail-view.component.html b/projects/admin/src/app/record/detail-view/circ-policy-detail-view/circ-policy-detail-view.component.html index 9d02d78da..306d97734 100644 --- a/projects/admin/src/app/record/detail-view/circ-policy-detail-view/circ-policy-detail-view.component.html +++ b/projects/admin/src/app/record/detail-view/circ-policy-detail-view/circ-policy-detail-view.component.html @@ -16,25 +16,27 @@ --> @if (record) { -

    {{ record.metadata.name | translate }}

    +
    +

    {{ record.metadata.name | translate }}

    +
    -
    -
    Name
    -
    {{ record.metadata.name }}
    +
    -
    -
    Circulation settings
    -
    -
    +
    + + -
    +
    @if (reminders.length > 0) { -
    -
    -
    Reminders
    -
    -
    - - - - - - - - - - @for (reminder of record.metadata.reminders; track reminder; let idx = $index) { - - - - - - - - } - -
    #TypeDays DelayCommunication channelAmount
    {{ idx + 1 }}{{ reminder.type | translate }} - - {{ reminder.days_delay }} - {{ reminder.communication_channel | translate }} - @if (reminder.fee_amount) { - {{ reminder.fee_amount | currency: org_currency:true }} - } @else { - — - } -
    -
    +
    + + + + + Type + Days Delay + Communication channel + Amount + + + + + {{ reminder.type | translate }} + + + {{ reminder.days_delay }} + + {{ reminder.communication_channel | translate }} + + @if (reminder.fee_amount) { + {{ reminder.fee_amount | currency: org_currency:true }} + } @else { + — + } + + + + +
    } - @if (overdues && overdues.length > 0) { -
    -
    Overdue fees
    -
    - - - - - - - @for (interval of overdues; track interval) { - - - - - } - -
    Interval of daysAmount/day
    - {{ interval.from }} - - @if (interval.to) { - {{ interval.to }} - } @else { - - } - - {{ interval.fee_amount | currency: org_currency:true }} / {{ 'day' | translate }} -
    - @if (record.metadata.overdue_fees.maximum_total_amount) { -
    -
    Maximun total amount
    -
    - {{ record.metadata.overdue_fees.maximum_total_amount | currency: org_currency:true }} -
    -
    - } -
    -
    + @if (overdues?.length > 0) { +
    + + + + + Interval of days + Amount/day + + + + + + {{ overdue.from }} + + @if (overdue.to) { + {{ overdue.to }} + } @else { + + } + + + {{ overdue.fee_amount | currency: org_currency:true }} / {{ 'day' | translate }} + + + + + +
    } @if (record.metadata.settings) { -
    -
    -
    Application
    -
    -
    - - +
    + + +
    - - + + @for (itemType of itemTypes; track itemType) { - } - - - @for (setting of settings | keyvalue; track setting; let i = $index) { - - - @for (itemType of itemTypes; track itemType) { - + + @for (itemType of itemTypes; track itemType) { + - } - - } - -
    Patron typesItem typesPatron typesItem types
    + {{ itemType | getRecord: 'item_types' : 'field' : 'name' | async }}
    - {{ setting.key | getRecord: 'patron_types' : 'field' : 'name' | async }} - - @for (currentItemType of setting.value; track currentItemType) { - @if (itemType === currentItemType) { - - } + + +
    + {{ setting.key | getRecord: 'patron_types' : 'field' : 'name' | async }} + + @for (currentItemType of setting.value; track currentItemType) { + @if (itemType === currentItemType) { + } -
    -
    + } + + } + + + +
    }
    diff --git a/projects/admin/src/app/record/formly/type/cipo-patron-type-item-type/cipo-patron-type-item-type.component.html b/projects/admin/src/app/record/formly/type/cipo-patron-type-item-type/cipo-patron-type-item-type.component.html index 7fb03817a..2de3cdb3a 100644 --- a/projects/admin/src/app/record/formly/type/cipo-patron-type-item-type/cipo-patron-type-item-type.component.html +++ b/projects/admin/src/app/record/formly/type/cipo-patron-type-item-type/cipo-patron-type-item-type.component.html @@ -15,21 +15,19 @@ along with this program. If not, see . --> @if (settings) { -
    - - + + - - @for (patronType of patronTypes; track patronType) { - - } + + @for (patronType of patronTypes; track patronType) { + + } - - - @for (itemType of settings; track itemType; let index = $index) { - + + + @for (patronType of itemType.patronTypes; track patronType) { } - } - -
      - {{ patronType.metadata.name }} -   + {{ patronType.metadata.name }} +
    {{ itemType.label }} @@ -43,8 +41,6 @@
    -
    + + } diff --git a/projects/admin/src/app/record/formly/type/cipo-patron-type-item-type/cipo-patron-type-item-type.component.ts b/projects/admin/src/app/record/formly/type/cipo-patron-type-item-type/cipo-patron-type-item-type.component.ts index ed1d7989c..e98b59e5b 100644 --- a/projects/admin/src/app/record/formly/type/cipo-patron-type-item-type/cipo-patron-type-item-type.component.ts +++ b/projects/admin/src/app/record/formly/type/cipo-patron-type-item-type/cipo-patron-type-item-type.component.ts @@ -125,7 +125,7 @@ export class CipoPatronTypeItemTypeComponent extends FieldArrayType implements O /** Build and load the settings table */ private _loadSettings(): void { - const settings = new Settings(); + const settings = new Settings(this.apiService); this.settings = settings .setCirculationPolicy(this.form.value) .createStructure(this.itemTypes, this.patronTypes, this.circPolicies, this.prevSelectedLibraries) diff --git a/projects/admin/src/app/record/formly/type/cipo-patron-type-item-type/class/settings.ts b/projects/admin/src/app/record/formly/type/cipo-patron-type-item-type/class/settings.ts index b33c5a950..00d8a7b9c 100644 --- a/projects/admin/src/app/record/formly/type/cipo-patron-type-item-type/class/settings.ts +++ b/projects/admin/src/app/record/formly/type/cipo-patron-type-item-type/class/settings.ts @@ -14,13 +14,10 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -import { inject } from '@angular/core'; import { ApiService } from '@rero/ng-core'; export class Settings { - private apiService: ApiService = inject(ApiService); - /** Current circulation policy */ private circulationPolicy: any; @@ -33,6 +30,7 @@ export class Settings { /** Settings */ private settings = []; + constructor(private apiService: ApiService) {} /** * Set Circulation policy * @param circulationPolicy - Current Circulation Policy diff --git a/projects/admin/src/app/routes/circulation-policies-route.ts b/projects/admin/src/app/routes/circulation-policies-route.ts index a720b51e9..abaad6291 100644 --- a/projects/admin/src/app/routes/circulation-policies-route.ts +++ b/projects/admin/src/app/routes/circulation-policies-route.ts @@ -100,11 +100,13 @@ export class CirculationPoliciesRoute extends BaseRoute implements RouteInterfac { label: _('Relevance'), value: 'bestmatch', + icon: 'fa fa-sort-amount-desc', defaultQuery: true }, { label: _('Name'), value: 'name', + icon: 'fa fa-sort-alpha-asc', defaultNoQuery: true } ], From a03606ff248ca09e4348ad3dcd75ef315753568d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Marie=CC=81thoz?= Date: Wed, 8 Jan 2025 16:13:18 +0100 Subject: [PATCH 6/7] primeng: admin item types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-by: Johnny Mariéthoz Co-Authored-by: Bertrand Zuchuat --- .../item-types-brief-view.component.ts | 10 ++--- .../statistics-cfg-brief-view-component.ts | 2 +- .../item-type-detail-view.component.html | 40 +++++++++---------- .../item-type-detail-view.component.ts | 3 +- .../admin/src/app/routes/item-types-route.ts | 2 + 5 files changed, 28 insertions(+), 29 deletions(-) diff --git a/projects/admin/src/app/record/brief-view/item-types-brief-view.component.ts b/projects/admin/src/app/record/brief-view/item-types-brief-view.component.ts index 6f396effb..fe86817e3 100644 --- a/projects/admin/src/app/record/brief-view/item-types-brief-view.component.ts +++ b/projects/admin/src/app/record/brief-view/item-types-brief-view.component.ts @@ -22,14 +22,12 @@ import { ResultItem } from '@rero/ng-core'; @Component({ selector: 'admin-item-types-brief-view', template: ` -
    +
    {{ record.metadata.name }}
    -
    - @if (record.metadata.description) { - {{ record.metadata.description }} - } -
    + @if (record.metadata.description) { + {{ record.metadata.description }} + } `, styles: [] }) diff --git a/projects/admin/src/app/record/brief-view/statistics-cfg-brief-view-component.ts b/projects/admin/src/app/record/brief-view/statistics-cfg-brief-view-component.ts index 1241c29f6..73629b294 100644 --- a/projects/admin/src/app/record/brief-view/statistics-cfg-brief-view-component.ts +++ b/projects/admin/src/app/record/brief-view/statistics-cfg-brief-view-component.ts @@ -25,7 +25,7 @@ import { ResultItem } from '@rero/ng-core';  {{ record.metadata.name }}
    @if (record.metadata.description) { diff --git a/projects/admin/src/app/record/detail-view/item-type-detail-view/item-type-detail-view.component.html b/projects/admin/src/app/record/detail-view/item-type-detail-view/item-type-detail-view.component.html index c4f71d794..562a7d886 100644 --- a/projects/admin/src/app/record/detail-view/item-type-detail-view/item-type-detail-view.component.html +++ b/projects/admin/src/app/record/detail-view/item-type-detail-view/item-type-detail-view.component.html @@ -15,34 +15,34 @@ along with this program. If not, see . --> @if (record$ | async; as record) { -

    {{ record.metadata.name }}

    -
    +

    {{ record.metadata.name }}

    +