@aggdirect/coolmap 2.9.8 → 2.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/esm2022/aggdirect-coolmap.mjs +5 -0
  2. package/esm2022/lib/component/add-route/add-route.component.mjs +433 -0
  3. package/esm2022/lib/component/job-code/job-code.component.mjs +181 -0
  4. package/esm2022/lib/component/map/map.component.mjs +39 -0
  5. package/esm2022/lib/component/nav/layout/add-route-nav/add-route-nav.component.mjs +151 -0
  6. package/esm2022/lib/component/nav/layout/job-code-nav/job-code-nav.component.mjs +156 -0
  7. package/esm2022/lib/component/nav/nav.component.mjs +54 -0
  8. package/esm2022/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.mjs +77 -0
  9. package/esm2022/lib/component/route-jobcode-list/route-jobcode-list.component.mjs +319 -0
  10. package/esm2022/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.mjs +19 -0
  11. package/esm2022/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.mjs +37 -0
  12. package/esm2022/lib/component/shared/dialog/dialog.component.mjs +31 -0
  13. package/esm2022/lib/component/shared/estimation-display/estimation-display.component.mjs +18 -0
  14. package/esm2022/lib/component/shared/job-route-list/job-route-list.component.mjs +79 -0
  15. package/esm2022/lib/component/shared/jobcode-overview/jobcode-overview.component.mjs +24 -0
  16. package/esm2022/lib/component/shared/jobcode-status/jobcode-status.component.mjs +15 -0
  17. package/esm2022/lib/component/shared/route-info-card/route-info-card.component.mjs +62 -0
  18. package/esm2022/lib/component/shared/searchoptiongroup/searchoptiongroup.component.mjs +25 -0
  19. package/esm2022/lib/coolmap.module.mjs +193 -0
  20. package/esm2022/public-api.mjs +19 -0
  21. package/fesm2022/aggdirect-coolmap.mjs +1784 -0
  22. package/fesm2022/aggdirect-coolmap.mjs.map +1 -0
  23. package/index.d.ts +5 -0
  24. package/lib/component/add-route/add-route.component.d.ts +73 -0
  25. package/lib/component/job-code/job-code.component.d.ts +41 -0
  26. package/lib/component/map/map.component.d.ts +15 -0
  27. package/lib/component/nav/layout/add-route-nav/add-route-nav.component.d.ts +49 -0
  28. package/lib/component/nav/layout/job-code-nav/job-code-nav.component.d.ts +42 -0
  29. package/lib/component/nav/nav.component.d.ts +31 -0
  30. package/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.d.ts +20 -0
  31. package/lib/component/route-jobcode-list/route-jobcode-list.component.d.ts +42 -0
  32. package/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.d.ts +9 -0
  33. package/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.d.ts +12 -0
  34. package/lib/component/shared/dialog/dialog.component.d.ts +13 -0
  35. package/lib/component/shared/estimation-display/estimation-display.component.d.ts +8 -0
  36. package/lib/component/shared/job-route-list/job-route-list.component.d.ts +26 -0
  37. package/lib/component/shared/jobcode-overview/jobcode-overview.component.d.ts +10 -0
  38. package/lib/component/shared/jobcode-status/jobcode-status.component.d.ts +7 -0
  39. package/lib/component/shared/route-info-card/route-info-card.component.d.ts +32 -0
  40. package/lib/component/shared/searchoptiongroup/searchoptiongroup.component.d.ts +14 -0
  41. package/lib/coolmap.module.d.ts +46 -0
  42. package/package.json +22 -5
  43. package/{src/public-api.ts → public-api.d.ts} +0 -8
  44. package/karma.conf.js +0 -44
  45. package/ng-package.json +0 -7
  46. package/src/assets/mixin.scss +0 -28
  47. package/src/assets/palette.scss +0 -24
  48. package/src/assets/variable.scss +0 -15
  49. package/src/lib/component/add-route/add-route.component.html +0 -172
  50. package/src/lib/component/add-route/add-route.component.scss +0 -243
  51. package/src/lib/component/add-route/add-route.component.spec.ts +0 -23
  52. package/src/lib/component/add-route/add-route.component.ts +0 -394
  53. package/src/lib/component/job-code/job-code.component.html +0 -79
  54. package/src/lib/component/job-code/job-code.component.scss +0 -396
  55. package/src/lib/component/job-code/job-code.component.ts +0 -146
  56. package/src/lib/component/map/map.component.css +0 -0
  57. package/src/lib/component/map/map.component.html +0 -4
  58. package/src/lib/component/map/map.component.spec.ts +0 -23
  59. package/src/lib/component/map/map.component.ts +0 -34
  60. package/src/lib/component/nav/layout/add-route-nav/add-route-nav.component.html +0 -46
  61. package/src/lib/component/nav/layout/add-route-nav/add-route-nav.component.scss +0 -18
  62. package/src/lib/component/nav/layout/add-route-nav/add-route-nav.component.spec.ts +0 -23
  63. package/src/lib/component/nav/layout/add-route-nav/add-route-nav.component.ts +0 -130
  64. package/src/lib/component/nav/layout/job-code-nav/job-code-nav.component.html +0 -48
  65. package/src/lib/component/nav/layout/job-code-nav/job-code-nav.component.scss +0 -24
  66. package/src/lib/component/nav/layout/job-code-nav/job-code-nav.component.ts +0 -143
  67. package/src/lib/component/nav/nav.component.html +0 -19
  68. package/src/lib/component/nav/nav.component.scss +0 -67
  69. package/src/lib/component/nav/nav.component.ts +0 -38
  70. package/src/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.html +0 -56
  71. package/src/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.scss +0 -168
  72. package/src/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.spec.ts +0 -23
  73. package/src/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.ts +0 -43
  74. package/src/lib/component/route-jobcode-list/route-jobcode-list.component.html +0 -73
  75. package/src/lib/component/route-jobcode-list/route-jobcode-list.component.scss +0 -227
  76. package/src/lib/component/route-jobcode-list/route-jobcode-list.component.ts +0 -233
  77. package/src/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.html +0 -7
  78. package/src/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.scss +0 -10
  79. package/src/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.spec.ts +0 -23
  80. package/src/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.ts +0 -15
  81. package/src/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.html +0 -28
  82. package/src/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.scss +0 -172
  83. package/src/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.spec.ts +0 -23
  84. package/src/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.ts +0 -20
  85. package/src/lib/component/shared/dialog/dialog.component.html +0 -7
  86. package/src/lib/component/shared/dialog/dialog.component.scss +0 -30
  87. package/src/lib/component/shared/dialog/dialog.component.ts +0 -18
  88. package/src/lib/component/shared/estimation-display/estimation-display.component.html +0 -7
  89. package/src/lib/component/shared/estimation-display/estimation-display.component.scss +0 -7
  90. package/src/lib/component/shared/estimation-display/estimation-display.component.ts +0 -13
  91. package/src/lib/component/shared/job-route-list/job-route-list.component.html +0 -46
  92. package/src/lib/component/shared/job-route-list/job-route-list.component.scss +0 -15
  93. package/src/lib/component/shared/job-route-list/job-route-list.component.spec.ts +0 -23
  94. package/src/lib/component/shared/job-route-list/job-route-list.component.ts +0 -54
  95. package/src/lib/component/shared/jobcode-overview/jobcode-overview.component.html +0 -11
  96. package/src/lib/component/shared/jobcode-overview/jobcode-overview.component.scss +0 -13
  97. package/src/lib/component/shared/jobcode-overview/jobcode-overview.component.spec.ts +0 -23
  98. package/src/lib/component/shared/jobcode-overview/jobcode-overview.component.ts +0 -19
  99. package/src/lib/component/shared/jobcode-status/jobcode-status.component.html +0 -5
  100. package/src/lib/component/shared/jobcode-status/jobcode-status.component.scss +0 -40
  101. package/src/lib/component/shared/jobcode-status/jobcode-status.component.spec.ts +0 -23
  102. package/src/lib/component/shared/jobcode-status/jobcode-status.component.ts +0 -11
  103. package/src/lib/component/shared/route-info-card/route-info-card.component.html +0 -19
  104. package/src/lib/component/shared/route-info-card/route-info-card.component.scss +0 -50
  105. package/src/lib/component/shared/route-info-card/route-info-card.component.spec.ts +0 -23
  106. package/src/lib/component/shared/route-info-card/route-info-card.component.ts +0 -74
  107. package/src/lib/component/shared/searchoptiongroup/searchoptiongroup.component.css +0 -3
  108. package/src/lib/component/shared/searchoptiongroup/searchoptiongroup.component.html +0 -6
  109. package/src/lib/component/shared/searchoptiongroup/searchoptiongroup.component.spec.ts +0 -23
  110. package/src/lib/component/shared/searchoptiongroup/searchoptiongroup.component.ts +0 -21
  111. package/src/lib/coolmap.module.ts +0 -120
  112. package/src/test.ts +0 -27
  113. package/tsconfig.lib.json +0 -15
  114. package/tsconfig.lib.prod.json +0 -10
  115. package/tsconfig.spec.json +0 -17
@@ -1,28 +0,0 @@
1
- <div class="routebox">
2
- <span>
3
- <mat-icon>directions</mat-icon>
4
- <h2 [ngClass]="{'routeheading': route['route_name']}">
5
- {{route['route_name']}}
6
- </h2>
7
- </span>
8
- <h3><ng-container *ngIf="config?.repository === 'coolmap'">{{route['customer_name']}}</ng-container></h3>
9
-
10
- <div class="pickdropprt">
11
- <div class="pickprt">
12
- <b>
13
- <h4>{{route['pickup_location']?.split('|')[1] ? route['pickup_location'].split('|')[1] : route['pickup_location']}}</h4>
14
- </b>
15
- </div>
16
- <div class="dropprt">
17
- <b>
18
- <h4>{{route['delivery_location']?.split('|')[1] ? route['delivery_location'].split('|')[1] : route['delivery_location']}}</h4>
19
- </b>
20
- </div>
21
- </div>
22
- <div class="infoicon" (click)="detailsDict('click', route)" (mouseover)="detailsDict(true, route)"
23
- (mouseleave)="detailsDict(false, route)">
24
- <img src="assets/images/info_icon.png" [alt]="" />
25
- </div>
26
- <div class="status routestatus" [ngClass]="route['unit']">{{route['unit']}}</div>
27
- </div>
28
-
@@ -1,172 +0,0 @@
1
- @import "../../../../assets/variable.scss";
2
- .routebox{
3
- span {
4
- display: flex;
5
- align-items: center;
6
- h2 {
7
- margin-left: 5px;
8
- white-space: nowrap;
9
- overflow: hidden;
10
- text-overflow: ellipsis;
11
- max-width: 180px;
12
- margin-bottom: 5px;
13
- margin-top: 5px;
14
- font-size: 0.95rem;
15
- }
16
- }
17
- h3 {
18
- font-size: 0.85rem;
19
- color: $softgrey;
20
- font-weight: 400;
21
- margin-top: 0;
22
- white-space: nowrap;
23
- overflow: hidden;
24
- text-overflow: ellipsis;
25
- max-width: 325px;
26
- margin-bottom: 10px;
27
- }
28
- .pickdropprt {
29
- font-size: 0.8125rem;
30
- .pickprt {
31
- position: relative;
32
- display: flex;
33
- align-items: center;
34
- padding-bottom: 6px;
35
- span {
36
- padding-left: 0;
37
- padding-right: 20px;
38
- display: block;
39
- }
40
- b {
41
- position: relative;
42
- font-weight: normal;
43
- &:after {
44
- background: $black;
45
- width: 1px;
46
- height: 100%;
47
- left: 3px;
48
- content: "";
49
- position: absolute;
50
- top: 10px;
51
- }
52
- }
53
- h4 {
54
- position: relative;
55
- padding-left: 15px;
56
- margin: 0px 0 0 0;
57
- line-height: 18px;
58
- font-weight: normal;
59
- overflow: hidden;
60
- // text-overflow: ellipsis;
61
- // display: -webkit-box;
62
- // -webkit-line-clamp: 1;
63
- // -webkit-box-orient: vertical;
64
- // max-width: 215px;
65
- @media (min-width:1600px) {
66
- max-width: 265px;
67
- }
68
- &:before {
69
- background: green;
70
- top: 4px;
71
- left: 0px;
72
- position: absolute;
73
- content: "";
74
- width: 7px;
75
- height: 7px;
76
- border-radius: 100%;
77
- }
78
- }
79
- }
80
- .dropprt {
81
- position: relative;
82
- padding-bottom: 10px;
83
- display: flex;
84
- align-items: center;
85
- span {
86
- padding-left: 0;
87
- padding-right: 20px;
88
- display: block;
89
- }
90
- b {
91
- position: relative;
92
- font-weight: normal;
93
- &:after {
94
- background: $black;
95
- width: 1px;
96
- height: 12px;
97
- left: 3px;
98
- content: "";
99
- position: absolute;
100
- top: -7px;
101
- }
102
- }
103
- h4 {
104
- position: relative;
105
- padding-left: 15px;
106
- margin: 0;
107
- line-height: 18px;
108
- font-weight: normal;
109
- overflow: hidden;
110
- // text-overflow: ellipsis;
111
- // display: -webkit-box;
112
- // -webkit-line-clamp: 1;
113
- // -webkit-box-orient: vertical;
114
- // max-width: 215px;
115
- &:before {
116
- background: red;
117
- top: 4px;
118
- left: 0px;
119
- position: absolute;
120
- content: "";
121
- width: 7px;
122
- height: 7px;
123
- border-radius: 100%;
124
- }
125
- }
126
- }
127
- }
128
- .infoicon{
129
- position: absolute;
130
- right: 10px;
131
- top: 11px;
132
- img{
133
- width: 20px;
134
- height: 20px;
135
- }
136
- }
137
- .status {
138
- position: absolute;
139
- border-radius: 30px;
140
- top: 12px;
141
- right: 40px;
142
- font-size: 0;
143
- color: $white;
144
- text-transform: capitalize;
145
- font-weight: 500;
146
- padding: 3px 10px;
147
- &.routestatus{
148
- right: 36px;
149
- width: 20px;
150
- height: 20px;
151
- text-align: center;
152
- line-height: 20px;
153
- padding: 0 0 0 1px;
154
- &::first-letter{
155
- font-size: 0.8rem;
156
- }
157
- @media (min-width:1600px) {
158
- padding: 0px;
159
- line-height: 22px;
160
- }
161
- }
162
- &.Ton {
163
- background: #ff7272;
164
- }
165
- &.Load {
166
- background: #a3c52e;
167
- }
168
- &.Hourly {
169
- background: #ae23d1;
170
- }
171
- }
172
- }
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { ViewRouteListCardComponent } from './view-route-list-card.component';
4
-
5
- describe('ViewRouteListCardComponent', () => {
6
- let component: ViewRouteListCardComponent;
7
- let fixture: ComponentFixture<ViewRouteListCardComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ ViewRouteListCardComponent ]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(ViewRouteListCardComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,20 +0,0 @@
1
- import { Component, Inject, Input } from '@angular/core';
2
- import { CoolmapConfigModel, Route, UtilsService } from '@aggdirect/coolmap-services';
3
-
4
- @Component({
5
- selector: 'app-view-route-list-card',
6
- templateUrl: './view-route-list-card.component.html',
7
- styleUrls: ['./view-route-list-card.component.scss']
8
- })
9
- export class ViewRouteListCardComponent {
10
- @Input() public route!: Route;
11
- @Input() public emitrouteevent: any;
12
- constructor(public utils: UtilsService,
13
- @Inject('memberData') public config: CoolmapConfigModel) { }
14
-
15
- detailsDict(event: boolean | string, route: Route) {
16
- if(event === 'click') this.utils.setdictValue('route-detailsv2', JSON.stringify(route));
17
- route['type'] = 'editroute'; route['prevent'] = true; this.emitrouteevent.emit(route);
18
- this.utils.routeDetailsUtility.next({ event, route });
19
- }
20
- }
@@ -1,7 +0,0 @@
1
- <div class="dialogbox">
2
- <h2>{{body}}</h2>
3
- <div class="twobtnprt">
4
- <button class="delbtn" (click)="onClose(true)">{{positive}}</button>
5
- <button class="closebtn" (click)="onClose(false)">{{negative}}</button>
6
- </div>
7
- </div>
@@ -1,30 +0,0 @@
1
- @import "../../../../assets/variable.scss";
2
-
3
- .dialogbox{
4
- display: flex;
5
- flex-direction: column;
6
- h2{
7
- font-size: 1.5rem;
8
- }
9
- .twobtnprt{
10
- display: flex;
11
- justify-content: center;
12
- margin-top: 10px;
13
- }
14
- }
15
- .closebtn{
16
- background: $black;
17
- color: $white;
18
- border-radius: 30px;
19
- padding: 10px 18px 10px 18px;
20
- margin: 0 10px;
21
- font-size: 1rem;
22
- }
23
- .delbtn{
24
- background:red;
25
- color: $white;
26
- border-radius: 30px;
27
- padding: 10px 18px 10px 18px;
28
- margin: 0 10px;
29
- font-size: 1rem;
30
- }
@@ -1,18 +0,0 @@
1
- import { Component, Inject } from '@angular/core';
2
- import {MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
3
- @Component({
4
- selector: 'app-dialog',
5
- templateUrl: './dialog.component.html',
6
- styleUrls: ['./dialog.component.scss']
7
- })
8
- export class DialogComponent {
9
- body = 'Are you sure you want to delete?';
10
- positive = 'Delete';
11
- negative = 'Cancel';
12
- constructor(public dialogRef: MatDialogRef<DialogComponent>, @Inject(MAT_DIALOG_DATA) public data: any) {
13
- ['body', 'positive', 'negative'].map(elem => {
14
- if (this.data[elem] !== undefined) { this[elem] = this.data[elem] }
15
- });
16
- }
17
- onClose(result: boolean) { this.dialogRef.close(result) }
18
- }
@@ -1,7 +0,0 @@
1
- <div class="d-flex">
2
- <ng-container *ngFor="let item of label">
3
- <span *ngIf="value[item]" class="estimate" (mousedown)="$event.stopPropagation()">
4
- Estimation of {{Estinationlabel[item]}} - <b>{{value[item]}}</b>
5
- </span>
6
- </ng-container>
7
- </div>
@@ -1,7 +0,0 @@
1
- .estimate{
2
- margin-right: 20px;
3
- font-size: 0.7rem;
4
- @media (min-width:1600px) {
5
- font-size: 0.95rem;
6
- }
7
- }
@@ -1,13 +0,0 @@
1
- import { Component, Input } from '@angular/core';
2
- import { EstinationEnum, EstinationData } from '@aggdirect/coolmap-services';
3
-
4
- @Component({
5
- selector: 'app-estimation-display',
6
- templateUrl: './estimation-display.component.html',
7
- styleUrls: ['./estimation-display.component.scss']
8
- })
9
- export class EstimationDisplayComponent {
10
- @Input() value!: any;
11
- label = EstinationData;
12
- Estinationlabel: any = EstinationEnum;
13
- }
@@ -1,46 +0,0 @@
1
- <div class="searchprt">
2
- <form [formGroup]="filterForm">
3
- <mat-form-field class="full-width">
4
- <mat-label>Search</mat-label>
5
- <input matInput [matChipInputFor]="chipList" formControlName="search" [matAutocomplete]="auto">
6
- <mat-icon matSuffix *ngIf="!utils.conveySearchIcon(filterForm.value.search)">search</mat-icon>
7
- <button
8
- matSuffix
9
- mat-icon-button
10
- aria-label="Clear"
11
- (click)="filterForm.reset()"
12
- *ngIf="utils.conveySearchIcon(filterForm.value.search)"
13
- >
14
- <mat-icon>close</mat-icon>
15
- </button>
16
- <mat-autocomplete
17
- autoActiveFirstOption
18
- #auto="matAutocomplete"
19
- class="autocomplete"
20
- >
21
- <ng-container *ngFor="let option of filteredOptions | async">
22
- @if (option.type !== 'material') {
23
- <mat-option
24
- (onSelectionChange)="filterSearch($event)"
25
- [value]="option"
26
- >
27
- {{ option.type | titlecase }}: {{ option["label"] }}
28
- </mat-option>
29
- }
30
- </ng-container>
31
- </mat-autocomplete>
32
- </mat-form-field>
33
- </form>
34
- </div>
35
- <div class="chip-list">
36
- <mat-chip-grid #chipList aria-label="Filter selection">
37
- @for (filter of filters; track filter) {
38
- <mat-chip-row (removed)="removeFromFilter(filter)">
39
- {{filter.type | titlecase }}: {{filter.name}}
40
- <button matChipRemove>
41
- <mat-icon>cancel</mat-icon>
42
- </button>
43
- </mat-chip-row>
44
- }
45
- </mat-chip-grid>
46
- </div>
@@ -1,15 +0,0 @@
1
- .searchprt{
2
- padding-right: 20px;
3
- }
4
-
5
- ::ng-deep .searchprt .mdc-button{
6
- min-width: auto;
7
- }
8
- ::ng-deep .autocomplete .mat-mdc-option .mdc-list-item__primary-text{
9
- display: inline-block;
10
- flex-grow: 1;
11
- overflow: hidden;
12
- text-overflow: ellipsis;
13
- font-size: 0.8rem;
14
- white-space: nowrap;
15
- }
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { JobRouteListComponent } from './job-route-list.component';
4
-
5
- describe('JobRouteListComponent', () => {
6
- let component: JobRouteListComponent;
7
- let fixture: ComponentFixture<JobRouteListComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ JobRouteListComponent ]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(JobRouteListComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,54 +0,0 @@
1
- import { Component, EventEmitter, Input, Output } from '@angular/core';
2
- import { FormControl, FormGroup } from '@angular/forms';
3
- import { CoolmapService, Route, UtilsService } from '@aggdirect/coolmap-services';
4
- import { map, Observable, startWith } from 'rxjs';
5
-
6
- @Component({
7
- selector: 'app-job-route-list',
8
- templateUrl: './job-route-list.component.html',
9
- styleUrls: ['./job-route-list.component.scss']
10
- })
11
- export class JobRouteListComponent {
12
- @Output() public changeNav = new EventEmitter<string | any>();
13
- filteredOptions!: Observable<any[]> | undefined;
14
- preventListUpdate: boolean;
15
- filterForm = new FormGroup({ search: new FormControl() });
16
- filters: any[];
17
- @Input() public routes: Route[];
18
- @Input() public selectedRoute;
19
- @Output() public changeRoutes = new EventEmitter<string | any>();
20
- @Output() public changeSelectedRoute = new EventEmitter<string | any>();
21
- @Input() public masterRoutes: Route[];
22
-
23
- constructor(public utils: UtilsService, public coolMap: CoolmapService) {
24
- this.filters = [];
25
- this.filteredOptions = this.filterForm.get('search')?.valueChanges.pipe(startWith(''),
26
- map(value => this.utils.filter(value, this.filters)));
27
- }
28
-
29
- filterSearch(e: any): void {
30
- this.changeNav.emit({ type: 'Addroute' });
31
- this.preventListUpdate = true;
32
- this.filterForm.controls.search.setValue(null);
33
- this.filters = [{ name: e.source.value.label, type: e.source.value.type, value: e.source.value }];
34
- const filteredRoutes = this.utils.getSearchResults(this.masterRoutes, [{ name: e.source.value.label, type: e.source.value.type, value: e.source.value }]);
35
- this.changeRoutes.emit(filteredRoutes);
36
- this.selectedRoute.selected.forEach((item: any) => {
37
- const routeData = filteredRoutes.find(x => x.route_id === item.route_id);
38
- if (!routeData) {
39
- this.selectedRoute.toggle(item);
40
- this.changeSelectedRoute.emit(this.selectedRoute);
41
- this.coolMap.removeRouteAndMarker(item['route_id']).then((res: any) => {
42
- this.coolMap.extendReBound();
43
- });
44
- }
45
- })
46
- }
47
-
48
- removeFromFilter(filter: any): void {
49
- this.changeNav.emit({ type: 'Addroute' });
50
- const index = this.filters.indexOf(filter);
51
- if (index >= 0) { this.filters = []; this.changeRoutes.emit(this.masterRoutes); }
52
- }
53
- }
54
-
@@ -1,11 +0,0 @@
1
- <div class="detail_view m-20">
2
- <div class="destination">
3
- <div class="duration">
4
- <p class="pickprt"><b>{{makeValueObject('pickup_location')['label']}}:</b> {{makeValueObject('pickup_location')['value']}}</p>
5
- <p class="dropprt"><b>{{makeValueObject('delivery_location')['label']}}:</b> {{makeValueObject('delivery_location')['value']}}</p>
6
- </div>
7
- <ng-container *ngFor="let item of label">
8
- <span *ngIf="item !== 'pickup_location' && item !== 'delivery_location'" (mousedown)="$event.stopPropagation()"><b>{{makeValueObject(item)['label']}}:</b> {{makeValueObject(item)['value']}}</span>
9
- </ng-container>
10
- </div>
11
-
@@ -1,13 +0,0 @@
1
- @import "../../../../assets/variable.scss";
2
-
3
- .detail_view{
4
- .destination{
5
- .duration{
6
- padding: 10px;
7
- }
8
- span{
9
- padding: 5px 0;
10
- }
11
- }
12
- }
13
-
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { JobcodeOverviewComponent } from './jobcode-overview.component';
4
-
5
- describe('JobcodeOverviewComponent', () => {
6
- let component: JobcodeOverviewComponent;
7
- let fixture: ComponentFixture<JobcodeOverviewComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ JobcodeOverviewComponent ]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(JobcodeOverviewComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,19 +0,0 @@
1
- import { Component, Input } from '@angular/core';
2
- import { JobCodeOverviewData, JobCodeOverviewEnum } from '@aggdirect/coolmap-services';
3
-
4
- @Component({
5
- selector: 'app-jobcode-overview',
6
- templateUrl: './jobcode-overview.component.html',
7
- styleUrls: ['./jobcode-overview.component.scss']
8
- })
9
- export class JobcodeOverviewComponent {
10
- @Input() public jobValue: any;
11
- label = JobCodeOverviewData;
12
- overViewEnum: any = JobCodeOverviewEnum;
13
- constructor() {}
14
- makeValueObject(item: string) {
15
- let obj;
16
- obj = { label: this.overViewEnum[item], value: this.jobValue[item] }
17
- return obj;
18
- }
19
- }
@@ -1,5 +0,0 @@
1
- <div class="statusprt" *ngIf="jobValue['values']">
2
- <span class="done"> Done - {{jobValue['values']['Done']}} </span>
3
- <span class="ongoing"> Ongoing - {{jobValue['values']['Ongoing']}} </span>
4
- <span class="open"> Open - {{jobValue['values']['Open']}} </span>
5
- </div>
@@ -1,40 +0,0 @@
1
- @import "../../../../assets/variable.scss";
2
-
3
- .statusprt {
4
- span {
5
- padding: 5px 10px;
6
- font-size: 0.9rem;
7
- margin-left: 0;
8
- margin-right: 5px;
9
-
10
- &.done {
11
- border: 2px solid #0b843c;
12
- color: #0b843c;
13
-
14
- &:hover {
15
- background: #0b843c;
16
- color: $white;
17
- }
18
- }
19
-
20
- &.ongoing {
21
- border: 2px solid #eecb27;
22
- color: #eecb27;
23
-
24
- &:hover {
25
- background: #eecb27;
26
- color: $white;
27
- }
28
- }
29
-
30
- &.open {
31
- border: 2px solid #12afcb;
32
- color: #12afcb;
33
-
34
- &:hover {
35
- background: #12afcb;
36
- color: $white;
37
- }
38
- }
39
- }
40
- }
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { JobcodeStatusComponent } from './jobcode-status.component';
4
-
5
- describe('JobcodeStatusComponent', () => {
6
- let component: JobcodeStatusComponent;
7
- let fixture: ComponentFixture<JobcodeStatusComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ JobcodeStatusComponent ]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(JobcodeStatusComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,11 +0,0 @@
1
- import { Component, Input } from '@angular/core';
2
- import { Route } from '@aggdirect/coolmap-services';
3
-
4
- @Component({
5
- selector: 'app-jobcode-status',
6
- templateUrl: './jobcode-status.component.html',
7
- styleUrls: ['./jobcode-status.component.scss']
8
- })
9
- export class JobcodeStatusComponent {
10
- @Input() public jobValue!: Route;
11
- }
@@ -1,19 +0,0 @@
1
- <div [class]="propData['className']">
2
- <div class="destination">
3
- <div class="duration">
4
- <p class="pickprt"><b>Pickup:</b>{{
5
- createLabel('pickup_location')['value']?.split('|')[1] ?
6
- createLabel('pickup_location')['value']?.split('|')[1] :
7
- createLabel('pickup_location')['value']
8
- }}</p>
9
- <p class="dropprt"><b>Delivery:</b>{{
10
- createLabel('delivery_location')['value']?.split('|')[1] ?
11
- createLabel('delivery_location')['value']?.split('|')[1] :
12
- createLabel('delivery_location')['value']
13
- }}</p>
14
- </div>
15
- <ng-container *ngFor="let item of cardKeysElement">
16
- <span *ngIf="item !== 'pickup_location' && item !== 'delivery_location'" [class.notes]="item === 'note'"><b>{{createLabel(item)['label']}}:</b> {{createLabel(item)['value']}}</span>
17
- </ng-container>
18
- </div>
19
- </div>