Skip to content

v1.7.0-rc1#19

Merged
BiancoGabry merged 17 commits into
mainfrom
development
May 20, 2026
Merged

v1.7.0-rc1#19
BiancoGabry merged 17 commits into
mainfrom
development

Conversation

@BiancoGabry
Copy link
Copy Markdown
Collaborator

This pull request introduces several improvements and new features to the cashier system, focusing on better order management, enhanced data loading, and increased configurability. The most significant changes include fetching stations with their associated categories and foods in a single call, improving real-time order updates, enforcing stricter validation for customer and payment method inputs, and adding new environment variables for configuration.

Data fetching and state management improvements:

  • Added a new getStations API call in actions/cashier.ts to fetch stations along with their categories and foods, replacing the previous separate calls for categories and ingredients. The old getCategories function is now deprecated. ([[1]](https://github.com/MySagra/mycassa/pull/19/files#diff-7e3a44d8c416d38509fc221d25f054aaa552ec6c50e7cc58ee0b1b8157460a64R64-R104), [[2]](https://github.com/MySagra/mycassa/pull/19/files#diff-a0d46c33d288b27e130ffb833617b0a7c71c486d08fd0c9b18f7f8bd27f333ffL10-R10))
  • Updated CassaClient.tsx to use the new getStations function, refactored state initialization for payment method, cash register, and stations mapping, and improved the loading and sorting of categories, foods, and ingredients. ([[1]](https://github.com/MySagra/mycassa/pull/19/files#diff-a0d46c33d288b27e130ffb833617b0a7c71c486d08fd0c9b18f7f8bd27f333ffL10-R10), [[2]](https://github.com/MySagra/mycassa/pull/19/files#diff-a0d46c33d288b27e130ffb833617b0a7c71c486d08fd0c9b18f7f8bd27f333ffL48-R48), [[3]](https://github.com/MySagra/mycassa/pull/19/files#diff-a0d46c33d288b27e130ffb833617b0a7c71c486d08fd0c9b18f7f8bd27f333ffR66-R73), [[4]](https://github.com/MySagra/mycassa/pull/19/files#diff-a0d46c33d288b27e130ffb833617b0a7c71c486d08fd0c9b18f7f8bd27f333ffR113), [[5]](https://github.com/MySagra/mycassa/pull/19/files#diff-a0d46c33d288b27e130ffb833617b0a7c71c486d08fd0c9b18f7f8bd27f333ffL135-R142), [[6]](https://github.com/MySagra/mycassa/pull/19/files#diff-a0d46c33d288b27e130ffb833617b0a7c71c486d08fd0c9b18f7f8bd27f333ffL147-R212))

Order processing and real-time updates:

  • Enhanced real-time order handling by ensuring that new and confirmed orders fetch full details (including ticketNumber and source) before updating the order list, improving the accuracy and completeness of order information shown in the UI. ([[1]](https://github.com/MySagra/mycassa/pull/19/files#diff-a0d46c33d288b27e130ffb833617b0a7c71c486d08fd0c9b18f7f8bd27f333ffL280-R294), [[2]](https://github.com/MySagra/mycassa/pull/19/files#diff-a0d46c33d288b27e130ffb833617b0a7c71c486d08fd0c9b18f7f8bd27f333ffL290-R333), [[3]](https://github.com/MySagra/mycassa/pull/19/files#diff-a0d46c33d288b27e130ffb833617b0a7c71c486d08fd0c9b18f7f8bd27f333ffL305-R384))

Validation and configurability:

  • Added validation to enforce payment method selection and, based on configuration, require customer input before confirming an order. The customer value is now conditionally set to 'NO CUSTOMER' if not required and left blank. ([[1]](https://github.com/MySagra/mycassa/pull/19/files#diff-a0d46c33d288b27e130ffb833617b0a7c71c486d08fd0c9b18f7f8bd27f333ffL28-R28), [[2]](https://github.com/MySagra/mycassa/pull/19/files#diff-a0d46c33d288b27e130ffb833617b0a7c71c486d08fd0c9b18f7f8bd27f333ffR963-R976), [[3]](https://github.com/MySagra/mycassa/pull/19/files#diff-a0d46c33d288b27e130ffb833617b0a7c71c486d08fd0c9b18f7f8bd27f333ffR1021), [[4]](https://github.com/MySagra/mycassa/pull/19/files#diff-a0d46c33d288b27e130ffb833617b0a7c71c486d08fd0c9b18f7f8bd27f333ffL979-R1044))
  • Introduced new environment variables in .env.example to control whether ticket numbers are displayed instead of order codes and whether customer input is required. ([.env.exampleR10-R15](https://github.com/MySagra/mycassa/pull/19/files#diff-a3046da0d15a27e89f2afe639b25748a7ad4d9290af3e7b1b6c1a5533c8f0a8cR10-R15))

New API functionality:

  • Added an openDrawer API function in actions/cashier.ts to allow opening the cash drawer from the UI. ([actions/cashier.tsR671-R699](https://github.com/MySagra/mycassa/pull/19/files#diff-7e3a44d8c416d38509fc221d25f054aaa552ec6c50e7cc58ee0b1b8157460a64R671-R699))

These changes collectively improve the cashier's workflow, data accuracy, and configurability, while also laying the groundwork for future enhancements.

@BiancoGabry BiancoGabry merged commit 16db51f into main May 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants