diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index cdf9c664..bd4f4b27 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -420,8 +420,11 @@ todo: many biz objects are not using new PUT methodology -CURRENTLY DOING: +CURRENTLY DOING: Fix new report issue then do new release for Joyce +todo: move all sample reports from widget to customer as possible?? + or leave for Joyce to do that? + Not sure on this one, have a look and see how "widgety" they are or can they work with customer as is?? @@ -513,13 +516,15 @@ CASES TODO: 3721 1: make labor rate mandatory on workorderitemlabor record and import v7 with some kind of dummy rate if not filled in there + um...be sure about this, mandatory stuff kind of sucks, what's up in that case? + 3763 1: mark all tasks as completed at once with a single click 3769 2: if public FromQuoteId, FromPMId or FromCSRId are set on wo header then it should surface a button or menu option to open the related object(s) I think a menu option would be cleanest as you wouldn't always want to see it in your face but have it available - 3839 / 3845 both 2: pick serial numbers quickly from serialized part selection (ui affordance popup dialog likely with offer of available sn, probably already something in PO similar), see cases for more deets 3843 1: prevent negative amounts on woitempart.quantity (rule I guess) 3868 2: be able to select any unit on wo, needs to be implemented at the UI as it should default to only this customers units (but not reject if customer changed) and also test this out to see if it works properly + maybe select by tag is enough to fulfil this case? @@ -1246,90 +1251,19 @@ MID CENTURY MODERN TUNES - https://www.allmusic.com/album/ultra-lounge-vol-14-bo BUILD CHANGES OF NOTE -Build 111 +BUILD 112 -- Added your work order templates to the project +- All object edit forms new record page is now *not* added to the browser navigation history so creating new record then hitting back will return user to page immediately before new record, not new record itself +- Fixed regression with report designer where it was failing to set the report type resulting in reports being saved with NOType rather than actual type -- Notification subscription list now with more detailed info to disambiguate similar subscriptions that vary only in small details -- Duplicate command now duplicates locally at browser client into a new unsaved copy of the object rather than triggering a server call to duplicate and save - This applies to all objects with the single exception of Translation which still needs to duplicate at server due to it's structure - -- Workorder can now be duplicated, all items are copied identically except: - part requests which are not copied into a new unsaved workorder - prices which are set on new records by server at time of save to snapshot the current price: - workorder item part - loaner - SNEAK PEAK - this might be a good sneak peeks feature to show -- Workorder descendant collections now have a mark all for deletion option to quickly remove an entire collection to facilitate Duplicate in v8 as replacement of v7 template feature which will not be ported to v8 -- WorkorderItemPart - PartAssembly implemented - can now choose part assembly to populate work order item parts list from menu item in workorderitemparts vertical dots menu - SNEAK PEAK - this might be a good sneak peeks feature to show - Serials implemented - can now choose and append from existing serials for part using icon beside serial entry text area in addition to just typing or pasting them in - case 3899 / 3896 (same issue) Fixed issue where cost and listprice were not preserved on any update and save of woitempart record for any reason (not related to tabbing or price override etc) - https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/3899 - https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/3896 -- User / Custom contact on create / duplicate now allows entry of new user options before first User save rather than previous behaviour of having to save new record first then edit and save user options -- Customer user login now always shows in App notifications (Bell icon and list when clicked on) regardless of whether they can subscribe to any notifications (global settings) to allow for viewing direct notifications sent to them - (previously it was not shown if they had no available notification types allowed to subscribe) -- Prevent double booking a tech case 3720 customer request - global setting "Allow schedule conflicts" and if on will check if same tech is booked already within that time frame on update or new scheduled user record - will not check pre-existing or ones where a match can't be made due to null tech, start or stop date - implemented as a server validation check so if there is a conflict will balk and return a validation error that will appear under both the scheduled user start and stop date saying "Schedule conflict" -- Report designer now limits sample data fetched to maximum 5 records if there are no individual record id's selected (checkmarked in table list) -- Report designer now has a "Include all descendants of work order item" checkbox that appears in the "properties" tab of the report designer *if* the report is for a descendant of work order item - this causes the data list used for this report to fully populate the work order item and it's descendants for advanced reporting. - Report must be re-loaded from the main table to see the fully populated sample data (or vice-versa if unchecking) - If not checked then it only includes the descendant record itself, it's immediate workorderitem and the work order header, no other descendants are included -- WorkOrder main table lists for all workorder descendants implemented - i.e. Workorder list menu now has an "Items" item which takes to workorderitems list which in turn now has a menu item for each child of woitem etc - -- Direct open work order by manually entering serial number surfaced in work order list form in menu "Open" item - -- Global settings Customer signature widget title, header, footer text fields added and implemented - -- Signatures on work order implemented - Here is how to print them on report: - =-=-=-=-=-=- - - - - {{#each ayReportData}} -

