diff --git a/src/app/pages/crud/crud.ts b/src/app/pages/crud/crud.ts index 5370fec..ffa7519 100644 --- a/src/app/pages/crud/crud.ts +++ b/src/app/pages/crud/crud.ts @@ -206,7 +206,7 @@ interface ExportColumn { - + `, providers: [MessageService, ProductService, ConfirmationService], }) diff --git a/src/app/pages/dashboard/components/recentsaleswidget.ts b/src/app/pages/dashboard/components/recentsaleswidget.ts index 2dcd8be..190d1bf 100644 --- a/src/app/pages/dashboard/components/recentsaleswidget.ts +++ b/src/app/pages/dashboard/components/recentsaleswidget.ts @@ -17,7 +17,7 @@ import { Product, ProductService } from '../../service/product.service'; template: `
Recent Sales
- + Image Name @@ -25,7 +25,7 @@ import { Product, ProductService } from '../../service/product.service'; View - + {{product.name}} diff --git a/src/app/pages/uikit/tabledemo.ts b/src/app/pages/uikit/tabledemo.ts index 1a5b3e4..e4edd59 100644 --- a/src/app/pages/uikit/tabledemo.ts +++ b/src/app/pages/uikit/tabledemo.ts @@ -26,15 +26,39 @@ interface expandedRows { @Component({ selector: 'app-table-demo', standalone: true, - imports: [TableModule, MultiSelectModule,SelectModule, InputIconModule, TagModule, InputTextModule, SliderModule, ProgressBarModule, ToggleButtonModule, ToastModule, CommonModule, FormsModule, ButtonModule, RatingModule, RippleModule, IconFieldModule], - template: ` -
+ imports: [ + TableModule, + MultiSelectModule, + SelectModule, + InputIconModule, + TagModule, + InputTextModule, + SliderModule, + ProgressBarModule, + ToggleButtonModule, + ToastModule, + CommonModule, + FormsModule, + ButtonModule, + RatingModule, + RippleModule, + IconFieldModule + ], + template: `
Filtering
- - + +
@@ -50,35 +74,29 @@ interface expandedRows {
Name - +
Country - +
Agent - +
Agent Picker
- +
- + {{ option.name }}
@@ -90,15 +108,13 @@ interface expandedRows {
Date - +
Balance - +
@@ -106,12 +122,9 @@ interface expandedRows { Status - + - {{ option.label }} + {{ option.label }} @@ -121,12 +134,9 @@ interface expandedRows {
Activity - + - +
{{ activityValues[0] }} {{ activityValues[1] }} @@ -150,16 +160,13 @@ interface expandedRows {
- + {{ customer.country.name }}
- + {{ customer.representative.name }}
@@ -167,14 +174,13 @@ interface expandedRows { {{ customer.date | date: 'MM/dd/yyyy' }} - {{ customer.balance | currency:'USD':'symbol' }} + {{ customer.balance | currency: 'USD' : 'symbol' }} - + @@ -234,28 +240,31 @@ interface expandedRows {
Row Expansion
- -
-
+ +
- Name + + Name Image - Price + + Price - Category + + Category - Reviews + + Reviews - Status + + Status @@ -263,14 +272,11 @@ interface expandedRows { - + {{ product.name }} - - {{ product.price | currency:'USD' }} + + {{ product.price | currency: 'USD' }} {{ product.category }} @@ -285,7 +291,7 @@ interface expandedRows {
- + Id @@ -361,9 +367,7 @@ interface expandedRows { - - Total Customers: {{calculateCustomerTotal(customer.representative.name)}} - + Total Customers: {{ calculateCustomerTotal(customer.representative.name) }} @@ -392,16 +396,16 @@ interface expandedRows {
`, styles: ` .p-datatable-frozen-tbody { - font-weight: bold; + font-weight: bold; } .p-datatable-scrollable .p-frozen-column { - font-weight: bold; - }`, - providers: [ConfirmationService, MessageService, CustomerService, ProductService], + font-weight: bold; + } + `, + providers: [ConfirmationService, MessageService, CustomerService, ProductService] }) export class TableDemo implements OnInit { - customers1: Customer[] = []; customers2: Customer[] = []; @@ -432,19 +436,22 @@ export class TableDemo implements OnInit { @ViewChild('filter') filter!: ElementRef; - constructor(private customerService: CustomerService, private productService: ProductService) { } + constructor( + private customerService: CustomerService, + private productService: ProductService + ) {} ngOnInit() { - this.customerService.getCustomersLarge().then(customers => { + this.customerService.getCustomersLarge().then((customers) => { this.customers1 = customers; this.loading = false; // @ts-ignore - this.customers1.forEach(customer => customer.date = new Date(customer.date)); + this.customers1.forEach((customer) => (customer.date = new Date(customer.date))); }); - this.customerService.getCustomersMedium().then(customers => this.customers2 = customers); - this.customerService.getCustomersLarge().then(customers => this.customers3 = customers); - this.productService.getProductsWithOrdersSmall().then(data => this.products = data); + this.customerService.getCustomersMedium().then((customers) => (this.customers2 = customers)); + this.customerService.getCustomersLarge().then((customers) => (this.customers3 = customers)); + this.productService.getProductsWithOrdersSmall().then((data) => (this.products = data)); this.representatives = [ { name: 'Amy Elsner', image: 'amyelsner.png' }, @@ -483,14 +490,12 @@ export class TableDemo implements OnInit { if (i === 0) { this.rowGroupMetadata[representativeName] = { index: 0, size: 1 }; - } - else { + } else { const previousRowData = this.customers3[i - 1]; const previousRowGroup = previousRowData?.representative?.name; if (representativeName === previousRowGroup) { this.rowGroupMetadata[representativeName].size++; - } - else { + } else { this.rowGroupMetadata[representativeName] = { index: i, size: 1 }; } } @@ -500,8 +505,7 @@ export class TableDemo implements OnInit { expandAll() { if (!this.isExpanded) { - this.products.forEach(product => product && product.name ? this.expandedRows[product.name] = true : ''); - + this.products.forEach((product) => (product && product.name ? (this.expandedRows[product.name] = true) : '')); } else { this.expandedRows = {}; } @@ -545,7 +549,7 @@ export class TableDemo implements OnInit { return 'danger'; default: - return 'info' + return 'info'; } } @@ -562,5 +566,4 @@ export class TableDemo implements OnInit { return total; } - } diff --git a/src/app/pages/uikit/timelinedemo.ts b/src/app/pages/uikit/timelinedemo.ts index 2849f1b..b69fa07 100644 --- a/src/app/pages/uikit/timelinedemo.ts +++ b/src/app/pages/uikit/timelinedemo.ts @@ -43,10 +43,10 @@ import { ButtonModule } from 'primeng/button';
Opposite Content
- + {{ event.date }} - + {{ event.status }}