v1.7.0-rc1#19
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
getStationsAPI call inactions/cashier.tsto fetch stations along with their categories and foods, replacing the previous separate calls for categories and ingredients. The oldgetCategoriesfunction 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))CassaClient.tsxto use the newgetStationsfunction, 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:
ticketNumberandsource) 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:
'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)).env.exampleto 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:
openDrawerAPI function inactions/cashier.tsto 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.