diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 87808b54..7cdb78f8 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -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 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: 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 todo: service rates contract list - No dupes rule at server + biz rule No dupes rule at server limit to contract rates only in picklist??? 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 because id is 0 for added items and there could be two added items diff --git a/ayanova/src/views/svc-contract.vue b/ayanova/src/views/svc-contract.vue index 5472f666..f32beb22 100644 --- a/ayanova/src/views/svc-contract.vue +++ b/ayanova/src/views/svc-contract.vue @@ -1071,6 +1071,7 @@ :allow-no-selection="false" :can-clear="false" :aya-type="ayaTypes().ServiceRate" + :variant="'contractrates'" :show-edit-icon="true" v-model=" obj.serviceRateItems[editServiceRateItemIndex] @@ -1532,25 +1533,21 @@ export default { vm.formState.serverError = res.error; window.$gz.form.setErrorBoxErrors(vm); } else { - //Logic for detecting if a post or put: if id then it was a post, if no id then it was a put - if (res.data.id) { - //POST - whole new object returned + //POST or PUT - whole new object returned which is a little different than other objects + //so if it's new then need to navigate to it to update url with id + if (vm.$route.params.recordid != 0) { + //update of existing record vm.obj = res.data; - //Change URL to new record - //NOTE: will not cause a page re-render, almost nothing does unless forced with a KEY property or using router.GO() - + } else { this.$router.push({ name: "contract-edit", params: { 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 window.$gz.form.setFormState({ vm: vm,