added dashboard
This commit is contained in:
44
src/app/components/delivery-validator/delivery-validator.ts
Normal file
44
src/app/components/delivery-validator/delivery-validator.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import {Component, computed, signal} from '@angular/core';
|
||||
import {NzButtonComponent, NzButtonSize} from "ng-zorro-antd/button";
|
||||
import {NzIconDirective} from "ng-zorro-antd/icon";
|
||||
|
||||
@Component({
|
||||
selector: 'app-delivery-validator',
|
||||
imports: [
|
||||
NzButtonComponent,
|
||||
NzIconDirective
|
||||
],
|
||||
templateUrl: './delivery-validator.html',
|
||||
styleUrl: './delivery-validator.css',
|
||||
})
|
||||
export class DeliveryValidator {
|
||||
size: NzButtonSize = 'large';
|
||||
search = signal('');
|
||||
|
||||
livraisons = signal([
|
||||
{ id: 1, client: 'Carrefour', date: '2025-02-03', produits: 12 },
|
||||
{ id: 2, client: 'Intermarché', date: '2025-02-04', produits: 8 },
|
||||
{ id: 3, client: 'Auchan', date: '2025-02-05', produits: 23 },
|
||||
{ id: 1, client: 'Carrefour', date: '2025-02-03', produits: 12 },
|
||||
{ id: 2, client: 'Intermarché', date: '2025-02-04', produits: 8 },
|
||||
{ id: 3, client: 'Auchan', date: '2025-02-05', produits: 23 },
|
||||
{ id: 1, client: 'Carrefour', date: '2025-02-03', produits: 12 },
|
||||
{ id: 2, client: 'Intermarché', date: '2025-02-04', produits: 8 },
|
||||
{ id: 3, client: 'Auchan', date: '2025-02-05', produits: 23 },
|
||||
{ id: 1, client: 'Carrefour', date: '2025-02-03', produits: 12 },
|
||||
{ id: 2, client: 'Intermarché', date: '2025-02-04', produits: 8 },
|
||||
{ id: 3, client: 'Auchan', date: '2025-02-05', produits: 23 }
|
||||
]);
|
||||
|
||||
filteredLivraisons = computed(() => {
|
||||
const query = this.search().toLowerCase();
|
||||
return this.livraisons().filter(l =>
|
||||
l.client.toLowerCase().includes(query) ||
|
||||
l.date.includes(query)
|
||||
);
|
||||
});
|
||||
|
||||
validate(id: number) {
|
||||
return
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user