This commit is contained in:
2020-11-16 19:24:23 +00:00
parent 666a8932f9
commit e9bec2dc8f
3 changed files with 612 additions and 583 deletions

View File

@@ -28,10 +28,12 @@ dotnet-runtime-deps-3.1/xenial,now 3.1.10-1 amd64 [installed,automatic]
dotnet-runtime-deps-5.0/xenial,now 5.0.0-1 amd64 [installed,automatic] dotnet-runtime-deps-5.0/xenial,now 5.0.0-1 amd64 [installed,automatic]
To REMOVE: apt-get remove dotnet-runtime-3.0 (replace 3.0 with whatever version it is) To REMOVE: apt-get remove dotnet-runtime-3.0 (replace 3.0 with whatever version it is)
https://docs.microsoft.com/en-us/dotnet/core/install/remove-runtime-sdk-versions?pivots=os-linux https://docs.microsoft.com/en-us/dotnet/core/install/remove-runtime-sdk-versions?pivots=os-linux
todo: SEEDER todo: SEEDER
Seed sample customers from v7 specifically in addition to random ones? Seed sample customers from v7 specifically in addition to random ones?
@@ -67,7 +69,6 @@ todo: TESTING After customer form is made
OUTSTANDING WITH CUSTOMER OUTSTANDING WITH CUSTOMER
servicetemplate, headoffice, banking, contract fields
contacts contacts
Customer User (contacts) UI for this client (generate, view) Customer User (contacts) UI for this client (generate, view)
case for this and notes, sb very simple way to create and send creds for user case for this and notes, sb very simple way to create and send creds for user

View File

