This commit is contained in:
@@ -34,11 +34,16 @@
|
||||
:disabled="disabled || imgUrl != null"
|
||||
:default-url="imgUrl"
|
||||
></vueSignature>
|
||||
|
||||
<template>
|
||||
{{ sigDateLocalized }}
|
||||
<div class="mt-8">
|
||||
input name here show date here
|
||||
<v-text-field
|
||||
v-model="tempName"
|
||||
:readonly="disabled || imgUrl != null"
|
||||
:label="$ay.t('Name')"
|
||||
ref="sigName"
|
||||
data-cy="sigName"
|
||||
></v-text-field>
|
||||
</div>
|
||||
</template>
|
||||
</v-card-text>
|
||||
@@ -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) {
|
||||
|
||||
@@ -2080,7 +2080,8 @@ async function fetchTranslatedText(vm) {
|
||||
"WorkOrderItemLoan",
|
||||
"WorkOrderItemOutsideService",
|
||||
"CustomerSignature",
|
||||
"TechSignature"
|
||||
"TechSignature",
|
||||
"Name"
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user