@aggdirect/coolmap 2.0.8 → 2.1.0

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 (123) hide show
  1. package/README.md +34 -1
  2. package/esm2020/aggdirect-coolmap.mjs +5 -0
  3. package/esm2020/lib/component/add-route/add-route.component.mjs +317 -0
  4. package/esm2020/lib/component/job-code/job-code.component.mjs +174 -0
  5. package/esm2020/lib/component/map/map.component.mjs +37 -0
  6. package/esm2020/lib/component/nav/layout/add-route-nav/add-route-nav.component.mjs +145 -0
  7. package/esm2020/lib/component/nav/layout/job-code-nav/job-code-nav.component.mjs +114 -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 +72 -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/estimation-display/estimation-display.component.mjs +19 -0
  15. package/esm2020/lib/component/shared/job-route-list/job-route-list.component.mjs +71 -0
  16. package/esm2020/lib/component/shared/jobcode-overview/jobcode-overview.component.mjs +19 -0
  17. package/esm2020/lib/component/shared/jobcode-status/jobcode-status.component.mjs +14 -0
  18. package/esm2020/lib/coolmap.module.mjs +182 -0
  19. package/esm2020/public-api.mjs +19 -0
  20. package/fesm2015/aggdirect-coolmap.mjs +1524 -0
  21. package/fesm2015/aggdirect-coolmap.mjs.map +1 -0
  22. package/fesm2020/aggdirect-coolmap.mjs +1490 -0
  23. package/fesm2020/aggdirect-coolmap.mjs.map +1 -0
  24. package/index.d.ts +5 -0
  25. package/lib/component/add-route/add-route.component.d.ts +61 -60
  26. package/lib/component/job-code/job-code.component.d.ts +40 -29
  27. package/lib/component/map/map.component.d.ts +15 -12
  28. package/lib/component/nav/layout/add-route-nav/add-route-nav.component.d.ts +49 -36
  29. package/lib/component/nav/layout/job-code-nav/job-code-nav.component.d.ts +42 -34
  30. package/lib/component/nav/nav.component.d.ts +31 -28
  31. package/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.d.ts +20 -16
  32. package/lib/component/route-jobcode-list/route-jobcode-list.component.d.ts +42 -39
  33. package/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.d.ts +9 -6
  34. package/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.d.ts +11 -8
  35. package/lib/component/shared/dialog/dialog.component.d.ts +13 -10
  36. package/lib/component/shared/estimation-display/estimation-display.component.d.ts +9 -6
  37. package/lib/component/shared/job-route-list/job-route-list.component.d.ts +26 -21
  38. package/lib/component/shared/jobcode-overview/jobcode-overview.component.d.ts +9 -6
  39. package/lib/component/shared/jobcode-status/jobcode-status.component.d.ts +8 -5
  40. package/lib/coolmap.module.d.ts +43 -2
  41. package/package.json +40 -15
  42. package/public-api.d.ts +15 -16
  43. package/bundles/coolmap.umd.js +0 -1383
  44. package/bundles/coolmap.umd.js.map +0 -1
  45. package/bundles/coolmap.umd.min.js +0 -2
  46. package/bundles/coolmap.umd.min.js.map +0 -1
  47. package/coolmap.d.ts +0 -5
  48. package/coolmap.metadata.json +0 -1
  49. package/esm2015/coolmap.js +0 -6
  50. package/esm2015/coolmap.ngsummary.json +0 -1
  51. package/esm2015/lib/component/add-route/add-route.component.js +0 -309
  52. package/esm2015/lib/component/add-route/add-route.component.ngfactory.js +0 -304
  53. package/esm2015/lib/component/add-route/add-route.component.ngsummary.json +0 -1
  54. package/esm2015/lib/component/job-code/job-code.component.js +0 -116
  55. package/esm2015/lib/component/job-code/job-code.component.ngfactory.js +0 -77
  56. package/esm2015/lib/component/job-code/job-code.component.ngsummary.json +0 -1
  57. package/esm2015/lib/component/map/map.component.js +0 -39
  58. package/esm2015/lib/component/map/map.component.ngfactory.js +0 -23
  59. package/esm2015/lib/component/map/map.component.ngsummary.json +0 -1
  60. package/esm2015/lib/component/nav/layout/add-route-nav/add-route-nav.component.js +0 -79
  61. package/esm2015/lib/component/nav/layout/add-route-nav/add-route-nav.component.ngfactory.js +0 -142
  62. package/esm2015/lib/component/nav/layout/add-route-nav/add-route-nav.component.ngsummary.json +0 -1
  63. package/esm2015/lib/component/nav/layout/job-code-nav/job-code-nav.component.js +0 -82
  64. package/esm2015/lib/component/nav/layout/job-code-nav/job-code-nav.component.ngfactory.js +0 -194
  65. package/esm2015/lib/component/nav/layout/job-code-nav/job-code-nav.component.ngsummary.json +0 -1
  66. package/esm2015/lib/component/nav/nav.component.js +0 -54
  67. package/esm2015/lib/component/nav/nav.component.ngfactory.js +0 -43
  68. package/esm2015/lib/component/nav/nav.component.ngsummary.json +0 -1
  69. package/esm2015/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.js +0 -66
  70. package/esm2015/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.ngfactory.js +0 -46
  71. package/esm2015/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.ngsummary.json +0 -1
  72. package/esm2015/lib/component/route-jobcode-list/route-jobcode-list.component.js +0 -301
  73. package/esm2015/lib/component/route-jobcode-list/route-jobcode-list.component.ngfactory.js +0 -99
  74. package/esm2015/lib/component/route-jobcode-list/route-jobcode-list.component.ngsummary.json +0 -1
  75. package/esm2015/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.js +0 -20
  76. package/esm2015/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.ngfactory.js +0 -21
  77. package/esm2015/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.ngsummary.json +0 -1
  78. package/esm2015/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.js +0 -30
  79. package/esm2015/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.ngfactory.js +0 -30
  80. package/esm2015/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.ngsummary.json +0 -1
  81. package/esm2015/lib/component/shared/dialog/dialog.component.js +0 -29
  82. package/esm2015/lib/component/shared/dialog/dialog.component.ngfactory.js +0 -24
  83. package/esm2015/lib/component/shared/dialog/dialog.component.ngsummary.json +0 -1
  84. package/esm2015/lib/component/shared/estimation-display/estimation-display.component.js +0 -20
  85. package/esm2015/lib/component/shared/estimation-display/estimation-display.component.ngfactory.js +0 -23
  86. package/esm2015/lib/component/shared/estimation-display/estimation-display.component.ngsummary.json +0 -1
  87. package/esm2015/lib/component/shared/job-route-list/job-route-list.component.js +0 -63
  88. package/esm2015/lib/component/shared/job-route-list/job-route-list.component.ngfactory.js +0 -134
  89. package/esm2015/lib/component/shared/job-route-list/job-route-list.component.ngsummary.json +0 -1
  90. package/esm2015/lib/component/shared/jobcode-overview/jobcode-overview.component.js +0 -20
  91. package/esm2015/lib/component/shared/jobcode-overview/jobcode-overview.component.ngfactory.js +0 -19
  92. package/esm2015/lib/component/shared/jobcode-overview/jobcode-overview.component.ngsummary.json +0 -1
  93. package/esm2015/lib/component/shared/jobcode-status/jobcode-status.component.js +0 -16
  94. package/esm2015/lib/component/shared/jobcode-status/jobcode-status.component.ngfactory.js +0 -17
  95. package/esm2015/lib/component/shared/jobcode-status/jobcode-status.component.ngsummary.json +0 -1
  96. package/esm2015/lib/coolmap.component.js +0 -18
  97. package/esm2015/lib/coolmap.component.ngfactory.js +0 -16
  98. package/esm2015/lib/coolmap.component.ngsummary.json +0 -1
  99. package/esm2015/lib/coolmap.module.js +0 -108
  100. package/esm2015/lib/coolmap.module.ngfactory.js +0 -46
  101. package/esm2015/lib/coolmap.module.ngsummary.json +0 -1
  102. package/esm2015/public-api.js +0 -20
  103. package/esm2015/public-api.ngsummary.json +0 -1
  104. package/fesm2015/coolmap.js +0 -1317
  105. package/fesm2015/coolmap.js.map +0 -1
  106. package/lib/component/add-route/add-route.component.ngfactory.d.ts +0 -1
  107. package/lib/component/job-code/job-code.component.ngfactory.d.ts +0 -1
  108. package/lib/component/map/map.component.ngfactory.d.ts +0 -1
  109. package/lib/component/nav/layout/add-route-nav/add-route-nav.component.ngfactory.d.ts +0 -1
  110. package/lib/component/nav/layout/job-code-nav/job-code-nav.component.ngfactory.d.ts +0 -1
  111. package/lib/component/nav/nav.component.ngfactory.d.ts +0 -1
  112. package/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.ngfactory.d.ts +0 -1
  113. package/lib/component/route-jobcode-list/route-jobcode-list.component.ngfactory.d.ts +0 -1
  114. package/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.ngfactory.d.ts +0 -1
  115. package/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.ngfactory.d.ts +0 -1
  116. package/lib/component/shared/dialog/dialog.component.ngfactory.d.ts +0 -1
  117. package/lib/component/shared/estimation-display/estimation-display.component.ngfactory.d.ts +0 -1
  118. package/lib/component/shared/job-route-list/job-route-list.component.ngfactory.d.ts +0 -1
  119. package/lib/component/shared/jobcode-overview/jobcode-overview.component.ngfactory.d.ts +0 -1
  120. package/lib/component/shared/jobcode-status/jobcode-status.component.ngfactory.d.ts +0 -1
  121. package/lib/coolmap.component.d.ts +0 -5
  122. package/lib/coolmap.component.ngfactory.d.ts +0 -1
  123. package/lib/coolmap.module.ngfactory.d.ts +0 -3
