Bug 34497 - Vue - Dialog component should allow for confirmation input options
Summary: Vue - Dialog component should allow for confirmation input options
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: ERM (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Pedro Amorim
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks: 34587 35120
  Show dependency treegraph
 
Reported: 2023-08-08 16:07 UTC by Pedro Amorim
Modified: 2024-07-04 20:37 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00
Circulation function:


Attachments
Bug 34497: Dialog component should allow for optional input options on confirmation modal (5.85 KB, patch)
2023-08-08 16:08 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 34497: [DO NOT PUSH] Test patch only (2.32 KB, patch)
2023-08-09 08:39 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 34497: Dialog component should allow for optional input options on confirmation modal (5.89 KB, patch)
2023-08-09 15:51 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 34497: [DO NOT PUSH] Test patch only (2.32 KB, patch)
2023-08-09 15:51 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 34497: Dialog component should allow for optional input options on confirmation modal (5.89 KB, patch)
2023-10-20 14:00 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 34497: [DO NOT PUSH] Test patch only (2.32 KB, patch)
2023-10-20 14:00 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 34497: Dialog component should allow for optional input options on confirmation modal (6.01 KB, patch)
2023-10-20 14:03 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 34497: [DO NOT PUSH] Test patch only (2.44 KB, patch)
2023-10-20 14:03 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 34497: Fix required text field (1.55 KB, patch)
2023-10-20 14:35 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 34497: (QA follow-up):Fix required text field (1.62 KB, patch)
2023-10-20 14:40 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 34497: Dialog component should allow for optional input options on confirmation modal (6.09 KB, patch)
2023-10-20 14:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34497: (QA follow-up):Fix required text field (1.69 KB, patch)
2023-10-20 14:48 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2023-08-08 16:07:16 UTC

    
Comment 1 Pedro Amorim 2023-08-08 16:08:16 UTC
Created attachment 154319 [details] [review]
Bug 34497: Dialog component should allow for optional input options on confirmation modal

Currently supports 'Text' or 'Date' inputs
Comment 2 Pedro Amorim 2023-08-08 16:08:47 UTC
Currently missing cypress tests for this.
Comment 3 Pedro Amorim 2023-08-09 08:31:17 UTC
(In reply to Pedro Amorim from comment #2)
> Currently missing cypress tests for this.

Cypress tests will come in the ERM sushi submission, where the code that makes use of this exists.
Coming up with a test patch for this.
Comment 4 Pedro Amorim 2023-08-09 08:39:32 UTC
Created attachment 154329 [details] [review]
Bug 34497: [DO NOT PUSH] Test patch only

Test plan (Apply both patches, including TEST PATCH):
1) Go to ERM /cgi-bin/koha/erm/agreements
2) Add a new agreement, with whatever values
3) Go back to agreements list, click 'delete' on that agreement
4) Verify the confirmation dialog now shows 2 inputs from the test patch
5) Change the values in the inputs and confirm the dialog
6) Notice that not only the agreement gets deleted, but console now shows the values submitted
7) Bonus: Test both Text and Date input types and required: true or false
Comment 5 Pedro Amorim 2023-08-09 15:51:16 UTC
Created attachment 154332 [details] [review]
Bug 34497: Dialog component should allow for optional input options on confirmation modal

Currently supports 'Text' or 'Date' inputs
Comment 6 Pedro Amorim 2023-08-09 15:51:19 UTC
Created attachment 154333 [details] [review]
Bug 34497: [DO NOT PUSH] Test patch only

Test plan (Apply both patches, including TEST PATCH):
1) Go to ERM /cgi-bin/koha/erm/agreements
2) Add a new agreement, with whatever values
3) Go back to agreements list, click 'delete' on that agreement
4) Verify the confirmation dialog now shows 2 inputs from the test patch
5) Change the values in the inputs and confirm the dialog
6) Notice that not only the agreement gets deleted, but console now shows the values submitted
7) Bonus: Test both Text and Date input types and required: true or false
Comment 7 Martin Renvoize (ashimema) 2023-10-20 14:00:41 UTC
Created attachment 157519 [details] [review]
Bug 34497: Dialog component should allow for optional input options on confirmation modal

Currently supports 'Text' or 'Date' inputs
Comment 8 Martin Renvoize (ashimema) 2023-10-20 14:00:43 UTC
Created attachment 157520 [details] [review]
Bug 34497: [DO NOT PUSH] Test patch only

Test plan (Apply both patches, including TEST PATCH):
1) Go to ERM /cgi-bin/koha/erm/agreements
2) Add a new agreement, with whatever values
3) Go back to agreements list, click 'delete' on that agreement
4) Verify the confirmation dialog now shows 2 inputs from the test patch
5) Change the values in the inputs and confirm the dialog
6) Notice that not only the agreement gets deleted, but console now shows the values submitted
7) Bonus: Test both Text and Date input types and required: true or false
Comment 9 Martin Renvoize (ashimema) 2023-10-20 14:01:13 UTC
Looks good to me.. adding my signoff to keep it moving along.
Comment 10 Martin Renvoize (ashimema) 2023-10-20 14:03:14 UTC
Created attachment 157521 [details] [review]
Bug 34497: Dialog component should allow for optional input options on confirmation modal

Currently supports 'Text' or 'Date' inputs

Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Martin Renvoize (ashimema) 2023-10-20 14:03:16 UTC
Created attachment 157522 [details] [review]
Bug 34497: [DO NOT PUSH] Test patch only

Test plan (Apply both patches, including TEST PATCH):
1) Go to ERM /cgi-bin/koha/erm/agreements
2) Add a new agreement, with whatever values
3) Go back to agreements list, click 'delete' on that agreement
4) Verify the confirmation dialog now shows 2 inputs from the test patch
5) Change the values in the inputs and confirm the dialog
6) Notice that not only the agreement gets deleted, but console now shows the values submitted
7) Bonus: Test both Text and Date input types and required: true or false

Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Jonathan Druart 2023-10-20 14:19:11 UTC
"required" does not work.

-                    input => input.required && input.value == null
+                    input => input.required && input.value == ""

Works for input, but still not working for dates.
Comment 13 Pedro Amorim 2023-10-20 14:35:58 UTC Comment hidden (obsolete)
Comment 14 Pedro Amorim 2023-10-20 14:40:20 UTC
Created attachment 157530 [details] [review]
Bug 34497: (QA follow-up):Fix required text field

input.value can be either null (if flatpickr date field empty) or '' (if simple text input empty),
so account for both situations.
Add missing 'required' attribute to text inputs.
Comment 15 Jonathan Druart 2023-10-20 14:48:30 UTC
Created attachment 157531 [details] [review]
Bug 34497: Dialog component should allow for optional input options on confirmation modal

Currently supports 'Text' or 'Date' inputs

Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 16 Jonathan Druart 2023-10-20 14:48:33 UTC
Created attachment 157532 [details] [review]
Bug 34497: (QA follow-up):Fix required text field

input.value can be either null (if flatpickr date field empty) or '' (if simple text input empty),
so account for both situations.
Add missing 'required' attribute to text inputs.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 17 Tomás Cohen Arazi (tcohen) 2023-10-25 14:49:14 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 18 Fridolin Somers 2023-10-26 08:37:29 UTC
Enhancement not pushed to 23.05.x