This commit is contained in:
@@ -34,11 +34,16 @@
|
|||||||
:disabled="disabled || imgUrl != null"
|
:disabled="disabled || imgUrl != null"
|
||||||
:default-url="imgUrl"
|
:default-url="imgUrl"
|
||||||
></vueSignature>
|
></vueSignature>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
{{ sigDateLocalized }}
|
{{ sigDateLocalized }}
|
||||||
<div class="mt-8">
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
@@ -86,7 +91,8 @@ export default {
|
|||||||
backgroundColor: "rgb(245,245,245)"
|
backgroundColor: "rgb(245,245,245)"
|
||||||
},
|
},
|
||||||
tempSig: null,
|
tempSig: null,
|
||||||
tempDate: null
|
tempDate: null,
|
||||||
|
tempName: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -112,6 +118,7 @@ export default {
|
|||||||
showSign() {
|
showSign() {
|
||||||
this.tempSig = this.imgUrl;
|
this.tempSig = this.imgUrl;
|
||||||
this.tempDate = this.sigDate;
|
this.tempDate = this.sigDate;
|
||||||
|
this.tempName = this.sigName;
|
||||||
this.openDialog = true;
|
this.openDialog = true;
|
||||||
},
|
},
|
||||||
form() {
|
form() {
|
||||||
@@ -125,6 +132,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.setSig(svg);
|
this.setSig(svg);
|
||||||
this.setCaptured(window.$gz.locale.nowUTC8601String());
|
this.setCaptured(window.$gz.locale.nowUTC8601String());
|
||||||
|
this.setName(this.tempName);
|
||||||
console.log("SVG size IS ", svg == null ? 0 : svg.length);
|
console.log("SVG size IS ", svg == null ? 0 : svg.length);
|
||||||
this.value.isDirty = true;
|
this.value.isDirty = true;
|
||||||
this.pvm.formState.dirty = true;
|
this.pvm.formState.dirty = true;
|
||||||
@@ -146,17 +154,27 @@ export default {
|
|||||||
this.value.techSignatureCaptured = theDate;
|
this.value.techSignatureCaptured = theDate;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
setName(theName) {
|
||||||
|
if (this.variant == "customer") {
|
||||||
|
this.value.customerSignatureName = theName;
|
||||||
|
} else {
|
||||||
|
this.value.techSignatureName = theName;
|
||||||
|
}
|
||||||
|
},
|
||||||
cancelDialog() {
|
cancelDialog() {
|
||||||
this.$refs.sigCtrl.fromDataURL(this.tempSig);
|
this.$refs.sigCtrl.fromDataURL(this.tempSig);
|
||||||
this.setSig(this.tempSig);
|
this.setSig(this.tempSig);
|
||||||
this.setCaptured(this.tempDate);
|
this.setCaptured(this.tempDate);
|
||||||
|
this.setName(this.tempName);
|
||||||
this.openDialog = false;
|
this.openDialog = false;
|
||||||
|
this.tempName = null;
|
||||||
this.tempSig = null;
|
this.tempSig = null;
|
||||||
this.tempDate = null;
|
this.tempDate = null;
|
||||||
},
|
},
|
||||||
erase() {
|
erase() {
|
||||||
this.setSig(null);
|
this.setSig(null);
|
||||||
this.setCaptured(null);
|
this.setCaptured(null);
|
||||||
|
this.setName(null);
|
||||||
this.$refs.sigCtrl.clear();
|
this.$refs.sigCtrl.clear();
|
||||||
this.value.isDirty = true;
|
this.value.isDirty = true;
|
||||||
this.pvm.formState.dirty = true;
|
this.pvm.formState.dirty = true;
|
||||||
@@ -189,6 +207,13 @@ export default {
|
|||||||
return this.value.techSignatureCaptured;
|
return this.value.techSignatureCaptured;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
sigName: function() {
|
||||||
|
if (this.variant == "customer") {
|
||||||
|
return this.value.customerSignatureName;
|
||||||
|
} else {
|
||||||
|
return this.value.techSignatureName;
|
||||||
|
}
|
||||||
|
},
|
||||||
sigDateLocalized: function() {
|
sigDateLocalized: function() {
|
||||||
const sd = this.sigDate;
|
const sd = this.sigDate;
|
||||||
if (sd == null) {
|
if (sd == null) {
|
||||||
|
|||||||
@@ -2080,7 +2080,8 @@ async function fetchTranslatedText(vm) {
|
|||||||
"WorkOrderItemLoan",
|
"WorkOrderItemLoan",
|
||||||
"WorkOrderItemOutsideService",
|
"WorkOrderItemOutsideService",
|
||||||
"CustomerSignature",
|
"CustomerSignature",
|
||||||
"TechSignature"
|
"TechSignature",
|
||||||
|
"Name"
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user