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.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/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/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 . --> -
+
@for (item of items; track item) { -
- + -
+
@if (item.icon) { - + } - {{ item.label }} + {{ item.label }}
@for (menuItem of item.items; track menuItem) { - + } - {{ item.label }} + {{ item.label }} @if (item.shortcut) { {{ item.shortcut }} @@ -54,6 +53,5 @@ } -
}
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/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/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/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/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/brief-view/statistics-cfg-brief-view-component.ts b/projects/admin/src/app/record/brief-view/statistics-cfg-brief-view-component.ts index c42d9ba57..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 @@ -21,23 +21,23 @@ import { ResultItem } from '@rero/ng-core'; @Component({ selector: 'admin-statistics-cfg-brief-view', template: ` -
+
- {{ record.metadata.name }}
-
+ [ngClass]="{'text-success': record.metadata.is_active, 'text-error': !record.metadata.is_active}" + > {{ 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/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/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/entities-detail-view/local/entities-local-detail-view.component.html b/projects/admin/src/app/record/detail-view/entities-detail-view/local/entities-local-detail-view.component.html index 703f41b5a..263d5eaed 100644 --- a/projects/admin/src/app/record/detail-view/entities-detail-view/local/entities-local-detail-view.component.html +++ b/projects/admin/src/app/record/detail-view/entities-detail-view/local/entities-local-detail-view.component.html @@ -16,43 +16,45 @@ along with this program. If not, see . --> @if (record$ | async; as record) { -

- +

+ {{ $any(record).metadata.authorized_access_point }}

{{ 'Local ID' | translate }}: {{ $any(record).metadata.pid }} - Local + -
-
- {{ 'local' | translate | uppercase }} -
-
+ + + +
{{ 'local' | translate | uppercase }}
+
+
@switch ($any(record).metadata.type) { @case (entityType.ORGANISATION) { - + } @case (entityType.PERSON) { - + } @case (entityType.PLACE) { - + } @case (entityType.TEMPORAL) { - + } @case (entityType.TOPIC) { - + } @case (entityType.WORK) { - + } @default { {{ 'Missing template for this entity type:' | translate }} {{ $any(record).metadata.type }} } } -
-
+
+ + } 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: ` -
+