From 5604ce4e79a7bf989277447452d45118d8447eca Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 8 Jul 2021 20:22:29 +0000 Subject: [PATCH] --- .../src/components/work-order-item-units.vue | 34 +++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/ayanova/src/components/work-order-item-units.vue b/ayanova/src/components/work-order-item-units.vue index a1ee1c38..ea8edb9f 100644 --- a/ayanova/src/components/work-order-item-units.vue +++ b/ayanova/src/components/work-order-item-units.vue @@ -137,7 +137,10 @@ {{ $ay.t("UnitWarrantyInfo") }} - {{ warrantyInfo }} + {{ + value.items[activeWoItemIndex].units[activeItemIndex] + .warrantyViz + }} {{ @@ -323,7 +326,8 @@ export default { selectedBulkUnits: [], selectedBulkUnitTags: [], bulkUnitTableHeaders: [], - warrantyInfo: null + warrantyInfo: {}, + warrantyDisplay: null }; }, props: { @@ -375,6 +379,7 @@ export default { methods: { async getWarrantyInfo() { this.warrantyInfo = null; + const id = this.value.items[this.activeWoItemIndex].units[ this.activeItemIndex ].unitId; @@ -388,7 +393,19 @@ export default { window.$gz.errorHandler.errorToString(res, this) ); } else { - this.warrantyInfo = JSON.stringify(res.data); + /* { + "recentWorkOrders":[{"serial":10,"id":10,"serviceDate":"2021-01-19T22:00:00Z"},{"serial":8,"id":8,"serviceDate":"2021-04-08T22:00:00Z"},{"serial":7,"id":7,"serviceDate":"2021-04-18T20:00:00Z"}], + "purchaseDate":"2019-03-12T09:37:52.930923Z", + "purchasedFromVendor":null, + "purchaseFromVendorId":null, + "purchaseReceiptNumber":"139736", + "lifeTimeWarranty":false, + "warrantyExpiryDate":"2019-04-12T09:37:52.930923Z", + "warrantyTerms":"Shipping parts and service"} */ + + this.value.items[this.activeWoItemIndex].units[ + this.activeItemIndex + ].warrantyViz = JSON.stringify(res.data); } }, showBulkUnitsDialog() { @@ -434,7 +451,8 @@ export default { isDirty: true, workOrderItemId: this.value.items[this.activeWoItemIndex].id, uid: Date.now(), - unitViz: z.unitSerial + unitViz: z.unitSerial, + warrantyViz: null }); }); this.$emit("change"); @@ -447,7 +465,9 @@ export default { this.value.items[this.activeWoItemIndex].units[ this.activeItemIndex ].unitViz = newName; - this.warrantyInfo = null; + this.value.items[this.activeWoItemIndex].units[ + this.activeItemIndex + ].warrantyViz = null; }, newItem() { let newIndex = this.value.items[this.activeWoItemIndex].units.length; @@ -476,8 +496,10 @@ export default { isDirty: true, workOrderItemId: this.value.items[this.activeWoItemIndex].id, uid: Date.now(), - unitViz: null + unitViz: null, + warrantyViz: null }); + this.$emit("change"); this.selectedRow = [{ index: newIndex }]; this.activeItemIndex = newIndex;