This commit is contained in:
@@ -267,6 +267,14 @@ TODO: 1 BETA DOCS:
|
||||
- At the server in RequiredFieldsValidator.cs wrap line 87 and maybe the above in a try catch block to properly handle and issue an error if the names don't match
|
||||
rather than bombing. maybe do this first so can catch the ones that slip through
|
||||
|
||||
TODO ACTUAL FOR THIS
|
||||
Errors returned *MUST* always be the model property because the server and biz rules will always use that, currently when I started to change it I didn't realize how important that was and
|
||||
Used the fieldkey/transkey in the form server errors but that is incorrect.
|
||||
Also the custom fields validation is returning the form key over the model but it should be the other way around, modelkey first if found or secondarily formkey as it's assumed the form key *is* the same as the model key
|
||||
So, the fix is to go back through all the wo quote and when I get to it PM forms and make sure the custom required valiation issues the model key and that the form field servererrors code specifies the model key as well
|
||||
(which is how it was basically)
|
||||
|
||||
|
||||
- 1 todo: Search limited to a type is *not* working, it just returns all results, search from a Customer for example and you will see all object results
|
||||
|
||||
- 1 todo:
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceStartDate`
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].WorkOrderItemLaborServiceStartDate`
|
||||
)
|
||||
"
|
||||
@input="
|
||||
@@ -150,7 +150,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceStopDate`
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].WorkOrderItemLaborServiceStopDate`
|
||||
)
|
||||
"
|
||||
@input="
|
||||
@@ -229,7 +229,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceRateId`
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].WorkOrderItemLaborServiceRateID`
|
||||
)
|
||||
"
|
||||
@input="
|
||||
@@ -267,7 +267,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].userId`
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].WorkOrderItemLaborUserID`
|
||||
)
|
||||
"
|
||||
@input="
|
||||
@@ -349,7 +349,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].taxCodeSaleId`
|
||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].WorkOrderItemLaborTaxRateSaleID`
|
||||
)
|
||||
"
|
||||
@input="
|
||||
|
||||
@@ -96,13 +96,7 @@
|
||||
}}<v-icon right large>$ayiTrashRestoreAlt</v-icon></v-btn
|
||||
>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'WorkOrderItemPartPartID')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<gz-pick-list
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].partId`
|
||||
@@ -140,11 +134,7 @@
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="
|
||||
pvm.useInventory &&
|
||||
form().showMe(this, 'WorkOrderItemPartPartWarehouseID') &&
|
||||
!value.userIsRestrictedType
|
||||
"
|
||||
v-if="pvm.useInventory && !value.userIsRestrictedType"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
@@ -178,13 +168,7 @@
|
||||
@update:name="warehouseChange"
|
||||
></gz-pick-list>
|
||||
</v-col>
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'WorkOrderItemPartQuantity')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<gz-decimal
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].quantity`
|
||||
@@ -258,7 +242,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].description`
|
||||
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].WorkOrderItemPartDescription`
|
||||
)
|
||||
"
|
||||
@input="
|
||||
@@ -296,7 +280,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].taxPartSaleId`
|
||||
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].WorkOrderItemPartTaxPartSaleID`
|
||||
)
|
||||
"
|
||||
@input="
|
||||
@@ -334,7 +318,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].priceOverride`
|
||||
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].PartPriceOverride`
|
||||
)
|
||||
"
|
||||
:rules="[
|
||||
@@ -365,7 +349,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].serials`
|
||||
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].WorkOrderItemPartSerials`
|
||||
)
|
||||
"
|
||||
data-cy="partSerials"
|
||||
@@ -526,19 +510,13 @@ export default {
|
||||
headerList: function() {
|
||||
const headers = [];
|
||||
|
||||
if (this.form().showMe(this, "WorkOrderItemPartPartID")) {
|
||||
headers.push({
|
||||
text: this.$ay.t("WorkOrderItemPartPartID"),
|
||||
align: "left",
|
||||
value: "partNameViz"
|
||||
});
|
||||
}
|
||||
headers.push({
|
||||
text: this.$ay.t("WorkOrderItemPartPartID"),
|
||||
align: "left",
|
||||
value: "partNameViz"
|
||||
});
|
||||
|
||||
if (
|
||||
this.pvm.useInventory &&
|
||||
this.form().showMe(this, "WorkOrderItemPartPartWarehouseID") &&
|
||||
!this.value.userIsRestrictedType
|
||||
) {
|
||||
if (this.pvm.useInventory && !this.value.userIsRestrictedType) {
|
||||
headers.push({
|
||||
text: this.$ay.t("WorkOrderItemPartPartWarehouseID"),
|
||||
align: "left",
|
||||
@@ -546,13 +524,11 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
if (this.form().showMe(this, "WorkOrderItemPartQuantity")) {
|
||||
headers.push({
|
||||
text: this.$ay.t("WorkOrderItemPartQuantity"),
|
||||
align: "right",
|
||||
value: "quantity"
|
||||
});
|
||||
}
|
||||
headers.push({
|
||||
text: this.$ay.t("WorkOrderItemPartQuantity"),
|
||||
align: "right",
|
||||
value: "quantity"
|
||||
});
|
||||
|
||||
if (this.form().showMe(this, "PartDescription")) {
|
||||
headers.push({
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].scheduledUsers[${activeItemIndex}].startDate`
|
||||
`Items[${activeWoItemIndex}].scheduledUsers[${activeItemIndex}].WorkOrderItemScheduledUserStartDate`
|
||||
)
|
||||
"
|
||||
@input="
|
||||
@@ -163,7 +163,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].scheduledUsers[${activeItemIndex}].stopDate`
|
||||
`Items[${activeWoItemIndex}].scheduledUsers[${activeItemIndex}].WorkOrderItemScheduledUserStopDate`
|
||||
)
|
||||
"
|
||||
@input="
|
||||
@@ -248,7 +248,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].scheduledUsers[${activeItemIndex}].userId`
|
||||
`Items[${activeWoItemIndex}].scheduledUsers[${activeItemIndex}].WorkOrderItemScheduledUserUserID`
|
||||
)
|
||||
"
|
||||
@input="
|
||||
@@ -287,7 +287,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].scheduledUsers[${activeItemIndex}].serviceRateId`
|
||||
`Items[${activeWoItemIndex}].scheduledUsers[${activeItemIndex}].WorkOrderItemScheduledUserServiceRateID`
|
||||
)
|
||||
"
|
||||
@input="
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].status`
|
||||
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].WorkOrderItemTaskWorkOrderItemTaskCompletionType`
|
||||
)
|
||||
"
|
||||
@input="
|
||||
@@ -197,7 +197,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].completedByUserId`
|
||||
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].WorkOrderItemTaskUser`
|
||||
)
|
||||
"
|
||||
@input="
|
||||
@@ -231,7 +231,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].completedDate`
|
||||
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].WorkOrderItemTaskCompletedDate`
|
||||
)
|
||||
"
|
||||
@input="
|
||||
@@ -242,7 +242,7 @@
|
||||
></gz-date-time-picker>
|
||||
</v-col>
|
||||
|
||||
<v-col v-if="form().showMe(this, 'WorkOrderItemTaskTaskID')" cols="12">
|
||||
<v-col cols="12">
|
||||
<v-textarea
|
||||
:ref="`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].task`"
|
||||
v-model="value.items[activeWoItemIndex].tasks[activeItemIndex].task"
|
||||
@@ -367,13 +367,11 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
if (this.form().showMe(this, "WorkOrderItemTaskTaskID")) {
|
||||
headers.push({
|
||||
text: this.$ay.t("WorkOrderItemTaskTaskID"),
|
||||
align: "start",
|
||||
value: "task"
|
||||
});
|
||||
}
|
||||
headers.push({
|
||||
text: this.$ay.t("WorkOrderItemTaskTaskID"),
|
||||
align: "start",
|
||||
value: "task"
|
||||
});
|
||||
|
||||
if (this.form().showMe(this, "WorkOrderItemTaskUser")) {
|
||||
headers.push({
|
||||
|
||||
@@ -86,13 +86,7 @@
|
||||
>{{ $ay.t("Undelete")
|
||||
}}<v-icon right large>$ayiTrashRestoreAlt</v-icon></v-btn
|
||||
>
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'WorkOrderItemUnit')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<gz-pick-list
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].units[${activeItemIndex}].unitId`
|
||||
@@ -177,7 +171,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].units[${activeItemIndex}].notes`
|
||||
`Items[${activeWoItemIndex}].units[${activeItemIndex}].WorkOrderItemUnitNotes`
|
||||
)
|
||||
"
|
||||
data-cy="unitUnitNotes"
|
||||
@@ -205,7 +199,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${activeWoItemIndex}].units[${activeItemIndex}].tags`
|
||||
`Items[${activeWoItemIndex}].units[${activeItemIndex}].WorkOrderItemUnitTags`
|
||||
)
|
||||
"
|
||||
@input="
|
||||
@@ -395,13 +389,11 @@ export default {
|
||||
headerList: function() {
|
||||
const headers = [];
|
||||
|
||||
if (this.form().showMe(this, "WorkOrderItemUnit")) {
|
||||
headers.push({
|
||||
text: this.$ay.t("Unit"),
|
||||
align: "left",
|
||||
value: "unitViz"
|
||||
});
|
||||
}
|
||||
headers.push({
|
||||
text: this.$ay.t("Unit"),
|
||||
align: "left",
|
||||
value: "unitViz"
|
||||
});
|
||||
|
||||
if (this.form().showMe(this, "UnitModelName")) {
|
||||
headers.push({
|
||||
|
||||
@@ -267,7 +267,10 @@
|
||||
:disabled="isDeleted"
|
||||
:label="$ay.t('WorkOrderItemTechNotes')"
|
||||
:error-messages="
|
||||
form().serverErrors(this, `items[${activeItemIndex}].techNotes`)
|
||||
form().serverErrors(
|
||||
this,
|
||||
`items[${activeItemIndex}].WorkOrderItemTechNotes`
|
||||
)
|
||||
"
|
||||
data-cy="items.techNotes"
|
||||
auto-grow
|
||||
@@ -293,7 +296,10 @@
|
||||
:disabled="isDeleted"
|
||||
data-cy="requestDate"
|
||||
:error-messages="
|
||||
form().serverErrors(this, `items[${activeItemIndex}].requestDate`)
|
||||
form().serverErrors(
|
||||
this,
|
||||
`items[${activeItemIndex}].WorkOrderItemRequestDate`
|
||||
)
|
||||
"
|
||||
@input="fieldValueChanged('requestDate')"
|
||||
></gz-date-time-picker>
|
||||
@@ -321,7 +327,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`items[${activeItemIndex}].workOrderItemStatusId`
|
||||
`items[${activeItemIndex}].WorkOrderItemWorkOrderStatusID`
|
||||
)
|
||||
"
|
||||
data-cy="workOrderItemStatusId"
|
||||
@@ -377,7 +383,7 @@
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`items[${activeItemIndex}].workOrderItemPriorityId`
|
||||
`items[${activeItemIndex}].WorkOrderItemPriorityID`
|
||||
)
|
||||
"
|
||||
data-cy="workOrderItemPriorityId"
|
||||
@@ -450,7 +456,10 @@
|
||||
:readonly="formState.readOnly"
|
||||
data-cy="tags"
|
||||
:error-messages="
|
||||
form().serverErrors(this, `items[${activeItemIndex}].tags`)
|
||||
form().serverErrors(
|
||||
this,
|
||||
`items[${activeItemIndex}].WorkOrderItemTags`
|
||||
)
|
||||
"
|
||||
@input="fieldValueChanged('tags')"
|
||||
></gz-tag-picker>
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
<v-col
|
||||
v-if="
|
||||
form().showMe(this, 'Notes') &&
|
||||
form().showMe(this, 'WorkOrderSummary') &&
|
||||
!(
|
||||
value.userIsSubContractorFull ||
|
||||
value.userIsSubContractorRestricted
|
||||
|
||||
@@ -86,13 +86,7 @@
|
||||
>{{ $ay.t("Undelete")
|
||||
}}<v-icon right large>$ayiTrashRestoreAlt</v-icon></v-btn
|
||||
>
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'WorkOrderItemUnit')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<gz-pick-list
|
||||
:ref="
|
||||
`Items[${activeWoItemIndex}].units[${activeItemIndex}].unitId`
|
||||
@@ -405,13 +399,11 @@ export default {
|
||||
headerList: function() {
|
||||
const headers = [];
|
||||
|
||||
if (this.form().showMe(this, "WorkOrderItemUnit")) {
|
||||
headers.push({
|
||||
text: this.$ay.t("Unit"),
|
||||
align: "left",
|
||||
value: "unitViz"
|
||||
});
|
||||
}
|
||||
headers.push({
|
||||
text: this.$ay.t("Unit"),
|
||||
align: "left",
|
||||
value: "unitViz"
|
||||
});
|
||||
|
||||
if (this.form().showMe(this, "UnitModelName")) {
|
||||
headers.push({
|
||||
|
||||
Reference in New Issue
Block a user