@aggdirect/coolmap 2.0.5 → 2.0.6

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