Prima versione con tempalte insert attivato
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>1.1.2603.0918</Version>
|
||||
<Version>1.1.2603.1112</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,5 +1,64 @@
|
||||
@using static EgwCoreLib.Lux.Core.Enums
|
||||
|
||||
@if (addFromTemplate)
|
||||
{
|
||||
<div class="modal" tabindex="-1" style="display:block; background-color: rgba(10,10,10,.6);" role="dialog">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<div class="row w-100">
|
||||
<div class="col-4 fs-3">
|
||||
Selezione prodotto
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<select @bind="@CurrCatalog" class="form-select form-select-lg">
|
||||
<option value="0">--- Selezionare Catalogo ---</option>
|
||||
@foreach (var itemAlt in ListCataloghi)
|
||||
{
|
||||
<option value="@itemAlt.TemplateID">@itemAlt.Name | @itemAlt.Description</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-4 text-end fs-4">
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" @onclick="ClosePopup">
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@if (CurrCatalog == 0)
|
||||
{
|
||||
<div class="alert alert-info fs-4">Selezionare Catalogo!</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="row">
|
||||
@foreach (var item in ListTemplateCurr)
|
||||
{
|
||||
<div class="col-3">
|
||||
<div class="card shadow image-big-hover-pop p-0 my-2" @onclick="() => DoAddOrderRow(item)">
|
||||
<img src="@(imgUrl(item.TemplateRowUID, $"{item.Envir}"))" class="card-img-top card-img-fixed img-fluid">
|
||||
<div class="card-body">
|
||||
<div class="card-title fs-4">@item.TemplateRowUID</div>
|
||||
<div class="card-text text-secondary">
|
||||
@item.Name
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@* @foreach (var item in ListSellItems)
|
||||
{
|
||||
<button class="btn btn-outline-success" @onclick="() => DoAddOrderRow(item.SellingItemID)"><i class="fa-solid fa-plus"></i> @item.Description</button>
|
||||
} *@
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (EditRecord != null && (CurrEditMode == EditMode.SerStruc || CurrEditMode == EditMode.File))
|
||||
{
|
||||
if (EditRecord.Envir == EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW || CurrEditMode == EditMode.SerStruc)
|
||||
@@ -399,33 +458,3 @@ else
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
@if (reqSellingItem)
|
||||
{
|
||||
<div class="modal" tabindex="-1" style="display:block; background-color: rgba(10,10,10,.6);" role="dialog">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header row modal-title">
|
||||
<div class="col-4 fs-3">
|
||||
Selezione prodotto
|
||||
</div>
|
||||
<div class="col-4 text-center text-bg-secondary bg-gradient border border-2 rounded">
|
||||
@* <div class="fw-bold">@EditRecord.Note</div>
|
||||
<small class="small">@EditRecord.OfferRowUID</small> *@
|
||||
<div class="fw-bold">Environment</div>
|
||||
</div>
|
||||
<div class="col-4 text-end fs-4">
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" @onclick="ClosePopup">
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@foreach (var item in ListSellItems)
|
||||
{
|
||||
<button class="btn btn-outline-success" @onclick="() => DoAddOrderRow(item.SellingItemID)"><i class="fa-solid fa-plus"></i> @item.Description</button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -2,7 +2,6 @@ using Egw.Window.Data;
|
||||
using EgwCoreLib.Lux.Core;
|
||||
using EgwCoreLib.Lux.Core.RestPayload;
|
||||
using EgwCoreLib.Lux.Data.DbModel.Config;
|
||||
using EgwCoreLib.Lux.Data.DbModel.Items;
|
||||
using EgwCoreLib.Lux.Data.DbModel.Sales;
|
||||
using EgwCoreLib.Lux.Data.DbModel.Utils;
|
||||
using EgwCoreLib.Lux.Data.Services;
|
||||
@@ -131,7 +130,7 @@ namespace Lux.UI.Components.Compo
|
||||
{
|
||||
CurrEditMode = EditMode.None;
|
||||
EditRecord = null;
|
||||
reqSellingItem = false;
|
||||
addFromTemplate = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -166,7 +165,49 @@ namespace Lux.UI.Components.Compo
|
||||
/// Aggiunge una nuova riga ordine in coda...
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task DoAddOrderRow(int sellItemID)
|
||||
protected async Task DoAddOrderRow(TemplateRowModel selTemplate)
|
||||
{
|
||||
int numRow = AllRecords.Count + 1;
|
||||
if (EditRecord != null)
|
||||
{
|
||||
numRow = EditRecord.RowNum + 1;
|
||||
}
|
||||
OfferRowModel newSOR = new OfferRowModel()
|
||||
{
|
||||
AwaitBom = true,
|
||||
AwaitPrice = true,
|
||||
OfferID = CurrRecord.OfferID,
|
||||
Envir = CurrRecord.Envir,
|
||||
Inserted = DateTime.Now,
|
||||
RowNum = numRow,
|
||||
OfferRowUID = "",
|
||||
Qty = 1,
|
||||
SellingItemID = selTemplate.SellingItemID,
|
||||
SerStruct = selTemplate.SerStruct,
|
||||
BomCost = 0,
|
||||
BomPrice = 0,
|
||||
StepCost = 0,
|
||||
StepPrice = 0
|
||||
};
|
||||
#if false
|
||||
// se è window aggiungo "{}" come serStruct sennò non la prende bene...
|
||||
if (CurrRecord.Envir == EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW)
|
||||
{
|
||||
newSOR.SerStruct = "{}";
|
||||
}
|
||||
#endif
|
||||
addFromTemplate = false;
|
||||
await DLService.OffertRowUpsert(newSOR);
|
||||
await ReloadData();
|
||||
UpdateTable();
|
||||
}
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Aggiunge una nuova riga ordine in coda...
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task DoAddOrderRowFromSellItem(int sellItemID)
|
||||
{
|
||||
int numRow = AllRecords.Count + 1;
|
||||
if (EditRecord != null)
|
||||
@@ -194,11 +235,12 @@ namespace Lux.UI.Components.Compo
|
||||
{
|
||||
newSOR.SerStruct = "{}";
|
||||
}
|
||||
reqSellingItem = false;
|
||||
addFromTemplate = false;
|
||||
await DLService.OffertRowUpsert(newSOR);
|
||||
await ReloadData();
|
||||
UpdateTable();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Annullamento modifica
|
||||
@@ -363,10 +405,12 @@ namespace Lux.UI.Components.Compo
|
||||
CurrEditMode = EditMode.None;
|
||||
}
|
||||
|
||||
private List<TemplateModel> ListAllCatalog = new();
|
||||
|
||||
protected async Task DoSelectItem()
|
||||
{
|
||||
reqSellingItem = !reqSellingItem;
|
||||
ListSellItems = await DLService.SellingItemsByEnvirAsync(CurrRecord.Envir);
|
||||
addFromTemplate = true;
|
||||
ListCataloghi = ListAllCatalog.Where(x => x.Envir == CurrRecord.Envir).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -696,9 +740,29 @@ namespace Lux.UI.Components.Compo
|
||||
|
||||
private bool isLoading = false;
|
||||
|
||||
private List<OfferRowModel> ListRecords = new List<OfferRowModel>();
|
||||
private List<OfferRowModel> ListRecords = new();
|
||||
|
||||
private List<SellingItemModel> ListSellItems = new List<SellingItemModel>();
|
||||
#if false
|
||||
private List<SellingItemModel> ListSellItems = new List<SellingItemModel>();
|
||||
#endif
|
||||
private List<TemplateModel> ListCataloghi = new();
|
||||
private List<TemplateRowModel> ListTemplateAll = new();
|
||||
private List<TemplateRowModel> ListTemplateCurr = new();
|
||||
|
||||
private int CurrCatalog
|
||||
{
|
||||
get => _currCatalog;
|
||||
set
|
||||
{
|
||||
if (_currCatalog != value)
|
||||
{
|
||||
_currCatalog = value;
|
||||
// imposto template relativi
|
||||
ListTemplateCurr = ListTemplateAll.Where(x => x.TemplateID == value).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
private int _currCatalog = 0;
|
||||
|
||||
private int numRecord = 10;
|
||||
|
||||
@@ -719,7 +783,10 @@ namespace Lux.UI.Components.Compo
|
||||
/// </summary>
|
||||
private Dictionary<string, string> reqDict = new Dictionary<string, string>();
|
||||
|
||||
private bool reqSellingItem = false;
|
||||
/// <summary>
|
||||
/// Boolean selezione prodotto da aggiungere (template)
|
||||
/// </summary>
|
||||
private bool addFromTemplate = false;
|
||||
|
||||
private int totalCount = 0;
|
||||
|
||||
@@ -1338,6 +1405,10 @@ namespace Lux.UI.Components.Compo
|
||||
/// <returns></returns>
|
||||
private async Task ReloadBaseList()
|
||||
{
|
||||
// leggo cataloghi e template relativi...
|
||||
ListAllCatalog = await DLService.TemplateGetAllAsync();
|
||||
ListTemplateAll = await DLService.TemplateRowGetAllAsync();
|
||||
|
||||
// lettura config setup varie da DB/Cache Redis
|
||||
AllConfEnvir = await DLService.ConfEnvirParamGetAllAsync();
|
||||
AllConfGlass = await DLService.ConfGlassGetAllAsync();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50</UserSecretsId>
|
||||
<Version>1.1.2603.0918</Version>
|
||||
<Version>1.1.2603.1112</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -63,6 +63,27 @@ a,
|
||||
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
|
||||
border-radius: 1rem;
|
||||
}
|
||||
.image-big-hover-pop {
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
.image-big-hover-pop:hover {
|
||||
transform: scale(1.2);
|
||||
z-index: 10;
|
||||
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
|
||||
border-radius: 1rem;
|
||||
}
|
||||
.card-img-fixed {
|
||||
height: 16rem;
|
||||
width: 100%;
|
||||
object-fit: contain;
|
||||
background-color: #f8f9fa;
|
||||
/* opzionale per riempire lo sfondo */
|
||||
/* mantiene proporzioni e ritaglia */
|
||||
/*object-fit: cover;
|
||||
object-position: center;*/
|
||||
}
|
||||
/* Gestione dropdown menu x week planner */
|
||||
.dropdown {
|
||||
position: relative;
|
||||
|
||||
@@ -65,7 +65,30 @@ a, .btn-link {
|
||||
transform: scale(1.5);
|
||||
z-index: 10;
|
||||
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
|
||||
border-radius: 1rem;
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
.image-big-hover-pop {
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.image-big-hover-pop:hover {
|
||||
transform: scale(1.2);
|
||||
z-index: 10;
|
||||
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
.card-img-fixed {
|
||||
height: 16rem;
|
||||
width: 100%;
|
||||
object-fit: contain;
|
||||
background-color: #f8f9fa; /* opzionale per riempire lo sfondo */
|
||||
/* mantiene proporzioni e ritaglia */
|
||||
/*object-fit: cover;
|
||||
object-position: center;*/
|
||||
}
|
||||
|
||||
/* Gestione dropdown menu x week planner */
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>LUX - Web Windows MES</i>
|
||||
<h4>Versione: 1.1.2603.0918</h4>
|
||||
<h4>Versione: 1.1.2603.1112</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.1.2603.0918
|
||||
1.1.2603.1112
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.1.2603.0918</version>
|
||||
<version>1.1.2603.1112</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user