Holiday front end - #1697
Open
tkakar0451 wants to merge 228 commits into
Open
Conversation
Currently read-only. Uses fake data, as the Weeks API is not yet implemented.
… in navbar to "Patterns - Weekly"
…rontend into edit-conversions
Signed-off-by: PRINCESANCHEZ <princesanchez72@gmail.com>
…wPage merge backend
* CRUD operations working with back-end * client-side validation * delete confirmation * Spanish and French translations
Omit `id` from the default week values model
docker-compose should not be ignored and should not have to be altered for our time-varying conversion work
…/hook_conversion_to_backend
…on conflict Signed-off-by: PRINCESANCHEZ <princesanchez72@gmail.com>
…to select the holiday instance group page
- holidaysApi: read-only queries for base holidays (Rose's page owns mutations) - holidayInstancesApi: queries + add/edit/delete mutations matching Hugo's server routes (/api/holidayInstances) - New wire types in types/redux/holidays.ts matching server response shapes - Register Holidays and HolidayInstances tag types in baseApi
…nce page branch # Conflicts: # src/server/models/ConversionSegment.js # src/server/models/DaySegment.js # src/server/routes/daySegments.js
The merge kept a leftover block from the old instance-method version (const earlierSegment = this) inside Hugo's newer static method, causing a duplicate declaration. The static version already inserts the earlier segment correctly.
Replace the three DATA SEAM mock hooks with adapter hooks over holidaysApi, daysApi (existing day patterns slice), and holidayInstancesApi. Adapters map internal field names to wire names (instanceName/name, baseHolidayId/holidayId, patternId/dayPatternId). Edit resends the unchanged holidayId since the route requires it. Mutations follow the OED unwrap + success/error notification pattern (strings via STRINGS pending i18n).
The page's queries hit admin-only routes; outside the guard the page mounted before token verification and its requests fired without the auth token (403).
- Clip card names at 15 chars (notes stay at 30) - Rename modal field label to 'Holiday Day Name' - Warn (non-blocking, text-warning) when the base holiday changes after a name was entered - Replace STRINGS object with translate() calls via useTranslate; reuse existing keys (cancel, note, discard.changes, unsaved.warning) and add holiday.* / day.pattern.* keys to translations/data.ts for en/fr/es with lightning-bolt placeholders on untranslated entries
Used date-holidays to load reginal holiday to the db and made them duplicate safe.
…o Jason-Holiday-Branch
…ent it. Load and saving data to database
…s working. Filters Holiday rates based on location.
- Alphabetize the three holiday entries in the Pages menu - Use state field names directly; remove the renaming adapter layer - Keep location labels for base holidays (Name (Location)) - Move state types to types/redux; drop the Omit patch type - Remove unused getHolidayInstancesByHolidayId endpoint - Rename EMPTY_DRAFT -> defaultValues, isDirty -> hasUnsavedChanges - Remove loading gate; add tooltip help icon + translation key - Comment cleanup: no meeting/date/person references; TODOs marked
…ctions properly and saves to database.
…r create and save
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.
Description
This PR adds an administrator workflow for creating and managing holiday exceptions used by OED's time-varying conversion system, but it does not apply holiday exceptions while calculating conversions. That future server side RRule work is tracked separately in issue #1681
The workflow consists of three new connected holiday administration pages, with an additional integration into the existing Week Patterns page:
This PR also includes the frontend routes, navigation entries, Redux API integration, translations, help text, notifications, database tables, models, queries, and server routes needed to support the three-page holiday workflow.
Contributors
Testing
No existing GitHub issue was identified specifically for the three-page holiday administration workflow.
Type of change
Checklist
Limitations
Holiday Rate Groups page
-The Holiday Rate Groups page does not yet check for duplicate names before saving, a user friendly error message shows up, but the create or save button should not be clickable if the name is a duplicate.
-In the Holiday Rate Groups page, you can not select a holiday rate without selecting a location first. Users should be able to choose holiday rates without location selected and selecting a location just filters holiday rates.
-In the holiday Rate Groups page, holiday rates is a required input, therefore should be highlighted red when empty. It is not highlighted as of now.
-A Holiday Rate Group cannot be deleted while it is referenced by a weekly pattern. The database interlock correctly protects the relationship, but the page does not check for that relationship before sending the delete request, so the user may receive a general deletion failure message rather than a specific explanation.
-A schema issue related to weeks prevents holiday rate groups from saving when creating weekly patterns.