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