@aggdirect/coolmap 2.6.6 → 2.6.8
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.
- package/karma.conf.js +44 -0
- package/ng-package.json +7 -0
- package/package.json +5 -30
- package/src/assets/mixin.scss +28 -0
- package/src/assets/palette.scss +24 -0
- package/src/assets/variable.scss +15 -0
- package/src/lib/component/add-route/add-route.component.html +136 -0
- package/src/lib/component/add-route/add-route.component.scss +236 -0
- package/src/lib/component/add-route/add-route.component.spec.ts +23 -0
- package/src/lib/component/add-route/add-route.component.ts +295 -0
- package/src/lib/component/job-code/job-code.component.html +79 -0
- package/src/lib/component/job-code/job-code.component.scss +396 -0
- package/src/lib/component/job-code/job-code.component.ts +157 -0
- package/src/lib/component/map/map.component.css +0 -0
- package/src/lib/component/map/map.component.html +4 -0
- package/src/lib/component/map/map.component.spec.ts +23 -0
- package/src/lib/component/map/map.component.ts +34 -0
- package/src/lib/component/nav/layout/add-route-nav/add-route-nav.component.html +46 -0
- package/src/lib/component/nav/layout/add-route-nav/add-route-nav.component.scss +18 -0
- package/src/lib/component/nav/layout/add-route-nav/add-route-nav.component.spec.ts +23 -0
- package/src/lib/component/nav/layout/add-route-nav/add-route-nav.component.ts +131 -0
- package/src/lib/component/nav/layout/job-code-nav/job-code-nav.component.html +48 -0
- package/src/lib/component/nav/layout/job-code-nav/job-code-nav.component.scss +24 -0
- package/src/lib/component/nav/layout/job-code-nav/job-code-nav.component.ts +154 -0
- package/src/lib/component/nav/nav.component.html +19 -0
- package/src/lib/component/nav/nav.component.scss +67 -0
- package/src/lib/component/nav/nav.component.ts +38 -0
- package/src/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.html +56 -0
- package/src/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.scss +168 -0
- package/src/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.spec.ts +23 -0
- package/src/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.ts +43 -0
- package/src/lib/component/route-jobcode-list/route-jobcode-list.component.html +66 -0
- package/src/lib/component/route-jobcode-list/route-jobcode-list.component.scss +232 -0
- package/src/lib/component/route-jobcode-list/route-jobcode-list.component.ts +234 -0
- package/src/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.html +7 -0
- package/src/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.scss +10 -0
- package/src/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.spec.ts +23 -0
- package/src/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.ts +15 -0
- package/src/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.html +28 -0
- package/src/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.scss +172 -0
- package/src/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.spec.ts +23 -0
- package/src/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.ts +20 -0
- package/src/lib/component/shared/dialog/dialog.component.html +7 -0
- package/src/lib/component/shared/dialog/dialog.component.scss +30 -0
- package/src/lib/component/shared/dialog/dialog.component.ts +18 -0
- package/src/lib/component/shared/estimation-display/estimation-display.component.html +7 -0
- package/src/lib/component/shared/estimation-display/estimation-display.component.scss +7 -0
- package/src/lib/component/shared/estimation-display/estimation-display.component.ts +13 -0
- package/src/lib/component/shared/job-route-list/job-route-list.component.html +30 -0
- package/src/lib/component/shared/job-route-list/job-route-list.component.scss +15 -0
- package/src/lib/component/shared/job-route-list/job-route-list.component.spec.ts +23 -0
- package/src/lib/component/shared/job-route-list/job-route-list.component.ts +54 -0
- package/src/lib/component/shared/jobcode-overview/jobcode-overview.component.html +11 -0
- package/src/lib/component/shared/jobcode-overview/jobcode-overview.component.scss +13 -0
- package/src/lib/component/shared/jobcode-overview/jobcode-overview.component.spec.ts +23 -0
- package/src/lib/component/shared/jobcode-overview/jobcode-overview.component.ts +19 -0
- package/src/lib/component/shared/jobcode-status/jobcode-status.component.html +5 -0
- package/src/lib/component/shared/jobcode-status/jobcode-status.component.scss +40 -0
- package/src/lib/component/shared/jobcode-status/jobcode-status.component.spec.ts +23 -0
- package/src/lib/component/shared/jobcode-status/jobcode-status.component.ts +11 -0
- package/src/lib/component/shared/route-info-card/route-info-card.component.html +11 -0
- package/src/lib/component/shared/route-info-card/route-info-card.component.scss +50 -0
- package/src/lib/component/shared/route-info-card/route-info-card.component.spec.ts +23 -0
- package/src/lib/component/shared/route-info-card/route-info-card.component.ts +69 -0
- package/src/lib/coolmap.module.ts +117 -0
- package/{public-api.d.ts → src/public-api.ts} +8 -0
- package/src/test.ts +27 -0
- package/tsconfig.lib.json +15 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/esm2022/aggdirect-coolmap.mjs +0 -5
- package/esm2022/lib/component/add-route/add-route.component.mjs +0 -348
- package/esm2022/lib/component/job-code/job-code.component.mjs +0 -192
- package/esm2022/lib/component/map/map.component.mjs +0 -39
- package/esm2022/lib/component/nav/layout/add-route-nav/add-route-nav.component.mjs +0 -152
- package/esm2022/lib/component/nav/layout/job-code-nav/job-code-nav.component.mjs +0 -119
- package/esm2022/lib/component/nav/nav.component.mjs +0 -54
- package/esm2022/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.mjs +0 -77
- package/esm2022/lib/component/route-jobcode-list/route-jobcode-list.component.mjs +0 -321
- package/esm2022/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.mjs +0 -19
- package/esm2022/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.mjs +0 -37
- package/esm2022/lib/component/shared/dialog/dialog.component.mjs +0 -31
- package/esm2022/lib/component/shared/estimation-display/estimation-display.component.mjs +0 -18
- package/esm2022/lib/component/shared/job-route-list/job-route-list.component.mjs +0 -79
- package/esm2022/lib/component/shared/jobcode-overview/jobcode-overview.component.mjs +0 -24
- package/esm2022/lib/component/shared/jobcode-status/jobcode-status.component.mjs +0 -15
- package/esm2022/lib/component/shared/route-info-card/route-info-card.component.mjs +0 -57
- package/esm2022/lib/coolmap.module.mjs +0 -186
- package/esm2022/public-api.mjs +0 -19
- package/fesm2022/aggdirect-coolmap.mjs +0 -1644
- package/fesm2022/aggdirect-coolmap.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/component/add-route/add-route.component.d.ts +0 -61
- package/lib/component/job-code/job-code.component.d.ts +0 -42
- package/lib/component/map/map.component.d.ts +0 -15
- package/lib/component/nav/layout/add-route-nav/add-route-nav.component.d.ts +0 -49
- package/lib/component/nav/layout/job-code-nav/job-code-nav.component.d.ts +0 -42
- package/lib/component/nav/nav.component.d.ts +0 -31
- package/lib/component/route-jobcode-list/job-code-list-card/job-code-list-card.component.d.ts +0 -20
- package/lib/component/route-jobcode-list/route-jobcode-list.component.d.ts +0 -42
- package/lib/component/route-jobcode-list/sms-card-details-overview/sms-card-details-overview.component.d.ts +0 -9
- package/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.d.ts +0 -12
- package/lib/component/shared/dialog/dialog.component.d.ts +0 -13
- package/lib/component/shared/estimation-display/estimation-display.component.d.ts +0 -8
- package/lib/component/shared/job-route-list/job-route-list.component.d.ts +0 -26
- package/lib/component/shared/jobcode-overview/jobcode-overview.component.d.ts +0 -10
- package/lib/component/shared/jobcode-status/jobcode-status.component.d.ts +0 -7
- package/lib/component/shared/route-info-card/route-info-card.component.d.ts +0 -29
- package/lib/coolmap.module.d.ts +0 -44
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { SelectionModel } from '@angular/cdk/collections';
|
|
3
|
+
import { FormControl, Validators } from '@angular/forms';
|
|
4
|
+
import { CoolmapService, Route, UtilsService } from '@aggdirect/coolmap-services';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'app-route-jobcode-list',
|
|
8
|
+
templateUrl: './route-jobcode-list.component.html',
|
|
9
|
+
styleUrls: ['./route-jobcode-list.component.scss']
|
|
10
|
+
})
|
|
11
|
+
export class RouteJobCodeListComponent implements OnInit, OnChanges {
|
|
12
|
+
@Input() public loader = true;
|
|
13
|
+
@Input() public type: string = '';
|
|
14
|
+
@Input() public data: Route[] = [];
|
|
15
|
+
@Input() public currentNav: string = ''
|
|
16
|
+
@Output() public emitroute = new EventEmitter();
|
|
17
|
+
@Output() public showAllRoute = new EventEmitter();
|
|
18
|
+
preventMouseout: boolean = false;
|
|
19
|
+
filterList: Route[] = this.data;
|
|
20
|
+
@Input() public searchTerm!: any;
|
|
21
|
+
isDriverList: boolean = false;
|
|
22
|
+
public selectedRoute = new SelectionModel<any>(true, [])
|
|
23
|
+
driverList!: any;
|
|
24
|
+
preventListSelect: boolean = false;
|
|
25
|
+
@Output() public clearJobDetailsFromList = new EventEmitter();
|
|
26
|
+
preventDetailsClose = false;
|
|
27
|
+
messageLoader: boolean = false;
|
|
28
|
+
driverMessage = new FormControl('', [Validators.maxLength(256)]);
|
|
29
|
+
@Input() public clearListSeletion: boolean;
|
|
30
|
+
isSmsList: boolean = false;
|
|
31
|
+
constructor(public coolMap: CoolmapService, public utils: UtilsService) { this.driverList = [] }
|
|
32
|
+
ngOnInit(): void {
|
|
33
|
+
this.utils.getpreVentJobdetailclose.subscribe(res => { this.preventDetailsClose = res });
|
|
34
|
+
this.utils.removeMapEntityUtility.subscribe((res: Route) => {this.passRoute(res)});
|
|
35
|
+
}
|
|
36
|
+
passRoute(job: Route) {
|
|
37
|
+
this.data.forEach((each) => { if (each['route_id'] !== job['route_id']) { each['isActive'] = false } else { each['isActive'] = true } });
|
|
38
|
+
if (this.type == 'addroute') this.filterList.forEach(ele => this.coolMap.filterRoute(ele['route_id'], 'none'));
|
|
39
|
+
}
|
|
40
|
+
selectRoute(route: any) {
|
|
41
|
+
if (!this.preventListSelect) {
|
|
42
|
+
this.preventListSelect = true;
|
|
43
|
+
this.selectedRoute.toggle(route);
|
|
44
|
+
this.clearJobDetailsFromList.emit(true);
|
|
45
|
+
this.utils.preVentJobdetailclose.next(false);
|
|
46
|
+
this.filterList.forEach(ele => this.coolMap.filterRoute(ele['job_id'], 'none'));
|
|
47
|
+
this.clearList();
|
|
48
|
+
this.selectedRoute.selected.forEach((ele, index) => {
|
|
49
|
+
this.coolMap.filterRoute(ele['job_id'], 'visible', ((this.selectedRoute.selected.length - 1) === index)).then(() => {
|
|
50
|
+
this.preventListSelect = false;
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
if (!this.selectedRoute.selected.length) {
|
|
54
|
+
this.preventListSelect = false
|
|
55
|
+
this.data.forEach(ele => this.coolMap.filterRoute(ele['job_id'], 'visible'));
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
checkroutes(route: Route) {
|
|
60
|
+
const selectedRoute = this.selectedRoute.selected;
|
|
61
|
+
this.filterList = this.filterList.map(ele => { ele['isSelected'] = false; return ele })
|
|
62
|
+
if (selectedRoute.length > 0) {
|
|
63
|
+
selectedRoute.forEach(ele => {
|
|
64
|
+
if (route['order_number'] === ele['order_number']) { ele['isSelected'] = true }
|
|
65
|
+
});
|
|
66
|
+
} return route
|
|
67
|
+
}
|
|
68
|
+
ngOnChanges(changes: SimpleChanges) {
|
|
69
|
+
setTimeout(() => {
|
|
70
|
+
if (this.currentNav === 'Addroute' && (this.data.length < this.filterList.length)) {
|
|
71
|
+
const index = this.filterList.findIndex(ele => ele.isActive);
|
|
72
|
+
if (index > 0) this.filterList[index].isActive = false;
|
|
73
|
+
this.data.forEach((ele: Route, indexForData: number) => {
|
|
74
|
+
const id = (ele['job_id'] ? ele['job_id'] : ele['route_id'])
|
|
75
|
+
this.coolMap.plotRoute(ele, id, this.type, false, (indexForData === (this.data.length - 1))).then((res) => {
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}, 500);
|
|
80
|
+
if (changes['data'] && changes['data']['currentValue']) {
|
|
81
|
+
this.filterList = changes['data']['currentValue'];
|
|
82
|
+
if (this.searchTerm) {
|
|
83
|
+
if (this.searchTerm.length > 0) {
|
|
84
|
+
this.data = this.utils.getSearchResults(changes['data']['currentValue'], this.searchTerm);
|
|
85
|
+
this.filterList = this.data;
|
|
86
|
+
} else {
|
|
87
|
+
this.filterList = changes['data']['currentValue'];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (this.type === 'jobcode') {
|
|
92
|
+
this.loader = true; this.clearList();
|
|
93
|
+
if (this.filterList.length === 0) this.loader = false;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (this.type !== 'jobcode') {
|
|
97
|
+
if (changes['data']['previousValue'] && this.currentNav === 'addForm') {
|
|
98
|
+
const activeRoute = changes['data']['previousValue'].find((ele: Route) => ele.isActive);
|
|
99
|
+
if (activeRoute) {
|
|
100
|
+
this.filterList.map((item: any) => {
|
|
101
|
+
if (item.route_id === activeRoute.route_id) {
|
|
102
|
+
item.isActive = true;
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (changes['data']['previousValue'] && this.currentNav !== 'addForm') {
|
|
109
|
+
this.coolMap.removeJobFromMap(changes['data']['previousValue']);
|
|
110
|
+
this.selectedRoute.clear();
|
|
111
|
+
};
|
|
112
|
+
if (this.currentNav !== 'addForm') {
|
|
113
|
+
changes['data']['currentValue'].forEach((ele: Route, indexForData: number) => {
|
|
114
|
+
const id = (ele['job_id'] ? ele['job_id'] : ele['route_id'])
|
|
115
|
+
if(this.type === 'jobcode') ele.materialLabel = ele.material;
|
|
116
|
+
this.coolMap.plotRoute(ele, id, this.type, false, (indexForData === (this.data.length - 1))).then((res) => {
|
|
117
|
+
if (indexForData === (this.data.length - 1)) {
|
|
118
|
+
this.loader = false;
|
|
119
|
+
this.utils.preventnavChange.next(true);
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if (changes['searchTerm']) {
|
|
126
|
+
if (this.filterList) {
|
|
127
|
+
this.data = this.filterList;
|
|
128
|
+
this.clearList();
|
|
129
|
+
if (changes['searchTerm']['currentValue'].length > 0) {
|
|
130
|
+
this.coolMap.removeRouteAndMarker(1);
|
|
131
|
+
this.data = this.utils.getSearchResults(this.data, changes['searchTerm']['currentValue']);
|
|
132
|
+
} else { this.data = this.filterList; }
|
|
133
|
+
setTimeout(() => {
|
|
134
|
+
this.coolMap.clearBoundWithCordinates();
|
|
135
|
+
if (this.currentNav !== 'addForm' && !this.selectedRoute['selected'].length) {
|
|
136
|
+
this.coolMap.removeRouteAndMarker(1);
|
|
137
|
+
this.toggleFilterRoute(this.filterList);
|
|
138
|
+
}
|
|
139
|
+
}, 500);
|
|
140
|
+
if (this.currentNav !== 'addForm' && this.selectedRoute['selected'].length) {
|
|
141
|
+
if (this.data && this.data.length > 0) {
|
|
142
|
+
this.clearList();
|
|
143
|
+
this.clearJobDetailsFromList.emit(true)
|
|
144
|
+
this.coolMap.removeJobFromMap(this.selectedRoute.selected);
|
|
145
|
+
setTimeout(() => {
|
|
146
|
+
this.data.forEach((ele, indexForData) => {
|
|
147
|
+
this.coolMap.plotRoute(ele, ele['job_id'], this.type, false, (indexForData === (this.data.length - 1))).then(() => {
|
|
148
|
+
if (indexForData === (this.data.length - 1)) { this.loader = false; this.utils.preventnavChange.next(true) }
|
|
149
|
+
if (this.selectedRoute['selected'].length && this.selectedRoute['selected'][0]['job_id'] === ele['job_id']) {
|
|
150
|
+
this.selectedRoute.clear()
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
})
|
|
154
|
+
}, 500);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
showRoute() {
|
|
161
|
+
this.utils.preventnavChange.next(false);
|
|
162
|
+
this.loader = true; this.clearList();
|
|
163
|
+
this.showAllRoute.emit(true);
|
|
164
|
+
if (this.filterList && this.filterList.length > 0) {
|
|
165
|
+
this.coolMap.removeJobFromMap(this.selectedRoute.selected);
|
|
166
|
+
setTimeout(() => {
|
|
167
|
+
this.filterList.forEach((ele, indexForData) => {
|
|
168
|
+
this.coolMap.plotRoute(ele, ele['job_id'], this.type, false, (indexForData === this.filterList.length - 1)).then(() => {
|
|
169
|
+
if (indexForData === this.filterList.length - 1) { this.loader = false; this.utils.preventnavChange.next(true) }
|
|
170
|
+
if (this.selectedRoute['selected'].length && this.selectedRoute['selected'][0]['job_id'] === ele['job_id']) {
|
|
171
|
+
this.selectedRoute.clear();
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
})
|
|
175
|
+
}, 500);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
toggleDrivermenu(event: any) {
|
|
179
|
+
const mouseevntType = event.mouseevntType; let route = event.route;
|
|
180
|
+
const isHoverOut = event.isHoverOut;
|
|
181
|
+
if(typeof(mouseevntType) === 'string') {if(this.preventMouseout){this.isDriverList = !this.isDriverList}; this.preventMouseout = true}
|
|
182
|
+
if (typeof(mouseevntType) === 'boolean' &&!mouseevntType && !this.preventMouseout) { this.isDriverList = mouseevntType };
|
|
183
|
+
if (typeof(mouseevntType) === 'boolean' && mouseevntType && !this.preventMouseout) { this.isDriverList = mouseevntType };
|
|
184
|
+
if(this.preventMouseout && !this.isDriverList) this.preventMouseout = false;
|
|
185
|
+
if (isHoverOut) {
|
|
186
|
+
if (this.preventMouseout) {
|
|
187
|
+
route = this.utils.getdictValue('driver-details');
|
|
188
|
+
this.driverList = route;
|
|
189
|
+
}
|
|
190
|
+
if (!this.preventMouseout) {
|
|
191
|
+
this.driverList = route
|
|
192
|
+
}
|
|
193
|
+
} else {
|
|
194
|
+
this.driverList = route
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
visiblesection(value: string) { if (this.type === value) { return true } else return false }
|
|
198
|
+
toggleFilterRoute(filterList: Route[]) {
|
|
199
|
+
filterList.forEach((ele) => {
|
|
200
|
+
const filterItem = (this.type === 'jobcode') ? 'job_id' : 'route_id';
|
|
201
|
+
const index = this.data.findIndex((ele1) => { return (ele1[`${filterItem}`] === ele[`${filterItem}`]) });
|
|
202
|
+
const id = (ele['job_id'] ? ele['job_id'] : ele['route_id']);
|
|
203
|
+
if (id && index < 0) this.coolMap.filterRoute(id, 'none');
|
|
204
|
+
if (id && index >= 0) {
|
|
205
|
+
this.data[index].isActive = false;
|
|
206
|
+
this.coolMap.filterRoute(id, 'visible');
|
|
207
|
+
this.coolMap.extendBound(ele['path'], (index === (this.data.length - 1)));
|
|
208
|
+
};
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
clearList() {
|
|
212
|
+
this.isDriverList = false; this.driverList = null; this.preventMouseout = false; this.isSmsList = false;
|
|
213
|
+
}
|
|
214
|
+
sendMessage() {
|
|
215
|
+
this.messageLoader = true
|
|
216
|
+
if (this.driverMessage.valid) {
|
|
217
|
+
const data = {
|
|
218
|
+
order_number: this.driverList['order_number'],
|
|
219
|
+
date: this.driverList['date'],
|
|
220
|
+
message: this.driverMessage.value,
|
|
221
|
+
}
|
|
222
|
+
this.utils.postdata('jobs_report_chat', data).subscribe((res: any) => {
|
|
223
|
+
if (res['data']['status'] === 'Success.') {
|
|
224
|
+
this.messageLoader = false;
|
|
225
|
+
this.driverMessage.reset();
|
|
226
|
+
this.utils.openSnackBar('Message Sent', 'success');
|
|
227
|
+
} else {
|
|
228
|
+
this.messageLoader = false;
|
|
229
|
+
this.utils.openSnackBar('Message not sent', 'error');
|
|
230
|
+
}
|
|
231
|
+
}, err => {if(err) {this.messageLoader = false}})
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<ng-container *ngFor="let item of label">
|
|
2
|
+
<span>
|
|
3
|
+
<label>{{overViewEnum[item]}}</label>
|
|
4
|
+
<ng-container *ngIf="item !== 'values'">{{jobValue[item] ? jobValue[item] : 'N/A'}}</ng-container>
|
|
5
|
+
<ng-container *ngIf="item === 'values'">{{jobValue[item]['Done'] + jobValue[item]['Ongoing'] + jobValue[item]['Open']}}</ng-container>
|
|
6
|
+
</span>
|
|
7
|
+
</ng-container>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { SmsCardDetailsOverviewComponent } from './sms-card-details-overview.component';
|
|
4
|
+
|
|
5
|
+
describe('SmsCardDetailsOverviewComponent', () => {
|
|
6
|
+
let component: SmsCardDetailsOverviewComponent;
|
|
7
|
+
let fixture: ComponentFixture<SmsCardDetailsOverviewComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ SmsCardDetailsOverviewComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(SmsCardDetailsOverviewComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { DriverSmsCardEnum, DriversmsCardKey } from '@aggdirect/coolmap-services';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'app-sms-card-details-overview',
|
|
6
|
+
templateUrl: './sms-card-details-overview.component.html',
|
|
7
|
+
styleUrls: ['./sms-card-details-overview.component.scss']
|
|
8
|
+
})
|
|
9
|
+
export class SmsCardDetailsOverviewComponent {
|
|
10
|
+
@Input() public jobValue: any;
|
|
11
|
+
label = DriversmsCardKey;
|
|
12
|
+
overViewEnum: any = DriverSmsCardEnum;
|
|
13
|
+
constructor() { }
|
|
14
|
+
|
|
15
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<div class="routebox">
|
|
2
|
+
<span>
|
|
3
|
+
<mat-icon>directions</mat-icon>
|
|
4
|
+
<h2 [ngClass]="{'routeheading': route['route_name']}">
|
|
5
|
+
{{route['route_name']}}
|
|
6
|
+
</h2>
|
|
7
|
+
</span>
|
|
8
|
+
<h3><ng-container *ngIf="config?.repository === 'coolmap'">{{route['customer_name']}} | </ng-container>{{config.repository === 'coolmap' ? route['material'] : route['materialLabel']}}</h3>
|
|
9
|
+
|
|
10
|
+
<div class="pickdropprt">
|
|
11
|
+
<div class="pickprt">
|
|
12
|
+
<b>
|
|
13
|
+
<h4>{{route['pickup_location']}}</h4>
|
|
14
|
+
</b>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="dropprt">
|
|
17
|
+
<b>
|
|
18
|
+
<h4>{{route['delivery_location']}}</h4>
|
|
19
|
+
</b>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="infoicon" (click)="detailsDict('click', route)" (mouseover)="detailsDict(true, route)"
|
|
23
|
+
(mouseleave)="detailsDict(false, route)">
|
|
24
|
+
<img src="assets/images/info_icon.png" [alt]="" />
|
|
25
|
+
</div>
|
|
26
|
+
<div class="status routestatus" [ngClass]="route['unit']">{{route['unit']}}</div>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
@import "../../../../assets/variable.scss";
|
|
2
|
+
.routebox{
|
|
3
|
+
span {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
h2 {
|
|
7
|
+
margin-left: 5px;
|
|
8
|
+
white-space: nowrap;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
text-overflow: ellipsis;
|
|
11
|
+
max-width: 180px;
|
|
12
|
+
margin-bottom: 5px;
|
|
13
|
+
margin-top: 5px;
|
|
14
|
+
font-size: 0.95rem;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
h3 {
|
|
18
|
+
font-size: 0.85rem;
|
|
19
|
+
color: $softgrey;
|
|
20
|
+
font-weight: 400;
|
|
21
|
+
margin-top: 0;
|
|
22
|
+
white-space: nowrap;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
text-overflow: ellipsis;
|
|
25
|
+
max-width: 325px;
|
|
26
|
+
margin-bottom: 10px;
|
|
27
|
+
}
|
|
28
|
+
.pickdropprt {
|
|
29
|
+
font-size: 0.8125rem;
|
|
30
|
+
.pickprt {
|
|
31
|
+
position: relative;
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
padding-bottom: 6px;
|
|
35
|
+
span {
|
|
36
|
+
padding-left: 0;
|
|
37
|
+
padding-right: 20px;
|
|
38
|
+
display: block;
|
|
39
|
+
}
|
|
40
|
+
b {
|
|
41
|
+
position: relative;
|
|
42
|
+
font-weight: normal;
|
|
43
|
+
&:after {
|
|
44
|
+
background: $black;
|
|
45
|
+
width: 1px;
|
|
46
|
+
height: 100%;
|
|
47
|
+
left: 3px;
|
|
48
|
+
content: "";
|
|
49
|
+
position: absolute;
|
|
50
|
+
top: 10px;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
h4 {
|
|
54
|
+
position: relative;
|
|
55
|
+
padding-left: 15px;
|
|
56
|
+
margin: 0px 0 0 0;
|
|
57
|
+
line-height: 18px;
|
|
58
|
+
font-weight: normal;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
text-overflow: ellipsis;
|
|
61
|
+
display: -webkit-box;
|
|
62
|
+
-webkit-line-clamp: 1;
|
|
63
|
+
-webkit-box-orient: vertical;
|
|
64
|
+
max-width: 215px;
|
|
65
|
+
@media (min-width:1600px) {
|
|
66
|
+
max-width: 265px;
|
|
67
|
+
}
|
|
68
|
+
&:before {
|
|
69
|
+
background: $black;
|
|
70
|
+
top: 4px;
|
|
71
|
+
left: 0px;
|
|
72
|
+
position: absolute;
|
|
73
|
+
content: "";
|
|
74
|
+
width: 7px;
|
|
75
|
+
height: 7px;
|
|
76
|
+
border-radius: 100%;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
.dropprt {
|
|
81
|
+
position: relative;
|
|
82
|
+
padding-bottom: 10px;
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
span {
|
|
86
|
+
padding-left: 0;
|
|
87
|
+
padding-right: 20px;
|
|
88
|
+
display: block;
|
|
89
|
+
}
|
|
90
|
+
b {
|
|
91
|
+
position: relative;
|
|
92
|
+
font-weight: normal;
|
|
93
|
+
&:after {
|
|
94
|
+
background: $black;
|
|
95
|
+
width: 1px;
|
|
96
|
+
height: 12px;
|
|
97
|
+
left: 3px;
|
|
98
|
+
content: "";
|
|
99
|
+
position: absolute;
|
|
100
|
+
top: -7px;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
h4 {
|
|
104
|
+
position: relative;
|
|
105
|
+
padding-left: 15px;
|
|
106
|
+
margin: 0;
|
|
107
|
+
line-height: 18px;
|
|
108
|
+
font-weight: normal;
|
|
109
|
+
overflow: hidden;
|
|
110
|
+
text-overflow: ellipsis;
|
|
111
|
+
display: -webkit-box;
|
|
112
|
+
-webkit-line-clamp: 1;
|
|
113
|
+
-webkit-box-orient: vertical;
|
|
114
|
+
max-width: 215px;
|
|
115
|
+
&:before {
|
|
116
|
+
background: $black;
|
|
117
|
+
top: 4px;
|
|
118
|
+
left: 0px;
|
|
119
|
+
position: absolute;
|
|
120
|
+
content: "";
|
|
121
|
+
width: 7px;
|
|
122
|
+
height: 7px;
|
|
123
|
+
border-radius: 100%;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
.infoicon{
|
|
129
|
+
position: absolute;
|
|
130
|
+
right:10px;
|
|
131
|
+
bottom: 10px;
|
|
132
|
+
img{
|
|
133
|
+
width: 20px;
|
|
134
|
+
height: 20px;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
.status {
|
|
138
|
+
position: absolute;
|
|
139
|
+
border-radius: 30px;
|
|
140
|
+
top: 12px;
|
|
141
|
+
right: 40px;
|
|
142
|
+
font-size: 0;
|
|
143
|
+
color: $white;
|
|
144
|
+
text-transform: capitalize;
|
|
145
|
+
font-weight: 500;
|
|
146
|
+
padding: 3px 10px;
|
|
147
|
+
&.routestatus{
|
|
148
|
+
right: 10px;
|
|
149
|
+
width: 20px;
|
|
150
|
+
height: 20px;
|
|
151
|
+
text-align: center;
|
|
152
|
+
line-height: 20px;
|
|
153
|
+
padding: 0 0 0 1px;
|
|
154
|
+
&::first-letter{
|
|
155
|
+
font-size: 0.8rem;
|
|
156
|
+
}
|
|
157
|
+
@media (min-width:1600px) {
|
|
158
|
+
padding: 0px;
|
|
159
|
+
line-height: 22px;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
&.Ton {
|
|
163
|
+
background: #ff7272;
|
|
164
|
+
}
|
|
165
|
+
&.Load {
|
|
166
|
+
background: #a3c52e;
|
|
167
|
+
}
|
|
168
|
+
&.Hourly {
|
|
169
|
+
background: #ae23d1;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { ViewRouteListCardComponent } from './view-route-list-card.component';
|
|
4
|
+
|
|
5
|
+
describe('ViewRouteListCardComponent', () => {
|
|
6
|
+
let component: ViewRouteListCardComponent;
|
|
7
|
+
let fixture: ComponentFixture<ViewRouteListCardComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ ViewRouteListCardComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(ViewRouteListCardComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
package/src/lib/component/route-jobcode-list/view-route-list-card/view-route-list-card.component.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Component, Inject, Input } from '@angular/core';
|
|
2
|
+
import { CoolmapConfigModel, Route, UtilsService } from '@aggdirect/coolmap-services';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'app-view-route-list-card',
|
|
6
|
+
templateUrl: './view-route-list-card.component.html',
|
|
7
|
+
styleUrls: ['./view-route-list-card.component.scss']
|
|
8
|
+
})
|
|
9
|
+
export class ViewRouteListCardComponent {
|
|
10
|
+
@Input() public route!: Route;
|
|
11
|
+
@Input() public emitrouteevent: any;
|
|
12
|
+
constructor(public utils: UtilsService,
|
|
13
|
+
@Inject('memberData') public config: CoolmapConfigModel) { }
|
|
14
|
+
|
|
15
|
+
detailsDict(event: boolean | string, route: Route) {
|
|
16
|
+
if(event === 'click') this.utils.setdictValue('route-detailsv2', JSON.stringify(route));
|
|
17
|
+
route['type'] = 'editroute'; route['prevent'] = true; this.emitrouteevent.emit(route);
|
|
18
|
+
this.utils.routeDetailsUtility.next({ event, route });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
@import "../../../../assets/variable.scss";
|
|
2
|
+
|
|
3
|
+
.dialogbox{
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
h2{
|
|
7
|
+
font-size: 1.5rem;
|
|
8
|
+
}
|
|
9
|
+
.twobtnprt{
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
margin-top: 10px;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
.closebtn{
|
|
16
|
+
background: $black;
|
|
17
|
+
color: $white;
|
|
18
|
+
border-radius: 30px;
|
|
19
|
+
padding: 10px 18px 10px 18px;
|
|
20
|
+
margin: 0 10px;
|
|
21
|
+
font-size: 1rem;
|
|
22
|
+
}
|
|
23
|
+
.delbtn{
|
|
24
|
+
background:red;
|
|
25
|
+
color: $white;
|
|
26
|
+
border-radius: 30px;
|
|
27
|
+
padding: 10px 18px 10px 18px;
|
|
28
|
+
margin: 0 10px;
|
|
29
|
+
font-size: 1rem;
|
|
30
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Component, Inject } from '@angular/core';
|
|
2
|
+
import {MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'app-dialog',
|
|
5
|
+
templateUrl: './dialog.component.html',
|
|
6
|
+
styleUrls: ['./dialog.component.scss']
|
|
7
|
+
})
|
|
8
|
+
export class DialogComponent {
|
|
9
|
+
body = 'Are you sure you want to delete?';
|
|
10
|
+
positive = 'Delete';
|
|
11
|
+
negative = 'Cancel';
|
|
12
|
+
constructor(public dialogRef: MatDialogRef<DialogComponent>, @Inject(MAT_DIALOG_DATA) public data: any) {
|
|
13
|
+
['body', 'positive', 'negative'].map(elem => {
|
|
14
|
+
if (this.data[elem] !== undefined) { this[elem] = this.data[elem] }
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
onClose(result: boolean) { this.dialogRef.close(result) }
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { EstinationEnum, EstinationData } from '@aggdirect/coolmap-services';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'app-estimation-display',
|
|
6
|
+
templateUrl: './estimation-display.component.html',
|
|
7
|
+
styleUrls: ['./estimation-display.component.scss']
|
|
8
|
+
})
|
|
9
|
+
export class EstimationDisplayComponent {
|
|
10
|
+
@Input() value!: any;
|
|
11
|
+
label = EstinationData;
|
|
12
|
+
Estinationlabel: any = EstinationEnum;
|
|
13
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<div class="searchprt">
|
|
2
|
+
<form [formGroup]="filterForm">
|
|
3
|
+
<mat-form-field class="full-width">
|
|
4
|
+
<mat-label>Search</mat-label>
|
|
5
|
+
<input matInput [matChipInputFor]="chipList" formControlName="search" [matAutocomplete]="auto">
|
|
6
|
+
<mat-icon matSuffix *ngIf="!utils.conveySearchIcon(filterForm.value.search)">search</mat-icon>
|
|
7
|
+
<button mat-button matSuffix mat-icon-button aria-label="Clear" (click)="filterForm.reset()" *ngIf="utils.conveySearchIcon(filterForm.value.search)">
|
|
8
|
+
<mat-icon>close</mat-icon>
|
|
9
|
+
</button>
|
|
10
|
+
<mat-autocomplete autoActiveFirstOption #auto="matAutocomplete" class="autocomplete">
|
|
11
|
+
<mat-option *ngFor="let option of filteredOptions | async" (onSelectionChange)="filterSearch($event)"
|
|
12
|
+
[value]="option">
|
|
13
|
+
{{option.type | titlecase }}: {{option['label']}}
|
|
14
|
+
</mat-option>
|
|
15
|
+
</mat-autocomplete>
|
|
16
|
+
</mat-form-field>
|
|
17
|
+
</form>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="chip-list">
|
|
20
|
+
<mat-chip-grid #chipList aria-label="Filter selection">
|
|
21
|
+
@for (filter of filters; track filter) {
|
|
22
|
+
<mat-chip-row (removed)="removeFromFilter(filter)">
|
|
23
|
+
{{filter.type | titlecase }}: {{filter.name}}
|
|
24
|
+
<button matChipRemove>
|
|
25
|
+
<mat-icon>cancel</mat-icon>
|
|
26
|
+
</button>
|
|
27
|
+
</mat-chip-row>
|
|
28
|
+
}
|
|
29
|
+
</mat-chip-grid>
|
|
30
|
+
</div>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.searchprt{
|
|
2
|
+
padding-right: 20px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
::ng-deep .searchprt .mdc-button{
|
|
6
|
+
min-width: auto;
|
|
7
|
+
}
|
|
8
|
+
::ng-deep .autocomplete .mat-mdc-option .mdc-list-item__primary-text{
|
|
9
|
+
display: inline-block;
|
|
10
|
+
flex-grow: 1;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
text-overflow: ellipsis;
|
|
13
|
+
font-size: 0.8rem;
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
}
|