case 1690

This commit is contained in:
2021-11-24 21:34:46 +00:00
parent 8b5c4947ed
commit 3af79a591b
3 changed files with 58 additions and 1 deletions

View File

@@ -465,6 +465,42 @@
auto-grow
></v-textarea>
</v-col>
<v-col cols="12" sm="6" lg="2">
<v-checkbox
v-model="obj.customerAllowCreateUnit"
:readonly="formState.readOnly"
:label="$ay.t('CustomerAllowCreateUnit')"
ref="customerAllowCreateUnit"
data-cy="customerAllowCreateUnit"
:error-messages="
form().serverErrors(this, 'customerAllowCreateUnit')
"
@change="fieldValueChanged('customerAllowCreateUnit')"
></v-checkbox>
</v-col>
<template v-if="obj.customerAllowCreateUnit">
<v-col cols="12" sm="6" lg="10">
<gz-tag-picker
v-model="obj.customerAllowCreateUnitInTags"
:readonly="formState.readOnly"
:label="
$ay.t('ContactCustomerHeadOfficeTaggedWith')
"
ref="customerAllowCreateUnitInTags"
data-cy="customerAllowCreateUnitInTags"
:error-messages="
form().serverErrors(
this,
'customerAllowCreateUnitInTags'
)
"
@input="
fieldValueChanged('customerAllowCreateUnitInTags')
"
></gz-tag-picker>
</v-col>
</template>
</template>
</v-row>
</v-expansion-panel-content>
@@ -1259,6 +1295,8 @@ export default {
signatureFooter: null,
customerAllowCSR: false,
customerAllowCSRInTags: [],
customerAllowCreateUnit: false,
customerAllowCreateUnitInTags: [],
customerAllowViewWO: false,
customerAllowViewWOInTags: [],
customerAllowWOWiki: false,
@@ -1510,6 +1548,7 @@ async function fetchTranslatedText(vm) {
"NotifyEventWorkorderCompleted",
"CustomerAccessWorkOrderReport",
"CSRInfoText",
"CustomerAllowCreateUnit",
"CustomerSignature",
"GlobalSignatureFooter",
"GlobalSignatureHeader",

View File

@@ -97,6 +97,17 @@
@input="fieldValueChanged('unitId')"
></gz-pick-list>
</v-col>
<v-col
v-if="$store.state.customerRights.createUnit == true"
cols="12"
sm="6"
lg="4"
xl="3"
>
<v-btn @click="showAddUnitDialog()">{{
$ay.t("AddNewUnit")
}}</v-btn>
</v-col>
<v-col cols="12">
<v-text-field
@@ -328,6 +339,7 @@ export default {
}
},
methods: {
showAddUnitDialog: function() {},
unitListVariant: function() {
return `customerid: ${this.obj.customerId}`;
},
@@ -675,7 +687,8 @@ async function fetchTranslatedText() {
"CustomerServiceRequestCustom13",
"CustomerServiceRequestCustom14",
"CustomerServiceRequestCustom15",
"CustomerServiceRequestCustom16"
"CustomerServiceRequestCustom16",
"AddNewUnit"
]);
}