5d72d21fb1
Update gestione paginazione (visibile solo dove serve) + fix calcolo di alcuni intems male filtrati
280 lines
13 KiB
Plaintext
280 lines
13 KiB
Plaintext
@using LiMan.UI.Components
|
|
@using Microsoft.Extensions.Configuration
|
|
@inject IConfiguration Configuration
|
|
|
|
@using System.IO
|
|
@inject IJSRuntime JS
|
|
|
|
<div class="px-2">
|
|
<div class="row">
|
|
<div class="@mainCss">
|
|
<div class="card">
|
|
<div class="card-header bg-success py-1 text-light">
|
|
<h3>Tickets</h3>
|
|
</div>
|
|
<div class="col-9">
|
|
<div class="d-flex flex-row-reverse justify-content-between">
|
|
<div class="p-2">
|
|
<div class="input-group input-group-sm">
|
|
<span class="input-group-text">
|
|
Installazione
|
|
</span>
|
|
<select @bind="@SelInst" class="form-select">
|
|
<option value="">--- Tutti ---</option>
|
|
|
|
@if (ListInstall != null)
|
|
{
|
|
foreach (var item in ListInstall)
|
|
{
|
|
<option value="@item.CodInst">@item.CodInst | @item.Descrizione</option>
|
|
}
|
|
}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="p-2">
|
|
<div class="input-group input-group-sm">
|
|
<span class="input-group-text">
|
|
Applicazione
|
|
</span>
|
|
<select @bind="@SelApp" class="form-select">
|
|
<option value="">--- Tutti ---</option>
|
|
@if (ListApp != null)
|
|
{
|
|
foreach (var item in ListApp)
|
|
{
|
|
<option value="@item.CodApp">@item.CodApp | @item.Descrizione</option>
|
|
}
|
|
}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body bg-light p-1">
|
|
|
|
@if (ListRecords == null)
|
|
{
|
|
<LoadingData></LoadingData>
|
|
}
|
|
else if (totalCount == 0)
|
|
{
|
|
<div class="alert alert-warning text-center display-4">Nessun record trovato</div>
|
|
}
|
|
else
|
|
{
|
|
|
|
<table class="table table-sm table-striped table-responsive-lg">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
<button type="button" class="btn btn-sm btn-warning w-100" @onclick="() => ReloadAllData()"><i class="fas fa-times"></i></button>
|
|
</th>
|
|
<th>Applicativo</th>
|
|
<th>Installazione</th>
|
|
<th>#</th>
|
|
<th>Stato</th>
|
|
<th>Richiedente</th>
|
|
<th>Data Richiesta</th>
|
|
<th>Email</th>
|
|
<th>Telefono</th>
|
|
<th>
|
|
Descrizione
|
|
</th>
|
|
</tr>
|
|
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var record in ListRecords)
|
|
{
|
|
<tr class="@selTick(record.IdxTicket)">
|
|
<td>
|
|
<button type="button" class="btn btn-sm btn-primary" @onclick="() => showDet(record)"><i class="fas fa-search"></i></button>
|
|
</td>
|
|
<td>
|
|
@record.CodApp
|
|
</td>
|
|
<td>
|
|
@record.CodInst
|
|
</td>
|
|
<td>
|
|
@record.IdxTicket<br />
|
|
|
|
</td>
|
|
<td>
|
|
@record.Status
|
|
</td>
|
|
<td>
|
|
<div><b>@record.ContactName</b></div>
|
|
|
|
</td>
|
|
<td>
|
|
<div>@record.DtReq</div>
|
|
</td>
|
|
<td>
|
|
<div>@record.ContactEmail</div>
|
|
|
|
</td>
|
|
<td>
|
|
<div>@record.ContactPhone</div>
|
|
</td>
|
|
<td>
|
|
@record.ReqBody
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
|
|
</table>
|
|
}
|
|
|
|
</div>
|
|
<div class="card-footer">
|
|
@if (totalCount > numRecord)
|
|
{
|
|
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="SetNumRec" numPageChanged="SetNumPage" totalCount="totalCount" showLoading="isLoading" />
|
|
}
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
@if (idxTicketSel > 0 && currTipo == Core.Enum.TipologiaTicket.Licenze)
|
|
{
|
|
<div class="col-4 bg-light p-2">
|
|
<div class="row">
|
|
<div class="col-3">
|
|
@if (StatusSel != Core.Enum.StatoRichiesta.Richiesta)
|
|
{
|
|
<button type="button" class="btn btn-sm btn-info w-100" @onclick="() => updateStato(Core.Enum.StatoRichiesta.Richiesta)">Attesa Valutazione <i class="fas fa-pause"></i></button>
|
|
}
|
|
</div>
|
|
<div class="col-3">
|
|
@if (StatusSel != Core.Enum.StatoRichiesta.Valutazione)
|
|
{
|
|
<button type="button" class="btn btn-sm btn-info w-100" @onclick="() => updateStato(Core.Enum.StatoRichiesta.Valutazione)">Prendi in carico <i class="fas fa-play"></i></button>
|
|
}
|
|
</div>
|
|
<div class="col-3">
|
|
@if (StatusSel != Core.Enum.StatoRichiesta.Approvata)
|
|
{
|
|
<button type="button" class="btn btn-sm btn-success w-100" @onclick="() => updateStato(Core.Enum.StatoRichiesta.Approvata)">Approva <i class="fas fa-check"></i></button>
|
|
}
|
|
</div>
|
|
<div class="col-3">
|
|
@if (StatusSel != Core.Enum.StatoRichiesta.Rifiutata)
|
|
{
|
|
<button type="button" class="btn btn-sm btn-danger w-100" @onclick="() => updateStato(Core.Enum.StatoRichiesta.Rifiutata)">Rifiuta <i class="fas fa-times"></i></button>
|
|
}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@if (ListActivations != null && ListActivations.Count > 0)
|
|
{
|
|
<table class="table table-sm table-striped table-responsive-lg bg-light">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
<button type="button" class="btn btn-sm btn-dark w-100" value="Cancel" @onclick="closeDet"><i class="fas fa-times"></i></button>
|
|
</th>
|
|
<th>#</th>
|
|
<th>Impiego</th>
|
|
<th>
|
|
Chiave
|
|
@if (showKey)
|
|
{
|
|
<button type="button" class="btn btn-sm btn-warning" @onclick="() => showDecrypt()"><i class="fas fa-eye-slash"></i></button>
|
|
}
|
|
else
|
|
{
|
|
<button type="button" class="btn btn-sm btn-success" @onclick="() => showDecrypt()"><i class="fas fa-eye"></i></button>
|
|
}
|
|
</th>
|
|
<th>Scadenza Veto</th>
|
|
<th class="text-end"><i class="fas fa-user-lock"></i></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var record in ListActivations)
|
|
{
|
|
<tr class="@checkSelect(record.IdxLic)">
|
|
<td class="text-nowrap">
|
|
<button class="btn btn-sm btn-info" @onclick="() => UnLock(record)" title="Edit record">
|
|
<i class="oi oi-lock-unlocked"></i>
|
|
</button>
|
|
</td>
|
|
<td>
|
|
<b>@record.IdxSubLic</b>
|
|
</td>
|
|
<td>
|
|
@record.CodImpiego
|
|
</td>
|
|
<td>
|
|
@if (showKey)
|
|
{
|
|
<span class="text-success">@decryptAuthKey(record.Chiave)</span>
|
|
}
|
|
else
|
|
{
|
|
@record.Chiave
|
|
}
|
|
</td>
|
|
<td>
|
|
<span class="@cssScadenza(record.VetoUnlock)">@($"{record.VetoUnlock:yyyy.MM.dd}")</span>
|
|
</td>
|
|
<td class="text-end">
|
|
@if (record.Locked)
|
|
{
|
|
<span aria-hidden="true" title="Licenza Bloccata"><i class="fas fa-lock text-danger"></i></span>
|
|
}
|
|
else
|
|
{
|
|
<span aria-hidden="true" title="Licenza Libera"><i class="fas fa-unlock-alt text-success"></i></span>
|
|
}
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
}
|
|
</div>
|
|
}
|
|
|
|
else if (idxTicketSel > 0 && currTipo == Core.Enum.TipologiaTicket.FileUpload)
|
|
{
|
|
<div class="col-4 bg-light p-2">
|
|
<div>
|
|
<table class="table table-sm table-striped table-responsive-lg">
|
|
<thead>
|
|
<tr>
|
|
<th>Nome File</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var record in FileAttached)
|
|
{
|
|
|
|
<tr>
|
|
<td>
|
|
@*<button @onclick="() => DownloadFileFromURL(record.OriginalName, record.FullStoragePath)"> @record.OriginalName</button>*@
|
|
<a href="@(Configuration["ApiUrl"]+"/ELM.API/api/filesave/"+@record.FullStoragePath+"/"+@record.OriginalName)" target="_blank">@record.OriginalName</a>
|
|
@*<a @onclick="() => DownloadFileFromURL(record.OriginalName, record.FullStoragePath)"> @record.OriginalName</a>*@
|
|
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
|
|
@* <button @onclick="DownloadFileFromURL">
|
|
Download File From URL
|
|
</button>*@
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|