diff --git a/ayanova/src/components/work-order-item-units.vue b/ayanova/src/components/work-order-item-units.vue index 893c51e6..a1ee1c38 100644 --- a/ayanova/src/components/work-order-item-units.vue +++ b/ayanova/src/components/work-order-item-units.vue @@ -373,7 +373,24 @@ export default { } }, methods: { - getWarrantyInfo() {}, + async getWarrantyInfo() { + this.warrantyInfo = null; + const id = this.value.items[this.activeWoItemIndex].units[ + this.activeItemIndex + ].unitId; + if (!id || id == 0) { + return; + } + let res = await window.$gz.api.get(`unit/service-warranty-info/${id}`); + if (res.error) { + window.$gz.eventBus.$emit( + "notify-warning", + window.$gz.errorHandler.errorToString(res, this) + ); + } else { + this.warrantyInfo = JSON.stringify(res.data); + } + }, showBulkUnitsDialog() { if (this.bulkUnitTableHeaders.length == 0) { //init bulk table headers @@ -430,6 +447,7 @@ export default { this.value.items[this.activeWoItemIndex].units[ this.activeItemIndex ].unitViz = newName; + this.warrantyInfo = null; }, newItem() { let newIndex = this.value.items[this.activeWoItemIndex].units.length;