Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions src/CareTogether.Api/OData/LiveODataModelController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ public sealed record FamilyRequirementStatus (
[property: Key] string RequirementName,
string Status,
DateTimeOffset? Date,
DateTimeOffset? ExpireDate
DateTimeOffset? ExpireDate,
string? Role
);

public sealed record IndividualRequirementStatus(
Expand All @@ -303,7 +304,8 @@ public sealed record IndividualRequirementStatus(
[property: Key] string RequirementName,
string Status,
DateTimeOffset? Date,
DateTimeOffset? ExpireDate
DateTimeOffset? ExpireDate,
string? Role
);

public sealed record LiveModel(
Expand Down Expand Up @@ -932,7 +934,8 @@ await accountsResource.TryGetPersonUserAccountAsync(
req.RequirementName,
"Complete",
req.CompletedAtUtc,
req.ExpiresAtUtc
req.ExpiresAtUtc,
req.RoleName
));
}
}
Expand All @@ -948,7 +951,8 @@ await accountsResource.TryGetPersonUserAccountAsync(
req.RequirementName,
"Exempted",
req.DueDate,
req.ExemptionExpiresAtUtc
req.ExemptionExpiresAtUtc,
req.RoleName
));
}
}
Expand All @@ -965,7 +969,8 @@ await accountsResource.TryGetPersonUserAccountAsync(
missing.ActionName,
"Pending",
null,
null
null,
missing.Versions.FirstOrDefault().RoleName
));
}
}
Expand All @@ -992,7 +997,8 @@ await accountsResource.TryGetPersonUserAccountAsync(
req.RequirementName,
"Complete",
req.CompletedAtUtc,
req.ExpiresAtUtc
req.ExpiresAtUtc,
req.RoleName
));
}
}
Expand All @@ -1008,7 +1014,8 @@ await accountsResource.TryGetPersonUserAccountAsync(
missing.ActionName,
"Pending",
null,
null
null,
missing.Versions.FirstOrDefault().RoleName
));
}
}
Expand All @@ -1024,7 +1031,8 @@ await accountsResource.TryGetPersonUserAccountAsync(
exempt.RequirementName,
"Exempted",
exempt.DueDate,
exempt.ExemptionExpiresAtUtc
exempt.ExemptionExpiresAtUtc,
exempt.RoleName
));
}
}
Expand Down
13 changes: 9 additions & 4 deletions src/CareTogether.Core/Resources/Approvals/ApprovalModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ DateTime timestampUtc
c.CompletedAtUtc,
ExpiresAtUtc: null,
c.UploadedDocumentId,
c.NoteId
c.NoteId,
c.RoleName
)
),
},
Expand All @@ -100,7 +101,8 @@ DateTime timestampUtc
c.RequirementName,
DueDate: null,
c.AdditionalComments,
c.ExemptionExpiresAtUtc
c.ExemptionExpiresAtUtc,
c.RoleName
)
),
},
Expand Down Expand Up @@ -223,7 +225,8 @@ out var volunteerEntry
c.CompletedAtUtc,
ExpiresAtUtc: null,
c.UploadedDocumentId,
c.NoteId
c.NoteId,
c.RoleName
)
),
},
Expand All @@ -243,10 +246,12 @@ out var volunteerEntry
c.RequirementName,
DueDate: null,
c.AdditionalComments,
c.ExemptionExpiresAtUtc
c.ExemptionExpiresAtUtc,
c.RoleName
)
),
},

