Fix production environment to use calendarIdProd from tenantSchema#1134
Closed
Fix production environment to use calendarIdProd from tenantSchema#1134
calendarIdProd from tenantSchema#1134Conversation
…nt-specific calendar IDs Co-authored-by: rlho <5990045+rlho@users.noreply.github.com>
…ific calendar IDs Co-authored-by: rlho <5990045+rlho@users.noreply.github.com>
…ging Co-authored-by: rlho <5990045+rlho@users.noreply.github.com>
Co-authored-by: rlho <5990045+rlho@users.noreply.github.com>
Co-authored-by: rlho <5990045+rlho@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix production environment to use calendarProdId
Fix production environment to use calendarProdId from tenantSchema
Dec 2, 2025
This comment was marked as resolved.
This comment was marked as resolved.
…apping Co-authored-by: rlho <5990045+rlho@users.noreply.github.com>
Contributor
Author
その通りです!実装を簡素化しました。tenantSchemaからroom.calendarIdへのマッピング時のみで環境に応じたcalendarIdを選択するようにしました。 Changes in commit e909953:
All downstream code simply uses |
calendarIdProd from tenantSchema
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.
Production environment ignored
calendarProdIdfield in tenantSchema, forcing production calendar IDs to be placed incalendarIdas a workaround.Changes
Type definitions
calendarProdIdandcalendarStagingIdfields toResourceandRoomSettingtypestenantSchema API endpoint
calendarProdIdif available, otherwise falls back tocalendarIdcalendarStagingIdif available, otherwise falls back tocalendarIdcalendarIdClient components
Provider.tsxandSelectRoomPage.tsxto preserve environment-specific calendar ID fieldsImplementation
The solution handles calendar ID selection in a single location—the tenantSchema API endpoint—when mapping from Firestore to the response. All downstream code (API endpoints, server utilities, client components) simply uses
resource.calendarIdwithout any environment-specific logic.Usage
Backward compatible—existing configurations continue working without modification.
calendarIdProddespite being set in tenantSchema #1133Original prompt
calendarIdProddespite being set in tenantSchema #1133💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.