🎟️ Added selection to show display code or ticket number - #4
Merged
Conversation
… limit value to numbers to show
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 a new "number display" configuration, allowing the app to show either the order's display code or its ticket number (optionally modulo a maximum value) throughout the display and manager UIs. The changes ensure that both the display and manager views respect this setting, which is persisted in local storage and configurable via the settings page.
Display and order label logic:
numberDisplaysetting (either"displayCode"or"ticketNumber") and an optionalticketNumberMaxvalue, which controls whether ticket numbers are shown as-is or modulo a maximum. This logic is now used in all order cards on the main display and manager screens. [1] [2] [3] [4] [5]Configuration and persistence:
app/api/display-config/route.ts) to accept and update the newnumberDisplayandticketNumberMaxfields. [1] [2]Settings UI:
NumberDisplaySettingsCardcomponent to the settings page, allowing users to configure how order numbers are displayed and set the maximum value for ticket numbers. [1] [2]Prop and interface updates:
DisplaySectioncomponent and its usage to accept agetOrderLabelprop, centralizing the logic for determining the label shown on order cards. [1] [2] [3]Imports and type usage:
These changes collectively introduce a flexible and user-configurable way to display order identifiers, improving the adaptability of the app for different workflows and preferences.