diff --git a/ayanova/src/components/work-order-signature.vue b/ayanova/src/components/work-order-signature.vue index 4016b0b0..b88cdf43 100644 --- a/ayanova/src/components/work-order-signature.vue +++ b/ayanova/src/components/work-order-signature.vue @@ -34,11 +34,16 @@ :disabled="disabled || imgUrl != null" :default-url="imgUrl" > - @@ -86,7 +91,8 @@ export default { backgroundColor: "rgb(245,245,245)" }, tempSig: null, - tempDate: null + tempDate: null, + tempName: null }; }, @@ -112,6 +118,7 @@ export default { showSign() { this.tempSig = this.imgUrl; this.tempDate = this.sigDate; + this.tempName = this.sigName; this.openDialog = true; }, form() { @@ -125,6 +132,7 @@ export default { } this.setSig(svg); this.setCaptured(window.$gz.locale.nowUTC8601String()); + this.setName(this.tempName); console.log("SVG size IS ", svg == null ? 0 : svg.length); this.value.isDirty = true; this.pvm.formState.dirty = true; @@ -146,17 +154,27 @@ export default { this.value.techSignatureCaptured = theDate; } }, + setName(theName) { + if (this.variant == "customer") { + this.value.customerSignatureName = theName; + } else { + this.value.techSignatureName = theName; + } + }, cancelDialog() { this.$refs.sigCtrl.fromDataURL(this.tempSig); this.setSig(this.tempSig); this.setCaptured(this.tempDate); + this.setName(this.tempName); this.openDialog = false; + this.tempName = null; this.tempSig = null; this.tempDate = null; }, erase() { this.setSig(null); this.setCaptured(null); + this.setName(null); this.$refs.sigCtrl.clear(); this.value.isDirty = true; this.pvm.formState.dirty = true; @@ -189,6 +207,13 @@ export default { return this.value.techSignatureCaptured; } }, + sigName: function() { + if (this.variant == "customer") { + return this.value.customerSignatureName; + } else { + return this.value.techSignatureName; + } + }, sigDateLocalized: function() { const sd = this.sigDate; if (sd == null) { diff --git a/ayanova/src/views/svc-workorder.vue b/ayanova/src/views/svc-workorder.vue index 1f6fb720..b0411b84 100644 --- a/ayanova/src/views/svc-workorder.vue +++ b/ayanova/src/views/svc-workorder.vue @@ -2080,7 +2080,8 @@ async function fetchTranslatedText(vm) { "WorkOrderItemLoan", "WorkOrderItemOutsideService", "CustomerSignature", - "TechSignature" + "TechSignature", + "Name" ]); }