Work order: {{ Serial }}

-
{{Notes}}
- - {{#if CustomerSignature}} -

-
- Customer signature:
-
- Signed on: {{ ayDateTime CustomerSignatureCaptured}}
- Signed by: {{CustomerSignatureName}}
-
- - {{/if}} - - {{#if TechSignature}} -

-
- Tech signature:
-
- Signed on: {{ ayDateTime TechSignatureCaptured}}
- Signed by: {{TechSignatureName}}
-
- {{/if}} - {{/each}} - - - - =-=-=-=-=-=-=- diff --git a/ayanova/src/views/acc-service-rate.vue b/ayanova/src/views/acc-service-rate.vue index e4e7c898..0caff220 100644 --- a/ayanova/src/views/acc-service-rate.vue +++ b/ayanova/src/views/acc-service-rate.vue @@ -435,7 +435,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "service-rate-edit", params: { recordid: res.data.id, diff --git a/ayanova/src/views/acc-tax-code.vue b/ayanova/src/views/acc-tax-code.vue index 0e29eb8e..d852aba6 100644 --- a/ayanova/src/views/acc-tax-code.vue +++ b/ayanova/src/views/acc-tax-code.vue @@ -393,7 +393,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "tax-code-edit", params: { recordid: res.data.id, diff --git a/ayanova/src/views/acc-travel-rate.vue b/ayanova/src/views/acc-travel-rate.vue index 5e3dcd15..78a6add5 100644 --- a/ayanova/src/views/acc-travel-rate.vue +++ b/ayanova/src/views/acc-travel-rate.vue @@ -433,7 +433,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "travel-rate-edit", params: { recordid: res.data.id, diff --git a/ayanova/src/views/adm-translation.vue b/ayanova/src/views/adm-translation.vue index b47e5e57..2643090e 100644 --- a/ayanova/src/views/adm-translation.vue +++ b/ayanova/src/views/adm-translation.vue @@ -384,7 +384,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "adm-translation", params: { recordid: res.data.id, diff --git a/ayanova/src/views/adm-user.vue b/ayanova/src/views/adm-user.vue index c4c17070..b6179e39 100644 --- a/ayanova/src/views/adm-user.vue +++ b/ayanova/src/views/adm-user.vue @@ -713,7 +713,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "adm-user", params: { recordid: res.data.id, diff --git a/ayanova/src/views/ay-report-edit.vue b/ayanova/src/views/ay-report-edit.vue index c0191e0b..c5dfed67 100644 --- a/ayanova/src/views/ay-report-edit.vue +++ b/ayanova/src/views/ay-report-edit.vue @@ -310,6 +310,16 @@ let editor = null; export default { async created() { let vm = this; + //Not valid without report data options + if (vm.$route.params.reportDataOptions == null) { + throw new Error( + "ay-report-edit::created - missing report data options cannot proceed" + ); + // // navigate backwards + vm.$router.go(-1); + return; + } + try { await initForm(vm); @@ -317,32 +327,7 @@ export default { vm.formState.readOnly = !vm.rights.change; window.$gz.eventBus.$on("menu-click", clickHandler); - // //id 0 means create or duplicate to new - // if (vm.$route.params.recordid != 0) { - // //is there already an obj from a prior operation? - // if (vm.$route.params.obj) { - // //yes, no need to fetch it - // vm.obj = vm.$route.params.obj; - // window.$gz.form.setFormState({ - // vm: vm, - // loading: false - // }); - // } else { - // await vm.getDataFromApi(vm.$route.params.recordid); //let getdata handle loading - // } - - // //Ok, we're here now fetch the report data and can handle includeWoItemDescendants if necessary - // await fetchReportData(vm); - // } else { - // //New record so there *MUST* be an aType on the route params - - // await fetchReportData(vm); //go ahead and fetch report data now, no need to handle includeWoItemDescendants - - // window.$gz.form.setFormState({ - // vm: vm, - // loading: false - // }); - // } + //console.log("report-edit created params are:", vm.$route.params); let setDirty = false; let setValid = true; @@ -366,9 +351,15 @@ export default { "Copy" )}`; setDirty = true; + } else { + //brand new report, not a duplicate or previous data + vm.obj.aType = vm.$route.params.reportDataOptions.AType; } } + //in any case we need the sample data so fetch it here after the setup for new or existing or duplicate is completed above + await fetchReportData(vm); + //--------------- //setup the editor and models @@ -848,7 +839,7 @@ Handlebars.registerHelper('loud', function (aString) { //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() - this.$router.push({ + this.$router.replace({ name: "ay-report-edit", params: { recordid: res.data.id, @@ -926,7 +917,8 @@ Handlebars.registerHelper('loud', function (aString) { name: "ay-report-edit", params: { recordid: 0, - obj: this.obj + obj: this.obj, // Pass data object to new form + reportDataOptions: this.$route.params.reportDataOptions } }); }, diff --git a/ayanova/src/views/cust-customer-note.vue b/ayanova/src/views/cust-customer-note.vue index 6375a515..3461d1d6 100644 --- a/ayanova/src/views/cust-customer-note.vue +++ b/ayanova/src/views/cust-customer-note.vue @@ -290,7 +290,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "customer-note-edit", params: { recordid: res.data.id, diff --git a/ayanova/src/views/cust-customer.vue b/ayanova/src/views/cust-customer.vue index 981dab97..92cd36a4 100644 --- a/ayanova/src/views/cust-customer.vue +++ b/ayanova/src/views/cust-customer.vue @@ -757,7 +757,16 @@ const FORM_CUSTOM_TEMPLATE_KEY = "Customer"; //<-- Should always be CoreBizObjec export default { async created() { let vm = this; - + //Prevent returning back to the /0 NEW route after having just created a new record and instead return to the original new source page + // console.log("cust-customer created params: ", vm.$route.params); + // if ( + // vm.$route.params.recordid == null || + // (vm.$route.params.recordid == 0 && vm.$route.params.newRecord == null) //here recordid will technically be "0" if returned back to it from prior new + // ) { + // // navigate backwards + // vm.$router.go(-1); + // return; + // } try { await initForm(vm); @@ -1029,7 +1038,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "customer-edit", params: { recordid: res.data.id, diff --git a/ayanova/src/views/cust-head-office.vue b/ayanova/src/views/cust-head-office.vue index 2c729a4a..d6c7d4b8 100644 --- a/ayanova/src/views/cust-head-office.vue +++ b/ayanova/src/views/cust-head-office.vue @@ -934,7 +934,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "head-office-edit", params: { recordid: res.data.id, diff --git a/ayanova/src/views/cust-user.vue b/ayanova/src/views/cust-user.vue index 9ba2f9af..33424cbc 100644 --- a/ayanova/src/views/cust-user.vue +++ b/ayanova/src/views/cust-user.vue @@ -758,7 +758,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "cust-user", params: { recordid: res.data.id, diff --git a/ayanova/src/views/customer-csr-edit.vue b/ayanova/src/views/customer-csr-edit.vue index 941b43af..b19ccf3b 100644 --- a/ayanova/src/views/customer-csr-edit.vue +++ b/ayanova/src/views/customer-csr-edit.vue @@ -527,7 +527,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "csr-edit", params: { recordid: res.data.id, diff --git a/ayanova/src/views/home-notifications.vue b/ayanova/src/views/home-notifications.vue index 76373c73..c44e6b34 100644 --- a/ayanova/src/views/home-notifications.vue +++ b/ayanova/src/views/home-notifications.vue @@ -77,9 +77,6 @@ export default { vm.formState.ready = true; } }, - // beforeRouteEnter(to, from, next) { - // next(window.$gz.store.state.notifyAvailable); - // }, beforeDestroy() { window.$gz.eventBus.$off("menu-click", clickHandler); }, diff --git a/ayanova/src/views/home-notify-subscription.vue b/ayanova/src/views/home-notify-subscription.vue index 2b3fd9e0..9f0ce350 100644 --- a/ayanova/src/views/home-notify-subscription.vue +++ b/ayanova/src/views/home-notify-subscription.vue @@ -542,7 +542,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "home-notify-subscription", params: { recordid: res.data.id, diff --git a/ayanova/src/views/home-reminder.vue b/ayanova/src/views/home-reminder.vue index 2b765659..6e891f20 100644 --- a/ayanova/src/views/home-reminder.vue +++ b/ayanova/src/views/home-reminder.vue @@ -415,7 +415,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "reminder-edit", params: { recordid: res.data.id, diff --git a/ayanova/src/views/home-review.vue b/ayanova/src/views/home-review.vue index 822aa485..3eaa5892 100644 --- a/ayanova/src/views/home-review.vue +++ b/ayanova/src/views/home-review.vue @@ -466,7 +466,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "review-edit", params: { recordid: res.data.id, diff --git a/ayanova/src/views/inv-part-assembly.vue b/ayanova/src/views/inv-part-assembly.vue index b89ed665..ecb925a2 100644 --- a/ayanova/src/views/inv-part-assembly.vue +++ b/ayanova/src/views/inv-part-assembly.vue @@ -550,7 +550,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "part-assembly-edit", params: { recordid: res.data.id, diff --git a/ayanova/src/views/inv-purchase-order.vue b/ayanova/src/views/inv-purchase-order.vue index b5bdcc3d..b10aa741 100644 --- a/ayanova/src/views/inv-purchase-order.vue +++ b/ayanova/src/views/inv-purchase-order.vue @@ -1541,7 +1541,7 @@ export default { //update of existing record vm.obj = res.data; } else { - this.$router.push({ + this.$router.replace({ name: "inv-purchase-order", params: { recordid: res.data.id, diff --git a/ayanova/src/views/svc-contract.vue b/ayanova/src/views/svc-contract.vue index f3995888..f16f1959 100644 --- a/ayanova/src/views/svc-contract.vue +++ b/ayanova/src/views/svc-contract.vue @@ -1716,7 +1716,7 @@ export default { //update of existing record vm.obj = res.data; } else { - this.$router.push({ + this.$router.replace({ name: "contract-edit", params: { recordid: res.data.id, diff --git a/ayanova/src/views/svc-csr.vue b/ayanova/src/views/svc-csr.vue index 62251d18..5d391c17 100644 --- a/ayanova/src/views/svc-csr.vue +++ b/ayanova/src/views/svc-csr.vue @@ -521,7 +521,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "csr-edit", params: { recordid: res.data.id, @@ -611,7 +611,7 @@ export default { vm.formState.serverError = res.error; window.$gz.form.setErrorBoxErrors(vm); } else { - //Navigate to new record + //Navigate to record this.$router.push({ name: "csr-edit", params: { @@ -650,7 +650,7 @@ export default { vm.formState.serverError = res.error; window.$gz.form.setErrorBoxErrors(vm); } else { - //Navigate to new record + //Navigate to record this.$router.push({ name: "csr-edit", params: { diff --git a/ayanova/src/views/svc-loaner.vue b/ayanova/src/views/svc-loaner.vue index db3bd04c..2fa3b168 100644 --- a/ayanova/src/views/svc-loaner.vue +++ b/ayanova/src/views/svc-loaner.vue @@ -674,7 +674,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "loan-unit-edit", params: { recordid: res.data.id, diff --git a/ayanova/src/views/svc-project.vue b/ayanova/src/views/svc-project.vue index 46726a9a..1161021c 100644 --- a/ayanova/src/views/svc-project.vue +++ b/ayanova/src/views/svc-project.vue @@ -409,7 +409,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "project-edit", params: { recordid: res.data.id, diff --git a/ayanova/src/views/svc-task-group.vue b/ayanova/src/views/svc-task-group.vue index 69659716..d5e25dfe 100644 --- a/ayanova/src/views/svc-task-group.vue +++ b/ayanova/src/views/svc-task-group.vue @@ -467,7 +467,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "svc-task-group", params: { recordid: res.data.id, diff --git a/ayanova/src/views/svc-unit-model.vue b/ayanova/src/views/svc-unit-model.vue index 95c996af..220deb39 100644 --- a/ayanova/src/views/svc-unit-model.vue +++ b/ayanova/src/views/svc-unit-model.vue @@ -522,7 +522,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "unit-model-edit", params: { recordid: res.data.id, diff --git a/ayanova/src/views/svc-unit.vue b/ayanova/src/views/svc-unit.vue index cf33b2c9..2307af80 100644 --- a/ayanova/src/views/svc-unit.vue +++ b/ayanova/src/views/svc-unit.vue @@ -1049,7 +1049,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "unit-edit", params: { recordid: res.data.id, diff --git a/ayanova/src/views/svc-work-order-item-priorities-edit.vue b/ayanova/src/views/svc-work-order-item-priorities-edit.vue index 4dcaede0..78649249 100644 --- a/ayanova/src/views/svc-work-order-item-priorities-edit.vue +++ b/ayanova/src/views/svc-work-order-item-priorities-edit.vue @@ -283,7 +283,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "svc-work-order-item-priority-edit", params: { recordid: res.data.id, diff --git a/ayanova/src/views/svc-work-order-item-status-edit.vue b/ayanova/src/views/svc-work-order-item-status-edit.vue index 386f1685..7b2f30b0 100644 --- a/ayanova/src/views/svc-work-order-item-status-edit.vue +++ b/ayanova/src/views/svc-work-order-item-status-edit.vue @@ -296,7 +296,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "svc-work-order-status-edit", params: { recordid: res.data.id, diff --git a/ayanova/src/views/svc-work-order-status-edit.vue b/ayanova/src/views/svc-work-order-status-edit.vue index 745bdca1..dbadc2fb 100644 --- a/ayanova/src/views/svc-work-order-status-edit.vue +++ b/ayanova/src/views/svc-work-order-status-edit.vue @@ -344,7 +344,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "svc-work-order-status-edit", params: { recordid: res.data.id, diff --git a/ayanova/src/views/vendor.vue b/ayanova/src/views/vendor.vue index e4f89f3b..969d8523 100644 --- a/ayanova/src/views/vendor.vue +++ b/ayanova/src/views/vendor.vue @@ -833,7 +833,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "vendor-edit", params: { recordid: res.data.id, diff --git a/ayanova/src/views/widget.vue b/ayanova/src/views/widget.vue index f3bce879..799314cc 100644 --- a/ayanova/src/views/widget.vue +++ b/ayanova/src/views/widget.vue @@ -512,7 +512,7 @@ export default { //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() - this.$router.push({ + this.$router.replace({ name: "widget-edit", params: { recordid: res.data.id,