diff --git a/Areas/Inventory/Views/InventoryMaster/ItemMovement.cshtml b/Areas/Inventory/Views/InventoryMaster/ItemMovement.cshtml index ce43c42..12bf185 100644 --- a/Areas/Inventory/Views/InventoryMaster/ItemMovement.cshtml +++ b/Areas/Inventory/Views/InventoryMaster/ItemMovement.cshtml @@ -1153,11 +1153,16 @@ this.historyVisible = {}; }, toggleHistory(itemId) { + // Jika item yang ditekan sudah terbuka, tutup + if (this.historyVisible[itemId]) { + this.historyVisible[itemId] = false; + } else { + // Tutup semua history lain dahulu + this.historyVisible = {}; - this.historyVisible[itemId] = !this.historyVisible[itemId]; - // this.historyVisible = {}; - - + // Buka hanya item yang ditekan + this.historyVisible[itemId] = true; + } }, toggleDetails(movementId) { this.detailsVisible[movementId] = !this.detailsVisible[movementId]; 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) { diff --git a/appsettings.json b/appsettings.json index 5b9735b..76db4eb 100644 --- a/appsettings.json +++ b/appsettings.json @@ -3,7 +3,7 @@ //"DefaultConnection": "Server=localhost;uid=root;Password='';Database=web_interface;" //"DefaultConnection": "server=175.136.244.102;user id=root;password=tw_mysql_root;port=3306;database=web_interface" //"CentralConnnection": "Server=192.168.12.12;Port=3306;uid=installer;password='pstw_mysql_installer';database=pstw_cs;", //DB_dev Local connection - "CentralConnnection": "Server=219.92.7.60;Port=3307;uid=installer;password='pstw_mysql_installer';database=pstw_cs;" //DB_dev Public connection + "CentralConnnection": "Server=219.92.7.60;Port=3307;uid=installer;password='pstw_mysql_installer';database=pstw_cs_prod;" //DB_dev Public connection //"InventoryConnection": "Server=219.92.7.60;Port=3307;uid=installer;password='pstw_mysql_installer';database=pstw_cs_inventory;" //DB_dev connection //"DefaultConnection": "Server=219.92.7.60;Port=3307;uid=intern;password='intern_mysql_acct';database=web_interface;"//DB_dev connection },