@@ -0,0 +1,1524 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ViewChild, EventEmitter, Output, Input, Inject, NgModule } from '@angular/core';
3
+ import { Subject, takeUntil, startWith, map, fromEvent, distinctUntilChanged, debounceTime } from 'rxjs';
4
+ import * as i1 from '@aggdirect/coolmap-services';
5
+ import { DriversmsCardKey, DriverSmsCardEnum, JobCodeOverviewData, JobCodeOverviewEnum, EstinationData, EstinationEnum } from '@aggdirect/coolmap-services';
6
+ import * as i2 from '@angular/common';
7
+ import { CommonModule } from '@angular/common';
8
+ import * as i3 from '@angular/material/progress-bar';
9
+ import { MatProgressBarModule } from '@angular/material/progress-bar';
10
+ import * as i3$1 from '@angular/material/tooltip';
11
+ import { MatTooltipModule } from '@angular/material/tooltip';
12
+ import * as i10 from '@angular/material/button';
13
+ import { MatButtonModule } from '@angular/material/button';
14
+ import { MatSidenavModule } from '@angular/material/sidenav';
15
+ import { MatSnackBarModule } from '@angular/material/snack-bar';
16
+ import * as i3$3 from '@angular/cdk/drag-drop';
17
+ import { DragDropModule } from '@angular/cdk/drag-drop';
18
+ import * as i3$2 from '@angular/forms';
19
+ import { FormControl, Validators, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
20
+ import * as i5 from '@angular/material/input';
21
+ import { MatInputModule } from '@angular/material/input';
22
+ import * as i8$2 from '@angular/material/select';
23
+ import { MatSelectModule } from '@angular/material/select';
24
+ import * as i7 from '@angular/material/icon';
25
+ import { MatIconModule } from '@angular/material/icon';
26
+ import * as i8$1 from '@angular/material/autocomplete';
27
+ import { MatAutocompleteModule } from '@angular/material/autocomplete';
28
+ import * as i4 from '@angular/material/form-field';
29
+ import { MatFormFieldModule } from '@angular/material/form-field';
30
+ import * as i7$1 from '@angular/material/progress-spinner';
31
+ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
32
+ import * as i9 from '@angular/material/chips';
33
+ import { MatChipsModule } from '@angular/material/chips';
34
+ import * as i1$1 from '@angular/material/dialog';
35
+ import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
36
+ import * as i6 from '@angular/material/core';
37
+ import { MatNativeDateModule, MatPseudoCheckboxModule } from '@angular/material/core';
38
+ import { SelectionModel } from '@angular/cdk/collections';
39
+ import * as i8 from 'ngx-perfect-scrollbar';
40
+ import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
41
+ import * as i10$1 from '@angular/material/datepicker';
42
+ import { MatDatepickerModule } from '@angular/material/datepicker';
43
+
44
+ class MapComponent {
45
+ constructor(coolmapService) {
46
+ this.coolmapService = coolmapService;
47
+ this.enableProgress = true;
48
+ this.destroyer$ = new Subject();
49
+ }
50
+ ngAfterViewInit() {
51
+ this.coolmapService.reintiatecoolmap.pipe(takeUntil(this.destroyer$)).subscribe((res) => {
52
+ this.enableProgress = true;
53
+ if (res) {
54
+ this.coolmapService.initiateMapForAddRoute(this.mapDiv.nativeElement).then((res) => {
55
+ this.enableProgress = false;
56
+ });
57
+ }
58
+ });
59
+ }
60
+ ngOnDestroy() {
61
+ this.destroyer$.next(true);
62
+ this.destroyer$.unsubscribe();
63
+ }
64
+ }
65
+ MapComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MapComponent, deps: [{ token: i1.CoolmapService }], target: i0.ɵɵFactoryTarget.Component });
66
+ MapComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: MapComponent, selector: "app-map", viewQueries: [{ propertyName: "mapDiv", first: true, predicate: ["map"], descendants: true, static: true }], ngImport: i0, template: "<div>\n <mat-progress-bar *ngIf=\"enableProgress\" mode=\"indeterminate\"></mat-progress-bar>\n <div #map class=\"coolmap\" style=\"height: 100vh;\"></div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }] });
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MapComponent, decorators: [{
68
+ type: Component,
69
+ args: [{ selector: 'app-map', template: "<div>\n <mat-progress-bar *ngIf=\"enableProgress\" mode=\"indeterminate\"></mat-progress-bar>\n <div #map class=\"coolmap\" style=\"height: 100vh;\"></div>\n</div>\n" }]
70
+ }], ctorParameters: function () { return [{ type: i1.CoolmapService }]; }, propDecorators: { mapDiv: [{
71
+ type: ViewChild,
72
+ args: ['map', { static: true }]
73
+ }] } });
74
+
75
+ class NavComponent {
76
+ constructor(utils, coolMap) {
77
+ this.utils = utils;
78
+ this.coolMap = coolMap;
79
+ this.drawer = new EventEmitter();
80
+ this.changeNav = new EventEmitter();
81
+ this.navValue = 'Jobcode';
82
+ this.isnavChange = true;
83
+ this.paddinForJobCode = { top: 0, bottom: 250, left: 500, right: 400 };
84
+ this.paddinForViewRoute = { top: 0, bottom: 400, left: 400, right: 0 };
85
+ this.destroyer$ = new Subject();
86
+ this.utils.navChangeObserve.pipe(takeUntil(this.destroyer$)).subscribe(res => { this.isnavChange = res; });
87
+ this.coolMap.setPadding(this.paddinForJobCode);
88
+ }
89
+ openDrawer() { this.drawer.emit(true); }
90
+ chnageNav(name) {
91
+ if (this.isnavChange) {
92
+ this.changeNav.emit(name);
93
+ this.navValue = name;
94
+ this.coolMap.clearBound();
95
+ if (name === 'Addroute') {
96
+ this.coolMap.setPadding(this.paddinForViewRoute);
97
+ }
98
+ else {
99
+ this.coolMap.setPadding(this.paddinForJobCode);
100
+ }
101
+ this.utils.clearOptions();
102
+ }
103
+ }
104
+ ngOnDestroy() {
105
+ this.destroyer$.next(true);
106
+ this.destroyer$.unsubscribe();
107
+ }
108
+ }
109
+ NavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NavComponent, deps: [{ token: i1.UtilsService }, { token: i1.CoolmapService }], target: i0.ɵɵFactoryTarget.Component });
110
+ NavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NavComponent, selector: "app-nav", outputs: { drawer: "drawer", changeNav: "changeNav" }, ngImport: i0, template: "<div class=\"nav\">\n <button (click)=\"openDrawer()\" class=\"toggle\">\n <img src=\"assets/images/toggle.svg\" alt=\"\" />\n </button>\n\n <ul class=\"m-100\">\n <li [ngClass]=\"{'active': navValue === 'Jobcode'}\">\n <a mat-raised-button #tooltip=\"matTooltip\" matTooltip=\"Job Code\" aria-label=\"Job-code\" (click)=\"chnageNav('Jobcode')\">\n <img src=\"assets/images/job-code.svg\" alt=\"\" />\n </a>\n </li>\n\n <li [ngClass]=\"{'active': navValue === 'Addroute', 'disabled': !isnavChange }\">\n <a mat-raised-button #tooltip=\"matTooltip\" matTooltip=\"View Route\" aria-label=\"View-route\" (click)=\"chnageNav('Addroute')\">\n <img src=\"assets/images/route.svg\" alt=\"\" />\n </a>\n </li>\n </ul>\n</div>\n", styles: [".nav{background:#e8e8e8;height:100vh;padding:15px 0;display:flex;align-items:center;flex-direction:column}.nav button{background:white;border-radius:15px;padding:5px 6px}.nav button img{width:28px}.nav ul{display:flex;flex-direction:column;align-items:center}.nav ul li{margin:10px 0;padding:0 5px;border-right:2px solid #e8e8e8}.nav ul li:hover{border-right:2px solid #326ad3;padding:0 5px}.nav ul li.disabled a{pointer-events:none;opacity:.5}.nav ul li.disabled:hover{border-right:2px solid #e8e8e8}.nav ul li a{padding:6px 0;display:block;border-radius:15px;min-width:42px;box-shadow:none;line-height:30px}.nav ul li a img{width:27px}.nav ul li a:hover{background:white}.nav ul li a:hover img{filter:invert(.2) sepia(1) saturate(8) hue-rotate(180deg)}.nav ul li.active{border-right:2px solid #326ad3}.nav ul li.active a{background:white}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i10.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }] });
111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NavComponent, decorators: [{
112
+ type: Component,
113
+ args: [{ selector: 'app-nav', template: "<div class=\"nav\">\n <button (click)=\"openDrawer()\" class=\"toggle\">\n <img src=\"assets/images/toggle.svg\" alt=\"\" />\n </button>\n\n <ul class=\"m-100\">\n <li [ngClass]=\"{'active': navValue === 'Jobcode'}\">\n <a mat-raised-button #tooltip=\"matTooltip\" matTooltip=\"Job Code\" aria-label=\"Job-code\" (click)=\"chnageNav('Jobcode')\">\n <img src=\"assets/images/job-code.svg\" alt=\"\" />\n </a>\n </li>\n\n <li [ngClass]=\"{'active': navValue === 'Addroute', 'disabled': !isnavChange }\">\n <a mat-raised-button #tooltip=\"matTooltip\" matTooltip=\"View Route\" aria-label=\"View-route\" (click)=\"chnageNav('Addroute')\">\n <img src=\"assets/images/route.svg\" alt=\"\" />\n </a>\n </li>\n </ul>\n</div>\n", styles: [".nav{background:#e8e8e8;height:100vh;padding:15px 0;display:flex;align-items:center;flex-direction:column}.nav button{background:white;border-radius:15px;padding:5px 6px}.nav button img{width:28px}.nav ul{display:flex;flex-direction:column;align-items:center}.nav ul li{margin:10px 0;padding:0 5px;border-right:2px solid #e8e8e8}.nav ul li:hover{border-right:2px solid #326ad3;padding:0 5px}.nav ul li.disabled a{pointer-events:none;opacity:.5}.nav ul li.disabled:hover{border-right:2px solid #e8e8e8}.nav ul li a{padding:6px 0;display:block;border-radius:15px;min-width:42px;box-shadow:none;line-height:30px}.nav ul li a img{width:27px}.nav ul li a:hover{background:white}.nav ul li a:hover img{filter:invert(.2) sepia(1) saturate(8) hue-rotate(180deg)}.nav ul li.active{border-right:2px solid #326ad3}.nav ul li.active a{background:white}\n"] }]
114
+ }], ctorParameters: function () { return [{ type: i1.UtilsService }, { type: i1.CoolmapService }]; }, propDecorators: { drawer: [{
115
+ type: Output
116
+ }], changeNav: [{
117
+ type: Output
118
+ }] } });
119
+
120
+ class ViewRouteListCardComponent {
121
+ constructor(utils) {
122
+ this.utils = utils;
123
+ }
124
+ detailsDict(event, route) {
125
+ if (event === 'click')
126
+ this.utils.setdictValue('route-detailsv2', JSON.stringify(route));
127
+ route['type'] = 'editroute';
128
+ route['prevent'] = true;
129
+ this.emitrouteevent.emit(route);
130
+ this.utils.routeDetailsUtility.next({ event, route });
131
+ }
132
+ }
133
+ ViewRouteListCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ViewRouteListCardComponent, deps: [{ token: i1.UtilsService }], target: i0.ɵɵFactoryTarget.Component });
134
+ ViewRouteListCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ViewRouteListCardComponent, selector: "app-view-route-list-card", inputs: { route: "route", emitrouteevent: "emitrouteevent" }, ngImport: i0, template: "<div class=\"routebox\">\n <span>\n <mat-icon>directions</mat-icon>\n <h2 [ngClass]=\"{'routeheading': route['route_name']}\">\n {{route['route_name']}}\n </h2>\n </span>\n <h3>{{route['customer_name']}} | {{route['material']}}</h3>\n\n <div class=\"pickdropprt\">\n <div class=\"pickprt\">\n <b>\n <h4>{{route['pickup_location']}}</h4>\n </b>\n </div>\n <div class=\"dropprt\">\n <b>\n <h4>{{route['delivery_location']}}</h4>\n </b>\n </div>\n </div>\n <div class=\"infoicon\" (click)=\"detailsDict('click', route)\" (mouseover)=\"detailsDict(true, route)\"\n (mouseleave)=\"detailsDict(false, route)\">\n <img src=\"assets/images/info_icon.png\" [alt]=\"\" />\n </div>\n <div class=\"status routestatus\" [ngClass]=\"route['unit']\">{{route['unit']}}</div>\n</div>\n\n", styles: [".routebox span{display:flex;align-items:center}.routebox span h2{margin-left:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:180px;margin-bottom:5px;margin-top:5px;font-size:.95rem}.routebox h3{font-size:.85rem;color:#767676;font-weight:400;margin-top:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:325px;margin-bottom:10px}.routebox .pickdropprt{font-size:.8125rem}.routebox .pickdropprt .pickprt{position:relative;display:flex;align-items:center;padding-bottom:6px}.routebox .pickdropprt .pickprt span{padding-left:0;padding-right:20px;display:block}.routebox .pickdropprt .pickprt b{position:relative;font-weight:400}.routebox .pickdropprt .pickprt b:after{background:black;width:1px;height:100%;left:3px;content:\"\";position:absolute;top:10px}.routebox .pickdropprt .pickprt h4{position:relative;padding-left:15px;margin:0;line-height:18px;font-weight:400;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;max-width:215px}@media (min-width: 1600px){.routebox .pickdropprt .pickprt h4{max-width:265px}}.routebox .pickdropprt .pickprt h4:before{background:black;top:4px;left:0;position:absolute;content:\"\";width:7px;height:7px;border-radius:100%}.routebox .pickdropprt .dropprt{position:relative;padding-bottom:10px;display:flex;align-items:center}.routebox .pickdropprt .dropprt span{padding-left:0;padding-right:20px;display:block}.routebox .pickdropprt .dropprt b{position:relative;font-weight:400}.routebox .pickdropprt .dropprt b:after{background:black;width:1px;height:12px;left:3px;content:\"\";position:absolute;top:-7px}.routebox .pickdropprt .dropprt h4{position:relative;padding-left:15px;margin:0;line-height:18px;font-weight:400;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;max-width:215px}.routebox .pickdropprt .dropprt h4:before{background:black;top:4px;left:0;position:absolute;content:\"\";width:7px;height:7px;border-radius:100%}.routebox .infoicon{position:absolute;right:10px;bottom:10px}.routebox .infoicon img{width:20px;height:20px}.routebox .status{position:absolute;border-radius:30px;top:12px;right:40px;font-size:0;color:#fff;text-transform:capitalize;font-weight:500;padding:3px 10px}.routebox .status.routestatus{right:10px;width:20px;height:20px;text-align:center;line-height:20px;padding:0 0 0 1px}.routebox .status.routestatus:first-letter{font-size:.8rem}@media (min-width: 1600px){.routebox .status.routestatus{padding:0;line-height:22px}}.routebox .status.Ton{background:#ff7272}.routebox .status.Load{background:#a3c52e}.routebox .status.Hourly{background:#ae23d1}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ViewRouteListCardComponent, decorators: [{
136
+ type: Component,
137
+ args: [{ selector: 'app-view-route-list-card', template: "<div class=\"routebox\">\n <span>\n <mat-icon>directions</mat-icon>\n <h2 [ngClass]=\"{'routeheading': route['route_name']}\">\n {{route['route_name']}}\n </h2>\n </span>\n <h3>{{route['customer_name']}} | {{route['material']}}</h3>\n\n <div class=\"pickdropprt\">\n <div class=\"pickprt\">\n <b>\n <h4>{{route['pickup_location']}}</h4>\n </b>\n </div>\n <div class=\"dropprt\">\n <b>\n <h4>{{route['delivery_location']}}</h4>\n </b>\n </div>\n </div>\n <div class=\"infoicon\" (click)=\"detailsDict('click', route)\" (mouseover)=\"detailsDict(true, route)\"\n (mouseleave)=\"detailsDict(false, route)\">\n <img src=\"assets/images/info_icon.png\" [alt]=\"\" />\n </div>\n <div class=\"status routestatus\" [ngClass]=\"route['unit']\">{{route['unit']}}</div>\n</div>\n\n", styles: [".routebox span{display:flex;align-items:center}.routebox span h2{margin-left:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:180px;margin-bottom:5px;margin-top:5px;font-size:.95rem}.routebox h3{font-size:.85rem;color:#767676;font-weight:400;margin-top:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:325px;margin-bottom:10px}.routebox .pickdropprt{font-size:.8125rem}.routebox .pickdropprt .pickprt{position:relative;display:flex;align-items:center;padding-bottom:6px}.routebox .pickdropprt .pickprt span{padding-left:0;padding-right:20px;display:block}.routebox .pickdropprt .pickprt b{position:relative;font-weight:400}.routebox .pickdropprt .pickprt b:after{background:black;width:1px;height:100%;left:3px;content:\"\";position:absolute;top:10px}.routebox .pickdropprt .pickprt h4{position:relative;padding-left:15px;margin:0;line-height:18px;font-weight:400;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;max-width:215px}@media (min-width: 1600px){.routebox .pickdropprt .pickprt h4{max-width:265px}}.routebox .pickdropprt .pickprt h4:before{background:black;top:4px;left:0;position:absolute;content:\"\";width:7px;height:7px;border-radius:100%}.routebox .pickdropprt .dropprt{position:relative;padding-bottom:10px;display:flex;align-items:center}.routebox .pickdropprt .dropprt span{padding-left:0;padding-right:20px;display:block}.routebox .pickdropprt .dropprt b{position:relative;font-weight:400}.routebox .pickdropprt .dropprt b:after{background:black;width:1px;height:12px;left:3px;content:\"\";position:absolute;top:-7px}.routebox .pickdropprt .dropprt h4{position:relative;padding-left:15px;margin:0;line-height:18px;font-weight:400;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;max-width:215px}.routebox .pickdropprt .dropprt h4:before{background:black;top:4px;left:0;position:absolute;content:\"\";width:7px;height:7px;border-radius:100%}.routebox .infoicon{position:absolute;right:10px;bottom:10px}.routebox .infoicon img{width:20px;height:20px}.routebox .status{position:absolute;border-radius:30px;top:12px;right:40px;font-size:0;color:#fff;text-transform:capitalize;font-weight:500;padding:3px 10px}.routebox .status.routestatus{right:10px;width:20px;height:20px;text-align:center;line-height:20px;padding:0 0 0 1px}.routebox .status.routestatus:first-letter{font-size:.8rem}@media (min-width: 1600px){.routebox .status.routestatus{padding:0;line-height:22px}}.routebox .status.Ton{background:#ff7272}.routebox .status.Load{background:#a3c52e}.routebox .status.Hourly{background:#ae23d1}\n"] }]
138
+ }], ctorParameters: function () { return [{ type: i1.UtilsService }]; }, propDecorators: { route: [{
139
+ type: Input
140
+ }], emitrouteevent: [{
141
+ type: Input
142
+ }] } });
143
+
144
+ class SmsCardDetailsOverviewComponent {
145
+ constructor() {
146
+ this.label = DriversmsCardKey;
147
+ this.overViewEnum = DriverSmsCardEnum;
148
+ }
149
+ }
150
+ SmsCardDetailsOverviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmsCardDetailsOverviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
151
+ SmsCardDetailsOverviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SmsCardDetailsOverviewComponent, selector: "app-sms-card-details-overview", inputs: { jobValue: "jobValue" }, ngImport: i0, template: "<ng-container *ngFor=\"let item of label\">\n <span>\n <label>{{overViewEnum[item]}}</label>\n <ng-container *ngIf=\"item !== 'values'\">{{jobValue[item] ? jobValue[item] : 'N/A'}}</ng-container>\n <ng-container *ngIf=\"item === 'values'\">{{jobValue[item]['Done'] + jobValue[item]['Ongoing'] + jobValue[item]['Open']}}</ng-container>\n </span>\n</ng-container>\n", styles: ["span{display:flex;margin-bottom:12px;font-size:.8rem;align-items:center}span label{font-weight:600;width:37%}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
152
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmsCardDetailsOverviewComponent, decorators: [{
153
+ type: Component,
154
+ args: [{ selector: 'app-sms-card-details-overview', template: "<ng-container *ngFor=\"let item of label\">\n <span>\n <label>{{overViewEnum[item]}}</label>\n <ng-container *ngIf=\"item !== 'values'\">{{jobValue[item] ? jobValue[item] : 'N/A'}}</ng-container>\n <ng-container *ngIf=\"item === 'values'\">{{jobValue[item]['Done'] + jobValue[item]['Ongoing'] + jobValue[item]['Open']}}</ng-container>\n </span>\n</ng-container>\n", styles: ["span{display:flex;margin-bottom:12px;font-size:.8rem;align-items:center}span label{font-weight:600;width:37%}\n"] }]
155
+ }], ctorParameters: function () { return []; }, propDecorators: { jobValue: [{
156
+ type: Input
157
+ }] } });
158
+
159
+ class JobCodeListCardComponent {
160
+ constructor(utils, config) {
161
+ this.utils = utils;
162
+ this.config = config;
163
+ this.routeSeletion = new EventEmitter();
164
+ this.toggleDrivermenu = new EventEmitter();
165
+ }
166
+ selectRoute(route) { this.routeSeletion.emit(route); }
167
+ toggleDriverlist(mouseevntType, route, isHoverOut) {
168
+ const data = { mouseevntType, route, isHoverOut };
169
+ this.toggleDrivermenu.emit(data);
170
+ if (mouseevntType === 'click')
171
+ this.utils.setdictValue('driver-details', JSON.stringify(this.route));
172
+ }
173
+ toggleJobCodeDetails(mouseEventType, route) {
174
+ if (mouseEventType) {
175
+ route['type'] = 'jobcode';
176
+ this.emitJobdetails.emitroute.emit(route);
177
+ }
178
+ else if (!mouseEventType && this.preventCloseDetails) {
179
+ route = this.utils.getdictValue('route-details');
180
+ route['type'] = 'jobcode';
181
+ this.emitJobdetails.emitroute.emit(route);
182
+ }
183
+ else if (!mouseEventType && !this.preventCloseDetails)
184
+ this.emitJobdetails.clearJobDetailsFromList.emit(true);
185
+ }
186
+ calculateStatusPercentage(type, route) {
187
+ const total = route['Done'] + route['Ongoing'] + route['Open'];
188
+ if (type === 'done') {
189
+ return Math.round((100 * route['Done']) / total);
190
+ }
191
+ else if (type === 'ongoing') {
192
+ return Math.round((100 * route['Ongoing']) / total);
193
+ }
194
+ else if (type === 'open') {
195
+ return Math.round((100 * route['Open']) / total);
196
+ }
197
+ else {
198
+ return null;
199
+ }
200
+ }
201
+ setRouteItem() {
202
+ this.utils.preVentJobdetailclose.next(true);
203
+ this.utils.setdictValue('route-details', JSON.stringify(this.route));
204
+ }
205
+ }
206
+ JobCodeListCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: JobCodeListCardComponent, deps: [{ token: i1.UtilsService }, { token: 'memberData' }], target: i0.ɵɵFactoryTarget.Component });
207
+ JobCodeListCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: JobCodeListCardComponent, selector: "app-job-code-list-card", inputs: { route: "route", emitJobdetails: "emitJobdetails", preventCloseDetails: "preventCloseDetails" }, outputs: { routeSeletion: "routeSeletion", toggleDrivermenu: "toggleDrivermenu" }, ngImport: i0, template: "<div class=\"innerbox\">\n <div class=\"inputarea\">\n <input type=\"checkbox\" name=\"selectroute\" [checked]=\"route['isSelected']\" (change)=\"$event ? selectRoute(route) : null\" />\n <label>&nbsp;</label>\n <div class=\"border\"></div>\n </div>\n <div class=\"job_intro\">\n <div class=\"heading\">\n <h2>\n {{route['order_number'] ? route['order_number'] : ''}}\n </h2>\n |\n <span>\n {{route['customer_name']}}\n </span>\n |\n <span>\n {{route['project']}}\n </span>\n </div>\n <div class=\"destinationprt\">\n <span style=\"padding-left: 0;\">\n {{route['pickup_location']}}\n </span>\n <b>></b>\n <span>\n {{route['delivery_location']}}\n </span>\n </div>\n <div class=\"mat_cat\">\n <span>\n {{route['material']}}\n </span>\n </div>\n\n <div class=\"statusbar\">\n <div class=\"status_percent\">\n <span class=\"done\" [style]=\"'width:'+calculateStatusPercentage('done',route['values'])+'%'\"></span>\n <span class=\"ongoing\" [style]=\"'width:'+calculateStatusPercentage('ongoing', route['values'])+'%'\"> </span>\n <span class=\"open\" [style]=\"'width:'+calculateStatusPercentage('open', route['values'])+'%'\"> </span>\n </div>\n </div>\n </div>\n <div class=\"statusarea\">\n <div class=\"statusunit\" [ngClass]=\"route['unit']\">{{route['unit']}}</div>\n <div class=\"driver_icon\" *ngIf=\"config.repository !== 'customer'\" (mouseover)=\"toggleDriverlist(true, route)\" (mouseout)=\"toggleDriverlist(false, route, true)\"\n mat-raised-button #tooltip=\"matTooltip\" matTooltip=\"Click on icon to show the driver list\" matTooltipPosition=\"above\"\n (click)=\"toggleDriverlist('click', route)\">\n <img src=\"assets/images/driver_icon.png\" [alt]=\"\" />\n </div>\n <div class=\"infoicon\" (click)=\"setRouteItem()\" (mouseover)=\"toggleJobCodeDetails(true, route)\"\n (mouseout)=\"toggleJobCodeDetails(false, route)\">\n <img src=\"assets/images/info_icon.png\" [alt]=\"\" />\n </div>\n </div>\n</div>\n", styles: [".innerbox{display:flex;justify-content:space-between}.innerbox .inputarea{display:flex;align-items:center;width:6%}.innerbox .inputarea input[type=checkbox]{width:100%;height:100%;margin-right:10px;opacity:0;position:absolute;left:0;margin-left:0;top:0;z-index:3;cursor:pointer}.innerbox .inputarea input[type=checkbox]:checked+label{background:url(../../../../../assets/images/fill-radio.png) 10px 11px no-repeat}.innerbox .inputarea label{background:url(../../../../../assets/images/blank-radio.png) 10px 11px no-repeat;width:100%;position:relative;z-index:2;font-size:12px;color:#878787;height:100%;position:absolute;top:0;left:0}.innerbox .inputarea .border{position:absolute;width:100%;height:100%;left:0;right:0;top:-1px;border-radius:15px}.innerbox .inputarea input:checked~.border{border-left:3px solid #39c471;border-right:1px solid #39c471;border-top:1px solid #39c471;border-bottom:1px solid #39c471}.innerbox .inputarea h2{margin-left:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:214px;padding-left:16px;margin-bottom:5px;margin-top:0}.innerbox .job_intro{width:80%}.innerbox .job_intro .heading{display:flex;font-size:.8rem}.innerbox .job_intro .heading h2{margin:0 4px 0 0;font-size:.8rem}.innerbox .job_intro .heading span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100px;padding:0 3px;display:block}.innerbox .job_intro .destinationprt{display:flex;margin-top:10px;font-size:.8rem}.innerbox .job_intro .destinationprt span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:132px;padding:0 5px;display:block}.innerbox .job_intro .mat_cat{margin-top:10px;font-size:.8rem}.innerbox .job_intro .statusbar{width:100%;position:relative;height:5px;margin-top:10px}.innerbox .job_intro .statusbar .status_percent{position:absolute;left:0;display:flex;width:100%;height:100%}.innerbox .job_intro .statusbar .status_percent span{display:block}.innerbox .job_intro .statusbar .status_percent .done{background:#008000}.innerbox .job_intro .statusbar .status_percent .ongoing{background:#ffcc00}.innerbox .job_intro .statusbar .status_percent .open{background:#bfbfbf}.innerbox .statusarea{display:flex;flex-direction:column;align-items:center;width:10%}.innerbox .statusarea .statusunit{border-radius:30px;font-size:0;color:#fff;text-transform:capitalize;font-weight:500;width:20px;height:20px;text-align:center;line-height:20px}.innerbox .statusarea .statusunit:first-letter{font-size:.8rem}.innerbox .statusarea .statusunit.routestatus{right:10px}.innerbox .statusarea .statusunit.Ton{background:#39c471}.innerbox .statusarea .statusunit.Load{background:#326ad3}.innerbox .statusarea .statusunit.Hourly{background:#ffad56}.innerbox .statusarea .driver_icon,.innerbox .statusarea .infoicon{z-index:9999}.innerbox .statusarea .driver_icon img,.innerbox .statusarea .infoicon img{width:20px;height:20px}.innerbox .statusarea .driver_icon{margin:5px 0}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: JobCodeListCardComponent, decorators: [{
209
+ type: Component,
210
+ args: [{ selector: 'app-job-code-list-card', template: "<div class=\"innerbox\">\n <div class=\"inputarea\">\n <input type=\"checkbox\" name=\"selectroute\" [checked]=\"route['isSelected']\" (change)=\"$event ? selectRoute(route) : null\" />\n <label>&nbsp;</label>\n <div class=\"border\"></div>\n </div>\n <div class=\"job_intro\">\n <div class=\"heading\">\n <h2>\n {{route['order_number'] ? route['order_number'] : ''}}\n </h2>\n |\n <span>\n {{route['customer_name']}}\n </span>\n |\n <span>\n {{route['project']}}\n </span>\n </div>\n <div class=\"destinationprt\">\n <span style=\"padding-left: 0;\">\n {{route['pickup_location']}}\n </span>\n <b>></b>\n <span>\n {{route['delivery_location']}}\n </span>\n </div>\n <div class=\"mat_cat\">\n <span>\n {{route['material']}}\n </span>\n </div>\n\n <div class=\"statusbar\">\n <div class=\"status_percent\">\n <span class=\"done\" [style]=\"'width:'+calculateStatusPercentage('done',route['values'])+'%'\"></span>\n <span class=\"ongoing\" [style]=\"'width:'+calculateStatusPercentage('ongoing', route['values'])+'%'\"> </span>\n <span class=\"open\" [style]=\"'width:'+calculateStatusPercentage('open', route['values'])+'%'\"> </span>\n </div>\n </div>\n </div>\n <div class=\"statusarea\">\n <div class=\"statusunit\" [ngClass]=\"route['unit']\">{{route['unit']}}</div>\n <div class=\"driver_icon\" *ngIf=\"config.repository !== 'customer'\" (mouseover)=\"toggleDriverlist(true, route)\" (mouseout)=\"toggleDriverlist(false, route, true)\"\n mat-raised-button #tooltip=\"matTooltip\" matTooltip=\"Click on icon to show the driver list\" matTooltipPosition=\"above\"\n (click)=\"toggleDriverlist('click', route)\">\n <img src=\"assets/images/driver_icon.png\" [alt]=\"\" />\n </div>\n <div class=\"infoicon\" (click)=\"setRouteItem()\" (mouseover)=\"toggleJobCodeDetails(true, route)\"\n (mouseout)=\"toggleJobCodeDetails(false, route)\">\n <img src=\"assets/images/info_icon.png\" [alt]=\"\" />\n </div>\n </div>\n</div>\n", styles: [".innerbox{display:flex;justify-content:space-between}.innerbox .inputarea{display:flex;align-items:center;width:6%}.innerbox .inputarea input[type=checkbox]{width:100%;height:100%;margin-right:10px;opacity:0;position:absolute;left:0;margin-left:0;top:0;z-index:3;cursor:pointer}.innerbox .inputarea input[type=checkbox]:checked+label{background:url(../../../../../assets/images/fill-radio.png) 10px 11px no-repeat}.innerbox .inputarea label{background:url(../../../../../assets/images/blank-radio.png) 10px 11px no-repeat;width:100%;position:relative;z-index:2;font-size:12px;color:#878787;height:100%;position:absolute;top:0;left:0}.innerbox .inputarea .border{position:absolute;width:100%;height:100%;left:0;right:0;top:-1px;border-radius:15px}.innerbox .inputarea input:checked~.border{border-left:3px solid #39c471;border-right:1px solid #39c471;border-top:1px solid #39c471;border-bottom:1px solid #39c471}.innerbox .inputarea h2{margin-left:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:214px;padding-left:16px;margin-bottom:5px;margin-top:0}.innerbox .job_intro{width:80%}.innerbox .job_intro .heading{display:flex;font-size:.8rem}.innerbox .job_intro .heading h2{margin:0 4px 0 0;font-size:.8rem}.innerbox .job_intro .heading span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100px;padding:0 3px;display:block}.innerbox .job_intro .destinationprt{display:flex;margin-top:10px;font-size:.8rem}.innerbox .job_intro .destinationprt span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:132px;padding:0 5px;display:block}.innerbox .job_intro .mat_cat{margin-top:10px;font-size:.8rem}.innerbox .job_intro .statusbar{width:100%;position:relative;height:5px;margin-top:10px}.innerbox .job_intro .statusbar .status_percent{position:absolute;left:0;display:flex;width:100%;height:100%}.innerbox .job_intro .statusbar .status_percent span{display:block}.innerbox .job_intro .statusbar .status_percent .done{background:#008000}.innerbox .job_intro .statusbar .status_percent .ongoing{background:#ffcc00}.innerbox .job_intro .statusbar .status_percent .open{background:#bfbfbf}.innerbox .statusarea{display:flex;flex-direction:column;align-items:center;width:10%}.innerbox .statusarea .statusunit{border-radius:30px;font-size:0;color:#fff;text-transform:capitalize;font-weight:500;width:20px;height:20px;text-align:center;line-height:20px}.innerbox .statusarea .statusunit:first-letter{font-size:.8rem}.innerbox .statusarea .statusunit.routestatus{right:10px}.innerbox .statusarea .statusunit.Ton{background:#39c471}.innerbox .statusarea .statusunit.Load{background:#326ad3}.innerbox .statusarea .statusunit.Hourly{background:#ffad56}.innerbox .statusarea .driver_icon,.innerbox .statusarea .infoicon{z-index:9999}.innerbox .statusarea .driver_icon img,.innerbox .statusarea .infoicon img{width:20px;height:20px}.innerbox .statusarea .driver_icon{margin:5px 0}\n"] }]
211
+ }], ctorParameters: function () {
212
+ return [{ type: i1.UtilsService }, { type: i1.CoolmapConfigModel, decorators: [{
213
+ type: Inject,
214
+ args: ['memberData']
215
+ }] }];
216
+ }, propDecorators: { route: [{
217
+ type: Input
218
+ }], routeSeletion: [{
219
+ type: Output
220
+ }], toggleDrivermenu: [{
221
+ type: Output
222
+ }], emitJobdetails: [{
223
+ type: Input
224
+ }], preventCloseDetails: [{
225
+ type: Input
226
+ }] } });
227
+
228
+ class RouteJobCodeListComponent {
229
+ constructor(coolMap, utils) {
230
+ this.coolMap = coolMap;
231
+ this.utils = utils;
232
+ this.loader = true;
233
+ this.type = '';
234
+ this.data = [];
235
+ this.currentNav = '';
236
+ this.emitroute = new EventEmitter();
237
+ this.showAllRoute = new EventEmitter();
238
+ this.preventMouseout = false;
239
+ this.filterList = this.data;
240
+ this.isDriverList = false;
241
+ this.selectedRoute = new SelectionModel(true, []);
242
+ this.preventListSelect = false;
243
+ this.clearJobDetailsFromList = new EventEmitter();
244
+ this.preventDetailsClose = false;
245
+ this.messageLoader = false;
246
+ this.driverMessage = new FormControl('', [Validators.maxLength(256)]);
247
+ this.isSmsList = false;
248
+ this.driverList = [];
249
+ }
250
+ ngOnInit() {
251
+ this.utils.getpreVentJobdetailclose.subscribe(res => { this.preventDetailsClose = res; });
252
+ this.utils.removeMapEntityUtility.subscribe((res) => { this.passRoute(res); });
253
+ }
254
+ passRoute(job) {
255
+ this.data.forEach((each) => {
256
+ if (each['route_id'] !== job['route_id']) {
257
+ each['isActive'] = false;
258
+ }
259
+ else {
260
+ each['isActive'] = true;
261
+ }
262
+ });
263
+ if (this.type == 'addroute')
264
+ this.filterList.forEach(ele => this.coolMap.filterRoute(ele['route_id'], 'none'));
265
+ }
266
+ selectRoute(route) {
267
+ if (!this.preventListSelect) {
268
+ this.preventListSelect = true;
269
+ this.selectedRoute.toggle(route);
270
+ this.clearJobDetailsFromList.emit(true);
271
+ this.utils.preVentJobdetailclose.next(false);
272
+ this.filterList.forEach(ele => this.coolMap.filterRoute(ele['job_id'], 'none'));
273
+ this.clearList();
274
+ this.selectedRoute.selected.forEach((ele, index) => {
275
+ this.coolMap.filterRoute(ele['job_id'], 'visible', ((this.selectedRoute.selected.length - 1) === index)).then(() => {
276
+ this.preventListSelect = false;
277
+ });
278
+ });
279
+ if (!this.selectedRoute.selected.length) {
280
+ this.preventListSelect = false;
281
+ this.data.forEach(ele => this.coolMap.filterRoute(ele['job_id'], 'visible'));
282
+ }
283
+ ;
284
+ }
285
+ }
286
+ checkroutes(route) {
287
+ const selectedRoute = this.selectedRoute.selected;
288
+ this.filterList = this.filterList.map(ele => { ele['isSelected'] = false; return ele; });
289
+ if (selectedRoute.length > 0) {
290
+ selectedRoute.forEach(ele => {
291
+ if (route['order_number'] === ele['order_number']) {
292
+ ele['isSelected'] = true;
293
+ }
294
+ });
295
+ }
296
+ return route;
297
+ }
298
+ ngOnChanges(changes) {
299
+ setTimeout(() => {
300
+ if (this.currentNav === 'Addroute' && (this.data.length < this.filterList.length)) {
301
+ const index = this.filterList.findIndex(ele => ele.isActive);
302
+ if (index > 0)
303
+ this.filterList[index].isActive = false;
304
+ this.data.forEach((ele, indexForData) => {
305
+ const id = (ele['job_id'] ? ele['job_id'] : ele['route_id']);
306
+ this.coolMap.plotRoute(ele, id, this.type, false, (indexForData === (this.data.length - 1))).then((res) => {
307
+ });
308
+ });
309
+ }
310
+ }, 500);
311
+ if (changes['data'] && changes['data']['currentValue']) {
312
+ this.filterList = changes['data']['currentValue'];
313
+ if (this.searchTerm) {
314
+ if (this.searchTerm.length > 0) {
315
+ this.data = this.utils.getSearchResults(changes['data']['currentValue'], this.searchTerm);
316
+ this.filterList = this.data;
317
+ }
318
+ else {
319
+ this.filterList = changes['data']['currentValue'];
320
+ }
321
+ }
322
+ if (this.type === 'jobcode') {
323
+ this.loader = true;
324
+ this.clearList();
325
+ if (this.filterList.length === 0)
326
+ this.loader = false;
327
+ }
328
+ if (this.type !== 'jobcode') {
329
+ if (changes['data']['previousValue'] && this.currentNav === 'addForm') {
330
+ const activeRoute = changes['data']['previousValue'].find((ele) => ele.isActive);
331
+ if (activeRoute) {
332
+ this.filterList.map((item) => {
333
+ if (item.route_id === activeRoute.route_id) {
334
+ item.isActive = true;
335
+ }
336
+ });
337
+ }
338
+ }
339
+ }
340
+ if (changes['data']['previousValue'] && this.currentNav !== 'addForm') {
341
+ this.coolMap.removeJobFromMap(changes['data']['previousValue']);
342
+ this.selectedRoute.clear();
343
+ }
344
+ ;
345
+ if (this.currentNav !== 'addForm') {
346
+ changes['data']['currentValue'].forEach((ele, indexForData) => {
347
+ const id = (ele['job_id'] ? ele['job_id'] : ele['route_id']);
348
+ this.coolMap.plotRoute(ele, id, this.type, false, (indexForData === (this.data.length - 1))).then((res) => {
349
+ if (indexForData === (this.data.length - 1)) {
350
+ this.loader = false;
351
+ this.utils.preventnavChange.next(true);
352
+ }
353
+ });
354
+ });
355
+ }
356
+ }
357
+ if (changes['searchTerm']) {
358
+ if (this.filterList) {
359
+ this.data = this.filterList;
360
+ this.clearList();
361
+ if (changes['searchTerm']['currentValue'].length > 0) {
362
+ this.coolMap.removeRouteAndMarker(1);
363
+ this.data = this.utils.getSearchResults(this.data, changes['searchTerm']['currentValue']);
364
+ }
365
+ else {
366
+ this.data = this.filterList;
367
+ }
368
+ setTimeout(() => {
369
+ this.coolMap.clearBoundWithCordinates();
370
+ if (this.currentNav !== 'addForm' && !this.selectedRoute['selected'].length) {
371
+ this.coolMap.removeRouteAndMarker(1);
372
+ this.toggleFilterRoute(this.filterList);
373
+ }
374
+ }, 500);
375
+ if (this.currentNav !== 'addForm' && this.selectedRoute['selected'].length) {
376
+ if (this.data && this.data.length > 0) {
377
+ this.clearList();
378
+ this.clearJobDetailsFromList.emit(true);
379
+ this.coolMap.removeJobFromMap(this.selectedRoute.selected);
380
+ setTimeout(() => {
381
+ this.data.forEach((ele, indexForData) => {
382
+ this.coolMap.plotRoute(ele, ele['job_id'], this.type, false, (indexForData === (this.data.length - 1))).then(() => {
383
+ if (indexForData === (this.data.length - 1)) {
384
+ this.loader = false;
385
+ this.utils.preventnavChange.next(true);
386
+ }
387
+ if (this.selectedRoute['selected'].length && this.selectedRoute['selected'][0]['job_id'] === ele['job_id']) {
388
+ this.selectedRoute.clear();
389
+ }
390
+ });
391
+ });
392
+ }, 500);
393
+ }
394
+ }
395
+ }
396
+ }
397
+ }
398
+ showRoute() {
399
+ this.utils.preventnavChange.next(false);
400
+ this.loader = true;
401
+ this.clearList();
402
+ this.showAllRoute.emit(true);
403
+ if (this.filterList && this.filterList.length > 0) {
404
+ this.coolMap.removeJobFromMap(this.selectedRoute.selected);
405
+ setTimeout(() => {
406
+ this.filterList.forEach((ele, indexForData) => {
407
+ this.coolMap.plotRoute(ele, ele['job_id'], this.type, false, (indexForData === this.filterList.length - 1)).then(() => {
408
+ if (indexForData === this.filterList.length - 1) {
409
+ this.loader = false;
410
+ this.utils.preventnavChange.next(true);
411
+ }
412
+ if (this.selectedRoute['selected'].length && this.selectedRoute['selected'][0]['job_id'] === ele['job_id']) {
413
+ this.selectedRoute.clear();
414
+ }
415
+ });
416
+ });
417
+ }, 500);
418
+ }
419
+ }
420
+ toggleDrivermenu(event) {
421
+ const mouseevntType = event.mouseevntType;
422
+ let route = event.route;
423
+ const isHoverOut = event.isHoverOut;
424
+ if (typeof (mouseevntType) === 'string') {
425
+ if (this.preventMouseout) {
426
+ this.isDriverList = !this.isDriverList;
427
+ }
428
+ ;
429
+ this.preventMouseout = true;
430
+ }
431
+ if (typeof (mouseevntType) === 'boolean' && !mouseevntType && !this.preventMouseout) {
432
+ this.isDriverList = mouseevntType;
433
+ }
434
+ ;
435
+ if (typeof (mouseevntType) === 'boolean' && mouseevntType && !this.preventMouseout) {
436
+ this.isDriverList = mouseevntType;
437
+ }
438
+ ;
439
+ if (this.preventMouseout && !this.isDriverList)
440
+ this.preventMouseout = false;
441
+ if (isHoverOut) {
442
+ if (this.preventMouseout) {
443
+ route = this.utils.getdictValue('driver-details');
444
+ this.driverList = route;
445
+ }
446
+ if (!this.preventMouseout) {
447
+ this.driverList = route;
448
+ }
449
+ }
450
+ else {
451
+ this.driverList = route;
452
+ }
453
+ }
454
+ visiblesection(value) {
455
+ if (this.type === value) {
456
+ return true;
457
+ }
458
+ else
459
+ return false;
460
+ }
461
+ toggleFilterRoute(filterList) {
462
+ filterList.forEach((ele) => {
463
+ const filterItem = (this.type === 'jobcode') ? 'job_id' : 'route_id';
464
+ const index = this.data.findIndex((ele1) => { return (ele1[`${filterItem}`] === ele[`${filterItem}`]); });
465
+ const id = (ele['job_id'] ? ele['job_id'] : ele['route_id']);
466
+ if (id && index < 0)
467
+ this.coolMap.filterRoute(id, 'none');
468
+ if (id && index >= 0) {
469
+ this.data[index].isActive = false;
470
+ this.coolMap.filterRoute(id, 'visible');
471
+ this.coolMap.extendBound(ele['path'], (index === (this.data.length - 1)));
472
+ }
473
+ ;
474
+ });
475
+ }
476
+ clearList() {
477
+ this.isDriverList = false;
478
+ this.driverList = null;
479
+ this.preventMouseout = false;
480
+ this.isSmsList = false;
481
+ }
482
+ sendMessage() {
483
+ this.messageLoader = true;
484
+ if (this.driverMessage.valid) {
485
+ const data = {
486
+ order_number: this.driverList['order_number'],
487
+ date: this.driverList['date'],
488
+ message: this.driverMessage.value,
489
+ };
490
+ this.utils.postdata('jobs_report_chat', data).subscribe((res) => {
491
+ if (res['data']['status'] === 'Success.') {
492
+ this.messageLoader = false;
493
+ this.driverMessage.reset();
494
+ this.utils.openSnackBar('Message Sent', 'success');
495
+ }
496
+ else {
497
+ this.messageLoader = false;
498
+ this.utils.openSnackBar('Message not sent', 'error');
499
+ }
500
+ }, err => {
501
+ if (err) {
502
+ this.messageLoader = false;
503
+ }
504
+ });
505
+ }
506
+ }
507
+ }
508
+ RouteJobCodeListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RouteJobCodeListComponent, deps: [{ token: i1.CoolmapService }, { token: i1.UtilsService }], target: i0.ɵɵFactoryTarget.Component });
509
+ RouteJobCodeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: RouteJobCodeListComponent, selector: "app-route-jobcode-list", inputs: { loader: "loader", type: "type", data: "data", currentNav: "currentNav", searchTerm: "searchTerm", clearListSeletion: "clearListSeletion" }, outputs: { emitroute: "emitroute", showAllRoute: "showAllRoute", clearJobDetailsFromList: "clearJobDetailsFromList" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"scrollprt addroutelist\" [class.viewroute]=\"visiblesection('addroute')\"\n [class.jobList]=\"visiblesection('jobcode')\">\n <button (click)=\"showRoute()\" [disabled]=\"loader\" *ngIf=\"selectedRoute.selected.length\" class=\"show_routebtn\">Show all\n route</button>\n <perfect-scrollbar [class.jobscroll]=\"visiblesection('jobcode')\">\n <mat-spinner *ngIf=\"loader\"></mat-spinner>\n <ul *ngIf=\"!loader && data.length > 0\">\n <li [class.active]=\"route['isActive'] && visiblesection('addroute')\" *ngFor=\"let route of data\">\n <app-job-code-list-card *ngIf=\"visiblesection('jobcode')\" (toggleDrivermenu)=\"toggleDrivermenu($event)\"\n (routeSeletion)=\"selectRoute($event)\" [preventCloseDetails]=\"preventDetailsClose\" [emitJobdetails]=\"{emitroute, clearJobDetailsFromList}\" [route]=\"checkroutes(route)\"></app-job-code-list-card>\n <app-view-route-list-card [emitrouteevent]=\"emitroute\" *ngIf=\"visiblesection('addroute')\"\n [route]=\"route\"></app-view-route-list-card>\n </li>\n </ul>\n <p *ngIf=\"!loader && data.length === 0\">{{visiblesection('addroute') ? 'No Route found' : 'No Job code found.'}}</p>\n </perfect-scrollbar>\n</div>\n\n<div class=\"driver_list\" *ngIf=\"isDriverList\">\n <div class=\"driver_headingprt\">\n <h2>Driver List</h2>\n <button *ngIf=\"driverList.driver_list?.length > 0\" (click)=\"isSmsList = true\">SMS</button>\n <div class=\"closebtn\" (click)=\"isDriverList = false; preventMouseout = false; isSmsList = false\">\n <mat-icon>clear</mat-icon>\n </div>\n </div>\n <ul class=\"driverList\" *ngIf=\"driverList && driverList.driver_list\">\n <li *ngFor=\"let driver of driverList?.driver_list\">\n <img src=\"assets/images/driver_icon.png\" [alt]=\"driver['driver_name']\" />\n <div class=\"driver_detail\">\n <b>{{driver['driver_name']}}</b> <span>{{driver['trucking_company']}}</span>\n <div class=\"cont_del\">\n <small>Driver contact: <b>{{driver['driver_phone'] ? driver['driver_phone'] : 'N/A'}}</b></small>\n <small>Company contact: <b>{{driver['trucking_company_phone'] ? driver['trucking_company_phone'] : 'N/A'}}</b></small>\n </div>\n </div>\n </li>\n <p *ngIf=\"driverList.driver_list?.length === 0\" style=\"font-weight:700; text-align:center;\">\n No Driver found\n </p>\n </ul>\n <div class=\"smslist\" *ngIf=\"isSmsList\">\n <div class=\"heading\">\n <h2>SMS All Drivers</h2>\n <div class=\"closebtn\" (click)=\"isSmsList = false\">\n <mat-icon>clear</mat-icon>\n </div>\n </div>\n <div class=\"detailprt\">\n <app-sms-card-details-overview [jobValue]=\"driverList\"></app-sms-card-details-overview>\n <div class=\"form_input\">\n <mat-form-field class=\"example-full-width\">\n <textarea matInput placeholder=\"Text here...\" autocomplete=\"nope\" column=\"10\"\n [formControl]=\"driverMessage\"></textarea>\n <mat-hint>{{driverMessage.value?.length}} / 256</mat-hint>\n </mat-form-field>\n <button *ngIf=\"!messageLoader\" [disabled]=\"!driverMessage.value || driverMessage.invalid\" (click)=\"sendMessage()\">\n Send SMS\n </button>\n </div>\n </div>\n <div class=\"loader\">\n <mat-spinner *ngIf=\"messageLoader\"></mat-spinner>\n </div>\n </div>\n</div>\n", styles: [".driver_iconprt{position:absolute;right:10px;top:12px;z-index:9999}.driver_iconprt img{width:25px;height:25px}.driver_list{background:white;position:fixed;width:300px;top:10px;left:360px;border-top-left-radius:20px;border-top-right-radius:20px}.driver_list .driver_headingprt{display:flex;justify-content:space-between;align-items:center;padding:0 15px}.driver_list .driver_headingprt button{background:none;border:1px solid #ccc;border-radius:10px;padding:5px 20px}.driver_list .driver_headingprt button:hover{background:#326ad3;color:#fff}.driver_list h2{font-size:20px}.driver_list .driverList{height:300px;overflow:auto}.driver_list .driverList li{display:flex;padding:10px;align-items:flex-start;cursor:pointer;border-bottom:1px solid white;background:#eee}.driver_list .driverList li img{width:35px;height:35px;border-radius:100%;margin-right:10px}.driver_list .driverList li .driver_detail{width:calc(100% - 45px);display:flex;flex-direction:column;justify-content:flex-start}.driver_list .driverList li .driver_detail b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:135px;font-size:.9rem}.driver_list .driverList li .driver_detail span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px;font-size:.8rem}.driver_list:after{height:10px;background:white;border-bottom-right-radius:20px;border-bottom-left-radius:20px;content:\"\";position:absolute;bottom:-9px;width:100%}.smslist{background:white;position:absolute;width:480px;top:0;left:105%;border-radius:20px;padding-bottom:20px}.smslist .heading{display:flex;justify-content:space-between;align-items:center;padding:0 15px}.smslist .detailprt{padding:0 15px}.smslist .detailprt span{display:flex;margin-bottom:12px;font-size:.8rem;align-items:center}.smslist .detailprt span label{font-weight:600;width:37%}.smslist .detailprt .form_input{display:flex;flex-direction:column;font-size:.8rem}.smslist .detailprt .form_input button{background:#326ad3;padding:10px 18px;color:#fff;font-size:.8125rem;border-radius:30px;display:flex;align-self:flex-end}.closebtn{box-shadow:0 0 5px #0000001c;border-radius:100%;width:30px;height:30px;display:flex;justify-content:center;align-items:center;cursor:pointer;background:#f5f5f5}.show_routebtn{font-size:.9rem;margin-bottom:20px;padding:6px 11px;position:absolute;top:8px;right:10px;background-color:transparent;color:#3f51b5;border:1px solid #3f51b5;border-radius:10px;box-shadow:none}.show_routebtn:hover{background-color:#3f51b5;color:#fff}.cont_del{margin-top:10px}.cont_del small{display:block}.jobList ul{margin:0 15px 0 10px;width:100%}.jobList ul li{position:relative;background:#fbfbfb;padding:10px;border-radius:15px;margin-bottom:5px;border:1px solid #fbfbfb;border-left:3px solid #fbfbfb;cursor:pointer;height:inherit}@media (min-width: 2500px){.jobList ul li{height:7.65vh}}@media (min-width: 3300px){.jobList ul li{height:5.61vh}}.viewroute ul{margin:0 15px;width:100%}.viewroute ul li{position:relative;background:#fbfbfb;padding:7px 10px;border-radius:15px;margin-bottom:5px;border:1px solid #fbfbfb;border-left:3px solid #fbfbfb;cursor:pointer;height:16.4vh}@media (min-width: 1600px){.viewroute ul li{height:12.4vh}}.viewroute ul li.active{border:1px solid #39c471;border-left:3px solid #39c471}.loader{position:absolute;height:100%;top:0;left:0;width:100%;display:flex;align-items:center;justify-content:center;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i7$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i8.PerfectScrollbarComponent, selector: "perfect-scrollbar", inputs: ["disabled", "usePSClass", "autoPropagation", "scrollIndicators", "config"], outputs: ["psScrollY", "psScrollX", "psScrollUp", "psScrollDown", "psScrollLeft", "psScrollRight", "psYReachEnd", "psYReachStart", "psXReachEnd", "psXReachStart"], exportAs: ["ngxPerfectScrollbar"] }, { kind: "component", type: ViewRouteListCardComponent, selector: "app-view-route-list-card", inputs: ["route", "emitrouteevent"] }, { kind: "component", type: SmsCardDetailsOverviewComponent, selector: "app-sms-card-details-overview", inputs: ["jobValue"] }, { kind: "component", type: JobCodeListCardComponent, selector: "app-job-code-list-card", inputs: ["route", "emitJobdetails", "preventCloseDetails"], outputs: ["routeSeletion", "toggleDrivermenu"] }] });
510
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RouteJobCodeListComponent, decorators: [{
511
+ type: Component,
512
+ args: [{ selector: 'app-route-jobcode-list', template: "<div class=\"scrollprt addroutelist\" [class.viewroute]=\"visiblesection('addroute')\"\n [class.jobList]=\"visiblesection('jobcode')\">\n <button (click)=\"showRoute()\" [disabled]=\"loader\" *ngIf=\"selectedRoute.selected.length\" class=\"show_routebtn\">Show all\n route</button>\n <perfect-scrollbar [class.jobscroll]=\"visiblesection('jobcode')\">\n <mat-spinner *ngIf=\"loader\"></mat-spinner>\n <ul *ngIf=\"!loader && data.length > 0\">\n <li [class.active]=\"route['isActive'] && visiblesection('addroute')\" *ngFor=\"let route of data\">\n <app-job-code-list-card *ngIf=\"visiblesection('jobcode')\" (toggleDrivermenu)=\"toggleDrivermenu($event)\"\n (routeSeletion)=\"selectRoute($event)\" [preventCloseDetails]=\"preventDetailsClose\" [emitJobdetails]=\"{emitroute, clearJobDetailsFromList}\" [route]=\"checkroutes(route)\"></app-job-code-list-card>\n <app-view-route-list-card [emitrouteevent]=\"emitroute\" *ngIf=\"visiblesection('addroute')\"\n [route]=\"route\"></app-view-route-list-card>\n </li>\n </ul>\n <p *ngIf=\"!loader && data.length === 0\">{{visiblesection('addroute') ? 'No Route found' : 'No Job code found.'}}</p>\n </perfect-scrollbar>\n</div>\n\n<div class=\"driver_list\" *ngIf=\"isDriverList\">\n <div class=\"driver_headingprt\">\n <h2>Driver List</h2>\n <button *ngIf=\"driverList.driver_list?.length > 0\" (click)=\"isSmsList = true\">SMS</button>\n <div class=\"closebtn\" (click)=\"isDriverList = false; preventMouseout = false; isSmsList = false\">\n <mat-icon>clear</mat-icon>\n </div>\n </div>\n <ul class=\"driverList\" *ngIf=\"driverList && driverList.driver_list\">\n <li *ngFor=\"let driver of driverList?.driver_list\">\n <img src=\"assets/images/driver_icon.png\" [alt]=\"driver['driver_name']\" />\n <div class=\"driver_detail\">\n <b>{{driver['driver_name']}}</b> <span>{{driver['trucking_company']}}</span>\n <div class=\"cont_del\">\n <small>Driver contact: <b>{{driver['driver_phone'] ? driver['driver_phone'] : 'N/A'}}</b></small>\n <small>Company contact: <b>{{driver['trucking_company_phone'] ? driver['trucking_company_phone'] : 'N/A'}}</b></small>\n </div>\n </div>\n </li>\n <p *ngIf=\"driverList.driver_list?.length === 0\" style=\"font-weight:700; text-align:center;\">\n No Driver found\n </p>\n </ul>\n <div class=\"smslist\" *ngIf=\"isSmsList\">\n <div class=\"heading\">\n <h2>SMS All Drivers</h2>\n <div class=\"closebtn\" (click)=\"isSmsList = false\">\n <mat-icon>clear</mat-icon>\n </div>\n </div>\n <div class=\"detailprt\">\n <app-sms-card-details-overview [jobValue]=\"driverList\"></app-sms-card-details-overview>\n <div class=\"form_input\">\n <mat-form-field class=\"example-full-width\">\n <textarea matInput placeholder=\"Text here...\" autocomplete=\"nope\" column=\"10\"\n [formControl]=\"driverMessage\"></textarea>\n <mat-hint>{{driverMessage.value?.length}} / 256</mat-hint>\n </mat-form-field>\n <button *ngIf=\"!messageLoader\" [disabled]=\"!driverMessage.value || driverMessage.invalid\" (click)=\"sendMessage()\">\n Send SMS\n </button>\n </div>\n </div>\n <div class=\"loader\">\n <mat-spinner *ngIf=\"messageLoader\"></mat-spinner>\n </div>\n </div>\n</div>\n", styles: [".driver_iconprt{position:absolute;right:10px;top:12px;z-index:9999}.driver_iconprt img{width:25px;height:25px}.driver_list{background:white;position:fixed;width:300px;top:10px;left:360px;border-top-left-radius:20px;border-top-right-radius:20px}.driver_list .driver_headingprt{display:flex;justify-content:space-between;align-items:center;padding:0 15px}.driver_list .driver_headingprt button{background:none;border:1px solid #ccc;border-radius:10px;padding:5px 20px}.driver_list .driver_headingprt button:hover{background:#326ad3;color:#fff}.driver_list h2{font-size:20px}.driver_list .driverList{height:300px;overflow:auto}.driver_list .driverList li{display:flex;padding:10px;align-items:flex-start;cursor:pointer;border-bottom:1px solid white;background:#eee}.driver_list .driverList li img{width:35px;height:35px;border-radius:100%;margin-right:10px}.driver_list .driverList li .driver_detail{width:calc(100% - 45px);display:flex;flex-direction:column;justify-content:flex-start}.driver_list .driverList li .driver_detail b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:135px;font-size:.9rem}.driver_list .driverList li .driver_detail span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px;font-size:.8rem}.driver_list:after{height:10px;background:white;border-bottom-right-radius:20px;border-bottom-left-radius:20px;content:\"\";position:absolute;bottom:-9px;width:100%}.smslist{background:white;position:absolute;width:480px;top:0;left:105%;border-radius:20px;padding-bottom:20px}.smslist .heading{display:flex;justify-content:space-between;align-items:center;padding:0 15px}.smslist .detailprt{padding:0 15px}.smslist .detailprt span{display:flex;margin-bottom:12px;font-size:.8rem;align-items:center}.smslist .detailprt span label{font-weight:600;width:37%}.smslist .detailprt .form_input{display:flex;flex-direction:column;font-size:.8rem}.smslist .detailprt .form_input button{background:#326ad3;padding:10px 18px;color:#fff;font-size:.8125rem;border-radius:30px;display:flex;align-self:flex-end}.closebtn{box-shadow:0 0 5px #0000001c;border-radius:100%;width:30px;height:30px;display:flex;justify-content:center;align-items:center;cursor:pointer;background:#f5f5f5}.show_routebtn{font-size:.9rem;margin-bottom:20px;padding:6px 11px;position:absolute;top:8px;right:10px;background-color:transparent;color:#3f51b5;border:1px solid #3f51b5;border-radius:10px;box-shadow:none}.show_routebtn:hover{background-color:#3f51b5;color:#fff}.cont_del{margin-top:10px}.cont_del small{display:block}.jobList ul{margin:0 15px 0 10px;width:100%}.jobList ul li{position:relative;background:#fbfbfb;padding:10px;border-radius:15px;margin-bottom:5px;border:1px solid #fbfbfb;border-left:3px solid #fbfbfb;cursor:pointer;height:inherit}@media (min-width: 2500px){.jobList ul li{height:7.65vh}}@media (min-width: 3300px){.jobList ul li{height:5.61vh}}.viewroute ul{margin:0 15px;width:100%}.viewroute ul li{position:relative;background:#fbfbfb;padding:7px 10px;border-radius:15px;margin-bottom:5px;border:1px solid #fbfbfb;border-left:3px solid #fbfbfb;cursor:pointer;height:16.4vh}@media (min-width: 1600px){.viewroute ul li{height:12.4vh}}.viewroute ul li.active{border:1px solid #39c471;border-left:3px solid #39c471}.loader{position:absolute;height:100%;top:0;left:0;width:100%;display:flex;align-items:center;justify-content:center;pointer-events:none}\n"] }]
513
+ }], ctorParameters: function () { return [{ type: i1.CoolmapService }, { type: i1.UtilsService }]; }, propDecorators: { loader: [{
514
+ type: Input
515
+ }], type: [{
516
+ type: Input
517
+ }], data: [{
518
+ type: Input
519
+ }], currentNav: [{
520
+ type: Input
521
+ }], emitroute: [{
522
+ type: Output
523
+ }], showAllRoute: [{
524
+ type: Output
525
+ }], searchTerm: [{
526
+ type: Input
527
+ }], clearJobDetailsFromList: [{
528
+ type: Output
529
+ }], clearListSeletion: [{
530
+ type: Input
531
+ }] } });
532
+
533
+ class AddRouteNavComponent {
534
+ constructor(utils, config) {
535
+ var _a;
536
+ this.utils = utils;
537
+ this.config = config;
538
+ this.filterForm = new FormGroup({ search: new FormControl() });
539
+ this.filters = [];
540
+ this.loaderVal = false;
541
+ this.routes = [];
542
+ this.changeNav = new EventEmitter();
543
+ this.navValue = '';
544
+ this.addemit = new EventEmitter();
545
+ this.updateRouteList = false;
546
+ this.destroyer$ = new Subject();
547
+ this.preventListUpdate = false;
548
+ this.filteredOptions = (_a = this.filterForm.get('search')) === null || _a === void 0 ? void 0 : _a.valueChanges.pipe(startWith(''), map(value => this.utils.filter(value, this.filters)));
549
+ }
550
+ showAddForm() { this.changeNav.emit('addForm'); this.addemit.emit(''); }
551
+ filterSearch(e) {
552
+ this.changeNav.emit({ type: 'Addroute' });
553
+ this.preventListUpdate = true;
554
+ this.filterForm.controls.search.setValue(null);
555
+ this.filters = [{ name: e.source.value.label, type: e.source.value.type, value: e.source.value }];
556
+ }
557
+ removeFromFilter(filter) {
558
+ this.changeNav.emit({ type: 'Addroute' });
559
+ const index = this.filters.indexOf(filter);
560
+ if (index >= 0) {
561
+ this.filters = [];
562
+ }
563
+ }
564
+ ngAfterViewInit() {
565
+ this.checkAndCallRouteList();
566
+ }
567
+ ngOnChanges(changes) {
568
+ if (changes['updateRouteList'] && changes['updateRouteList']['currentValue'])
569
+ this.checkAndCallRouteList();
570
+ if (changes['navValue'] && (changes['navValue']['previousValue'] === 'addForm') && !this.preventListUpdate)
571
+ this.checkAndCallRouteList();
572
+ }
573
+ getRoute(event) {
574
+ if (event['type'] === 'editroute') {
575
+ this.addemit.emit(event);
576
+ }
577
+ }
578
+ checkAndCallRouteList() {
579
+ if (this.config.repository === 'customer') {
580
+ this.utils.fetchUnitsList().then((res) => {
581
+ this.unitList = res;
582
+ this.utils.fetchMaterialsList().then((res) => {
583
+ this.materialsList = res;
584
+ this.getRouteListForCustomer();
585
+ });
586
+ });
587
+ }
588
+ else {
589
+ this.getRouteListForCoolMap();
590
+ }
591
+ }
592
+ getUnitName(data) {
593
+ let unitName = '';
594
+ this.unitList.map((res) => {
595
+ if (res.id === data.unit_id) {
596
+ unitName = res.type;
597
+ }
598
+ });
599
+ return unitName;
600
+ }
601
+ getMaterialName(data) {
602
+ let materialName = '';
603
+ this.materialsList.map((res) => {
604
+ if (res.material_id === data.material_id) {
605
+ materialName = res.material;
606
+ }
607
+ });
608
+ return materialName;
609
+ }
610
+ getRouteListForCoolMap() {
611
+ this.utils.getData('routes/all').pipe(takeUntil(this.destroyer$)).subscribe((res) => {
612
+ if (res) {
613
+ this.filters = [];
614
+ this.routes = res['data'];
615
+ this.preventListUpdate = false;
616
+ this.utils.clearOptions();
617
+ this.routes.forEach((ele) => { this.utils.makeOptions(ele); });
618
+ }
619
+ });
620
+ }
621
+ getRouteListForCustomer() {
622
+ const dataset = {
623
+ customer_id: this.customerRepoDetails.customer.id
624
+ };
625
+ this.utils.postdata('routes/all', dataset).pipe(takeUntil(this.destroyer$)).subscribe((res) => {
626
+ if (res) {
627
+ this.filters = [];
628
+ this.routes = res['data'];
629
+ this.preventListUpdate = false;
630
+ this.utils.clearOptions();
631
+ this.routes.map((ele) => {
632
+ ele.unit = this.getUnitName(ele);
633
+ ele.material = this.getMaterialName(ele);
634
+ this.utils.makeOptions(ele);
635
+ });
636
+ }
637
+ });
638
+ }
639
+ resetSearch() { this.changeNav.emit('Addroute'); }
640
+ ngOnDestroy() {
641
+ this.destroyer$.next(true);
642
+ this.destroyer$.unsubscribe();
643
+ }
644
+ }
645
+ AddRouteNavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AddRouteNavComponent, deps: [{ token: i1.UtilsService }, { token: 'memberData' }], target: i0.ɵɵFactoryTarget.Component });
646
+ AddRouteNavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: AddRouteNavComponent, selector: "app-add-route-nav", inputs: { navValue: "navValue", updateRouteList: "updateRouteList", customerRepoDetails: "customerRepoDetails" }, outputs: { changeNav: "changeNav", addemit: "addemit" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"nav_body\">\n <div class=\"logo\">\n <img src=\"assets/images/logo.png\" alt=\"logo\" />\n </div>\n <div class=\"heading m-20\">\n <h1>View Route</h1>\n <button mat-raised-button color=\"primary\" (click)=\"showAddForm()\">\n <mat-icon>add_circle_outline</mat-icon> Add route\n </button>\n </div>\n\n <div class=\"search-panel\">\n <div class=\"w-100\">\n <form [formGroup]=\"filterForm\">\n <mat-form-field class=\"full-width\" [class.disabled]=\"loaderVal\">\n <input matInput [matChipInputFor]=\"chipList\" formControlName=\"search\" [matAutocomplete]=\"auto\"\n [disabled]=\"loaderVal\" placeholder=\"Search\">\n <mat-icon matSuffix *ngIf=\"!utils.conveySearchIcon(filterForm.value.search)\">search</mat-icon>\n <button mat-button matSuffix mat-icon-button aria-label=\"Clear\" *ngIf=\"utils.conveySearchIcon(filterForm.value.search)\"\n (click)=\"filterForm.reset()\">\n <mat-icon>close</mat-icon>\n </button>\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of filteredOptions | async\" (onSelectionChange)=\"filterSearch($event)\"\n [value]=\"option\">\n {{option.type | titlecase }}: {{option['label']}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n </form>\n <div class=\"chip-list\">\n <mat-chip-list #chipList aria-label=\"Filter selection\">\n <mat-chip *ngFor=\"let filter of filters\" (removed)=\"removeFromFilter(filter)\">\n {{filter.type | titlecase }}: {{filter.name}}\n <button matChipRemove>\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip>\n </mat-chip-list>\n </div>\n </div>\n </div>\n <app-route-jobcode-list [type]=\"'addroute'\" [currentNav]=\"navValue\" [searchTerm]=\"filters\" [data]=\"routes\" [loader]=\"loaderVal\" (emitroute)=\"getRoute($event)\"></app-route-jobcode-list>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i8$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i8$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i9.MatChipList, selector: "mat-chip-list", inputs: ["role", "aria-describedby", "errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { kind: "directive", type: i9.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "role", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { kind: "directive", type: i9.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i9.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i10.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: RouteJobCodeListComponent, selector: "app-route-jobcode-list", inputs: ["loader", "type", "data", "currentNav", "searchTerm", "clearListSeletion"], outputs: ["emitroute", "showAllRoute", "clearJobDetailsFromList"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TitleCasePipe, name: "titlecase" }] });
647
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AddRouteNavComponent, decorators: [{
648
+ type: Component,
649
+ args: [{ selector: 'app-add-route-nav', template: "<div class=\"nav_body\">\n <div class=\"logo\">\n <img src=\"assets/images/logo.png\" alt=\"logo\" />\n </div>\n <div class=\"heading m-20\">\n <h1>View Route</h1>\n <button mat-raised-button color=\"primary\" (click)=\"showAddForm()\">\n <mat-icon>add_circle_outline</mat-icon> Add route\n </button>\n </div>\n\n <div class=\"search-panel\">\n <div class=\"w-100\">\n <form [formGroup]=\"filterForm\">\n <mat-form-field class=\"full-width\" [class.disabled]=\"loaderVal\">\n <input matInput [matChipInputFor]=\"chipList\" formControlName=\"search\" [matAutocomplete]=\"auto\"\n [disabled]=\"loaderVal\" placeholder=\"Search\">\n <mat-icon matSuffix *ngIf=\"!utils.conveySearchIcon(filterForm.value.search)\">search</mat-icon>\n <button mat-button matSuffix mat-icon-button aria-label=\"Clear\" *ngIf=\"utils.conveySearchIcon(filterForm.value.search)\"\n (click)=\"filterForm.reset()\">\n <mat-icon>close</mat-icon>\n </button>\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of filteredOptions | async\" (onSelectionChange)=\"filterSearch($event)\"\n [value]=\"option\">\n {{option.type | titlecase }}: {{option['label']}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n </form>\n <div class=\"chip-list\">\n <mat-chip-list #chipList aria-label=\"Filter selection\">\n <mat-chip *ngFor=\"let filter of filters\" (removed)=\"removeFromFilter(filter)\">\n {{filter.type | titlecase }}: {{filter.name}}\n <button matChipRemove>\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip>\n </mat-chip-list>\n </div>\n </div>\n </div>\n <app-route-jobcode-list [type]=\"'addroute'\" [currentNav]=\"navValue\" [searchTerm]=\"filters\" [data]=\"routes\" [loader]=\"loaderVal\" (emitroute)=\"getRoute($event)\"></app-route-jobcode-list>\n</div>\n" }]
650
+ }], ctorParameters: function () {
651
+ return [{ type: i1.UtilsService }, { type: i1.CoolmapConfigModel, decorators: [{
652
+ type: Inject,
653
+ args: ['memberData']
654
+ }] }];
655
+ }, propDecorators: { changeNav: [{
656
+ type: Output
657
+ }], navValue: [{
658
+ type: Input
659
+ }], addemit: [{
660
+ type: Output
661
+ }], updateRouteList: [{
662
+ type: Input
663
+ }], customerRepoDetails: [{
664
+ type: Input
665
+ }] } });
666
+
667
+ class JobCodeNavComponent {
668
+ constructor(utils, config) {
669
+ this.utils = utils;
670
+ this.config = config;
671
+ this.filterForm = new FormGroup({ search: new FormControl() });
672
+ this.listData = [];
673
+ this.loaderVal = false;
674
+ this.dateValue = new Date();
675
+ this.jobemit = new EventEmitter();
676
+ this.value = '';
677
+ this.filters = [];
678
+ this.clearJobDetails = new EventEmitter();
679
+ this.destroyer$ = new Subject();
680
+ this.selectedDate = this.utils.getDateFormat(new Date());
681
+ utils.navChangeObserve.pipe(takeUntil(this.destroyer$)).subscribe(res => {
682
+ if (res) {
683
+ this.loaderVal = false;
684
+ }
685
+ else
686
+ this.loaderVal = true;
687
+ });
688
+ }
689
+ ngOnChanges(changes) {
690
+ if (changes['customerRepoDetails'] && changes['customerRepoDetails']['currentValue']) {
691
+ this.loadData(this.selectedDate);
692
+ this.filters = [];
693
+ this.utils.clearViewRouteforJobCode.next(true);
694
+ }
695
+ }
696
+ loadData(value) {
697
+ var _a;
698
+ this.selectedDate = value;
699
+ this.filteredOptions = (_a = this.filterForm.get('search')) === null || _a === void 0 ? void 0 : _a.valueChanges.pipe(startWith(''), map(value => this.utils.filter(value, this.filters)));
700
+ this.utils.preventnavChange.next(false);
701
+ this.loaderVal = true;
702
+ let dataSet;
703
+ if (this.config.repository === 'customer') {
704
+ dataSet = {
705
+ date: value,
706
+ customer_id: this.customerRepoDetails.customer.id,
707
+ project_id: this.customerRepoDetails.projectId,
708
+ };
709
+ }
710
+ else {
711
+ dataSet = { date: value };
712
+ }
713
+ this.utils.postdata('jobs_report_v2', dataSet).pipe(takeUntil(this.destroyer$)).subscribe((res) => {
714
+ if (typeof res['data'] !== 'string') {
715
+ if (res['data'].length > 0)
716
+ this.listData = res['data'].map((ele) => { ele['date'] = value; return ele; });
717
+ this.listData.forEach((ele) => { this.utils.makeOptions(ele); });
718
+ }
719
+ else
720
+ this.listData = [];
721
+ this.clearJobDetails.emit(true);
722
+ this.utils.clearViewRouteforJobCode.next(true);
723
+ this.filters = [];
724
+ if (typeof res['data'] === 'string')
725
+ this.utils.preventnavChange.next(true);
726
+ }, (err) => {
727
+ if (err)
728
+ this.utils.preventnavChange.next(true);
729
+ });
730
+ }
731
+ getRoute(job) {
732
+ if (job['type'] === 'jobcode') {
733
+ this.jobemit.emit(job);
734
+ }
735
+ }
736
+ getDate(ev) { this.loadData(this.utils.getDateFormat(ev.value)); }
737
+ filterSearch(e) {
738
+ this.filterForm.controls.search.setValue(null);
739
+ this.filterForm.controls.search.updateValueAndValidity();
740
+ this.filters = [{ name: e.source.value.label, type: e.source.value.type, value: e.source.value }];
741
+ }
742
+ removeFromFilter(filter) {
743
+ const index = this.filters.indexOf(filter);
744
+ if (index >= 0) {
745
+ this.filters = [];
746
+ }
747
+ }
748
+ ngOnDestroy() {
749
+ this.destroyer$.next(true);
750
+ this.destroyer$.unsubscribe();
751
+ }
752
+ }
753
+ JobCodeNavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: JobCodeNavComponent, deps: [{ token: i1.UtilsService }, { token: 'memberData' }], target: i0.ɵɵFactoryTarget.Component });
754
+ JobCodeNavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: JobCodeNavComponent, selector: "app-job-code-nav", inputs: { customerRepoDetails: "customerRepoDetails" }, outputs: { jobemit: "jobemit", clearJobDetails: "clearJobDetails" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"nav_body\">\n <div class=\"search-panel\">\n <div class=\"datepicker\">\n <mat-form-field>\n <mat-label>Choose a date</mat-label>\n <input readonly matInput (click)=\"picker.open()\" [disabled]=\"loaderVal\" [(ngModel)]=\"dateValue\" [matDatepicker]=\"picker\" (dateChange)=\"getDate($event)\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n </div>\n <div class=\"search\">\n <form [formGroup]=\"filterForm\">\n <mat-form-field class=\"full-width\" [class.disabled]=\"loaderVal\">\n <input matInput [matChipInputFor]=\"chipList\" formControlName=\"search\" [matAutocomplete]=\"auto\"\n [disabled]=\"loaderVal\" placeholder=\"Search\">\n <mat-icon matSuffix *ngIf=\"!utils.conveySearchIcon(filterForm.value.search)\">search</mat-icon>\n <button mat-button matSuffix mat-icon-button aria-label=\"Clear\" *ngIf=\"utils.conveySearchIcon(filterForm.value.search)\" (click)=\"filterForm.reset()\">\n <mat-icon>close</mat-icon>\n </button>\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of filteredOptions | async\" (onSelectionChange)=\"filterSearch($event)\"\n [value]=\"option\">\n {{option.type | titlecase }}: {{option['label']}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n </form>\n\n </div>\n\n <div class=\"chip-list\">\n <mat-chip-list #chipList aria-label=\"Filter selection\">\n <mat-chip *ngFor=\"let filter of filters\" (removed)=\"removeFromFilter(filter)\">\n {{filter.type | titlecase }}: {{filter.name}}\n <button matChipRemove>\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip>\n </mat-chip-list>\n </div>\n </div>\n <app-route-jobcode-list [type]=\"'jobcode'\" [searchTerm]=\"filters\" [data]=\"listData\" [loader]=\"loaderVal\" (clearJobDetailsFromList)=\"clearJobDetails.emit(true)\" (showAllRoute)=\"filters = []; clearJobDetails.emit(true)\" (emitroute)=\"getRoute($event)\"></app-route-jobcode-list>\n</div>\n", styles: [".search-panel .datepicker,.search-panel .search{width:47%}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i8$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i8$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i9.MatChipList, selector: "mat-chip-list", inputs: ["role", "aria-describedby", "errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { kind: "directive", type: i9.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "role", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { kind: "directive", type: i9.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i9.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i10$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i10$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i10$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i10.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: RouteJobCodeListComponent, selector: "app-route-jobcode-list", inputs: ["loader", "type", "data", "currentNav", "searchTerm", "clearListSeletion"], outputs: ["emitroute", "showAllRoute", "clearJobDetailsFromList"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TitleCasePipe, name: "titlecase" }] });
755
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: JobCodeNavComponent, decorators: [{
756
+ type: Component,
757
+ args: [{ selector: 'app-job-code-nav', template: "<div class=\"nav_body\">\n <div class=\"search-panel\">\n <div class=\"datepicker\">\n <mat-form-field>\n <mat-label>Choose a date</mat-label>\n <input readonly matInput (click)=\"picker.open()\" [disabled]=\"loaderVal\" [(ngModel)]=\"dateValue\" [matDatepicker]=\"picker\" (dateChange)=\"getDate($event)\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n </div>\n <div class=\"search\">\n <form [formGroup]=\"filterForm\">\n <mat-form-field class=\"full-width\" [class.disabled]=\"loaderVal\">\n <input matInput [matChipInputFor]=\"chipList\" formControlName=\"search\" [matAutocomplete]=\"auto\"\n [disabled]=\"loaderVal\" placeholder=\"Search\">\n <mat-icon matSuffix *ngIf=\"!utils.conveySearchIcon(filterForm.value.search)\">search</mat-icon>\n <button mat-button matSuffix mat-icon-button aria-label=\"Clear\" *ngIf=\"utils.conveySearchIcon(filterForm.value.search)\" (click)=\"filterForm.reset()\">\n <mat-icon>close</mat-icon>\n </button>\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of filteredOptions | async\" (onSelectionChange)=\"filterSearch($event)\"\n [value]=\"option\">\n {{option.type | titlecase }}: {{option['label']}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n </form>\n\n </div>\n\n <div class=\"chip-list\">\n <mat-chip-list #chipList aria-label=\"Filter selection\">\n <mat-chip *ngFor=\"let filter of filters\" (removed)=\"removeFromFilter(filter)\">\n {{filter.type | titlecase }}: {{filter.name}}\n <button matChipRemove>\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip>\n </mat-chip-list>\n </div>\n </div>\n <app-route-jobcode-list [type]=\"'jobcode'\" [searchTerm]=\"filters\" [data]=\"listData\" [loader]=\"loaderVal\" (clearJobDetailsFromList)=\"clearJobDetails.emit(true)\" (showAllRoute)=\"filters = []; clearJobDetails.emit(true)\" (emitroute)=\"getRoute($event)\"></app-route-jobcode-list>\n</div>\n", styles: [".search-panel .datepicker,.search-panel .search{width:47%}\n"] }]
758
+ }], ctorParameters: function () {
759
+ return [{ type: i1.UtilsService }, { type: i1.CoolmapConfigModel, decorators: [{
760
+ type: Inject,
761
+ args: ['memberData']
762
+ }] }];
763
+ }, propDecorators: { jobemit: [{
764
+ type: Output
765
+ }], clearJobDetails: [{
766
+ type: Output
767
+ }], customerRepoDetails: [{
768
+ type: Input
769
+ }] } });
770
+
771
+ class JobRouteListComponent {
772
+ constructor(utils, coolMap) {
773
+ var _a;
774
+ this.utils = utils;
775
+ this.coolMap = coolMap;
776
+ this.changeNav = new EventEmitter();
777
+ this.filterForm = new FormGroup({ search: new FormControl() });
778
+ this.changeRoutes = new EventEmitter();
779
+ this.changeSelectedRoute = new EventEmitter();
780
+ this.filters = [];
781
+ this.filteredOptions = (_a = this.filterForm.get('search')) === null || _a === void 0 ? void 0 : _a.valueChanges.pipe(startWith(''), map(value => this.utils.filter(value, this.filters)));
782
+ }
783
+ filterSearch(e) {
784
+ this.changeNav.emit({ type: 'Addroute' });
785
+ this.preventListUpdate = true;
786
+ this.filterForm.controls.search.setValue(null);
787
+ this.filters = [{ name: e.source.value.label, type: e.source.value.type, value: e.source.value }];
788
+ const filteredRoutes = this.utils.getSearchResults(this.masterRoutes, [{ name: e.source.value.label, type: e.source.value.type, value: e.source.value }]);
789
+ this.changeRoutes.emit(filteredRoutes);
790
+ this.selectedRoute.selected.forEach((item) => {
791
+ const routeData = filteredRoutes.find(x => x.route_id === item.route_id);
792
+ if (!routeData) {
793
+ this.selectedRoute.toggle(item);
794
+ this.changeSelectedRoute.emit(this.selectedRoute);
795
+ this.coolMap.removeRouteAndMarker(item['route_id']).then((res) => {
796
+ this.coolMap.extendReBound();
797
+ });
798
+ }
799
+ });
800
+ }
801
+ removeFromFilter(filter) {
802
+ this.changeNav.emit({ type: 'Addroute' });
803
+ const index = this.filters.indexOf(filter);
804
+ if (index >= 0) {
805
+ this.filters = [];
806
+ this.changeRoutes.emit(this.masterRoutes);
807
+ }
808
+ }
809
+ }
810
+ JobRouteListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: JobRouteListComponent, deps: [{ token: i1.UtilsService }, { token: i1.CoolmapService }], target: i0.ɵɵFactoryTarget.Component });
811
+ JobRouteListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: JobRouteListComponent, selector: "app-job-route-list", inputs: { routes: "routes", selectedRoute: "selectedRoute", masterRoutes: "masterRoutes" }, outputs: { changeNav: "changeNav", changeRoutes: "changeRoutes", changeSelectedRoute: "changeSelectedRoute" }, ngImport: i0, template: "<div class=\"searchprt\">\n <form [formGroup]=\"filterForm\">\n <mat-form-field class=\"full-width\">\n <input matInput [matChipInputFor]=\"chipList\" formControlName=\"search\" [matAutocomplete]=\"auto\" placeholder=\"Search\">\n <mat-icon matSuffix *ngIf=\"!utils.conveySearchIcon(filterForm.value.search)\">search</mat-icon>\n <button mat-button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"filterForm.reset()\" *ngIf=\"utils.conveySearchIcon(filterForm.value.search)\">\n <mat-icon>close</mat-icon>\n </button>\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of filteredOptions | async\" (onSelectionChange)=\"filterSearch($event)\"\n [value]=\"option\">\n {{option.type | titlecase }}: {{option['label']}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n</form>\n</div>\n<div class=\"chip-list\">\n <mat-chip-list #chipList aria-label=\"Filter selection\">\n <mat-chip *ngFor=\"let filter of filters\" (removed)=\"removeFromFilter(filter)\">\n {{filter.type | titlecase }}: {{filter.name}}\n <button matChipRemove>\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip>\n </mat-chip-list>\n</div>\n", styles: [".searchprt{padding-right:20px}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i8$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i8$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i9.MatChipList, selector: "mat-chip-list", inputs: ["role", "aria-describedby", "errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { kind: "directive", type: i9.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "role", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { kind: "directive", type: i9.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i9.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i10.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TitleCasePipe, name: "titlecase" }] });
812
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: JobRouteListComponent, decorators: [{
813
+ type: Component,
814
+ args: [{ selector: 'app-job-route-list', template: "<div class=\"searchprt\">\n <form [formGroup]=\"filterForm\">\n <mat-form-field class=\"full-width\">\n <input matInput [matChipInputFor]=\"chipList\" formControlName=\"search\" [matAutocomplete]=\"auto\" placeholder=\"Search\">\n <mat-icon matSuffix *ngIf=\"!utils.conveySearchIcon(filterForm.value.search)\">search</mat-icon>\n <button mat-button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"filterForm.reset()\" *ngIf=\"utils.conveySearchIcon(filterForm.value.search)\">\n <mat-icon>close</mat-icon>\n </button>\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of filteredOptions | async\" (onSelectionChange)=\"filterSearch($event)\"\n [value]=\"option\">\n {{option.type | titlecase }}: {{option['label']}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n</form>\n</div>\n<div class=\"chip-list\">\n <mat-chip-list #chipList aria-label=\"Filter selection\">\n <mat-chip *ngFor=\"let filter of filters\" (removed)=\"removeFromFilter(filter)\">\n {{filter.type | titlecase }}: {{filter.name}}\n <button matChipRemove>\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip>\n </mat-chip-list>\n</div>\n", styles: [".searchprt{padding-right:20px}\n"] }]
815
+ }], ctorParameters: function () { return [{ type: i1.UtilsService }, { type: i1.CoolmapService }]; }, propDecorators: { changeNav: [{
816
+ type: Output
817
+ }], routes: [{
818
+ type: Input
819
+ }], selectedRoute: [{
820
+ type: Input
821
+ }], changeRoutes: [{
822
+ type: Output
823
+ }], changeSelectedRoute: [{
824
+ type: Output
825
+ }], masterRoutes: [{
826
+ type: Input
827
+ }] } });
828
+
829
+ class JobcodeStatusComponent {
830
+ constructor() { }
831
+ }
832
+ JobcodeStatusComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: JobcodeStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
833
+ JobcodeStatusComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: JobcodeStatusComponent, selector: "app-jobcode-status", inputs: { jobValue: "jobValue" }, ngImport: i0, template: "<div class=\"statusprt\">\n <span class=\"done\"> Done - {{jobValue['values']['Done']}} </span>\n <span class=\"ongoing\"> Ongoing - {{jobValue['values']['Ongoing']}} </span>\n <span class=\"open\"> Open - {{jobValue['values']['Open']}} </span>\n</div>\n", styles: [".statusprt span{padding:10px;font-size:.9rem}.statusprt span.done{border:2px solid #0b843c;color:#0b843c}.statusprt span.done:hover{background:#0b843c;color:#fff}.statusprt span.ongoing{border:2px solid #eecb27;color:#eecb27}.statusprt span.ongoing:hover{background:#eecb27;color:#fff}.statusprt span.open{border:2px solid #12afcb;color:#12afcb}.statusprt span.open:hover{background:#12afcb;color:#fff}\n"] });
834
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: JobcodeStatusComponent, decorators: [{
835
+ type: Component,
836
+ args: [{ selector: 'app-jobcode-status', template: "<div class=\"statusprt\">\n <span class=\"done\"> Done - {{jobValue['values']['Done']}} </span>\n <span class=\"ongoing\"> Ongoing - {{jobValue['values']['Ongoing']}} </span>\n <span class=\"open\"> Open - {{jobValue['values']['Open']}} </span>\n</div>\n", styles: [".statusprt span{padding:10px;font-size:.9rem}.statusprt span.done{border:2px solid #0b843c;color:#0b843c}.statusprt span.done:hover{background:#0b843c;color:#fff}.statusprt span.ongoing{border:2px solid #eecb27;color:#eecb27}.statusprt span.ongoing:hover{background:#eecb27;color:#fff}.statusprt span.open{border:2px solid #12afcb;color:#12afcb}.statusprt span.open:hover{background:#12afcb;color:#fff}\n"] }]
837
+ }], ctorParameters: function () { return []; }, propDecorators: { jobValue: [{
838
+ type: Input
839
+ }] } });
840
+
841
+ class JobcodeOverviewComponent {
842
+ constructor() {
843
+ this.label = JobCodeOverviewData;
844
+ this.overViewEnum = JobCodeOverviewEnum;
845
+ }
846
+ }
847
+ JobcodeOverviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: JobcodeOverviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
848
+ JobcodeOverviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: JobcodeOverviewComponent, selector: "app-jobcode-overview", inputs: { jobValue: "jobValue" }, ngImport: i0, template: "<div class=\"detail_view m-40\">\n <ng-container *ngFor=\"let item of label\">\n <span [class.pickprt]=\"item === 'pickup_location'\" [class.dropprt]=\"item === 'delivery_location'\">\n <label>{{overViewEnum[item]}}</label>\n <b> {{jobValue[item] ? jobValue[item] : 'N/A'}} </b>\n </span>\n </ng-container>\n</div>\n", styles: [".detail_view{display:flex;flex-direction:row;justify-content:space-between}.detail_view span{display:flex;flex-direction:column;font-size:.8125rem;width:15%;margin:0 7px 0 0}.detail_view span.pickprt,.detail_view span.dropprt{width:20%}.detail_view span label{font-size:.8125rem;font-weight:400;color:#767676;padding-bottom:8px}.detail_view span b{font-weight:500}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
849
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: JobcodeOverviewComponent, decorators: [{
850
+ type: Component,
851
+ args: [{ selector: 'app-jobcode-overview', template: "<div class=\"detail_view m-40\">\n <ng-container *ngFor=\"let item of label\">\n <span [class.pickprt]=\"item === 'pickup_location'\" [class.dropprt]=\"item === 'delivery_location'\">\n <label>{{overViewEnum[item]}}</label>\n <b> {{jobValue[item] ? jobValue[item] : 'N/A'}} </b>\n </span>\n </ng-container>\n</div>\n", styles: [".detail_view{display:flex;flex-direction:row;justify-content:space-between}.detail_view span{display:flex;flex-direction:column;font-size:.8125rem;width:15%;margin:0 7px 0 0}.detail_view span.pickprt,.detail_view span.dropprt{width:20%}.detail_view span label{font-size:.8125rem;font-weight:400;color:#767676;padding-bottom:8px}.detail_view span b{font-weight:500}\n"] }]
852
+ }], ctorParameters: function () { return []; }, propDecorators: { jobValue: [{
853
+ type: Input
854
+ }] } });
855
+
856
+ class JobCodeComponent {
857
+ constructor(utils, coolMap, config) {
858
+ this.utils = utils;
859
+ this.coolMap = coolMap;
860
+ this.config = config;
861
+ this.isVisible = false;
862
+ this.routes = [];
863
+ this.selectedRoute = new SelectionModel(true, []);
864
+ this.clearJobDetails = new EventEmitter();
865
+ this.isOverlapRouteSection = false;
866
+ this.destroyer$ = new Subject();
867
+ this.preventMouseout = false;
868
+ this.utils.clearViewRouteforJobCodeObserve.pipe(takeUntil(this.destroyer$)).subscribe(res => {
869
+ if (res)
870
+ this.coolMap.removeJobFromMap(this.selectedRoute.selected);
871
+ this.selectedRoute.clear();
872
+ });
873
+ }
874
+ ngOnInit() { this.checkAndCallRouteList(); }
875
+ checkAndCallRouteList() {
876
+ if (this.config.repository === 'customer') {
877
+ this.utils.fetchUnitsList().then((res) => {
878
+ this.unitList = res;
879
+ this.utils.fetchMaterialsList().then((res) => {
880
+ this.materialsList = res;
881
+ this.getRouteListForCustomer();
882
+ });
883
+ });
884
+ }
885
+ else {
886
+ this.getRouteListForCoolMap();
887
+ }
888
+ }
889
+ getUnitName(data) {
890
+ let unitName = '';
891
+ this.unitList.map((res) => {
892
+ if (res.id === data.unit_id) {
893
+ unitName = res.type;
894
+ }
895
+ });
896
+ return unitName;
897
+ }
898
+ getMaterialName(data) {
899
+ let materialName = '';
900
+ this.materialsList.map((res) => {
901
+ if (res.material_id === data.material_id) {
902
+ materialName = res.material;
903
+ }
904
+ });
905
+ return materialName;
906
+ }
907
+ getRouteListForCoolMap() {
908
+ this.utils.getData('routes/all').pipe(takeUntil(this.destroyer$)).subscribe((res) => {
909
+ if (res) {
910
+ this.routes = res.data;
911
+ this.masterRoutes = res.data;
912
+ this.preventListUpdate = false;
913
+ this.utils.clearOptions();
914
+ }
915
+ });
916
+ }
917
+ getRouteListForCustomer() {
918
+ const dataset = {
919
+ customer_id: this.customerRepoDetails.customer.id
920
+ };
921
+ this.utils.postdata('routes/all', dataset).pipe(takeUntil(this.destroyer$)).subscribe((res) => {
922
+ if (res) {
923
+ this.routes = res.data;
924
+ this.preventListUpdate = false;
925
+ this.utils.clearOptions();
926
+ this.routes.map((ele) => {
927
+ ele.unit = this.getUnitName(ele);
928
+ ele.material = this.getMaterialName(ele);
929
+ this.utils.makeOptions(ele);
930
+ });
931
+ this.masterRoutes = this.routes;
932
+ this.routes.forEach((ele) => { this.utils.makeOptions(ele); });
933
+ }
934
+ });
935
+ }
936
+ toggleSidemenu() {
937
+ this.isVisible = !this.isVisible;
938
+ this.detailsCardEnable = false;
939
+ this.preventMouseout = false;
940
+ }
941
+ clearJob() { this.clearJobDetails.emit(true); this.utils.preVentJobdetailclose.next(false); }
942
+ selectRoute(event) {
943
+ const i = this.selectedRoute.selected.findIndex(ele => ele['order_number'] === event['order_number']);
944
+ this.selectedRoute.toggle(event);
945
+ if (!this.selectedRoute.isSelected(event) && event['route_id']) {
946
+ this.coolMap.removeRouteAndMarker(event['route_id']).then((res) => {
947
+ this.coolMap.extendReBound();
948
+ });
949
+ }
950
+ else {
951
+ this.coolMap.plotRoute(event, event['route_id'], 'jobrouteList', false, true);
952
+ }
953
+ }
954
+ masterToggle() {
955
+ if (this.routes.length === this.selectedRoute.selected.length) {
956
+ this.selectedRoute.clear();
957
+ this.routes.forEach(row => {
958
+ this.coolMap.removeRouteAndMarker(row['route_id']).then((res) => { this.coolMap.extendReBound(); });
959
+ });
960
+ }
961
+ else {
962
+ this.routes.forEach(row => {
963
+ this.selectedRoute.select(row);
964
+ this.coolMap.plotRoute(row, row['route_id'], 'jobrouteList', false, true);
965
+ });
966
+ }
967
+ }
968
+ togglerouteDetails(eventType, route, mouseOut) {
969
+ if (typeof (eventType) === 'string') {
970
+ this.preventMouseout = true;
971
+ this.utils.setdictValue('route-details', JSON.stringify(route));
972
+ }
973
+ if (typeof (eventType) === 'boolean' && eventType && !this.preventMouseout) {
974
+ this.detailsCardEnable = eventType;
975
+ }
976
+ ;
977
+ if (typeof (eventType) === 'boolean' && !eventType && !this.preventMouseout) {
978
+ this.detailsCardEnable = eventType;
979
+ }
980
+ ;
981
+ if (this.preventMouseout && !this.detailsCardEnable)
982
+ this.preventMouseout = false;
983
+ if (mouseOut) {
984
+ if (this.preventMouseout) {
985
+ route = this.utils.getdictValue('route-details');
986
+ this.routeCardDetail = route;
987
+ }
988
+ if (!this.preventMouseout) {
989
+ this.routeCardDetail = route;
990
+ }
991
+ }
992
+ else {
993
+ this.routeCardDetail = route;
994
+ }
995
+ this.routeCardDetail['created_at'] = this.utils.getDateFormat(new Date(this.routeCardDetail['created_at']), '/');
996
+ }
997
+ ngOnDestroy() {
998
+ this.destroyer$.next(true);
999
+ this.destroyer$.unsubscribe();
1000
+ }
1001
+ }
1002
+ JobCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: JobCodeComponent, deps: [{ token: i1.UtilsService }, { token: i1.CoolmapService }, { token: 'memberData' }], target: i0.ɵɵFactoryTarget.Component });
1003
+ JobCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: JobCodeComponent, selector: "app-job-code", inputs: { jobdetail: "jobdetail", customerRepoDetails: "customerRepoDetails" }, outputs: { clearJobDetails: "clearJobDetails" }, ngImport: i0, template: "<div class=\"jobcode_detailprt\" (click)=\"isOverlapRouteSection = false\" *ngIf=\"jobdetail\" [ngClass]=\"{'overlap': !isOverlapRouteSection}\" cdkDrag>\n <div class=\"topheadingprt\" *ngIf=\"jobdetail['order_number']\">\n <h2>{{jobdetail['order_number']}}</h2>\n </div>\n <span class=\"close\"><mat-icon (click)=\"clearJob()\">clear</mat-icon></span>\n <div class=\"job_details_area\">\n <div class=\"detailnameprt\">\n <span> <b> {{jobdetail.customer_name}} </b> Customer </span>\n <app-jobcode-status [jobValue]=\"jobdetail\"></app-jobcode-status>\n </div>\n <app-jobcode-overview [jobValue]=\"jobdetail\"></app-jobcode-overview>\n </div>\n</div>\n\n<div class=\"route_listprt\" (click)=\"isOverlapRouteSection = true\" [ngClass]=\"{ 'show': isVisible, 'overlap': isOverlapRouteSection}\">\n <div class=\"listing_toggle\" (click)=\"toggleSidemenu()\">\n <img src=\"assets/images/route.svg\" alt=\"\" />\n </div>\n\n <div class=\"listing_box\">\n <div class=\"closebtn\" (click)=\"toggleSidemenu()\">\n <mat-icon>clear</mat-icon>\n </div>\n\n <div class=\"btnprt\">\n <h2> List of Routes </h2>\n <button (click)=\"masterToggle()\">{{routes && routes.length > 0 && routes.length === selectedRoute.selected.length ? 'Uncheck' : 'Check'}} All</button>\n </div>\n\n <app-job-route-list [routes]=\"routes\" [masterRoutes]=\"masterRoutes\" [selectedRoute]=\"selectedRoute\" (changeRoutes)=\"routes = $event\" (changeSelectedRoute)=\"selectedRoute = $event\"></app-job-route-list>\n\n <perfect-scrollbar>\n <ul *ngIf=\"routes['length'] > 0\">\n <li *ngFor=\"let list of routes\">\n <div class=\"iconprt\">\n <span>\n <input type=\"checkbox\" [checked]=\"selectedRoute.isSelected(list)\"\n (change)=\"$event ? selectRoute(list) : null\" /><label>&nbsp;</label>\n <div class=\"border\"></div>\n </span>\n <div class=\"statusunit\" [ngClass]=\"list['unit']\">{{list['unit']}}</div>\n <div class=\"infoicon\">\n <img (mouseenter)=\"togglerouteDetails(true, list)\" (mouseout)=\"togglerouteDetails(false, list, true)\"\n (click)=\"togglerouteDetails('click', list)\" src=\"assets/images/info_icon.png\" [alt]=\"\" />\n </div>\n </div>\n <div class=\"pickprtbox\">\n <h2> {{list['route_name']}} </h2>\n <h3>{{list['customer_name']}} | {{list['material']}}</h3>\n <div class=\"pickdropprt\">\n <div class=\"pickprt\">\n <b>\n <h4>{{list['pickup_location']}}</h4>\n </b>\n </div>\n <div class=\"dropprt\">\n <b>\n <h4>{{list['delivery_location']}}</h4>\n </b>\n </div>\n </div>\n </div>\n </li>\n </ul>\n <p style=\"color: #fff;\" *ngIf=\"routes.length === 0\">No Route found</p>\n </perfect-scrollbar>\n </div>\n\n <div class=\"route_detail\" *ngIf=\"detailsCardEnable\">\n <div class=\"closebtnroutedetail\" (click)=\"detailsCardEnable = false; preventMouseout = false\">\n <mat-icon>clear</mat-icon>\n </div>\n <div class=\"destination\">\n <div class=\"duration\">\n <p class=\"pickprt\"><b>Pickup:</b> {{routeCardDetail?.pickup_location}}</p>\n <p class=\"dropprt\"><b>Delivery:</b> {{routeCardDetail?.delivery_location}} </p>\n </div>\n <span><b>Name:</b> {{routeCardDetail?.route_name}}</span>\n <span><b>Customer:</b> {{routeCardDetail?.customer_name}}</span>\n <span><b>Material:</b> {{routeCardDetail?.material}}</span>\n <span><b>Type:</b> {{routeCardDetail?.unit}}</span>\n <span><b>Distance:</b> {{routeCardDetail?.estimated_distance}}</span>\n <span><b>Travel Time:</b> {{routeCardDetail?.estimated_time}}</span>\n <span class=\"notes\"><b>Notes:</b> {{routeCardDetail?.note}}</span>\n </div>\n\n <div class=\"createTxt\">\n <small>\n Created by {{routeCardDetail?.created_by_name}} on {{routeCardDetail?.created_at}}\n </small>\n </div>\n </div>\n</div>\n", styles: [".jobcode_detailprt{position:absolute;left:300px;bottom:10px;background:white;padding:10px 20px;border-radius:20px;width:calc(100% - 315px);z-index:999;box-shadow:0 0 5px #0000001a;height:250px;cursor:move}@media (min-width: 1600px){.jobcode_detailprt{left:307px;width:calc(100% - 325px)}}.jobcode_detailprt .topheadingprt .driver_list ul{display:flex;width:450px;justify-content:flex-end}.jobcode_detailprt .topheadingprt .driver_list ul li{position:relative;margin:0 -6px 2px 0;cursor:pointer}.jobcode_detailprt .topheadingprt .driver_list ul li img{width:30px;height:30px;border-radius:100%;border:1px solid #fff}.jobcode_detailprt .topheadingprt .driver_list ul li:hover .driver_detail{display:flex}.jobcode_detailprt .topheadingprt .driver_list ul li .driver_detail{position:absolute;top:-70px;left:-50px;display:none;will-change:transform;pointer-events:none;border-radius:10px;box-shadow:0 4px 4px #00000024;width:133px;background:white;text-align:center;padding:10px;flex-direction:column;font-size:.8125rem}.jobcode_detailprt .topheadingprt .driver_list ul li .driver_detail b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:135px}.jobcode_detailprt .topheadingprt .driver_list ul li .driver_detail span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:117px;display:block}.jobcode_detailprt .topheadingprt .driver_list ul li .driver_detail:after{width:0;height:0;border-top:15px solid white;border-left:10px solid transparent;border-right:10px solid transparent;z-index:1;content:\"\";position:absolute;filter:drop-shadow(0px 3px 1px rgba(0,0,0,.2));bottom:-14px;left:50%;transform:translate(-50%)}.jobcode_detailprt .topheadingprt .driver_list ul li.extraicon{background:white;width:30px;height:30px;border-radius:100%;display:flex;justify-content:center;align-items:center;margin:0 0 0 10px;border:1px solid #eee}.jobcode_detailprt .close{position:absolute;top:10px;right:20px;background:#e8e8e8;border-radius:100%;width:30px;height:30px;display:flex;justify-content:center;align-items:center;cursor:pointer}@keyframes autoslide{to{transform:translate(calc(90vw - 100%))}0%{transform:translate(0)}}.jobcode_detailprt .job_details_area{padding:15px 0}.jobcode_detailprt .job_details_area .detailnameprt{display:flex;justify-content:space-between}.jobcode_detailprt .job_details_area .detailnameprt span{display:flex;flex-direction:column;font-size:.875rem;color:#767676}.jobcode_detailprt .job_details_area .detailnameprt span b{font-size:.9375rem;font-weight:500;color:#000}.route_listprt .listing_toggle{background:white;border-radius:15px;padding:5px;position:absolute;right:10px;top:20px;cursor:pointer}.route_listprt .listing_toggle img{width:28px}.route_listprt .listing_box{background:#282828;height:100vh;position:fixed;right:0;top:0;z-index:1111;box-shadow:-3px 0 5px #ffffff14;transition:.5s;-webkit-transition:.5s;-moz-transition:.5s;width:0;border-radius:40px 0 0;opacity:0}.route_listprt .listing_box .closebtn{display:none}.route_listprt .listing_box ul{padding:0 20px 0 0}.route_listprt .listing_box ul li{background:#4a4a4a;padding:10px 15px;border-radius:15px;display:flex;margin-bottom:10px;position:relative;height:inherit}@media (min-width: 1600px){.route_listprt .listing_box ul li{padding:6px 15px;margin-bottom:5px}}.route_listprt .listing_box ul li .iconprt{display:flex;flex-direction:column}.route_listprt .listing_box ul li .iconprt span{display:flex;align-items:center;margin-bottom:32px}.route_listprt .listing_box ul li .iconprt span input[type=checkbox]{width:100%;height:100%;margin-right:10px;opacity:0;position:absolute;left:0;margin-left:0;top:0;z-index:3;cursor:pointer}.route_listprt .listing_box ul li .iconprt span input[type=checkbox]:checked+label{background:url(../../../assets/images/fill-check.png) 16px 15px no-repeat}.route_listprt .listing_box ul li .iconprt span label{background:url(../../../assets/images/blank-check.png) 16px 15px no-repeat;width:100%;position:relative;z-index:2;font-size:12px;color:#878787;height:100%;position:absolute;top:0;left:0}.route_listprt .listing_box ul li .iconprt span .border{position:absolute;width:100%;height:100%;left:0;right:0;top:0;border-radius:15px}.route_listprt .listing_box ul li .iconprt span input:checked~.border{border-left:1px solid white;border-right:1px solid white;border-top:1px solid white;border-bottom:1px solid white}.route_listprt .listing_box ul li .iconprt span h2{margin-left:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px;padding-left:16px;font-size:.9rem;margin-bottom:0;font-weight:400;margin-top:0}.route_listprt .listing_box ul li .iconprt .statusunit{border-radius:30px;font-size:0;color:#fff;text-transform:capitalize;font-weight:500;width:20px;height:20px;text-align:center;line-height:20px;margin-bottom:7px}.route_listprt .listing_box ul li .iconprt .statusunit:first-letter{font-size:.8rem}.route_listprt .listing_box ul li .iconprt .statusunit.Ton{background:#ff7272}.route_listprt .listing_box ul li .iconprt .statusunit.Load{background:#a3c52e}.route_listprt .listing_box ul li .iconprt .statusunit.Hourly{background:#ae23d1}@media (min-width: 1600px){.route_listprt .listing_box ul li .iconprt .statusunit{line-height:21px}}.route_listprt .listing_box ul li .iconprt .infoicon{z-index:5;cursor:pointer}.route_listprt .listing_box ul li .iconprt .infoicon img{width:20px;height:20px}.route_listprt .listing_box ul li .pickprtbox{margin-left:10px}.route_listprt .listing_box ul li .pickprtbox h2{font-size:.9rem;margin:3px 0 5px;white-space:nowrap;text-overflow:ellipsis;max-width:195px;overflow:hidden}.route_listprt .listing_box ul li h3{font-size:.8rem;color:#979797;font-weight:600;margin-top:0;white-space:nowrap;text-overflow:ellipsis;max-width:195px;overflow:hidden;margin-bottom:5px}.route_listprt .listing_box ul li .pickdropprt{font-size:.75rem}.route_listprt .listing_box ul li .pickdropprt .pickprt{position:relative;display:flex;align-items:center;padding-bottom:10px}.route_listprt .listing_box ul li .pickdropprt .pickprt span{padding-left:0;padding-right:20px;display:block}.route_listprt .listing_box ul li .pickdropprt .pickprt b{position:relative}.route_listprt .listing_box ul li .pickdropprt .pickprt b:after{background:#bcbcbc;width:1px;height:100%;left:3px;content:\"\";position:absolute;top:10px}.route_listprt .listing_box ul li .pickdropprt .pickprt h4{position:relative;padding-left:15px;margin:0;line-height:18px;color:#bcbcbc;font-weight:400;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.route_listprt .listing_box ul li .pickdropprt .pickprt h4:before{background:#bcbcbc;top:4px;left:0;position:absolute;content:\"\";width:7px;height:7px;border-radius:100%}.route_listprt .listing_box ul li .pickdropprt .dropprt{position:relative;padding-bottom:10px;display:flex;align-items:center}.route_listprt .listing_box ul li .pickdropprt .dropprt span{padding-left:0;padding-right:20px;display:block}.route_listprt .listing_box ul li .pickdropprt .dropprt b{position:relative}.route_listprt .listing_box ul li .pickdropprt .dropprt b:after{background:#bcbcbc;width:1px;height:12px;left:3px;content:\"\";position:absolute;top:-7px}.route_listprt .listing_box ul li .pickdropprt .dropprt h4{position:relative;padding-left:15px;margin:0;line-height:18px;color:#bcbcbc;font-weight:400;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.route_listprt .listing_box ul li .pickdropprt .dropprt h4:before{background:#bcbcbc;top:4px;left:0;position:absolute;content:\"\";width:7px;height:7px;border-radius:100%}.route_listprt.show .listing_box{width:300px;max-width:300px;flex:0 0 350px;transition:.5s;-webkit-transition:.5s;-moz-transition:.5s;padding:40px 0 40px 20px;opacity:1}.route_listprt.show .listing_box h2{color:#fff;white-space:nowrap}.route_listprt.show .listing_box .closebtn{position:absolute;left:-33px;top:50px;background:#282828;color:#fff;padding:8px;border-top-left-radius:15px;border-bottom-left-radius:15px;cursor:pointer;box-shadow:-4px 2px 5px #ffffff14;display:block}.overlap{z-index:9999}.btnprt{display:flex;justify-content:space-between;align-items:center;padding-right:20px}.btnprt h2{margin:0}.btnprt button{font-size:15px;padding:8px 20px;background-color:#326ad3;color:#fff;border:none;border-radius:10px;box-shadow:none;outline:none}.hidden{display:none}.route_detail{background:#282828;position:absolute;width:260px;top:50%;transform:translateY(-50%);right:310px;border-radius:20px;padding:10px;box-shadow:0 0 5px #ffffff36}.route_detail .destination .duration{background:#444343;border:1px solid #918e8e;padding:10px;color:#fff}.route_detail .destination .duration b{color:#fff}.route_detail .destination .pickprt:before,.route_detail .destination .dropprt:before{background:#fff}.route_detail .destination .pickprt b:before,.route_detail .destination .dropprt b:before{background:#fff}.route_detail .destination span{line-height:20px;color:#fff;padding:3px 0}.route_detail .destination span b{color:#fff}.route_detail .destination span.notes{max-height:200px;overflow:auto}.createTxt small{color:#fff;font-size:.7rem}.closebtnroutedetail{box-shadow:0 0 5px #0000001c;border-radius:100%;width:30px;height:30px;display:flex;justify-content:center;align-items:center;cursor:pointer;background:#f5f5f5;position:absolute;top:-7px;left:-11px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.PerfectScrollbarComponent, selector: "perfect-scrollbar", inputs: ["disabled", "usePSClass", "autoPropagation", "scrollIndicators", "config"], outputs: ["psScrollY", "psScrollX", "psScrollUp", "psScrollDown", "psScrollLeft", "psScrollRight", "psYReachEnd", "psYReachStart", "psXReachEnd", "psXReachStart"], exportAs: ["ngxPerfectScrollbar"] }, { kind: "component", type: JobRouteListComponent, selector: "app-job-route-list", inputs: ["routes", "selectedRoute", "masterRoutes"], outputs: ["changeNav", "changeRoutes", "changeSelectedRoute"] }, { kind: "component", type: JobcodeStatusComponent, selector: "app-jobcode-status", inputs: ["jobValue"] }, { kind: "component", type: JobcodeOverviewComponent, selector: "app-jobcode-overview", inputs: ["jobValue"] }] });
1004
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: JobCodeComponent, decorators: [{
1005
+ type: Component,
1006
+ args: [{ selector: 'app-job-code', template: "<div class=\"jobcode_detailprt\" (click)=\"isOverlapRouteSection = false\" *ngIf=\"jobdetail\" [ngClass]=\"{'overlap': !isOverlapRouteSection}\" cdkDrag>\n <div class=\"topheadingprt\" *ngIf=\"jobdetail['order_number']\">\n <h2>{{jobdetail['order_number']}}</h2>\n </div>\n <span class=\"close\"><mat-icon (click)=\"clearJob()\">clear</mat-icon></span>\n <div class=\"job_details_area\">\n <div class=\"detailnameprt\">\n <span> <b> {{jobdetail.customer_name}} </b> Customer </span>\n <app-jobcode-status [jobValue]=\"jobdetail\"></app-jobcode-status>\n </div>\n <app-jobcode-overview [jobValue]=\"jobdetail\"></app-jobcode-overview>\n </div>\n</div>\n\n<div class=\"route_listprt\" (click)=\"isOverlapRouteSection = true\" [ngClass]=\"{ 'show': isVisible, 'overlap': isOverlapRouteSection}\">\n <div class=\"listing_toggle\" (click)=\"toggleSidemenu()\">\n <img src=\"assets/images/route.svg\" alt=\"\" />\n </div>\n\n <div class=\"listing_box\">\n <div class=\"closebtn\" (click)=\"toggleSidemenu()\">\n <mat-icon>clear</mat-icon>\n </div>\n\n <div class=\"btnprt\">\n <h2> List of Routes </h2>\n <button (click)=\"masterToggle()\">{{routes && routes.length > 0 && routes.length === selectedRoute.selected.length ? 'Uncheck' : 'Check'}} All</button>\n </div>\n\n <app-job-route-list [routes]=\"routes\" [masterRoutes]=\"masterRoutes\" [selectedRoute]=\"selectedRoute\" (changeRoutes)=\"routes = $event\" (changeSelectedRoute)=\"selectedRoute = $event\"></app-job-route-list>\n\n <perfect-scrollbar>\n <ul *ngIf=\"routes['length'] > 0\">\n <li *ngFor=\"let list of routes\">\n <div class=\"iconprt\">\n <span>\n <input type=\"checkbox\" [checked]=\"selectedRoute.isSelected(list)\"\n (change)=\"$event ? selectRoute(list) : null\" /><label>&nbsp;</label>\n <div class=\"border\"></div>\n </span>\n <div class=\"statusunit\" [ngClass]=\"list['unit']\">{{list['unit']}}</div>\n <div class=\"infoicon\">\n <img (mouseenter)=\"togglerouteDetails(true, list)\" (mouseout)=\"togglerouteDetails(false, list, true)\"\n (click)=\"togglerouteDetails('click', list)\" src=\"assets/images/info_icon.png\" [alt]=\"\" />\n </div>\n </div>\n <div class=\"pickprtbox\">\n <h2> {{list['route_name']}} </h2>\n <h3>{{list['customer_name']}} | {{list['material']}}</h3>\n <div class=\"pickdropprt\">\n <div class=\"pickprt\">\n <b>\n <h4>{{list['pickup_location']}}</h4>\n </b>\n </div>\n <div class=\"dropprt\">\n <b>\n <h4>{{list['delivery_location']}}</h4>\n </b>\n </div>\n </div>\n </div>\n </li>\n </ul>\n <p style=\"color: #fff;\" *ngIf=\"routes.length === 0\">No Route found</p>\n </perfect-scrollbar>\n </div>\n\n <div class=\"route_detail\" *ngIf=\"detailsCardEnable\">\n <div class=\"closebtnroutedetail\" (click)=\"detailsCardEnable = false; preventMouseout = false\">\n <mat-icon>clear</mat-icon>\n </div>\n <div class=\"destination\">\n <div class=\"duration\">\n <p class=\"pickprt\"><b>Pickup:</b> {{routeCardDetail?.pickup_location}}</p>\n <p class=\"dropprt\"><b>Delivery:</b> {{routeCardDetail?.delivery_location}} </p>\n </div>\n <span><b>Name:</b> {{routeCardDetail?.route_name}}</span>\n <span><b>Customer:</b> {{routeCardDetail?.customer_name}}</span>\n <span><b>Material:</b> {{routeCardDetail?.material}}</span>\n <span><b>Type:</b> {{routeCardDetail?.unit}}</span>\n <span><b>Distance:</b> {{routeCardDetail?.estimated_distance}}</span>\n <span><b>Travel Time:</b> {{routeCardDetail?.estimated_time}}</span>\n <span class=\"notes\"><b>Notes:</b> {{routeCardDetail?.note}}</span>\n </div>\n\n <div class=\"createTxt\">\n <small>\n Created by {{routeCardDetail?.created_by_name}} on {{routeCardDetail?.created_at}}\n </small>\n </div>\n </div>\n</div>\n", styles: [".jobcode_detailprt{position:absolute;left:300px;bottom:10px;background:white;padding:10px 20px;border-radius:20px;width:calc(100% - 315px);z-index:999;box-shadow:0 0 5px #0000001a;height:250px;cursor:move}@media (min-width: 1600px){.jobcode_detailprt{left:307px;width:calc(100% - 325px)}}.jobcode_detailprt .topheadingprt .driver_list ul{display:flex;width:450px;justify-content:flex-end}.jobcode_detailprt .topheadingprt .driver_list ul li{position:relative;margin:0 -6px 2px 0;cursor:pointer}.jobcode_detailprt .topheadingprt .driver_list ul li img{width:30px;height:30px;border-radius:100%;border:1px solid #fff}.jobcode_detailprt .topheadingprt .driver_list ul li:hover .driver_detail{display:flex}.jobcode_detailprt .topheadingprt .driver_list ul li .driver_detail{position:absolute;top:-70px;left:-50px;display:none;will-change:transform;pointer-events:none;border-radius:10px;box-shadow:0 4px 4px #00000024;width:133px;background:white;text-align:center;padding:10px;flex-direction:column;font-size:.8125rem}.jobcode_detailprt .topheadingprt .driver_list ul li .driver_detail b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:135px}.jobcode_detailprt .topheadingprt .driver_list ul li .driver_detail span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:117px;display:block}.jobcode_detailprt .topheadingprt .driver_list ul li .driver_detail:after{width:0;height:0;border-top:15px solid white;border-left:10px solid transparent;border-right:10px solid transparent;z-index:1;content:\"\";position:absolute;filter:drop-shadow(0px 3px 1px rgba(0,0,0,.2));bottom:-14px;left:50%;transform:translate(-50%)}.jobcode_detailprt .topheadingprt .driver_list ul li.extraicon{background:white;width:30px;height:30px;border-radius:100%;display:flex;justify-content:center;align-items:center;margin:0 0 0 10px;border:1px solid #eee}.jobcode_detailprt .close{position:absolute;top:10px;right:20px;background:#e8e8e8;border-radius:100%;width:30px;height:30px;display:flex;justify-content:center;align-items:center;cursor:pointer}@keyframes autoslide{to{transform:translate(calc(90vw - 100%))}0%{transform:translate(0)}}.jobcode_detailprt .job_details_area{padding:15px 0}.jobcode_detailprt .job_details_area .detailnameprt{display:flex;justify-content:space-between}.jobcode_detailprt .job_details_area .detailnameprt span{display:flex;flex-direction:column;font-size:.875rem;color:#767676}.jobcode_detailprt .job_details_area .detailnameprt span b{font-size:.9375rem;font-weight:500;color:#000}.route_listprt .listing_toggle{background:white;border-radius:15px;padding:5px;position:absolute;right:10px;top:20px;cursor:pointer}.route_listprt .listing_toggle img{width:28px}.route_listprt .listing_box{background:#282828;height:100vh;position:fixed;right:0;top:0;z-index:1111;box-shadow:-3px 0 5px #ffffff14;transition:.5s;-webkit-transition:.5s;-moz-transition:.5s;width:0;border-radius:40px 0 0;opacity:0}.route_listprt .listing_box .closebtn{display:none}.route_listprt .listing_box ul{padding:0 20px 0 0}.route_listprt .listing_box ul li{background:#4a4a4a;padding:10px 15px;border-radius:15px;display:flex;margin-bottom:10px;position:relative;height:inherit}@media (min-width: 1600px){.route_listprt .listing_box ul li{padding:6px 15px;margin-bottom:5px}}.route_listprt .listing_box ul li .iconprt{display:flex;flex-direction:column}.route_listprt .listing_box ul li .iconprt span{display:flex;align-items:center;margin-bottom:32px}.route_listprt .listing_box ul li .iconprt span input[type=checkbox]{width:100%;height:100%;margin-right:10px;opacity:0;position:absolute;left:0;margin-left:0;top:0;z-index:3;cursor:pointer}.route_listprt .listing_box ul li .iconprt span input[type=checkbox]:checked+label{background:url(../../../assets/images/fill-check.png) 16px 15px no-repeat}.route_listprt .listing_box ul li .iconprt span label{background:url(../../../assets/images/blank-check.png) 16px 15px no-repeat;width:100%;position:relative;z-index:2;font-size:12px;color:#878787;height:100%;position:absolute;top:0;left:0}.route_listprt .listing_box ul li .iconprt span .border{position:absolute;width:100%;height:100%;left:0;right:0;top:0;border-radius:15px}.route_listprt .listing_box ul li .iconprt span input:checked~.border{border-left:1px solid white;border-right:1px solid white;border-top:1px solid white;border-bottom:1px solid white}.route_listprt .listing_box ul li .iconprt span h2{margin-left:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px;padding-left:16px;font-size:.9rem;margin-bottom:0;font-weight:400;margin-top:0}.route_listprt .listing_box ul li .iconprt .statusunit{border-radius:30px;font-size:0;color:#fff;text-transform:capitalize;font-weight:500;width:20px;height:20px;text-align:center;line-height:20px;margin-bottom:7px}.route_listprt .listing_box ul li .iconprt .statusunit:first-letter{font-size:.8rem}.route_listprt .listing_box ul li .iconprt .statusunit.Ton{background:#ff7272}.route_listprt .listing_box ul li .iconprt .statusunit.Load{background:#a3c52e}.route_listprt .listing_box ul li .iconprt .statusunit.Hourly{background:#ae23d1}@media (min-width: 1600px){.route_listprt .listing_box ul li .iconprt .statusunit{line-height:21px}}.route_listprt .listing_box ul li .iconprt .infoicon{z-index:5;cursor:pointer}.route_listprt .listing_box ul li .iconprt .infoicon img{width:20px;height:20px}.route_listprt .listing_box ul li .pickprtbox{margin-left:10px}.route_listprt .listing_box ul li .pickprtbox h2{font-size:.9rem;margin:3px 0 5px;white-space:nowrap;text-overflow:ellipsis;max-width:195px;overflow:hidden}.route_listprt .listing_box ul li h3{font-size:.8rem;color:#979797;font-weight:600;margin-top:0;white-space:nowrap;text-overflow:ellipsis;max-width:195px;overflow:hidden;margin-bottom:5px}.route_listprt .listing_box ul li .pickdropprt{font-size:.75rem}.route_listprt .listing_box ul li .pickdropprt .pickprt{position:relative;display:flex;align-items:center;padding-bottom:10px}.route_listprt .listing_box ul li .pickdropprt .pickprt span{padding-left:0;padding-right:20px;display:block}.route_listprt .listing_box ul li .pickdropprt .pickprt b{position:relative}.route_listprt .listing_box ul li .pickdropprt .pickprt b:after{background:#bcbcbc;width:1px;height:100%;left:3px;content:\"\";position:absolute;top:10px}.route_listprt .listing_box ul li .pickdropprt .pickprt h4{position:relative;padding-left:15px;margin:0;line-height:18px;color:#bcbcbc;font-weight:400;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.route_listprt .listing_box ul li .pickdropprt .pickprt h4:before{background:#bcbcbc;top:4px;left:0;position:absolute;content:\"\";width:7px;height:7px;border-radius:100%}.route_listprt .listing_box ul li .pickdropprt .dropprt{position:relative;padding-bottom:10px;display:flex;align-items:center}.route_listprt .listing_box ul li .pickdropprt .dropprt span{padding-left:0;padding-right:20px;display:block}.route_listprt .listing_box ul li .pickdropprt .dropprt b{position:relative}.route_listprt .listing_box ul li .pickdropprt .dropprt b:after{background:#bcbcbc;width:1px;height:12px;left:3px;content:\"\";position:absolute;top:-7px}.route_listprt .listing_box ul li .pickdropprt .dropprt h4{position:relative;padding-left:15px;margin:0;line-height:18px;color:#bcbcbc;font-weight:400;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.route_listprt .listing_box ul li .pickdropprt .dropprt h4:before{background:#bcbcbc;top:4px;left:0;position:absolute;content:\"\";width:7px;height:7px;border-radius:100%}.route_listprt.show .listing_box{width:300px;max-width:300px;flex:0 0 350px;transition:.5s;-webkit-transition:.5s;-moz-transition:.5s;padding:40px 0 40px 20px;opacity:1}.route_listprt.show .listing_box h2{color:#fff;white-space:nowrap}.route_listprt.show .listing_box .closebtn{position:absolute;left:-33px;top:50px;background:#282828;color:#fff;padding:8px;border-top-left-radius:15px;border-bottom-left-radius:15px;cursor:pointer;box-shadow:-4px 2px 5px #ffffff14;display:block}.overlap{z-index:9999}.btnprt{display:flex;justify-content:space-between;align-items:center;padding-right:20px}.btnprt h2{margin:0}.btnprt button{font-size:15px;padding:8px 20px;background-color:#326ad3;color:#fff;border:none;border-radius:10px;box-shadow:none;outline:none}.hidden{display:none}.route_detail{background:#282828;position:absolute;width:260px;top:50%;transform:translateY(-50%);right:310px;border-radius:20px;padding:10px;box-shadow:0 0 5px #ffffff36}.route_detail .destination .duration{background:#444343;border:1px solid #918e8e;padding:10px;color:#fff}.route_detail .destination .duration b{color:#fff}.route_detail .destination .pickprt:before,.route_detail .destination .dropprt:before{background:#fff}.route_detail .destination .pickprt b:before,.route_detail .destination .dropprt b:before{background:#fff}.route_detail .destination span{line-height:20px;color:#fff;padding:3px 0}.route_detail .destination span b{color:#fff}.route_detail .destination span.notes{max-height:200px;overflow:auto}.createTxt small{color:#fff;font-size:.7rem}.closebtnroutedetail{box-shadow:0 0 5px #0000001c;border-radius:100%;width:30px;height:30px;display:flex;justify-content:center;align-items:center;cursor:pointer;background:#f5f5f5;position:absolute;top:-7px;left:-11px}\n"] }]
1007
+ }], ctorParameters: function () {
1008
+ return [{ type: i1.UtilsService }, { type: i1.CoolmapService }, { type: i1.CoolmapConfigModel, decorators: [{
1009
+ type: Inject,
1010
+ args: ['memberData']
1011
+ }] }];
1012
+ }, propDecorators: { jobdetail: [{
1013
+ type: Input
1014
+ }], customerRepoDetails: [{
1015
+ type: Input
1016
+ }], clearJobDetails: [{
1017
+ type: Output
1018
+ }] } });
1019
+
1020
+ class DialogComponent {
1021
+ constructor(dialogRef, data) {
1022
+ this.dialogRef = dialogRef;
1023
+ this.data = data;
1024
+ this.body = 'Are you sure you want to delete?';
1025
+ this.positive = 'Delete';
1026
+ this.negative = 'Cancel';
1027
+ ['body', 'positive', 'negative'].map(elem => {
1028
+ if (this.data[elem] !== undefined) {
1029
+ this[elem] = this.data[elem];
1030
+ }
1031
+ });
1032
+ }
1033
+ onClose(result) { this.dialogRef.close(result); }
1034
+ }
1035
+ DialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogComponent, deps: [{ token: i1$1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
1036
+ DialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DialogComponent, selector: "app-dialog", ngImport: i0, template: "<div class=\"dialogbox\">\n <h2>{{body}}</h2>\n <div class=\"twobtnprt\">\n <button class=\"delbtn\" (click)=\"onClose(true)\">{{positive}}</button>\n <button class=\"closebtn\" (click)=\"onClose(false)\">{{negative}}</button>\n </div>\n</div>\n", styles: [".dialogbox{display:flex;flex-direction:column}.dialogbox h2{font-size:1.5rem}.dialogbox .twobtnprt{display:flex;justify-content:center;margin-top:10px}.closebtn{background:black;color:#fff;border-radius:30px;padding:10px 18px;margin:0 10px;font-size:1rem}.delbtn{background:red;color:#fff;border-radius:30px;padding:10px 18px;margin:0 10px;font-size:1rem}\n"] });
1037
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogComponent, decorators: [{
1038
+ type: Component,
1039
+ args: [{ selector: 'app-dialog', template: "<div class=\"dialogbox\">\n <h2>{{body}}</h2>\n <div class=\"twobtnprt\">\n <button class=\"delbtn\" (click)=\"onClose(true)\">{{positive}}</button>\n <button class=\"closebtn\" (click)=\"onClose(false)\">{{negative}}</button>\n </div>\n</div>\n", styles: [".dialogbox{display:flex;flex-direction:column}.dialogbox h2{font-size:1.5rem}.dialogbox .twobtnprt{display:flex;justify-content:center;margin-top:10px}.closebtn{background:black;color:#fff;border-radius:30px;padding:10px 18px;margin:0 10px;font-size:1rem}.delbtn{background:red;color:#fff;border-radius:30px;padding:10px 18px;margin:0 10px;font-size:1rem}\n"] }]
1040
+ }], ctorParameters: function () {
1041
+ return [{ type: i1$1.MatDialogRef }, { type: undefined, decorators: [{
1042
+ type: Inject,
1043
+ args: [MAT_DIALOG_DATA]
1044
+ }] }];
1045
+ } });
1046
+
1047
+ class EstimationDisplayComponent {
1048
+ constructor() {
1049
+ this.label = EstinationData;
1050
+ this.Estinationlabel = EstinationEnum;
1051
+ }
1052
+ }
1053
+ EstimationDisplayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EstimationDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1054
+ EstimationDisplayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: EstimationDisplayComponent, selector: "app-estimation-display", inputs: { value: "value" }, ngImport: i0, template: "<div class=\"d-flex\">\n <ng-container *ngFor=\"let item of label\">\n <span *ngIf=\"value[item]\" class=\"estimate\" (mousedown)=\"$event.stopPropagation()\">\n Estimation of {{Estinationlabel[item]}} - <b>{{value[item]}}</b>\n </span>\n </ng-container>\n</div>\n", styles: [".estimate{margin-right:20px;font-size:.7rem}@media (min-width: 1600px){.estimate{font-size:.95rem}}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1055
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EstimationDisplayComponent, decorators: [{
1056
+ type: Component,
1057
+ args: [{ selector: 'app-estimation-display', template: "<div class=\"d-flex\">\n <ng-container *ngFor=\"let item of label\">\n <span *ngIf=\"value[item]\" class=\"estimate\" (mousedown)=\"$event.stopPropagation()\">\n Estimation of {{Estinationlabel[item]}} - <b>{{value[item]}}</b>\n </span>\n </ng-container>\n</div>\n", styles: [".estimate{margin-right:20px;font-size:.7rem}@media (min-width: 1600px){.estimate{font-size:.95rem}}\n"] }]
1058
+ }], ctorParameters: function () { return []; }, propDecorators: { value: [{
1059
+ type: Input
1060
+ }] } });
1061
+
1062
+ class AddRouteComponent {
1063
+ constructor(coolMapService, utils, dialog, config) {
1064
+ this.coolMapService = coolMapService;
1065
+ this.utils = utils;
1066
+ this.dialog = dialog;
1067
+ this.config = config;
1068
+ this.changeNav = new EventEmitter();
1069
+ this.updateRouteList = new EventEmitter();
1070
+ this.pickupOptions = [];
1071
+ this.deliveryOptions = [];
1072
+ this.requestParmsForRouteDetails = { pickup_lat_lng: '', delivery_lat_lng: '' };
1073
+ this.customersList = [];
1074
+ this.unitsList = [];
1075
+ this.materialsList = [];
1076
+ this.preventSave = false;
1077
+ this.preventInitialSave = false;
1078
+ this.destroyer$ = new Subject();
1079
+ this.enablePopUp = false;
1080
+ this.prevantPopupClose = false;
1081
+ this.enableForm = false;
1082
+ this.utils.fetchMaterialsList().then((res) => {
1083
+ this.materialsList = res;
1084
+ });
1085
+ this.utils.fetchUnitsList().then((res) => {
1086
+ this.unitsList = res;
1087
+ });
1088
+ this.formInit();
1089
+ this.utils.getrouteDetailsUtility.subscribe(res => {
1090
+ if (res) {
1091
+ if (res['event'] !== 'click' && !this.prevantPopupClose) {
1092
+ this.enablePopUp = res['event'];
1093
+ }
1094
+ else if (this.enablePopUp && !this.prevantPopupClose) {
1095
+ this.prevantPopupClose = true;
1096
+ }
1097
+ if (res['event'] !== 'click' && !res['event'] && this.prevantPopupClose) {
1098
+ this.popupDetails = this.utils.getdictValue('route-detailsv2');
1099
+ }
1100
+ else {
1101
+ this.popupDetails = res['route'];
1102
+ }
1103
+ if (this.enablePopUp)
1104
+ this.popupDetails['created_at'] = this.utils.getDateFormat(new Date(this.popupDetails['created_at']), '/');
1105
+ }
1106
+ });
1107
+ }
1108
+ filterCustomerList() {
1109
+ this.customersList$ = this.addRouteForm.controls['customer_name'].valueChanges.pipe(startWith(''), map(value => this._filter(value || '')));
1110
+ }
1111
+ _filter(value) {
1112
+ const filterValue = value.toLowerCase();
1113
+ return this.customersList.filter((option) => option['customer_name'].toLowerCase().includes(filterValue));
1114
+ }
1115
+ ngOnChanges(changes) {
1116
+ if (changes['routeData'] && !changes['routeData']['currentValue'])
1117
+ this.inIt(null);
1118
+ }
1119
+ openDialog() {
1120
+ const dialogRef = this.dialog.open(DialogComponent, {
1121
+ data: { body: 'Are you sure you want to delete this route?' },
1122
+ });
1123
+ dialogRef.afterClosed().subscribe(res => {
1124
+ if (res) {
1125
+ this.deleteRoute();
1126
+ }
1127
+ });
1128
+ }
1129
+ editEvent() {
1130
+ this.prevantPopupClose = false;
1131
+ this.enableForm = true;
1132
+ this.enablePopUp = false;
1133
+ this.popupDetails['prevent'] = false;
1134
+ this.utils.removeMapEntity.next(this.popupDetails);
1135
+ this.inIt(this.popupDetails);
1136
+ }
1137
+ inIt(changes) {
1138
+ if (changes) {
1139
+ if (!changes['prevent']) {
1140
+ this.preventSave = false;
1141
+ this.formControlValue();
1142
+ this.patchFormValue(changes);
1143
+ this.checkAndFetchRouteInformation(true);
1144
+ }
1145
+ }
1146
+ if (!changes) {
1147
+ this.enableForm = true;
1148
+ this.preventSave = true;
1149
+ this.patchFormValue();
1150
+ this.checkAndFetchRouteInformation();
1151
+ }
1152
+ }
1153
+ ngOnInit() {
1154
+ this.formControlValue();
1155
+ if (this.config.repository === 'customer') {
1156
+ this.addRouteForm.patchValue({
1157
+ customer_id: this.customerRepoDetails.customer.id,
1158
+ customer_name: this.customerRepoDetails.customer.name,
1159
+ });
1160
+ }
1161
+ else {
1162
+ this.utils.fetchCustomersList().then((res) => {
1163
+ this.customersList = res;
1164
+ this.filterCustomerList();
1165
+ this.addRouteForm.controls['customer_name'].enable();
1166
+ });
1167
+ }
1168
+ }
1169
+ ngAfterViewInit() {
1170
+ fromEvent(this.filterPickup.nativeElement, 'keyup').pipe(distinctUntilChanged(), debounceTime(150)).pipe(takeUntil(this.destroyer$)).subscribe(() => {
1171
+ this.utils.fetchAutoCompleteLocations(this.filterPickup.nativeElement.value).pipe(takeUntil(this.destroyer$)).subscribe((res) => {
1172
+ this.pickupOptions = res.features;
1173
+ });
1174
+ });
1175
+ fromEvent(this.filterDelivery.nativeElement, 'keyup').pipe(distinctUntilChanged(), debounceTime(150)).pipe(takeUntil(this.destroyer$)).subscribe(() => {
1176
+ this.utils.fetchAutoCompleteLocations(this.filterDelivery.nativeElement.value).pipe(takeUntil(this.destroyer$)).subscribe((res) => {
1177
+ this.deliveryOptions = res.features;
1178
+ });
1179
+ });
1180
+ }
1181
+ formControlValue() {
1182
+ var _a, _b;
1183
+ (_a = this.addRouteForm.controls['pickup_location']) === null || _a === void 0 ? void 0 : _a.valueChanges.pipe(takeUntil(this.destroyer$)).subscribe((res) => {
1184
+ if (this.addRouteForm.value.pickup_location && res !== this.addRouteForm.value.pickup_location) {
1185
+ this.addRouteForm.patchValue({
1186
+ pickup_lat_lng: '',
1187
+ });
1188
+ this.addRouteForm.controls['pickup_lat_lng'].markAsTouched();
1189
+ }
1190
+ });
1191
+ (_b = this.addRouteForm.controls['delivery_location']) === null || _b === void 0 ? void 0 : _b.valueChanges.pipe(takeUntil(this.destroyer$)).subscribe((res) => {
1192
+ if (this.addRouteForm.value.delivery_location && res !== this.addRouteForm.value.delivery_location) {
1193
+ this.addRouteForm.patchValue({
1194
+ delivery_lat_lng: '',
1195
+ });
1196
+ this.addRouteForm.controls['delivery_lat_lng'].markAsTouched();
1197
+ }
1198
+ });
1199
+ }
1200
+ formInit() {
1201
+ this.addRouteForm = new FormGroup({
1202
+ route_name: new FormControl('', [Validators.required]),
1203
+ customer_name: new FormControl({ value: '', disabled: true }, [Validators.required]),
1204
+ customer_id: new FormControl(''),
1205
+ materials_id: new FormControl('', [Validators.required]),
1206
+ unit_id: new FormControl('', [Validators.required]),
1207
+ path: new FormControl('', [Validators.required]),
1208
+ pickup_location: new FormControl('', [Validators.required]),
1209
+ pickup_lat_lng: new FormControl('', [Validators.required]),
1210
+ delivery_location: new FormControl('', [Validators.required]),
1211
+ delivery_lat_lng: new FormControl('', [Validators.required]),
1212
+ estimated_distance: new FormControl('', [Validators.required]),
1213
+ estimated_time: new FormControl('', [Validators.required]),
1214
+ note: new FormControl('', [Validators.maxLength(2048)]),
1215
+ });
1216
+ }
1217
+ patchFormValue(data) {
1218
+ this.addRouteForm.reset();
1219
+ this.addRouteForm.patchValue(data);
1220
+ this.routeId = data === null || data === void 0 ? void 0 : data.route_id;
1221
+ this.routeDetails = data ? { pickup_location: data.pickup_location, delivery_location: data.delivery_location } : null;
1222
+ this.addRouteForm.valueChanges.pipe(takeUntil(this.destroyer$)).subscribe(res => {
1223
+ if (res) {
1224
+ if (this.preventInitialSave)
1225
+ this.preventInitialSave = false;
1226
+ }
1227
+ });
1228
+ this.filterCustomerList();
1229
+ }
1230
+ selectedLongLat(type, event) {
1231
+ if (type === 'pickup') {
1232
+ this.addRouteForm.patchValue({
1233
+ pickup_lat_lng: (event.geometry.coordinates[1] + ',' + event.geometry.coordinates[0]).toString()
1234
+ });
1235
+ this.coolMapService.clearBoundWithCordinates();
1236
+ }
1237
+ else if (type === 'delivery') {
1238
+ this.addRouteForm.patchValue({
1239
+ delivery_lat_lng: (event.geometry.coordinates[1] + ',' + event.geometry.coordinates[0]).toString()
1240
+ });
1241
+ }
1242
+ this.checkAndFetchRouteInformation();
1243
+ }
1244
+ checkAndFetchRouteInformation(isinitial) {
1245
+ var _a, _b, _c, _d;
1246
+ if (((_b = (_a = this.addRouteForm.value) === null || _a === void 0 ? void 0 : _a.delivery_lat_lng) === null || _b === void 0 ? void 0 : _b.length) > 0 && ((_d = (_c = this.addRouteForm.value) === null || _c === void 0 ? void 0 : _c.pickup_lat_lng) === null || _d === void 0 ? void 0 : _d.length) > 0 && this.addRouteForm.value.unit_id) {
1247
+ let unit = this.unitsList.find((x) => x.id === this.addRouteForm.value.unit_id);
1248
+ const param = {
1249
+ delivery_lat_lng: this.addRouteForm.value.delivery_lat_lng,
1250
+ pickup_lat_lng: this.addRouteForm.value.pickup_lat_lng,
1251
+ unit: unit === null || unit === void 0 ? void 0 : unit.type
1252
+ };
1253
+ this.utils.postdata('calculate/routes/estimation', param).pipe(takeUntil(this.destroyer$)).subscribe((res) => {
1254
+ if (res && res['path']) {
1255
+ this.addRouteForm.patchValue({
1256
+ estimated_distance: res.dist, estimated_time: res.time, path: res.path
1257
+ });
1258
+ let path = res['path'].split(';');
1259
+ path = path.map((ele) => { return ele = this.formateLatLong(ele); });
1260
+ res['path'] = path;
1261
+ const element = {
1262
+ type: 'FeatureCollection',
1263
+ features: [{ type: 'Feature', properties: {}, geometry: { type: 'LineString', coordinates: res['path'] } }]
1264
+ };
1265
+ this.coolMapService.removeRouteAndMarker(1).then(() => {
1266
+ var _a, _b, _c;
1267
+ const unit = this.unitsList.find((x) => x.id === this.addRouteForm.value.unit_id);
1268
+ const materialDetails = this.materialsList.find((x) => x.material_id === this.addRouteForm.value.materials_id);
1269
+ this.coolMapService.loadMapProperty(element, 1, unit === null || unit === void 0 ? void 0 : unit.type, {
1270
+ pickup_location: (_a = this.addRouteForm.get('pickup_location')) === null || _a === void 0 ? void 0 : _a.value,
1271
+ delivery_location: (_b = this.addRouteForm.get('delivery_location')) === null || _b === void 0 ? void 0 : _b.value,
1272
+ route_name: (_c = this.addRouteForm.get('route_name')) === null || _c === void 0 ? void 0 : _c.value,
1273
+ material: materialDetails === null || materialDetails === void 0 ? void 0 : materialDetails.material, unit: unit === null || unit === void 0 ? void 0 : unit.type
1274
+ }).then((res) => { this.preventSave = true; });
1275
+ });
1276
+ }
1277
+ else {
1278
+ this.coolMapService.removeRouteAndMarker(1);
1279
+ this.utils.openSnackBar(res['status'], 'error');
1280
+ }
1281
+ if (this.routeId && isinitial)
1282
+ this.preventInitialSave = true;
1283
+ });
1284
+ }
1285
+ else {
1286
+ this.coolMapService.removeRouteAndMarker(1);
1287
+ }
1288
+ }
1289
+ formateLatLong(latlong) { return latlong ? latlong.split(',').map(x => +x).reverse() : null; }
1290
+ saveRoute() {
1291
+ if (this.addRouteForm.valid) {
1292
+ this.preventSave = false;
1293
+ const data = this.addRouteForm.getRawValue();
1294
+ data['trucker_pay_estimate'] = null;
1295
+ data['customer_price_estimate'] = null;
1296
+ const url = this.routeId ? this.utils.postdata('update/routes', data) : this.utils.postdata('add/routes', data);
1297
+ if (this.routeId)
1298
+ data['id'] = this.routeId;
1299
+ url.pipe(takeUntil(this.destroyer$)).subscribe((res) => {
1300
+ if (res.success) {
1301
+ this.updateRouteList.emit(true);
1302
+ this.utils.openSnackBar(res.message, 'success');
1303
+ this.preventInitialSave = true;
1304
+ this.preventSave = true;
1305
+ if (!this.routeId)
1306
+ this.changeNav.next('Addroute');
1307
+ }
1308
+ else {
1309
+ this.utils.openSnackBar(res.message, 'error');
1310
+ this.preventSave = true;
1311
+ }
1312
+ }, (err) => {
1313
+ if (err) {
1314
+ this.preventSave = true;
1315
+ }
1316
+ });
1317
+ }
1318
+ else {
1319
+ this.addRouteForm.markAllAsTouched();
1320
+ }
1321
+ }
1322
+ deleteRoute() {
1323
+ this.preventSave = false;
1324
+ this.utils.postdata('delete/routes', { uuid: this.routeId }).subscribe(res => {
1325
+ if (res['data']['success']) {
1326
+ this.utils.openSnackBar(res['data']['message'], 'success');
1327
+ this.updateRouteList.emit(true);
1328
+ this.changeNav.next('Addroute');
1329
+ this.preventInitialSave = true;
1330
+ this.preventSave = true;
1331
+ }
1332
+ else {
1333
+ this.utils.openSnackBar('Somthing went wrong', 'error');
1334
+ this.preventSave = true;
1335
+ }
1336
+ }, (err) => { this.preventSave = true; });
1337
+ }
1338
+ ngOnDestroy() {
1339
+ this.destroyer$.next(true);
1340
+ this.destroyer$.unsubscribe();
1341
+ }
1342
+ }
1343
+ AddRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AddRouteComponent, deps: [{ token: i1.CoolmapService }, { token: i1.UtilsService }, { token: i1$1.MatDialog }, { token: 'memberData' }], target: i0.ɵɵFactoryTarget.Component });
1344
+ AddRouteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: AddRouteComponent, selector: "app-add-route", inputs: { routeData: "routeData", customerRepoDetails: "customerRepoDetails" }, outputs: { changeNav: "changeNav", updateRouteList: "updateRouteList" }, viewQueries: [{ propertyName: "filterPickup", first: true, predicate: ["filterPickup"], descendants: true }, { propertyName: "filterDelivery", first: true, predicate: ["filterDelivery"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"addroutebox\">\n <div class=\"routedetailbox\" *ngIf=\"enablePopUp\">\n <div class=\"closebtnroutedetail\">\n <mat-icon (click)=\"prevantPopupClose = false; enablePopUp = false;\">clear</mat-icon>\n </div>\n <div class=\"destination\">\n <div class=\"duration\">\n <p class=\"pickprt\"><b>Pickup:</b>{{popupDetails['pickup_location']}}</p>\n <p class=\"dropprt\"><b>Delivery:</b>{{popupDetails['delivery_location']}}</p>\n </div>\n <span><b>Name:</b> {{popupDetails['route_name']}}</span>\n <span><b>Customer:</b> {{popupDetails['customer_name']}}</span>\n <span><b>Material:</b> {{popupDetails['material']}}</span>\n <span><b>Type:</b> {{popupDetails['unit']}}</span>\n <span><b>Distance:</b> {{popupDetails['estimated_distance']}}</span>\n <span><b>Travel Time:</b> {{popupDetails['estimated_time']}}</span>\n\n <span class=\"routenotes\"><b>Notes:</b> {{popupDetails['note']}}</span>\n </div>\n <div class=\"createTxt\">\n <small>\n Created by {{popupDetails['created_by_name']}} on {{popupDetails['created_at']}}\n </small>\n <button class=\"editbtn\" (click)=\"editEvent()\">Edit</button>\n </div>\n </div>\n <div class=\"add_add_route_box\" cdkDrag [style.visibility]=\"!enableForm ? 'hidden' : 'visible'\">\n <div class=\"topheadingprt\">\n <h2> {{routeId? 'EDIT' : 'ADD'}} ROUTE </h2>\n <div class=\"buttonprt\">\n <button *ngIf=\"routeId\" class=\"delbtn\" (click)=\"openDialog()\">Delete</button>\n <button mat-raised-button type=\"submit\" class=\"closebtn\" (click)=\"changeNav.next('Addroute')\">Close</button>\n </div>\n </div>\n <form [formGroup]=\"addRouteForm\">\n <div class=\"route_form_area\">\n <div class=\"col-6\">\n <mat-form-field>\n <mat-label>Route Name</mat-label>\n <input matInput formControlName=\"route_name\" autocomplete=\"nope\" (mousedown)=\"$event.stopPropagation()\">\n <mat-error *ngIf=\"addRouteForm.controls['route_name'].hasError('required')\">\n Route Name is required\n </mat-error>\n </mat-form-field>\n </div>\n <div class=\"col-6\">\n <mat-form-field>\n <input type=\"text\" placeholder=\"Customer Name\" matInput formControlName=\"customer_name\" [matAutocomplete]=\"auto\" (mousedown)=\"$event.stopPropagation()\">\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let customer of customersList$ | async\" [value]=\"customer['customer_name']\">\n {{customer['customer_name']}}\n </mat-option>\n </mat-autocomplete>\n <mat-error *ngIf=\"addRouteForm.controls['customer_name'].hasError('required')\">\n Customer name is required.\n </mat-error>\n </mat-form-field>\n </div>\n <div class=\"col-6\">\n <mat-form-field>\n <mat-label>Pickup</mat-label>\n <input type=\"text\" placeholder=\"Search...\" matInput #filterPickup [matAutocomplete]=\"pickupAutocomplete\"\n formControlName=\"pickup_location\" (mousedown)=\"$event.stopPropagation()\">\n\n <mat-autocomplete #pickupAutocomplete=\"matAutocomplete\">\n <mat-option (click)=\"selectedLongLat('pickup', option)\" *ngFor=\"let option of pickupOptions\"\n [value]=\"option?.place_name\">\n {{option?.place_name}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n <mat-error *ngIf=\"addRouteForm.controls['pickup_lat_lng'].touched && addRouteForm.controls['pickup_lat_lng'].hasError('required')\">\n Please select pickup location from the list.\n </mat-error>\n </div>\n <div class=\"col-6\">\n <mat-form-field>\n <mat-label>Delivery</mat-label>\n <input type=\"text\" placeholder=\"Search...\" matInput #filterDelivery [matAutocomplete]=\"deliveryAutocomplete\"\n formControlName=\"delivery_location\" (mousedown)=\"$event.stopPropagation()\">\n <mat-autocomplete #deliveryAutocomplete=\"matAutocomplete\">\n <mat-option (click)=\"selectedLongLat('delivery', option)\" *ngFor=\"let option of deliveryOptions\"\n [value]=\"option?.place_name\">\n {{option?.place_name}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n <mat-error *ngIf=\"addRouteForm.controls['delivery_lat_lng'].touched && addRouteForm.controls['delivery_lat_lng'].hasError('required')\">\n Please select delivery location from the list.\n </mat-error>\n </div>\n <div class=\"col-6\">\n <mat-form-field>\n <mat-label>Notes</mat-label>\n <textarea style=\"height: 18px; resize: none;\" matInput name=\"\" id=\"\" cols=\"30\" rows=\"10\" formControlName=\"note\" autocomplete=\"nope\" (mousedown)=\"$event.stopPropagation()\"></textarea>\n <mat-error *ngIf=\"addRouteForm.controls['note'].hasError('maxlength')\">\n Notes should be within 2048 characters.\n </mat-error>\n </mat-form-field>\n </div>\n\n <div class=\"col-6 d-flex\">\n <div class=\"inputbox m-0\">\n <mat-form-field>\n <mat-label>Unit type</mat-label>\n <mat-select formControlName=\"unit_id\" (selectionChange)=\"checkAndFetchRouteInformation()\" (mousedown)=\"$event.stopPropagation()\">\n <mat-option *ngFor=\"let unit of unitsList\" [value]=\"unit?.id\"> {{unit?.type}} </mat-option>\n </mat-select>\n <mat-error *ngIf=\"addRouteForm.controls['unit_id'].hasError('required')\">\n Unit is required\n </mat-error>\n </mat-form-field>\n </div>\n\n <div class=\"inputbox m-0\">\n <mat-form-field>\n <mat-label>Material</mat-label>\n <mat-select formControlName=\"materials_id\" (mousedown)=\"$event.stopPropagation()\">\n <mat-option *ngFor=\"let material of materialsList\" [value]=\"material?.material_id\"> {{material?.material}}\n </mat-option>\n </mat-select>\n <mat-error *ngIf=\"addRouteForm.controls['materials_id'].hasError('required')\">\n Meterial is required\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n <div class=\"col-6\">\n <app-estimation-display *ngIf=\"addRouteForm?.value?.pickup_lat_lng && addRouteForm?.value?.delivery_lat_lng\" [value]=\"addRouteForm['value']\"></app-estimation-display>\n </div>\n <button mat-raised-button type=\"submit\" (click)=\"saveRoute()\" *ngIf=\"preventSave\"\n [disabled]=\"addRouteForm.invalid && preventSave || preventInitialSave\">{{routeId? 'Update' : 'Save'}}\n </button>\n <div class=\"loader\">\n <mat-spinner *ngIf=\"!preventSave\"></mat-spinner>\n </div>\n </div>\n </form>\n </div>\n</div>\n", styles: [".addroutebox{width:calc(100% - 315px);position:absolute;left:300px;bottom:10px;z-index:999;display:flex;justify-content:space-between;align-items:flex-start}.addroutebox .routedetailbox{max-width:300px;padding:10px;background-color:#fff;border-radius:20px;margin-right:20px}@media (min-width: 1600px){.addroutebox .routedetailbox{max-width:280px}}.addroutebox .editbtn{background:#326ad3;padding:10px 25px;color:#fff;font-size:.8125rem;border-radius:30px;float:right}.add_add_route_box{background:white;padding:10px 20px;border-radius:20px;box-shadow:2px 4px 4px 2px #00000024;height:370px;width:100%;position:relative;cursor:move}.add_add_route_box .route_form_area{display:flex;flex-wrap:wrap;justify-content:space-between}.add_add_route_box .route_form_area .col-6{width:48%;margin-top:15px;justify-content:space-between}.add_add_route_box .route_form_area .col-6 .inputbox{width:47%}.add_add_route_box .route_form_area .col-6 span{font-size:.875rem}.add_add_route_box .route_form_area button{background:#326ad3;padding:0 18px;color:#fff;font-size:.8125rem;border-radius:30px;position:absolute;right:18px;top:20px}.closebtn{background:black;color:#fff;border-radius:30px;padding:0 18px;margin-left:10px}.delbtn{background:red;color:#fff;border-radius:30px;padding:10px 18px}.add_route_listingpart .listing_toggle{background:white;border-radius:15px;padding:8px 10px;position:absolute;right:10px;top:30px;cursor:pointer}.listing_box{background:#282828;height:100vh;position:fixed;right:0;top:0;z-index:1111;box-shadow:-3px 0 5px #ffffff14;transition:.5s;-webkit-transition:.5s;-moz-transition:.5s;width:0;border-radius:40px 0 0 40px;opacity:0}.listing_box .closebtn{display:none}.show .listing_box{width:250px;max-width:250px;flex:0 0 250px;transition:.5s;-webkit-transition:.5s;-moz-transition:.5s;padding:40px 0 40px 20px;opacity:1}@media (min-width: 1600px){.show .listing_box{width:320px;max-width:320px;flex:0 0 320px}}.show .listing_box h2{color:#fff;white-space:nowrap}.show .listing_box ul{padding:0 20px 0 0}.show .listing_box ul li{background:#4a4a4a;padding:15px;border-radius:15px;display:flex;margin-bottom:15px}.show .listing_box ul li .companayIcon{width:40px;height:40px;border-radius:10px;background:white;margin-right:10px;display:flex;justify-content:center;align-items:center}.show .listing_box ul li .company_cont{width:calc(100% - 50px)}.show .listing_box ul li .company_cont h3{color:#fff;font-size:15px;font-weight:400;margin:0;text-overflow:ellipsis;max-width:129px;-webkit-box-orient:vertical;white-space:nowrap;overflow:hidden}@media (min-width: 1600px){.show .listing_box ul li .company_cont h3{max-width:170px}}.show .listing_box ul li .company_cont p{color:#bcbcbc;font-size:12px;margin:5px 0;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:16px}.show .closebtn{position:absolute;left:-33px;top:50px;background:#282828;color:#fff;padding:8px;border-top-left-radius:15px;border-bottom-left-radius:15px;cursor:pointer;box-shadow:-4px 2px 5px #ffffff14;display:block}.loader{position:absolute;width:95%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.buttonprt{margin-right:83px}.destination .duration{padding:10px}.destination span{padding:5px 0}.closebtnroutedetail{box-shadow:0 0 5px #0000001c;border-radius:100%;width:30px;height:30px;display:flex;justify-content:center;align-items:center;cursor:pointer;background:#fff;position:absolute;top:-11px;left:-11px}.routenotes{max-height:170px;overflow:auto}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i3$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i8$2.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i8$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i8$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i7$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i10.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: EstimationDisplayComponent, selector: "app-estimation-display", inputs: ["value"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] });
1345
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AddRouteComponent, decorators: [{
1346
+ type: Component,
1347
+ args: [{ selector: 'app-add-route', template: "<div class=\"addroutebox\">\n <div class=\"routedetailbox\" *ngIf=\"enablePopUp\">\n <div class=\"closebtnroutedetail\">\n <mat-icon (click)=\"prevantPopupClose = false; enablePopUp = false;\">clear</mat-icon>\n </div>\n <div class=\"destination\">\n <div class=\"duration\">\n <p class=\"pickprt\"><b>Pickup:</b>{{popupDetails['pickup_location']}}</p>\n <p class=\"dropprt\"><b>Delivery:</b>{{popupDetails['delivery_location']}}</p>\n </div>\n <span><b>Name:</b> {{popupDetails['route_name']}}</span>\n <span><b>Customer:</b> {{popupDetails['customer_name']}}</span>\n <span><b>Material:</b> {{popupDetails['material']}}</span>\n <span><b>Type:</b> {{popupDetails['unit']}}</span>\n <span><b>Distance:</b> {{popupDetails['estimated_distance']}}</span>\n <span><b>Travel Time:</b> {{popupDetails['estimated_time']}}</span>\n\n <span class=\"routenotes\"><b>Notes:</b> {{popupDetails['note']}}</span>\n </div>\n <div class=\"createTxt\">\n <small>\n Created by {{popupDetails['created_by_name']}} on {{popupDetails['created_at']}}\n </small>\n <button class=\"editbtn\" (click)=\"editEvent()\">Edit</button>\n </div>\n </div>\n <div class=\"add_add_route_box\" cdkDrag [style.visibility]=\"!enableForm ? 'hidden' : 'visible'\">\n <div class=\"topheadingprt\">\n <h2> {{routeId? 'EDIT' : 'ADD'}} ROUTE </h2>\n <div class=\"buttonprt\">\n <button *ngIf=\"routeId\" class=\"delbtn\" (click)=\"openDialog()\">Delete</button>\n <button mat-raised-button type=\"submit\" class=\"closebtn\" (click)=\"changeNav.next('Addroute')\">Close</button>\n </div>\n </div>\n <form [formGroup]=\"addRouteForm\">\n <div class=\"route_form_area\">\n <div class=\"col-6\">\n <mat-form-field>\n <mat-label>Route Name</mat-label>\n <input matInput formControlName=\"route_name\" autocomplete=\"nope\" (mousedown)=\"$event.stopPropagation()\">\n <mat-error *ngIf=\"addRouteForm.controls['route_name'].hasError('required')\">\n Route Name is required\n </mat-error>\n </mat-form-field>\n </div>\n <div class=\"col-6\">\n <mat-form-field>\n <input type=\"text\" placeholder=\"Customer Name\" matInput formControlName=\"customer_name\" [matAutocomplete]=\"auto\" (mousedown)=\"$event.stopPropagation()\">\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let customer of customersList$ | async\" [value]=\"customer['customer_name']\">\n {{customer['customer_name']}}\n </mat-option>\n </mat-autocomplete>\n <mat-error *ngIf=\"addRouteForm.controls['customer_name'].hasError('required')\">\n Customer name is required.\n </mat-error>\n </mat-form-field>\n </div>\n <div class=\"col-6\">\n <mat-form-field>\n <mat-label>Pickup</mat-label>\n <input type=\"text\" placeholder=\"Search...\" matInput #filterPickup [matAutocomplete]=\"pickupAutocomplete\"\n formControlName=\"pickup_location\" (mousedown)=\"$event.stopPropagation()\">\n\n <mat-autocomplete #pickupAutocomplete=\"matAutocomplete\">\n <mat-option (click)=\"selectedLongLat('pickup', option)\" *ngFor=\"let option of pickupOptions\"\n [value]=\"option?.place_name\">\n {{option?.place_name}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n <mat-error *ngIf=\"addRouteForm.controls['pickup_lat_lng'].touched && addRouteForm.controls['pickup_lat_lng'].hasError('required')\">\n Please select pickup location from the list.\n </mat-error>\n </div>\n <div class=\"col-6\">\n <mat-form-field>\n <mat-label>Delivery</mat-label>\n <input type=\"text\" placeholder=\"Search...\" matInput #filterDelivery [matAutocomplete]=\"deliveryAutocomplete\"\n formControlName=\"delivery_location\" (mousedown)=\"$event.stopPropagation()\">\n <mat-autocomplete #deliveryAutocomplete=\"matAutocomplete\">\n <mat-option (click)=\"selectedLongLat('delivery', option)\" *ngFor=\"let option of deliveryOptions\"\n [value]=\"option?.place_name\">\n {{option?.place_name}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n <mat-error *ngIf=\"addRouteForm.controls['delivery_lat_lng'].touched && addRouteForm.controls['delivery_lat_lng'].hasError('required')\">\n Please select delivery location from the list.\n </mat-error>\n </div>\n <div class=\"col-6\">\n <mat-form-field>\n <mat-label>Notes</mat-label>\n <textarea style=\"height: 18px; resize: none;\" matInput name=\"\" id=\"\" cols=\"30\" rows=\"10\" formControlName=\"note\" autocomplete=\"nope\" (mousedown)=\"$event.stopPropagation()\"></textarea>\n <mat-error *ngIf=\"addRouteForm.controls['note'].hasError('maxlength')\">\n Notes should be within 2048 characters.\n </mat-error>\n </mat-form-field>\n </div>\n\n <div class=\"col-6 d-flex\">\n <div class=\"inputbox m-0\">\n <mat-form-field>\n <mat-label>Unit type</mat-label>\n <mat-select formControlName=\"unit_id\" (selectionChange)=\"checkAndFetchRouteInformation()\" (mousedown)=\"$event.stopPropagation()\">\n <mat-option *ngFor=\"let unit of unitsList\" [value]=\"unit?.id\"> {{unit?.type}} </mat-option>\n </mat-select>\n <mat-error *ngIf=\"addRouteForm.controls['unit_id'].hasError('required')\">\n Unit is required\n </mat-error>\n </mat-form-field>\n </div>\n\n <div class=\"inputbox m-0\">\n <mat-form-field>\n <mat-label>Material</mat-label>\n <mat-select formControlName=\"materials_id\" (mousedown)=\"$event.stopPropagation()\">\n <mat-option *ngFor=\"let material of materialsList\" [value]=\"material?.material_id\"> {{material?.material}}\n </mat-option>\n </mat-select>\n <mat-error *ngIf=\"addRouteForm.controls['materials_id'].hasError('required')\">\n Meterial is required\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n <div class=\"col-6\">\n <app-estimation-display *ngIf=\"addRouteForm?.value?.pickup_lat_lng && addRouteForm?.value?.delivery_lat_lng\" [value]=\"addRouteForm['value']\"></app-estimation-display>\n </div>\n <button mat-raised-button type=\"submit\" (click)=\"saveRoute()\" *ngIf=\"preventSave\"\n [disabled]=\"addRouteForm.invalid && preventSave || preventInitialSave\">{{routeId? 'Update' : 'Save'}}\n </button>\n <div class=\"loader\">\n <mat-spinner *ngIf=\"!preventSave\"></mat-spinner>\n </div>\n </div>\n </form>\n </div>\n</div>\n", styles: [".addroutebox{width:calc(100% - 315px);position:absolute;left:300px;bottom:10px;z-index:999;display:flex;justify-content:space-between;align-items:flex-start}.addroutebox .routedetailbox{max-width:300px;padding:10px;background-color:#fff;border-radius:20px;margin-right:20px}@media (min-width: 1600px){.addroutebox .routedetailbox{max-width:280px}}.addroutebox .editbtn{background:#326ad3;padding:10px 25px;color:#fff;font-size:.8125rem;border-radius:30px;float:right}.add_add_route_box{background:white;padding:10px 20px;border-radius:20px;box-shadow:2px 4px 4px 2px #00000024;height:370px;width:100%;position:relative;cursor:move}.add_add_route_box .route_form_area{display:flex;flex-wrap:wrap;justify-content:space-between}.add_add_route_box .route_form_area .col-6{width:48%;margin-top:15px;justify-content:space-between}.add_add_route_box .route_form_area .col-6 .inputbox{width:47%}.add_add_route_box .route_form_area .col-6 span{font-size:.875rem}.add_add_route_box .route_form_area button{background:#326ad3;padding:0 18px;color:#fff;font-size:.8125rem;border-radius:30px;position:absolute;right:18px;top:20px}.closebtn{background:black;color:#fff;border-radius:30px;padding:0 18px;margin-left:10px}.delbtn{background:red;color:#fff;border-radius:30px;padding:10px 18px}.add_route_listingpart .listing_toggle{background:white;border-radius:15px;padding:8px 10px;position:absolute;right:10px;top:30px;cursor:pointer}.listing_box{background:#282828;height:100vh;position:fixed;right:0;top:0;z-index:1111;box-shadow:-3px 0 5px #ffffff14;transition:.5s;-webkit-transition:.5s;-moz-transition:.5s;width:0;border-radius:40px 0 0 40px;opacity:0}.listing_box .closebtn{display:none}.show .listing_box{width:250px;max-width:250px;flex:0 0 250px;transition:.5s;-webkit-transition:.5s;-moz-transition:.5s;padding:40px 0 40px 20px;opacity:1}@media (min-width: 1600px){.show .listing_box{width:320px;max-width:320px;flex:0 0 320px}}.show .listing_box h2{color:#fff;white-space:nowrap}.show .listing_box ul{padding:0 20px 0 0}.show .listing_box ul li{background:#4a4a4a;padding:15px;border-radius:15px;display:flex;margin-bottom:15px}.show .listing_box ul li .companayIcon{width:40px;height:40px;border-radius:10px;background:white;margin-right:10px;display:flex;justify-content:center;align-items:center}.show .listing_box ul li .company_cont{width:calc(100% - 50px)}.show .listing_box ul li .company_cont h3{color:#fff;font-size:15px;font-weight:400;margin:0;text-overflow:ellipsis;max-width:129px;-webkit-box-orient:vertical;white-space:nowrap;overflow:hidden}@media (min-width: 1600px){.show .listing_box ul li .company_cont h3{max-width:170px}}.show .listing_box ul li .company_cont p{color:#bcbcbc;font-size:12px;margin:5px 0;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:16px}.show .closebtn{position:absolute;left:-33px;top:50px;background:#282828;color:#fff;padding:8px;border-top-left-radius:15px;border-bottom-left-radius:15px;cursor:pointer;box-shadow:-4px 2px 5px #ffffff14;display:block}.loader{position:absolute;width:95%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.buttonprt{margin-right:83px}.destination .duration{padding:10px}.destination span{padding:5px 0}.closebtnroutedetail{box-shadow:0 0 5px #0000001c;border-radius:100%;width:30px;height:30px;display:flex;justify-content:center;align-items:center;cursor:pointer;background:#fff;position:absolute;top:-11px;left:-11px}.routenotes{max-height:170px;overflow:auto}\n"] }]
1348
+ }], ctorParameters: function () {
1349
+ return [{ type: i1.CoolmapService }, { type: i1.UtilsService }, { type: i1$1.MatDialog }, { type: i1.CoolmapConfigModel, decorators: [{
1350
+ type: Inject,
1351
+ args: ['memberData']
1352
+ }] }];
1353
+ }, propDecorators: { filterPickup: [{
1354
+ type: ViewChild,
1355
+ args: ['filterPickup']
1356
+ }], filterDelivery: [{
1357
+ type: ViewChild,
1358
+ args: ['filterDelivery']
1359
+ }], changeNav: [{
1360
+ type: Output
1361
+ }], updateRouteList: [{
1362
+ type: Output
1363
+ }], routeData: [{
1364
+ type: Input
1365
+ }], customerRepoDetails: [{
1366
+ type: Input
1367
+ }] } });
1368
+
1369
+ class CoolmapModule {
1370
+ static forRoot(memberData) {
1371
+ return {
1372
+ ngModule: CoolmapModule,
1373
+ providers: [{ provide: 'memberData', useValue: memberData }]
1374
+ };
1375
+ }
1376
+ }
1377
+ CoolmapModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CoolmapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1378
+ CoolmapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: CoolmapModule, declarations: [MapComponent,
1379
+ NavComponent,
1380
+ AddRouteNavComponent,
1381
+ JobCodeNavComponent,
1382
+ RouteJobCodeListComponent,
1383
+ ViewRouteListCardComponent,
1384
+ SmsCardDetailsOverviewComponent,
1385
+ JobCodeListCardComponent,
1386
+ JobCodeComponent,
1387
+ JobRouteListComponent,
1388
+ JobcodeStatusComponent,
1389
+ JobcodeOverviewComponent,
1390
+ DialogComponent,
1391
+ AddRouteComponent,
1392
+ EstimationDisplayComponent], imports: [CommonModule,
1393
+ MatSnackBarModule,
1394
+ MatSidenavModule,
1395
+ DragDropModule,
1396
+ FormsModule,
1397
+ MatInputModule,
1398
+ MatSelectModule,
1399
+ MatIconModule,
1400
+ ReactiveFormsModule,
1401
+ MatAutocompleteModule,
1402
+ MatFormFieldModule,
1403
+ MatProgressSpinnerModule,
1404
+ MatChipsModule,
1405
+ MatDialogModule,
1406
+ MatTooltipModule,
1407
+ MatDatepickerModule,
1408
+ MatNativeDateModule,
1409
+ PerfectScrollbarModule,
1410
+ MatPseudoCheckboxModule,
1411
+ MatButtonModule,
1412
+ MatProgressBarModule], exports: [MapComponent,
1413
+ NavComponent,
1414
+ AddRouteNavComponent,
1415
+ JobCodeNavComponent,
1416
+ RouteJobCodeListComponent,
1417
+ ViewRouteListCardComponent,
1418
+ SmsCardDetailsOverviewComponent,
1419
+ JobCodeListCardComponent,
1420
+ JobCodeComponent,
1421
+ JobRouteListComponent,
1422
+ JobcodeStatusComponent,
1423
+ JobcodeOverviewComponent,
1424
+ DialogComponent,
1425
+ AddRouteComponent] });
1426
+ CoolmapModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CoolmapModule, imports: [CommonModule,
1427
+ MatSnackBarModule,
1428
+ MatSidenavModule,
1429
+ DragDropModule,
1430
+ FormsModule,
1431
+ MatInputModule,
1432
+ MatSelectModule,
1433
+ MatIconModule,
1434
+ ReactiveFormsModule,
1435
+ MatAutocompleteModule,
1436
+ MatFormFieldModule,
1437
+ MatProgressSpinnerModule,
1438
+ MatChipsModule,
1439
+ MatDialogModule,
1440
+ MatTooltipModule,
1441
+ MatDatepickerModule,
1442
+ MatNativeDateModule,
1443
+ PerfectScrollbarModule,
1444
+ MatPseudoCheckboxModule,
1445
+ MatButtonModule,
1446
+ MatProgressBarModule] });
1447
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CoolmapModule, decorators: [{
1448
+ type: NgModule,
1449
+ args: [{
1450
+ declarations: [
1451
+ MapComponent,
1452
+ NavComponent,
1453
+ AddRouteNavComponent,
1454
+ JobCodeNavComponent,
1455
+ RouteJobCodeListComponent,
1456
+ ViewRouteListCardComponent,
1457
+ SmsCardDetailsOverviewComponent,
1458
+ JobCodeListCardComponent,
1459
+ JobCodeComponent,
1460
+ JobRouteListComponent,
1461
+ JobcodeStatusComponent,
1462
+ JobcodeOverviewComponent,
1463
+ DialogComponent,
1464
+ AddRouteComponent,
1465
+ EstimationDisplayComponent
1466
+ ],
1467
+ imports: [
1468
+ CommonModule,
1469
+ MatSnackBarModule,
1470
+ MatSidenavModule,
1471
+ DragDropModule,
1472
+ FormsModule,
1473
+ MatInputModule,
1474
+ MatSelectModule,
1475
+ MatIconModule,
1476
+ ReactiveFormsModule,
1477
+ MatAutocompleteModule,
1478
+ MatFormFieldModule,
1479
+ MatProgressSpinnerModule,
1480
+ MatChipsModule,
1481
+ MatDialogModule,
1482
+ MatTooltipModule,
1483
+ MatDatepickerModule,
1484
+ MatNativeDateModule,
1485
+ PerfectScrollbarModule,
1486
+ MatPseudoCheckboxModule,
1487
+ MatButtonModule,
1488
+ MatProgressBarModule,
1489
+ ],
1490
+ exports: [
1491
+ MapComponent,
1492
+ NavComponent,
1493
+ AddRouteNavComponent,
1494
+ JobCodeNavComponent,
1495
+ RouteJobCodeListComponent,
1496
+ ViewRouteListCardComponent,
1497
+ SmsCardDetailsOverviewComponent,
1498
+ JobCodeListCardComponent,
1499
+ JobCodeComponent,
1500
+ JobRouteListComponent,
1501
+ JobcodeStatusComponent,
1502
+ JobcodeOverviewComponent,
1503
+ DialogComponent,
1504
+ AddRouteComponent
1505
+ ],
1506
+ entryComponents: [
1507
+ DialogComponent,
1508
+ JobCodeComponent,
1509
+ AddRouteComponent
1510
+ ],
1511
+ providers: []
1512
+ }]
1513
+ }] });
1514
+
1515
+ /*
1516
+ * Public API Surface of coolmap
1517
+ */
1518
+
1519
+ /**
1520
+ * Generated bundle index. Do not edit.
1521
+ */
1522
+
1523
+ export { AddRouteComponent, AddRouteNavComponent, CoolmapModule, DialogComponent, JobCodeComponent, JobCodeListCardComponent, JobCodeNavComponent, JobRouteListComponent, JobcodeOverviewComponent, JobcodeStatusComponent, MapComponent, NavComponent, RouteJobCodeListComponent, SmsCardDetailsOverviewComponent, ViewRouteListCardComponent };
1524
+ //# sourceMappingURL=aggdirect-coolmap.mjs.map