This commit is contained in:
2021-01-02 16:26:27 +00:00
parent 6b87f21ba0
commit 27b4ac6fcb
2 changed files with 133 additions and 116 deletions

View File

@@ -67,7 +67,7 @@ CURRENTLY DOING:
put warranty override in tab of it's own put warranty override in tab of it's own
override warranty checkbox should gray out override terms override warranty checkbox should gray out override terms
Look at layout and re-arrange as necessary
Report isn't tested yet Report isn't tested yet
Migration code Migration code

View File

@@ -1,5 +1,6 @@
<template> <template>
<v-container fluid> <!-- <v-container fluid> -->
<div>
<gz-report-selector ref="reportSelector"></gz-report-selector> <gz-report-selector ref="reportSelector"></gz-report-selector>
<div v-if="formState.ready"> <div v-if="formState.ready">
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error> <gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
@@ -10,7 +11,7 @@
<v-tab>{{ $ay.t("Address") }}</v-tab> <v-tab>{{ $ay.t("Address") }}</v-tab>
<v-tab>{{ $ay.t("UnitOverrideWarranty") }}</v-tab> <v-tab>{{ $ay.t("UnitOverrideWarranty") }}</v-tab>
<v-tabs-items v-model="tab"> <v-tabs-items v-model="tab">
<v-tab-item class="mt-4"> <v-tab-item class="mt-4 ml-2">
<v-row> <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
@@ -406,44 +407,14 @@
></v-col> ></v-col>
</v-row> </v-row>
</v-tab-item> </v-tab-item>
<!--
<v-tab-item class="mt-4"> ################################# ADDRESS TAB #########################
-->
<v-tab-item class="mt-4 ml-2">
<v-row> <v-row>
<v-col cols="12"> <v-col cols="12">
<v-menu offset-y v-if="rights.change">
<template v-slot:activator="{ on, attrs }">
<span class="text-h6">
{{ $ay.t("AddressTypePhysical") }}</span
><v-btn icon v-bind="attrs" v-on="on">
<v-icon small>$ayiEllipsisV</v-icon>
</v-btn>
</template>
<v-list>
<v-list-item @click="AddressCopyPhysicalToClipBoard()">
<v-list-item-icon>
<v-icon>$ayiCopy</v-icon>
</v-list-item-icon>
<v-list-item-title>{{
$ay.t("CopyToClipboard")
}}</v-list-item-title>
</v-list-item>
<v-list-item @click="GeoCapture">
<v-list-item-icon>
<v-icon>$ayiMapMarker</v-icon>
</v-list-item-icon>
<v-list-item-title>{{
$ay.t("GeoCapture")
}}</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
<span class="text-h6" v-else>
{{ $ay.t("AddressTypePhysical") }}</span
>
</v-col>
<v-col cols="12" sm="6" lg="4" xl="3">
<v-checkbox <v-checkbox
v-model="obj.unitHasOwnAddress" v-model="obj.unitHasOwnAddress"
:readonly="formState.readOnly" :readonly="formState.readOnly"
@@ -455,9 +426,42 @@
" "
@change="fieldValueChanged('unitHasOwnAddress')" @change="fieldValueChanged('unitHasOwnAddress')"
></v-checkbox> ></v-checkbox>
<v-col cols="12" v-if="obj.unitHasOwnAddress">
<v-menu offset-y v-if="rights.change">
<template v-slot:activator="{ on, attrs }">
<span class="text-h6">
{{ $ay.t("AddressTypePhysical") }}</span
><v-btn icon v-bind="attrs" v-on="on">
<v-icon small>$ayiEllipsisV</v-icon>
</v-btn>
</template>
<v-list>
<v-list-item @click="AddressCopyPhysicalToClipBoard()">
<v-list-item-icon>
<v-icon>$ayiCopy</v-icon>
</v-list-item-icon>
<v-list-item-title>{{
$ay.t("CopyToClipboard")
}}</v-list-item-title>
</v-list-item>
<v-list-item @click="GeoCapture">
<v-list-item-icon>
<v-icon>$ayiMapMarker</v-icon>
</v-list-item-icon>
<v-list-item-title>{{
$ay.t("GeoCapture")
}}</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
<span class="text-h6" v-else>
{{ $ay.t("AddressTypePhysical") }}</span
>
</v-col>
</v-col> </v-col>
<v-col <v-col
v-if="form().showMe(this, 'Address')" v-if="form().showMe(this, 'Address') && obj.unitHasOwnAddress"
cols="12" cols="12"
sm="6" sm="6"
lg="4" lg="4"
@@ -475,7 +479,7 @@
</v-col> </v-col>
<v-col <v-col
v-if="form().showMe(this, 'City')" v-if="form().showMe(this, 'City') && obj.unitHasOwnAddress"
cols="12" cols="12"
sm="6" sm="6"
lg="4" lg="4"
@@ -493,7 +497,7 @@
</v-col> </v-col>
<v-col <v-col
v-if="form().showMe(this, 'Region')" v-if="form().showMe(this, 'Region') && obj.unitHasOwnAddress"
cols="12" cols="12"
sm="6" sm="6"
lg="4" lg="4"
@@ -511,7 +515,7 @@
</v-col> </v-col>
<v-col <v-col
v-if="form().showMe(this, 'Country')" v-if="form().showMe(this, 'Country') && obj.unitHasOwnAddress"
cols="12" cols="12"
sm="6" sm="6"
lg="4" lg="4"
@@ -569,82 +573,94 @@
</v-col> </v-col>
</v-row> </v-row>
</v-tab-item> </v-tab-item>
<v-tab-item class="mt-4"> <!--
<v-col
v-if="form().showMe(this, 'UnitOverrideWarranty')" ################################# WARRANTY TAB #########################
cols="12"
sm="6" -->
lg="4" <v-tab-item class="mt-4 ml-2">
xl="3" <v-row>
> <v-col cols="12" sm="6" lg="4" xl="3">
<v-checkbox <v-checkbox
v-model="obj.overrideModelWarranty" v-model="obj.overrideModelWarranty"
:readonly="formState.readOnly" :readonly="formState.readOnly"
:label="$ay.t('UnitOverrideWarranty')" :label="$ay.t('UnitOverrideWarranty')"
ref="overrideModelWarranty" ref="overrideModelWarranty"
data-cy="overrideModelWarranty" data-cy="overrideModelWarranty"
:error-messages=" :error-messages="
form().serverErrors(this, 'overrideModelWarranty') form().serverErrors(this, 'overrideModelWarranty')
"
@change="fieldValueChanged('overrideModelWarranty')"
></v-checkbox>
</v-col>
<v-col
v-if="
form().showMe(this, 'UnitOverrideLifeTime') &&
obj.overrideModelWarranty
" "
@change="fieldValueChanged('overrideModelWarranty')" cols="12"
></v-checkbox> sm="6"
</v-col> lg="4"
xl="3"
>
<v-checkbox
v-model="obj.lifeTimeWarranty"
:readonly="formState.readOnly"
:label="$ay.t('UnitOverrideLifeTime')"
ref="lifeTimeWarranty"
data-cy="lifeTimeWarranty"
:error-messages="
form().serverErrors(this, 'lifeTimeWarranty')
"
@change="fieldValueChanged('lifeTimeWarranty')"
></v-checkbox>
</v-col>
<v-col <v-col
v-if="form().showMe(this, 'UnitOverrideLifeTime')" v-if="
cols="12" form().showMe(this, 'UnitOverrideLength') &&
sm="6" obj.overrideModelWarranty
lg="4"
xl="3"
>
<v-checkbox
v-model="obj.lifeTimeWarranty"
:readonly="formState.readOnly"
:label="$ay.t('UnitOverrideLifeTime')"
ref="lifeTimeWarranty"
data-cy="lifeTimeWarranty"
:error-messages="
form().serverErrors(this, 'lifeTimeWarranty')
" "
@change="fieldValueChanged('lifeTimeWarranty')" cols="12"
></v-checkbox> sm="6"
</v-col> lg="4"
xl="3"
>
<v-text-field
v-model="obj.warrantyLength"
:readonly="formState.readOnly"
:label="$ay.t('UnitOverrideLength')"
ref="warrantyLength"
data-cy="warrantyLength"
:rules="[form().integerValid(this, 'warrantyLength')]"
:error-messages="
form().serverErrors(this, 'warrantyLength')
"
@input="fieldValueChanged('warrantyLength')"
type="number"
></v-text-field>
</v-col>
<v-col <v-col
v-if="form().showMe(this, 'UnitOverrideLength')" v-if="
cols="12" form().showMe(this, 'UnitOverrideWarrantyTerms') &&
sm="6" obj.overrideModelWarranty
lg="4" "
xl="3" cols="12"
> >
<v-text-field <v-textarea
v-model="obj.warrantyLength" v-model="obj.warrantyTerms"
:readonly="formState.readOnly" :readonly="formState.readOnly"
:label="$ay.t('UnitOverrideLength')" :label="$ay.t('UnitOverrideWarrantyTerms')"
ref="warrantyLength" :error-messages="form().serverErrors(this, 'warrantyTerms')"
data-cy="warrantyLength" ref="warrantyTerms"
:rules="[form().integerValid(this, 'warrantyLength')]" data-cy="warrantyTerms"
:error-messages="form().serverErrors(this, 'warrantyLength')" @input="fieldValueChanged('warrantyTerms')"
@input="fieldValueChanged('warrantyLength')" auto-grow
type="number" ></v-textarea>
></v-text-field> </v-col>
</v-col> </v-row>
<v-col
v-if="form().showMe(this, 'UnitOverrideWarrantyTerms')"
cols="12"
>
<v-textarea
v-model="obj.warrantyTerms"
:readonly="formState.readOnly"
:label="$ay.t('UnitOverrideWarrantyTerms')"
:error-messages="form().serverErrors(this, 'warrantyTerms')"
ref="warrantyTerms"
data-cy="warrantyTerms"
@input="fieldValueChanged('warrantyTerms')"
auto-grow
></v-textarea>
</v-col>
</v-tab-item> </v-tab-item>
</v-tabs-items> </v-tabs-items>
</v-tabs> </v-tabs>
@@ -657,7 +673,8 @@
:size="60" :size="60"
></v-progress-circular> ></v-progress-circular>
</template> </template>
</v-container> </div>
<!-- </v-container> -->
</template> </template>
<script> <script>