-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CFODEV-604 - "Dummy" screen for sentence information (#117)
* WIP: Initial layout for sentence information tab * Add card 'Expand' action for sentence information * Fix typography for sentence card sections
- Loading branch information
1 parent
a8c065d
commit d6f6d68
Showing
2 changed files
with
204 additions
and
0 deletions.
There are no files selected for viewing
201 changes: 201 additions & 0 deletions
201
src/Server.UI/Pages/Participants/Components/CaseSentenceInformation.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,201 @@ | ||
@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> | ||
<MudText Typo="Typo.h6">Custody</MudText> | ||
</CardHeaderContent> | ||
<CardHeaderActions> | ||
<MudTooltip Text="Expand"> | ||
<MudIconButton OnClick="Expand" Icon="@Icons.Material.Filled.OpenInNew" /> | ||
</MudTooltip> | ||
</CardHeaderActions> | ||
<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> | ||
<MudText Typo="Typo.h6">Sentence</MudText> | ||
</CardHeaderContent> | ||
<CardHeaderActions> | ||
<MudTooltip Text="Expand"> | ||
<MudIconButton OnClick="Expand" Icon="@Icons.Material.Filled.OpenInNew" /> | ||
</MudTooltip> | ||
</CardHeaderActions> | ||
</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> | ||
<MudText Typo="Typo.h6">Community</MudText> | ||
</CardHeaderContent> | ||
<CardHeaderActions> | ||
<MudTooltip Text="Expand"> | ||
<MudIconButton OnClick="Expand" Icon="@Icons.Material.Filled.OpenInNew" /> | ||
</MudTooltip> | ||
</CardHeaderActions> | ||
<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> | ||
<MudText Typo="Typo.h6">Supervising Officer / Offender Manager</MudText> | ||
</CardHeaderContent> | ||
<CardHeaderActions> | ||
<MudTooltip Text="Expand"> | ||
<MudIconButton OnClick="Expand" Icon="@Icons.Material.Filled.OpenInNew" /> | ||
</MudTooltip> | ||
</CardHeaderActions> | ||
</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(); | ||
} | ||
|
||
private async Task Expand() | ||
{ | ||
await DialogService.ShowMessageBox("Expanded Information", "More information..."); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters