Repository navigation
feat(events): a new meeting holds a part once, with a row per room - #701
Merged
Merged
Conversation
Parallel rooms R4: creation stops writing a part held in several rooms as one copy per room. writeTemplateItems writes its item in its main room's place (track and trackOrder as its first copy had), then holdInRooms makes each other room with its row, after the item so the item trigger's prune never removes a room before its row exists. Both creators take it: giving a meeting its programme (new, recurring, ahead) and adding a programme schedule from its template. The rooms fixture's rows meeting is now creation itself; its copies meeting, the shape meetings created before R4 still hold, is split back by hand.
…meeting's edit page #701 review: the meeting's « Modifier le planning » offered « Groupe / Salle » and « Ordre de la salle » on a part held by rows, whose rooms the item trigger keeps whatever its track says, so a save changed item.track under unchanged rooms. updatePartAssignment now keeps track and trackOrder for a part held in several rooms and writes the rest; the edit page hides the two fields for it (itemsHeldInRooms). An older meeting's copies, each in one room, still move with them.
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.
Parallel rooms R4, PR 7. A part held in several rooms is created as one item with a row per room, no longer one copy per room. This needs #700, so its archive carries such parts.
What changes:
writeTemplateItems(give-programme.server.ts): the item is written in its main room's place, with the track and trackOrder its first copy had. The item trigger names the meeting's main room exactly as before.holdInRooms(new,part-room-writes.server.ts): for each other room, it upserts the meeting's room by name with the template room'sorder, then creates the row.prune_schedule_roomsremoves any room without a row on every item write. Each room gets its row in the same step, so a later part's prune keeps it.Moves are safe: nothing moves an item between programmes.
changeEventKinddeletes and re-adds schedules, andattachEventItemsonly touches items with no schedule. So the trigger's refusal to move a part held in several rooms is never reached.Not in this PR:
Tests:
schedule-addintegration: a template part held in the main room and « Salle B » comes out as one item, in the placeSalle principale/ 1, with rows main (order 0) and « Salle B » (order 1). It failed before the change, with two copies.rowsmeeting is now creation itself, and it checks there are two rows;copiesmeeting, the shape meetings created before R4 still hold, is split back by hand: the B row comes off, and a « Salle B » copy item is added.