From 07729fd236f6ac8a2d4de7fb7b84abcf9678e5d4 Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Tue, 11 Nov 2025 18:05:02 +0100 Subject: [PATCH] updated modal from user loan's --- src/app/app.css | 1 + src/app/components/loan-table/loan-table.html | 2 +- src/app/components/user-table/user-table.html | 21 +++++++++- src/app/components/user-table/user-table.ts | 40 ++++++++++++++++++- src/index.html | 4 +- 5 files changed, 62 insertions(+), 6 deletions(-) diff --git a/src/app/app.css b/src/app/app.css index 163c43a..81c3ff3 100644 --- a/src/app/app.css +++ b/src/app/app.css @@ -77,4 +77,5 @@ nz-content { padding: 24px; background: #fff; height: 100%; + overflow: auto; } diff --git a/src/app/components/loan-table/loan-table.html b/src/app/components/loan-table/loan-table.html index 3f7882d..ab1ee27 100644 --- a/src/app/components/loan-table/loan-table.html +++ b/src/app/components/loan-table/loan-table.html @@ -14,7 +14,7 @@ {{ data.user.name}} {{data.user.firstName }} {{ data.book.title }} -

{{ data.date | date: 'dd/MM/yyyy' }}

+ {{ data.date | date: 'dd/MM/yyyy' }} {{ data.plannedReturningDate | date: 'dd/MM/yyyy'}} {{ data.effectiveReturningDate | date: 'dd/MM/yyyy'}} diff --git a/src/app/components/user-table/user-table.html b/src/app/components/user-table/user-table.html index 3e3fd83..3a56a32 100644 --- a/src/app/components/user-table/user-table.html +++ b/src/app/components/user-table/user-table.html @@ -14,11 +14,28 @@ {{ data.name}} {{ data.firstName }} -

{{ data.email }}

+ {{ data.email }} {{ data.birthDate | date: 'dd/MM/yyyy'}} - + + + + Livre + Date d'enregistrement + Date de retour finale + + + + @for (loans of data.loan; track loans) { + + {{ loans.book.title }} + {{ loans.date | date: 'dd/MM/yyyy' }} + {{ loans.effectiveReturningDate | date: 'dd/MM/yyyy'}} + + } + + diff --git a/src/app/components/user-table/user-table.ts b/src/app/components/user-table/user-table.ts index 67cf817..09a976f 100644 --- a/src/app/components/user-table/user-table.ts +++ b/src/app/components/user-table/user-table.ts @@ -6,6 +6,7 @@ import {NzButtonComponent} from "ng-zorro-antd/button"; import {UserInfo} from "../../interfaces/user.interfaces"; import {LoanTable} from "../loan-table/loan-table"; import {UpdateUser} from "../update-user/update-user"; +import {UpdateLoan} from "../update-loan/update-loan"; @Component({ selector: 'app-user-table', @@ -15,7 +16,8 @@ import {UpdateUser} from "../update-user/update-user"; NzButtonComponent, NzTableComponent, LoanTable, - UpdateUser + UpdateUser, + UpdateLoan ], templateUrl: './user-table.html', styleUrl: './user-table.css', @@ -28,6 +30,42 @@ export class UserTable { email: 'mathys@biblio.fr', birthDate: new Date('2004-05-21'), loan: [ + { + book: { + title: 'Dune', + isbn: '9780441013593', + author: 'Frank Herbert', + releaseYear: 1965 + }, + user: null, + date: new Date('2025-11-01'), + plannedReturningDate: new Date('2025-12-01'), + effectiveReturningDate: null + }, + { + book: { + title: 'Dune', + isbn: '9780441013593', + author: 'Frank Herbert', + releaseYear: 1965 + }, + user: null, + date: new Date('2025-11-01'), + plannedReturningDate: new Date('2025-12-01'), + effectiveReturningDate: null + }, + { + book: { + title: 'Dune', + isbn: '9780441013593', + author: 'Frank Herbert', + releaseYear: 1965 + }, + user: null, + date: new Date('2025-11-01'), + plannedReturningDate: new Date('2025-12-01'), + effectiveReturningDate: null + }, { book: { title: 'Dune', diff --git a/src/index.html b/src/index.html index cfc0e48..0630b5d 100644 --- a/src/index.html +++ b/src/index.html @@ -2,10 +2,10 @@ - LibraryFrontend + My Library - +