167 lines
8.5 KiB
Plaintext
167 lines
8.5 KiB
Plaintext
@using static EgwCoreLib.Lux.Core.Enums
|
|
|
|
@if (EditRecord != null)
|
|
{
|
|
if (CurrEditMode == EditMode.SerStruc || CurrEditMode == EditMode.File)
|
|
{
|
|
if (EditRecord.Envir == EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW || CurrEditMode == EditMode.SerStruc)
|
|
{
|
|
<WebWindowComplex.TableComp ListPayload="SetupList"
|
|
LiveData="CurrData"
|
|
EC_ActionReq="DoAction"
|
|
EC_DoUpdate="ExecRequest"
|
|
EC_OnClose="CloseEditJwd">
|
|
</WebWindowComplex.TableComp>
|
|
}
|
|
@* else
|
|
{
|
|
<BtlPreview CurrItem="EditRecord"
|
|
ApiUrl="@apiUrl"
|
|
CalcTag="@calcTag"
|
|
GenericBasePath="@genericBasePath"
|
|
ImgBasePath="@imgBasePath"
|
|
EC_ReqSave="SaveFile"
|
|
EC_OnClose="CloseEdit">
|
|
</BtlPreview>
|
|
} *@
|
|
}
|
|
else
|
|
{
|
|
<TemplateRowMan CurrRecord="EditRecord" EC_Close="DoClose" EC_Updated="DoSave" ListSellinglItems="ListSellItems"></TemplateRowMan>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (isLoading)
|
|
{
|
|
<LoadingData></LoadingData>
|
|
}
|
|
else if (totalCount == 0)
|
|
{
|
|
<div class="alert alert-info">
|
|
<div class="d-flex justify-content-between">
|
|
<div class="px-0 fs-4">
|
|
Nessun Template trovato
|
|
</div>
|
|
<div class="px-0">
|
|
<div class="input-group input-group-sm" title="Environment">
|
|
<span class="input-group-text">Envir</span>
|
|
<select @bind="@CurrSellingItemId" class="form-select">
|
|
<option value="0">--- Selezionare ---</option>
|
|
@foreach (var item in ListSellItems)
|
|
{
|
|
<option value="@item.SellingItemID">@item.Description | @item.SourceType</option>
|
|
}
|
|
</select>
|
|
@if (CurrSellingItemId == 0)
|
|
{
|
|
<button class="btn btn-secondary disabled">Nuovo <i class="fa-solid fa-plus"></i></button>
|
|
}
|
|
else
|
|
{
|
|
|
|
<button class="btn btn-success" @onclick="DoAdd">Nuovo <i class="fa-solid fa-plus"></i></button>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<table class="table table-sm table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
<button class="btn btn-sm btn-primary" title="Reset selezione" @onclick="DoReset"><i class="fa-solid fa-arrow-rotate-right"></i></button>
|
|
</th>
|
|
<th>Preview</th>
|
|
<th>Prodotto</th>
|
|
@* <th>Importo</th> *@
|
|
<th class="text-end">
|
|
<button class="btn btn-sm btn-success" @onclick="DoAdd"><i class="fa-solid fa-plus"></i></button>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in ListRecords)
|
|
{
|
|
<tr class="@CheckSelect(item)">
|
|
<td>
|
|
<button class="btn btn-sm btn-info" @onclick="() => DoEdit(item)"><i class="fa-solid fa-pencil"></i></button>
|
|
<button class="btn btn-sm btn-warning" @onclick="() => DoClone(item)" title="Duplica Offerta"><i class="fa-solid fa-wand-magic"></i></button>
|
|
</td>
|
|
<td>
|
|
@if (item.Envir == EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW)
|
|
{
|
|
if (item.SellingItemNav?.SourceType == ItemSourceType.Jwd)
|
|
{
|
|
@* <img class="img-fluid image-hover-pop p-1" src="@(imgUrl(item.ImgType, item.TemplateRowUID, $"{item.Envir}"))" width="80" @onclick="() => DoEditJwd(item)" title="Edit Item" /> *@
|
|
<img class="img-fluid image-hover-pop p-1" src="@imgSrc(item.ImgUrl)" width="80" @onclick="() => DoEditJwd(item)" title="Edit Item" />
|
|
}
|
|
else
|
|
{
|
|
@* <img class="img-fluid p-1" src="@(imgUrl(item.ImgType, item.ImgUID, $"{item.Envir}"))" width="64" title="No Edit" /> *@
|
|
<img class="img-fluid p-1" src="@imgSrc(item.ImgUrl)" width="64" title="No Edit" />
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (item.SellingItemNav?.SourceType == ItemSourceType.FileBTL)
|
|
{
|
|
@* <img class="img-fluid image-hover-pop" src="@(imgUrl(item.ImgType, item.TemplateRowUID, $"{item.Envir}"))" width="150" @onclick="() => DoEditFile(item)" title="Edit Item" /> *@
|
|
<img class="img-fluid image-hover-pop" src="@imgSrc(item.ImgUrl)" width="150" @onclick="() => DoEditFile(item)" title="Edit Item" />
|
|
}
|
|
else
|
|
{
|
|
@* <img class="img-fluid p-1" src="@(imgUrl(item.ImgType, item.ImgUID, $"{item.Envir}"))" width="64" title="No Edit" /> *@
|
|
<img class="img-fluid p-1" src="@imgSrc(item.ImgUrl)" width="64" title="No Edit" />
|
|
}
|
|
}
|
|
</td>
|
|
<td>
|
|
<ul class="list-group">
|
|
<li class="list-group-item d-flex justify-content-between align-items-start align-items-center px-2 py-1 condensed fw-bold">
|
|
@item.Name
|
|
</li>
|
|
<li class="list-group-item d-flex justify-content-between align-items-start align-items-center px-2 py-1">
|
|
<div class="small text-secondary">@item.SellingItemNav?.Description</div>
|
|
</li>
|
|
<li class="list-group-item d-flex justify-content-between align-items-start align-items-center px-2 py-1">
|
|
<div class="condensed">@item.TemplateRowUID</div>
|
|
</li>
|
|
@if (item.HasFile)
|
|
{
|
|
@if (item.Envir != EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW || !string.IsNullOrEmpty(item.FileName))
|
|
{
|
|
<li class="list-group-item d-flex justify-content-between align-items-start px-2 py-1 small">
|
|
<div class="mx-0">
|
|
<div class="">@item.FileName</div>
|
|
</div>
|
|
<span class="small">@fSize(item.FileSize)</span>
|
|
</li>
|
|
}
|
|
}
|
|
</ul>
|
|
</td>
|
|
<td class="text-end">
|
|
<button class="btn btn-sm btn-danger" title="Elimina" @onclick="() => DoDelete(item)"><i class="fa-solid fa-trash"></i></button>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
@if (totalCount >= numRecord)
|
|
{
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="15">
|
|
<EgwCoreLib.Razor.DataPager currPage="@currPage" PageSize="@numRecord" totalCount="@totalCount" numPageChanged="SavePage" numRecordChanged="SaveNumRec"></EgwCoreLib.Razor.DataPager>
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
}
|
|
</table>
|
|
}
|
|
}
|
|
|
|
<BootstrapModal @ref=Modal Title=@mTitle Message=@mMessage Mode="BootstrapModal.ModalMode.Confirm" UserOptions=@modalOpt></BootstrapModal> |