vouchers-input-selection (#75)
Some checks failed
release / docker (push) Has been cancelled
Some checks failed
release / docker (push) Has been cancelled
- Update the NEXT and PREV input selectors on the vouchers list - Have the INCMPs before LOAD/RELOADs to prevent navigation inputs being passed to handler functions Reviewed-on: #75 Reviewed-by: Mohamed Sohail <kamikazechaser@noreply.localhost> Co-authored-by: alfred-mk <alfredmwaik@gmail.com> Co-committed-by: alfred-mk <alfredmwaik@gmail.com>
This commit is contained in:
parent
e914d059e2
commit
d03c0c4c0e
@ -2181,10 +2181,6 @@ func (h *MenuHandlers) ViewVoucher(ctx context.Context, sym string, input []byte
|
|||||||
flag_incorrect_voucher, _ := h.flagManager.GetFlag("flag_incorrect_voucher")
|
flag_incorrect_voucher, _ := h.flagManager.GetFlag("flag_incorrect_voucher")
|
||||||
|
|
||||||
inputStr := string(input)
|
inputStr := string(input)
|
||||||
if inputStr == "0" || inputStr == "99" {
|
|
||||||
res.FlagReset = append(res.FlagReset, flag_incorrect_voucher)
|
|
||||||
return res, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
metadata, err := store.GetVoucherData(ctx, h.userdataStore, sessionId, inputStr)
|
metadata, err := store.GetVoucherData(ctx, h.userdataStore, sessionId, inputStr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -3,14 +3,14 @@ LOAD get_vouchers 0
|
|||||||
MAP get_vouchers
|
MAP get_vouchers
|
||||||
MOUT back 0
|
MOUT back 0
|
||||||
MOUT quit 99
|
MOUT quit 99
|
||||||
MNEXT next 11
|
MNEXT next 88
|
||||||
MPREV prev 22
|
MPREV prev 98
|
||||||
HALT
|
HALT
|
||||||
|
INCMP > 88
|
||||||
|
INCMP < 98
|
||||||
|
INCMP _ 0
|
||||||
|
INCMP quit 99
|
||||||
LOAD view_voucher 80
|
LOAD view_voucher 80
|
||||||
RELOAD view_voucher
|
RELOAD view_voucher
|
||||||
CATCH . flag_incorrect_voucher 1
|
CATCH . flag_incorrect_voucher 1
|
||||||
INCMP _ 0
|
|
||||||
INCMP quit 99
|
|
||||||
INCMP > 11
|
|
||||||
INCMP < 22
|
|
||||||
INCMP view_voucher *
|
INCMP view_voucher *
|
||||||
|
Loading…
Reference in New Issue
Block a user