From 1e49f979aa82e86263244b097eb9622fe5a5bc74 Mon Sep 17 00:00:00 2001 From: ArifHilmi Date: Sat, 8 Mar 2025 02:24:14 +0800 Subject: [PATCH] Item Movement User --- .../Views/InventoryMaster/ItemRegistration.cshtml | 2 +- .../Views/ItemMovement/ItemMovementUser.cshtml | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Areas/Inventory/Views/InventoryMaster/ItemRegistration.cshtml b/Areas/Inventory/Views/InventoryMaster/ItemRegistration.cshtml index a4cb48b..f91c0dc 100644 --- a/Areas/Inventory/Views/InventoryMaster/ItemRegistration.cshtml +++ b/Areas/Inventory/Views/InventoryMaster/ItemRegistration.cshtml @@ -530,7 +530,7 @@ alert('Success!', 'Item form has been successfully submitted.', 'success'); const updatedItem = await response.json(); this.items.push(updatedItem); - + this.fetchUser(); this.fetchItem(); // Reset the form diff --git a/Areas/Inventory/Views/ItemMovement/ItemMovementUser.cshtml b/Areas/Inventory/Views/ItemMovement/ItemMovementUser.cshtml index 54b4709..63fef19 100644 --- a/Areas/Inventory/Views/ItemMovement/ItemMovementUser.cshtml +++ b/Areas/Inventory/Views/ItemMovement/ItemMovementUser.cshtml @@ -841,8 +841,16 @@ }, toggleHistory(itemId) { - this.historyVisible = {}; - this.historyVisible[itemId] = !this.historyVisible[itemId]; + // Jika item yang ditekan sudah terbuka, tutup + if (this.historyVisible[itemId]) { + this.historyVisible[itemId] = false; + } else { + // Tutup semua history lain dahulu + this.historyVisible = {}; + + // Buka hanya item yang ditekan + this.historyVisible[itemId] = true; + } }, toggleDetails(movementId) {