diff --git a/src/app/demo/view/tabledemo.component.html b/src/app/demo/view/tabledemo.component.html index fff7c05..7bf7af3 100644 --- a/src/app/demo/view/tabledemo.component.html +++ b/src/app/demo/view/tabledemo.component.html @@ -8,7 +8,7 @@ - + @@ -17,13 +17,13 @@
Name - +
Country - +
@@ -36,11 +36,11 @@ - +
- - {{option.name}} + + {{option.name}}
@@ -51,7 +51,7 @@
Date - +
@@ -98,30 +98,30 @@
- + {{customer.name}} - + {{customer.country.name}} - + {{customer.representative.name}} - + {{customer.date | date: 'MM/dd/yyyy'}} - + {{customer.balance | currency:'USD':'symbol'}} - + {{customer.status}} - + - + @@ -131,6 +131,11 @@ No customers found. + + + Loading customers data. Please wait. + + @@ -176,7 +181,7 @@
Row Expand
- +
@@ -198,19 +203,19 @@ - Name{{product.name}} - Image - Price{{product.price | currency:'USD'}} - Category{{product.category}} - Reviews - Status{{product.inventoryStatus}} + {{product.name}} + + {{product.price | currency:'USD'}} + {{product.category}} + + {{product.inventoryStatus}}
- + Id @@ -223,11 +228,11 @@ - Id{{order.id}} - Customer{{order.customer}} - Date{{order.date}} - Amount{{order.amount | currency:'USD'}} - Status{{order.status}} + {{order.id}} + {{order.customer}} + {{order.date}} + {{order.amount | currency:'USD'}} + {{order.status}} @@ -248,8 +253,7 @@
Subheader Grouping
- + Name @@ -267,20 +271,20 @@ - Name + {{customer.name}} - Country + {{customer.country.name}} - Company + {{customer.company}} - Status + {{customer.status}} - Date + {{customer.date}} diff --git a/src/app/demo/view/tabledemo.component.ts b/src/app/demo/view/tabledemo.component.ts index 3626351..901e679 100644 --- a/src/app/demo/view/tabledemo.component.ts +++ b/src/app/demo/view/tabledemo.component.ts @@ -9,19 +9,6 @@ import { MessageService, ConfirmationService } from 'primeng/api' @Component({ templateUrl: './tabledemo.component.html', - styleUrls: ['./tabledemo.scss'], - styles: [` - :host ::ng-deep .p-datatable-gridlines p-progressBar { - width: 100%; - } - - @media screen and (max-width: 960px) { - :host ::ng-deep .p-datatable.p-datatable-customers.rowexpand-table .p-datatable-tbody > tr > td:nth-child(6) { - display: flex; - } - } - - `], providers: [MessageService, ConfirmationService] }) export class TableDemoComponent implements OnInit { @@ -123,11 +110,11 @@ export class TableDemoComponent implements OnInit { } } } - + expandAll() { if(!this.isExpanded){ this.products.forEach(product => this.expandedRows[product.name] = true); - + } else { this.expandedRows={}; } diff --git a/src/app/demo/view/tabledemo.scss b/src/app/demo/view/tabledemo.scss index 712d7ac..139597f 100644 --- a/src/app/demo/view/tabledemo.scss +++ b/src/app/demo/view/tabledemo.scss @@ -1,200 +1,2 @@ -:host ::ng-deep { - .p-progressbar { - height: .5rem; - background-color: #D8DADC; - min-width:100px; - .p-progressbar-value { - background-color: #607D8B; - } - } - - .table-header { - display: flex; - justify-content: space-between; - } - - .p-calendar .p-datepicker { - min-width: 25rem; - - td { - font-weight: 400; - } - } - - .p-datatable.p-datatable-customers { - .p-datatable-header { - padding: 1rem; - text-align: left; - font-size: 1.5rem; - } - - .p-paginator { - padding: 1rem; - } - - .p-datatable-thead > tr > th { - text-align: left; - } - - .p-dropdown-label:not(.p-placeholder) { - text-transform: uppercase; - } - } - - .p-datatable.p-datatable-customers:not(.p-datatable-gridlines) { - .p-datatable-tbody > tr > td { - cursor: auto; - } - } - - /* Responsive */ - .p-datatable-customers .p-datatable-tbody > tr > td .p-column-title { - display: none; - } -} - -.customer-badge { - border-radius: 2px; - padding: .25em .5rem; - text-transform: uppercase; - font-weight: 700; - font-size: 12px; - letter-spacing: .3px; - - &.status-qualified { - background: #C8E6C9; - color: #256029; - } - - &.status-unqualified { - background: #FFCDD2; - color: #C63737; - } - - &.status-negotiation { - background: #FEEDAF; - color: #8A5340; - } - - &.status-new { - background: #B3E5FC; - color: #23547B; - } - - &.status-renewal { - background: #ECCFFF; - color: #694382; - } - - &.status-proposal { - background: #FFD8B2; - color: #805B36; - } -} - -.product-badge { - border-radius: 2px; - padding: .25em .5rem; - text-transform: uppercase; - font-weight: 700; - font-size: 12px; - letter-spacing: .3px; - - &.status-instock { - background: #C8E6C9; - color: #256029; - } - - &.status-outofstock { - background: #FFCDD2; - color: #C63737; - } - - &.status-lowstock { - background: #FEEDAF; - color: #8A5340; - } -} - -.order-badge { - border-radius: 2px; - padding: .25em .5rem; - text-transform: uppercase; - font-weight: 700; - font-size: 12px; - letter-spacing: .3px; - - &.order-delivered { - background: #C8E6C9; - color: #256029; - } - - &.order-cancelled { - background: #FFCDD2; - color: #C63737; - } - - &.order-pending { - background: #FEEDAF; - color: #8A5340; - } - - &.order-returned { - background: #ECCFFF; - color: #694382; - } -} - -@media screen and (max-width: 960px) { - :host ::ng-deep { - .p-datatable { - &.p-datatable-customers { - .p-datatable-thead > tr > th, - .p-datatable-tfoot > tr > td { - display: none !important; - } - - .p-datatable-tbody > tr { - border-bottom: 1px solid var(--surface-d); - - > td { - text-align: left; - display: block; - border: 0 none !important; - width: 100% !important; - float: left; - clear: left; - border: 0 none; - - .p-column-title { - padding: .4rem; - min-width: 30%; - display: inline-block; - margin: -.4rem 1rem -.4rem -.4rem; - font-weight: bold; - } - - .p-progressbar { - margin-top: .5rem; - } - } - } - - &.p-datatable-selectable{ - .p-datatable-tbody>tr{ - >td{ - display:flex !important; - justify-content: space-between; - } - - } - } - } - } - - } - - -} diff --git a/src/app/pages/app.crud.component.html b/src/app/pages/app.crud.component.html index 5c1314c..2ce2640 100644 --- a/src/app/pages/app.crud.component.html +++ b/src/app/pages/app.crud.component.html @@ -13,8 +13,8 @@ - - + +
Manage Products
diff --git a/src/app/pages/app.crud.component.ts b/src/app/pages/app.crud.component.ts index 54e82bb..c0e55c0 100644 --- a/src/app/pages/app.crud.component.ts +++ b/src/app/pages/app.crud.component.ts @@ -5,30 +5,6 @@ import {ConfirmationService, MessageService} from 'primeng/api'; @Component({ templateUrl: './app.crud.component.html', - styleUrls: ['../demo/view/tabledemo.scss'], - styles: [` - :host ::ng-deep .p-dialog .product-image { - width: 150px; - margin: 0 auto 2rem auto; - display: block; - } - - @media screen and (max-width: 960px) { - :host ::ng-deep .p-datatable.p-datatable-customers .p-datatable-tbody > tr > td:last-child { - text-align: center; - } - - :host ::ng-deep .p-datatable.p-datatable-customers .p-datatable-tbody > tr > td:nth-child(6) { - display: flex; - } - } - @media (max-width: 1024px){ - :host ::ng-deep .p-dialog{ - margin: 0 20px; - } - } - - `], providers: [MessageService, ConfirmationService] }) export class AppCrudComponent implements OnInit {