fix(scheduling-webui): submit participant revisions

This commit is contained in:
2026-07-22 03:40:10 +02:00
parent 448546e487
commit 27fa24cf4d
4 changed files with 13 additions and 3 deletions

View File

@@ -27,6 +27,7 @@ export type SchedulingCandidateSlot = {
export type SchedulingParticipant = {
id: string;
revision?: string | null;
is_current_participant: boolean;
respondent_id?: string | null;
display_name?: string | null;
@@ -168,6 +169,7 @@ export type SchedulingCandidateSlotReconcilePayload = SchedulingCandidateSlotPay
export type SchedulingParticipantReconcilePayload = SchedulingParticipantPayload & {
id?: string;
revision?: string;
};
export type SchedulingCandidateSlotUpdatePayload = {

View File

@@ -1696,7 +1696,9 @@ function notificationKindLabel(kind: string): string {
invitation: "i18n:govoplan-scheduling.invitation.6306ef74",
reminder: "i18n:govoplan-scheduling.reminder.b87a1929",
decision: "i18n:govoplan-scheduling.decision.7f59a1f1",
cancellation: "i18n:govoplan-scheduling.cancellation.319aaae4"
cancellation: "i18n:govoplan-scheduling.cancellation.319aaae4",
participant_removed: "i18n:govoplan-scheduling.participant_removed.0cf4ec4c",
participant_replaced: "i18n:govoplan-scheduling.participant_replaced.2623752d"
} as Record<string, string>)[kind] ?? kind;
}

View File

@@ -11,6 +11,7 @@ const DIRECTORY_SELECTION_METADATA_KEY = "directory_selection";
export type SchedulingParticipantDraft = PeoplePickerItem & {
draftId: string;
sourceId?: string;
revision?: string;
respondent_id?: string | null;
display_name: string;
email: string;
@@ -95,6 +96,7 @@ export function participantDraftFromResponse(
source_revision: selection?.source_revision ?? null,
draftId,
sourceId: participant.id,
revision: participant.revision ?? undefined,
respondent_id: participant.respondent_id,
participant_type: normalizedParticipantType(participant.participant_type),
required: participant.required ?? true,
@@ -129,9 +131,11 @@ export function participantDraftsFromPicker(
export function participantPayload(
participant: SchedulingParticipantDraft
): SchedulingParticipantPayload & { id?: string } {
): SchedulingParticipantPayload & { id?: string; revision?: string } {
return {
...(participant.sourceId ? { id: participant.sourceId } : {}),
...(participant.sourceId
? { id: participant.sourceId, revision: participant.revision }
: {}),
respondent_id: participant.respondent_id ?? null,
display_name: participant.display_name.trim() || null,
email: participant.email.trim() || null,