@aggdirect/coolmap 0.1.3 → 1.0.1

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 (107) hide show
  1. package/README.md +33 -0
  2. package/esm2020/aggdirect-coolmap.mjs +5 -0
  3. package/esm2020/lib/component/add-route/add-route.component.mjs +310 -0
  4. package/esm2020/lib/component/job-code/job-code.component.mjs +114 -0
  5. package/esm2020/lib/component/map/map.component.mjs +39 -0
  6. package/esm2020/lib/component/nav/layout/add-route-nav/add-route-nav.component.mjs +87 -0
  7. package/esm2020/lib/component/nav/layout/job-code-nav/job-code-nav.component.mjs +89 -0
  8. package/esm2020/lib/component/nav/nav.component.mjs +52 -0
  9. package/esm2020/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.mjs +68 -0
  10. package/esm2020/lib/component/route-jobcode-list/route-jobcode-list.component.mjs +314 -0
  11. package/esm2020/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.mjs +19 -0
  12. package/esm2020/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.mjs +29 -0
  13. package/esm2020/lib/component/shared/dialog/dialog.component.mjs +29 -0
  14. package/esm2020/lib/component/shared/job-route-list/job-route-list.component.mjs +71 -0
  15. package/esm2020/lib/component/shared/jobcode-overview/jobcode-overview.component.mjs +19 -0
  16. package/esm2020/lib/component/shared/jobcode-status/jobcode-status.component.mjs +14 -0
  17. package/esm2020/lib/coolmap.component.mjs +22 -0
  18. package/esm2020/lib/coolmap.module.mjs +156 -0
  19. package/esm2020/lib/event.service.mjs +26 -0
  20. package/esm2020/public-api.mjs +16 -0
  21. package/fesm2015/aggdirect-coolmap.mjs +1367 -0
  22. package/fesm2015/aggdirect-coolmap.mjs.map +1 -0
  23. package/fesm2020/aggdirect-coolmap.mjs +1340 -0
  24. package/fesm2020/aggdirect-coolmap.mjs.map +1 -0
  25. package/index.d.ts +5 -0
  26. package/lib/component/add-route/add-route.component.d.ts +62 -0
  27. package/lib/component/job-code/job-code.component.d.ts +31 -0
  28. package/lib/component/map/map.component.d.ts +16 -0
  29. package/lib/component/nav/layout/add-route-nav/add-route-nav.component.d.ts +40 -0
  30. package/lib/component/nav/layout/job-code-nav/job-code-nav.component.d.ts +38 -0
  31. package/lib/component/nav/nav.component.d.ts +30 -0
  32. package/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.d.ts +19 -0
  33. package/lib/component/route-jobcode-list/route-jobcode-list.component.d.ts +42 -0
  34. package/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.d.ts +9 -0
  35. package/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.d.ts +11 -0
  36. package/lib/component/shared/dialog/dialog.component.d.ts +13 -0
  37. package/lib/component/shared/job-route-list/job-route-list.component.d.ts +26 -0
  38. package/lib/component/shared/jobcode-overview/jobcode-overview.component.d.ts +9 -0
  39. package/lib/component/shared/jobcode-status/jobcode-status.component.d.ts +8 -0
  40. package/lib/coolmap.component.d.ts +8 -0
  41. package/lib/coolmap.module.d.ts +40 -0
  42. package/lib/event.service.d.ts +19 -0
  43. package/package.json +31 -5
  44. package/public-api.d.ts +12 -0
  45. package/karma.conf.js +0 -44
  46. package/ng-package.json +0 -7
  47. package/src/assets/mixin.scss +0 -28
  48. package/src/assets/palette.scss +0 -24
  49. package/src/assets/variable.scss +0 -15
  50. package/src/lib/component/add-route/add-route.component.html +0 -140
  51. package/src/lib/component/add-route/add-route.component.scss +0 -235
  52. package/src/lib/component/add-route/add-route.component.spec.ts +0 -23
  53. package/src/lib/component/add-route/add-route.component.ts +0 -270
  54. package/src/lib/component/job-code/job-code.component.html +0 -93
  55. package/src/lib/component/job-code/job-code.component.scss +0 -427
  56. package/src/lib/component/job-code/job-code.component.ts +0 -94
  57. package/src/lib/component/map/map.component.css +0 -0
  58. package/src/lib/component/map/map.component.html +0 -5
  59. package/src/lib/component/map/map.component.spec.ts +0 -23
  60. package/src/lib/component/map/map.component.ts +0 -33
  61. package/src/lib/component/nav/layout/add-route-nav/add-route-nav.component.html +0 -44
  62. package/src/lib/component/nav/layout/add-route-nav/add-route-nav.component.scss +0 -0
  63. package/src/lib/component/nav/layout/add-route-nav/add-route-nav.component.spec.ts +0 -23
  64. package/src/lib/component/nav/layout/add-route-nav/add-route-nav.component.ts +0 -70
  65. package/src/lib/component/nav/layout/job-code-nav/job-code-nav.component.html +0 -43
  66. package/src/lib/component/nav/layout/job-code-nav/job-code-nav.component.scss +0 -5
  67. package/src/lib/component/nav/layout/job-code-nav/job-code-nav.component.ts +0 -64
  68. package/src/lib/component/nav/nav.component.html +0 -19
  69. package/src/lib/component/nav/nav.component.scss +0 -65
  70. package/src/lib/component/nav/nav.component.ts +0 -38
  71. package/src/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.html +0 -56
  72. package/src/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.scss +0 -167
  73. package/src/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.spec.ts +0 -23
  74. package/src/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.ts +0 -42
  75. package/src/lib/component/route-jobcode-list/route-jobcode-list.component.html +0 -66
  76. package/src/lib/component/route-jobcode-list/route-jobcode-list.component.scss +0 -226
  77. package/src/lib/component/route-jobcode-list/route-jobcode-list.component.ts +0 -234
  78. package/src/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.html +0 -7
  79. package/src/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.scss +0 -10
  80. package/src/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.spec.ts +0 -23
  81. package/src/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.ts +0 -15
  82. package/src/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.html +0 -30
  83. package/src/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.scss +0 -172
  84. package/src/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.spec.ts +0 -23
  85. package/src/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.ts +0 -19
  86. package/src/lib/component/shared/dialog/dialog.component.html +0 -7
  87. package/src/lib/component/shared/dialog/dialog.component.scss +0 -30
  88. package/src/lib/component/shared/dialog/dialog.component.ts +0 -18
  89. package/src/lib/component/shared/job-route-list/job-route-list.component.html +0 -27
  90. package/src/lib/component/shared/job-route-list/job-route-list.component.scss +0 -3
  91. package/src/lib/component/shared/job-route-list/job-route-list.component.spec.ts +0 -23
  92. package/src/lib/component/shared/job-route-list/job-route-list.component.ts +0 -54
  93. package/src/lib/component/shared/jobcode-overview/jobcode-overview.component.html +0 -8
  94. package/src/lib/component/shared/jobcode-overview/jobcode-overview.component.scss +0 -12
  95. package/src/lib/component/shared/jobcode-overview/jobcode-overview.component.spec.ts +0 -23
  96. package/src/lib/component/shared/jobcode-overview/jobcode-overview.component.ts +0 -15
  97. package/src/lib/component/shared/jobcode-status/jobcode-status.component.html +0 -5
  98. package/src/lib/component/shared/jobcode-status/jobcode-status.component.scss +0 -32
  99. package/src/lib/component/shared/jobcode-status/jobcode-status.component.spec.ts +0 -23
  100. package/src/lib/component/shared/jobcode-status/jobcode-status.component.ts +0 -12
  101. package/src/lib/coolmap.component.ts +0 -20
  102. package/src/lib/coolmap.module.ts +0 -92
  103. package/src/public-api.ts +0 -10
  104. package/src/test.ts +0 -27
  105. package/tsconfig.lib.json +0 -15
  106. package/tsconfig.lib.prod.json +0 -10
  107. package/tsconfig.spec.json +0 -17
