This commit is contained in:
2021-07-15 17:26:50 +00:00
parent e038f07772
commit 6d5d354530
4 changed files with 142 additions and 47 deletions

View File

@@ -89,11 +89,13 @@
> >
<gz-pick-list <gz-pick-list
:aya-type="$ay.ayt().LoanUnit" :aya-type="$ay.ayt().LoanUnit"
:show-edit-icon="true" :show-edit-icon="!value.userIsRestrictedType"
v-model=" v-model="
value.items[activeWoItemIndex].loans[activeItemIndex].loanUnitId value.items[activeWoItemIndex].loans[activeItemIndex].loanUnitId
" "
:readonly="formState.readOnly || isDeleted" :readonly="
formState.readOnly || isDeleted || value.userIsRestrictedType
"
:disabled="isDeleted" :disabled="isDeleted"
:label="$ay.t('WorkOrderItemLoanUnit')" :label="$ay.t('WorkOrderItemLoanUnit')"
:ref=" :ref="
@@ -122,7 +124,10 @@
</v-col> </v-col>
<v-col <v-col
v-if="form().showMe(this, 'WorkOrderItemLoanRate')" v-if="
form().showMe(this, 'WorkOrderItemLoanRate') &&
!value.userIsRestrictedType
"
cols="12" cols="12"
sm="6" sm="6"
lg="4" lg="4"
@@ -154,7 +159,10 @@
</v-col> </v-col>
<v-col <v-col
v-if="form().showMe(this, 'WorkOrderItemLoanQuantity')" v-if="
form().showMe(this, 'WorkOrderItemLoanQuantity') &&
!value.userIsRestrictedType
"
cols="12" cols="12"
sm="6" sm="6"
lg="4" lg="4"
@@ -207,7 +215,7 @@
v-model=" v-model="
value.items[activeWoItemIndex].loans[activeItemIndex].outDate value.items[activeWoItemIndex].loans[activeItemIndex].outDate
" "
:readonly="formState.readOnly" :readonly="formState.readOnly || value.userIsRestrictedType"
:disabled="isDeleted" :disabled="isDeleted"
:ref=" :ref="
`Items[${activeWoItemIndex}].loans[${activeItemIndex}].outDate` `Items[${activeWoItemIndex}].loans[${activeItemIndex}].outDate`
@@ -239,7 +247,7 @@
v-model=" v-model="
value.items[activeWoItemIndex].loans[activeItemIndex].dueDate value.items[activeWoItemIndex].loans[activeItemIndex].dueDate
" "
:readonly="formState.readOnly" :readonly="formState.readOnly || value.userIsRestrictedType"
:disabled="isDeleted" :disabled="isDeleted"
:ref=" :ref="
`Items[${activeWoItemIndex}].loans[${activeItemIndex}].dueDate` `Items[${activeWoItemIndex}].loans[${activeItemIndex}].dueDate`
@@ -271,7 +279,7 @@
v-model=" v-model="
value.items[activeWoItemIndex].loans[activeItemIndex].returnDate value.items[activeWoItemIndex].loans[activeItemIndex].returnDate
" "
:readonly="formState.readOnly" :readonly="formState.readOnly || value.userIsRestrictedType"
:disabled="isDeleted" :disabled="isDeleted"
:ref=" :ref="
`Items[${activeWoItemIndex}].loans[${activeItemIndex}].returnDate` `Items[${activeWoItemIndex}].loans[${activeItemIndex}].returnDate`
@@ -292,7 +300,10 @@
</v-col> </v-col>
<v-col <v-col
v-if="form().showMe(this, 'WorkOrderItemLoanTaxCodeID')" v-if="
form().showMe(this, 'WorkOrderItemLoanTaxCodeID') &&
!value.userIsRestrictedType
"
cols="12" cols="12"
sm="6" sm="6"
lg="4" lg="4"
@@ -327,7 +338,10 @@
</v-col> </v-col>
<v-col <v-col
v-if="form().showMe(this, 'LoanPriceOverride')" v-if="
form().showMe(this, 'LoanPriceOverride') &&
!value.userIsRestrictedType
"
cols="12" cols="12"
sm="6" sm="6"
lg="4" lg="4"
@@ -371,7 +385,7 @@
v-model=" v-model="
value.items[activeWoItemIndex].loans[activeItemIndex].notes value.items[activeWoItemIndex].loans[activeItemIndex].notes
" "
:readonly="formState.readOnly" :readonly="formState.readOnly || value.userIsRestrictedType"
:disabled="isDeleted" :disabled="isDeleted"
:label="$ay.t('WorkOrderItemLoanNotes')" :label="$ay.t('WorkOrderItemLoanNotes')"
:error-messages=" :error-messages="
@@ -606,7 +620,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "WorkOrderItemLoanRate")) { if (
this.form().showMe(this, "WorkOrderItemLoanRate") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("WorkOrderItemLoanRate"), text: this.$ay.t("WorkOrderItemLoanRate"),
align: "left", align: "left",
@@ -614,7 +631,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "WorkOrderItemLoanQuantity")) { if (
this.form().showMe(this, "WorkOrderItemLoanQuantity") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("WorkOrderItemLoanQuantity"), text: this.$ay.t("WorkOrderItemLoanQuantity"),
align: "right", align: "right",
@@ -656,7 +676,8 @@ export default {
if ( if (
this.form().showMe(this, "LoanCost") && this.form().showMe(this, "LoanCost") &&
this.value.userCanViewLoanerCosts this.value.userCanViewLoanerCosts &&
!this.value.userIsRestrictedType
) { ) {
headers.push({ headers.push({
text: this.$ay.t("Cost"), text: this.$ay.t("Cost"),
@@ -665,7 +686,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "LoanListPrice")) { if (
this.form().showMe(this, "LoanListPrice") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("ListPrice"), text: this.$ay.t("ListPrice"),
align: "right", align: "right",
@@ -673,7 +697,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "LoanPriceOverride")) { if (
this.form().showMe(this, "LoanPriceOverride") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("PriceOverride"), text: this.$ay.t("PriceOverride"),
align: "right", align: "right",
@@ -681,7 +708,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "LoanPriceViz")) { if (
this.form().showMe(this, "LoanPriceViz") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("Price"), text: this.$ay.t("Price"),
align: "right", align: "right",
@@ -689,7 +719,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "WorkOrderItemLoanTaxCodeID")) { if (
this.form().showMe(this, "WorkOrderItemLoanTaxCodeID") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("Tax"), text: this.$ay.t("Tax"),
align: "left", align: "left",
@@ -697,7 +730,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "LoanNetViz")) { if (
this.form().showMe(this, "LoanNetViz") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("NetPrice"), text: this.$ay.t("NetPrice"),
align: "right", align: "right",
@@ -705,7 +741,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "LoanTaxAViz")) { if (
this.form().showMe(this, "LoanTaxAViz") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("TaxAAmt"), text: this.$ay.t("TaxAAmt"),
align: "right", align: "right",
@@ -713,7 +752,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "LoanTaxBViz")) { if (
this.form().showMe(this, "LoanTaxBViz") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("TaxBAmt"), text: this.$ay.t("TaxBAmt"),
align: "right", align: "right",
@@ -721,7 +763,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "LoanLineTotalViz")) { if (
this.form().showMe(this, "LoanLineTotalViz") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("LineTotal"), text: this.$ay.t("LineTotal"),
align: "right", align: "right",

View File

@@ -255,7 +255,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "WorkOrderItemPartRequestPartWarehouseID")) { if (
this.form().showMe(this, "WorkOrderItemPartRequestPartWarehouseID") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("WorkOrderItemPartRequestPartWarehouseID"), text: this.$ay.t("WorkOrderItemPartRequestPartWarehouseID"),
align: "left", align: "left",
@@ -279,7 +282,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "WorkOrderItemPartRequestPurchaseOrder")) { if (
this.form().showMe(this, "WorkOrderItemPartRequestPurchaseOrder") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("PurchaseOrder"), text: this.$ay.t("PurchaseOrder"),
align: "left", align: "left",
@@ -287,7 +293,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "WorkOrderItemPartRequestOrderedDate")) { if (
this.form().showMe(this, "WorkOrderItemPartRequestOrderedDate") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("PurchaseOrderOrderedDate"), text: this.$ay.t("PurchaseOrderOrderedDate"),
align: "right", align: "right",

View File

@@ -105,11 +105,13 @@
> >
<gz-pick-list <gz-pick-list
:aya-type="$ay.ayt().Part" :aya-type="$ay.ayt().Part"
:show-edit-icon="true" :show-edit-icon="!value.userIsRestrictedType"
v-model=" v-model="
value.items[activeWoItemIndex].parts[activeItemIndex].partId value.items[activeWoItemIndex].parts[activeItemIndex].partId
" "
:readonly="formState.readOnly || isDeleted" :readonly="
formState.readOnly || isDeleted || value.userIsRestrictedType
"
:disabled="isDeleted" :disabled="isDeleted"
:label="$ay.t('WorkOrderItemPartPartID')" :label="$ay.t('WorkOrderItemPartPartID')"
:ref=" :ref="
@@ -140,7 +142,8 @@
<v-col <v-col
v-if=" v-if="
pvm.useInventory && pvm.useInventory &&
form().showMe(this, 'WorkOrderItemPartPartWarehouseID') form().showMe(this, 'WorkOrderItemPartPartWarehouseID') &&
!value.userIsRestrictedType
" "
cols="12" cols="12"
sm="6" sm="6"
@@ -186,7 +189,9 @@
v-model=" v-model="
value.items[activeWoItemIndex].parts[activeItemIndex].quantity value.items[activeWoItemIndex].parts[activeItemIndex].quantity
" "
:readonly="formState.readOnly || isDeleted" :readonly="
formState.readOnly || isDeleted || value.userIsRestrictedType
"
:disabled="isDeleted" :disabled="isDeleted"
:label="$ay.t('WorkOrderItemPartQuantity')" :label="$ay.t('WorkOrderItemPartQuantity')"
:ref=" :ref="
@@ -241,7 +246,9 @@
v-model=" v-model="
value.items[activeWoItemIndex].parts[activeItemIndex].description value.items[activeWoItemIndex].parts[activeItemIndex].description
" "
:readonly="formState.readOnly || isDeleted" :readonly="
formState.readOnly || isDeleted || value.userIsRestrictedType
"
:disabled="isDeleted" :disabled="isDeleted"
:label="$ay.t('WorkOrderItemPartDescription')" :label="$ay.t('WorkOrderItemPartDescription')"
:ref=" :ref="
@@ -263,7 +270,10 @@
</v-col> </v-col>
<v-col <v-col
v-if="form().showMe(this, 'WorkOrderItemPartTaxPartSaleID')" v-if="
form().showMe(this, 'WorkOrderItemPartTaxPartSaleID') &&
!value.userIsRestrictedType
"
cols="12" cols="12"
sm="6" sm="6"
lg="4" lg="4"
@@ -299,7 +309,10 @@
</v-col> </v-col>
<v-col <v-col
v-if="form().showMe(this, 'PartPriceOverride')" v-if="
form().showMe(this, 'PartPriceOverride') &&
!value.userIsRestrictedType
"
cols="12" cols="12"
sm="6" sm="6"
lg="4" lg="4"
@@ -343,7 +356,7 @@
v-model=" v-model="
value.items[activeWoItemIndex].parts[activeItemIndex].serials value.items[activeWoItemIndex].parts[activeItemIndex].serials
" "
:readonly="formState.readOnly" :readonly="formState.readOnly || value.userIsRestrictedType"
:disabled="isDeleted" :disabled="isDeleted"
:label="$ay.t('PurchaseOrderItemSerialNumbers')" :label="$ay.t('PurchaseOrderItemSerialNumbers')"
:error-messages=" :error-messages="
@@ -862,7 +875,8 @@ export default {
if ( if (
this.pvm.useInventory && this.pvm.useInventory &&
this.form().showMe(this, "WorkOrderItemPartPartWarehouseID") this.form().showMe(this, "WorkOrderItemPartPartWarehouseID") &&
!this.value.userIsRestrictedType
) { ) {
headers.push({ headers.push({
text: this.$ay.t("WorkOrderItemPartPartWarehouseID"), text: this.$ay.t("WorkOrderItemPartPartWarehouseID"),
@@ -921,7 +935,8 @@ export default {
if ( if (
this.form().showMe(this, "PartCost") && this.form().showMe(this, "PartCost") &&
this.value.userCanViewPartCosts this.value.userCanViewPartCosts &&
!this.value.userIsRestrictedType
) { ) {
headers.push({ headers.push({
text: this.$ay.t("Cost"), text: this.$ay.t("Cost"),
@@ -930,7 +945,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "PartListPrice")) { if (
this.form().showMe(this, "PartListPrice") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("ListPrice"), text: this.$ay.t("ListPrice"),
align: "right", align: "right",
@@ -938,7 +956,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "PartPriceOverride")) { if (
this.form().showMe(this, "PartPriceOverride") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("PriceOverride"), text: this.$ay.t("PriceOverride"),
align: "right", align: "right",
@@ -946,7 +967,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "PartPriceViz")) { if (
this.form().showMe(this, "PartPriceViz") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("Price"), text: this.$ay.t("Price"),
align: "right", align: "right",
@@ -954,7 +978,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "WorkOrderItemPartTaxPartSaleID")) { if (
this.form().showMe(this, "WorkOrderItemPartTaxPartSaleID") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("Tax"), text: this.$ay.t("Tax"),
align: "left", align: "left",
@@ -962,7 +989,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "PartNetViz")) { if (
this.form().showMe(this, "PartNetViz") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("NetPrice"), text: this.$ay.t("NetPrice"),
align: "right", align: "right",
@@ -970,7 +1000,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "PartTaxAViz")) { if (
this.form().showMe(this, "PartTaxAViz") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("TaxAAmt"), text: this.$ay.t("TaxAAmt"),
align: "right", align: "right",
@@ -978,7 +1011,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "PartTaxBViz")) { if (
this.form().showMe(this, "PartTaxBViz") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("TaxBAmt"), text: this.$ay.t("TaxBAmt"),
align: "right", align: "right",
@@ -986,7 +1022,10 @@ export default {
}); });
} }
if (this.form().showMe(this, "PartLineTotalViz")) { if (
this.form().showMe(this, "PartLineTotalViz") &&
!this.value.userIsRestrictedType
) {
headers.push({ headers.push({
text: this.$ay.t("LineTotal"), text: this.$ay.t("LineTotal"),
align: "right", align: "right",

View File

@@ -96,7 +96,7 @@
v-model=" v-model="
value.items[activeWoItemIndex].tasks[activeItemIndex].sequence value.items[activeWoItemIndex].tasks[activeItemIndex].sequence
" "
:readonly="formState.readOnly" :readonly="formState.readOnly || value.userIsRestrictedType"
:disabled="isDeleted" :disabled="isDeleted"
:label="$ay.t('Sequence')" :label="$ay.t('Sequence')"
:ref=" :ref="
@@ -180,12 +180,14 @@
<gz-pick-list <gz-pick-list
:aya-type="$ay.ayt().User" :aya-type="$ay.ayt().User"
variant="tech" variant="tech"
:show-edit-icon="true" :show-edit-icon="!value.userIsRestrictedType"
v-model=" v-model="
value.items[activeWoItemIndex].tasks[activeItemIndex] value.items[activeWoItemIndex].tasks[activeItemIndex]
.completedByUserId .completedByUserId
" "
:readonly="formState.readOnly || isDeleted" :readonly="
formState.readOnly || isDeleted || value.userIsRestrictedType
"
:disabled="isDeleted" :disabled="isDeleted"
:label="$ay.t('WorkOrderItemTaskUser')" :label="$ay.t('WorkOrderItemTaskUser')"
:ref=" :ref="
@@ -243,7 +245,7 @@
<v-col v-if="form().showMe(this, 'WorkOrderItemTaskTaskID')" cols="12"> <v-col v-if="form().showMe(this, 'WorkOrderItemTaskTaskID')" cols="12">
<v-textarea <v-textarea
v-model="value.items[activeWoItemIndex].tasks[activeItemIndex].task" v-model="value.items[activeWoItemIndex].tasks[activeItemIndex].task"
:readonly="formState.readOnly" :readonly="formState.readOnly || value.userIsRestrictedType"
:disabled="isDeleted" :disabled="isDeleted"
:label="$ay.t('WorkOrderItemTaskTaskID')" :label="$ay.t('WorkOrderItemTaskTaskID')"
:error-messages=" :error-messages="
@@ -259,7 +261,7 @@
) )
]" ]"
:ref="`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].task`" :ref="`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].task`"
data-cy="expenseDescription" data-cy="task"
@input=" @input="
fieldValueChanged( fieldValueChanged(
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].task` `Items[${activeWoItemIndex}].tasks[${activeItemIndex}].task`