RunInfo navigation
This commit is contained in:
parent
85b30d9153
commit
56ec81e080
@ -1,4 +1,5 @@
|
|||||||
@page "/AwaitingDisposition"
|
@page "/"
|
||||||
|
@page "/AwaitingDisposition"
|
||||||
|
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
@using MudBlazor
|
@using MudBlazor
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
@page "/"
|
@page "/Index"
|
||||||
|
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
|
|
||||||
@namespace OI.Metrology.ClientHub.Pages
|
@namespace OI.Metrology.ClientHub.Pages
|
||||||
|
|
||||||
<PageTitle>Index</PageTitle>
|
<PageTitle>Index</PageTitle>
|
||||||
|
|
||||||
<h4>Run Information</h4>
|
|
||||||
|
|
||||||
Welcome to your new app.
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
@page "/RunHeaders"
|
@page "/RunHeaders"
|
||||||
|
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
|
@using MudBlazor
|
||||||
|
|
||||||
@namespace OI.Metrology.ClientHub.Pages
|
@namespace OI.Metrology.ClientHub.Pages
|
||||||
|
|
||||||
@ -29,3 +30,12 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<div class="row" style="margin-top: 10px; margin-bottom: 20px;">
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<MudButton Variant="Variant.Filled" Color="Color.Info" id="OpenButton">Open</MudButton>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<MudButton Variant="Variant.Filled" Color="Color.Primary" id="RefreshButton">Refresh</MudButton>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -1,4 +1,5 @@
|
|||||||
@page "/RunInfo/{Model?}"
|
@page "/RunInfo/{Model?}"
|
||||||
|
@page "/RunInfo/{ToolTypeId:int?}/{HeaderId:int?}"
|
||||||
|
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
@using MudBlazor
|
@using MudBlazor
|
||||||
|
@ -6,6 +6,8 @@ namespace OI.Metrology.ClientHub.Pages;
|
|||||||
public partial class RunInfo
|
public partial class RunInfo
|
||||||
{
|
{
|
||||||
|
|
||||||
|
[Parameter] public int? HeaderId { get; set; }
|
||||||
|
[Parameter] public int? ToolTypeId { get; set; }
|
||||||
[Parameter] public Metrology.Shared.ViewModels.RunInfo? Model { get; set; }
|
[Parameter] public Metrology.Shared.ViewModels.RunInfo? Model { get; set; }
|
||||||
|
|
||||||
[Inject] protected IJSRuntime? JSRuntime { get; set; }
|
[Inject] protected IJSRuntime? JSRuntime { get; set; }
|
||||||
@ -19,9 +21,9 @@ public partial class RunInfo
|
|||||||
throw new NullReferenceException(nameof(JSRuntime));
|
throw new NullReferenceException(nameof(JSRuntime));
|
||||||
if (AppSettings is null)
|
if (AppSettings is null)
|
||||||
throw new NullReferenceException(nameof(AppSettings));
|
throw new NullReferenceException(nameof(AppSettings));
|
||||||
int initialToolTypeID = Model is not null ? Model.ToolTypeID : 0;
|
int initialHeaderId = Model is not null ? Model.HeaderID : HeaderId is not null ? HeaderId.Value : 0;
|
||||||
int initialHeaderId = Model is not null ? Model.HeaderID : 0;
|
|
||||||
string initialHeaderAttachmentId = Model is not null ? Model.HeaderAttachmentID.ToString() : string.Empty;
|
string initialHeaderAttachmentId = Model is not null ? Model.HeaderAttachmentID.ToString() : string.Empty;
|
||||||
|
int initialToolTypeID = Model is not null ? Model.ToolTypeID : ToolTypeId is not null ? ToolTypeId.Value : 1;
|
||||||
return JSRuntime.InvokeVoidAsync("initRunInfo", AppSettings.ApiUrl, initialToolTypeID, initialHeaderId, initialHeaderAttachmentId).AsTask();
|
return JSRuntime.InvokeVoidAsync("initRunInfo", AppSettings.ApiUrl, initialToolTypeID, initialHeaderId, initialHeaderAttachmentId).AsTask();
|
||||||
}
|
}
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
@ -22,7 +22,7 @@ function loadRunInfoAwaitingDisposition() {
|
|||||||
var data = $("#grid").igGrid("findRecordByKey", row.id);
|
var data = $("#grid").igGrid("findRecordByKey", row.id);
|
||||||
if (data == null)
|
if (data == null)
|
||||||
return;
|
return;
|
||||||
var targetURL = "RunInfo?tooltypeid=" + data.ToolTypeID + "&headerid=" + data.ID;
|
var targetURL = "RunInfo/" + data.ToolTypeID + "/" + data.ID;
|
||||||
window.location.href = targetURL;
|
window.location.href = targetURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,6 +161,17 @@ function headerSelectionChangedRunHeaders(evt, ui) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function loadRunInfoRunHeaders() {
|
||||||
|
var row = $("#HeaderGrid").igGrid("selectedRow");
|
||||||
|
if (row == null)
|
||||||
|
return;
|
||||||
|
var data = $("#HeaderGrid").igGrid("findRecordByKey", row.id);
|
||||||
|
if (data == null)
|
||||||
|
return;
|
||||||
|
var targetURL = "RunInfo/" + data.ToolTypeID + "/" + data.ID;
|
||||||
|
window.location.href = targetURL;
|
||||||
|
}
|
||||||
|
|
||||||
function initRunHeaders(apiUrl) {
|
function initRunHeaders(apiUrl) {
|
||||||
_apiUrl = apiUrl;
|
_apiUrl = apiUrl;
|
||||||
// $("#ToolType").igCombo({
|
// $("#ToolType").igCombo({
|
||||||
@ -177,6 +188,11 @@ function initRunHeaders(apiUrl) {
|
|||||||
// selectionChanged: loadHeaderGridRunHeaders,
|
// selectionChanged: loadHeaderGridRunHeaders,
|
||||||
// });
|
// });
|
||||||
loadHeaderGridRunHeaders();
|
loadHeaderGridRunHeaders();
|
||||||
|
$("#RefreshButton").click(function () {
|
||||||
|
$("#HeaderGrid").igGrid("dataBind");
|
||||||
|
});
|
||||||
|
$("#OpenButton").click(loadRunInfoRunHeaders);
|
||||||
|
$("#HeaderGrid").on("dblclick", "tr", loadRunInfoRunHeaders);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadHeaderGridRunInfo() {
|
function loadHeaderGridRunInfo() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user