@@ -1,427 +0,0 @@
1
- @import "../../../assets/variable.scss";
2
-
3
- .jobcode_detailprt {
4
- position: absolute;
5
- left: 300px;
6
- bottom: 10px;
7
- background: $white;
8
- padding: 15px 20px;
9
- border-radius: 20px;
10
- max-width: 350px;
11
- z-index: 999;
12
- box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.1);
13
- .close {
14
- box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.11);
15
- border-radius: 100%;
16
- width: 30px;
17
- height: 30px;
18
- display: flex;
19
- justify-content: center;
20
- align-items: center;
21
- cursor: pointer;
22
- background: #fff;
23
- position: absolute;
24
- top: -11px;
25
- left: -11px;
26
- }
27
- @keyframes autoslide {
28
- 100% {
29
- transform: translateX(calc(90vw - 100%));
30
- }
31
- 0% {
32
- transform: translateX(0%);
33
- }
34
- }
35
-
36
- }
37
- .route_listprt {
38
- .listing_toggle {
39
- background: $white;
40
- border-radius: 15px;
41
- padding: 5px 5px;
42
- position: absolute;
43
- right: 10px;
44
- top: 20px;
45
- cursor: pointer;
46
- img {
47
- width: 28px;
48
- }
49
- }
50
- .listing_box {
51
- background: #282828;
52
- height: 100vh;
53
- position: fixed;
54
- right: 0;
55
- top: 0;
56
- z-index: 1111;
57
- box-shadow: -3px 0px 5px 0px rgba(255, 255, 255, 0.08);
58
- transition: 0.5s;
59
- -webkit-transition: 0.5s;
60
- transition: 0.5s;
61
- -webkit-transition: 0.5s;
62
- -moz-transition: 0.5s;
63
- width: 0;
64
- border-radius: 40px 0px 0px 0px;
65
- opacity: 0;
66
- .closebtn {
67
- display: none;
68
- }
69
- ul {
70
- padding: 0 20px 0 0;
71
- li {
72
- background: #4a4a4a;
73
- padding: 10px 15px;
74
- border-radius: 15px;
75
- display: flex;
76
- margin-bottom: 10px;
77
- position: relative;
78
- height:inherit;
79
- @media (min-width:1600px) {
80
- padding: 6px 15px;
81
- margin-bottom: 5px;
82
- }
83
- .iconprt{
84
- display: flex;
85
- flex-direction: column;
86
- span {
87
- display: flex;
88
- align-items: center;
89
- margin-bottom: 32px;
90
- input[type="checkbox"] {
91
- width: 100%;
92
- height: 100%;
93
- margin-right: 10px;
94
- opacity: 0;
95
- position: absolute;
96
- left: 0px;
97
- margin-left: 0;
98
- top: 0;
99
- z-index: 3;
100
- cursor: pointer;
101
- &:checked+label {
102
- background: url("../../../assets/images/fill-check.png") 16px 15px no-repeat;
103
- }
104
- }
105
- label {
106
- background: url("../../../assets/images/blank-check.png") 16px 15px no-repeat;
107
- width: 100%;
108
- position: relative;
109
- z-index: 2;
110
- font-size: 12px;
111
- color: #878787;
112
- height: 100%;
113
- position: absolute;
114
- top: 0;
115
- left: 0;
116
- }
117
- .border {
118
- position: absolute;
119
- width: 100%;
120
- height: 100%;
121
- left: 0px;
122
- right: 0;
123
- top: 0;
124
- border-radius: 15px;
125
- }
126
- input {
127
- &:checked~.border {
128
- border-left: 1px solid $white;
129
- border-right: 1px solid $white;
130
- border-top: 1px solid $white;
131
- border-bottom: 1px solid $white;
132
- }
133
- }
134
- h2 {
135
- margin-left: 10px;
136
- white-space: nowrap;
137
- overflow: hidden;
138
- text-overflow: ellipsis;
139
- max-width: 150px;
140
- padding-left: 16px;
141
- font-size: 0.9rem;
142
- margin-bottom: 0;
143
- font-weight: normal;
144
- margin-top: 0;
145
- }
146
- }
147
- .statusunit{
148
- border-radius: 30px;
149
- font-size: 0;
150
- color: $white;
151
- text-transform: capitalize;
152
- font-weight: 500;
153
- width: 20px;
154
- height: 20px;
155
- text-align: center;
156
- line-height: 20px;
157
- margin-bottom: 7px;
158
- &::first-letter{
159
- font-size: 0.8rem;
160
- }
161
- &.Ton {
162
- background: #ff7272;
163
- }
164
- &.Load {
165
- background: #a3c52e;
166
- }
167
- &.Hourly {
168
- background: #ae23d1;
169
- }
170
- @media (min-width:1600px) {
171
- line-height: 21px;
172
- }
173
- }
174
- .infoicon{
175
- z-index: 5;
176
- cursor: pointer;
177
- img{
178
- width: 20px;
179
- height: 20px;
180
- }
181
- }
182
- }
183
- .pickprtbox{
184
- margin-left: 10px;
185
- h2{
186
- font-size: 0.9rem;
187
- margin: 3px 0 5px 0;
188
- white-space: nowrap;
189
- text-overflow: ellipsis;
190
- max-width: 195px;
191
- overflow: hidden;
192
- }
193
- }
194
-
195
-
196
- h3 {
197
- font-size: 0.8rem;
198
- color: #979797;
199
- font-weight: 600;
200
- margin-top: 0;
201
- white-space: nowrap;
202
- text-overflow: ellipsis;
203
- max-width: 195px;
204
- overflow: hidden;
205
- margin-bottom: 5px;
206
- }
207
- .pickdropprt {
208
- font-size: 0.75rem;
209
- .pickprt {
210
- position: relative;
211
- display: flex;
212
- align-items: center;
213
- padding-bottom: 10px;
214
- span {
215
- padding-left: 0;
216
- padding-right: 20px;
217
- display: block;
218
- }
219
- b {
220
- position: relative;
221
- &:after {
222
- background: #bcbcbc;
223
- width: 1px;
224
- height: 100%;
225
- left: 3px;
226
- content: "";
227
- position: absolute;
228
- top: 10px;
229
- }
230
- }
231
- h4 {
232
- position: relative;
233
- padding-left: 15px;
234
- margin: 0px 0 0 0;
235
- line-height: 18px;
236
- color: #bcbcbc;
237
- font-weight: normal;
238
- overflow: hidden;
239
- text-overflow: ellipsis;
240
- display: -webkit-box;
241
- -webkit-line-clamp: 1;
242
- -webkit-box-orient: vertical;
243
- &:before {
244
- background: #bcbcbc;
245
- top: 4px;
246
- left: 0px;
247
- position: absolute;
248
- content: "";
249
- width: 7px;
250
- height: 7px;
251
- border-radius: 100%;
252
- }
253
- }
254
- }
255
- .dropprt {
256
- position: relative;
257
- padding-bottom: 10px;
258
- display: flex;
259
- align-items: center;
260
- span {
261
- padding-left: 0;
262
- padding-right: 20px;
263
- display: block;
264
- }
265
- b {
266
- position: relative;
267
- &:after {
268
- background: #bcbcbc;
269
- width: 1px;
270
- height: 12px;
271
- left: 3px;
272
- content: "";
273
- position: absolute;
274
- top: -7px;
275
- }
276
- }
277
- h4 {
278
- position: relative;
279
- padding-left: 15px;
280
- margin: 0;
281
- line-height: 18px;
282
- color: #bcbcbc;
283
- font-weight: normal;
284
- overflow: hidden;
285
- text-overflow: ellipsis;
286
- display: -webkit-box;
287
- -webkit-line-clamp: 1;
288
- -webkit-box-orient: vertical;
289
- &:before {
290
- background: #bcbcbc;
291
- top: 4px;
292
- left: 0px;
293
- position: absolute;
294
- content: "";
295
- width: 7px;
296
- height: 7px;
297
- border-radius: 100%;
298
- }
299
- }
300
- }
301
- }
302
- }
303
- }
304
- }
305
- &.show {
306
- .listing_box {
307
- width: 300px;
308
- max-width: 300px;
309
- -webkit-box-flex: 0;
310
- flex: 0 0 350px;
311
- transition: 0.5s;
312
- -webkit-transition: 0.5s;
313
- transition: 0.5s;
314
- -webkit-transition: 0.5s;
315
- -moz-transition: 0.5s;
316
- padding: 40px 0px 40px 20px;
317
- opacity: 1;
318
- h2 {
319
- color: $white;
320
- white-space: nowrap;
321
- }
322
- .closebtn {
323
- position: absolute;
324
- left: -33px;
325
- top: 50px;
326
- background: #282828;
327
- color: $white;
328
- padding: 8px;
329
- border-top-left-radius: 15px;
330
- border-bottom-left-radius: 15px;
331
- cursor: pointer;
332
- box-shadow: -4px 2px 5px 0px rgba(255, 255, 255, 0.08);
333
- display: block;
334
- }
335
- }
336
- }
337
- }
338
-
339
- .btnprt{
340
- display: flex;
341
- justify-content: space-between;
342
- align-items: center;
343
- padding-right: 20px;
344
- h2{
345
- margin: 0;
346
- }
347
- button{
348
- font-size: 15px;
349
- padding: 8px 20px;
350
- border-radius: 5%;
351
- background-color: $blue;
352
- color: $white;
353
- border: none;
354
- border-radius: 10px;
355
- box-shadow: none;
356
- outline: none;
357
- }
358
- }
359
- .hidden {
360
- display: none;
361
- }
362
- .route_detail{
363
- background: #282828;
364
- position: absolute;
365
- width: 260px;
366
- top: 50%;
367
- transform: translateY(-50%);
368
- right: 310px;
369
- border-radius: 20px;
370
- padding: 10px;
371
- box-shadow: 0px 0px 5px 0px rgba(255,255,255,0.21);
372
-
373
- .destination{
374
- .duration{
375
- background: #444343;
376
- border: 1px solid #918e8e;
377
- padding: 10px;
378
- color:#fff;
379
- b{
380
- color: #fff;
381
- }
382
- }
383
- .pickprt, .dropprt {
384
- &:before {
385
- background: #fff;
386
- }
387
- b{
388
- &:before {
389
- background: #fff;
390
- }
391
- }
392
- }
393
- span{
394
- line-height: 20px;
395
- color: #fff;
396
- padding: 3px 0;
397
- b{
398
- color: #fff;
399
- }
400
- &.notes{
401
- max-height: 200px;
402
- overflow: auto;
403
- }
404
- }
405
- }
406
- }
407
- .createTxt{
408
- small{
409
- color: #fff;
410
- font-size: 0.7rem;
411
- }
412
- }
413
- .closebtnroutedetail{
414
- box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.11);
415
- border-radius: 100%;
416
- width: 30px;
417
- height: 30px;
418
- display: flex;
419
- justify-content: center;
420
- align-items: center;
421
- cursor: pointer;
422
- background: #f5f5f5;
423
- position: absolute;
424
- top: -7px;
425
- left: -11px;
426
- }
427
-
@@ -1,94 +0,0 @@
1
- import { SelectionModel } from '@angular/cdk/collections';
2
- import { Component, OnInit, Input, Output, EventEmitter, OnDestroy } from '@angular/core';
3
- import { map, Observable, startWith, Subject, takeUntil } from 'rxjs';
4
-
5
- import { FormControl, FormGroup } from '@angular/forms';
6
- import { CoolmapService, Route, UtilsService } from 'coolmap-services';
7
-
8
- @Component({
9
- selector: 'app-job-code',
10
- templateUrl: './job-code.component.html',
11
- styleUrls: ['./job-code.component.scss']
12
- })
13
- export class JobCodeComponent implements OnInit, OnDestroy {
14
- @Input() jobdetail!: any;
15
- isVisible: boolean = false;
16
- routes: Route[] = [];
17
- public selectedRoute = new SelectionModel<any>(true, [])
18
- @Output() clearJobDetails = new EventEmitter(); isOverlapRouteSection = false;
19
- private destroyer$ = new Subject<boolean>();
20
- detailsCardEnable: boolean | string;
21
- preventMouseout: boolean = false;
22
- routeCardDetail: Route;
23
- preventListUpdate: boolean;
24
- masterRoutes: any;
25
-
26
- constructor(private utils: UtilsService, private coolMap: CoolmapService) {
27
- this.utils.clearViewRouteforJobCodeObserve.pipe(takeUntil(this.destroyer$)).subscribe(res => {
28
- if (res) this.coolMap.removeJobFromMap(this.selectedRoute.selected); this.selectedRoute.clear();
29
- });
30
- }
31
-
32
- ngOnInit(): void { this.getRouteList() }
33
- getRouteList() {
34
- this.utils.getData('coolmap/routes/all').pipe(takeUntil(this.destroyer$)).subscribe((res: any) => {
35
- if (res) {
36
- this.routes = res.data;
37
- this.masterRoutes = res.data;
38
- this.preventListUpdate = false;
39
- this.utils.clearOptions();
40
- this.routes.forEach((ele: Route) => { this.utils.makeOptions(ele) });
41
- }
42
- })
43
- }
44
- toggleSidemenu() { this.isVisible = !this.isVisible }
45
- clearJob() { this.clearJobDetails.emit(true); this.utils.preVentJobdetailclose.next(false) }
46
- selectRoute(event: Route) {
47
- const i = this.selectedRoute.selected.findIndex(ele => ele['order_number'] === event['order_number']);
48
- this.selectedRoute.toggle(event);
49
- if (!this.selectedRoute.isSelected(event) && event['route_id']) {
50
- this.coolMap.removeRouteAndMarker(event['route_id']).then((res: any) => {
51
- this.coolMap.extendReBound();
52
- });
53
- } else {
54
- this.coolMap.plotRoute(event, event['route_id'], 'jobrouteList', false, true);
55
- }
56
- }
57
- masterToggle() {
58
- if (this.routes.length === this.selectedRoute.selected.length) {
59
- this.selectedRoute.clear();
60
- this.routes.forEach(row => {
61
- this.coolMap.removeRouteAndMarker(row['route_id']).then((res: any) => { this.coolMap.extendReBound() })
62
- });
63
- } else {
64
- this.routes.forEach(row => {
65
- this.selectedRoute.select(row);
66
- this.coolMap.plotRoute(row, row['route_id'], 'jobrouteList', false, true);
67
- });
68
- }
69
- }
70
- togglerouteDetails(eventType: string | boolean, route: Route, mouseOut?: boolean) {
71
- if (typeof (eventType) === 'string') {
72
- this.preventMouseout = true; this.utils.setdictValue('route-details', JSON.stringify(route));
73
- }
74
- if (typeof (eventType) === 'boolean' && eventType && !this.preventMouseout) { this.detailsCardEnable = eventType };
75
- if (typeof (eventType) === 'boolean' && !eventType && !this.preventMouseout) { this.detailsCardEnable = eventType };
76
- if (this.preventMouseout && !this.detailsCardEnable) this.preventMouseout = false;
77
- if (mouseOut) {
78
- if (this.preventMouseout) {
79
- route = this.utils.getdictValue('route-details');
80
- this.routeCardDetail = route;
81
- }
82
- if (!this.preventMouseout) {
83
- this.routeCardDetail = route
84
- }
85
- } else {
86
- this.routeCardDetail = route
87
- }
88
- this.routeCardDetail['created_at'] = this.utils.getDateFormat(new Date(this.routeCardDetail['created_at']), '/');
89
- }
90
- ngOnDestroy(): void {
91
- this.destroyer$.next(true);
92
- this.destroyer$.unsubscribe();
93
- }
94
- }
File without changes
@@ -1,5 +0,0 @@
1
- <div >
2
- <!-- <mat-progress-bar *ngIf="enableProgress" mode="indeterminate"></mat-progress-bar> -->
3
- <div #map class="coolmap" style="height: 100vh;"></div>
4
- </div>
5
-
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { MapComponent } from './map.component';
4
-
5
- describe('MapComponent', () => {
6
- let component: MapComponent;
7
- let fixture: ComponentFixture<MapComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ MapComponent ]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(MapComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,33 +0,0 @@
1
- import { Component, ElementRef, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';
2
- import { CoolmapService } from 'coolmap-services';
3
- import { Subject, takeUntil } from 'rxjs';
4
-
5
-
6
- @Component({
7
- selector: 'app-map',
8
- templateUrl: './map.component.html',
9
- styleUrls: ['./map.component.css']
10
- })
11
- export class MapComponent implements OnDestroy {
12
- @ViewChild('map', { static: true }) mapDiv!: ElementRef;
13
- enableProgress: boolean = true;
14
- private destroyer$ = new Subject<boolean>();
15
-
16
- constructor( private coolmapService: CoolmapService ) { }
17
-
18
- ngAfterViewInit() {
19
- this.coolmapService.reintiatecoolmap.pipe(takeUntil(this.destroyer$)).subscribe((res: any) => {
20
- this.enableProgress = true;
21
- if (res) {
22
- this.coolmapService.initiateMapForAddRoute(this.mapDiv.nativeElement).then((res) => {
23
- this.enableProgress = false;
24
- })
25
- }
26
- });
27
- }
28
-
29
- ngOnDestroy(): void {
30
- this.destroyer$.next(true);
31
- this.destroyer$.unsubscribe();
32
- }
33
- }
@@ -1,44 +0,0 @@
1
- <div class="nav_body">
2
- <div class="logo">
3
- <img src="assets/images/logo.png" alt="logo" />
4
- </div>
5
- <div class="heading m-20">
6
- <h1>View Route</h1>
7
- <button mat-raised-button color="primary" (click)="showAddForm()">
8
- <mat-icon>add_circle_outline</mat-icon> Add route
9
- </button>
10
- </div>
11
-
12
- <div class="search-panel">
13
- <div class="w-100">
14
- <form [formGroup]="filterForm">
15
- <mat-form-field class="full-width" [class.disabled]="loaderVal">
16
- <input matInput [matChipInputFor]="chipList" formControlName="search" [matAutocomplete]="auto"
17
- [disabled]="loaderVal" placeholder="Search">
18
- <mat-icon matSuffix *ngIf="!utils.conveySearchIcon(filterForm.value.search)">search</mat-icon>
19
- <button mat-button matSuffix mat-icon-button aria-label="Clear" *ngIf="utils.conveySearchIcon(filterForm.value.search)"
20
- (click)="filterForm.reset()">
21
- <mat-icon>close</mat-icon>
22
- </button>
23
- <mat-autocomplete autoActiveFirstOption #auto="matAutocomplete">
24
- <mat-option *ngFor="let option of filteredOptions | async" (onSelectionChange)="filterSearch($event)"
25
- [value]="option">
26
- {{option.type | titlecase }}: {{option['label']}}
27
- </mat-option>
28
- </mat-autocomplete>
29
- </mat-form-field>
30
- </form>
31
- <div class="chip-list">
32
- <mat-chip-list #chipList aria-label="Filter selection">
33
- <mat-chip *ngFor="let filter of filters" (removed)="removeFromFilter(filter)">
34
- {{filter.type | titlecase }}: {{filter.name}}
35
- <button matChipRemove>
36
- <mat-icon>cancel</mat-icon>
37
- </button>
38
- </mat-chip>
39
- </mat-chip-list>
40
- </div>
41
- </div>
42
- </div>
43
- <app-route-jobcode-list [type]="'addroute'" [currentNav]="navValue" [searchTerm]="filters" [data]="routes" [loader]="loaderVal" (emitroute)="getRoute($event)"></app-route-jobcode-list>
44
- </div>
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { AddRouteNavComponent } from './add-route-nav.component';
4
-
5
- describe('AddRouteNavComponent', () => {
6
- let component: AddRouteNavComponent;
7
- let fixture: ComponentFixture<AddRouteNavComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ AddRouteNavComponent ]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(AddRouteNavComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });