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
|
- 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
|
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: 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:
|
- 1 todo:
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceStartDate`
|
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].WorkOrderItemLaborServiceStartDate`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@input="
|
@input="
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceStopDate`
|
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].WorkOrderItemLaborServiceStopDate`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@input="
|
@input="
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].serviceRateId`
|
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].WorkOrderItemLaborServiceRateID`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@input="
|
@input="
|
||||||
@@ -267,7 +267,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].userId`
|
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].WorkOrderItemLaborUserID`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@input="
|
@input="
|
||||||
@@ -349,7 +349,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].taxCodeSaleId`
|
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].WorkOrderItemLaborTaxRateSaleID`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@input="
|
@input="
|
||||||
|
|||||||
@@ -96,13 +96,7 @@
|
|||||||
}}<v-icon right large>$ayiTrashRestoreAlt</v-icon></v-btn
|
}}<v-icon right large>$ayiTrashRestoreAlt</v-icon></v-btn
|
||||||
>
|
>
|
||||||
|
|
||||||
<v-col
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
v-if="form().showMe(this, 'WorkOrderItemPartPartID')"
|
|
||||||
cols="12"
|
|
||||||
sm="6"
|
|
||||||
lg="4"
|
|
||||||
xl="3"
|
|
||||||
>
|
|
||||||
<gz-pick-list
|
<gz-pick-list
|
||||||
:ref="
|
:ref="
|
||||||
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].partId`
|
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].partId`
|
||||||
@@ -140,11 +134,7 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
v-if="
|
v-if="pvm.useInventory && !value.userIsRestrictedType"
|
||||||
pvm.useInventory &&
|
|
||||||
form().showMe(this, 'WorkOrderItemPartPartWarehouseID') &&
|
|
||||||
!value.userIsRestrictedType
|
|
||||||
"
|
|
||||||
cols="12"
|
cols="12"
|
||||||
sm="6"
|
sm="6"
|
||||||
lg="4"
|
lg="4"
|
||||||
@@ -178,13 +168,7 @@
|
|||||||
@update:name="warehouseChange"
|
@update:name="warehouseChange"
|
||||||
></gz-pick-list>
|
></gz-pick-list>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
v-if="form().showMe(this, 'WorkOrderItemPartQuantity')"
|
|
||||||
cols="12"
|
|
||||||
sm="6"
|
|
||||||
lg="4"
|
|
||||||
xl="3"
|
|
||||||
>
|
|
||||||
<gz-decimal
|
<gz-decimal
|
||||||
:ref="
|
:ref="
|
||||||
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].quantity`
|
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].quantity`
|
||||||
@@ -258,7 +242,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].description`
|
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].WorkOrderItemPartDescription`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@input="
|
@input="
|
||||||
@@ -296,7 +280,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].taxPartSaleId`
|
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].WorkOrderItemPartTaxPartSaleID`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@input="
|
@input="
|
||||||
@@ -334,7 +318,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].priceOverride`
|
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].PartPriceOverride`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
:rules="[
|
:rules="[
|
||||||
@@ -365,7 +349,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].serials`
|
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].WorkOrderItemPartSerials`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
data-cy="partSerials"
|
data-cy="partSerials"
|
||||||
@@ -526,19 +510,13 @@ export default {
|
|||||||
headerList: function() {
|
headerList: function() {
|
||||||
const headers = [];
|
const headers = [];
|
||||||
|
|
||||||
if (this.form().showMe(this, "WorkOrderItemPartPartID")) {
|
headers.push({
|
||||||
headers.push({
|
text: this.$ay.t("WorkOrderItemPartPartID"),
|
||||||
text: this.$ay.t("WorkOrderItemPartPartID"),
|
align: "left",
|
||||||
align: "left",
|
value: "partNameViz"
|
||||||
value: "partNameViz"
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
if (this.pvm.useInventory && !this.value.userIsRestrictedType) {
|
||||||
this.pvm.useInventory &&
|
|
||||||
this.form().showMe(this, "WorkOrderItemPartPartWarehouseID") &&
|
|
||||||
!this.value.userIsRestrictedType
|
|
||||||
) {
|
|
||||||
headers.push({
|
headers.push({
|
||||||
text: this.$ay.t("WorkOrderItemPartPartWarehouseID"),
|
text: this.$ay.t("WorkOrderItemPartPartWarehouseID"),
|
||||||
align: "left",
|
align: "left",
|
||||||
@@ -546,13 +524,11 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.form().showMe(this, "WorkOrderItemPartQuantity")) {
|
headers.push({
|
||||||
headers.push({
|
text: this.$ay.t("WorkOrderItemPartQuantity"),
|
||||||
text: this.$ay.t("WorkOrderItemPartQuantity"),
|
align: "right",
|
||||||
align: "right",
|
value: "quantity"
|
||||||
value: "quantity"
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.form().showMe(this, "PartDescription")) {
|
if (this.form().showMe(this, "PartDescription")) {
|
||||||
headers.push({
|
headers.push({
|
||||||
|
|||||||
@@ -123,7 +123,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].scheduledUsers[${activeItemIndex}].startDate`
|
`Items[${activeWoItemIndex}].scheduledUsers[${activeItemIndex}].WorkOrderItemScheduledUserStartDate`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@input="
|
@input="
|
||||||
@@ -163,7 +163,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].scheduledUsers[${activeItemIndex}].stopDate`
|
`Items[${activeWoItemIndex}].scheduledUsers[${activeItemIndex}].WorkOrderItemScheduledUserStopDate`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@input="
|
@input="
|
||||||
@@ -248,7 +248,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].scheduledUsers[${activeItemIndex}].userId`
|
`Items[${activeWoItemIndex}].scheduledUsers[${activeItemIndex}].WorkOrderItemScheduledUserUserID`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@input="
|
@input="
|
||||||
@@ -287,7 +287,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].scheduledUsers[${activeItemIndex}].serviceRateId`
|
`Items[${activeWoItemIndex}].scheduledUsers[${activeItemIndex}].WorkOrderItemScheduledUserServiceRateID`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@input="
|
@input="
|
||||||
|
|||||||
@@ -158,7 +158,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].status`
|
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].WorkOrderItemTaskWorkOrderItemTaskCompletionType`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@input="
|
@input="
|
||||||
@@ -197,7 +197,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].completedByUserId`
|
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].WorkOrderItemTaskUser`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@input="
|
@input="
|
||||||
@@ -231,7 +231,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].completedDate`
|
`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].WorkOrderItemTaskCompletedDate`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@input="
|
@input="
|
||||||
@@ -242,7 +242,7 @@
|
|||||||
></gz-date-time-picker>
|
></gz-date-time-picker>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col v-if="form().showMe(this, 'WorkOrderItemTaskTaskID')" cols="12">
|
<v-col cols="12">
|
||||||
<v-textarea
|
<v-textarea
|
||||||
:ref="`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].task`"
|
:ref="`Items[${activeWoItemIndex}].tasks[${activeItemIndex}].task`"
|
||||||
v-model="value.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({
|
||||||
headers.push({
|
text: this.$ay.t("WorkOrderItemTaskTaskID"),
|
||||||
text: this.$ay.t("WorkOrderItemTaskTaskID"),
|
align: "start",
|
||||||
align: "start",
|
value: "task"
|
||||||
value: "task"
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.form().showMe(this, "WorkOrderItemTaskUser")) {
|
if (this.form().showMe(this, "WorkOrderItemTaskUser")) {
|
||||||
headers.push({
|
headers.push({
|
||||||
|
|||||||
@@ -86,13 +86,7 @@
|
|||||||
>{{ $ay.t("Undelete")
|
>{{ $ay.t("Undelete")
|
||||||
}}<v-icon right large>$ayiTrashRestoreAlt</v-icon></v-btn
|
}}<v-icon right large>$ayiTrashRestoreAlt</v-icon></v-btn
|
||||||
>
|
>
|
||||||
<v-col
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
v-if="form().showMe(this, 'WorkOrderItemUnit')"
|
|
||||||
cols="12"
|
|
||||||
sm="6"
|
|
||||||
lg="4"
|
|
||||||
xl="3"
|
|
||||||
>
|
|
||||||
<gz-pick-list
|
<gz-pick-list
|
||||||
:ref="
|
:ref="
|
||||||
`Items[${activeWoItemIndex}].units[${activeItemIndex}].unitId`
|
`Items[${activeWoItemIndex}].units[${activeItemIndex}].unitId`
|
||||||
@@ -177,7 +171,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].units[${activeItemIndex}].notes`
|
`Items[${activeWoItemIndex}].units[${activeItemIndex}].WorkOrderItemUnitNotes`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
data-cy="unitUnitNotes"
|
data-cy="unitUnitNotes"
|
||||||
@@ -205,7 +199,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].units[${activeItemIndex}].tags`
|
`Items[${activeWoItemIndex}].units[${activeItemIndex}].WorkOrderItemUnitTags`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@input="
|
@input="
|
||||||
@@ -395,13 +389,11 @@ export default {
|
|||||||
headerList: function() {
|
headerList: function() {
|
||||||
const headers = [];
|
const headers = [];
|
||||||
|
|
||||||
if (this.form().showMe(this, "WorkOrderItemUnit")) {
|
headers.push({
|
||||||
headers.push({
|
text: this.$ay.t("Unit"),
|
||||||
text: this.$ay.t("Unit"),
|
align: "left",
|
||||||
align: "left",
|
value: "unitViz"
|
||||||
value: "unitViz"
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.form().showMe(this, "UnitModelName")) {
|
if (this.form().showMe(this, "UnitModelName")) {
|
||||||
headers.push({
|
headers.push({
|
||||||
|
|||||||
@@ -267,7 +267,10 @@
|
|||||||
:disabled="isDeleted"
|
:disabled="isDeleted"
|
||||||
:label="$ay.t('WorkOrderItemTechNotes')"
|
:label="$ay.t('WorkOrderItemTechNotes')"
|
||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(this, `items[${activeItemIndex}].techNotes`)
|
form().serverErrors(
|
||||||
|
this,
|
||||||
|
`items[${activeItemIndex}].WorkOrderItemTechNotes`
|
||||||
|
)
|
||||||
"
|
"
|
||||||
data-cy="items.techNotes"
|
data-cy="items.techNotes"
|
||||||
auto-grow
|
auto-grow
|
||||||
@@ -293,7 +296,10 @@
|
|||||||
:disabled="isDeleted"
|
:disabled="isDeleted"
|
||||||
data-cy="requestDate"
|
data-cy="requestDate"
|
||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(this, `items[${activeItemIndex}].requestDate`)
|
form().serverErrors(
|
||||||
|
this,
|
||||||
|
`items[${activeItemIndex}].WorkOrderItemRequestDate`
|
||||||
|
)
|
||||||
"
|
"
|
||||||
@input="fieldValueChanged('requestDate')"
|
@input="fieldValueChanged('requestDate')"
|
||||||
></gz-date-time-picker>
|
></gz-date-time-picker>
|
||||||
@@ -321,7 +327,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`items[${activeItemIndex}].workOrderItemStatusId`
|
`items[${activeItemIndex}].WorkOrderItemWorkOrderStatusID`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
data-cy="workOrderItemStatusId"
|
data-cy="workOrderItemStatusId"
|
||||||
@@ -377,7 +383,7 @@
|
|||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`items[${activeItemIndex}].workOrderItemPriorityId`
|
`items[${activeItemIndex}].WorkOrderItemPriorityID`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
data-cy="workOrderItemPriorityId"
|
data-cy="workOrderItemPriorityId"
|
||||||
@@ -450,7 +456,10 @@
|
|||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly"
|
||||||
data-cy="tags"
|
data-cy="tags"
|
||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(this, `items[${activeItemIndex}].tags`)
|
form().serverErrors(
|
||||||
|
this,
|
||||||
|
`items[${activeItemIndex}].WorkOrderItemTags`
|
||||||
|
)
|
||||||
"
|
"
|
||||||
@input="fieldValueChanged('tags')"
|
@input="fieldValueChanged('tags')"
|
||||||
></gz-tag-picker>
|
></gz-tag-picker>
|
||||||
|
|||||||
@@ -126,7 +126,7 @@
|
|||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
v-if="
|
v-if="
|
||||||
form().showMe(this, 'Notes') &&
|
form().showMe(this, 'WorkOrderSummary') &&
|
||||||
!(
|
!(
|
||||||
value.userIsSubContractorFull ||
|
value.userIsSubContractorFull ||
|
||||||
value.userIsSubContractorRestricted
|
value.userIsSubContractorRestricted
|
||||||
|
|||||||
@@ -86,13 +86,7 @@
|
|||||||
>{{ $ay.t("Undelete")
|
>{{ $ay.t("Undelete")
|
||||||
}}<v-icon right large>$ayiTrashRestoreAlt</v-icon></v-btn
|
}}<v-icon right large>$ayiTrashRestoreAlt</v-icon></v-btn
|
||||||
>
|
>
|
||||||
<v-col
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
v-if="form().showMe(this, 'WorkOrderItemUnit')"
|
|
||||||
cols="12"
|
|
||||||
sm="6"
|
|
||||||
lg="4"
|
|
||||||
xl="3"
|
|
||||||
>
|
|
||||||
<gz-pick-list
|
<gz-pick-list
|
||||||
:ref="
|
:ref="
|
||||||
`Items[${activeWoItemIndex}].units[${activeItemIndex}].unitId`
|
`Items[${activeWoItemIndex}].units[${activeItemIndex}].unitId`
|
||||||
@@ -405,13 +399,11 @@ export default {
|
|||||||
headerList: function() {
|
headerList: function() {
|
||||||
const headers = [];
|
const headers = [];
|
||||||
|
|
||||||
if (this.form().showMe(this, "WorkOrderItemUnit")) {
|
headers.push({
|
||||||
headers.push({
|
text: this.$ay.t("Unit"),
|
||||||
text: this.$ay.t("Unit"),
|
align: "left",
|
||||||
align: "left",
|
value: "unitViz"
|
||||||
value: "unitViz"
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.form().showMe(this, "UnitModelName")) {
|
if (this.form().showMe(this, "UnitModelName")) {
|
||||||
headers.push({
|
headers.push({
|
||||||
|
|||||||
Reference in New Issue
Block a user