refinement to readonly mode: banner now gray and removed disabled for controls as they were too faded to read properly and some controls with action buttons didn't work (email, phone etc)
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
<v-text-field
|
||||
v-model="obj.name"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('CustomerName')"
|
||||
:rules="[form().required(this, 'name')]"
|
||||
:error-messages="form().serverErrors(this, 'name')"
|
||||
@@ -39,7 +38,6 @@
|
||||
<v-checkbox
|
||||
v-model="obj.active"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('Active')"
|
||||
ref="active"
|
||||
data-cy="active"
|
||||
@@ -58,7 +56,6 @@
|
||||
<v-text-field
|
||||
v-model="obj.accountNumber"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('CustomerAccountNumber')"
|
||||
ref="accountNumber"
|
||||
data-cy="accountNumber"
|
||||
@@ -77,7 +74,6 @@
|
||||
<gz-url
|
||||
v-model="obj.webAddress"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('WebAddress')"
|
||||
ref="webAddress"
|
||||
data-cy="webAddress"
|
||||
@@ -96,7 +92,6 @@
|
||||
<gz-email
|
||||
v-model="obj.emailAddress"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('CustomerEmail')"
|
||||
ref="emailAddress"
|
||||
data-cy="emailAddress"
|
||||
@@ -115,7 +110,6 @@
|
||||
<gz-phone
|
||||
v-model="obj.phone1"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('CustomerPhone1')"
|
||||
ref="phone1"
|
||||
data-cy="phone1"
|
||||
@@ -134,7 +128,6 @@
|
||||
<gz-phone
|
||||
v-model="obj.phone2"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('CustomerPhone2')"
|
||||
ref="phone2"
|
||||
data-cy="phone2"
|
||||
@@ -153,7 +146,6 @@
|
||||
<gz-phone
|
||||
v-model="obj.phone3"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('CustomerPhone3')"
|
||||
ref="phone3"
|
||||
data-cy="phone3"
|
||||
@@ -172,7 +164,6 @@
|
||||
<gz-phone
|
||||
v-model="obj.phone4"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('CustomerPhone4')"
|
||||
ref="phone4"
|
||||
data-cy="phone4"
|
||||
@@ -191,7 +182,6 @@
|
||||
<gz-phone
|
||||
v-model="obj.phone5"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('CustomerPhone5')"
|
||||
ref="phone5"
|
||||
data-cy="phone5"
|
||||
@@ -212,7 +202,6 @@
|
||||
:showEditIcon="true"
|
||||
v-model="obj.defaultServiceTemplatedId"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('WorkOrderTemplate')"
|
||||
ref="defaultServiceTemplateId"
|
||||
data-cy="defaultServiceTemplateId"
|
||||
@@ -233,7 +222,6 @@
|
||||
<v-checkbox
|
||||
v-model="obj.billHeadOffice"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('CustomerBillHeadOffice')"
|
||||
ref="billHeadOffice"
|
||||
data-cy="billHeadOffice"
|
||||
@@ -258,7 +246,6 @@
|
||||
:showEditIcon="true"
|
||||
v-model="obj.headOfficeId"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('HeadOffice')"
|
||||
ref="headOfficeId"
|
||||
data-cy="headOfficeId"
|
||||
@@ -279,7 +266,6 @@
|
||||
:showEditIcon="true"
|
||||
v-model="obj.contractId"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('Contract')"
|
||||
ref="contractId"
|
||||
data-cy="contractId"
|
||||
@@ -301,7 +287,6 @@
|
||||
:label="$ay.t('ContractExpires')"
|
||||
v-model="obj.contractExpires"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
ref="contractExpires"
|
||||
testId="contractExpires"
|
||||
:error-messages="
|
||||
@@ -321,7 +306,6 @@
|
||||
<v-checkbox
|
||||
v-model="obj.usesBanking"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('UsesBanking')"
|
||||
ref="usesBanking"
|
||||
data-cy="usesBanking"
|
||||
@@ -335,7 +319,6 @@
|
||||
<v-textarea
|
||||
v-model="obj.notes"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('CustomerNotes')"
|
||||
:error-messages="form().serverErrors(this, 'notes')"
|
||||
ref="notes"
|
||||
@@ -349,7 +332,6 @@
|
||||
<v-textarea
|
||||
v-model="obj.techNotes"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('CustomerTechNotes')"
|
||||
:error-messages="form().serverErrors(this, 'techNotes')"
|
||||
ref="techNotes"
|
||||
@@ -364,7 +346,6 @@
|
||||
<v-textarea
|
||||
v-model="obj.popUpNotes"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('CustomerPopUpNotes')"
|
||||
:error-messages="form().serverErrors(this, 'popUpNotes')"
|
||||
ref="popUpNotes"
|
||||
@@ -379,7 +360,6 @@
|
||||
<gz-tag-picker
|
||||
v-model="obj.tags"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
ref="tags"
|
||||
data-cy="tags"
|
||||
:error-messages="form().serverErrors(this, 'tags')"
|
||||
@@ -392,7 +372,6 @@
|
||||
v-model="obj.customFields"
|
||||
:formKey="formCustomTemplateKey"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:parentVM="this"
|
||||
ref="customFields"
|
||||
data-cy="customFields"
|
||||
@@ -408,7 +387,6 @@
|
||||
ref="wiki"
|
||||
v-model="obj.wiki"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
@input="fieldValueChanged('wiki')"
|
||||
></gz-wiki
|
||||
></v-col>
|
||||
@@ -419,7 +397,6 @@
|
||||
>
|
||||
<gz-attachments
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:ayaType="ayaType"
|
||||
:ayaId="obj.id"
|
||||
></gz-attachments
|
||||
@@ -478,7 +455,6 @@
|
||||
<v-text-field
|
||||
v-model="obj.address"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('AddressDeliveryAddress')"
|
||||
ref="address"
|
||||
data-cy="address"
|
||||
@@ -497,7 +473,6 @@
|
||||
<v-text-field
|
||||
v-model="obj.city"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('AddressCity')"
|
||||
ref="city"
|
||||
data-cy="city"
|
||||
@@ -516,7 +491,6 @@
|
||||
<v-text-field
|
||||
v-model="obj.region"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('AddressStateProv')"
|
||||
ref="region"
|
||||
data-cy="region"
|
||||
@@ -535,7 +509,6 @@
|
||||
<v-text-field
|
||||
v-model="obj.country"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('AddressCountry')"
|
||||
ref="country"
|
||||
data-cy="country"
|
||||
@@ -554,7 +527,6 @@
|
||||
<gz-decimal
|
||||
v-model="obj.latitude"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('AddressLatitude')"
|
||||
ref="latitude"
|
||||
data-cy="latitude"
|
||||
@@ -575,7 +547,6 @@
|
||||
<gz-decimal
|
||||
v-model="obj.longitude"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('AddressLongitude')"
|
||||
ref="longitude"
|
||||
data-cy="longitude"
|
||||
@@ -629,7 +600,6 @@
|
||||
<v-text-field
|
||||
v-model="obj.postAddress"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('AddressPostalDeliveryAddress')"
|
||||
ref="postAddress"
|
||||
data-cy="postAddress"
|
||||
@@ -648,7 +618,6 @@
|
||||
<v-text-field
|
||||
v-model="obj.postCity"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('AddressPostalCity')"
|
||||
ref="postCity"
|
||||
data-cy="postCity"
|
||||
@@ -667,7 +636,6 @@
|
||||
<v-text-field
|
||||
v-model="obj.postRegion"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('AddressPostalStateProv')"
|
||||
ref="postRegion"
|
||||
data-cy="postRegion"
|
||||
@@ -686,7 +654,6 @@
|
||||
<v-text-field
|
||||
v-model="obj.postCountry"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('AddressPostalCountry')"
|
||||
ref="postCountry"
|
||||
data-cy="postCountry"
|
||||
@@ -705,7 +672,6 @@
|
||||
<v-text-field
|
||||
v-model="obj.postCode"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('AddressPostalPostal')"
|
||||
ref="postCode"
|
||||
data-cy="postCode"
|
||||
@@ -750,7 +716,7 @@
|
||||
<v-btn
|
||||
class="ml-12"
|
||||
@click="addContact"
|
||||
:disabled="obj.id == 0"
|
||||
:disabled="obj.id == 0 || formState.readOnly"
|
||||
>
|
||||
<v-icon data-cy="add">$ayiPlus</v-icon>
|
||||
</v-btn>
|
||||
@@ -1436,6 +1402,7 @@ async function clickHandler(menuItem) {
|
||||
function generateMenu(vm) {
|
||||
let menuOptions = {
|
||||
isMain: false,
|
||||
readOnly: vm.formState.readOnly,
|
||||
icon: "$ayiAddressCard",
|
||||
title: "Customer",
|
||||
helpUrl: "form-customer",
|
||||
|
||||
Reference in New Issue
Block a user