From d316a42a5eb6d1aba26f47e5bc7b94fd2483c62c Mon Sep 17 00:00:00 2001 From: ameerulrasyid Date: Fri, 7 Mar 2025 14:31:19 +0800 Subject: [PATCH] update ui --- .../Views/InventoryMaster/ItemMovement.cshtml | 6 ++ .../InventoryMaster/ItemRequestMaster.cshtml | 55 +------------------ 2 files changed, 9 insertions(+), 52 deletions(-) diff --git a/Areas/Inventory/Views/InventoryMaster/ItemMovement.cshtml b/Areas/Inventory/Views/InventoryMaster/ItemMovement.cshtml index 7bc3f7f..b1ac0c2 100644 --- a/Areas/Inventory/Views/InventoryMaster/ItemMovement.cshtml +++ b/Areas/Inventory/Views/InventoryMaster/ItemMovement.cshtml @@ -1419,9 +1419,15 @@ }, toggleCategory(itemId) { this.categoryVisible[itemId] = !this.categoryVisible[itemId]; + + this.detailsVisible = {}; + this.historyVisible = {}; }, toggleHistory(itemId) { + this.historyVisible = {}; this.historyVisible[itemId] = !this.historyVisible[itemId]; + + }, toggleDetails(movementId) { this.detailsVisible[movementId] = !this.detailsVisible[movementId]; diff --git a/Areas/Inventory/Views/InventoryMaster/ItemRequestMaster.cshtml b/Areas/Inventory/Views/InventoryMaster/ItemRequestMaster.cshtml index 39b2a41..f06f6c9 100644 --- a/Areas/Inventory/Views/InventoryMaster/ItemRequestMaster.cshtml +++ b/Areas/Inventory/Views/InventoryMaster/ItemRequestMaster.cshtml @@ -301,7 +301,7 @@ "className": "align-middle", }, { - "title": "Product Name", + "title": "Product", "data": "productName", "render": function (data, type, full, meta) { if (!data) { @@ -456,7 +456,7 @@ "data": "requestID", }, { - "title": "Product Name", + "title": "Product", "data": "productName", "render": function (data, type, full, meta) { if (!data) { @@ -468,7 +468,6 @@ var isImage = /\.(jpeg|jpg|png|gif)$/i.test(imageSrc); var isPdf = /\.pdf$/i.test(imageSrc); // var imageSrc = full.productImage; Fallback to data if imgsrc is unavailable - console.log(full); if (isImage) { return `
${data}
@@ -678,42 +677,6 @@ } }, - async fetchCompanies() { - try { - const response = await fetch('/AdminAPI/GetDepartmentWithCompanyList', { - method: 'POST', // Specify the HTTP method - headers: { - 'Content-Type': 'application/json' - } - }); - if (!response.ok) { - throw new Error('Failed to fetch companies'); - } - - this.companies = await response.json(); - - } catch (error) { - console.error('Error fetching products:', error); - } - }, - - async fetchSuppliers() { - try { - const response = await fetch('/InvMainAPI/SupplierList', { - method: 'POST', // Specify the HTTP method - headers: { - 'Content-Type': 'application/json' - } - }); - if (!response.ok) { - throw new Error('Failed to fetch suppliers'); - } - this.suppliers = await response.json(); // Get the full response object - - } catch (error) { - console.error('Error fetching suppliers:', error); - } - }, async fetchStation() { try { const response = await fetch('/InvMainAPI/StationList', { @@ -765,19 +728,7 @@ console.error('Error fetching suppliers:', error); } }, - async fetchCurrencyData() { - try { - // Fetch currency data from the API - const response = await fetch('https://openexchangerates.org/api/currencies.json'); // Example API - this.currencies = await response.json(); - } catch (error) { - console.error('Error fetching currency data:', error); - } - }, - convertCurrency() { - // Your currency conversion logic here - console.log('Selected currency:', this.currency); - }, + // FRONT END FUNCTIONS //----------------------//