Allow shifts without a role
Allow a shift to have no role associated with it in order to simplify conflict resolution around situations like a shift being created while the role it was assoiated with was deleted. This also allows for shifts that are freestanding to be created in case having a role doesn't make sense for it.
This commit is contained in:
parent
1d2edf7535
commit
5144bf2b37
5 changed files with 32 additions and 55 deletions
|
@ -515,7 +515,7 @@ export class ClientScheduleRole extends ClientEntity<ApiScheduleRole> {
|
|||
|
||||
export class ClientScheduleShift extends ClientEntity<ApiScheduleShift> {
|
||||
schedule!: ClientSchedule;
|
||||
serverRoleId: Id;
|
||||
serverRoleId: Id | undefined;
|
||||
serverName: string;
|
||||
serverDescription: string;
|
||||
serverSlotIds: Set<Id>;
|
||||
|
@ -524,7 +524,7 @@ export class ClientScheduleShift extends ClientEntity<ApiScheduleShift> {
|
|||
id: Id,
|
||||
updatedAt: DateTime,
|
||||
deleted: boolean,
|
||||
public roleId: Id,
|
||||
public roleId: Id | undefined,
|
||||
public name: string,
|
||||
public description: string,
|
||||
public slotIds: Set<Id>,
|
||||
|
@ -572,7 +572,7 @@ export class ClientScheduleShift extends ClientEntity<ApiScheduleShift> {
|
|||
static create(
|
||||
schedule: ClientSchedule,
|
||||
id: Id,
|
||||
roleId: Id,
|
||||
roleId: Id | undefined,
|
||||
name: string,
|
||||
description: string,
|
||||
slotIds: Set<Id>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue