diff --git a/Areas/Inventory/Views/ItemMovement/ItemMovementUser.cshtml b/Areas/Inventory/Views/ItemMovement/ItemMovementUser.cshtml index a76270b..463cfb5 100644 --- a/Areas/Inventory/Views/ItemMovement/ItemMovementUser.cshtml +++ b/Areas/Inventory/Views/ItemMovement/ItemMovementUser.cshtml @@ -136,12 +136,12 @@ - -
- + + +

Start

User: {{ movement.toUserName }}

Station: {{ movement.toStationName }}

@@ -151,16 +151,29 @@

{{ movement.latestStatus || movement.toOther }}

+

+ +

+

+ +

- -

End {{ movement.latestStatus }}

+ + + +

End

User: {{ movement.lastUserName }}

Station: {{ movement.lastStationName }}

Store: {{ movement.lastStoreName }}

+ @@ -197,9 +210,9 @@ -
+

Status:

- {{ movement.latestStatus || movement.toOther }} + {{ movement.latestStatus || movement.toOther }}
@@ -218,7 +231,9 @@
- + + +

Start

User: {{ movement.toUserName }}

Station: {{ movement.toStationName }}

@@ -228,9 +243,21 @@

{{ movement.latestStatus || movement.toOther }}

+

+ +

+

+ +

- + + +

End

User: {{ movement.lastUserName }}

Station: {{ movement.lastStationName }}

@@ -238,12 +265,44 @@
+
+ + @@ -268,6 +327,7 @@ historyVisible: {}, detailsVisible: {}, categoryVisible: {}, + consignmentNoteUrl: "", }; }, computed: { @@ -296,10 +356,32 @@ }, }, mounted() { - console.log("Vue app mounted!"); this.fetchItemMovement(); }, methods: { + remark(remark) { + document.getElementById("remarkContent").innerText = remark || "No remark message provide."; + let modal = new bootstrap.Modal(document.getElementById("remarkModal")); + modal.show(); + }, + + consignmentNote(consignmentNote) { + if (!consignmentNote) { + this.consignmentNoteUrl = "No consignment note available."; + new bootstrap.Modal(document.getElementById('consignmentModal')).show(); + return; + } + + // Pastikan URL betul + this.consignmentNoteUrl = consignmentNote; + + // Tunggu Vue update sebelum buka modal + this.$nextTick(() => { + new bootstrap.Modal(document.getElementById('consignmentModal')).show(); + }); + }, + + async fetchItemMovement() { try { const response = await fetch("/InvMainAPI/ItemMovementUser", { diff --git a/Areas/Inventory/Views/ItemMovement/QrUser.cshtml b/Areas/Inventory/Views/ItemMovement/QrUser.cshtml index fd32e6d..57c2e8f 100644 --- a/Areas/Inventory/Views/ItemMovement/QrUser.cshtml +++ b/Areas/Inventory/Views/ItemMovement/QrUser.cshtml @@ -516,11 +516,11 @@ method: 'POST', } ); - + if (response.ok) { this.thisItem = await response.json(); - if (this.thisItem.movementId != null && this.thisItem.toOther === "On Delivery" && this.thisItem.latestStatus == null && this.thisItem.currentUserId == this.currentUserId && this.movementComplete == 0) { + if (this.thisItem.movementId != null && this.thisItem.toOther === "On Delivery" && this.thisItem.latestStatus == null && this.thisItem.currentUserId == this.currentUserId && this.thisItem.movementComplete == 0) { this.displayStatus = "arrived"; } else if (this.thisItem.movementId != null && this.thisItem.toOther === "On Delivery" && this.thisItem.latestStatus != null && this.thisItem.currentUserId == this.currentUserId && this.thisItem.latestStatus != "Ready To Deploy") { this.displayStatus = "return";