From 847d6af1dc69ae378a5dceaaa4c25e7947526af9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87etin?= <92744169+mehmetcetin01140@users.noreply.github.com> Date: Mon, 6 Jan 2025 16:12:43 +0300 Subject: [PATCH] update listdoc --- src/views/uikit/listdoc.ts | 228 +++++++++++++++++-------------------- 1 file changed, 104 insertions(+), 124 deletions(-) diff --git a/src/views/uikit/listdoc.ts b/src/views/uikit/listdoc.ts index 0e8e1d2..84caf02 100644 --- a/src/views/uikit/listdoc.ts +++ b/src/views/uikit/listdoc.ts @@ -11,164 +11,144 @@ import { ButtonModule } from 'primeng/button'; import { Product, ProductService } from '@/src/service/product.service'; @Component({ - standalone:true, + standalone: true, imports: [CommonModule, DataViewModule, FormsModule, SelectButtonModule, PickListModule, OrderListModule, TagModule, ButtonModule], - template: ` -
-
-
DataView
- - -
- - - - - -
-
+ template: `
+
+
DataView
+ + +
+ + + + + +
+
- -
-
-
-
- - -
-
-
-
- {{ item.category }} -
{{ item.name }}
-
-
-
+
+
+
+ + +
+
+
+
+ {{ item.category }} +
{{ item.name }}
+
+
+
- {{ item.rating }} - -
+ > + {{ item.rating }} +
-
- $ {{ item.price }} -
- - -
+
+
+ $ {{ item.price }} +
+ +
- +
+ - -
-
- class="col-span-12 sm:col-span-6 lg:col-span-4 p-2"> -
-
-
- - -
+ +
+
+
+
+
+ +
-
-
-
- {{ item.category }} -
{{ item.name }}
-
-
-
+
+
+ {{ item.category }} +
{{ item.name }}
+
+
+
- {{ item.rating }} - -
+ > + {{ item.rating }} +
-
- $ {{ item.price }} -
- - -
+
+
+ $ {{ item.price }} +
+ +
- - -
- -
-
-
-
PickList
- - - {{ item.name }} - -
-
+ + +
-
-
-
OrderList
- - - {{ option.name }} - - -
+
+
+
+
PickList
+ + + {{ item.name }} + +
-
`, + +
+
+
OrderList
+ + + {{ option.name }} + + +
+
+
+
`, styles: ` ::ng-deep { - .p-orderlist-list-container{ + .p-orderlist-list-container { width: 100%; } } - `, + `, providers: [ProductService] }) export class ListDoc { - layout: 'list' | 'grid' = 'list'; options = ['list', 'grid']; @@ -181,10 +161,10 @@ export class ListDoc { orderCities: any[] = []; - constructor(private productService: ProductService) { } + constructor(private productService: ProductService) {} ngOnInit() { - this.productService.getProducts().then(data => this.products = data); + this.productService.getProducts().then((data) => (this.products = data)); this.sourceCities = [ { name: 'San Francisco', code: 'SF' }, @@ -193,7 +173,8 @@ export class ListDoc { { name: 'Istanbul', code: 'IST' }, { name: 'Berlin', code: 'BRL' }, { name: 'Barcelona', code: 'BRC' }, - { name: 'Rome', code: 'RM' }]; + { name: 'Rome', code: 'RM' } + ]; this.targetCities = []; @@ -204,11 +185,10 @@ export class ListDoc { { name: 'Istanbul', code: 'IST' }, { name: 'Berlin', code: 'BRL' }, { name: 'Barcelona', code: 'BRC' }, - { name: 'Rome', code: 'RM' }]; - + { name: 'Rome', code: 'RM' } + ]; } - getSeverity(product) { switch (product.inventoryStatus) { case 'INSTOCK':