Created attachment 189263 [details] [review] Bug 41214: Only show cash register if UseCashRegisters sys pref is enabled Test plan: 1) Add a new account: http://localhost:8081/cgi-bin/koha/sip2/accounts/add 2) Notice the 'cash register' field does not show 3) Enable UseCashRegisters sys pref 4) Repeat 1 (or edit an existing account). Refresh the page. 5) Notice the 'cash register' field now shows
Can we have a cypress test for this?
Created attachment 189322 [details] [review] Bug 41214: Add cypress test cypress run --spec t/cypress/integration/SIP2/Accounts.ts --config video=false,screenshotOnRunFailure=false
Created attachment 189695 [details] [review] Bug 41214: Convert hideIn to a callback to allow total removal of fields via syspref
Created attachment 189697 [details] [review] Bug 41214: Apply the same logic to table columns
Created attachment 189698 [details] [review] Bug 41214: Apply the same logic to table columns
Created attachment 189699 [details] [review] Bug 41214: Only show cash register if UseCashRegisters sys pref is enabled Test plan: 1) Add a new account: http://localhost:8081/cgi-bin/koha/sip2/accounts/add 2) Notice the 'cash register' field does not show 3) Enable UseCashRegisters sys pref 4) Repeat 1 (or edit an existing account). Refresh the page. 5) Notice the 'cash register' field now shows Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Created attachment 189700 [details] [review] Bug 41214: Add cypress test cypress run --spec t/cypress/integration/SIP2/Accounts.ts --config video=false,screenshotOnRunFailure=false Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Created attachment 189701 [details] [review] Bug 41214: Convert hideIn to a callback to allow total removal of fields via syspref Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Created attachment 189702 [details] [review] Bug 41214: Apply the same logic to table columns Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Thanks Matt for the follow-ups, that is a better approach here imo. I'm moving this to Signed-off with both mine and Matt's SO lines for the following reasons: 1) We both worked on this (and tested it) and we're both happy with the solution here. 2) It's a small patch with core VueJS framework changes i.e. make 'hideIn' be optionally used as a callback. Setting Joubu as QA contact as it makes sense. I'm happy to put it back to NSO if the above reasons are not enough for SO.
Created attachment 189902 [details] [review] Bug 41214: Only show cash register if UseCashRegisters sys pref is enabled Test plan: 1) Add a new account: http://localhost:8081/cgi-bin/koha/sip2/accounts/add 2) Notice the 'cash register' field does not show 3) Enable UseCashRegisters sys pref 4) Repeat 1 (or edit an existing account). Refresh the page. 5) Notice the 'cash register' field now shows Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 189903 [details] [review] Bug 41214: Add cypress test cypress run --spec t/cypress/integration/SIP2/Accounts.ts --config video=false,screenshotOnRunFailure=false Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 189904 [details] [review] Bug 41214: Convert hideIn to a callback to allow total removal of fields via syspref Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 189905 [details] [review] Bug 41214: Apply the same logic to table columns Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>