This commit is contained in:
@@ -426,22 +426,23 @@ CURRENTLY DOING:
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
Modify client to now show and / or prevent restricted actions
|
Modify client to not show and / or prevent restricted actions
|
||||||
Maybe just mirror the UserIs* flags from server at client (or bring them with the work order for reporting dual usage as well??)
|
|
||||||
that way can consult the same basic fields and it's easier to remember and grok down the road
|
|
||||||
Hide sections / fields as required
|
Hide sections / fields as required
|
||||||
|
|
||||||
Test again and ensure it looks correct and works correct for each role
|
Test again and ensure it looks correct and works correct for each role
|
||||||
Test each of the three restricted roles and one full role
|
Test each of the three restricted roles and one full role
|
||||||
|
|
||||||
|
|
||||||
UserIsRestrictedType
|
value.userIsRestrictedType
|
||||||
UserIsTechRestricted
|
value.userIsTechRestricted
|
||||||
UserIsSubContractorFull
|
value.userIsSubContractorFull
|
||||||
UserIsSubContractorRestricted
|
value.userIsSubContractorRestricted
|
||||||
UserCanViewPartCosts
|
value.userCanViewPartCosts
|
||||||
UserCanViewLaborOrTravelRateCosts
|
value.userCanViewLaborOrTravelRateCosts
|
||||||
UserCanViewLoanerCosts
|
value.userCanViewLoanerCosts
|
||||||
|
|
||||||
|
value.userIsSubContractorFull ||
|
||||||
|
value.userIsSubContractorRestricted
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -461,6 +462,17 @@ Subcontractor / tech limited modifications
|
|||||||
|
|
||||||
todo: units on work order are not limited to customer on work order??
|
todo: units on work order are not limited to customer on work order??
|
||||||
|
|
||||||
|
todo: Status on work order doesn't seem to be preventing "Who can select" by role properly
|
||||||
|
Make it not present status that are not supposed to be available
|
||||||
|
put a back end rule in validation to prevent it as well
|
||||||
|
|
||||||
|
Also, the seeded data roles are really fucked up and include some dubious roles and needs to also have some for tech - restricted specfically
|
||||||
|
i.e. they need to be logically correct as to what roles can select
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TODO 1: Test address / units select alternate when have units working
|
TODO 1: Test address / units select alternate when have units working
|
||||||
|
|
||||||
TODO 2: //MIGRATE_OUTSTANDING comment tag
|
TODO 2: //MIGRATE_OUTSTANDING comment tag
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<v-card-text>
|
<v-card-text>
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
<v-menu offset-y v-if="!formState.readOnly">
|
<v-menu offset-y v-if="!readonly">
|
||||||
<template v-slot:activator="{ on, attrs }">
|
<template v-slot:activator="{ on, attrs }">
|
||||||
<span class="text-h6">
|
<span class="text-h6">
|
||||||
{{ $ay.t("AddressTypePhysical") }}</span
|
{{ $ay.t("AddressTypePhysical") }}</span
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
>
|
>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="value.address"
|
v-model="value.address"
|
||||||
:readonly="formState.readOnly"
|
:readonly="readonly"
|
||||||
:label="$ay.t('AddressDeliveryAddress')"
|
:label="$ay.t('AddressDeliveryAddress')"
|
||||||
ref="address"
|
ref="address"
|
||||||
data-cy="address"
|
data-cy="address"
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
>
|
>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="value.city"
|
v-model="value.city"
|
||||||
:readonly="formState.readOnly"
|
:readonly="readonly"
|
||||||
:label="$ay.t('AddressCity')"
|
:label="$ay.t('AddressCity')"
|
||||||
ref="city"
|
ref="city"
|
||||||
data-cy="city"
|
data-cy="city"
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
>
|
>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="value.region"
|
v-model="value.region"
|
||||||
:readonly="formState.readOnly"
|
:readonly="readonly"
|
||||||
:label="$ay.t('AddressStateProv')"
|
:label="$ay.t('AddressStateProv')"
|
||||||
ref="region"
|
ref="region"
|
||||||
data-cy="region"
|
data-cy="region"
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
>
|
>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="value.country"
|
v-model="value.country"
|
||||||
:readonly="formState.readOnly"
|
:readonly="readonly"
|
||||||
:label="$ay.t('AddressCountry')"
|
:label="$ay.t('AddressCountry')"
|
||||||
ref="country"
|
ref="country"
|
||||||
data-cy="country"
|
data-cy="country"
|
||||||
@@ -146,7 +146,7 @@
|
|||||||
>
|
>
|
||||||
<gz-decimal
|
<gz-decimal
|
||||||
v-model="value.latitude"
|
v-model="value.latitude"
|
||||||
:readonly="formState.readOnly"
|
:readonly="readonly"
|
||||||
:label="$ay.t('AddressLatitude')"
|
:label="$ay.t('AddressLatitude')"
|
||||||
ref="latitude"
|
ref="latitude"
|
||||||
data-cy="latitude"
|
data-cy="latitude"
|
||||||
@@ -166,7 +166,7 @@
|
|||||||
>
|
>
|
||||||
<gz-decimal
|
<gz-decimal
|
||||||
v-model="value.longitude"
|
v-model="value.longitude"
|
||||||
:readonly="formState.readOnly"
|
:readonly="readonly"
|
||||||
:label="$ay.t('AddressLongitude')"
|
:label="$ay.t('AddressLongitude')"
|
||||||
ref="longitude"
|
ref="longitude"
|
||||||
data-cy="longitude"
|
data-cy="longitude"
|
||||||
@@ -178,7 +178,7 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
<v-menu offset-y v-if="!formState.readOnly">
|
<v-menu offset-y v-if="!readonly">
|
||||||
<template v-slot:activator="{ on, attrs }">
|
<template v-slot:activator="{ on, attrs }">
|
||||||
<span class="text-h6">
|
<span class="text-h6">
|
||||||
{{ $ay.t("AddressTypePostal") }}</span
|
{{ $ay.t("AddressTypePostal") }}</span
|
||||||
@@ -225,7 +225,7 @@
|
|||||||
>
|
>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="value.postAddress"
|
v-model="value.postAddress"
|
||||||
:readonly="formState.readOnly"
|
:readonly="readonly"
|
||||||
:label="$ay.t('AddressPostalDeliveryAddress')"
|
:label="$ay.t('AddressPostalDeliveryAddress')"
|
||||||
ref="postAddress"
|
ref="postAddress"
|
||||||
data-cy="postAddress"
|
data-cy="postAddress"
|
||||||
@@ -243,7 +243,7 @@
|
|||||||
>
|
>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="value.postCity"
|
v-model="value.postCity"
|
||||||
:readonly="formState.readOnly"
|
:readonly="readonly"
|
||||||
:label="$ay.t('AddressPostalCity')"
|
:label="$ay.t('AddressPostalCity')"
|
||||||
ref="postCity"
|
ref="postCity"
|
||||||
data-cy="postCity"
|
data-cy="postCity"
|
||||||
@@ -261,7 +261,7 @@
|
|||||||
>
|
>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="value.postRegion"
|
v-model="value.postRegion"
|
||||||
:readonly="formState.readOnly"
|
:readonly="readonly"
|
||||||
:label="$ay.t('AddressPostalStateProv')"
|
:label="$ay.t('AddressPostalStateProv')"
|
||||||
ref="postRegion"
|
ref="postRegion"
|
||||||
data-cy="postRegion"
|
data-cy="postRegion"
|
||||||
@@ -279,7 +279,7 @@
|
|||||||
>
|
>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="value.postCountry"
|
v-model="value.postCountry"
|
||||||
:readonly="formState.readOnly"
|
:readonly="readonly"
|
||||||
:label="$ay.t('AddressPostalCountry')"
|
:label="$ay.t('AddressPostalCountry')"
|
||||||
ref="postCountry"
|
ref="postCountry"
|
||||||
data-cy="postCountry"
|
data-cy="postCountry"
|
||||||
@@ -297,7 +297,7 @@
|
|||||||
>
|
>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="value.postCode"
|
v-model="value.postCode"
|
||||||
:readonly="formState.readOnly"
|
:readonly="readonly"
|
||||||
:label="$ay.t('AddressPostalPostal')"
|
:label="$ay.t('AddressPostalPostal')"
|
||||||
ref="postCode"
|
ref="postCode"
|
||||||
data-cy="postCode"
|
data-cy="postCode"
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
{{
|
||||||
|
{
|
||||||
|
isRestrictedType: value.userIsRestrictedType,
|
||||||
|
isTechRestricted: value.userIsTechRestricted,
|
||||||
|
subfull: value.userIsSubContractorFull,
|
||||||
|
subRestricted: value.userIsSubContractorRestricted
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col
|
<v-col
|
||||||
cols="12"
|
cols="12"
|
||||||
@@ -25,9 +34,9 @@
|
|||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
<gz-pick-list
|
<gz-pick-list
|
||||||
:aya-type="$ay.ayt().Customer"
|
:aya-type="$ay.ayt().Customer"
|
||||||
:show-edit-icon="true"
|
:show-edit-icon="!value.userIsRestrictedType"
|
||||||
v-model="value.customerId"
|
v-model="value.customerId"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly || value.userIsRestrictedType"
|
||||||
:label="$ay.t('Customer')"
|
:label="$ay.t('Customer')"
|
||||||
:can-clear="false"
|
:can-clear="false"
|
||||||
ref="customerId"
|
ref="customerId"
|
||||||
@@ -38,7 +47,13 @@
|
|||||||
></gz-pick-list>
|
></gz-pick-list>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col
|
<v-col
|
||||||
v-if="form().showMe(this, 'CustomerSignature')"
|
v-if="
|
||||||
|
form().showMe(this, 'CustomerSignature') &&
|
||||||
|
!(
|
||||||
|
value.userIsSubContractorFull ||
|
||||||
|
value.userIsSubContractorRestricted
|
||||||
|
)
|
||||||
|
"
|
||||||
cols="12"
|
cols="12"
|
||||||
sm="6"
|
sm="6"
|
||||||
lg="4"
|
lg="4"
|
||||||
@@ -47,7 +62,7 @@
|
|||||||
<GzWoSignature
|
<GzWoSignature
|
||||||
v-model="value"
|
v-model="value"
|
||||||
:form-key="formCustomTemplateKey"
|
:form-key="formCustomTemplateKey"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly || value.userIsTechRestricted"
|
||||||
:pvm="pvm"
|
:pvm="pvm"
|
||||||
variant="customer"
|
variant="customer"
|
||||||
data-cy="customerSignature"
|
data-cy="customerSignature"
|
||||||
@@ -57,7 +72,11 @@
|
|||||||
<GzWoState
|
<GzWoState
|
||||||
v-if="
|
v-if="
|
||||||
pvm.subRights.states.visible &&
|
pvm.subRights.states.visible &&
|
||||||
form().showMe(this, 'WorkOrderStatus')
|
form().showMe(this, 'WorkOrderStatus') &&
|
||||||
|
!(
|
||||||
|
value.userIsSubContractorFull ||
|
||||||
|
value.userIsSubContractorRestricted
|
||||||
|
)
|
||||||
"
|
"
|
||||||
v-model="value"
|
v-model="value"
|
||||||
:form-key="formCustomTemplateKey"
|
:form-key="formCustomTemplateKey"
|
||||||
@@ -71,17 +90,26 @@
|
|||||||
|
|
||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
<GzWoAddress
|
<GzWoAddress
|
||||||
v-if="form().showMe(this, 'Address')"
|
v-if="
|
||||||
|
form().showMe(this, 'Address') &&
|
||||||
|
!value.userIsSubContractorRestricted
|
||||||
|
"
|
||||||
v-model="value"
|
v-model="value"
|
||||||
:form-key="formCustomTemplateKey"
|
:form-key="formCustomTemplateKey"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly || value.userIsRestrictedType"
|
||||||
:pvm="pvm"
|
:pvm="pvm"
|
||||||
data-cy="woAddress"
|
data-cy="woAddress"
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
v-if="form().showMe(this, 'TechSignature')"
|
v-if="
|
||||||
|
form().showMe(this, 'TechSignature') &&
|
||||||
|
!(
|
||||||
|
value.userIsSubContractorFull ||
|
||||||
|
value.userIsSubContractorRestricted
|
||||||
|
)
|
||||||
|
"
|
||||||
cols="12"
|
cols="12"
|
||||||
sm="6"
|
sm="6"
|
||||||
lg="4"
|
lg="4"
|
||||||
@@ -90,17 +118,26 @@
|
|||||||
<GzWoSignature
|
<GzWoSignature
|
||||||
v-model="value"
|
v-model="value"
|
||||||
:form-key="formCustomTemplateKey"
|
:form-key="formCustomTemplateKey"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly || value.userIsTechRestricted"
|
||||||
:pvm="pvm"
|
:pvm="pvm"
|
||||||
variant="tech"
|
variant="tech"
|
||||||
data-cy="techSignature"
|
data-cy="techSignature"
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col v-if="form().showMe(this, 'WorkOrderSummary')" cols="12">
|
<v-col
|
||||||
|
v-if="
|
||||||
|
form().showMe(this, 'WorkOrderSummary') &&
|
||||||
|
!(
|
||||||
|
value.userIsSubContractorFull ||
|
||||||
|
value.userIsSubContractorRestricted
|
||||||
|
)
|
||||||
|
"
|
||||||
|
cols="12"
|
||||||
|
>
|
||||||
<v-textarea
|
<v-textarea
|
||||||
v-model="value.notes"
|
v-model="value.notes"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly || value.userIsTechRestricted"
|
||||||
:label="$ay.t('WorkOrderSummary')"
|
:label="$ay.t('WorkOrderSummary')"
|
||||||
:error-messages="form().serverErrors(this, 'notes')"
|
:error-messages="form().serverErrors(this, 'notes')"
|
||||||
ref="notes"
|
ref="notes"
|
||||||
@@ -111,7 +148,13 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
v-if="form().showMe(this, 'WorkOrderCloseByDate')"
|
v-if="
|
||||||
|
form().showMe(this, 'WorkOrderCloseByDate') &&
|
||||||
|
!(
|
||||||
|
value.userIsSubContractorFull ||
|
||||||
|
value.userIsSubContractorRestricted
|
||||||
|
)
|
||||||
|
"
|
||||||
cols="12"
|
cols="12"
|
||||||
sm="6"
|
sm="6"
|
||||||
lg="4"
|
lg="4"
|
||||||
@@ -120,7 +163,7 @@
|
|||||||
<gz-date-time-picker
|
<gz-date-time-picker
|
||||||
:label="$ay.t('WorkOrderCloseByDate')"
|
:label="$ay.t('WorkOrderCloseByDate')"
|
||||||
v-model="value.completeByDate"
|
v-model="value.completeByDate"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly || value.userIsTechRestricted"
|
||||||
ref="completeByDate"
|
ref="completeByDate"
|
||||||
data-cy="completeByDate"
|
data-cy="completeByDate"
|
||||||
:error-messages="form().serverErrors(this, 'completeByDate')"
|
:error-messages="form().serverErrors(this, 'completeByDate')"
|
||||||
@@ -128,25 +171,14 @@
|
|||||||
></gz-date-time-picker>
|
></gz-date-time-picker>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<!-- <v-col
|
|
||||||
v-if="form().showMe(this, 'Contract')"
|
|
||||||
cols="12"
|
|
||||||
sm="6"
|
|
||||||
lg="4"
|
|
||||||
xl="3"
|
|
||||||
>
|
|
||||||
<GzWoContract
|
|
||||||
v-if="form().showMe(this, 'Contract')"
|
|
||||||
v-model="value"
|
|
||||||
:form-key="formCustomTemplateKey"
|
|
||||||
:readonly="formState.readOnly"
|
|
||||||
:pvm="pvm"
|
|
||||||
data-cy="woContract"
|
|
||||||
/>
|
|
||||||
</v-col> -->
|
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
v-if="form().showMe(this, 'Contract')"
|
v-if="
|
||||||
|
form().showMe(this, 'Contract') &&
|
||||||
|
!(
|
||||||
|
value.userIsSubContractorFull ||
|
||||||
|
value.userIsSubContractorRestricted
|
||||||
|
)
|
||||||
|
"
|
||||||
cols="12"
|
cols="12"
|
||||||
sm="6"
|
sm="6"
|
||||||
lg="4"
|
lg="4"
|
||||||
@@ -156,7 +188,7 @@
|
|||||||
:aya-type="$ay.ayt().Contract"
|
:aya-type="$ay.ayt().Contract"
|
||||||
:show-edit-icon="true"
|
:show-edit-icon="true"
|
||||||
v-model="value.contractId"
|
v-model="value.contractId"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly || value.userIsTechRestricted"
|
||||||
:label="$ay.t('Contract')"
|
:label="$ay.t('Contract')"
|
||||||
ref="contractId"
|
ref="contractId"
|
||||||
data-cy="contractId"
|
data-cy="contractId"
|
||||||
@@ -166,7 +198,13 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
v-if="form().showMe(this, 'Project')"
|
v-if="
|
||||||
|
form().showMe(this, 'Project') &&
|
||||||
|
!(
|
||||||
|
value.userIsSubContractorFull ||
|
||||||
|
value.userIsSubContractorRestricted
|
||||||
|
)
|
||||||
|
"
|
||||||
cols="12"
|
cols="12"
|
||||||
sm="6"
|
sm="6"
|
||||||
lg="4"
|
lg="4"
|
||||||
@@ -176,7 +214,7 @@
|
|||||||
:aya-type="$ay.ayt().Project"
|
:aya-type="$ay.ayt().Project"
|
||||||
:show-edit-icon="true"
|
:show-edit-icon="true"
|
||||||
v-model="value.projectId"
|
v-model="value.projectId"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly || value.userIsTechRestricted"
|
||||||
:label="$ay.t('Project')"
|
:label="$ay.t('Project')"
|
||||||
ref="projectId"
|
ref="projectId"
|
||||||
data-cy="projectId"
|
data-cy="projectId"
|
||||||
@@ -186,7 +224,13 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
v-if="form().showMe(this, 'WorkOrderInvoiceNumber')"
|
v-if="
|
||||||
|
form().showMe(this, 'WorkOrderInvoiceNumber') &&
|
||||||
|
!(
|
||||||
|
value.userIsSubContractorFull ||
|
||||||
|
value.userIsSubContractorRestricted
|
||||||
|
)
|
||||||
|
"
|
||||||
cols="12"
|
cols="12"
|
||||||
sm="6"
|
sm="6"
|
||||||
lg="4"
|
lg="4"
|
||||||
@@ -194,7 +238,7 @@
|
|||||||
>
|
>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="value.invoiceNumber"
|
v-model="value.invoiceNumber"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly || value.userIsTechRestricted"
|
||||||
:label="$ay.t('WorkOrderInvoiceNumber')"
|
:label="$ay.t('WorkOrderInvoiceNumber')"
|
||||||
ref="invoiceNumber"
|
ref="invoiceNumber"
|
||||||
data-cy="invoiceNumber"
|
data-cy="invoiceNumber"
|
||||||
@@ -204,7 +248,13 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
v-if="form().showMe(this, 'WorkOrderServiceDate')"
|
v-if="
|
||||||
|
form().showMe(this, 'WorkOrderServiceDate') &&
|
||||||
|
!(
|
||||||
|
value.userIsSubContractorFull ||
|
||||||
|
value.userIsSubContractorRestricted
|
||||||
|
)
|
||||||
|
"
|
||||||
cols="12"
|
cols="12"
|
||||||
sm="6"
|
sm="6"
|
||||||
lg="4"
|
lg="4"
|
||||||
@@ -213,7 +263,7 @@
|
|||||||
<gz-date-time-picker
|
<gz-date-time-picker
|
||||||
:label="$ay.t('WorkOrderServiceDate')"
|
:label="$ay.t('WorkOrderServiceDate')"
|
||||||
v-model="value.serviceDate"
|
v-model="value.serviceDate"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly || value.userIsTechRestricted"
|
||||||
ref="serviceDate"
|
ref="serviceDate"
|
||||||
data-cy="serviceDate"
|
data-cy="serviceDate"
|
||||||
:error-messages="form().serverErrors(this, 'serviceDate')"
|
:error-messages="form().serverErrors(this, 'serviceDate')"
|
||||||
@@ -230,7 +280,12 @@
|
|||||||
>
|
>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="value.customerContactName"
|
v-model="value.customerContactName"
|
||||||
:readonly="formState.readOnly"
|
:readonly="
|
||||||
|
formState.readOnly ||
|
||||||
|
value.userIsTechRestricted ||
|
||||||
|
value.userIsSubContractorFull ||
|
||||||
|
value.userIsSubContractorRestricted
|
||||||
|
"
|
||||||
:label="$ay.t('WorkOrderCustomerContactName')"
|
:label="$ay.t('WorkOrderCustomerContactName')"
|
||||||
ref="customerContactName"
|
ref="customerContactName"
|
||||||
data-cy="customerContactName"
|
data-cy="customerContactName"
|
||||||
@@ -240,7 +295,13 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
v-if="form().showMe(this, 'WorkOrderCustomerReferenceNumber')"
|
v-if="
|
||||||
|
form().showMe(this, 'WorkOrderCustomerReferenceNumber') &&
|
||||||
|
!(
|
||||||
|
value.userIsSubContractorFull ||
|
||||||
|
value.userIsSubContractorRestricted
|
||||||
|
)
|
||||||
|
"
|
||||||
cols="12"
|
cols="12"
|
||||||
sm="6"
|
sm="6"
|
||||||
lg="4"
|
lg="4"
|
||||||
@@ -248,7 +309,7 @@
|
|||||||
>
|
>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="value.customerReferenceNumber"
|
v-model="value.customerReferenceNumber"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly || value.userIsTechRestricted"
|
||||||
:label="$ay.t('WorkOrderCustomerReferenceNumber')"
|
:label="$ay.t('WorkOrderCustomerReferenceNumber')"
|
||||||
ref="customerReferenceNumber"
|
ref="customerReferenceNumber"
|
||||||
data-cy="customerReferenceNumber"
|
data-cy="customerReferenceNumber"
|
||||||
@@ -258,7 +319,13 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
v-if="form().showMe(this, 'WorkOrderInternalReferenceNumber')"
|
v-if="
|
||||||
|
form().showMe(this, 'WorkOrderInternalReferenceNumber') &&
|
||||||
|
!(
|
||||||
|
value.userIsSubContractorFull ||
|
||||||
|
value.userIsSubContractorRestricted
|
||||||
|
)
|
||||||
|
"
|
||||||
cols="12"
|
cols="12"
|
||||||
sm="6"
|
sm="6"
|
||||||
lg="4"
|
lg="4"
|
||||||
@@ -266,7 +333,7 @@
|
|||||||
>
|
>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="value.internalReferenceNumber"
|
v-model="value.internalReferenceNumber"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly || value.userIsTechRestricted"
|
||||||
:label="$ay.t('WorkOrderInternalReferenceNumber')"
|
:label="$ay.t('WorkOrderInternalReferenceNumber')"
|
||||||
ref="internalReferenceNumber"
|
ref="internalReferenceNumber"
|
||||||
data-cy="internalReferenceNumber"
|
data-cy="internalReferenceNumber"
|
||||||
@@ -276,7 +343,13 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
v-if="form().showMe(this, 'WorkOrderOnsite')"
|
v-if="
|
||||||
|
form().showMe(this, 'WorkOrderOnsite') &&
|
||||||
|
!(
|
||||||
|
value.userIsSubContractorFull ||
|
||||||
|
value.userIsSubContractorRestricted
|
||||||
|
)
|
||||||
|
"
|
||||||
cols="12"
|
cols="12"
|
||||||
sm="6"
|
sm="6"
|
||||||
lg="4"
|
lg="4"
|
||||||
@@ -284,7 +357,7 @@
|
|||||||
>
|
>
|
||||||
<v-checkbox
|
<v-checkbox
|
||||||
v-model="value.onsite"
|
v-model="value.onsite"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly || value.userIsTechRestricted"
|
||||||
:label="$ay.t('WorkOrderOnsite')"
|
:label="$ay.t('WorkOrderOnsite')"
|
||||||
ref="onsite"
|
ref="onsite"
|
||||||
data-cy="onsite"
|
data-cy="onsite"
|
||||||
@@ -293,10 +366,19 @@
|
|||||||
></v-checkbox>
|
></v-checkbox>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col v-if="form().showMe(this, 'Tags')" cols="12">
|
<v-col
|
||||||
|
v-if="
|
||||||
|
form().showMe(this, 'Tags') &&
|
||||||
|
!(
|
||||||
|
value.userIsSubContractorFull ||
|
||||||
|
value.userIsSubContractorRestricted
|
||||||
|
)
|
||||||
|
"
|
||||||
|
cols="12"
|
||||||
|
>
|
||||||
<gz-tag-picker
|
<gz-tag-picker
|
||||||
v-model="value.tags"
|
v-model="value.tags"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly || value.userIsTechRestricted"
|
||||||
ref="tags"
|
ref="tags"
|
||||||
data-cy="tags"
|
data-cy="tags"
|
||||||
:error-messages="form().serverErrors(this, 'tags')"
|
:error-messages="form().serverErrors(this, 'tags')"
|
||||||
@@ -304,11 +386,18 @@
|
|||||||
></gz-tag-picker>
|
></gz-tag-picker>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col cols="12">
|
<v-col
|
||||||
|
v-if="
|
||||||
|
!(
|
||||||
|
value.userIsSubContractorFull || value.userIsSubContractorRestricted
|
||||||
|
)
|
||||||
|
"
|
||||||
|
cols="12"
|
||||||
|
>
|
||||||
<gz-custom-fields
|
<gz-custom-fields
|
||||||
v-model="value.customFields"
|
v-model="value.customFields"
|
||||||
:form-key="formCustomTemplateKey"
|
:form-key="formCustomTemplateKey"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly || value.userIsTechRestricted"
|
||||||
:parent-v-m="this"
|
:parent-v-m="this"
|
||||||
key-start-with="WorkOrderCustom"
|
key-start-with="WorkOrderCustom"
|
||||||
ref="customFields"
|
ref="customFields"
|
||||||
@@ -318,20 +407,39 @@
|
|||||||
></gz-custom-fields>
|
></gz-custom-fields>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col v-if="form().showMe(this, 'Wiki')" cols="12">
|
<v-col
|
||||||
|
v-if="
|
||||||
|
form().showMe(this, 'Wiki') &&
|
||||||
|
!(
|
||||||
|
value.userIsSubContractorFull ||
|
||||||
|
value.userIsSubContractorRestricted
|
||||||
|
)
|
||||||
|
"
|
||||||
|
cols="12"
|
||||||
|
>
|
||||||
<gz-wiki
|
<gz-wiki
|
||||||
:aya-type="pvm.ayaType"
|
:aya-type="pvm.ayaType"
|
||||||
:aya-id="value.id"
|
:aya-id="value.id"
|
||||||
ref="wiki"
|
ref="wiki"
|
||||||
v-model="value.wiki"
|
v-model="value.wiki"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly || value.userIsTechRestricted"
|
||||||
@input="fieldValueChanged('wiki')"
|
@input="fieldValueChanged('wiki')"
|
||||||
></gz-wiki
|
></gz-wiki
|
||||||
></v-col>
|
></v-col>
|
||||||
|
|
||||||
<v-col v-if="form().showMe(this, 'Attachments') && value.id" cols="12">
|
<v-col
|
||||||
|
v-if="
|
||||||
|
form().showMe(this, 'Attachments') &&
|
||||||
|
value.id &&
|
||||||
|
!(
|
||||||
|
value.userIsSubContractorFull ||
|
||||||
|
value.userIsSubContractorRestricted
|
||||||
|
)
|
||||||
|
"
|
||||||
|
cols="12"
|
||||||
|
>
|
||||||
<gz-attachments
|
<gz-attachments
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly || value.userIsTechRestricted"
|
||||||
:aya-type="pvm.ayaType"
|
:aya-type="pvm.ayaType"
|
||||||
:aya-id="value.id"
|
:aya-id="value.id"
|
||||||
></gz-attachments
|
></gz-attachments
|
||||||
|
|||||||
@@ -152,6 +152,7 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
showSign() {
|
showSign() {
|
||||||
|
if (this.readonly) return;
|
||||||
this.tempSig = this.imgUrl;
|
this.tempSig = this.imgUrl;
|
||||||
this.tempDate = this.sigDate;
|
this.tempDate = this.sigDate;
|
||||||
this.tempName = this.sigName;
|
this.tempName = this.sigName;
|
||||||
|
|||||||
Reference in New Issue
Block a user