This commit is contained in:
2021-06-12 00:18:41 +00:00
parent ed8fd2c4fa
commit f4832c261e
5 changed files with 28 additions and 26 deletions

View File

@@ -387,26 +387,12 @@ CURRENTLY DOING: Work order notifications - PartRequested
todo: add unit required rule to backend woitemunits selection
todo: search workorder tree for front end required and other rules then replicate at back end, some are missing and moer will be missing after below blocks of new wo issues fixed
todo: wokrorderitemloand and possible others have weird NEW object with items from other objects due to copy and paste, clean that shit up, don't need to send it over the wire every time
Go through each and make sure there are exactly the same keys of a fetched record in there (minus viz of course)
bugbug: new wokrorder adding new item of any kind doesn't trigger dirty
bugubg: completely fresh workorder riddled with errors when attempting to create one of each type of record
expense -> tax code is required in sql but not in UI WTF?
travel -> if rate not chosen it still seems to fetch somethign then error out on rateviz populate
2021-06-11 11:45:46.4561|ERROR|SERVER|Error=>System.NullReferenceException: Object reference not set to an instance of an object.
at AyaNova.Biz.WorkOrderBiz.TravelPopulateVizFields(WorkOrderItemTravel o) in C:\data\code\raven\server\AyaNova\biz\WorkOrderBiz.cs:line 5057
at AyaNova.Biz.WorkOrderBiz.TravelCreateAsync(WorkOrderItemTravel newObject) in C:\data\code\raven\server\AyaNova\biz\WorkOrderBiz.cs:line 4930
at AyaNova.Api.Controllers.WorkOrderController.PostWorkOrderItemTravel(WorkOrderItemTravel newObject, ApiVersion apiVersion) in C:\data\code\raven\server\AyaNova\Controllers\WorkOrderController.cs:line 1317
parts -> quantity required but doesn't show that in UI (no rule)
labor -> error at server:
2021-06-11 11:45:46.3095|ERROR|SERVER|Error=>System.NullReferenceException: Object reference not set to an instance of an object.
at AyaNova.Biz.WorkOrderBiz.LaborPopulateVizFields(WorkOrderItemLabor o) in C:\data\code\raven\server\AyaNova\biz\WorkOrderBiz.cs:line 2318
at AyaNova.Biz.WorkOrderBiz.LaborCreateAsync(WorkOrderItemLabor newObject) in C:\data\code\raven\server\AyaNova\biz\WorkOrderBiz.cs:line 2191
at AyaNova.Api.Controllers.WorkOrderController.PostWorkOrderItemLabor(WorkOrderItemLabor newObject, ApiVersion apiVersion) in C:\data\code\raven\server\AyaNova\Controllers\WorkOrderController.cs:line 568
Steps to test notifications:

View File

@@ -488,7 +488,7 @@ export default {
totalCost: 0,
chargeAmount: 0,
taxPaid: 0,
chargeTaxCodeId: 0,
chargeTaxCodeId: null,
chargeTaxCodeViz: null,
reimburseUser: false,
userId: null,

View File

@@ -91,6 +91,12 @@
`Items[${activeWoItemIndex}].loans[${activeItemIndex}].loanUnitId`
"
data-cy="loans.loanUnitId"
:rules="[
form().required(
this,
`Items[${activeWoItemIndex}].loans[${activeItemIndex}].loanUnitId`
)
]"
:error-messages="
form().serverErrors(
this,
@@ -123,12 +129,6 @@
:label="$ay.t('WorkOrderItemLoanRate')"
:ref="`Items[${activeWoItemIndex}].loans[${activeItemIndex}].rate`"
data-cy="loanUnitRateUnit"
:rules="[
form().integerValid(
this,
`Items[${activeWoItemIndex}].loans[${activeItemIndex}].rate`
)
]"
:error-messages="
form().serverErrors(
this,
@@ -511,9 +511,10 @@ export default {
userId: null,
description: null,
serials: null,
loanId: null,
loanUnitId: 0, //zero to break rule on new
loanWarehouseId: null,
quantity: 1,
rate: 0,
taxCodeId: null,
price: 0,
priceOverride: null,
@@ -526,6 +527,15 @@ export default {
this.$emit("change");
this.selectedRow = [{ index: newIndex }];
this.activeItemIndex = newIndex;
//trigger rule breaking / validation
this.$nextTick(() => {
this.value.items[this.activeWoItemIndex].loans[
this.activeItemIndex
].loanUnitId = null;
this.fieldValueChanged(
`Items[${this.activeWoItemIndex}].loans[${this.activeItemIndex}].loanUnitId`
);
});
},
unDeleteItem() {
this.value.items[this.activeWoItemIndex].loans[

View File

@@ -92,6 +92,12 @@
`Items[${activeWoItemIndex}].outsideServices[${activeItemIndex}].unitId`
"
data-cy="outsideServices.unitId"
:rules="[
form().required(
this,
`Items[${activeWoItemIndex}].outsideServices[${activeItemIndex}].unitId`
)
]"
:error-messages="
form().serverErrors(
this,
@@ -656,7 +662,7 @@ export default {
this.value.items[this.activeWoItemIndex].outsideServices.push({
id: 0,
concurrency: 0,
unitId: null,
unitId: 0,
notes: null,
vendorSentToId: null,
vendorSentViaId: null,

View File

@@ -280,7 +280,7 @@ export default {
customFields: "{}",
tags: [],
userId: null,
unitId: 0,//zero to break rule on new
unitId: 0, //zero to break rule on new
estimatedQuantity: 0,
startDate: null,
stopDate: null,