@fleetbase/fleetops-engine 0.4.2 → 0.4.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.
|
@@ -571,7 +571,6 @@ export default class OperationsOrdersIndexNewController extends BaseController {
|
|
|
571
571
|
is_route_optimized,
|
|
572
572
|
})
|
|
573
573
|
.then((serviceQuotes) => {
|
|
574
|
-
console.log('[serviceQuotes]', serviceQuotes);
|
|
575
574
|
set(this, 'serviceQuotes', isArray(serviceQuotes) ? serviceQuotes : []);
|
|
576
575
|
|
|
577
576
|
if (this.serviceQuotes.length && this.isUsingIntegratedVendor) {
|
|
@@ -588,27 +587,21 @@ export default class OperationsOrdersIndexNewController extends BaseController {
|
|
|
588
587
|
|
|
589
588
|
_getSerializedPayload(payload) {
|
|
590
589
|
const serialized = {
|
|
591
|
-
pickup: payload.pickup,
|
|
592
|
-
dropoff: payload.dropoff,
|
|
590
|
+
pickup: this._seriailizeModel(payload.pickup),
|
|
591
|
+
dropoff: this._seriailizeModel(payload.dropoff),
|
|
592
|
+
entitities: this._serializeArray(payload.entities),
|
|
593
|
+
waypoints: this._serializeArray(payload.waypoint),
|
|
593
594
|
};
|
|
594
595
|
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
if (isModel(payload.dropoff)) {
|
|
600
|
-
serialized.dropoff = payload.dropoff.toJSON();
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
if (isArray(payload.entities)) {
|
|
604
|
-
serialized.entities = payload.entities.toArray();
|
|
605
|
-
}
|
|
596
|
+
return serialized;
|
|
597
|
+
}
|
|
606
598
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
599
|
+
_seriailizeModel(model) {
|
|
600
|
+
return isModel(model) ? model.toJSON() : model;
|
|
601
|
+
}
|
|
610
602
|
|
|
611
|
-
|
|
603
|
+
_serializeArray(array) {
|
|
604
|
+
return isArray(array) ? array.map((item) => this._seriailizeModel(item)) : array;
|
|
612
605
|
}
|
|
613
606
|
|
|
614
607
|
@action scheduleOrder(dateInstance) {
|
package/composer.json
CHANGED
package/extension.json
CHANGED