Compare commits
3 Commits
8cb745063d
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ef09b334c | ||
|
|
075283f884 | ||
|
|
57946e64d5 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -3,6 +3,9 @@
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||
|
||||
Caddy/*
|
||||
!Caddyfile
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
|
||||
16
Caddy/Caddyfile
Normal file
16
Caddy/Caddyfile
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
log {
|
||||
output stderr
|
||||
format json {
|
||||
time_local
|
||||
time_format wall_milli
|
||||
duration_format string
|
||||
}
|
||||
level debug
|
||||
}
|
||||
}
|
||||
|
||||
http://*:9000 {
|
||||
reverse_proxy localhost:5000
|
||||
log
|
||||
}
|
||||
@@ -29,7 +29,6 @@ namespace WebPostPartialJsonObject.Controllers
|
||||
HttpContext.Session.SetObject("KioskSettings", data);
|
||||
return RedirectToAction("Index", "Settings");
|
||||
}
|
||||
|
||||
public IActionResult Privacy()
|
||||
{
|
||||
return View();
|
||||
|
||||
@@ -11,5 +11,13 @@ namespace WebPostPartialJsonObject.Controllers
|
||||
ExpectedViewModel data = HttpContext.Session.GetObject<ExpectedViewModel>("KioskSettings");
|
||||
return View(data);
|
||||
}
|
||||
[HttpPost]
|
||||
public IActionResult Reprint([FromForm] int ckinid)
|
||||
{
|
||||
ReprintInfo model = new ReprintInfo();
|
||||
model.CkInId = ckinid;
|
||||
model.PrinterName = "printer";
|
||||
return PartialView("ReprintView", model);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
14
WebPostPartialJsonObject/Models/ReprintInfo.cs
Normal file
14
WebPostPartialJsonObject/Models/ReprintInfo.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
namespace WebPostPartialJsonObject.Models
|
||||
{
|
||||
|
||||
public class ReprintInfo
|
||||
{
|
||||
public IEnumerable<string> LabelSets { get; set; }
|
||||
public IEnumerable<string> LabelNames { get; set; }
|
||||
public int PrinterType { get; set; }
|
||||
public string PrinterName { get; set; }
|
||||
public int CkInId { get; set; }
|
||||
}
|
||||
}
|
||||
7
WebPostPartialJsonObject/Models/ReprintRequest.cs
Normal file
7
WebPostPartialJsonObject/Models/ReprintRequest.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace WebPostPartialJsonObject.Models
|
||||
{
|
||||
public class ReprintRequest
|
||||
{
|
||||
public int CkInId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
"WebPostPartialJsonObject": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "http://localhost:5000",
|
||||
"applicationUrl": "http://+:5000",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
|
||||
@@ -26,13 +26,44 @@
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
</div>
|
||||
</form>
|
||||
<div id="reprintLabels" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Select the labels you want to reprint</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">x</span></button>
|
||||
</div>
|
||||
<div class="modal-body" id="reprintLabelsForm"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn btn-outline-secondary" id="btnReprintLabels" data-toggle="modal" data-target="#reprintLabels" data-ckinid="123">
|
||||
Reprint Label(s)
|
||||
</button>
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||
@{
|
||||
await Html.RenderPartialAsync("_ValidationScriptsPartial");
|
||||
}
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#btnReprintLabels').click(function (e) { pickLabels(e, $(this)); });
|
||||
|
||||
function pickLabels(e, element) {
|
||||
var id = element.data('ckinid');
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/Settings/Reprint',
|
||||
data: { 'ckinid': id },
|
||||
success: function (response) {
|
||||
$('#reprintLabelsForm').html(response);
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
}
|
||||
|
||||
10
WebPostPartialJsonObject/Views/Settings/ReprintView.cshtml
Normal file
10
WebPostPartialJsonObject/Views/Settings/ReprintView.cshtml
Normal file
@@ -0,0 +1,10 @@
|
||||
@*
|
||||
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
||||
*@
|
||||
@model WebPostPartialJsonObject.Models.ReprintInfo
|
||||
@{
|
||||
|
||||
}
|
||||
|
||||
<h5>Partial View @Model.CkInId</h5>
|
||||
<div>Printer: @Model.PrinterName</div>
|
||||
Reference in New Issue
Block a user