Compare commits
No commits in common. "771832c6e4dacb6ccf27bdd3a0aa1471b175dd2e" and "9b0afb2d2ccc16105a4ffb5d52feda5e5688bcee" have entirely different histories.
771832c6e4
...
9b0afb2d2c
|
|
@ -222,7 +222,6 @@ 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"];
|
||||||
|
|
@ -63,28 +63,25 @@
|
||||||
<script>
|
<script>
|
||||||
// Process Shipping Document function
|
// Process Shipping Document function
|
||||||
function processShippingDocument_@(contextId)() {
|
function processShippingDocument_@(contextId)() {
|
||||||
var shippingDocumentId = @contextId;
|
var shippingDocumentId = @contextId;
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '@Url.Action("ProcessShippingDocument", "ManagementPage")',
|
url: '@Url.Action("ProcessShippingDocument", "ManagementPage")',
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: {
|
data: { shippingDocumentId: shippingDocumentId },
|
||||||
shippingDocumentId: shippingDocumentId,
|
success: function(response) {
|
||||||
__RequestVerificationToken: $('input[name="__RequestVerificationToken"]').val()
|
DevExpress.ui.notify("Shipping document processed successfully!", "success", 2000);
|
||||||
},
|
// Refresh the file manager
|
||||||
success: function(response) {
|
var fileManager = $("#@fileManagerId").dxFileManager("instance");
|
||||||
DevExpress.ui.notify("Shipping document processed successfully!", "success", 2000);
|
if (fileManager) {
|
||||||
// Refresh the file manager
|
fileManager.refresh();
|
||||||
var fileManager = $("#@fileManagerId").dxFileManager("instance");
|
}
|
||||||
if (fileManager) {
|
},
|
||||||
fileManager.refresh();
|
error: function(xhr, status, error) {
|
||||||
|
DevExpress.ui.notify("Error processing shipping document: " + error, "error", 3000);
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
error: function(xhr, status, error) {
|
}
|
||||||
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