Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improvements and fixes #1250

Merged
merged 1 commit into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5,065 changes: 2,032 additions & 3,033 deletions package-lock.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<!-- HEADER -->
<p-card class="p-card-body-p-0">
<ng-template pTemplate="header">
<div class="grid grid-nogutter py-3 px-2 m-1 text-lg font-bold align-items-center border-bottom-1 surface-border">
<div class="grid grid-nogutter py-3 px-2 text-lg font-bold align-items-center border-bottom-1 surface-border">
<div class="col-3 flex gap-2 align-items-center">
<div>
<shared-open-close-button (status)="allCollapsed = $event" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,16 @@
@defer (when items) {
<p-card class="p-card-body-p-0">
<ng-template pTemplate="header">
<div class="hidden md:flex bg-blue-900 text-white p-2 text-lg font-bold border-round-top">
<div class="grid grid-nogutter bg-dark rounded text-light w-full align-items-center">
<div class="col-3">
<div class="flex gap-2 align-items-center">
<shared-open-close-button (status)="isCollapsed = $event" />
<span translate>Item</span>
</div>
<div class="grid grid-nogutter py-3 m-2 text-lg font-bold align-items-center border-top-1 border-bottom-1 surface-border">
<div class="col-3">
<div class="flex gap-2 align-items-center">
<shared-open-close-button (status)="isCollapsed = $event" />
<span translate>Item</span>
</div>
<div class="col-4" translate>Document</div>
<div class="col-2" translate>Call number</div>
<div class="col-2" translate>Request date</div>
</div>
<div class="col-4" translate>Document</div>
<div class="col-2" translate>Call number</div>
<div class="col-2" translate>Request date</div>
</div>
</ng-template>
@if (items.length > 0) {
Expand Down
20 changes: 8 additions & 12 deletions projects/admin/src/app/circulation/patron/loan/loan.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,12 @@
</p-dropdown>
</div>
</div>
<div class="grid">
<div class="col-12">
<admin-circulation-items-list
[checkedOutItems]="checkedOutItems"
[checkedInItems]="checkedInItems"
[patron]="patron"
(extendLoanClicked)="applyItems([$event])"
(extendAllLoansClicked)="applyItems($event)"
(hasFeesEmitter)="hasFees($event)"
/>
</div>
</div>
<admin-circulation-items-list
[checkedOutItems]="checkedOutItems"
[checkedInItems]="checkedInItems"
[patron]="patron"
(extendLoanClicked)="applyItems([$event])"
(extendAllLoansClicked)="applyItems($event)"
(hasFeesEmitter)="hasFees($event)"
/>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
@if (transaction !== undefined) {
<div [ngClass]="{ 'callout callout-warning': isDisputed(), 'border rounded': !isDisputed()}" class="mr-1 p-2">
<div [ngClass]="{ 'callout callout-warning': isDisputed(), 'border rounded': !isDisputed()}" class="p-2">
<div class="grid grid-nogutter align-items-start">
<div class="col-2 flex gap-2">
<shared-open-close-button (status)="isCollapsed = $event" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ <h6 class="flex flex-grow-1" translate>Engaged fees</h6>
<p-button size="small" icon="fa fa-plus" [label]="'Add a fee'|translate" (onClick)="addFee()" />
</div>
@if (tabs.engagedFees.transactions.length > 0) {
<div class="grid grid-nogutter p-3 m-1 text-lg font-bold align-items-center border-top-1 border-bottom-1 surface-border">
<div class="grid grid-nogutter py-3 px-2 my-1 text-lg font-bold align-items-center border-top-1 border-bottom-1 surface-border">
<div class="col-2" translate>Date</div>
<div class="col-3" translate>Category</div>
<div class="col-3" translate>Library</div>
<div class="col-2 text-right pr-2">
<div class="col-2 text-right">
{{ 'Total amount' | translate }}: {{ statistics()['fees_engaged'] | currency: organisation.default_currency }}
</div>
<div class="col-2 flex justify-content-end">
Expand Down Expand Up @@ -72,7 +72,7 @@ <h6 class="flex flex-grow-1" translate>Overdue preview fees</h6>
</div>
</ng-template>
@if (tabs.overduePreviewFees.transactions.length > 0) {
<div class="grid grid-nogutter p-3 m-1 text-lg font-bold align-items-center border-top-1 border-bottom-1 surface-border">
<div class="grid grid-nogutter py-3 px-2 my-1 text-lg font-bold align-items-center border-top-1 border-bottom-1 surface-border">
<div class="col-2" translate>Due date</div>
<div class="col-7" translate>Document</div>
<div class="col-2 text-right">
Expand All @@ -97,7 +97,7 @@ <h6 class="flex flex-grow-1" translate>Overdue preview fees</h6>
<h6 translate>History</h6>
</ng-template>
@if (tabs.historyFees.transactions !== null && tabs.historyFees.transactions.length > 0) {
<div class="grid grid-nogutter p-3 m-1 text-lg font-bold align-items-center border-top-1 border-bottom-1 surface-border">
<div class="grid grid-nogutter py-3 my-1 text-lg font-bold align-items-center border-top-1 border-bottom-1 surface-border">
<div class="col-2" translate>Date</div>
<div class="col-3" translate>Category</div>
<div class="col-3" translate>Library</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@defer(when loans) {
<p-card class="p-card-body-p-0">
<ng-template pTemplate="header">
<div class="grid grid-nogutter p-3 m-1 text-lg font-bold align-items-center border-bottom-1 surface-border">
<div class="grid grid-nogutter py-3 px-2 my-1 text-lg font-bold align-items-center border-bottom-1 surface-border">
<div class="col-2" translate>Item</div>
<div class="col-4" translate>Title</div>
<div class="col-3" translate>Pickup location</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
RERO ILS UI
Copyright (C) 2019-2024 RERO
Copyright (C) 2019-2025 RERO

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
Expand Down Expand Up @@ -66,7 +66,13 @@
{{ 'Dates' | translate }}&nbsp;*
</label>
<div class="col-10">
<p-calendar formControlName="dates" selectionMode="range" [readonlyInput]="true" numberOfMonths="2" />
<p-calendar
appendTo="body"
formControlName="dates"
selectionMode="range"
[readonlyInput]="true"
numberOfMonths="2"
/>
@if (dates.invalid && (dates.dirty || dates.touched)) {
<div class="text-error">
@if (dates.errors.required) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@
<!-- ngx-formly -->
<form [formGroup]="form" (ngSubmit)="submit()">
<formly-form [model]="model" [fields]="fields" [form]="form" />
<div class="flex gap-1 justify-content-end mt-2">
<p-button
outlined
severity="danger"
size="small"
id="user-editor-delete-button"
(onClick)="closeDialog()"
icon="fa fa-times"
[label]="'Cancel' | translate"
/>
<p-button
type="submit"
id="user-editor-save-button"
size="small"
icon="fa fa-save"
[label]="'Save' | translate"
/>
</div>
</form>
<div class="flex gap-1 justify-content-end">
<p-button
outlined
severity="danger"
size="small"
id="user-editor-delete-button"
(onClick)="closeDialog()"
icon="fa fa-times"
[label]="'Cancel' | translate"
/>
<p-button
type="submit"
id="user-editor-save-button"
size="small"
icon="fa fa-save"
[label]="'Save' | translate"
/>
</div>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* RERO ILS UI
* Copyright (C) 2021-2024 RERO
* Copyright (C) 2021-2025 RERO
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down Expand Up @@ -200,7 +200,7 @@ export class UserIdEditorComponent implements OnInit {
*/
submit(): void {
this.form.updateValueAndValidity();
if (this.form.valid === false) {
if (!this.form.valid) {
this.messageService.add({
severity: 'error',
summary: this.translateService.instant('User'),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
RERO ILS UI
Copyright (C) 2020-2024 RERO
Copyright (C) 2020-2025 RERO

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
Expand All @@ -18,7 +18,7 @@
<div class="flex gap-2 flex-column">
@if (requestedBy$ | async; as requestedBy) {
@if (requestedBy.length > 0) {
<div class="flex gap-2 align-items-center">
<div class="flex gap-2 align-items-start">
<p-messages
class="flex-grow-1"
[value]="[
Expand All @@ -43,7 +43,7 @@
}
}
@if (patron) {
<p-card [header]="[patron.last_name, patron.first_name].join(', ')">
<p-card [header]="[patron.last_name, patron.first_name].join(', ')" styleClass="surface-100 ">
<p class="m-0">
{{ patron.street }}<br>
{{ patron.postal_code }} {{ patron.city }}<br>
Expand Down
Loading
Loading