UnexemptVolunteerRequirement c => volunteerEntry with
{
ExemptedRequirements = volunteerEntry.ExemptedRequirements.RemoveAll(x =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ public sealed record CompleteVolunteerFamilyRequirement(
string RequirementName,
DateTime CompletedAtUtc,
Guid? UploadedDocumentId,
Guid? NoteId
Guid? NoteId,
string? RoleName = null
) : VolunteerFamilyCommand(FamilyId);

public sealed record MarkVolunteerFamilyRequirementIncomplete(
Expand All @@ -66,7 +67,8 @@ public sealed record ExemptVolunteerFamilyRequirement(
Guid FamilyId,
string RequirementName,
string AdditionalComments,
DateTime? ExemptionExpiresAtUtc
DateTime? ExemptionExpiresAtUtc,
string? RoleName = null
) : VolunteerFamilyCommand(FamilyId);

public sealed record UnexemptVolunteerFamilyRequirement(Guid FamilyId, string RequirementName)
Expand Down Expand Up @@ -104,7 +106,8 @@ public sealed record CompleteVolunteerRequirement(
string RequirementName,
DateTime CompletedAtUtc,
Guid? UploadedDocumentId,
Guid? NoteId
Guid? NoteId,
string? RoleName = null
) : VolunteerCommand(FamilyId, PersonId);

public sealed record MarkVolunteerRequirementIncomplete(
Expand All @@ -119,7 +122,8 @@ public sealed record ExemptVolunteerRequirement(
Guid PersonId,
string RequirementName,
string AdditionalComments,
DateTime? ExemptionExpiresAtUtc
DateTime? ExemptionExpiresAtUtc,
string? RoleName = null
) : VolunteerCommand(FamilyId, PersonId);

public sealed record UnexemptVolunteerRequirement(
Expand Down
6 changes: 4 additions & 2 deletions src/CareTogether.Core/Resources/SharedContracts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ public sealed record CompletedRequirementInfo(
DateTime CompletedAtUtc,
DateTime? ExpiresAtUtc,
Guid? UploadedDocumentId,
Guid? NoteId
Guid? NoteId,
string? RoleName = null
);

public sealed record ExemptedRequirementInfo(
Expand All @@ -21,7 +22,8 @@ public sealed record ExemptedRequirementInfo(
string RequirementName,
DateTime? DueDate,
string AdditionalComments,
DateTime? ExemptionExpiresAtUtc
DateTime? ExemptionExpiresAtUtc,
string? RoleName = null
);

public sealed record UploadedDocumentInfo(
Expand Down
24 changes: 24 additions & 0 deletions src/caretogether-pwa/src/GeneratedClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6500,6 +6500,7 @@ export class CompletedRequirementInfo implements ICompletedRequirementInfo {
expiresAtUtc?: Date | undefined;
uploadedDocumentId?: string | undefined;
noteId?: string | undefined;
roleName?: string | undefined;

constructor(data?: ICompletedRequirementInfo) {
if (data) {
Expand All @@ -6520,6 +6521,7 @@ export class CompletedRequirementInfo implements ICompletedRequirementInfo {
this.expiresAtUtc = _data["expiresAtUtc"] ? new Date(_data["expiresAtUtc"].toString()) : <any>undefined;
this.uploadedDocumentId = _data["uploadedDocumentId"];
this.noteId = _data["noteId"];
this.roleName = _data["roleName"];
}
}

Expand All @@ -6540,6 +6542,7 @@ export class CompletedRequirementInfo implements ICompletedRequirementInfo {
data["expiresAtUtc"] = this.expiresAtUtc ? this.expiresAtUtc.toISOString() : <any>undefined;
data["uploadedDocumentId"] = this.uploadedDocumentId;
data["noteId"] = this.noteId;
data["roleName"] = this.roleName;
return data;
}
}
Expand All @@ -6553,6 +6556,7 @@ export interface ICompletedRequirementInfo {
expiresAtUtc?: Date | undefined;
uploadedDocumentId?: string | undefined;
noteId?: string | undefined;
roleName?: string | undefined;
}

export class ExemptedRequirementInfo implements IExemptedRequirementInfo {
Expand All @@ -6562,6 +6566,7 @@ export class ExemptedRequirementInfo implements IExemptedRequirementInfo {
dueDate?: Date | undefined;
additionalComments!: string;
exemptionExpiresAtUtc?: Date | undefined;
roleName?: string | undefined;

constructor(data?: IExemptedRequirementInfo) {
if (data) {
Expand All @@ -6580,6 +6585,7 @@ export class ExemptedRequirementInfo implements IExemptedRequirementInfo {
this.dueDate = _data["dueDate"] ? new Date(_data["dueDate"].toString()) : <any>undefined;
this.additionalComments = _data["additionalComments"];
this.exemptionExpiresAtUtc = _data["exemptionExpiresAtUtc"] ? new Date(_data["exemptionExpiresAtUtc"].toString()) : <any>undefined;
this.roleName = _data["roleName"];
}
}

Expand All @@ -6598,6 +6604,7 @@ export class ExemptedRequirementInfo implements IExemptedRequirementInfo {
data["dueDate"] = this.dueDate ? this.dueDate.toISOString() : <any>undefined;
data["additionalComments"] = this.additionalComments;
data["exemptionExpiresAtUtc"] = this.exemptionExpiresAtUtc ? this.exemptionExpiresAtUtc.toISOString() : <any>undefined;
data["roleName"] = this.roleName;
return data;
}
}
Expand All @@ -6609,6 +6616,7 @@ export interface IExemptedRequirementInfo {
dueDate?: Date | undefined;
additionalComments: string;
exemptionExpiresAtUtc?: Date | undefined;
roleName?: string | undefined;
}

export class Arrangement implements IArrangement {
Expand Down Expand Up @@ -11258,6 +11266,7 @@ export class CompleteVolunteerFamilyRequirement extends VolunteerFamilyCommand i
completedAtUtc!: Date;
uploadedDocumentId?: string | undefined;
noteId?: string | undefined;
roleName?: string | undefined;

constructor(data?: ICompleteVolunteerFamilyRequirement) {
super(data);
Expand All @@ -11272,6 +11281,7 @@ export class CompleteVolunteerFamilyRequirement extends VolunteerFamilyCommand i
this.completedAtUtc = _data["completedAtUtc"] ? new Date(_data["completedAtUtc"].toString()) : <any>undefined;
this.uploadedDocumentId = _data["uploadedDocumentId"];
this.noteId = _data["noteId"];
this.roleName = _data["roleName"];
}
}

Expand All @@ -11289,6 +11299,7 @@ export class CompleteVolunteerFamilyRequirement extends VolunteerFamilyCommand i
data["completedAtUtc"] = this.completedAtUtc ? this.completedAtUtc.toISOString() : <any>undefined;
data["uploadedDocumentId"] = this.uploadedDocumentId;
data["noteId"] = this.noteId;
data["roleName"] = this.roleName;
super.toJSON(data);
return data;
}
Expand All @@ -11300,12 +11311,14 @@ export interface ICompleteVolunteerFamilyRequirement extends IVolunteerFamilyCom
completedAtUtc: Date;
uploadedDocumentId?: string | undefined;
noteId?: string | undefined;
roleName?: string | undefined;
}

export class ExemptVolunteerFamilyRequirement extends VolunteerFamilyCommand implements IExemptVolunteerFamilyRequirement {
requirementName!: string;
additionalComments!: string;
exemptionExpiresAtUtc?: Date | undefined;
roleName?: string | undefined;

constructor(data?: IExemptVolunteerFamilyRequirement) {
super(data);
Expand All @@ -11318,6 +11331,7 @@ export class ExemptVolunteerFamilyRequirement extends VolunteerFamilyCommand imp
this.requirementName = _data["requirementName"];
this.additionalComments = _data["additionalComments"];
this.exemptionExpiresAtUtc = _data["exemptionExpiresAtUtc"] ? new Date(_data["exemptionExpiresAtUtc"].toString()) : <any>undefined;
this.roleName = _data["roleName"];
}
}

Expand All @@ -11333,6 +11347,7 @@ export class ExemptVolunteerFamilyRequirement extends VolunteerFamilyCommand imp
data["requirementName"] = this.requirementName;
data["additionalComments"] = this.additionalComments;
data["exemptionExpiresAtUtc"] = this.exemptionExpiresAtUtc ? this.exemptionExpiresAtUtc.toISOString() : <any>undefined;
data["roleName"] = this.roleName;
super.toJSON(data);
return data;
}
Expand All @@ -11342,6 +11357,7 @@ export interface IExemptVolunteerFamilyRequirement extends IVolunteerFamilyComma
requirementName: string;
additionalComments: string;
exemptionExpiresAtUtc?: Date | undefined;
roleName?: string | undefined;
}

export class MarkVolunteerFamilyRequirementIncomplete extends VolunteerFamilyCommand implements IMarkVolunteerFamilyRequirementIncomplete {
Expand Down Expand Up @@ -12418,6 +12434,7 @@ export class CompleteVolunteerRequirement extends VolunteerCommand implements IC
completedAtUtc!: Date;
uploadedDocumentId?: string | undefined;
noteId?: string | undefined;
roleName?: string | undefined;

constructor(data?: ICompleteVolunteerRequirement) {
super(data);
Expand All @@ -12432,6 +12449,7 @@ export class CompleteVolunteerRequirement extends VolunteerCommand implements IC
this.completedAtUtc = _data["completedAtUtc"] ? new Date(_data["completedAtUtc"].toString()) : <any>undefined;
this.uploadedDocumentId = _data["uploadedDocumentId"];
this.noteId = _data["noteId"];
this.roleName = _data["roleName"];
}
}

Expand All @@ -12449,6 +12467,7 @@ export class CompleteVolunteerRequirement extends VolunteerCommand implements IC
data["completedAtUtc"] = this.completedAtUtc ? this.completedAtUtc.toISOString() : <any>undefined;
data["uploadedDocumentId"] = this.uploadedDocumentId;
data["noteId"] = this.noteId;
data["roleName"] = this.roleName;
super.toJSON(data);
return data;
}
Expand All @@ -12460,12 +12479,14 @@ export interface ICompleteVolunteerRequirement extends IVolunteerCommand {
completedAtUtc: Date;
uploadedDocumentId?: string | undefined;
noteId?: string | undefined;
roleName?: string | undefined;
}

export class ExemptVolunteerRequirement extends VolunteerCommand implements IExemptVolunteerRequirement {
requirementName!: string;
additionalComments!: string;
exemptionExpiresAtUtc?: Date | undefined;
roleName?: string | undefined;

constructor(data?: IExemptVolunteerRequirement) {
super(data);
Expand All @@ -12478,6 +12499,7 @@ export class ExemptVolunteerRequirement extends VolunteerCommand implements IExe
this.requirementName = _data["requirementName"];
this.additionalComments = _data["additionalComments"];
this.exemptionExpiresAtUtc = _data["exemptionExpiresAtUtc"] ? new Date(_data["exemptionExpiresAtUtc"].toString()) : <any>undefined;
this.roleName = _data["roleName"];
}
}

Expand All @@ -12493,6 +12515,7 @@ export class ExemptVolunteerRequirement extends VolunteerCommand implements IExe
data["requirementName"] = this.requirementName;
data["additionalComments"] = this.additionalComments;
data["exemptionExpiresAtUtc"] = this.exemptionExpiresAtUtc ? this.exemptionExpiresAtUtc.toISOString() : <any>undefined;
data["roleName"] = this.roleName;
super.toJSON(data);
return data;
}
Expand All @@ -12502,6 +12525,7 @@ export interface IExemptVolunteerRequirement extends IVolunteerCommand {
requirementName: string;
additionalComments: string;
exemptionExpiresAtUtc?: Date | undefined;
roleName?: string | undefined;
}

export class MarkVolunteerRequirementIncomplete extends VolunteerCommand implements IMarkVolunteerRequirementIncomplete {
Expand Down
Loading
Loading