ogled ponudb
This commit is contained in:
@@ -110,6 +110,9 @@ namespace EveryThing.Models.Invoice
|
||||
[NotMapped]
|
||||
public string InvoiceNumberFormatted => $"{InvoiceYear}-{InvoiceNumber}";
|
||||
|
||||
[NotMapped]
|
||||
public string InvoiceNumberFormattedLong => $"{InvoiceNumberFormatted}-{Partner?.Title ?? ""}";
|
||||
|
||||
[NotMapped]
|
||||
public string InvoiceTypeString
|
||||
{
|
||||
|
||||
@@ -170,65 +170,68 @@
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane tab-panel-invoices fade show active" id="invoice-orders">
|
||||
<table class="table">
|
||||
<div class="card-body" style="padding: 0.5rem">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
#
|
||||
</th>
|
||||
<th>
|
||||
Dobavitelj
|
||||
</th>
|
||||
<th>
|
||||
Datum
|
||||
</th>
|
||||
<th>
|
||||
Dobavni rok
|
||||
</th>
|
||||
<th>
|
||||
Status
|
||||
</th>
|
||||
<th><a href="Javascript:;" class="btn btn-sm btn-primary" onclick="showAllInvoices();">Pokaži vse</a></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
#
|
||||
</th>
|
||||
<th>
|
||||
Dobavitelj
|
||||
</th>
|
||||
<th>
|
||||
Datum
|
||||
</th>
|
||||
<th>
|
||||
Dobavni rok
|
||||
</th>
|
||||
<th>
|
||||
Status
|
||||
</th>
|
||||
<th><a href="Javascript:;" class="btn btn-sm btn-primary" onclick="showAllInvoices();">Pokaži vse</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var invoice in Model.Invoices.Where(x => x.Type == Models.Invoice.Invoice.InvoiceType.Order))
|
||||
{
|
||||
<tr class="invoice-row" data-idparts="@string.Join(",", invoice.InvoiceInvoiceItem.Select(x => x.ProjectPartItem.IdProjectPartFk))">
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => invoice.InvoiceYear) - @Html.DisplayFor(modelItem => invoice.InvoiceNumber)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(x => invoice.Partner.Title)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(x => invoice.Date)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(x => invoice.DateOfDispatch)
|
||||
</td>
|
||||
<td>
|
||||
@switch (invoice.State)
|
||||
{
|
||||
case Models.Invoice.Invoice.InvoiceState.Closed:
|
||||
<span class='badge badge-success'>@Html.DisplayFor(modelItem => invoice.State)</span>
|
||||
break;
|
||||
case Models.Invoice.Invoice.InvoiceState.Confirmed:
|
||||
<span class='badge badge-warning'>@Html.DisplayFor(modelItem => invoice.State)</span>
|
||||
break;
|
||||
default:
|
||||
<span class='badge badge-info'>@Html.DisplayFor(modelItem => invoice.State)</span>
|
||||
break;
|
||||
}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<a class="btn btn-xs icon-btn btn-outline-primary borderless" asp-page="/Invoices/Print" asp-route-id="@invoice.IdInvoice" data-toggle="tooltip" data-placement="top" title="Tiskanje" data-state="primary"><i class="ion ion-md-print"></i></a>
|
||||
<a class="btn btn-xs icon-btn btn-outline-secondary borderless" asp-page="/Invoices/Edit" asp-route-id="@invoice.IdInvoice" data-toggle="tooltip" data-placement="top" title="Urejanje" data-state="secondary"><i class="fas fa-pencil-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@foreach (var invoice in Model.Invoices.Where(x => x.Type == Models.Invoice.Invoice.InvoiceType.Order))
|
||||
{
|
||||
<tr class="invoice-row" data-idparts="@string.Join(",", invoice.InvoiceInvoiceItem?.Select(x => x.ProjectPartItem.IdProjectPartFk) ?? Array.Empty<int>())">
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => invoice.InvoiceYear) - @Html.DisplayFor(modelItem => invoice.InvoiceNumber)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(x => invoice.Partner.Title)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(x => invoice.Date)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(x => invoice.DateOfDispatch)
|
||||
</td>
|
||||
<td>
|
||||
@switch (invoice.State)
|
||||
{
|
||||
case Models.Invoice.Invoice.InvoiceState.Closed:
|
||||
<span class='badge badge-success'>@Html.DisplayFor(modelItem => invoice.State)</span>
|
||||
break;
|
||||
case Models.Invoice.Invoice.InvoiceState.Confirmed:
|
||||
<span class='badge badge-warning'>@Html.DisplayFor(modelItem => invoice.State)</span>
|
||||
break;
|
||||
default:
|
||||
<span class='badge badge-info'>@Html.DisplayFor(modelItem => invoice.State)</span>
|
||||
break;
|
||||
}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<a class="btn btn-xs icon-btn btn-outline-primary borderless" asp-page="/Invoices/Print" asp-route-id="@invoice.IdInvoice" data-toggle="tooltip" data-placement="top" title="Tiskanje" data-state="primary"><i class="ion ion-md-print"></i></a>
|
||||
<a class="btn btn-xs icon-btn btn-outline-secondary borderless" asp-page="/Invoices/Edit" asp-route-id="@invoice.IdInvoice" data-toggle="tooltip" data-placement="top" title="Urejanje" data-state="secondary"><i class="fas fa-pencil-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane tab-panel-invoices fade show" id="invoice-delivery-notes">
|
||||
<div class="card-body" style="padding: 0.5rem">
|
||||
@@ -258,7 +261,7 @@
|
||||
<tbody>
|
||||
@foreach (var invoice in Model.Invoices.Where(x => x.Type == Models.Invoice.Invoice.InvoiceType.DeliveryNote))
|
||||
{
|
||||
<tr class="invoice-row" data-idinvoice="@invoice.IdInvoice" data-idparts="@string.Join(",", invoice.InvoiceInvoiceItem.Select(x => x.ProjectPartItem.IdProjectPartFk))">
|
||||
<tr class="invoice-row" data-idinvoice="@invoice.IdInvoice" data-idparts="@string.Join(",", invoice.InvoiceInvoiceItem?.Select(x => x.ProjectPartItem.IdProjectPartFk) ?? Array.Empty<int>())">
|
||||
<td style="width: 20px;">
|
||||
@if (invoice.State == Invoice.InvoiceState.Confirmed)
|
||||
{
|
||||
@@ -328,7 +331,7 @@
|
||||
<tbody>
|
||||
@foreach (var invoice in Model.Invoices.Where(x => x.Type == Models.Invoice.Invoice.InvoiceType.Invoice))
|
||||
{
|
||||
<tr class="invoice-row" data-idinvoice="@invoice.IdInvoice" data-idparts="@string.Join(",", invoice.InvoiceInvoiceItem.Select(x => x.ProjectPartItem.IdProjectPartFk))">
|
||||
<tr class="invoice-row" data-idinvoice="@invoice.IdInvoice" data-idparts="@string.Join(",", invoice.InvoiceInvoiceItem?.Select(x => x.ProjectPartItem.IdProjectPartFk) ?? Array.Empty<int>())">
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => invoice.InvoiceYear) - @Html.DisplayFor(modelItem => invoice.InvoiceNumber)
|
||||
</td>
|
||||
@@ -370,63 +373,70 @@
|
||||
<div class="card-body" style="padding: 0.5rem">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
#
|
||||
</th>
|
||||
<th>
|
||||
Partner
|
||||
</th>
|
||||
<th>
|
||||
Datum
|
||||
</th>
|
||||
<th>
|
||||
Datum odpreme
|
||||
</th>
|
||||
<th>
|
||||
Status
|
||||
</th>
|
||||
<th><a href="Javascript:;" class="btn btn-sm btn-primary" onclick="showAllInvoices();">Pokaži vse</a></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
#
|
||||
</th>
|
||||
<th>
|
||||
Partner
|
||||
</th>
|
||||
<th>
|
||||
Datum
|
||||
</th>
|
||||
<th>
|
||||
Datum odpreme
|
||||
</th>
|
||||
<th>
|
||||
Status
|
||||
</th>
|
||||
<th style="text-align: right">
|
||||
Znesek
|
||||
</th>
|
||||
<th style="text-align: right"><a href="Javascript:;" class="btn btn-sm btn-primary" onclick="showAllInvoices();">Pokaži vse</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var invoice in Model.Invoices.Where(x => x.Type == Invoice.InvoiceType.BuyersOrder))
|
||||
{
|
||||
<tr class="invoice-row" data-idparts="@string.Join(",", invoice.InvoiceInvoiceItem.Select(x => x.ProjectPartItem.IdProjectPartFk))">
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => invoice.InvoiceYear) - @Html.DisplayFor(modelItem => invoice.InvoiceNumber)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(x => invoice.Partner.Title)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(x => invoice.Date)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(x => invoice.DateOfDispatch)
|
||||
</td>
|
||||
<td>
|
||||
@switch (invoice.State)
|
||||
{
|
||||
case Models.Invoice.Invoice.InvoiceState.Closed:
|
||||
<span class='badge badge-success'>@Html.DisplayFor(modelItem => invoice.State)</span>
|
||||
break;
|
||||
case Models.Invoice.Invoice.InvoiceState.Confirmed:
|
||||
<span class='badge badge-warning'>@Html.DisplayFor(modelItem => invoice.State)</span>
|
||||
break;
|
||||
default:
|
||||
<span class='badge badge-info'>@Html.DisplayFor(modelItem => invoice.State)</span>
|
||||
break;
|
||||
}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<a class="btn btn-xs icon-btn btn-outline-primary borderless" asp-page="/Invoices/Print" asp-route-id="@invoice.IdInvoice" data-toggle="tooltip" data-placement="top" title="Tiskanje" data-state="primary"><i class="ion ion-md-print"></i></a>
|
||||
<a class="btn btn-xs icon-btn btn-outline-secondary borderless" asp-page="/Invoices/Edit" asp-route-id="@invoice.IdInvoice" data-toggle="tooltip" data-placement="top" title="Urejanje" data-state="secondary"><i class="fas fa-pencil-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@foreach (var invoice in Model.Invoices.Where(x => x.Type == Invoice.InvoiceType.BuyersOrder))
|
||||
{
|
||||
<tr class="invoice-row" data-idparts="@string.Join(",", invoice.InvoiceInvoiceItem?.Select(x => x.ProjectPartItem?.IdProjectPartFk ?? 0) ?? Array.Empty<int>())">
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => invoice.InvoiceYear) - @Html.DisplayFor(modelItem => invoice.InvoiceNumber)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(x => invoice.Partner.Title)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(x => invoice.Date)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(x => invoice.DateOfDispatch)
|
||||
</td>
|
||||
<td>
|
||||
@switch (invoice.State)
|
||||
{
|
||||
case Models.Invoice.Invoice.InvoiceState.Closed:
|
||||
<span class='badge badge-success'>@Html.DisplayFor(modelItem => invoice.State)</span>
|
||||
break;
|
||||
case Models.Invoice.Invoice.InvoiceState.Confirmed:
|
||||
<span class='badge badge-warning'>@Html.DisplayFor(modelItem => invoice.State)</span>
|
||||
break;
|
||||
default:
|
||||
<span class='badge badge-info'>@Html.DisplayFor(modelItem => invoice.State)</span>
|
||||
break;
|
||||
}
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
@invoice.InvoiceInvoiceItem.Sum(y => y.TotalValue).ToString("#,###,##0.00") €
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<a class="btn btn-xs icon-btn btn-outline-primary borderless" asp-page="/Invoices/Print" asp-route-id="@invoice.IdInvoice" data-toggle="tooltip" data-placement="top" title="Tiskanje" data-state="primary"><i class="ion ion-md-print"></i></a>
|
||||
<a class="btn btn-xs icon-btn btn-outline-secondary borderless" asp-page="/Invoices/Edit" asp-route-id="@invoice.IdInvoice" data-toggle="tooltip" data-placement="top" title="Urejanje" data-state="secondary"><i class="fas fa-pencil-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
<a href="Javascript:;" class="btn btn-sm btn-success" onclick="openModalCreateLinkToBuyersOrders();">Poveži ponudbo</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane tab-panel-invoices fade show" id="files-project">
|
||||
@@ -523,7 +533,7 @@
|
||||
<tbody>
|
||||
@foreach (var invoice in Model.Invoices.Where(x => x.Type == Invoice.InvoiceType.Cooperation))
|
||||
{
|
||||
<tr class="invoice-row" data-idparts="@string.Join(",", invoice.InvoiceInvoiceItem.Select(x => x.ProjectPartItem.IdProjectPartFk))">
|
||||
<tr class="invoice-row" data-idparts="@string.Join(",", invoice.InvoiceInvoiceItem?.Select(x => x.ProjectPartItem.IdProjectPartFk) ?? Array.Empty<int>())">
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => invoice.InvoiceYear) - @Html.DisplayFor(modelItem => invoice.InvoiceNumber)
|
||||
</td>
|
||||
@@ -745,6 +755,8 @@
|
||||
</div>
|
||||
@Html.AntiForgeryToken()
|
||||
<div id="divModalCodetableItemAddEditPlaceholder"></div>
|
||||
<div id="divModalLinkToBuyersOrderPlaceholder"></div>
|
||||
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@@ -1535,5 +1547,98 @@
|
||||
});
|
||||
}
|
||||
|
||||
function openModalCreateLinkToOrders(){
|
||||
$.blockUI();
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "/Invoices/Index/?handler=Excel",
|
||||
data: {
|
||||
idInvoice
|
||||
},
|
||||
success: function (data) {
|
||||
$.unblockUI();
|
||||
if (data.successful) {
|
||||
|
||||
} else {
|
||||
console.log(data);
|
||||
Swal.fire('Napaka pri pridobivanju ponudb',
|
||||
data.error,
|
||||
'error');
|
||||
}
|
||||
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(xhr);
|
||||
alert(xhr.responseText);
|
||||
$.unblockUI();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function openModalCreateLinkToBuyersOrders(){
|
||||
idProject = @Model.Project.IdProject;
|
||||
|
||||
$.blockUI();
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
// beforeSend: function(xhr) {
|
||||
// xhr.setRequestHeader("XSRF-TOKEN",
|
||||
// $('input:hidden[name="__RequestVerificationToken"]').val());
|
||||
// },
|
||||
url: "Edit/?handler=LinkToProjectData",
|
||||
data: { idProject: idProject},
|
||||
success: function(data) {
|
||||
$.unblockUI();
|
||||
$('#divModalLinkToBuyersOrderPlaceholder').html(data);
|
||||
|
||||
|
||||
$("#divModalLinkToBuyersOrder").modal('show');
|
||||
$('#selModalLinkToOrderIdProjectOrder').select2({
|
||||
dropdownParent: $('#divModalLinkToBuyersOrder')
|
||||
});
|
||||
$('#btnModalLinkToOrderConfirm').off();
|
||||
$('#btnModalLinkToOrderCancel').off();
|
||||
|
||||
$('#btnModalLinkToOrderCancel').on('click', function (){
|
||||
$("#divModalLinkToBuyersOrder").modal('hide');
|
||||
});
|
||||
|
||||
$('#btnModalLinkToOrderConfirm').on('click', function (){
|
||||
let idOrder = parseInt($('#selModalLinkToOrderIdProjectOrder').val());
|
||||
$.blockUI();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
beforeSend: function(xhr) {
|
||||
xhr.setRequestHeader("XSRF-TOKEN",
|
||||
$('input:hidden[name="__RequestVerificationToken"]').val());
|
||||
},
|
||||
url: "Edit/?handler=LinkProjectToBuyerOrder",
|
||||
data: { idProject: idProject, idOrder: idOrder },
|
||||
success: function(data) {
|
||||
if (data.successful) {
|
||||
location.reload();
|
||||
|
||||
} else {
|
||||
Swal.fire(data.error,'error', 'error');
|
||||
}
|
||||
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(xhr.responseText);
|
||||
$.unblockUI();
|
||||
}
|
||||
});
|
||||
$("#divModalLinkToBuyersOrder").modal('hide');
|
||||
});
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
alert(xhr.responseText);
|
||||
$.unblockUI();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -1,31 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using DocumentFormat.OpenXml.InkML;
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using EveryThing.Data;
|
||||
using EveryThing.Models;
|
||||
using EveryThing.Models.CodeTable;
|
||||
using EveryThing.Models.Invoice;
|
||||
using EveryThing.Models.Project;
|
||||
using EveryThing.Models.Vehicle;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using EveryThing.Data;
|
||||
using EveryThing.Models;
|
||||
using EveryThing.Models.Project;
|
||||
using System.Text.Json;
|
||||
using EveryThing.Models.CodeTable;
|
||||
using DocumentFormat.OpenXml.InkML;
|
||||
using EveryThing.Models.Invoice;
|
||||
using EveryThing.Models.Vehicle;
|
||||
using static EveryThing.Pages.CodeTableVehicleFuelTypes.IndexModel;
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using NuGet.Packaging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using static EveryThing.Pages.CodeTableItems.IndexModel;
|
||||
using static EveryThing.Pages.CodeTableVehicleFuelTypes.IndexModel;
|
||||
|
||||
namespace EveryThing.Pages.Projects
|
||||
{
|
||||
[Authorize(Roles = "Administrator,ProjecThingUser")]
|
||||
public class EditModel : PageModel
|
||||
{
|
||||
public class LinkToBuyersOrderData
|
||||
{
|
||||
public int IdProject { get; set; }
|
||||
public SelectList SelectListOrders { get; set; }
|
||||
public int IdOrder { get; set; }
|
||||
}
|
||||
|
||||
public class EditProjectPartData
|
||||
{
|
||||
public ProjectPartItem Item { get; set; }
|
||||
@@ -96,6 +104,12 @@ namespace EveryThing.Pages.Projects
|
||||
.OrderBy(x => x.InvoiceYear).ThenBy(x => x.InvoiceNumber)
|
||||
.ToListAsync();
|
||||
|
||||
Invoices.AddRange(await _context.Invoices
|
||||
.Include(x => x.Project)
|
||||
.Include(x => x.InvoiceInvoiceItem)
|
||||
.Where(x => x.IdProjectFk == id).ToArrayAsync());
|
||||
|
||||
|
||||
FilesProject = await _context.Files
|
||||
.Where(x => x.IdCompanyFk == user.IdCompanyFk
|
||||
&& x.IdReferenceFk == Project.IdProject
|
||||
@@ -820,5 +834,39 @@ namespace EveryThing.Pages.Projects
|
||||
|
||||
return new JsonResult(new { successful = true, error = "", idInvoice });
|
||||
}
|
||||
|
||||
public IActionResult OnGetLinkToProjectData(int idProject)
|
||||
{
|
||||
var user = _userManager.GetUserAsync(User).Result;
|
||||
|
||||
var selListOrders = new SelectList(_context.Invoices.Include(x => x.Partner)
|
||||
.Where(x => x.Type == Invoice.InvoiceType.BuyersOrder && x.State == Invoice.InvoiceState.Offer)
|
||||
.OrderByDescending(x => x.InvoiceYear).ThenBy(x => x.InvoiceNumber).ToList(), "IdInvoice", "InvoiceNumberFormattedLong");
|
||||
|
||||
return Partial("ModalCreateLinkToBuyersOrders", new LinkToBuyersOrderData
|
||||
{
|
||||
SelectListOrders = selListOrders,
|
||||
IdProject = idProject
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnPostLinkProjectToBuyerOrder(int idProject, int idOrder)
|
||||
{
|
||||
var user = _userManager.GetUserAsync(User).Result;
|
||||
|
||||
var project = _context.Projects.FirstOrDefault(x => x.IdProject == idProject);
|
||||
if (project == null)
|
||||
return new JsonResult(new { successful = false, error = $"Project with ID {idProject} not exists!" });
|
||||
|
||||
var invoice = _context.Invoices.FirstOrDefault(x => x.IdInvoice == idOrder);
|
||||
|
||||
if (invoice == null)
|
||||
return new JsonResult(new { successful = false, error = $"Invoice with ID {idOrder} not exists!" });
|
||||
|
||||
invoice.IdProjectFk = project.IdProject;
|
||||
_context.SaveChanges();
|
||||
|
||||
return new JsonResult(new { successful = true, error = ""});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
@model EveryThing.Pages.Projects.EditModel.LinkToBuyersOrderData
|
||||
|
||||
<div class="modal" tabindex="-1" role="dialog" id="divModalLinkToBuyersOrder">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalAddEditCodeTableItemTitle">Povezovanje ponudb</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input id="inpModalLinkToOrderIdProject" type="hidden" asp-for="@Model.IdProject" />
|
||||
<div class="form-group">
|
||||
<label class="control-label">Ponudba</label>
|
||||
<select id="selModalLinkToOrderIdProjectOrder" asp-for="IdOrder" asp-items="@Model.SelectListOrders" class="form-control" style="width: 100%">
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="btnModalLinkToOrderConfirm" type="button" class="btn btn-primary">Shrani</button>
|
||||
<button id="btnModalLinkToOrderCancel" type="button" class="btn btn-secondary">Prekliči</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user