Skip to content

Commit

Permalink
WIP: Initial layout for sentence information tab
Browse files Browse the repository at this point in the history
  • Loading branch information
samgibsonmoj authored and carlsixsmith-moj committed Aug 7, 2024
1 parent 0713d0e commit 1f84d09
Show file tree
Hide file tree
Showing 2 changed files with 178 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
@if(Model is not null)
{
<MudForm Model="Model" ReadOnly>
<MudGrid Class="pa-3" Spacing="4">
<MudItem sm="12" md="4">
<MudCard Style="Height: 100%">
<MudCardHeader>
<CardHeaderContent>
Custody
</CardHeaderContent>
<CardHeaderAvatar>
<MudAvatar Color="Color.Primary">
<MudIcon Icon="@Icons.Material.Filled.Person" />
</MudAvatar>
</CardHeaderAvatar>
</MudCardHeader>
<MudCardContent>
<MudTextField Value="Model.NomisNumber" Label="NOMIS ID" />
<MudTextField Value="Model.PncNumber" Label="PNC No" />
<MudTextField Value="Model.BookNumber" Label="Book No" />
</MudCardContent>
</MudCard>
</MudItem>
<MudItem sm="12" md="8">
<MudCard Style="Height: 100%">
<MudCardHeader>
<CardHeaderContent>
Sentence
</CardHeaderContent>
</MudCardHeader>
<MudCardContent>
<MudGrid>
<MudItem xs="12">
<MudTextField Value="Model.MainOffenceDescription" Label="Offence" Lines="4" />
</MudItem>
<MudItem xs="4">
<MudDatePicker Date="Model.StartDate" Label="Start Date" />
</MudItem>
<MudItem xs="4">
<MudDatePicker Date="Model.EndDate" Label="End Date" />
</MudItem>
<MudItem xs="4">
<MudDatePicker Date="Model.EarliestEndDate" Label="Earliest End Date" />
</MudItem>
<MudItem xs="4">
<MudDatePicker Date="Model.HdceDate" Label="HDCE Date" />
</MudItem>
<MudItem xs="4">
<MudDatePicker Date="Model.ReleaseDate" Label="Date of Release" />
</MudItem>
<MudItem xs="4">
<MudTextField Value="Model.UnitWing" Label="Unit Wing" />
</MudItem>
<MudItem xs="8">
<MudTextField Value="Model.SentenceType" Label="Sentence Type" />
</MudItem>
<MudItem xs="4">
<MudTextField Value="Model.SentenceLength" Label="Length" />
</MudItem>
<MudItem xs="12">
<MudTextField Value="Model.SupervisingService" Label="Supervising Service" Lines="3" />
</MudItem>
</MudGrid>
</MudCardContent>
</MudCard>
</MudItem>
<MudItem sm="12" md="4">
<MudCard Style="Height: 100%">
<MudCardHeader>
<CardHeaderContent>
Community
</CardHeaderContent>
<CardHeaderAvatar>
<MudAvatar Color="Color.Primary">
<MudIcon Icon="@Icons.Material.Filled.Person" />
</MudAvatar>
</CardHeaderAvatar>
</MudCardHeader>
<MudCardContent>
<MudTextField Value="Model.Crn" Label="NDelius ID" />
<MudCheckBox Value="Model.OnCOLicense" Label="Currently on C.O / License" />
<MudCheckBox Value="Model.OnCommunityPayback" Label="On Community Payback" />
<MudTextField Value="Model.PncNumber" Label="PNC No" />
<MudTextField Value="Model.OmResponsibility" Label="Off. Man. Responsibility" />
<MudDatePicker Date="Model.CFO3EndDate" Label="CFO3 - (90 Day) End Date" />
</MudCardContent>
</MudCard>
</MudItem>
<MudItem sm="12" md="8">
<MudCard Style="Height: 100%">
<MudCardHeader>
<CardHeaderContent>
Supervising Officer / Offender Manager
</CardHeaderContent>
</MudCardHeader>
<MudCardContent>
<MudTextField Value="Model.OffenderManager.Name" Label="Name" />
<MudTextField Value="Model.OffenderManager.TelephoneNumber" Label="Telephone Number" />
<MudTextField Value="Model.OffenderManager.MobileNumber" Label="Mobile Number" />
<MudTextField Value="Model.OffenderManager.EmailAddress" Label="Email Address" />
<MudTextField Value="Model.OffenderManager.Address" Label="Address" Lines="4" />
</MudCardContent>
</MudCard>
</MudItem>
</MudGrid>
</MudForm>
}

@code {
[Parameter, EditorRequired]
public required string ParticipantId { get; set; }

public SentenceDetail? Model { get; private set; }

public record SentenceDetail(
string NomisNumber,
string PncNumber,
string BookNumber,
string MainOffenceDescription,
DateTime StartDate,
DateTime EndDate,
DateTime EarliestEndDate,
DateTime? HdceDate,
DateTime? ReleaseDate,
string UnitWing,
string SentenceType,
string SentenceLength,
string SupervisingService,
string Crn,
bool OnCOLicense,
bool OnCommunityPayback,
string OmResponsibility,
DateTime CFO3EndDate,
OffenderManager OffenderManager);

public record OffenderManager(
string Name,
string TelephoneNumber,
string MobileNumber,
string EmailAddress,
string Address);

protected override void OnInitialized()
{
Model = new(
NomisNumber: "A0001AA",
PncNumber: "01/234567890",
BookNumber: string.Empty,
MainOffenceDescription: "Burglary (dwelling) with intent to commit, or the commission of an offence triable only on indictment - 02801",
StartDate: DateTime.Parse("01-02-2024"),
EndDate: DateTime.Parse("01-02-2026"),
EarliestEndDate: DateTime.Parse("01-02-2025"),
HdceDate: null,
ReleaseDate: null,
UnitWing: "Wing A",
SentenceType: "ORA Adult Custody (inc PSS)",
SentenceLength: "24 Months",
SupervisingService: string.Empty,
Crn: "A012345",
OnCOLicense: false,
OnCommunityPayback: true,
OmResponsibility: string.Empty,
CFO3EndDate: DateTime.Parse("05-02-2024"),
OffenderManager: new(
Name: "Jane Doe",
TelephoneNumber: "+4401234567890",
MobileNumber: "+4401234567890",
EmailAddress: "[email protected]",
Address: "102, Petty France, London, SW1H 9EA"
)
);

base.OnInitialized();
}
}
3 changes: 3 additions & 0 deletions src/Server.UI/Pages/Participants/Participant.razor
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@
<MudTabPanel Text="Case Discussions" Disabled>

</MudTabPanel>
<MudTabPanel Text="Sentence Information">
<CaseSentenceInformation ParticipantId="@Id" />
</MudTabPanel>
</MudTabs>
</MudPaper>
</CascadingValue>
Expand Down

0 comments on commit 1f84d09

Please sign in to comment.