LaaProductionWeb - urls adjusted for iis and localhost
This commit is contained in:
parent
428e8f4b02
commit
e525ea53aa
@ -1,6 +1,4 @@
|
||||
using System.Web;
|
||||
|
||||
namespace LaaProductionWeb.Services.Models
|
||||
namespace LaaProductionWeb.Services.Models
|
||||
{
|
||||
public class OrderClientModel
|
||||
{
|
||||
|
||||
@ -19,10 +19,10 @@
|
||||
= new Dictionary<int, bool> { { 1, false } };
|
||||
|
||||
public string PrintUrl
|
||||
=> $"/Shipments/Print?ordernr={this.OrderNr}&positionnr={this.PositionNr}&palletnr={this.PalletNr}";
|
||||
=> $"~/Shipments/Print?ordernr={this.OrderNr}&positionnr={this.PositionNr}&palletnr={this.PalletNr}";
|
||||
|
||||
public string DownloadUrl
|
||||
=> $"/Shipments/Download?ordernr={this.OrderNr}&positionnr={this.PositionNr}&palletnr={this.PalletNr}";
|
||||
=> $"~/Shipments/Download?ordernr={this.OrderNr}&positionnr={this.PositionNr}&palletnr={this.PalletNr}";
|
||||
|
||||
public void UpdatePalletsCount(int palletsCount)
|
||||
{
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -13,7 +13,7 @@
|
||||
if (filterContext.HttpContext.User is ClaimsPrincipal claimsPrincipal)
|
||||
{
|
||||
filterContext.Controller.TempData["Unauthorized"] = "Dir fehlen berechtigungen.";
|
||||
filterContext.Result = new RedirectResult($"/");
|
||||
filterContext.Result = new RedirectResult($"~/");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -64,7 +64,6 @@
|
||||
|
||||
if (result)
|
||||
{
|
||||
model.PositionNr = null;
|
||||
model.SerialNr = default(string);
|
||||
}
|
||||
else
|
||||
@ -80,7 +79,6 @@
|
||||
public ActionResult Delete(int id)
|
||||
{
|
||||
var orderScanModel = this.shipmentsService.DeletePalletEntry(id);
|
||||
orderScanModel.PositionNr = null;
|
||||
|
||||
return this.View(nameof(this.Index), new ShipmentModel(orderScanModel));
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
@model LaaProductionWeb.Services.Models.ProductionApproval
|
||||
|
||||
<form action="/Approvals/Add" method="post" autocomplete="off">
|
||||
<form action="~/Approvals/Add" method="post" autocomplete="off">
|
||||
@this.Html.AntiForgeryToken()
|
||||
<div class="container my-3">
|
||||
<div class="row">
|
||||
@ -152,7 +152,7 @@
|
||||
orderNrInput.oninput = (e) => {
|
||||
let value = e.target.value;
|
||||
if (value && value.length > 2) {
|
||||
fetch(`/Search/Production?productionNr=${orderNrInput.value}`)
|
||||
fetch(`@this.Url.Action("Production", "Search")?productionNr=${orderNrInput.value}`)
|
||||
.then(response => response.text())
|
||||
.then(html => loadDropdownItems(html))
|
||||
.catch(error => console.log(error));
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
@using LaaProductionWeb.Services.Models
|
||||
|
||||
<div class="d-flex flex-column h-100">
|
||||
<form action="/Protocol/DeleteFile" method="post" class="nav justify-content-end bg-whitesmoke">
|
||||
<form action="~/Protocol/DeleteFile" method="post" class="nav justify-content-end bg-whitesmoke">
|
||||
@this.Html.AntiForgeryToken()
|
||||
@this.Html.HiddenFor(x => x.FileId)
|
||||
@this.Html.HiddenFor(x => x.OrderId)
|
||||
|
||||
@ -48,14 +48,14 @@
|
||||
</th>
|
||||
<th class="text-center va-middle w-auto">
|
||||
<img src="~/App_Content/svg/sensus_xylem_logo.svg" width="210" class="mx-5"/>
|
||||
<form action="/Protocol/Index" method="post" enctype="multipart/form-data">
|
||||
<form action="~/Protocol/Index" method="post" enctype="multipart/form-data">
|
||||
@this.Html.HiddenFor(x => x.OrderId)
|
||||
@this.Html.HiddenFor(x => x.ClientId)
|
||||
@this.Html.HiddenFor(x => x.ClientName)
|
||||
@this.Html.HiddenFor(x => x.Positions)
|
||||
<input name="FilePDF" id="FilePDF" type="file" class="d-none" accept="application/pdf" onchange="javascript: this.form.submit();" />
|
||||
<div class="input-group flex-nowrap mt-3">
|
||||
<a class="btn btn-light border white-space-nowrap w-100" href="/Protocol/Print?orderId=@this.Model.OrderId" target="_blank">
|
||||
<a class="btn btn-light border white-space-nowrap w-100" href="~/Protocol/Print?orderId=@this.Model.OrderId" target="_blank">
|
||||
<i class="bi bi-printer me-2"></i> Vorschau
|
||||
</a>
|
||||
<label for="FilePDF" class="btn btn-outline-light border text-dark white-space-nowrap w-100">
|
||||
@ -91,7 +91,7 @@
|
||||
setTimeout(function handler() {
|
||||
let search = clientNrInput.value;
|
||||
if (search && search.length > 3) {
|
||||
fetch(`/Protocol/Clients?search=${search}`)
|
||||
fetch(`@this.Url.Action("Clients", "Protocol")?search=${search}`)
|
||||
.then(response => response.text())
|
||||
.then(orderItems => {
|
||||
clientMenu.innerHTML = orderItems;
|
||||
@ -111,7 +111,7 @@
|
||||
setTimeout(function handler() {
|
||||
let search = orderNrInput.value;
|
||||
if (search && search.length > 3) {
|
||||
fetch(`/Protocol/Orders?search=${search}`)
|
||||
fetch(`@this.Url.Action("Orders", "Protocol")?search=${search}`)
|
||||
.then(response => response.text())
|
||||
.then(orderItems => {
|
||||
orderMenu.innerHTML = orderItems;
|
||||
@ -128,7 +128,7 @@
|
||||
window.addEventListener('hashchange', function () {
|
||||
clientMenu.classList.remove(show);
|
||||
orderMenu.classList.remove(show);
|
||||
location.href = `/Protocol?orderId=${location.hash.substring(1)}`
|
||||
location.href = `@this.Url.Action("Index", "Protocol")?orderId=${location.hash.substring(1)}`
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
@model LaaProductionWeb.Services.Models.HeliumReportModel
|
||||
|
||||
<form action="/Report" method="post" autocomplete="off" class="h-100" id="he_report">
|
||||
<form action="~/Report" method="post" autocomplete="off" class="h-100" id="he_report">
|
||||
<div class="table-responsive h-100 mh-100">
|
||||
<table class="table table-sm table-bordered mb-0">
|
||||
<thead class="bg-light">
|
||||
@ -73,7 +73,7 @@
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form action="/Report/CSV" method="post" autocomplete="off" class="position-fixed bottom-0 end-0 m-2">
|
||||
<form action="~/Report/CSV" method="post" autocomplete="off" class="position-fixed bottom-0 end-0 m-2">
|
||||
@this.Html.AntiForgeryToken()
|
||||
@foreach (var filter in this.Model.Filter)
|
||||
{
|
||||
@ -128,7 +128,7 @@
|
||||
if (location.hash) {
|
||||
let testId = location.hash.substring(1);
|
||||
if (testId) {
|
||||
fetch(`/Report/Results?testId=${testId}`)
|
||||
fetch(`~/Report/Results?testId=${testId}`)
|
||||
.then(response => response.text())
|
||||
.then(function (html) {
|
||||
tbody.innerHTML = html;
|
||||
|
||||
@ -74,7 +74,7 @@
|
||||
</td>
|
||||
<td class="va-middle text-end">@(item.IsScaned ? item.PalletNr : null)</td>
|
||||
<td class="va-middle text-center">
|
||||
<a class="btn btn-sm btn-danger" href="/Shipments/Delete/@item.Id">
|
||||
<a class="btn btn-sm btn-danger" href="~/Shipments/Delete/@item.Id">
|
||||
<i class="bi bi-x"></i>
|
||||
</a>
|
||||
</td>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<div class="col-md-3 py-3 h-100 scrollable-sm bg-light border-end shadow-sm">
|
||||
<h5 class="text-smallcaps">Palettenbegleiter</h5>
|
||||
<hr />
|
||||
<form id="order_form" action="/Shipments" method="post" autocomplete="off">
|
||||
<form id="order_form" action="~/Shipments" method="post" autocomplete="off">
|
||||
@this.Html.AntiForgeryToken()
|
||||
<div class="form-floating mb-3 dropdown">
|
||||
@this.Html.TextBoxFor(x => x.OrderNr, new { id = "order_nr", @class = "form-control", placeholder = "0000000000" })
|
||||
@ -74,7 +74,7 @@
|
||||
orderNrMenu.innerHTML = null;
|
||||
let orderNr = orderNrInput.value;
|
||||
if (orderNr && orderNr.length > 3) {
|
||||
fetch(`/Search/Orders?search=${orderNr}`)
|
||||
fetch(`@this.Url.Action("Orders", "Search")?search=${orderNr}?search=${orderNr}`)
|
||||
.then(response => response.text())
|
||||
.then(data => ordersAutocomplete(data))
|
||||
.catch(error => console.log(error));
|
||||
@ -97,7 +97,7 @@
|
||||
|
||||
function getPositions(orderNr) {
|
||||
if (orderNr && orderNr.length > 3) {
|
||||
fetch(`/Search/Positions?ordernr=${orderNr}`)
|
||||
fetch(`@this.Url.Action("Positions", "Search")?ordernr=${orderNr}`)
|
||||
.then(response => response.text())
|
||||
.then(data => positionsHandler(data))
|
||||
.catch(error => console.log(error));
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<h5 class="text-smallcaps">@this.Model.ScanTitle</h5>
|
||||
<hr />
|
||||
</div>
|
||||
<form id="scan_form" action="/Shipments/ScanPost" method="post" autocomplete="off">
|
||||
<form id="scan_form" action="~/Shipments/ScanPost" method="post" autocomplete="off">
|
||||
@this.Html.AntiForgeryToken()
|
||||
@this.Html.HiddenFor(x => x.OrderNr)
|
||||
@this.Html.HiddenFor(x => x.PositionNr)
|
||||
@ -21,10 +21,10 @@
|
||||
<label for="@id" class="@css mb-3 me-3">@pallet.Key</label>
|
||||
<input id="@id" name="@nameof(this.Model.PalletNr)" value="@pallet.Key" class="d-none" type="submit" />
|
||||
}
|
||||
<a class="btn btn-outline-secondary mb-3 me-3" href="@this.Model.PrintUrl" target="_blank">
|
||||
<a class="btn btn-outline-secondary mb-3 me-3" href="@this.Url.Content(this.Model.PrintUrl)" target="_blank">
|
||||
<i class="bi bi-printer"></i> Druckvorschau
|
||||
</a>
|
||||
<a class="btn btn-outline-secondary mb-3 me-3" href="@this.Model.DownloadUrl">
|
||||
<a class="btn btn-outline-secondary mb-3 me-3" href="@this.Url.Content(this.Model.DownloadUrl)">
|
||||
<i class="bi bi-filetype-csv"></i> Herunterladen
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user