@aggdirect/coolmap 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/component/add-route/add-route.component.mjs +5 -4
- package/fesm2015/aggdirect-coolmap.mjs +6 -8
- package/fesm2015/aggdirect-coolmap.mjs.map +1 -1
- package/fesm2020/aggdirect-coolmap.mjs +4 -3
- package/fesm2020/aggdirect-coolmap.mjs.map +1 -1
- package/lib/component/add-route/add-route.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1047,8 +1047,8 @@ class AddRouteComponent {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
});
|
|
1049
1049
|
}
|
|
1050
|
-
|
|
1051
|
-
|
|
1050
|
+
fetchUnitsList() {
|
|
1051
|
+
this.utils.getData('coolmap/unit/list/view').pipe(takeUntil(this.destroyer$)).subscribe((res) => {
|
|
1052
1052
|
if (res) {
|
|
1053
1053
|
this.unitsList = res.data;
|
|
1054
1054
|
}
|
|
@@ -1077,10 +1077,11 @@ class AddRouteComponent {
|
|
|
1077
1077
|
checkAndFetchRouteInformation(isinitial) {
|
|
1078
1078
|
if (this.addRouteForm.value?.delivery_lat_lng?.length > 0 && this.addRouteForm.value?.pickup_lat_lng?.length > 0 && this.addRouteForm.value.unit_id) {
|
|
1079
1079
|
let unit = this.unitsList.find((x) => x.id === this.addRouteForm.value.unit_id);
|
|
1080
|
+
console.log(this.unitsList, unit);
|
|
1080
1081
|
const param = {
|
|
1081
1082
|
delivery_lat_lng: this.addRouteForm.value.delivery_lat_lng,
|
|
1082
1083
|
pickup_lat_lng: this.addRouteForm.value.pickup_lat_lng,
|
|
1083
|
-
unit: unit
|
|
1084
|
+
unit: unit?.type
|
|
1084
1085
|
};
|
|
1085
1086
|
this.utils.postdata('coolmap/calculate/routes/estimation', param).pipe(takeUntil(this.destroyer$)).subscribe((res) => {
|
|
1086
1087
|
if (res && res['path']) {
|