processdocument call fix
This commit is contained in:
parent
b9cb52927f
commit
9d8f6f5c5a
|
|
@ -222,6 +222,7 @@ namespace Nop.Plugin.Misc.FruitBankPlugin.Areas.Admin.Controllers
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IActionResult> ProcessShippingDocument(int shippingDocumentId)
|
public async Task<IActionResult> ProcessShippingDocument(int shippingDocumentId)
|
||||||
{
|
{
|
||||||
|
var shippingDocument = await _dbContext.ShippingDocuments.GetByIdAsync(shippingDocumentId);
|
||||||
return Ok("Ok");
|
return Ok("Ok");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
@model Nop.Plugin.Misc.FruitBankPlugin.Areas.Admin.Models.TestGridModel
|
@model Nop.Plugin.Misc.FruitBankPlugin.Areas.Admin.Models.TestGridModel
|
||||||
@using DevExtreme.AspNet.Mvc
|
@using DevExtreme.AspNet.Mvc
|
||||||
|
@Html.AntiForgeryToken()
|
||||||
|
|
||||||
@{
|
@{
|
||||||
var contextId = Model.DataContext["contextId"];
|
var contextId = Model.DataContext["contextId"];
|
||||||
|
|
@ -68,7 +68,10 @@
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '@Url.Action("ProcessShippingDocument", "ManagementPage")',
|
url: '@Url.Action("ProcessShippingDocument", "ManagementPage")',
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: { shippingDocumentId: shippingDocumentId },
|
data: {
|
||||||
|
shippingDocumentId: shippingDocumentId,
|
||||||
|
__RequestVerificationToken: $('input[name="__RequestVerificationToken"]').val()
|
||||||
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
DevExpress.ui.notify("Shipping document processed successfully!", "success", 2000);
|
DevExpress.ui.notify("Shipping document processed successfully!", "success", 2000);
|
||||||
// Refresh the file manager
|
// Refresh the file manager
|
||||||
|
|
@ -81,7 +84,7 @@
|
||||||
DevExpress.ui.notify("Error processing shipping document: " + error, "error", 3000);
|
DevExpress.ui.notify("Error processing shipping document: " + error, "error", 3000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function fileUploader_valueChanged(e) {
|
function fileUploader_valueChanged(e) {
|
||||||
var files = e.value;
|
var files = e.value;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue