This commit is contained in:
2021-03-07 22:32:46 +00:00
parent fd9232ffa7
commit b292c3e134
2 changed files with 19 additions and 14 deletions

View File

@@ -38,7 +38,8 @@ todo: BUGBUG delete all tags from customer, go back in and zone2 appears for som
todo: attach a photo from phone, no error just does nothing todo: attach a photo from phone, no error just does nothing
Test locally first to confirm, probably a rights issue of some kind Test locally first to confirm, probably a rights issue of some kind
todo: test service rate pick list variants
in particular what happens when contract in effect to limit to rates but then no rates selected on contract, sb an empty list
todo: NOT import PO's unless they are current, active and unreceived todo: NOT import PO's unless they are current, active and unreceived
todo: erase database should reset all id values if they aren't reset already so that future data doesn't result in a new PO starting at 29000 due to huge db trial seed prior todo: erase database should reset all id values if they aren't reset already so that future data doesn't result in a new PO starting at 29000 due to huge db trial seed prior
@@ -193,11 +194,18 @@ CURRENTLY DOING: Contract form - rates list and restrict to rates checkbox etc
need restrict to rates checkbox, then help docs and then done need restrict to rates checkbox, then help docs and then done
todo: service rates contract list todo: service rates contract list
No dupes rule at server biz rule No dupes rule at server
limit to contract rates only in picklist??? limit to contract rates only in picklist???
todo: form save full update like po todo: form save full update like po
todo: make other list / edit forms same as service rates list / edit form
use list index, NOT id for crud ops
way it deletes
buttons (remove close just OK button)
todo: Maybe don't need alt format buttons for narrow view??
todo: edit item by item being passed in is flawed potentially because it looks for ID to match when in reality it should pass the index todo: edit item by item being passed in is flawed potentially because it looks for ID to match when in reality it should pass the index
because id is 0 for added items and there could be two added items because id is 0 for added items and there could be two added items

View File

@@ -1071,6 +1071,7 @@
:allow-no-selection="false" :allow-no-selection="false"
:can-clear="false" :can-clear="false"
:aya-type="ayaTypes().ServiceRate" :aya-type="ayaTypes().ServiceRate"
:variant="'contractrates'"
:show-edit-icon="true" :show-edit-icon="true"
v-model=" v-model="
obj.serviceRateItems[editServiceRateItemIndex] obj.serviceRateItems[editServiceRateItemIndex]
@@ -1532,25 +1533,21 @@ export default {
vm.formState.serverError = res.error; vm.formState.serverError = res.error;
window.$gz.form.setErrorBoxErrors(vm); window.$gz.form.setErrorBoxErrors(vm);
} else { } else {
//Logic for detecting if a post or put: if id then it was a post, if no id then it was a put //POST or PUT - whole new object returned which is a little different than other objects
if (res.data.id) { //so if it's new then need to navigate to it to update url with id
//POST - whole new object returned if (vm.$route.params.recordid != 0) {
//update of existing record
vm.obj = res.data; vm.obj = res.data;
//Change URL to new record } else {
//NOTE: will not cause a page re-render, almost nothing does unless forced with a KEY property or using router.GO()
this.$router.push({ this.$router.push({
name: "contract-edit", name: "contract-edit",
params: { params: {
recordid: res.data.id, recordid: res.data.id,
obj: res.data // Pass data object to new form obj: res.data // Pass data object to new form will prevent fetch
} }
}); });
} else {
//PUT - only concurrency token is returned (**warning, if server changes object other fields then this needs to act more like POST above but is more efficient this way**)
//Handle "put" of an existing record (UPDATE)
vm.obj.concurrency = res.data.concurrency;
} }
//Update the form status //Update the form status
window.$gz.form.setFormState({ window.$gz.form.setFormState({
vm: vm, vm: vm,