Qr & Movement Display

This commit is contained in:
ArifHilmi 2025-03-04 15:55:25 +08:00
parent a0d84272aa
commit 3ec456afbd
3 changed files with 15 additions and 5 deletions

View File

@ -181,7 +181,7 @@
<div class="col-md-4 text-center"> <div class="col-md-4 text-center">
<!-- Conditionally render End Icon --> <!-- Conditionally render End Icon -->
<i v-if="movement.lastStation" class="fas fa-map-marker-alt"></i> <i v-if="movement.lastStation" class="fas fa-map-marker-alt"></i>
<i v-v-else-if="movement.toOther !== 'On Delivery'" class="fas fa-warehouse fa-2x"></i> <i v-else-if="movement.toOther !== 'On Delivery'" class="fas fa-warehouse fa-2x"></i>
<i v-else class="fas fa-user fa-2x"></i> <i v-else class="fas fa-user fa-2x"></i>
<p><strong>End</strong></p> <p><strong>End</strong></p>
<p v-if="movement.lastUser !== null"><strong>User:</strong> {{ movement.lastUserName }}</p> <p v-if="movement.lastUser !== null"><strong>User:</strong> {{ movement.lastUserName }}</p>

View File

@ -109,10 +109,18 @@
</p> </p>
</div> </div>
<!-- PIC --> <!-- Station -->
<div class="col-12 mb-3"> <div class="col-12 mb-3">
<p class="h5 fw-bold"> <p class="h5 fw-bold">
<i class="fas fa-user-tie me-2 text-secondary"></i>PIC: <i class="fas fa-user-tie me-2 text-secondary"></i>PIC:
<span class="text-muted">{{thisItem.currentUserFullName}}</span>
</p>
</div>
<!-- Station -->
<div class="col-12 mb-3">
<p class="h5 fw-bold">
<i class="fas fa-user-tie me-2 text-secondary"></i>Station:
<span class="text-muted">{{thisItem.currentStation || 'No Station Deploy (Self Assign)' }}</span> <span class="text-muted">{{thisItem.currentStation || 'No Station Deploy (Self Assign)' }}</span>
</p> </p>
</div> </div>
@ -219,7 +227,7 @@
<div class="form-group row"> <div class="form-group row">
<div class="col-sm-8 offset-sm-5"> <div class="col-sm-8 offset-sm-5">
<button type="submit" v-on:click="ReturnMessage" class="btn btn-primary m-1">Return Item</button> <button type="submit" v-on:click="ReturnMessage" class="btn btn-primary m-1">Return Item</button>
<button type="submit" v-on:click="StationMessage" class="btn btn-primary m-1" v-if="thisItem.currentStationId == null">Deploy Station</button> <button type="submit" v-on:click="StationMessage" class="btn btn-primary m-1">{{ thisItem?.currentStationId == null ? "Deploy Station" : "Change Station" }}</button>
</div> </div>
</div> </div>
@ -235,7 +243,7 @@
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title" id="stationModalLabel">Deploy Station</h5> <h5 class="modal-title" id="stationModalLabel">{{ thisItem?.currentStationId == null ? "Deploy Station" : "Change Station" }}</h5>
<button type="button" class="close" data-dismiss="modal" v-on:click="closeStationMessageModal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" v-on:click="closeStationMessageModal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>

View File

@ -523,6 +523,7 @@ namespace PSTW_CentralSystem.Controllers.API.Inventory
item.Product!.ProductShortName, item.Product!.ProductShortName,
item.Product!.ImageProduct, item.Product!.ImageProduct,
CurrentUser = item.Movement?.FromUser?.UserName, CurrentUser = item.Movement?.FromUser?.UserName,
CurrentUserFullName = item.Movement?.FromUser?.FullName,
CurrentUserId = item.Movement?.FromUser?.Id, CurrentUserId = item.Movement?.FromUser?.Id,
CurrentStore = item.Movement?.FromStore?.StoreName, CurrentStore = item.Movement?.FromStore?.StoreName,
CurrentStoreId = item.Movement?.FromStore?.Id, CurrentStoreId = item.Movement?.FromStore?.Id,
@ -1223,9 +1224,10 @@ namespace PSTW_CentralSystem.Controllers.API.Inventory
receiveItems.ItemStatus = 3; receiveItems.ItemStatus = 3;
_centralDbContext.Items.Update(receiveItems); _centralDbContext.Items.Update(receiveItems);
await _centralDbContext.SaveChangesAsync(); // Simpan perubahan
} }
await _centralDbContext.SaveChangesAsync();
return Json(updatedList); return Json(updatedList);
} }
catch (Exception ex) catch (Exception ex)