129 lines
3.3 KiB
Plaintext
129 lines
3.3 KiB
Plaintext
<style>
|
|
.row {
|
|
}
|
|
|
|
.title {
|
|
margin-top: 1em;
|
|
}
|
|
|
|
.order-0 {
|
|
font-size: xx-large;
|
|
}
|
|
|
|
.order-1 {
|
|
font-size: x-large;
|
|
text-indent: 2em;
|
|
}
|
|
|
|
.order-2 {
|
|
font-size: large;
|
|
text-indent: 4em;
|
|
}
|
|
|
|
.order-3 {
|
|
font-size: medium;
|
|
text-indent: 6em;
|
|
}
|
|
</style>
|
|
|
|
<div class="row align-items-center">
|
|
@if (Item is ItemTitle title)
|
|
{
|
|
<span class="@Class">
|
|
@title.OrderId - @title.Label
|
|
</span>
|
|
}
|
|
else if (Item is ItemVerification verification)
|
|
{
|
|
<div class="col-1">
|
|
|
|
<Tooltip Class="d-inline-block" Title="Détails" role="button">
|
|
<Icon Name="IconName.Eye" Color="IconColor.Success" Size="IconSize.x5" @onclick="async () => {
|
|
await ShowDetails();
|
|
}" Style="cursor: pointer;" />
|
|
</Tooltip>
|
|
|
|
@if (verification.Force == ItemVerification.VerificationForce.Optionnal)
|
|
{
|
|
<Tooltip Class="d-inline-block" Title="Indication" role="button">
|
|
<Icon Name="IconName.InfoCircleFill" Color="IconColor.Info" Size="IconSize.x5" />
|
|
</Tooltip>
|
|
}
|
|
else if (verification.Force == ItemVerification.VerificationForce.Recommandation)
|
|
{
|
|
<Tooltip Class="d-inline-block" Title="Recommandation" role="button">
|
|
<Icon Name="IconName.ExclamationDiamondFill" Color="IconColor.Warning" Size="IconSize.x5" />
|
|
</Tooltip>
|
|
}
|
|
else if (verification.Force == ItemVerification.VerificationForce.Mandatory)
|
|
{
|
|
<Tooltip Class="d-inline-block" Title="Obligation" role="button">
|
|
<Icon Name="IconName.ExclamationTriangleFill" Color="IconColor.Danger" Size="IconSize.x5" />
|
|
</Tooltip>
|
|
}
|
|
</div>
|
|
<div class="col-2">
|
|
@Item.OrderId
|
|
</div>
|
|
<div class="col-5">
|
|
@Item.Label
|
|
</div>
|
|
<div class="col-2">
|
|
@Item.References
|
|
</div>
|
|
<div class="col-2">
|
|
<InspectionItemQuickAnswerSelector Item=@verification Register=@Register />
|
|
</div>
|
|
|
|
}
|
|
</div>
|
|
|
|
<Modal
|
|
@ref="Details"
|
|
title="Détails"
|
|
Size="ModalSize.ExtraLarge"
|
|
Fullscreen="ModalFullscreen.LargeDown"
|
|
OnHidden="OnModalHidden"/>
|
|
|
|
|
|
|
|
|
|
@code {
|
|
[Parameter]
|
|
public Item Item { get; set; }
|
|
|
|
[Parameter]
|
|
public InspectionRegister? Register { get; set; }
|
|
|
|
private Modal Details = default!;
|
|
|
|
|
|
public string Class
|
|
{
|
|
get
|
|
{
|
|
if (Item is not ItemTitle)
|
|
return "verification";
|
|
|
|
return "title order-" + Item.Order;
|
|
}
|
|
}
|
|
|
|
private async Task ShowDetails()
|
|
{
|
|
if (Register is null)
|
|
throw new Exception("Cannot ShowDetails with null register.");
|
|
|
|
var parameters = new Dictionary<string, object>();
|
|
parameters.Add(nameof(InspectionItemFillerDetail.Item), Item);
|
|
parameters.Add(nameof(InspectionItemFillerDetail.Register), Register);
|
|
|
|
await Details.ShowAsync<InspectionItemFillerDetail>(title: "Détails", parameters: parameters);
|
|
}
|
|
|
|
private void OnModalHidden()
|
|
{
|
|
StateHasChanged();
|
|
}
|
|
}
|