tiskanje opombe, poti nacrtov

stolpec naslednja operacija,
popravljeno brisanje
popravljeno da nafila samo privzete operacije in ne vec doda v kooepracije
posiljanje dodano skp
This commit is contained in:
2026-03-04 20:19:23 +01:00
parent 73e41cc3a3
commit 99d61af1a1
8 changed files with 48 additions and 4 deletions

View File

@@ -204,7 +204,7 @@
</div>
}
<table class="table">
<table id="tblOperations" class="table">
<thead>
<tr>
<th class="w-100">Naziv</th>
@@ -477,7 +477,7 @@
<a class="btn btn-xs icon-btn btn-outline-danger borderless" data-state="danger" href="javascript:;" onclick="deleteProjectPartItemOperation(${op.idProjectPartItemOperation}, this);" title="Izbriši"><i class="fas fa-times"></i></a>
</td>
</tr>`;
$('table.table tbody').append(row);
$('#tblOperations tbody').append(row);
$('#selProjectPartItemOperation option[value="' + op.idCodeTableOperation + '"]').remove();
});
$('#selProjectPartItemOperation').trigger('change');
@@ -529,7 +529,7 @@
<a class="btn btn-xs icon-btn btn-outline-danger borderless" data-state="danger" href="javascript:;" onclick="deleteProjectPartItemOperation(${id}, this);" title="Izbriši"><i class="fas fa-times"></i></a>
</td>
</tr>`;
$('table.table tbody').append(row);
$('#tblOperations tbody').append(row);
$('#selProjectPartItemOperation option[value="' + idCodeTableOperation + '"]').remove();
$('#selProjectPartItemOperation').trigger('change');
} else {

View File

@@ -35,6 +35,20 @@
<br/>
@Html.DisplayFor(modelItem => Model.MaterialDimensions)
</td>
<td>
@{
var ops = Model.ProjectPartItemOperation;
var nextOp = ops?.Where(x => !x.Finished).OrderBy(x => x.Order).FirstOrDefault();
}
@if (ops != null && ops.Any() && nextOp == null)
{
<span class="badge badge-success"><i class="fas fa-check"></i>&nbsp;Vse zaključeno</span>
}
else
{
@(nextOp?.Operation?.Title ?? "")
}
</td>
<td class="table-number">
@(Model.NumberOfItems.ToString("0.00", new CultureInfo("sl-SI")))
<br/>

View File

@@ -644,6 +644,9 @@
<br/>
Dimenzije surovca
</th>
<th>
Naslednja operacija
</th>
<th class="table-header-number">
<div data-toggle="tooltip" data-placement="top" title="Število kosov<br/>Število kompletov" data-html="true">
Kos

View File

@@ -91,6 +91,9 @@ namespace EveryThing.Pages.Projects
.ThenInclude(x => x.Material)
.Include(c => c.ProjectPartProjectPartItem)
.ThenInclude(x => x.Item)
.Include(c => c.ProjectPartProjectPartItem)
.ThenInclude(x => x.ProjectPartItemOperation)
.ThenInclude(x => x.Operation)
.Where(x => x.IdProjectFk == id)
.OrderBy(x => x.ProjectPartNumber).ThenBy(x => x.IdProjectPart)
.ToListAsync();
@@ -192,6 +195,8 @@ namespace EveryThing.Pages.Projects
.Include(x => x.Material)
.Include(x => x.ProjectPart)
.ThenInclude(x => x.Project)
.Include(x => x.ProjectPartItemOperation)
.ThenInclude(x => x.Operation)
.First(x => x.IdProjectPartItem == id);
return Partial("DetailsPartItem", item);
@@ -647,6 +652,7 @@ namespace EveryThing.Pages.Projects
_context.SaveChanges();
projectPart.Project = null;
projectPart.ProjectPartProjectPartItem = null;
}
else
{

View File

@@ -21,6 +21,7 @@
</div>
<input id="inpTblMaterialDimensions_@(Model.Item.IdProjectPartItem.ToString())" asp-for="Item.MaterialDimensions" class="form-control" style="width: 100%"/>
</td>
<td class="table-eddit"></td>
<td class="table-eddit table-number-edit">
<input id="inpTblNumberOfItems_@(Model.Item.IdProjectPartItem.ToString())" asp-for="Item.NumberOfItems" class="form-control" style="width: 100%" />
<input id="inpTblNumberOfSets_@(Model.Item.IdProjectPartItem.ToString())" asp-for="Item.NumberOfSets" class="form-control" style="width: 100%" />

View File

@@ -82,6 +82,22 @@
<strong class="font-weight-semibold">@Html.DisplayFor(modelItem => Model.PartItem.NumberOfItems)</strong>
</div>
@if (!string.IsNullOrEmpty(Model.PartItem.ProjectPart.PathOfPlans))
{
<div class="mb-3" style="margin-top: 0 !important; margin-bottom: 0 !important;">
<label style="margin-top: 0 !important; margin-bottom: 0 !important;">Pot načrtov</label>:&nbsp;
<strong class="font-weight-semibold">@Html.DisplayFor(modelItem => Model.PartItem.ProjectPart.PathOfPlans)</strong>
</div>
}
@if (!string.IsNullOrEmpty(Model.PartItem.Note))
{
<div class="mb-3" style="margin-top: 0 !important; margin-bottom: 0 !important;">
<br />
<i class="">@Html.DisplayFor(modelItem => Model.PartItem.Note)</i>
</div>
}
<br/>
<h6>Operacije</h6>