This commit is contained in:
@@ -9,7 +9,10 @@ todo: Uifielddatatype Phone and TimeSpan support at client, translation keys etc
|
||||
gz-data-table.vue
|
||||
ay-data-list-view.vue
|
||||
|
||||
todo: input type email url phone number etc supported on device to activate?
|
||||
if not, it must be supported somehow so figure it out
|
||||
|
||||
|
||||
NEXT UP: Customer
|
||||
|
||||
|
||||
|
||||
@@ -23,94 +23,7 @@
|
||||
@input="fieldValueChanged('name')"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'Serial')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-text-field
|
||||
v-model="obj.serial"
|
||||
:readonly="true"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('WidgetSerial')"
|
||||
data-cy="serial"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'Count')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-text-field
|
||||
v-model="obj.count"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:clearable="!formState.readOnly"
|
||||
@click:clear="fieldValueChanged('count')"
|
||||
:counter="10"
|
||||
:label="$ay.t('WidgetCount')"
|
||||
ref="count"
|
||||
data-cy="count"
|
||||
:rules="[form().integerValid(this, 'count')]"
|
||||
:error-messages="form().serverErrors(this, 'count')"
|
||||
@input="fieldValueChanged('count')"
|
||||
type="number"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'DollarAmount')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<gz-currency
|
||||
v-model="obj.dollarAmount"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('WidgetDollarAmount')"
|
||||
ref="dollarAmount"
|
||||
data-cy="dollarAmount"
|
||||
:rules="[
|
||||
form().decimalValid(this, 'dollarAmount'),
|
||||
form().required(this, 'dollarAmount')
|
||||
]"
|
||||
:error-messages="form().serverErrors(this, 'dollarAmount')"
|
||||
@input="fieldValueChanged('dollarAmount')"
|
||||
></gz-currency>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<gz-date-time-picker
|
||||
:label="$ay.t('WidgetStartDate')"
|
||||
v-model="obj.startDate"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
ref="startDate"
|
||||
testId="startDate"
|
||||
:error-messages="form().serverErrors(this, 'startDate')"
|
||||
@input="fieldValueChanged('startDate')"
|
||||
></gz-date-time-picker>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<gz-date-time-picker
|
||||
:label="$ay.t('WidgetEndDate')"
|
||||
:rules="[form().datePrecedence(this, 'startDate', 'endDate')]"
|
||||
:error-messages="form().serverErrors(this, 'endDate')"
|
||||
v-model="obj.endDate"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
ref="endDate"
|
||||
testId="endDate"
|
||||
@input="fieldValueChanged('endDate')"
|
||||
></gz-date-time-picker>
|
||||
</v-col>
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'Active')"
|
||||
cols="12"
|
||||
@@ -131,47 +44,128 @@
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'UserId')"
|
||||
v-if="form().showMe(this, 'AccountNumber')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<gz-pick-list
|
||||
:ayaType="ayaTypes().User"
|
||||
:showEditIcon="true"
|
||||
v-model="obj.userId"
|
||||
:readonly="formState.readOnly"
|
||||
<v-text-field
|
||||
v-model="obj.accountNumber"
|
||||
:readonly="true"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('User')"
|
||||
ref="userid"
|
||||
data-cy="userid"
|
||||
:error-messages="form().serverErrors(this, 'userid')"
|
||||
@input="fieldValueChanged('userid')"
|
||||
></gz-pick-list>
|
||||
:label="$ay.t('CustomerAccountNumber')"
|
||||
ref="accountNumber"
|
||||
data-cy="accountNumber"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'UserType')"
|
||||
v-if="form().showMe(this, 'EmailAddress')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-select
|
||||
v-model="obj.userType"
|
||||
:items="selectLists.usertypes"
|
||||
item-text="name"
|
||||
item-value="id"
|
||||
:readonly="formState.readOnly"
|
||||
<v-text-field
|
||||
v-model="obj.emailAddress"
|
||||
:readonly="true"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('UserType')"
|
||||
ref="usertype"
|
||||
data-cy="usertype"
|
||||
:rules="[form().integerValid(this, 'usertype')]"
|
||||
:error-messages="form().serverErrors(this, 'usertype')"
|
||||
@input="fieldValueChanged('usertype')"
|
||||
></v-select>
|
||||
:label="$ay.t('CustomerEmail')"
|
||||
ref="emailAddress"
|
||||
data-cy="emailAddress"
|
||||
type="email"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'Phone1')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-text-field
|
||||
v-model="obj.phone1"
|
||||
:readonly="true"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('CustomerPhone1')"
|
||||
ref="phone1"
|
||||
data-cy="phone1"
|
||||
type="tel"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'Phone2')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-text-field
|
||||
v-model="obj.phone2"
|
||||
:readonly="true"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('CustomerPhone2')"
|
||||
ref="phone2"
|
||||
data-cy="phone2"
|
||||
type="tel"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'Phone3')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-text-field
|
||||
v-model="obj.phone3"
|
||||
:readonly="true"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('CustomerPhone3')"
|
||||
ref="phone3"
|
||||
data-cy="phone3"
|
||||
type="tel"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'Phone4')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-text-field
|
||||
v-model="obj.phone4"
|
||||
:readonly="true"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('CustomerPhone4')"
|
||||
ref="phone4"
|
||||
data-cy="phone4"
|
||||
type="tel"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'Phone5')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-text-field
|
||||
v-model="obj.phone5"
|
||||
:readonly="true"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('CustomerPhone5')"
|
||||
ref="phone5"
|
||||
data-cy="phone5"
|
||||
type="tel"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col v-if="form().showMe(this, 'Notes')" cols="12">
|
||||
@@ -777,32 +771,51 @@ async function initForm(vm) {
|
||||
//
|
||||
async function fetchTranslatedText(vm) {
|
||||
await window.$gz.translation.cacheTranslations([
|
||||
"Customer",
|
||||
"WidgetName",
|
||||
"WidgetSerial",
|
||||
"WidgetDollarAmount",
|
||||
"WidgetCount",
|
||||
"User",
|
||||
"UserType",
|
||||
"WidgetStartDate",
|
||||
"WidgetEndDate",
|
||||
"WidgetNotes",
|
||||
"WidgetCustom1",
|
||||
"WidgetCustom2",
|
||||
"WidgetCustom3",
|
||||
"WidgetCustom4",
|
||||
"WidgetCustom5",
|
||||
"WidgetCustom6",
|
||||
"WidgetCustom7",
|
||||
"WidgetCustom8",
|
||||
"WidgetCustom9",
|
||||
"WidgetCustom10",
|
||||
"WidgetCustom11",
|
||||
"WidgetCustom12",
|
||||
"WidgetCustom13",
|
||||
"WidgetCustom14",
|
||||
"WidgetCustom15",
|
||||
"WidgetCustom16"
|
||||
"CustomerName",
|
||||
"CustomerNotes",
|
||||
"WebAddress",
|
||||
"CustomerPopUpNotes",
|
||||
"CustomerBillHeadOffice",
|
||||
"HeadOffice",
|
||||
"CustomerTechNotes",
|
||||
"CustomerAccountNumber",
|
||||
"UsesBanking",
|
||||
"Contract",
|
||||
"ContractExpires",
|
||||
"WorkOrderTemplate",
|
||||
"CustomerPhone1",
|
||||
"CustomerPhone2",
|
||||
"CustomerPhone3",
|
||||
"CustomerPhone4",
|
||||
"CustomerPhone5",
|
||||
"CustomerEmail",
|
||||
"AddressPostalDeliveryAddress",
|
||||
"AddressPostalCity",
|
||||
"AddressPostalStateProv",
|
||||
"AddressPostalCountry",
|
||||
"AddressPostalPostal",
|
||||
"AddressDeliveryAddress",
|
||||
"AddressCity",
|
||||
"AddressStateProv",
|
||||
"AddressCountry",
|
||||
"AddressLatitude",
|
||||
"AddressLongitude",
|
||||
"CustomerCustom1",
|
||||
"CustomerCustom2",
|
||||
"CustomerCustom3",
|
||||
"CustomerCustom4",
|
||||
"CustomerCustom5",
|
||||
"CustomerCustom6",
|
||||
"CustomerCustom7",
|
||||
"CustomerCustom8",
|
||||
"CustomerCustom9",
|
||||
"CustomerCustom10",
|
||||
"CustomerCustom11",
|
||||
"CustomerCustom12",
|
||||
"CustomerCustom13",
|
||||
"CustomerCustom14",
|
||||
"CustomerCustom15",
|
||||
"CustomerCustom16"
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user