Item Movement User

This commit is contained in:
ArifHilmi 2025-03-08 02:24:14 +08:00
parent 9ed5e6b6a5
commit 1e49f979aa
2 changed files with 11 additions and 3 deletions

View File

@ -530,7 +530,7 @@
alert('Success!', 'Item form has been successfully submitted.', 'success'); alert('Success!', 'Item form has been successfully submitted.', 'success');
const updatedItem = await response.json(); const updatedItem = await response.json();
this.items.push(updatedItem); this.items.push(updatedItem);
this.fetchUser();
this.fetchItem(); this.fetchItem();
// Reset the form // Reset the form

View File

@ -841,8 +841,16 @@
}, },
toggleHistory(itemId) { toggleHistory(itemId) {
this.historyVisible = {}; // Jika item yang ditekan sudah terbuka, tutup
this.historyVisible[itemId] = !this.historyVisible[itemId]; 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) { toggleDetails(movementId) {