Skip to content

Commit 8b3befe

Browse files
committed
sidebar improvments
1 parent d9f4e50 commit 8b3befe

File tree

4 files changed

+48
-44
lines changed

4 files changed

+48
-44
lines changed

src/Client/Logistics.OfficeApp/src/app/layout/sidebar/sidebar.component.html

+14-8
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,13 @@
6363
<p-overlayPanel #accountingPanel>
6464
@for (item of accountingMenuItems[0].items; track item.label) {
6565
@if (!item.separator) {
66-
<p-button styleClass="p-button-secondary"
67-
[label]="item.label"
68-
(click)="item?.command({})">
69-
</p-button>
66+
<div class="p-1">
67+
<p-button severity="secondary"
68+
[text]="true"
69+
[label]="item.label"
70+
(click)="item?.command({})">
71+
</p-button>
72+
</div>
7073
}
7174
}
7275
</p-overlayPanel>
@@ -102,10 +105,13 @@
102105
<p-overlayPanel #profilePanel>
103106
@for (item of profileMenuItems[0].items; track item.label) {
104107
@if (!item.separator) {
105-
<p-button styleClass="p-button-secondary"
106-
[label]="item.label"
107-
(click)="item?.command({})">
108-
</p-button>
108+
<div class="p-1">
109+
<p-button severity="secondary"
110+
[text]="true"
111+
[label]="item.label"
112+
(click)="item?.command({})">
113+
</p-button>
114+
</div>
109115
}
110116
}
111117
</p-overlayPanel>

src/Client/Logistics.OfficeApp/src/app/layout/sidebar/sidebar.component.scss

+24-22
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,28 @@
2828
align-items: center;
2929
}
3030

31-
:host ::ng-deep .p-panelmenu-header-content {
32-
background-color: transparent;
33-
}
34-
35-
:host ::ng-deep .p-panelmenu-content {
36-
background-color: transparent;
37-
}
38-
39-
:host ::ng-deep .p-menuitem-link {
40-
text-decoration: none;
41-
}
42-
43-
:host ::ng-deep .p-panelmenu-header chevronrighticon {
44-
order: 2;
45-
}
46-
47-
:host ::ng-deep .p-panelmenu-header chevrondownicon {
48-
order: 2;
49-
}
50-
51-
:host ::ng-deep .p-panelmenu-header .p-menuitem-text {
52-
order: 1;
31+
:host ::ng-deep {
32+
.p-panelmenu-header-content {
33+
background-color: transparent;
34+
}
35+
36+
.p-menuitem-link {
37+
text-decoration: none;
38+
}
39+
40+
.p-panelmenu-header chevronrighticon {
41+
order: 2;
42+
}
43+
44+
.p-panelmenu-content {
45+
background-color: transparent;
46+
}
47+
48+
.p-panelmenu-header chevrondownicon {
49+
order: 2;
50+
}
51+
52+
.p-panelmenu-header .p-menuitem-text {
53+
order: 1;
54+
}
5355
}

src/Client/Logistics.OfficeApp/src/app/layout/sidebar/sidebar.component.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ export class SidebarComponent implements OnInit {
7171
items: [
7272
{
7373
label: 'Payrolls',
74-
command: () => router.navigateByUrl('/accounting/payrolls'),
74+
routerLink: '/accounting/payrolls',
7575
},
7676
{
7777
label: 'Payments',
78-
command: () => router.navigateByUrl('/accounting/payments'),
78+
routerLink: '/accounting/payments',
7979
},
8080
{
8181
label: 'Invoices',
82-
command: () => router.navigateByUrl('/accounting/invoices'),
82+
routerLink: '/accounting/invoices',
8383
},
8484
],
8585
},

src/Client/Logistics.OfficeApp/src/app/pages/accounting/list-invoices/list-invoices.component.html

+7-11
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ <h1>Invoices for the past 90 days</h1>
3232
Payment Amount
3333
<p-sortIcon field="paymentAmount"></p-sortIcon>
3434
</th>
35-
<th pSortableColumn="paymentStatus">
36-
Payment Status
37-
<p-sortIcon field="paymentStatus"></p-sortIcon>
38-
</th>
3935
<th pSortableColumn="createdDate">
4036
Invoice Date
4137
<p-sortIcon field="createdDate"></p-sortIcon>
@@ -44,24 +40,24 @@ <h1>Invoices for the past 90 days</h1>
4440
Payment Date
4541
<p-sortIcon field="paymentDate"></p-sortIcon>
4642
</th>
43+
<th pSortableColumn="paymentStatus">
44+
Payment Status
45+
<p-sortIcon field="paymentStatus"></p-sortIcon>
46+
</th>
4747
<th>Action</th>
4848
</tr>
4949
</ng-template>
5050

5151
<ng-template pTemplate="body" let-invoice>
5252
<tr>
53-
<td>
54-
<a [routerLink]="['/loads/edit', invoice.loadId]">
55-
{{invoice.loadRef}}
56-
</a>
57-
</td>
53+
<td>{{invoice.loadRef}}</td>
5854
<td>{{invoice.customer.name}}</td>
5955
<td>{{invoice.payment.amount | currency}}</td>
56+
<td>{{invoice.createdDate | date:'mediumDate'}}</td>
57+
<td>{{invoice.payment.paymentDate | date:'mediumDate'}}</td>
6058
<td>
6159
<app-payment-status-tag [paymentStatus]="invoice.payment.status"></app-payment-status-tag>
6260
</td>
63-
<td>{{invoice.createdDate | date:'mediumDate'}}</td>
64-
<td>{{invoice.payment.paymentDate | date:'mediumDate'}}</td>
6561
<td>
6662
@if (invoice.payment.status === paymentStatus.Pending) {
6763
<p-button

0 commit comments

Comments
 (0)