From f24dbae5eb2b142cc0e081873010d55bb1fce4cb Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Sun, 29 Jun 2025 20:39:05 +0200 Subject: [PATCH] Fix logic errors from mixing up client and server Fix discard and apiUpdate in Location, Role and Shift sometimes breaking due to the field and serverField versions of the fields being mixed up. --- utils/client-schedule.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/client-schedule.ts b/utils/client-schedule.ts index 90ac0ba..8f08fbb 100644 --- a/utils/client-schedule.ts +++ b/utils/client-schedule.ts @@ -70,7 +70,7 @@ export class ClientScheduleLocation extends ClientEntity { this.updatedAt = this.serverUpdatedAt; this.deleted = this.serverDeleted; this.name = this.serverName; - this.description = this.description; + this.description = this.serverDescription; } static create( @@ -457,7 +457,7 @@ export class ClientScheduleRole extends ClientEntity { this.updatedAt = this.serverUpdatedAt; this.deleted = this.serverDeleted; this.name = this.serverName; - this.description = this.description; + this.description = this.serverDescription; } static create( @@ -613,7 +613,7 @@ export class ClientScheduleShift extends ClientEntity { const wasModified = this.isModified(); this.serverUpdatedAt = DateTime.fromISO(api.updatedAt, opts); this.serverDeleted = false; - this.roleId = api.roleId; + this.serverRoleId = api.roleId; this.serverName = api.name; this.serverDescription = api.description ?? ""; this.serverSlotIds = new Set(api.slots.map(slot => slot.id));