This commit is contained in:
2021-01-07 15:58:59 +00:00
parent 848939ae80
commit 58d6f8bff6
3 changed files with 109 additions and 77 deletions

View File

@@ -5,6 +5,18 @@
MISC ITEMS THAT CAME UP
todo: picklists need meta conditions
e.g. UnitPickList typically needs to be filtered to a particular customer
todo: all picklists of objects htat have tags should by default include tags as the last field
this is to support choosing by tag
todo: go back and all picklists and datalists change the field key to match the lt key wherever possible.
yeah, I know, but it would save a lot of hassle and fuckery from mismatches
todo: tag search in picklist, does it support more than one tag? I forget
Users may need to "triangulate" on to an item by multiple tags
todo: clicking into a decimal field with zero in it already and then clicking out causes the record to be dirty
see tax-code for example
@@ -45,7 +57,7 @@ todo: Why are your mailing-lists and your website in english?
CURRENTLY DOING:
CustomerServiceRequest
TWO UI's one for inside user and one for outside users
UI form make sure once accepted can't be changed to not accepted, it's one way trip

View File

@@ -9,7 +9,7 @@
<v-text-field
v-model="obj.name"
:readonly="formState.readOnly"
:label="$ay.t('CustomerServiceRequestName')"
:label="$ay.t('CustomerServiceRequestTitle')"
:rules="[form().required(this, 'name')]"
:error-messages="form().serverErrors(this, 'name')"
ref="name"
@@ -18,107 +18,81 @@
></v-text-field>
</v-col>
<v-col
v-if="form().showMe(this, 'CustomerServiceRequestAccountNumber')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<v-text-field
v-model="obj.accountNumber"
:readonly="formState.readOnly"
:label="$ay.t('CustomerServiceRequestAccountNumber')"
ref="accountNumber"
data-cy="accountNumber"
:error-messages="form().serverErrors(this, 'accountNumber')"
@input="fieldValueChanged('accountNumber')"
></v-text-field>
</v-col>
<v-col
v-if="
form().showMe(
this,
'CustomerServiceRequestCustomerServiceRequestOverseerID'
'CustomerServiceRequestCustomerReferenceNumber'
)
"
cols="12"
sm="6"
lg="4"
xl="3"
>
<v-text-field
v-model="obj.customerReferenceNumber"
:readonly="formState.readOnly"
:label="$ay.t('CustomerServiceRequestCustomerReferenceNumber')"
ref="customerReferenceNumber"
data-cy="customerReferenceNumber"
:error-messages="
form().serverErrors(this, 'customerReferenceNumber')
"
@input="fieldValueChanged('customerReferenceNumber')"
></v-text-field>
</v-col>
<v-col
v-if="form().showMe(this, 'CustomerServiceRequestRequestedBy')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-pick-list
:ayaType="ayaTypes().User"
:variant="'inside'"
:variant="'outside'"
:showEditIcon="true"
v-model="obj.csrOverseerId"
v-model="obj.requestedByUserId"
:readonly="formState.readOnly"
:label="
$ay.t('CustomerServiceRequestCustomerServiceRequestOverseerID')
"
ref="csrOverseerId"
data-cy="csrOverseerId"
:error-messages="form().serverErrors(this, 'csrOverseerId')"
@input="fieldValueChanged('csrOverseerId')"
:label="$ay.t('CustomerServiceRequestRequestedBy')"
ref="requestedByUserId"
data-cy="requestedByUserId"
:error-messages="form().serverErrors(this, 'requestedByUserId')"
@input="fieldValueChanged('requestedByUserId')"
></gz-pick-list>
</v-col>
<v-col
v-if="form().showMe(this, 'CustomerServiceRequestDateStarted')"
v-if="form().showMe(this, 'CustomerServiceRequestItemUnitID')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-date-time-picker
:label="$ay.t('CustomerServiceRequestDateStarted')"
v-model="obj.dateStarted"
<gz-pick-list
:ayaType="ayaTypes().Unit"
:showEditIcon="true"
v-model="obj.unitId"
:readonly="formState.readOnly"
ref="dateStarted"
testId="dateStarted"
:error-messages="form().serverErrors(this, 'dateStarted')"
@input="fieldValueChanged('dateStarted')"
></gz-date-time-picker>
:label="$ay.t('CustomerServiceRequestItemUnitID')"
ref="unitId"
data-cy="unitId"
:error-messages="form().serverErrors(this, 'unitId')"
@input="fieldValueChanged('unitId')"
></gz-pick-list>
</v-col>
<v-col
v-if="form().showMe(this, 'CustomerServiceRequestDateCompleted')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-date-time-picker
:label="$ay.t('CustomerServiceRequestDateCompleted')"
:rules="[
form().datePrecedence(this, 'dateStarted', 'dateCompleted')
]"
:error-messages="form().serverErrors(this, 'dateCompleted')"
v-model="obj.dateCompleted"
:readonly="formState.readOnly"
ref="dateCompleted"
testId="dateCompleted"
@input="fieldValueChanged('dateCompleted')"
></gz-date-time-picker>
</v-col>
<v-col cols="12" sm="6" lg="4" xl="3">
<v-checkbox
v-model="obj.active"
:readonly="formState.readOnly"
:label="$ay.t('Active')"
ref="active"
data-cy="active"
:error-messages="form().serverErrors(this, 'active')"
@change="fieldValueChanged('active')"
></v-checkbox>
</v-col>
<!-- --------------------------------- -->
<v-col v-if="form().showMe(this, 'Notes')" cols="12">
<v-col
v-if="form().showMe(this, 'CustomerServiceRequestDetails')"
cols="12"
>
<v-textarea
v-model="obj.notes"
:readonly="formState.readOnly"
:label="$ay.t('CustomerServiceRequestNotes')"
:label="$ay.t('CustomerServiceRequestDetails')"
:error-messages="form().serverErrors(this, 'notes')"
ref="notes"
data-cy="notes"
@@ -258,6 +232,28 @@ export default {
//IMPORTANT NOTE: Fields that are NON NULLABLE in the schema for the table but *are* hideable **MUST** have a default value set here or else there will be no way to save the record
//I.E. Serial, usertype fields, ACTIVE
//Also, if it's a non-nullable Enum backed field then it should have a valid selection i.e. not zero if there is no zero
/*{
"data": {
"id": 1,
"concurrency": 3058764,
"name": "We need to quantify the optical SQL circuit!",
"notes": "Ab impedit unde voluptate ipsam doloremque deserunt est eos ut.",
"wiki": null,
"customFields": null,
"tags": [
"green",
"violet"
],
"dateRequested": "2020-01-10T18:20:31.294229Z",
"customerId": 28,
"unitId": null,
"workorderItemId": null,
"requestedByUserId": 48,
"customerReferenceNumber": "65560804",
"status": 0,
"priority": 2
}
} */
{
id: 0,
concurrency: 0,
@@ -266,11 +262,15 @@ export default {
notes: null,
wiki: null,
customFields: "{}",
tags: []
// dateStarted: window.$gz.locale.nowUTC8601String(),
// dateCompleted: null,
// csrOverseerId: null,
// accountNumber: null
tags: [],
dateRequested: window.$gz.locale.nowUTC8601String(),
customerId: null,
unitId: null,
workorderItemId: null,
requestedByUserId: null, //window.$gz.store.state.userId, for outside version of this form
customerReferenceNumber: null,
status: 0,
priority: 0
},
formState: {
ready: false,

View File

@@ -190,6 +190,26 @@
></v-select>
</v-col>
<v-col
v-if="form().showMe(this, 'LoanUnitShadowUnit')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-pick-list
:ayaType="ayaTypes().Unit"
:showEditIcon="true"
v-model="obj.unitId"
:readonly="formState.readOnly"
:label="$ay.t('LoanUnitShadowUnit')"
ref="unitId"
data-cy="unitId"
:error-messages="form().serverErrors(this, 'unitId')"
@input="fieldValueChanged('unitId')"
></gz-pick-list>
</v-col>
<v-col cols="12" sm="6" lg="4" xl="3">
<v-checkbox
v-model="obj.active"