Bug 27289 - Template tweaks for point of sale page
Summary: Template tweaks for point of sale page
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 27256
Blocks: 27290
  Show dependency treegraph
 
Reported: 2020-12-21 13:21 UTC by Owen Leonard
Modified: 2021-06-14 21:34 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.03


Attachments
Bug 27289: Template tweaks for point of sale page (4.82 KB, patch)
2020-12-21 14:05 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27289: Template tweaks for point of sale page (4.88 KB, patch)
2020-12-31 12:06 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27289: Template tweaks for point of sale page (4.88 KB, patch)
2021-02-05 11:14 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27289: (follow-up) Update payment type too. (2.30 KB, patch)
2021-02-05 11:14 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27289: Template tweaks for point of sale page (4.94 KB, patch)
2021-02-07 12:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27289: (follow-up) Update payment type too. (2.36 KB, patch)
2021-02-07 12:15 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2020-12-21 13:21:53 UTC
I have a couple of minor updates for the point of sale page:

- buttons inside tables should use "btn-xs" to be a consistent size
- required fields in the "Collect payment" form should be styled as required
Comment 1 Owen Leonard 2020-12-21 14:05:40 UTC
Created attachment 114557 [details] [review]
Bug 27289: Template tweaks for point of sale page

This patch makes a couple of minor changes to the point of sale page in
order to make it consistent with other pages in the staff interface:

- Buttons inside table cells should have the "btn-xs" class.
- Required fields should have a "required" class and should have a
  "Required" label.

Also changed: Replaced <input type="number"> according to coding
guidelines.

To test, apply the patch and enable the EnablePointOfSale and
UseCashRegisters system preferences if necessary.

- On the Point of Sale page, add some items to purchase. Confirm that
  the "Add" buttons in the "Items for purchase" table and the "Remove"
  buttons in the "This sale" table are correctly sized.

- In the "Collect payment" form, confirm that "Amount tendered" and
  "Cash register" fields are styled red with "Required" text after them.
- Confirm that the "Amount tendered" field will only accept numeric
  input.
Comment 2 Martin Renvoize 2020-12-31 12:06:46 UTC
Created attachment 114756 [details] [review]
Bug 27289: Template tweaks for point of sale page

This patch makes a couple of minor changes to the point of sale page in
order to make it consistent with other pages in the staff interface:

- Buttons inside table cells should have the "btn-xs" class.
- Required fields should have a "required" class and should have a
  "Required" label.

Also changed: Replaced <input type="number"> according to coding
guidelines.

To test, apply the patch and enable the EnablePointOfSale and
UseCashRegisters system preferences if necessary.

- On the Point of Sale page, add some items to purchase. Confirm that
  the "Add" buttons in the "Items for purchase" table and the "Remove"
  buttons in the "This sale" table are correctly sized.

- In the "Collect payment" form, confirm that "Amount tendered" and
  "Cash register" fields are styled red with "Required" text after them.
- Confirm that the "Amount tendered" field will only accept numeric
  input.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize 2020-12-31 12:07:36 UTC
Seems we were working on similar things around the same time..

Thanks for the fixes here.. they look good.. Signing off.
Comment 4 Katrin Fischer 2021-01-10 21:30:27 UTC
I have a small issue here: The "required" fields now trigger their warning as soon as you add an item to the tab and before "Confirm" is hit cluttering up the page some. Could we move the check to trigger once you try to confirm?
Comment 5 Martin Renvoize 2021-01-11 10:53:36 UTC
Bug 27289 should certainly come into play for the above I think... are you happy to continue here Owen?
Comment 6 Martin Renvoize 2021-02-05 10:57:32 UTC
(In reply to Katrin Fischer from comment #4)
> I have a small issue here: The "required" fields now trigger their warning
> as soon as you add an item to the tab and before "Confirm" is hit cluttering
> up the page some. Could we move the check to trigger once you try to confirm?

This has always triggered.. I just double checked against master.. that changes here don't affect this.
Comment 7 Martin Renvoize 2021-02-05 11:14:02 UTC
Created attachment 116387 [details] [review]
Bug 27289: Template tweaks for point of sale page

This patch makes a couple of minor changes to the point of sale page in
order to make it consistent with other pages in the staff interface:

- Buttons inside table cells should have the "btn-xs" class.
- Required fields should have a "required" class and should have a
  "Required" label.

Also changed: Replaced <input type="number"> according to coding
guidelines.

To test, apply the patch and enable the EnablePointOfSale and
UseCashRegisters system preferences if necessary.

- On the Point of Sale page, add some items to purchase. Confirm that
  the "Add" buttons in the "Items for purchase" table and the "Remove"
  buttons in the "This sale" table are correctly sized.

- In the "Collect payment" form, confirm that "Amount tendered" and
  "Cash register" fields are styled red with "Required" text after them.
- Confirm that the "Amount tendered" field will only accept numeric
  input.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize 2021-02-05 11:14:05 UTC
Created attachment 116388 [details] [review]
Bug 27289: (follow-up) Update payment type too.

The payment type field is also required when using cash registers, this
patch updates the formatting to work as expected in that case too.
Comment 9 Martin Renvoize 2021-02-05 11:15:50 UTC
I've added a follow-up to also set the proper display for payment type, which is also a required field.

As for the validation, it is dealt with in the blocked bug.. I now remove the call to valid as requested here.. but do it when handling other validation issues in that pre-existing bug.
Comment 10 Katrin Fischer 2021-02-07 12:13:36 UTC
I just feel that: 

This field is required. Required 

is a little much to see it all the time :) The doubled up text has not been present before this patch and I think is what Owen was contemplating on bug 27427 that we should try to move forward.
Comment 11 Katrin Fischer 2021-02-07 12:15:01 UTC
Created attachment 116469 [details] [review]
Bug 27289: Template tweaks for point of sale page

This patch makes a couple of minor changes to the point of sale page in
order to make it consistent with other pages in the staff interface:

- Buttons inside table cells should have the "btn-xs" class.
- Required fields should have a "required" class and should have a
  "Required" label.

Also changed: Replaced <input type="number"> according to coding
guidelines.

To test, apply the patch and enable the EnablePointOfSale and
UseCashRegisters system preferences if necessary.

- On the Point of Sale page, add some items to purchase. Confirm that
  the "Add" buttons in the "Items for purchase" table and the "Remove"
  buttons in the "This sale" table are correctly sized.

- In the "Collect payment" form, confirm that "Amount tendered" and
  "Cash register" fields are styled red with "Required" text after them.
- Confirm that the "Amount tendered" field will only accept numeric
  input.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2021-02-07 12:15:04 UTC
Created attachment 116470 [details] [review]
Bug 27289: (follow-up) Update payment type too.

The payment type field is also required when using cash registers, this
patch updates the formatting to work as expected in that case too.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Katrin Fischer 2021-02-07 12:16:41 UTC
Hm, looking at this on master again - payment type is required, but cannot be unset.. so do we need to mark it in red?
Comment 14 Jonathan Druart 2021-02-08 13:57:32 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 15 Fridolin Somers 2021-02-12 13:11:12 UTC
Pushed to 20.11.x for 20.11.03

In odrer to push Bug 27290
Comment 16 Andrew Fuerste-Henry 2021-02-17 20:38:11 UTC
Doesn't apply cleanly to 20.05. Please rebase so I can push bug 27290
Comment 17 Martin Renvoize 2021-02-18 15:29:22 UTC
(In reply to Andrew Fuerste-Henry from comment #16)
> Doesn't apply cleanly to 20.05. Please rebase so I can push bug 27290

Hmm, Not sure it's required to go back that far?