Created attachment 164769 [details] Screen recording showing the menu interaction I'm proposing a change to the staff interface's user dropdown menu so that one can set their library, desk, and register right from the dropdown menu. See the attached gif.
Big +1 from me.
+2 :)
Created attachment 164895 [details] [review] Bug 36582: Add option to set library, desk, and register from user menu This patch adds an expandable "panel" in the user dropdown menu in the staff client. Expanding the panel will load the form from set-library.pl, including library, desk and register options if present. The patch moves the contents of desk_selection.js and register_selection.js into staff-global.js so that the functionality is available on every page. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). Test plan stolen from Bug 36572: 1. Have 3 staff accounts to test: -STAFF A: superlibrarian -STAFF B: loggedinlibrary permission -STAFF C: no loggedinlibrary or superlibrarian permission 2. Enable 'UseCirculationDesks' and create some desks. (Admin > Circulation desks) 3. Enable 'UseCashRegisters' and create some registers ( Admin > Cash registers) 4. Use STAFF A ( superlibrarian ) and make sure you can change branch, desk and register. 5. Use STAFF B ( loggedinlibrary permission ) and make sure you can change branch, desk and register. 6. Use STAFF C ( no loggedinlibrary or superlibrarian permission ) and make sure you can change branch, desk and register. 7. Each time you change you should be redirected to the page you were previously on. 8. Turn off UseCirculationDesks, make sure everything still works. 9. Turn off UseCashRegisters, make sure everthing still works.
This is technically BLOCKED but I thought I'd get eyes on it since it's otherwise ready.
Nice
Created attachment 165261 [details] [review] Bug 36582: Add option to set library, desk, and register from user menu This patch adds an expandable "panel" in the user dropdown menu in the staff client. Expanding the panel will load the form from set-library.pl, including library, desk and register options if present. The patch moves the contents of desk_selection.js and register_selection.js into staff-global.js so that the functionality is available on every page. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). Test plan stolen from Bug 36572: 1. Have 3 staff accounts to test: -STAFF A: superlibrarian -STAFF B: loggedinlibrary permission -STAFF C: no loggedinlibrary or superlibrarian permission 2. Enable 'UseCirculationDesks' and create some desks. (Admin > Circulation desks) 3. Enable 'UseCashRegisters' and create some registers ( Admin > Cash registers) 4. Use STAFF A ( superlibrarian ) and make sure you can change branch, desk and register. 5. Use STAFF B ( loggedinlibrary permission ) and make sure you can change branch, desk and register. 6. Use STAFF C ( no loggedinlibrary or superlibrarian permission ) and make sure you can change branch, desk and register. 7. Each time you change you should be redirected to the page you were previously on. 8. Turn off UseCirculationDesks, make sure everything still works. 9. Turn off UseCashRegisters, make sure everthing still works.
Created attachment 165377 [details] [review] Bug 36582: Add option to set library, desk, and register from user menu This patch adds an expandable "panel" in the user dropdown menu in the staff client. Expanding the panel will load the form from set-library.pl, including library, desk and register options if present. The patch moves the contents of desk_selection.js and register_selection.js into staff-global.js so that the functionality is available on every page. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). Test plan stolen from Bug 36572: 1. Have 3 staff accounts to test: -STAFF A: superlibrarian -STAFF B: loggedinlibrary permission -STAFF C: no loggedinlibrary or superlibrarian permission 2. Enable 'UseCirculationDesks' and create some desks. (Admin > Circulation desks) 3. Enable 'UseCashRegisters' and create some registers ( Admin > Cash registers) 4. Use STAFF A ( superlibrarian ) and make sure you can change branch, desk and register. 5. Use STAFF B ( loggedinlibrary permission ) and make sure you can change branch, desk and register. 6. Use STAFF C ( no loggedinlibrary or superlibrarian permission ) and make sure you can change branch, desk and register. 7. Each time you change you should be redirected to the page you were previously on. 8. Turn off UseCirculationDesks, make sure everything still works. 9. Turn off UseCashRegisters, make sure everthing still works.
Not a blocker but a question. If I log in as STAFF C ( not a superlibrarian and no logged in library permission ) I don't see the gear icon for switching desk/register but if I visit circ/set-library.pl I can set either my desk or register. Is this the intended behavior?
Yes the logic needs to be a little more complex.
The interface for this is a big improvement. Nice! I think there is a currently a small bug in the register_selection.js that needs to be fixed for this to work. With this patch applied it's possible to set your cash register to one that is not associated with the branch that is selected. To reproduce: 1. Create a few circulation desks and cash registers 2. Set your circulation desk and cash register for library A 3. Return to the set library page and choose library B 4. Notice the cash registers options have updated for library B but the default selected cash register did not change 5. Clicking submit sets the cash register to one that should not be available for library A
Created attachment 165573 [details] [review] Bug 36582: Add option to set library, desk, and register from user menu This patch adds an expandable "panel" in the user dropdown menu in the staff client. Expanding the panel will load the form from set-library.pl, including library, desk and register options if present. The patch moves the contents of desk_selection.js and register_selection.js into staff-global.js so that the functionality is available on every page. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). Test plan stolen from Bug 36572: 1. Have 3 staff accounts to test: -STAFF A: superlibrarian -STAFF B: loggedinlibrary permission -STAFF C: no loggedinlibrary or superlibrarian permission 2. Enable 'UseCirculationDesks' and create some desks. (Admin > Circulation desks) 3. Enable 'UseCashRegisters' and create some registers ( Admin > Cash registers) 4. Use STAFF A ( superlibrarian ) and make sure you can change branch, desk and register. 5. Use STAFF B ( loggedinlibrary permission ) and make sure you can change branch, desk and register. 6. Use STAFF C ( no loggedinlibrary or superlibrarian permission ) and make sure you can change branch, desk and register. 7. Each time you change you should be redirected to the page you were previously on. 8. Turn off UseCirculationDesks, make sure everything still works. 9. Turn off UseCashRegisters, make sure everthing still works.