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.
This commit is contained in:
parent
f79f49b0f6
commit
f24dbae5eb
1 changed files with 3 additions and 3 deletions
|
@ -70,7 +70,7 @@ export class ClientScheduleLocation extends ClientEntity<ApiScheduleLocation> {
|
|||
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<ApiScheduleRole> {
|
|||
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<ApiScheduleShift> {
|
|||
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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue