Bugzilla – Attachment 192897 Details for
Bug 10190
Overdue notice triggers based on item type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10190: feat: trigger add/edit form UI/UX enhancements
Bug-10190-feat-trigger-addedit-form-UIUX-enhanceme.patch (text/plain), 5.50 KB, created by
Chloé Zermatten
on 2026-02-10 13:08:58 UTC
(
hide
)
Description:
Bug 10190: feat: trigger add/edit form UI/UX enhancements
Filename:
MIME Type:
Creator:
Chloé Zermatten
Created:
2026-02-10 13:08:58 UTC
Size:
5.50 KB
patch
obsolete
>From 9f8dfb6249144b3b8bed31e76fc4baf7bc7166d6 Mon Sep 17 00:00:00 2001 >From: Chloe Zermatten <chloe.zermatten@openfifth.co.uk> >Date: Fri, 6 Feb 2026 17:50:50 +0000 >Subject: [PATCH] Bug 10190: feat: trigger add/edit form UI/UX enhancements >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >- scroll to the add/edit form on button click >Â Â Â Â - prevent redundant full page reload upon the user swapping between adding and editing while the modal is open >Â Â Â Â - ensure robust scroll behaviour, handling: >Â Â Â Â Â Â Â Â Â Â - the URL being accessed directly >Â Â Â Â Â Â Â Â Â Â - the edit button in the table in the main page being used to access the form directly >Â Â Â Â Â Â Â Â Â Â - the stepper workflow being used >Â Â Â Â Â Â Â Â Â Â - the user swapping between add and edit once already looking at the form >- dynamic display of 'Transport Type' consistency: only show if a 'Notice' has been selected >- if a notice has been selected, prevent form submission if transport type isn't set and display an alert on submission attempt >--- > .../CirculationTriggersFormAdd.vue | 44 +++++++++++++++---- > 1 file changed, 35 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/CirculationTriggersFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/CirculationTriggersFormAdd.vue >index 48a01e6f83f..7cb9efb70df 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/CirculationTriggersFormAdd.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/CirculationTriggersFormAdd.vue >@@ -134,6 +134,7 @@ > (ruleSetInitialized && editMode === 'edit') || > editMode === 'add' > " >+ id="trigger-edit-form-general-section" > > > <legend v-if="editMode === 'add'"> > {{ $__("Add new trigger") }} >@@ -285,6 +286,7 @@ > (ruleSetInitialized && editMode === 'edit') || > editMode === 'add' > " >+ id="trigger-edit-form-notice-section" > > > <legend v-if="ruleSetInfo.triggerCount < triggerNumber"> > {{ $__("Notice for trigger") }} >@@ -341,16 +343,13 @@ > v-if=" > ruleSetToSubmit[ > `overdue_${triggerNumber}_notice` >- ] !== '' || >- ((ruleSetToSubmit[ >+ ] !== '' && >+ ruleSetToSubmit[ > `overdue_${triggerNumber}_notice` >- ] === null || >- ruleSetToSubmit[ >- `overdue_${triggerNumber}_notice` >- ] === undefined) && >- fallbackRuleSet?.[ >- `overdue_${triggerNumber}_notice` >- ] !== '') >+ ] !== null && >+ ruleSetToSubmit[ >+ `overdue_${triggerNumber}_notice` >+ ] !== undefined > " > > > <label for="mtt">{{ $__("Transport type(s)") }}:</label> >@@ -386,6 +385,11 @@ > ] > : '' > " >+ :required=" >+ !ruleSetToSubmit[ >+ `overdue_${triggerNumber}_mtt` >+ ]?.length >+ " > /> > </template> > </v-select> >@@ -861,6 +865,20 @@ export default { > this.ruleSetToSubmit[`overdue_${this.triggerNumber}_delay`] = null; > this.setAllowSubmission(); > }, >+ async scrollToTriggerEditForm() { >+ let count = 0; >+ // ensures that the relevant section is loaded before we attempt to scroll it into view >+ while ( >+ !document.getElementById("trigger-edit-form-general-section") && >+ count < 8 >+ ) { >+ await new Promise(resolve => setTimeout(resolve, 250)); >+ count++; >+ } >+ document >+ .getElementById("trigger-edit-form-general-section") >+ .scrollIntoView({ behavior: "smooth" }); >+ }, > }, > watch: { > $route: { >@@ -868,6 +886,8 @@ export default { > handler: function (newVal, oldVal) { > if ( > oldVal && >+ !oldVal.fullPath.includes("add") && >+ !oldVal.fullPath.includes("edit") && > oldVal.query.triggerNumber && > newVal.query.triggerNumber !== oldVal.query.triggerNumber > ) { >@@ -875,6 +895,12 @@ export default { > } > }, > }, >+ async editMode(newValue) { >+ if (newValue === "add" || newValue === "edit") { >+ await this.$nextTick(); >+ await this.scrollToTriggerEditForm(); >+ } >+ }, > }, > components: { TriggersTable, ButtonSubmit, TriggerContext }, > }; >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10190
:
170357
|
170358
|
170359
|
170360
|
170361
|
170362
|
170363
|
170364
|
170365
|
170366
|
170367
|
170368
|
170369
|
170370
|
170371
|
170372
|
170373
|
170374
|
170375
|
170376
|
170380
|
170449
|
171727
|
171728
|
171729
|
171730
|
171731
|
171732
|
171733
|
171734
|
171735
|
171736
|
171737
|
171738
|
171739
|
171740
|
171741
|
171742
|
171743
|
171744
|
171745
|
171746
|
171747
|
171748
|
171749
|
171750
|
171751
|
171752
|
171753
|
171754
|
171755
|
172588
|
172589
|
172590
|
172591
|
172592
|
172593
|
172594
|
172595
|
172596
|
172597
|
172598
|
172599
|
172600
|
172601
|
172602
|
172603
|
172604
|
172605
|
172606
|
172607
|
172608
|
172609
|
172612
|
172614
|
172617
|
172619
|
172621
|
172622
|
172623
|
172624
|
172625
|
172626
|
172630
|
172631
|
172632
|
172633
|
172634
|
172635
|
172636
|
172637
|
172638
|
172639
|
172640
|
172641
|
172642
|
172643
|
172644
|
172645
|
172646
|
172647
|
172648
|
172649
|
172650
|
172651
|
172652
|
172653
|
172654
|
172655
|
172656
|
172657
|
172658
|
172659
|
172660
|
172661
|
172662
|
172663
|
178643
|
178644
|
178645
|
178646
|
178647
|
178648
|
178649
|
178650
|
178651
|
178652
|
178653
|
178654
|
178655
|
178656
|
178657
|
178658
|
178659
|
178660
|
178661
|
178662
|
178663
|
178664
|
178665
|
178666
|
178667
|
178668
|
178669
|
178670
|
178671
|
178672
|
178673
|
178674
|
178675
|
188075
|
188076
|
188077
|
188078
|
188079
|
188080
|
188081
|
188082
|
188083
|
188084
|
188085
|
188086
|
188087
|
188088
|
188476
|
189345
|
189863
|
189864
|
189865
|
189866
|
189867
|
189868
|
191749
|
191750
|
191751
|
191752
|
191753
|
191754
|
191755
|
191756
|
191757
|
191758
|
191759
|
191760
|
191761
|
191762
|
191763
|
191795
|
191796
|
191805
|
191854
|
191873
|
192871
|
192872
|
192873
|
192874
|
192875
|
192876
|
192877
|
192878
|
192879
|
192880
|
192881
|
192882
|
192883
|
192884
|
192885
|
192886
|
192887
|
192888
|
192889
|
192890
|
192891
|
192892
|
192893
|
192894
|
192895
|
192896
| 192897 |
192898
|
192899