@aggdirect/coolmap 2.5.2 → 2.5.3

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