114 lines
2.7 KiB
Plaintext
114 lines
2.7 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">
|
|
<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>
|
|
|
|
<Tooltip Class="d-inline-block" Title="Ajouter un enfant" role="button">
|
|
<Icon Name="IconName.Plus" Color="IconColor.Success" Size="IconSize.x5" @onclick="async () => {
|
|
await ShowDetails();
|
|
}" Style="cursor: pointer;" />
|
|
</Tooltip>
|
|
|
|
@if (Item is ItemTitle t)
|
|
{
|
|
<Tooltip Class="d-inline-block" Title="Ajouter un sous-titre" role="button">
|
|
<Icon Name="IconName.Plus" Color="IconColor.Success" Size="IconSize.x5" @onclick="async () => {
|
|
await ShowDetails();
|
|
}" Style="cursor: pointer;" />
|
|
</Tooltip>
|
|
}
|
|
</div>
|
|
|
|
|
|
<div class="col-6">
|
|
@if (Item is ItemTitle title)
|
|
{
|
|
<span class="@Class">
|
|
@title.OrderId - @title.Label
|
|
</span>
|
|
}
|
|
else if (Item is ItemVerification verif)
|
|
{
|
|
@verif.Label
|
|
}
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<Modal @ref="Details"
|
|
title="Détails"
|
|
Size="ModalSize.ExtraLarge"
|
|
Fullscreen="ModalFullscreen.LargeDown"
|
|
OnHidden="OnModalHidden" />
|
|
|
|
@code {
|
|
[Parameter]
|
|
public TemplateGrid Grid { get; set; } = default!;
|
|
|
|
[Parameter]
|
|
public Item Item { get; set; } = default!;
|
|
|
|
[Parameter]
|
|
public EventCallback OnAddChild { get; set; } = default!;
|
|
|
|
private Modal Details = default!;
|
|
|
|
public string Class
|
|
{
|
|
get
|
|
{
|
|
if (Item is not ItemTitle)
|
|
return "verification";
|
|
|
|
return "title order-" + Item.Order;
|
|
}
|
|
}
|
|
|
|
private async Task ShowDetails()
|
|
{
|
|
var parameters = new Dictionary<string, object>();
|
|
parameters.Add(nameof(TemplateFillerDetail.Grid), Grid);
|
|
parameters.Add(nameof(TemplateFillerDetail.Item), Item);
|
|
|
|
await Details.ShowAsync<InspectionItemFillerDetail>(title: "Détails", parameters: parameters);
|
|
}
|
|
|
|
private void OnModalHidden()
|
|
{
|
|
StateHasChanged();
|
|
}
|
|
}
|