From d7e93a98b3a79f7283b027a838c5283e8a9a8b38 Mon Sep 17 00:00:00 2001 From: Mohd Ariff Date: Tue, 26 Nov 2024 10:50:50 +0800 Subject: [PATCH] Update --- .../InventoryAdmin/AdminDashboard.cshtml | 51 +---------------- .../Views/Item/ProductRegistration.cshtml | 41 ++++++++----- .../Main/ManifacturerRegistration.cshtml | 57 ++++++++++++++++--- .../Inventory/Views/_InventoryPartial.cshtml | 51 +++++++++++++++++ Controllers/API/Inventory/InvMainAPI.cs | 17 +++++- Controllers/API/ModuleAPI.cs | 27 +++++++++ 6 files changed, 169 insertions(+), 75 deletions(-) create mode 100644 Areas/Inventory/Views/_InventoryPartial.cshtml diff --git a/Areas/Inventory/Views/InventoryAdmin/AdminDashboard.cshtml b/Areas/Inventory/Views/InventoryAdmin/AdminDashboard.cshtml index f52c9ca..6b260fa 100644 --- a/Areas/Inventory/Views/InventoryAdmin/AdminDashboard.cshtml +++ b/Areas/Inventory/Views/InventoryAdmin/AdminDashboard.cshtml @@ -9,53 +9,4 @@

Learn about building Web apps with ASP.NET Core.

-
- - - - -
+@await Html.PartialAsync("~/Areas/Inventory/Views/_InventoryPartial.cshtml"); \ No newline at end of file diff --git a/Areas/Inventory/Views/Item/ProductRegistration.cshtml b/Areas/Inventory/Views/Item/ProductRegistration.cshtml index 49a9e10..18ea02b 100644 --- a/Areas/Inventory/Views/Item/ProductRegistration.cshtml +++ b/Areas/Inventory/Views/Item/ProductRegistration.cshtml @@ -3,23 +3,12 @@ Layout = "~/Views/Shared/_Layout.cshtml"; } +@await Html.PartialAsync("~/Areas/Inventory/Views/_InventoryPartial.cshtml");
- - @*Left Side*@ -
- -

Welcome

-

Registration Product! Click button to go Registration Item Page

- - Item Registration
-
- - - @*Right Side*@ -
+

REGISTRATION PRODUCT

@@ -137,7 +126,7 @@ el: '#registerProduct', data: { productName: null, - manufacturer: '', + manufacturer: null, category: null, modelNo: null, quantityProduct: null, @@ -274,7 +263,29 @@ this.imageSrc = ''; this.imageProduct = null; } - } + }, + async fetchManufactures() { + fetch('/InvMainAPI/ManufacturerList', { + method: 'POST' + }) + .then(response => response.json()) + .then(data => { + console.log(data); + if (data != null && data.length > 0) + { + this.manufacturer = data; + } + if (!this.manufacturerDatatable) { + this.initiateTable(); + } else { + this.fillTable(data); + } + }) + .catch(error => { + console.error('There was a problem with the fetch operation:', error); + }); + + }, } }); diff --git a/Areas/Inventory/Views/Main/ManifacturerRegistration.cshtml b/Areas/Inventory/Views/Main/ManifacturerRegistration.cshtml index 09a02a5..a8bbb7f 100644 --- a/Areas/Inventory/Views/Main/ManifacturerRegistration.cshtml +++ b/Areas/Inventory/Views/Main/ManifacturerRegistration.cshtml @@ -3,10 +3,11 @@ Layout = "~/Views/Shared/_Layout.cshtml"; } +@await Html.PartialAsync("~/Areas/Inventory/Views/_InventoryPartial.cshtml");
-
+
@@ -14,7 +15,7 @@ Loading...
-
+