File tree 19 files changed +38
-53
lines changed
src/Client/Logistics.OfficeApp/src/app
dashboard/components/truck-stats-table
19 files changed +38
-53
lines changed Original file line number Diff line number Diff line change @@ -22,33 +22,33 @@ export const APP_ROUTES: Routes = [
22
22
loadChildren : ( ) => import ( './pages/home' ) . then ( ( m ) => m . HOME_ROUTES ) ,
23
23
} ,
24
24
{
25
- path : 'employee' ,
25
+ path : 'dashboard' ,
26
+ loadChildren : ( ) => import ( './pages/dashboard' ) . then ( ( m ) => m . DASHBOARD_ROUTES ) ,
27
+ data : {
28
+ breadcrumb : 'Dashboard' ,
29
+ } ,
30
+ } ,
31
+ {
32
+ path : 'employees' ,
26
33
loadChildren : ( ) => import ( './pages/employee' ) . then ( ( m ) => m . EMPLOYEE_ROUTES ) ,
27
34
data : {
28
35
breadcrumb : 'Employees' ,
29
36
} ,
30
37
} ,
31
38
{
32
- path : 'load ' ,
39
+ path : 'loads ' ,
33
40
loadChildren : ( ) => import ( './pages/load' ) . then ( ( m ) => m . LOAD_ROUTES ) ,
34
41
data : {
35
42
breadcrumb : 'Loads' ,
36
43
} ,
37
44
} ,
38
45
{
39
- path : 'truck ' ,
46
+ path : 'trucks ' ,
40
47
loadChildren : ( ) => import ( './pages/truck' ) . then ( ( m ) => m . TRUCK_ROUTES ) ,
41
48
data : {
42
49
breadcrumb : 'Trucks' ,
43
50
} ,
44
51
} ,
45
- {
46
- path : 'dashboard' ,
47
- loadChildren : ( ) => import ( './pages/dashboard' ) . then ( ( m ) => m . DASHBOARD_ROUTES ) ,
48
- data : {
49
- breadcrumb : 'Dashboard' ,
50
- } ,
51
- } ,
52
52
{
53
53
path : 'customers' ,
54
54
loadChildren : ( ) => import ( './pages/customer' ) . then ( ( m ) => m . CUSTOMER_ROUTES ) ,
Original file line number Diff line number Diff line change 17
17
</ a >
18
18
</ li >
19
19
< li class ="nav-item ">
20
- < a class ="nav-link border-bottom " [routerLink] ="['/load/list '] ">
20
+ < a class ="nav-link border-bottom " [routerLink] ="['/loads '] ">
21
21
< i class ="bi bi-database h1 " pTooltip ="Loads "> </ i >
22
22
< span class ="ms-2 " *ngIf ="isOpened "> Loads</ span >
23
23
</ a >
24
24
</ li >
25
25
< li class ="nav-item ">
26
- < a class ="nav-link border-bottom " [routerLink] ="['/truck/list '] ">
26
+ < a class ="nav-link border-bottom " [routerLink] ="['/trucks '] ">
27
27
< i class ="bi bi-truck h1 " pTooltip ="Trucks "> </ i >
28
28
< span class ="ms-2 " *ngIf ="isOpened "> Trucks</ span >
29
29
</ a >
30
30
</ li >
31
31
< li class ="nav-item ">
32
- < a class ="nav-link border-bottom " [routerLink] ="['/employee/list '] ">
32
+ < a class ="nav-link border-bottom " [routerLink] ="['/employees '] ">
33
33
< i class ="bi bi-people h1 " pTooltip ="Employees "> </ i >
34
34
< span class ="ms-2 " *ngIf ="isOpened "> Employees</ span >
35
35
</ a >
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ <h4 class="ps-3 py-2">Truck statistics for
72
72
< button pButton
73
73
class ="p-button-raised ms-2 "
74
74
label ="Edit "
75
- [routerLink] ="['/truck /edit', truckStats.truckId] ">
75
+ [routerLink] ="['/trucks /edit', truckStats.truckId] ">
76
76
</ button >
77
77
</ td >
78
78
</ tr >
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ <h1 class="text-center">Add a new employee</h1>
35
35
type ="button "
36
36
class ="p-button-raised mt-3 ms-2 "
37
37
icon ="bi bi-arrow-left-square "
38
- routerLink ="/employee/list "
38
+ routerLink ="/employees "
39
39
label ="Back to list ">
40
40
</ button >
41
41
</ div >
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ <h1 class="text-center">Edit Employee</h1>
44
44
type ="button "
45
45
class ="p-button-raised mt-3 ms-2 "
46
46
icon ="bi bi-arrow-left-square "
47
- routerLink ="/employee/list "
47
+ routerLink ="/employees "
48
48
label ="Back to list ">
49
49
</ button >
50
50
</ div >
Original file line number Diff line number Diff line change @@ -9,15 +9,10 @@ import {ListEmployeeComponent} from './list-employees/list-employees.component';
9
9
export const EMPLOYEE_ROUTES : Routes = [
10
10
{
11
11
path : '' ,
12
- redirectTo : 'list' ,
13
- pathMatch : 'full' ,
14
- } ,
15
- {
16
- path : 'list' ,
17
12
component : ListEmployeeComponent ,
18
13
canActivate : [ AuthGuard ] ,
19
14
data : {
20
- breadcrumb : 'List ' ,
15
+ breadcrumb : '' ,
21
16
permission : Permissions . Employees . View ,
22
17
} ,
23
18
} ,
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ <h1>List Employees</h1>
4
4
class ="p-button-lg p-button-rounded p-button-text text-black ms-2 "
5
5
icon ="bi bi-plus-square-fill "
6
6
pTooltip ="Add a new employee "
7
- routerLink ="/employee /add ">
7
+ routerLink ="/employees /add ">
8
8
</ button >
9
9
</ div >
10
10
< hr class ="w-100 ">
@@ -53,12 +53,12 @@ <h1>List Employees</h1>
53
53
< ng-template pTemplate ="body " let-employee >
54
54
< tr >
55
55
< td >
56
- < a [routerLink] ="['/employee /edit', employee.id] ">
56
+ < a [routerLink] ="['/employees /edit', employee.id] ">
57
57
{{employee.firstName}}
58
58
</ a >
59
59
</ td >
60
60
< td >
61
- < a [routerLink] ="['/employee /edit', employee.id] ">
61
+ < a [routerLink] ="['/employees /edit', employee.id] ">
62
62
{{employee.lastName}}
63
63
</ a >
64
64
</ td >
Original file line number Diff line number Diff line change 1
- import { Component , OnInit } from '@angular/core' ;
1
+ import { Component } from '@angular/core' ;
2
2
import { DatePipe } from '@angular/common' ;
3
3
import { RouterLink } from '@angular/router' ;
4
4
import { TableLazyLoadEvent , TableModule } from 'primeng/table' ;
Original file line number Diff line number Diff line change @@ -31,15 +31,15 @@ <h4 class="ps-3 py-2">Active loads</h4>
31
31
< ng-template pTemplate ="body " let-load >
32
32
< tr >
33
33
< td >
34
- < a [routerLink] ="['/load /edit', load.id] ">
34
+ < a [routerLink] ="['/loads /edit', load.id] ">
35
35
{{load.refId}}
36
36
</ a >
37
37
</ td >
38
38
< td [pTooltip] ="load.currentLocation " [showDelay] ="500 " tooltipPosition ="bottom ">
39
39
{{load.currentLocation}}
40
40
</ td >
41
41
< td >
42
- < a [routerLink] ="['/truck /details', load.assignedTruckId] ">
42
+ < a [routerLink] ="['/trucks /details', load.assignedTruckId] ">
43
43
{{load.assignedTruckNumber}}
44
44
</ a >
45
45
</ td >
@@ -50,12 +50,12 @@ <h4 class="ps-3 py-2">Active loads</h4>
50
50
< td colspan ="4 ">
51
51
< button pButton
52
52
class ="p-button-raised "
53
- routerLink ="/load /add ">
53
+ routerLink ="/loads /add ">
54
54
Add
55
55
</ button >
56
56
< button pButton
57
57
class ="p-button-raised ms-2 "
58
- routerLink ="/load/list ">
58
+ routerLink ="/loads ">
59
59
View all loads
60
60
</ button >
61
61
</ td >
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ <h1>Add a new load</h1>
69
69
type ="button "
70
70
class ="p-button-raised mt-3 ms-0 ms-md-2 "
71
71
icon ="bi bi-arrow-left-square "
72
- routerLink ="/load/list ">
72
+ routerLink ="/loads ">
73
73
Back to list
74
74
</ button >
75
75
</ div >
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ <h1>Edit a load #{{loadRefId}}</h1>
84
84
type ="button "
85
85
class ="p-button-raised mt-3 ms-0 ms-md-2 "
86
86
icon ="bi bi-arrow-left-square "
87
- routerLink ="/load/list ">
87
+ routerLink ="/loads ">
88
88
Back to list
89
89
</ button >
90
90
</ div >
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ export class EditLoadComponent implements OnInit {
179
179
this . apiService . deleteLoad ( this . id ) . subscribe ( ( result ) => {
180
180
if ( result . isSuccess ) {
181
181
this . toastService . showSuccess ( 'A load has been deleted successfully' ) ;
182
- this . router . navigateByUrl ( '/load/list ' ) ;
182
+ this . router . navigateByUrl ( '/loads ' ) ;
183
183
}
184
184
185
185
this . isBusy = false ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ <h1>List Loads</h1>
4
4
class ="p-button-lg p-button-rounded p-button-text text-black ms-2 "
5
5
icon ="bi bi-plus-square-fill "
6
6
pTooltip ="Add a new load "
7
- routerLink ="/load /add ">
7
+ routerLink ="/loads /add ">
8
8
</ button >
9
9
</ div >
10
10
< hr class ="w-100 ">
@@ -78,7 +78,7 @@ <h1>List Loads</h1>
78
78
< ng-template pTemplate ="body " let-load >
79
79
< tr >
80
80
< td >
81
- < a [routerLink] ="['/load /edit', load.id] ">
81
+ < a [routerLink] ="['/loads /edit', load.id] ">
82
82
{{load.refId}}
83
83
</ a >
84
84
</ td >
Original file line number Diff line number Diff line change @@ -9,15 +9,10 @@ import {AddLoadComponent} from './add-load/add-load.component';
9
9
export const LOAD_ROUTES : Routes = [
10
10
{
11
11
path : '' ,
12
- redirectTo : 'list' ,
13
- pathMatch : 'full' ,
14
- } ,
15
- {
16
- path : 'list' ,
17
12
component : ListLoadComponent ,
18
13
canActivate : [ AuthGuard ] ,
19
14
data : {
20
- breadcrumb : 'List ' ,
15
+ breadcrumb : '' ,
21
16
permission : Permissions . Loads . View ,
22
17
} ,
23
18
} ,
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ <h1 class="text-center">{{headerText}}</h1>
50
50
type ="button "
51
51
class ="p-button-raised mt-3 ms-0 ms-md-2 "
52
52
icon ="bi bi-arrow-left-square "
53
- routerLink ="/truck/list ">
53
+ routerLink ="/trucks ">
54
54
Back to list
55
55
</ button >
56
56
</ div >
Original file line number Diff line number Diff line change @@ -76,8 +76,8 @@ export class EditTruckComponent implements OnInit {
76
76
this . fetchTruck ( this . id ) ;
77
77
}
78
78
79
- searchDriver ( event : any ) {
80
- this . apiService . getDrivers ( event . query ) . subscribe ( ( result ) => {
79
+ searchDriver ( event : { query : string } ) {
80
+ this . apiService . getDrivers ( { search : event . query } ) . subscribe ( ( result ) => {
81
81
if ( result . isSuccess && result . data ) {
82
82
this . suggestedDrivers = result . data ;
83
83
}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ <h1>List Trucks</h1>
4
4
class ="p-button-lg p-button-rounded p-button-text text-black ms-2 "
5
5
icon ="bi bi-plus-square-fill "
6
6
pTooltip ="Add a new truck "
7
- routerLink ="/truck /add ">
7
+ routerLink ="/trucks /add ">
8
8
</ button >
9
9
</ div >
10
10
< hr class ="w-100 ">
@@ -71,7 +71,7 @@ <h1>List Trucks</h1>
71
71
< button pButton
72
72
class ="p-button-raised ms-2 "
73
73
label ="Edit "
74
- [routerLink] ="['/truck /edit', truck.id] ">
74
+ [routerLink] ="['/trucks /edit', truck.id] ">
75
75
</ button >
76
76
</ td >
77
77
</ tr >
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ <h1 class="text-center">Truck Details</h1>
51
51
</ div >
52
52
< div class ="col-12 col-md-6 mb-2 mb-md-0 ">
53
53
< span class ="fw-bold "> Truck Number: </ span > < br />
54
- < a [routerLink] ="['/truck /edit', truck?.id] "> {{truck?.truckNumber}}</ a >
54
+ < a [routerLink] ="['/trucks /edit', truck?.id] "> {{truck?.truckNumber}}</ a >
55
55
</ div >
56
56
</ div >
57
57
Original file line number Diff line number Diff line change @@ -9,15 +9,10 @@ import {TruckDetailsComponent} from './truck-details/truck-details.component';
9
9
export const TRUCK_ROUTES : Routes = [
10
10
{
11
11
path : '' ,
12
- redirectTo : 'list' ,
13
- pathMatch : 'full' ,
14
- } ,
15
- {
16
- path : 'list' ,
17
12
component : ListTruckComponent ,
18
13
canActivate : [ AuthGuard ] ,
19
14
data : {
20
- breadcrumb : 'List ' ,
15
+ breadcrumb : '' ,
21
16
permission : Permissions . Trucks . View ,
22
17
} ,
23
18
} ,
You can’t perform that action at this time.
0 commit comments