@aggdirect/coolmap 2.0.7 → 2.0.9

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