Skip to content

Commit a5aa146

Browse files
committed
fixed broken links in the invoices page
1 parent 5e1e205 commit a5aa146

File tree

4 files changed

+39
-32
lines changed

4 files changed

+39
-32
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ <h1>Invoices for the past 90 days</h1>
5151
<ng-template pTemplate="body" let-invoice>
5252
<tr>
5353
<td>
54-
<a [routerLink]="['/accounting/loads/edit', invoice.loadId]">
54+
<a [routerLink]="['/loads/edit', invoice.loadId]">
5555
{{invoice.loadRef}}
5656
</a>
5757
</td>
@@ -65,7 +65,15 @@ <h1>Invoices for the past 90 days</h1>
6565
<td>{{invoice.createdDate | date:'mediumDate'}}</td>
6666
<td>{{invoice.payment.paymentDate | date:'mediumDate'}}</td>
6767
<td>
68-
<p-button icon="bi-card-list"
68+
<p-button
69+
icon="bi bi-credit-card"
70+
pTooltip="Make payment"
71+
tooltipPosition="bottom"
72+
[routerLink]="['/payment/invoice', invoice.id]">
73+
</p-button>
74+
<p-button
75+
styleClass="ms-2"
76+
icon="bi-card-list"
6977
pTooltip="View details"
7078
[routerLink]="['/accounting/invoices/view', invoice.id]">
7179
</p-button>

src/Client/Logistics.OfficeApp/src/app/pages/employee/components/change-role-dialog/change-role-dialog.component.html

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
Are you sure that you want to change employee's role? <br />
77
If you want to remove role from employee then select <strong>Remove Role</strong>.
88
</p>
9-
109

1110
<form [formGroup]="form" (ngSubmit)="submit()">
1211
<div class="mb-3">
@@ -15,20 +14,17 @@
1514
optionValue="name" optionLabel="displayName" [showClear]="true" (onClear)="clearSelctedRole()" >
1615
</p-dropdown>
1716
</div>
18-
<button pButton
19-
type="submit"
20-
class="p-button-raised"
17+
<p-button type="submit"
2118
icon="bi bi-pencil-square"
2219
label="Change Role"
2320
[disabled]="loading">
24-
</button>
25-
<button pButton
26-
type="submit"
27-
class="p-button-raised p-button-danger ms-2"
21+
</p-button>
22+
<p-button type="button"
23+
styleClass="p-button-danger ms-2"
2824
icon="bi bi bi-trash"
2925
label="Remove Role"
3026
[disabled]="loading"
3127
(click)="removeRoles()">
32-
</button>
28+
</p-button>
3329
</form>
3430
</p-dialog>

src/Client/Logistics.OfficeApp/src/app/pages/employee/components/change-role-dialog/change-role-dialog.component.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ export class ChangeRoleDialogComponent implements OnInit {
3838
@Output() visibleChange: EventEmitter<boolean>;
3939

4040
constructor(
41-
private apiService: ApiService,
42-
private userService: UserService,
43-
private toastService: ToastService)
41+
private readonly apiService: ApiService,
42+
private readonly userService: UserService,
43+
private readonly toastService: ToastService)
4444
{
4545
this.currentRoles = [];
4646
this.roles = [];
@@ -54,11 +54,11 @@ export class ChangeRoleDialogComponent implements OnInit {
5454
});
5555
}
5656

57-
public ngOnInit(): void {
57+
ngOnInit(): void {
5858
this.fetchRoles();
5959
}
6060

61-
public submit() {
61+
submit() {
6262
const role = this.form.value.role;
6363

6464
if (role === '') {
@@ -81,19 +81,19 @@ export class ChangeRoleDialogComponent implements OnInit {
8181
});
8282
}
8383

84-
public close() {
84+
close() {
8585
this.visible = false;
8686
this.visibleChange.emit(false);
8787
this.clearSelctedRole();
8888
}
8989

90-
public clearSelctedRole() {
90+
clearSelctedRole() {
9191
this.form.patchValue({
9292
role: {name: '', displayName: ' '},
9393
});
9494
}
9595

96-
public removeRoles() {
96+
removeRoles() {
9797
this.currentRoles?.forEach((role) => {
9898
this.removeRole(role.name);
9999
});

src/Client/Logistics.OfficeApp/src/app/pages/employee/list-employees/list-employees.component.html

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<div class="d-flex align-items-center">
22
<h1>List Employees</h1>
3-
<button pButton pRipple
4-
class="p-button-lg p-button-rounded p-button-text text-black ms-2"
3+
<p-button
4+
styleClass="p-button-lg p-button-rounded p-button-text text-black ms-2"
55
icon="bi bi-plus-square-fill"
66
pTooltip="Add a new employee"
77
[routerLink]="['/employees/add']">
8-
</button>
8+
</p-button>
99
</div>
1010
<hr class="w-100">
1111

@@ -45,28 +45,23 @@ <h1>List Employees</h1>
4545
Salary Type
4646
<p-sortIcon field="salaryType"></p-sortIcon>
4747
</th>
48-
<th>
49-
Role
50-
</th>
48+
<th>Role</th>
5149
<th pSortableColumn="joinedDate">
5250
Joined Date
5351
<p-sortIcon field="joinedDate"></p-sortIcon>
5452
</th>
53+
<th>Action</th>
5554
</tr>
5655
</ng-template>
5756
<ng-template pTemplate="body" let-employee>
5857
<tr>
59-
<td>
60-
<a [routerLink]="['/employees/edit', employee.id]">
61-
{{employee.fullName}}
62-
</a>
63-
</td>
58+
<td>{{employee.fullName}}</td>
6459
<td>{{employee.email}}</td>
6560
<td>{{employee.phoneNumber}}</td>
6661
<td>
67-
<span *ngIf="employee.salaryType === 3 else fixedSalary">
62+
<ng-container *ngIf="employee.salaryType === 3 else fixedSalary">
6863
{{employee.salary | percent}}
69-
</span>
64+
</ng-container>
7065

7166
<ng-template #fixedSalary>
7267
<span>{{employee.salary | currency}}</span>
@@ -75,6 +70,14 @@ <h1>List Employees</h1>
7570
<td>{{getSalaryTypeDesc(employee.salaryType)}}</td>
7671
<td>{{employee.roles[0]?.displayName}}</td>
7772
<td>{{employee.joinedDate | date:'mediumDate'}}</td>
73+
<td class="overflow-visible">
74+
<p-button
75+
icon="bi bi-pencil"
76+
pTooltip="Edit employee details"
77+
tooltipPosition="bottom"
78+
[routerLink]="['/employees/edit', employee.id]">
79+
</p-button>
80+
</td>
7881
</tr>
7982
</ng-template>
8083
</p-table>

0 commit comments

Comments
 (0)