@@ -2,11 +2,18 @@
<v-container fluid> <v-container fluid>
<gz-report-selector ref="reportSelector"></gz-report-selector> <gz-report-selector ref="reportSelector"></gz-report-selector>
<!-- {{ formState }} --> <!-- {{ formState }} -->
<v-row v-if="formState.ready"> <div v-if="formState.ready">
<v-col>
<v-form ref="form">
<v-row>
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error> <gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
<v-form ref="form">
<v-tabs mobile-breakpoint="100" v-model="tab">
<v-tab>{{ $ay.t("Customer") }}</v-tab>
<v-tab>{{ $ay.t("Address") }}</v-tab>
<v-tab>{{ $ay.t("Contacts") }}</v-tab>
<v-tabs-items v-model="tab">
<v-tab-item class="mt-4">
<v-row>
<v-col cols="12" sm="6" lg="4" xl="3"> <v-col cols="12" sm="6" lg="4" xl="3">
<v-text-field <v-text-field
v-model="obj.name" v-model="obj.name"
@@ -179,6 +186,234 @@
></v-text-field> ></v-text-field>
</v-col> </v-col>
<v-col
v-if="form().showMe(this, 'DefaultServiceTemplateID')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-pick-list
:ayaType="ayaTypes().WorkOrderTemplate"
:showEditIcon="true"
v-model="obj.defaultServiceTemplateID"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:label="$ay.t('WorkOrderTemplate')"
ref="defaultServiceTemplateID"
data-cy="defaultServiceTemplateID"
:error-messages="
form().serverErrors(this, 'defaultServiceTemplateID')
"
@input="fieldValueChanged('defaultServiceTemplateID')"
></gz-pick-list>
</v-col>
<v-col
v-if="form().showMe(this, 'BillHeadOffice')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<v-checkbox
v-model="obj.billHeadOffice"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:label="$ay.t('CustomerBillHeadOffice')"
ref="billHeadOffice"
data-cy="billHeadOffice"
:error-messages="
form().serverErrors(this, 'billHeadOffice')
"
@change="fieldValueChanged('billHeadOffice')"
></v-checkbox>
</v-col>
<v-col
v-if="
form().showMe(this, 'HeadOfficeID') && obj.billHeadOffice
"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-pick-list
:ayaType="ayaTypes().HeadOffice"
:showEditIcon="true"
v-model="obj.headOfficeID"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:label="$ay.t('HeadOffice')"
ref="headOfficeID"
data-cy="headOfficeID"
:error-messages="form().serverErrors(this, 'headOfficeID')"
@input="fieldValueChanged('headOfficeID')"
></gz-pick-list>
</v-col>
<v-col
v-if="form().showMe(this, 'ContractID')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-pick-list
:ayaType="ayaTypes().Contract"
:showEditIcon="true"
v-model="obj.contractID"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:label="$ay.t('Contract')"
ref="contractID"
data-cy="contractID"
:error-messages="form().serverErrors(this, 'contractID')"
@input="fieldValueChanged('contractID')"
></gz-pick-list>
</v-col>
<v-col
v-if="
form().showMe(this, 'ContractExpires') && obj.contractId
"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-date-time-picker
:label="$ay.t('ContractExpires')"
v-model="obj.contractExpires"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
ref="contractExpires"
testId="contractExpires"
:error-messages="
form().serverErrors(this, 'contractExpires')
"
@input="fieldValueChanged('contractExpires')"
></gz-date-time-picker>
</v-col>
<v-col
v-if="form().showMe(this, 'UsesBanking')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<v-checkbox
v-model="obj.usesBanking"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:label="$ay.t('UsesBanking')"
ref="usesBanking"
data-cy="usesBanking"
:error-messages="form().serverErrors(this, 'usesBanking')"
@change="fieldValueChanged('usesBanking')"
></v-checkbox>
</v-col>
<!-- --------------------------------- -->
<v-col v-if="form().showMe(this, 'Notes')" cols="12">
<v-textarea
v-model="obj.notes"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:label="$ay.t('CustomerNotes')"
:error-messages="form().serverErrors(this, 'notes')"
ref="notes"
data-cy="notes"
@input="fieldValueChanged('notes')"
auto-grow
></v-textarea>
</v-col>
<v-col v-if="form().showMe(this, 'TechNotes')" cols="12">
<v-textarea
v-model="obj.techNotes"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:label="$ay.t('CustomerTechNotes')"
:error-messages="form().serverErrors(this, 'techNotes')"
ref="techNotes"
data-cy="techNotes"
@input="fieldValueChanged('techNotes')"
auto-grow
prepend-icon="$ayiTools"
></v-textarea>
</v-col>
<v-col v-if="form().showMe(this, 'PopUpNotes')" cols="12">
<v-textarea
v-model="obj.popUpNotes"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:label="$ay.t('CustomerPopUpNotes')"
:error-messages="form().serverErrors(this, 'popUpNotes')"
ref="popUpNotes"
data-cy="popUpNotes"
@input="fieldValueChanged('popUpNotes')"
auto-grow
prepend-icon="$ayiExclamationCircle"
></v-textarea>
</v-col>
<v-col v-if="form().showMe(this, 'Tags')" cols="12">
<gz-tag-picker
v-model="obj.tags"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
ref="tags"
data-cy="tags"
:error-messages="form().serverErrors(this, 'tags')"
@input="fieldValueChanged('tags')"
></gz-tag-picker>
</v-col>
<v-col cols="12">
<gz-custom-fields
v-model="obj.customFields"
:formKey="formCustomTemplateKey"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:parentVM="this"
ref="customFields"
data-cy="customFields"
:error-messages="form().serverErrors(this, 'customFields')"
@input="fieldValueChanged('customFields')"
></gz-custom-fields>
</v-col>
<v-col v-if="form().showMe(this, 'Wiki')" cols="12">
<gz-wiki
:ayaType="ayaType"
:ayaId="obj.id"
ref="wiki"
v-model="obj.wiki"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
@input="fieldValueChanged('wiki')"
></gz-wiki
></v-col>
<v-col
v-if="form().showMe(this, 'Attachments') && obj.id"
cols="12"
>
<gz-attachments
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:ayaType="ayaType"
:ayaId="obj.id"
></gz-attachments
></v-col>
</v-row>
</v-tab-item>
<v-tab-item>
<v-row>
<v-col <v-col
v-if="form().showMe(this, 'Address')" v-if="form().showMe(this, 'Address')"
cols="12" cols="12"
@@ -391,227 +626,17 @@
@input="fieldValueChanged('postCode')" @input="fieldValueChanged('postCode')"
></v-text-field> ></v-text-field>
</v-col> </v-col>
<v-col
v-if="form().showMe(this, 'DefaultServiceTemplateID')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-pick-list
:ayaType="ayaTypes().WorkOrderTemplate"
:showEditIcon="true"
v-model="obj.defaultServiceTemplateID"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:label="$ay.t('WorkOrderTemplate')"
ref="defaultServiceTemplateID"
data-cy="defaultServiceTemplateID"
:error-messages="
form().serverErrors(this, 'defaultServiceTemplateID')
"
@input="fieldValueChanged('defaultServiceTemplateID')"
></gz-pick-list>
</v-col>
<v-col
v-if="form().showMe(this, 'BillHeadOffice')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<v-checkbox
v-model="obj.billHeadOffice"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:label="$ay.t('CustomerBillHeadOffice')"
ref="billHeadOffice"
data-cy="billHeadOffice"
:error-messages="form().serverErrors(this, 'billHeadOffice')"
@change="fieldValueChanged('billHeadOffice')"
></v-checkbox>
</v-col>
<v-col
v-if="form().showMe(this, 'HeadOfficeID')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-pick-list
:ayaType="ayaTypes().HeadOffice"
:showEditIcon="true"
v-model="obj.headOfficeID"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:label="$ay.t('HeadOffice')"
ref="headOfficeID"
data-cy="headOfficeID"
:error-messages="form().serverErrors(this, 'headOfficeID')"
@input="fieldValueChanged('headOfficeID')"
></gz-pick-list>
</v-col>
<v-col
v-if="form().showMe(this, 'ContractID')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-pick-list
:ayaType="ayaTypes().Contract"
:showEditIcon="true"
v-model="obj.contractID"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:label="$ay.t('Contract')"
ref="contractID"
data-cy="contractID"
:error-messages="form().serverErrors(this, 'contractID')"
@input="fieldValueChanged('contractID')"
></gz-pick-list>
</v-col>
<v-col
v-if="form().showMe(this, 'ContractExpires')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-date-time-picker
:label="$ay.t('ContractExpires')"
v-model="obj.contractExpires"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
ref="contractExpires"
testId="contractExpires"
:error-messages="form().serverErrors(this, 'contractExpires')"
@input="fieldValueChanged('contractExpires')"
></gz-date-time-picker>
</v-col>
<v-col
v-if="form().showMe(this, 'UsesBanking')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<v-checkbox
v-model="obj.usesBanking"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:label="$ay.t('UsesBanking')"
ref="usesBanking"
data-cy="usesBanking"
:error-messages="form().serverErrors(this, 'usesBanking')"
@change="fieldValueChanged('usesBanking')"
></v-checkbox>
</v-col>
<!-- --------------------------------- -->
<v-col v-if="form().showMe(this, 'Notes')" cols="12">
<v-textarea
v-model="obj.notes"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:label="$ay.t('CustomerNotes')"
:error-messages="form().serverErrors(this, 'notes')"
ref="notes"
data-cy="notes"
@input="fieldValueChanged('notes')"
auto-grow
></v-textarea>
</v-col>
<v-col v-if="form().showMe(this, 'TechNotes')" cols="12">
<v-textarea
v-model="obj.techNotes"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:label="$ay.t('CustomerTechNotes')"
:error-messages="form().serverErrors(this, 'techNotes')"
ref="techNotes"
data-cy="techNotes"
@input="fieldValueChanged('techNotes')"
auto-grow
prepend-icon="$ayiTools"
></v-textarea>
</v-col>
<v-col v-if="form().showMe(this, 'PopUpNotes')" cols="12">
<v-textarea
v-model="obj.popUpNotes"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:label="$ay.t('CustomerPopUpNotes')"
:error-messages="form().serverErrors(this, 'popUpNotes')"
ref="popUpNotes"
data-cy="popUpNotes"
@input="fieldValueChanged('popUpNotes')"
auto-grow
prepend-icon="$ayiExclamationCircle"
></v-textarea>
</v-col>
<v-col v-if="form().showMe(this, 'Tags')" cols="12">
<gz-tag-picker
v-model="obj.tags"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
ref="tags"
data-cy="tags"
:error-messages="form().serverErrors(this, 'tags')"
@input="fieldValueChanged('tags')"
></gz-tag-picker>
</v-col>
<v-col cols="12">
<gz-custom-fields
v-model="obj.customFields"
:formKey="formCustomTemplateKey"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:parentVM="this"
ref="customFields"
data-cy="customFields"
:error-messages="form().serverErrors(this, 'customFields')"
@input="fieldValueChanged('customFields')"
></gz-custom-fields>
</v-col>
<v-col v-if="form().showMe(this, 'Wiki')" cols="12">
<gz-wiki
:ayaType="ayaType"
:ayaId="obj.id"
ref="wiki"
v-model="obj.wiki"
:readonly="formState.readOnly"
:disabled="formState.readOnly"
@input="fieldValueChanged('wiki')"
></gz-wiki
></v-col>
<v-col
v-if="form().showMe(this, 'Attachments') && obj.id"
cols="12"
>
<gz-attachments
:readonly="formState.readOnly"
:disabled="formState.readOnly"
:ayaType="ayaType"
:ayaId="obj.id"
></gz-attachments
></v-col>
</v-row> </v-row>
</v-tab-item>
<v-tab-item>
<v-row>
CONTACTS HERE
</v-row>
</v-tab-item>
</v-tabs-items>
</v-tabs>
</v-form> </v-form>
</v-col> </div>
</v-row>
<template v-if="!formState.ready"> <template v-if="!formState.ready">
<v-progress-circular <v-progress-circular
indeterminate indeterminate
@@ -736,6 +761,7 @@ export default {
latitude: null, latitude: null,
longitude: null longitude: null
}, },
tab: 0,
formState: { formState: {
ready: false, ready: false,
dirty: false, dirty: false,
@@ -1189,6 +1215,7 @@ async function initForm(vm) {
async function fetchTranslatedText(vm) { async function fetchTranslatedText(vm) {
await window.$gz.translation.cacheTranslations([ await window.$gz.translation.cacheTranslations([
"Customer", "Customer",
"Contacts",
"CustomerName", "CustomerName",
"CustomerNotes", "CustomerNotes",
"WebAddress", "WebAddress",
@@ -1207,6 +1234,7 @@ async function fetchTranslatedText(vm) {
"CustomerPhone4", "CustomerPhone4",
"CustomerPhone5", "CustomerPhone5",
"CustomerEmail", "CustomerEmail",
"Address",
"AddressPostalDeliveryAddress", "AddressPostalDeliveryAddress",
"AddressPostalCity", "AddressPostalCity",
"AddressPostalStateProv", "AddressPostalStateProv",

View File

@@ -14,7 +14,7 @@
></v-select> ></v-select>
</v-col> </v-col>
<v-tabs v-model="tab" color="primary" grow @change="tabChanged"> <v-tabs v-model="tab" @change="tabChanged">
<v-tabs-slider></v-tabs-slider> <v-tabs-slider></v-tabs-slider>
<v-tab>{{ $ay.t("MetricCPUMemory") }}</v-tab> <v-tab>{{ $ay.t("MetricCPUMemory") }}</v-tab>
<v-tab>{{ $ay.t("Database") }}</v-tab> <v-tab>{{ $ay.t("Database") }}</v-tab>