2097 lines
121 KiB
Plaintext
2097 lines
121 KiB
Plaintext
|
|
<!DOCTYPE html>
|
|
<html dir="ltr" lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<!-- Tell the browser to be responsive to screen width -->
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<meta name="keywords"
|
|
content="wrappixel, admin dashboard, html css dashboard, web dashboard, bootstrap 5 admin, bootstrap 5, css3 dashboard, bootstrap 5 dashboard, Matrix lite admin bootstrap 5 dashboard, frontend, responsive bootstrap 5 admin template, Matrix admin lite design, Matrix admin lite dashboard bootstrap 5 dashboard template" />
|
|
<meta name="description"
|
|
content="Matrix Admin Lite Free Version is powerful and clean admin dashboard template, inpired from Bootstrap Framework" />
|
|
<meta name="robots" content="noindex,nofollow" />
|
|
<title>PSTW Centralize Web System</title>
|
|
<!-- Favicon icon -->
|
|
<link rel="icon"
|
|
type="image/png"
|
|
sizes="16x16"
|
|
href="/assets/images/favicon.png" />
|
|
|
|
|
|
<!-- Custom CSS -->
|
|
<link rel="stylesheet" href="/assets/libs/select2/dist/css/select2.min.css" />
|
|
<link rel="stylesheet" href="/assets/libs/jquery-minicolors/jquery.minicolors.css" />
|
|
<link rel="stylesheet" href="/assets/libs/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css" />
|
|
<link rel="stylesheet" href="/assets/libs/quill/dist/quill.snow.css" />
|
|
<link href="/dist/css/style.min.css" rel="stylesheet" />
|
|
<link href="/lib/printjs/print.min.css" rel="stylesheet" />
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
|
|
<!-- DataTables CSS-->
|
|
<link href="/lib/datatables/datatables.css" rel="stylesheet" />
|
|
<!-- Vue Js -->
|
|
<script src="/js/vue.global.js"></script>
|
|
<!-- QR Js -->
|
|
<script src="/lib/qrcode/qrcode.min.js"></script>
|
|
|
|
|
|
|
|
|
|
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
|
<!--[if lt IE 9]>
|
|
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
|
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
|
<![endif]-->
|
|
</head>
|
|
<body>
|
|
<style>
|
|
|
|
.btn-teal {
|
|
background-color: #20c997; /* Teal color */
|
|
color: #ffffff; /* White text */
|
|
border: none; /* Remove border */
|
|
}
|
|
|
|
.btn-teal:hover {
|
|
background-color: #17a589; /* Darker teal on hover */
|
|
color: #ffffff;
|
|
}
|
|
|
|
.btn-teal:focus,
|
|
.btn-teal.focus {
|
|
box-shadow: 0 0 0 0.2rem rgba(32, 201, 151, 0.5); /* Teal shadow on focus */
|
|
}
|
|
</style>
|
|
<!-- ============================================================== -->
|
|
<!-- Preloader - style you can find in spinners.css -->
|
|
<!-- ============================================================== -->
|
|
<div b-lhtx71ohus id="preloader" class="preloader">
|
|
<div b-lhtx71ohus class="lds-ripple">
|
|
<div b-lhtx71ohus class="lds-pos"></div>
|
|
<div b-lhtx71ohus class="lds-pos"></div>
|
|
</div>
|
|
</div>
|
|
<div b-lhtx71ohus class="modal fade" id="loadingModal" data-bs-backdrop="static" tabindex="-1" aria-hidden="true" style="z-index: 1051;">
|
|
<div b-lhtx71ohus class="modal-dialog modal-dialog-centered">
|
|
<div b-lhtx71ohus class="modal-content">
|
|
<div b-lhtx71ohus class="modal-header">
|
|
<button b-lhtx71ohus type="button" class="closeModal" data-dismiss="modal" aria-label="Close">
|
|
<span b-lhtx71ohus aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div b-lhtx71ohus class="modal-body text-center">
|
|
<div b-lhtx71ohus class="spinner-border text-primary" role="status">
|
|
<span b-lhtx71ohus class="visually-hidden">Loading...</span>
|
|
</div>
|
|
<p b-lhtx71ohus class="mt-3">Please wait while we process your request...</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- ============================================================== -->
|
|
<!-- Main wrapper - style you can find in pages.scss -->
|
|
<!-- ============================================================== -->
|
|
<div b-lhtx71ohus id="main-wrapper"
|
|
data-layout="vertical"
|
|
data-navbarbg="skin5"
|
|
data-sidebartype="full"
|
|
data-sidebar-position="absolute"
|
|
data-header-position="absolute"
|
|
data-boxed-layout="full">
|
|
<!-- ============================================================== -->
|
|
<!-- Topbar header - style you can find in pages.scss -->
|
|
<!-- ============================================================== -->
|
|
<header b-lhtx71ohus class="topbar" data-navbarbg="skin5">
|
|
<nav b-lhtx71ohus class="navbar top-navbar navbar-expand-md navbar-dark">
|
|
<div b-lhtx71ohus class="navbar-header" data-logobg="skin5">
|
|
<!-- ============================================================== -->
|
|
<!-- Logo -->
|
|
<!-- ============================================================== -->
|
|
<a class="navbar-brand" href="/">
|
|
<!-- Logo icon -->
|
|
<b b-lhtx71ohus class="logo-icon ps-2">
|
|
<!--You can put here icon as well // <i class="wi wi-sunset"></i> //-->
|
|
<!-- Dark Logo icon -->
|
|
<img b-lhtx71ohus src="/assets/images/logo-icon.png"
|
|
alt="homepage"
|
|
class="light-logo"
|
|
width="25" />
|
|
</b>
|
|
<!--End Logo icon -->
|
|
<!-- Logo text -->
|
|
<span b-lhtx71ohus class="logo-text ms-2">
|
|
<!-- dark Logo text -->
|
|
<img b-lhtx71ohus src="/assets/images/logo-text.png"
|
|
alt="homepage"
|
|
class="light-logo" />
|
|
</span>
|
|
<!-- Logo icon -->
|
|
<!-- <b class="logo-icon"> -->
|
|
<!--You can put here icon as well // <i class="wi wi-sunset"></i> //-->
|
|
<!-- Dark Logo icon -->
|
|
<!-- <img src="/assets/images/logo-text.png" alt="homepage" class="light-logo" /> -->
|
|
<!-- </b> -->
|
|
<!--End Logo icon -->
|
|
</a>
|
|
<!-- ============================================================== -->
|
|
<!-- End Logo -->
|
|
<!-- ============================================================== -->
|
|
<!-- ============================================================== -->
|
|
<!-- Toggle which is visible on mobile only -->
|
|
<!-- ============================================================== -->
|
|
<a b-lhtx71ohus class="nav-toggler waves-effect waves-light d-block d-md-none"
|
|
href="javascript:void(0)">
|
|
<i b-lhtx71ohus class="ti-menu ti-close"></i>
|
|
</a>
|
|
</div>
|
|
<!-- ============================================================== -->
|
|
<!-- End Logo -->
|
|
<!-- ============================================================== -->
|
|
<div b-lhtx71ohus class="navbar-collapse collapse"
|
|
id="navbarSupportedContent"
|
|
data-navbarbg="skin5">
|
|
<!-- ============================================================== -->
|
|
<!-- toggle and nav items -->
|
|
<!-- ============================================================== -->
|
|
<ul b-lhtx71ohus class="navbar-nav float-start me-auto">
|
|
<li b-lhtx71ohus class="nav-item d-none d-lg-block">
|
|
<a b-lhtx71ohus class="nav-link sidebartoggler waves-effect waves-light"
|
|
href="javascript:void(0)"
|
|
data-sidebartype="mini-sidebar">
|
|
<i b-lhtx71ohus class="mdi mdi-menu font-24"></i>
|
|
</a>
|
|
</li>
|
|
<li b-lhtx71ohus class="nav-item">
|
|
<a class="nav-link" href="/">Home</a>
|
|
</li>
|
|
<li b-lhtx71ohus class="nav-item">
|
|
<a class="nav-link" href="/Home/Privacy">Privacy</a>
|
|
</li>
|
|
<!-- ============================================================== -->
|
|
<!-- create new -->
|
|
<!-- ============================================================== -->
|
|
<!--<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle"
|
|
href="#"
|
|
id="navbarDropdown"
|
|
role="button"
|
|
data-bs-toggle="dropdown"
|
|
aria-expanded="false">
|
|
<span class="d-none d-md-block">
|
|
Create New <i class="fa fa-angle-down"></i>
|
|
</span>
|
|
<span class="d-block d-md-none">
|
|
<i class="fa fa-plus"></i>
|
|
</span>
|
|
</a>
|
|
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
|
|
<li><a class="dropdown-item" href="#">Action</a></li>
|
|
<li><a class="dropdown-item" href="#">Another action</a></li>
|
|
<li><hr class="dropdown-divider" /></li>
|
|
<li>
|
|
<a class="dropdown-item" href="#">Something else here</a>
|
|
</li>
|
|
</ul>
|
|
</li> b-lhtx71ohus-->
|
|
<!-- ============================================================== -->
|
|
<!-- Search -->
|
|
<!-- ============================================================== -->
|
|
<!--<li class="nav-item search-box">
|
|
<a class="nav-link waves-effect waves-dark"
|
|
href="javascript:void(0)">
|
|
<i class="mdi mdi-magnify fs-4"></i>
|
|
</a>
|
|
<form class="app-search position-absolute">
|
|
<input type="text"
|
|
class="form-control"
|
|
placeholder="Search & enter" />
|
|
<a class="srh-btn"><i class="mdi mdi-window-close"></i></a>
|
|
</form>
|
|
</li> b-lhtx71ohus-->
|
|
</ul>
|
|
<!-- ============================================================== -->
|
|
<!-- Right side toggle and nav items -->
|
|
<!-- ============================================================== -->
|
|
<ul b-lhtx71ohus class="navbar-nav float-end">
|
|
<!-- ============================================================== -->
|
|
<!-- Comment -->
|
|
<!-- ============================================================== -->
|
|
|
|
|
|
<li class="nav-item d-inline">
|
|
<a id="manage" class="nav-link" title="Manage" href="/Identity/Account/Manage">
|
|
Hello alim.aidrus@pstw.com.my!
|
|
</a>
|
|
</li>
|
|
<li class="nav-item d-inline">
|
|
<a id="logout" class="nav-link" href="javascript:void(0);" onclick="logout()">Logout</a>
|
|
</li>
|
|
<input name="__RequestVerificationToken" type="hidden" value="CfDJ8N0yQF8b8n9Ln4B-pzXVXnJQT3F7dSjfDTqNAYrKuMmx7B2FxVWZofej7lCO4_og5yGVnvZRC4Gj7qR0VhpyDJlGlod9Eok45Vpo1duz7rDF7UIX_yjSY9V2oohbRnEaNvU65Ea4Na4n8_huDDjXZ96cwxKic9LX1PoJsC_oZhpPaL-k85rnksxRwQltHtSPpQ" /> <script>
|
|
function logout() {
|
|
const returnUrl = '/';
|
|
fetch('/Identity/Account/Logout', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
},
|
|
body: `__RequestVerificationToken=${document.querySelector('input[name="__RequestVerificationToken"]').value}&returnUrl=${encodeURIComponent(returnUrl)}`
|
|
}).then(response => {
|
|
if (response.ok) {
|
|
window.location.href = returnUrl;
|
|
} else {
|
|
alert('Logout failed.');
|
|
}
|
|
}).catch(error => {
|
|
console.error('Logout error:', error);
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- End Comment -->
|
|
<!-- ============================================================== -->
|
|
<!-- ============================================================== -->
|
|
<!-- Messages -->
|
|
<!-- ============================================================== -->
|
|
<!-- ============================================================== -->
|
|
<!-- End Messages -->
|
|
<!-- ============================================================== -->
|
|
<!-- ============================================================== -->
|
|
<!-- User profile and search -->
|
|
<!-- ============================================================== -->
|
|
<!-- ============================================================== -->
|
|
<!-- User profile and search -->
|
|
<!-- ============================================================== -->
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
</header>
|
|
<!-- ============================================================== -->
|
|
<!-- End Topbar header -->
|
|
<!-- ============================================================== -->
|
|
<!-- ============================================================== -->
|
|
<!-- Left Sidebar - style you can find in sidebar.scss -->
|
|
<!-- ============================================================== -->
|
|
<aside b-lhtx71ohus class="left-sidebar" data-sidebarbg="skin5">
|
|
<!-- Sidebar scroll-->
|
|
<div b-lhtx71ohus class="scroll-sidebar">
|
|
<!-- Sidebar navigation-->
|
|
<nav b-lhtx71ohus class="sidebar-nav">
|
|
<ul b-lhtx71ohus id="sidebarnav" class="pt-4">
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a b-lhtx71ohus class="sidebar-link has-arrow waves-effect waves-dark"
|
|
href="javascript:void(0)"
|
|
aria-expanded="false">
|
|
<i b-lhtx71ohus class="mdi mdi-receipt"></i><span b-lhtx71ohus class="hide-menu">Administrator </span>
|
|
</a>
|
|
<ul b-lhtx71ohus aria-expanded="false" class="collapse first-level">
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/Admin">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">Admin Dashboard</span>
|
|
</a>
|
|
</li>
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/Admin/ModuleAdmin">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">Module Administration</span>
|
|
</a>
|
|
</li>
|
|
|
|
</ul>
|
|
</li>
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a b-lhtx71ohus class="sidebar-link waves-effect waves-dark sidebar-link"
|
|
href="#"
|
|
aria-expanded="false">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">Dashboard</span>
|
|
</a>
|
|
</li>
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a b-lhtx71ohus class="sidebar-link has-arrow waves-effect waves-dark"
|
|
href="javascript:void(0)"
|
|
aria-expanded="false">
|
|
<i b-lhtx71ohus class="mdi mdi-receipt"></i><span b-lhtx71ohus class="hide-menu">Inventory </span>
|
|
</a>
|
|
<ul b-lhtx71ohus aria-expanded="false" class="collapse first-level">
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/Inventory/InventoryMaster/AdminDashboard">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">Admin Dashboard</span>
|
|
</a>
|
|
</li>
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/Inventory/InventoryMaster/ProductRegistration">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">Product Registration</span>
|
|
</a>
|
|
</li>
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/Inventory/InventoryMaster/ItemRegistration">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">Item Registration</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a b-lhtx71ohus class="sidebar-link has-arrow waves-effect waves-dark"
|
|
href="javascript:void(0)"
|
|
aria-expanded="false">
|
|
<i b-lhtx71ohus class="mdi mdi-receipt"></i><span b-lhtx71ohus class="hide-menu">Report</span>
|
|
</a>
|
|
<ul b-lhtx71ohus aria-expanded="false" class="collapse first-level">
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/Report/Reporting">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">Admin Dashboard</span>
|
|
</a>
|
|
</li>
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/Report/Reporting/InventoryReport">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">Inventory Report</span>
|
|
</a>
|
|
</li>
|
|
<!--MMS-->
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a b-lhtx71ohus class="sidebar-link has-arrow waves-effect waves-dark"
|
|
href="javascript:void(0)" aria-expanded="false">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">MMS</span>
|
|
</a>
|
|
<ul b-lhtx71ohus aria-expanded="false" class="collapse first-level">
|
|
<!-- Marine subsection -->
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a b-lhtx71ohus class="sidebar-link has-arrow waves-effect waves-dark"
|
|
href="javascript:void(0)" aria-expanded="false">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">Marine</span>
|
|
</a>
|
|
<ul b-lhtx71ohus aria-expanded="false" class="collapse second-level">
|
|
<!-- Tar Ball Sampling Form link -->
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark" aria-expanded="false" href="/MMS/Marine/TarBallForm">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">Tarball Report</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a b-lhtx71ohus class="sidebar-link has-arrow waves-effect waves-dark"
|
|
href="javascript:void(0)"
|
|
aria-expanded="false">
|
|
<i b-lhtx71ohus class="mdi mdi-receipt"></i><span b-lhtx71ohus class="hide-menu">User Overtime</span>
|
|
</a>
|
|
<ul b-lhtx71ohus aria-expanded="false" class="collapse first-level">
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/OTcalculate/Overtime/OtRegister">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">OT Register</span>
|
|
</a>
|
|
</li>
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/OTcalculate/Overtime/OtRecords">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">OT Records</span>
|
|
</a>
|
|
</li>
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/OTcalculate/Overtime/OtStatus">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">OT Status</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a b-lhtx71ohus class="sidebar-link has-arrow waves-effect waves-dark"
|
|
href="javascript:void(0)"
|
|
aria-expanded="false">
|
|
<i b-lhtx71ohus class="mdi mdi-receipt"></i><span b-lhtx71ohus class="hide-menu">Overtime Approval</span>
|
|
</a>
|
|
<ul b-lhtx71ohus aria-expanded="false" class="collapse first-level">
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/OTcalculate/ApprovalDashboard/Approval">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">Pending Approval</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a b-lhtx71ohus class="sidebar-link has-arrow waves-effect waves-dark"
|
|
href="javascript:void(0)"
|
|
aria-expanded="false">
|
|
<i b-lhtx71ohus class="mdi mdi-receipt"></i><span b-lhtx71ohus class="hide-menu">HR Dashboard</span>
|
|
</a>
|
|
<ul b-lhtx71ohus aria-expanded="false" class="collapse first-level">
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/OTcalculate/HrDashboard/Settings">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">Settings</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a b-lhtx71ohus class="sidebar-link has-arrow waves-effect waves-dark"
|
|
href="javascript:void(0)"
|
|
aria-expanded="false">
|
|
<i b-lhtx71ohus class="mdi mdi-receipt"></i><span b-lhtx71ohus class="hide-menu">Rooms Booking</span>
|
|
</a>
|
|
<ul b-lhtx71ohus aria-expanded="false" class="collapse first-level">
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/Bookings/Bookings/Managers">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">Assign</span>
|
|
</a>
|
|
</li>
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/Bookings/Bookings">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">List</span>
|
|
</a>
|
|
</li>
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/Bookings/Bookings/Calendar">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">Calendar</span>
|
|
</a>
|
|
</li>
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/Bookings/Bookings/Room">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">Rooms</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a b-lhtx71ohus class="sidebar-link has-arrow waves-effect waves-dark"
|
|
href="javascript:void(0)"
|
|
aria-expanded="false">
|
|
<i b-lhtx71ohus class="mdi mdi-receipt"></i><span b-lhtx71ohus class="hide-menu">IT Request Form</span>
|
|
</a>
|
|
<ul b-lhtx71ohus aria-expanded="false" class="collapse first-level">
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/IT/ApprovalDashboard/Admin">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">Assignings</span>
|
|
</a>
|
|
</li>
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/IT/ApprovalDashboard/Create">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">Registeration</span>
|
|
</a>
|
|
</li>
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/IT/ApprovalDashboard/MyRequests">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">My Requests</span>
|
|
</a>
|
|
</li>
|
|
<li b-lhtx71ohus class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link" aria-expanded="false" href="/IT/ApprovalDashboard/Approval">
|
|
<i b-lhtx71ohus class="mdi mdi-view-dashboard"></i><span b-lhtx71ohus class="hide-menu">Approval</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<!-- <li class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link"
|
|
href="charts.html"
|
|
aria-expanded="false">
|
|
<i class="mdi mdi-chart-bar"></i><span class="hide-menu">Charts</span>
|
|
</a>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link"
|
|
href="widgets.html"
|
|
aria-expanded="false">
|
|
<i class="mdi mdi-chart-bubble"></i><span class="hide-menu">Widgets</span>
|
|
</a>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link"
|
|
href="tables.html"
|
|
aria-expanded="false">
|
|
<i class="mdi mdi-border-inside"></i><span class="hide-menu">Tables</span>
|
|
</a>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link"
|
|
href="grid.html"
|
|
aria-expanded="false">
|
|
<i class="mdi mdi-blur-linear"></i><span class="hide-menu">Full Width</span>
|
|
</a>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a class="sidebar-link has-arrow waves-effect waves-dark"
|
|
href="javascript:void(0)"
|
|
aria-expanded="false">
|
|
<i class="mdi mdi-receipt"></i><span class="hide-menu">Forms </span>
|
|
</a>
|
|
<ul aria-expanded="false" class="collapse first-level">
|
|
<li class="sidebar-item">
|
|
<a href="form-basic.html" class="sidebar-link">
|
|
<i class="mdi mdi-note-outline"></i><span class="hide-menu"> Form Basic </span>
|
|
</a>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a href="form-wizard.html" class="sidebar-link">
|
|
<i class="mdi mdi-note-plus"></i><span class="hide-menu"> Form Wizard </span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link"
|
|
href="pages-buttons.html"
|
|
aria-expanded="false">
|
|
<i class="mdi mdi-relative-scale"></i><span class="hide-menu">Buttons</span>
|
|
</a>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a class="sidebar-link has-arrow waves-effect waves-dark"
|
|
href="javascript:void(0)"
|
|
aria-expanded="false">
|
|
<i class="mdi mdi-face"></i><span class="hide-menu">Icons </span>
|
|
</a>
|
|
<ul aria-expanded="false" class="collapse first-level">
|
|
<li class="sidebar-item">
|
|
<a href="icon-material.html" class="sidebar-link">
|
|
<i class="mdi mdi-emoticon"></i><span class="hide-menu"> Material Icons </span>
|
|
</a>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a href="icon-fontawesome.html" class="sidebar-link">
|
|
<i class="mdi mdi-emoticon-cool"></i><span class="hide-menu"> Font Awesome Icons </span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a class="sidebar-link waves-effect waves-dark sidebar-link"
|
|
href="pages-elements.html"
|
|
aria-expanded="false">
|
|
<i class="mdi mdi-pencil"></i><span class="hide-menu">Elements</span>
|
|
</a>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a class="sidebar-link has-arrow waves-effect waves-dark"
|
|
href="javascript:void(0)"
|
|
aria-expanded="false">
|
|
<i class="mdi mdi-move-resize-variant"></i><span class="hide-menu">Addons </span>
|
|
</a>
|
|
<ul aria-expanded="false" class="collapse first-level">
|
|
<li class="sidebar-item">
|
|
<a href="index2.html" class="sidebar-link">
|
|
<i class="mdi mdi-view-dashboard"></i><span class="hide-menu"> Dashboard-2 </span>
|
|
</a>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a href="pages-gallery.html" class="sidebar-link">
|
|
<i class="mdi mdi-multiplication-box"></i><span class="hide-menu"> Gallery </span>
|
|
</a>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a href="pages-calendar.html" class="sidebar-link">
|
|
<i class="mdi mdi-calendar-check"></i><span class="hide-menu"> Calendar </span>
|
|
</a>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a href="pages-invoice.html" class="sidebar-link">
|
|
<i class="mdi mdi-bulletin-board"></i><span class="hide-menu"> Invoice </span>
|
|
</a>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a href="pages-chat.html" class="sidebar-link">
|
|
<i class="mdi mdi-message-outline"></i><span class="hide-menu"> Chat Option </span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a class="sidebar-link has-arrow waves-effect waves-dark"
|
|
href="javascript:void(0)"
|
|
aria-expanded="false">
|
|
<i class="mdi mdi-account-key"></i><span class="hide-menu">Authentication </span>
|
|
</a>
|
|
<ul aria-expanded="false" class="collapse first-level">
|
|
<li class="sidebar-item">
|
|
<a href="authentication-login.html" class="sidebar-link">
|
|
<i class="mdi mdi-all-inclusive"></i><span class="hide-menu"> Login </span>
|
|
</a>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a href="authentication-register.html" class="sidebar-link">
|
|
<i class="mdi mdi-all-inclusive"></i><span class="hide-menu"> Register </span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a class="sidebar-link has-arrow waves-effect waves-dark"
|
|
href="javascript:void(0)"
|
|
aria-expanded="false">
|
|
<i class="mdi mdi-alert"></i><span class="hide-menu">Errors </span>
|
|
</a>
|
|
<ul aria-expanded="false" class="collapse first-level">
|
|
<li class="sidebar-item">
|
|
<a href="error-403.html" class="sidebar-link">
|
|
<i class="mdi mdi-alert-octagon"></i><span class="hide-menu"> Error 403 </span>
|
|
</a>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a href="error-404.html" class="sidebar-link">
|
|
<i class="mdi mdi-alert-octagon"></i><span class="hide-menu"> Error 404 </span>
|
|
</a>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a href="error-405.html" class="sidebar-link">
|
|
<i class="mdi mdi-alert-octagon"></i><span class="hide-menu"> Error 405 </span>
|
|
</a>
|
|
</li>
|
|
<li class="sidebar-item">
|
|
<a href="error-500.html" class="sidebar-link">
|
|
<i class="mdi mdi-alert-octagon"></i><span class="hide-menu"> Error 500 </span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="sidebar-item p-3">
|
|
<a href="https://github.com/wrappixel/matrix-admin-bt5"
|
|
target="_blank"
|
|
class="
|
|
w-100
|
|
btn btn-cyan
|
|
d-flex
|
|
align-items-center
|
|
text-white
|
|
">
|
|
<i class="mdi mdi-cloud-download font-20 me-2"></i>Download
|
|
Free
|
|
</a>
|
|
</li> -->
|
|
</ul>
|
|
</nav>
|
|
<!-- End Sidebar navigation -->
|
|
</div>
|
|
<!-- End Sidebar scroll-->
|
|
</aside>
|
|
<!-- ============================================================== -->
|
|
<!-- End Left Sidebar - style you can find in sidebar.scss -->
|
|
<!-- ============================================================== -->
|
|
<!-- ============================================================== -->
|
|
<!-- Page wrapper -->
|
|
<!-- ============================================================== -->
|
|
<div b-lhtx71ohus class="page-wrapper">
|
|
<!-- ============================================================== -->
|
|
<!-- Bread crumb and right sidebar toggle -->
|
|
<!-- ============================================================== -->
|
|
<div b-lhtx71ohus class="page-breadcrumb">
|
|
<div b-lhtx71ohus class="row">
|
|
<div b-lhtx71ohus class="col-12 d-flex no-block align-items-center">
|
|
<h1 b-lhtx71ohus class="m-0 page-title">QR Scanner</h1>
|
|
<div b-lhtx71ohus class="ms-auto text-end">
|
|
<nav b-lhtx71ohus aria-label="breadcrumb">
|
|
<ol b-lhtx71ohus class="breadcrumb">
|
|
<li b-lhtx71ohus class="breadcrumb-item"><a b-lhtx71ohus href="#">Home</a></li>
|
|
<li b-lhtx71ohus class="breadcrumb-item active" aria-current="page">
|
|
Library
|
|
</li>
|
|
</ol>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- ============================================================== -->
|
|
<!-- End Bread crumb and right sidebar toggle -->
|
|
<!-- ============================================================== -->
|
|
<!-- ============================================================== -->
|
|
<!-- Container fluid -->
|
|
<!-- ============================================================== -->
|
|
<div b-lhtx71ohus class="container-fluid">
|
|
<!-- ============================================================== -->
|
|
<!-- Start Page Content -->
|
|
<!-- ============================================================== -->
|
|
<div b-lhtx71ohus class="row my-1">
|
|
|
|
<style>
|
|
@font-face {
|
|
font-family: 'OCR-A';
|
|
src: url('../assets/fonts/ocraext.ttf');
|
|
}
|
|
|
|
.QrPrintFont {
|
|
font-family: 'OCR-A', monospace;
|
|
}
|
|
|
|
.table td img {
|
|
display: block !important;
|
|
}
|
|
</style>
|
|
|
|
<div class="row">
|
|
<div class="col-6 col-md-6 col-lg-3">
|
|
<div class="card card-hover">
|
|
<a href="/Inventory/InventoryMaster/SupplierRegistration">
|
|
<div class="box bg-info text-center">
|
|
<h1 class="font-light text-white">
|
|
<i class="mdi mdi-truck"></i>
|
|
</h1>
|
|
<h6 class="text-white">Supplier</h6>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="col-6 col-md-6 col-lg-3">
|
|
<div class="card card-hover">
|
|
<a href="/Inventory/InventoryMaster/ManifacturerRegistration">
|
|
<div class="box bg-warning text-center">
|
|
<h1 class="font-light text-white">
|
|
<i class="mdi mdi-factory"></i>
|
|
</h1>
|
|
<h6 class="text-white">Manufacturer</h6>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="col-6 col-md-6 col-lg-3">
|
|
<a href="/Inventory/InventoryMaster/ProductRegistration">
|
|
<div class="card card-hover">
|
|
<div class="box bg-cyan text-center">
|
|
<h1 class="font-light text-white">
|
|
<i class="mdi mdi-checkbox-multiple-blank"></i>
|
|
</h1>
|
|
<h6 class="text-white">Product</h6>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
<div class="col-6 col-md-6 col-lg-3">
|
|
<div class="card card-hover">
|
|
<a href="/Inventory/InventoryMaster/ItemRegistration">
|
|
<div class="box bg-success text-center">
|
|
<h1 class="font-light text-white">
|
|
<i class="mdi mdi-checkbox-multiple-blank-circle"></i>
|
|
</h1>
|
|
<h6 class="text-white">Item</h6>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="col-6 col-md-6 col-lg-3">
|
|
<div class="card card-hover">
|
|
<a href="/Inventory/InventoryMaster/StationRegistration">
|
|
<div class="box bg-warning text-center">
|
|
<h1 class="font-light text-white">
|
|
<i class="mdi mdi-truck"></i>
|
|
</h1>
|
|
<h6 class="text-white">Station</h6>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-6 col-md-6 col-lg-3">
|
|
<div class="card card-hover">
|
|
<a href="/Inventory/InventoryMaster/ItemMovement">
|
|
<div class="box bg-cyan text-center">
|
|
<h1 class="font-light text-white">
|
|
<i class="mdi mdi-factory"></i>
|
|
</h1>
|
|
<h6 class="text-white">Item Movement</h6>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-6 col-md-6 col-lg-3">
|
|
<div class="card card-hover">
|
|
<a href="/Inventory/InventoryMaster/ItemRequestMaster">
|
|
<div class="box bg-info text-center">
|
|
<h1 class="font-light text-white">
|
|
<i class="mdi mdi-checkbox-multiple-blank"></i>
|
|
</h1>
|
|
<h6 class="text-white">Product Request</h6>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-6 col-md-6 col-lg-3">
|
|
<div class="card card-hover">
|
|
<a href="/Inventory/InventoryMaster/QrMaster">
|
|
<div class="box bg-success text-center">
|
|
<h1 class="font-light text-white">
|
|
<i class="mdi mdi-checkbox-multiple-blank-circle"></i>
|
|
</h1>
|
|
<h6 class="text-white">Scan Items</h6>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="registerItemMovement" class="row">
|
|
<div class="row card">
|
|
<div v-if="thisItem" class="card-header">
|
|
<button v-on:click="resetScanner" class="btn btn-secondary">
|
|
<i class="fas fa-arrow-left"></i> Back to Scanner
|
|
</button>
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
<div data-aos="fade-right"></div>
|
|
|
|
<select class="form-select" v-if="!thisItem" v-model="selectedCameraId" v-on:change="updateCamera">
|
|
<option v-for="device in videoInputDevices" :key="device.deviceId" :value="device.deviceId">
|
|
{{ device.label || `Camera ${videoInputDevices.indexOf(device) + 1}` }}
|
|
</option>
|
|
</select>
|
|
|
|
<div id="registerItemMovement" v-if="!thisItem" data-aos="fade-right">
|
|
<p style="text-align:center; padding:10px;">Scan QR Code Here:</p>
|
|
|
|
<qrcode-stream :constraints="selectedConstraints"
|
|
:formats="['qr_code']"
|
|
:track="trackFunctionSelected.value"
|
|
v-on:camera-on="onCameraReady"
|
|
v-on:detect="onDecode"
|
|
v-on:error="onError">
|
|
</qrcode-stream>
|
|
|
|
<p class="error">{{ error }}</p>
|
|
</div>
|
|
|
|
<p v-if="scanTime">Scan Time: {{ scanTime }} ms</p>
|
|
<div v-if="thisItem" style="display: flex; justify-content: center; align-items: center;">
|
|
<div class="col-lg-7 col-11 border rounded p-3 shadow-sm">
|
|
|
|
<div class="row m-3 d-flex align-items-center justify-content-center">
|
|
<div class="col-lg-7 col-11 border rounded p-3 shadow-sm">
|
|
<div class="col-12 text-center">
|
|
<img :src="thisItem.imageProduct" alt="Product Image" class="img-fluid rounded" data-toggle="modal" data-target="#imageModal" style="max-height: 300px;" />
|
|
</div>
|
|
<div class="col-12 text-center mt-3">
|
|
<p class="h4 fw-bold text-primary">{{ thisItem.uniqueID }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-12 mb-3">
|
|
<p class="h5 fw-bold">
|
|
<i class="fas fa-tag me-2 text-secondary"></i>Item Name:
|
|
<span class="text-muted">{{ thisItem.productName }}</span>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="col-12 mb-3">
|
|
<p class="h5 fw-bold">
|
|
<i class="fas fa-barcode me-2 text-secondary"></i>Part Number:
|
|
<span class="text-muted">{{ thisItem.partNumber }}</span>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="col-12 mb-3">
|
|
<p class="h5 fw-bold">
|
|
<i class="fas fa-hashtag me-2 text-secondary"></i>Serial Number:
|
|
<span class="text-muted">{{ thisItem.serialNumber }}</span>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="col-12 mb-3">
|
|
<p class="h5 fw-bold">
|
|
<i class="fas fa-user-tie me-2 text-secondary"></i>PIC:
|
|
<span class="text-muted">Station PIC</span>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="col-12">
|
|
<div class="card shadow-sm border-0">
|
|
<div class="card-body">
|
|
<h5 class="card-title mb-4 text-primary">
|
|
<i class="fas fa-info-circle me-2"></i>Current Information
|
|
</h5>
|
|
<ul class="list-group list-group-flush">
|
|
<li class="list-group-item">
|
|
<div class="d-flex justify-content-between align-items-start">
|
|
<span class="fw-bold">
|
|
<i class="fas fa-user me-2 text-secondary"></i>User:
|
|
</span>
|
|
<span class="text-muted text-end" style="max-width: 70%; word-wrap: break-word;">
|
|
{{ thisItem.toUserName }}
|
|
</span>
|
|
</div>
|
|
</li>
|
|
|
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
|
<span class="fw-bold">
|
|
<i class="mdi mdi-factory me-2 text-secondary"></i>Store:
|
|
</span>
|
|
<span class="text-muted">{{ thisItem.toStoreName }}</span>
|
|
</li>
|
|
|
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
|
<span class="fw-bold">
|
|
<i class="fas fa-map-marker-alt me-2 text-secondary"></i>Station:
|
|
</span>
|
|
<span class="text-muted">{{ thisItem.toStationName || 'N/A' }}</span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div v-if="thisItem" class=" register" data-aos="fade-right">
|
|
<div class="row" data-aos="fade-right">
|
|
<div class="col-md-12">
|
|
<div class="tab-content" id="myTabContent">
|
|
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
|
|
<div style="text-align: center; margin: 20px 0; padding: 20px;">
|
|
|
|
<div v-if="itemlateststatus == 'On Delivery'">
|
|
<h2 class="register-heading">Item is on Delivery</h2>
|
|
<div class="col-sm-3"></div>
|
|
<div class="col-sm-6 offset-sm-3">
|
|
</div>
|
|
</div>
|
|
|
|
<div v-if="itemlateststatus == 'On Delivery' && this.thisItem.toUser == this.currentUser.id">
|
|
<h3 class="register-heading">Cancel Item Movement</h3>
|
|
<div class="col-sm-3"></div>
|
|
<div class="col-sm-6 offset-sm-3">
|
|
<form v-on:submit.prevent="confirmCancelItemMovement" data-aos="fade-right">
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label">Reason for Cancellation:</label>
|
|
<div class="col-sm-8">
|
|
<input type="text" id="cancelRemark" name="cancelRemark" v-model="cancelRemark" class="form-control" required />
|
|
</div>
|
|
</div>
|
|
<div style="display: flex; justify-content: center; margin-top: 20px;">
|
|
<button type="submit" class="btn btn-danger" style="width: 200px; padding: 10px; font-size: 16px;">
|
|
Confirm Cancel Movement
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div v-if="itemlateststatus == 'On Delivery' && thisItem.lastStore == currentUser.store">
|
|
<h2 class="register-heading">Receive Item</h2>
|
|
<div class="col-sm-3"></div>
|
|
<div class="col-sm-6 offset-sm-3">
|
|
<form v-on:submit.prevent="receiveItemMovement" data-aos="fade-right">
|
|
<div class="row register-form">
|
|
|
|
<div style="display: flex; justify-content: center; margin-top: 20px;">
|
|
<button type="submit" class="btn btn-primary" style="width: 200px; padding: 10px; font-size: 16px;">
|
|
Receive Item
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div v-if="(itemlateststatus == 'Repair' || itemlateststatus == 'Calibration') && this.itemassignedtouser">
|
|
<h2 class="register-heading">Receive Repair / Calibration</h2>
|
|
<div class="col-sm-3"></div>
|
|
<div class="col-sm-6 offset-sm-3">
|
|
<form v-on:submit.prevent="receiveItemMovement" data-aos="fade-right">
|
|
<div class="row register-form">
|
|
|
|
<div style="display: flex; justify-content: center; margin-top: 20px;">
|
|
<button type="submit" class="btn btn-primary" style="width: 200px; padding: 10px; font-size: 16px;">
|
|
Receive
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div v-if="itemlateststatus == 'Delivered'">
|
|
<h2 class="register-heading">Item has been Delivered</h2>
|
|
<div class="col-sm-3"></div>
|
|
<div class="col-sm-6 offset-sm-3">
|
|
</div>
|
|
</div>
|
|
|
|
<div v-if="itemlateststatus == 'Return' && this.itemassignedtouser">
|
|
<h2 class="register-heading">Receive Item Return</h2>
|
|
<div class="col-sm-3"></div>
|
|
<div class="col-sm-6 offset-sm-3">
|
|
<form v-on:submit.prevent="receiveItemMovement" data-aos="fade-right">
|
|
<div class="row register-form">
|
|
|
|
<div style="display: flex; justify-content: center; margin-top: 20px;">
|
|
<button type="submit" class="btn btn-primary" style="width: 200px; padding: 10px; font-size: 16px;">
|
|
Receive
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div v-if="itemlateststatus == 'Faulty' && this.itemassignedtouser">
|
|
<h2 class="register-heading">Add Item Movement</h2>
|
|
<div class="col-sm-3"></div>
|
|
<div class="col-sm-6 offset-sm-3">
|
|
<div class="dropdown">
|
|
<select class="btn btn-primary dropdown-toggle col-md-10 " v-model="selectedAction" required>
|
|
<option class="btn-light" value="" disabled selected>Select Action</option>
|
|
<option class="btn-light" value="supplier">Assign to Supplier</option>
|
|
<option class="btn-light" value="faulty">Faulty</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div v-if="itemlateststatus == 'Ready To Deploy' && this.itemassignedtouser">
|
|
<h2 class="register-heading">Add Item Movement</h2>
|
|
<div class="col-sm-3"></div>
|
|
<div class="col-sm-6 offset-sm-3">
|
|
<div class="dropdown">
|
|
<select class="btn btn-primary dropdown-toggle col-md-10 " v-model="selectedAction" required>
|
|
<option class="btn-light" value="" disabled selected>Select Action</option>
|
|
<option class="btn-light" value="user">Assign to User</option>
|
|
<option class="btn-light" value="station">Assign to Station</option>
|
|
<option class="btn-light" value="store">Assign to Store</option>
|
|
<option class="btn-light" value="supplier">Assign to Supplier</option>
|
|
<option class="btn-light" value="faulty">Faulty</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-sm-3 col-form-label"></label>
|
|
|
|
</div>
|
|
|
|
<form v-on:submit.prevent="addItemMovement" data-aos="fade-right">
|
|
|
|
|
|
<div v-if="selectedAction === 'user'">
|
|
|
|
<div class="row register-form">
|
|
<div class="col-md-3"></div>
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label">To User:</label>
|
|
<div class="col-sm-8">
|
|
<div class="dropdown">
|
|
<select class="btn btn-primary dropdown-toggle col-md-10" v-model="selectedUser" required style="width: 100%;">
|
|
<option class="btn-light" value="" disabled selected>Select User</option>
|
|
<option class="btn-light" v-for="(user, index) in userlist" :key="index" :value="user.id">{{user.fullName}}</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row" v-if="thisItem && thisItem.category === 'Disposable'">
|
|
<label class="col-sm-4 col-form-label">Quantity:</label>
|
|
<div class="col-sm-8">
|
|
<input type="number" id="quantity" name="quantity" v-model.number="quantity" class="form-control" min="1" :max="maxQuantity" required />
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label for="invoiceDate" class="col-sm-4">Assign Date:</label>
|
|
<div class="col-sm-8">
|
|
<input type="date" id="assigndate" name="assigndate" class="form-control" v-model="assigndate" required>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label">Consignment Note</label>
|
|
<div class="col-sm-8">
|
|
<input type="file" id="document" name="document" class="form-control-file" v-on:change="handleFileUpload" accept="image/png, image/jpeg, application/pdf" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label">Remark:</label>
|
|
<div class="col-sm-8">
|
|
<input type="text" id="remark" name="remark" v-model="remark" class="form-control" required />
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<div class="col-sm-8 offset-sm-3">
|
|
<button type="button" v-on:click="resetForm" class="btn btn-secondary m-1">Reset</button>
|
|
<button type="submit" class="btn btn-primary m-1">Submit</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-if="selectedAction === 'station'">
|
|
|
|
<div class="row register-form">
|
|
<div class="col-md-3"></div>
|
|
<div class="col-md-6">
|
|
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label">To Station:</label>
|
|
<div class="col-sm-8">
|
|
<div class="dropdown">
|
|
<select class="btn btn-primary dropdown-toggle col-md-10" v-model="selectedStation" required style="width: 100%;">
|
|
<option class="btn-light" value="" disabled selected>Select Station</option>
|
|
<option class="btn-light" v-for="(station, index) in stationlist" :key="index" :value="station.stationId">{{station.stationName}}</option>
|
|
</select>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label">To PIC:</label>
|
|
<div class="col-sm-8">
|
|
<div class="dropdown">
|
|
<input type="text" id="selectedStationPIC" name="selectedStationPIC" :value="selectedStationPicName" class="form-control" readonly />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row" v-if="thisItem && thisItem.category === 'Disposable'">
|
|
<label class="col-sm-4 col-form-label">Quantity:</label>
|
|
<div class="col-sm-8">
|
|
<input type="number" id="quantity" name="quantity" v-model.number="quantity" class="form-control" min="1" :max="maxQuantity" required />
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label for="invoiceDate" class="col-sm-4">Assign Date:</label>
|
|
<div class="col-sm-8">
|
|
<input type="date" id="assigndate" name="assigndate" class="form-control" v-model="assigndate" required>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label">Consignment Note</label>
|
|
<div class="col-sm-8">
|
|
<input type="file" id="document" name="document" class="form-control-file" v-on:change="handleFileUpload" accept="image/png, image/jpeg, application/pdf" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label">Remark:</label>
|
|
<div class="col-sm-8">
|
|
<input type="text" id="remark" name="remark" v-model="remark" class="form-control" required />
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<div class="col-sm-8 offset-sm-3">
|
|
<button type="button" v-on:click="resetForm" class="btn btn-secondary m-1">Reset</button>
|
|
<button type="submit" class="btn btn-primary m-1">Submit</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-if="selectedAction === 'store'">
|
|
|
|
<div class="row register-form">
|
|
<div class="col-md-3"></div>
|
|
<div class="col-md-6">
|
|
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label">To Store:</label>
|
|
<div class="col-sm-8">
|
|
<select class="btn btn-primary dropdown-toggle col-md-10" v-model="selectedStore" style="width: 100%;">
|
|
<option class="btn-light" value="" disabled selected>Select Store</option>
|
|
<option class="btn-light" v-for="(store, index) in storelist" :key="index" :value="store.id">{{ store.storeName}}</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="form-group row">
|
|
<label for="invoiceDate" class="col-sm-4">Assign Date:</label>
|
|
<div class="col-sm-8">
|
|
<input type="date" id="assigndate" name="assigndate" class="form-control" v-model="assigndate" required>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row" v-if="thisItem && thisItem.category === 'Disposable'">
|
|
<label class="col-sm-4 col-form-label">Quantity:</label>
|
|
<div class="col-sm-8">
|
|
<input type="number" id="quantity" name="quantity" v-model.number="quantity" class="form-control" min="1" :max="maxQuantity" required />
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label">Consignment Note</label>
|
|
<div class="col-sm-8">
|
|
<input type="file" id="document" name="document" class="form-control-file" v-on:change="handleFileUpload" accept="image/png, image/jpeg, application/pdf" />
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label">Remark:</label>
|
|
<div class="col-sm-8">
|
|
<input type="text" id="remark" name="remark" v-model="remark" class="form-control" required />
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<div class="col-sm-8 offset-sm-3">
|
|
<button type="button" v-on:click="resetForm" class="btn btn-secondary m-1">Reset</button>
|
|
<button type="submit" class="btn btn-primary m-1">Submit</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-if="selectedAction === 'supplier'">
|
|
<div class="row register-form">
|
|
<div class="col-md-3"></div>
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label">To Supplier:</label>
|
|
<div class="col-sm-8">
|
|
<div class="dropdown">
|
|
<select class="btn btn-primary dropdown-toggle col-md-10" v-model="selectedSupplier" required style="width: 100%;">
|
|
<option class="btn-light" value="" disabled selected>Select Supplier</option>
|
|
<option class="btn-light" v-for="(supplier, index) in supplierlist" :key="index" :value="supplier.supplierCompName">{{supplier.supplierCompName}}</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label">To Other:</label>
|
|
<div class="col-sm-8">
|
|
<div class="dropdown">
|
|
<select class="btn btn-primary dropdown-toggle col-md-10" v-model="selectedOther" required style="width: 100%;">
|
|
<option class="btn-light" value="" disabled selected>Select</option>
|
|
<option class="btn-light" value="Repair">Repair</option>
|
|
<option class="btn-light" value="Calibration">Calibration</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row" v-if="thisItem && thisItem.category === 'Disposable'">
|
|
<label class="col-sm-4 col-form-label">Quantity:</label>
|
|
<div class="col-sm-8">
|
|
<input type="number" id="quantity" name="quantity" v-model.number="quantity" class="form-control" min="1" :max="maxQuantity" required />
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label for="invoiceDate" class="col-sm-4">Assign Date:</label>
|
|
<div class="col-sm-8">
|
|
<input type="date" id="assigndate" name="assigndate" class="form-control" v-model="assigndate" required>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label">Consignment Note</label>
|
|
<div class="col-sm-8">
|
|
<input type="file" id="document" name="document" class="form-control-file" v-on:change="handleFileUpload" accept="image/png, image/jpeg, application/pdf" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label">Remark:</label>
|
|
<div class="col-sm-8">
|
|
<input type="text" id="remark" name="remark" v-model="remark" class="form-control" required />
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<div class="col-sm-8 offset-sm-3">
|
|
<button type="button" v-on:click="resetForm" class="btn btn-secondary m-1">Reset</button>
|
|
<button type="submit" class="btn btn-primary m-1">Submit</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-if="selectedAction === 'faulty'">
|
|
|
|
<div class="row register-form">
|
|
<div class="col-md-3"></div>
|
|
<div class="col-md-6">
|
|
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label">Consignment Note</label>
|
|
<div class="col-sm-8">
|
|
<input type="file" id="document" name="document" class="form-control-file" v-on:change="handleFileUpload" accept="image/png, image/jpeg, application/pdf" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row" v-if="thisItem && thisItem.category === 'Disposable'">
|
|
<label class="col-sm-4 col-form-label">Quantity:</label>
|
|
<div class="col-sm-8">
|
|
<input type="number" id="quantity" name="quantity" v-model.number="quantity" class="form-control" min="1" :max="maxQuantity" required />
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label">Remark:</label>
|
|
<div class="col-sm-8">
|
|
<input type="text" id="remark" name="remark" v-model="remark" class="form-control" required />
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<div class="col-sm-8 offset-sm-3">
|
|
<button type="button" v-on:click="resetForm" class="btn btn-secondary m-1">Reset</button>
|
|
<button type="submit" class="btn btn-primary m-1">Submit</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<!-- ============================================================== -->
|
|
<!-- End PAge Content -->
|
|
<!-- ============================================================== -->
|
|
<!-- ============================================================== -->
|
|
<!-- Right sidebar -->
|
|
<!-- ============================================================== -->
|
|
<!-- .right-sidebar -->
|
|
<!-- ============================================================== -->
|
|
<!-- End Right sidebar -->
|
|
<!-- ============================================================== -->
|
|
</div>
|
|
<!-- ============================================================== -->
|
|
<!-- End Container fluid -->
|
|
<!-- ============================================================== -->
|
|
<!-- ============================================================== -->
|
|
<!-- footer -->
|
|
<!-- ============================================================== -->
|
|
<footer b-lhtx71ohus class="footer text-center">
|
|
All Rights Reserved by PSTW. Designed and Developed by
|
|
<a b-lhtx71ohus href="https://www.wrappixel.com">WrapPixel</a>.
|
|
</footer>
|
|
<!-- ============================================================== -->
|
|
<!-- End footer -->
|
|
<!-- ============================================================== -->
|
|
</div>
|
|
<!-- ============================================================== -->
|
|
<!-- End Page wrapper -->
|
|
<!-- ============================================================== -->
|
|
</div>
|
|
<!-- ============================================================== -->
|
|
<!-- End Wrapper -->
|
|
<!-- ============================================================== -->
|
|
<!-- ============================================================== -->
|
|
<!-- All Jquery -->
|
|
<!-- ============================================================== -->
|
|
|
|
<script src="/assets/libs/jquery/dist/jquery.min.js"></script>
|
|
<script src="/dist/js/jquery-ui.min.js"></script>
|
|
<!-- VUE Multiselect-->
|
|
<script src="/lib/vue-multiselect/vue-multiselect.js"></script>
|
|
<link href="/lib/vue-multiselect/vue-multiselect.min.css" rel="stylesheet" />
|
|
<!-- VUE Date Picker-->
|
|
<link href="/lib/vue-datepicker/mainvuedate.css" rel="stylesheet" />
|
|
<script src="/lib/vue-datepicker/vue-datepicker.iife.js"></script>
|
|
<!-- Bootstrap tether Core JavaScript -->
|
|
<script src="/assets/libs/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
|
<!-- slimscrollbar scrollbar JavaScript -->
|
|
<script src="/assets/libs/perfect-scrollbar/dist/perfect-scrollbar.jquery.min.js"></script>
|
|
<script src="/assets/extra-libs/sparkline/sparkline.js"></script>
|
|
<!--Wave Effects -->
|
|
<script src="/dist/js/waves.js"></script>
|
|
<!--Menu sidebar -->
|
|
<script src="/dist/js/sidebarmenu.js"></script>
|
|
<!--Custom JavaScript -->
|
|
<script src="/dist/js/custom.min.js"></script>
|
|
<!--Form JS-->
|
|
<script src="/assets/libs/inputmask/dist/min/jquery.inputmask.bundle.min.js"></script>
|
|
<script src="/dist/js/pages/mask/mask.init.js"></script>
|
|
<script src="/assets/libs/select2/dist/js/select2.full.min.js"></script>
|
|
<script src="/assets/libs/jquery-asColor/dist/jquery-asColor.min.js"></script>
|
|
<script src="/assets/libs/jquery-asGradient/dist/jquery-asGradient.js"></script>
|
|
<script src="/assets/libs/jquery-asColorPicker/dist/jquery-asColorPicker.min.js"></script>
|
|
<script src="/assets/libs/jquery-minicolors/jquery.minicolors.min.js"></script>
|
|
<script src="/assets/libs/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script>
|
|
<script src="/assets/libs/quill/dist/quill.min.js"></script>
|
|
<script src="/lib/printjs/print.min.js"></script>
|
|
<script src="/lib/html2canvas/html2canvas.min.js"></script>
|
|
<script src="/lib/html2canvas/dom-to-image.min.js"></script>
|
|
<!-- Datatables JS-->
|
|
<script src="/lib/datatables/datatables.js"></script>
|
|
|
|
<script src="/lib/jquery-validation/dist/jquery.validate.min.js"></script>
|
|
<script src="/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
|
|
|
|
<script src="/js/vue-qrcode-reader.umd.js"></script>
|
|
|
|
<script>
|
|
|
|
$(function () {
|
|
|
|
// Attach a click event listener to elements with the class 'btn-success'.
|
|
$('#addItemBtn').on('click', function () {
|
|
// Show the modal with the ID 'addManufacturerModal'.
|
|
$('#registerItemModal').modal('show');
|
|
});
|
|
$('.closeModal').on('click', function () {
|
|
// Show the modal with the ID 'addManufacturerModal'.
|
|
$('.modal').modal('hide');
|
|
});
|
|
});
|
|
const app = Vue.createApp({
|
|
data() {
|
|
return {
|
|
thisItem: null,
|
|
qrCodeResult: null,
|
|
debounceTimeout: null,
|
|
userlist: null,
|
|
stationlist: null,
|
|
storelist: null,
|
|
supplierlist: null,
|
|
selectedUser: "",
|
|
selectedStation: "",
|
|
selectedStationPIC: null,
|
|
selectedStore: "",
|
|
selectedAction: "",
|
|
assigndate: null,
|
|
selectedSupplier: "",
|
|
selectedOther: "",
|
|
remark: "",
|
|
document: null,
|
|
cancelRemark: "",
|
|
currentUser: null,
|
|
currentUserCompanyDept: null,
|
|
itemlateststatus: "",
|
|
quantity: 1,
|
|
maxQuantity: null,
|
|
|
|
|
|
//QR VARIABLE
|
|
qrCodeResult: null,
|
|
debounceTimeout: null,
|
|
error: "",
|
|
selectedConstraints: { facingMode: "user"},
|
|
trackFunctionSelected: { text: 'outline', value: null },
|
|
barcodeFormats: {
|
|
qr_code: true, // Hanya mendukung QR Code
|
|
code_128: true,
|
|
ean_13: true
|
|
},
|
|
constraintOptions: [
|
|
{ label: "Rear Camera", constraints: { facingMode: "environment" } },
|
|
{ label: "Front Camera", constraints: { facingMode: "user" } }
|
|
],
|
|
videoInputDevices: [],
|
|
selectedCameraId: null,
|
|
scanStartTime: null,
|
|
scanTime: null
|
|
}
|
|
},
|
|
mounted() {
|
|
this.fetchUser();
|
|
this.fetchSuppliers();
|
|
this.fetchUsers();
|
|
this.fetchStores();
|
|
this.fetchStations();
|
|
this.trackFunctionSelected.value = this.paintOutline;
|
|
},
|
|
watch: {
|
|
selectedStation(newStationId) {
|
|
|
|
// Find the station object that matches the selectedStation id
|
|
const selectedStationObj = this.stationlist.find(station => station.stationId === newStationId);
|
|
// Set the selectedPIC based on the stationPIC
|
|
this.selectedStationPIC = selectedStationObj ? selectedStationObj.stationPicID : "";
|
|
// this.selectedStationPIC = selectedStationObj ? selectedStationObj : null;
|
|
},
|
|
// Watch for changes in `thisItem` to reset `quantity` when a new item is scanned
|
|
thisItem: {
|
|
handler(newItem) {
|
|
if (newItem && newItem.category === 'Disposable') {
|
|
this.quantity = 1; // Reset to 1 or default quantity when a disposable item is scanned
|
|
this.maxQuantity = newItem.quantity; // Set maxQuantity for disposable items
|
|
} else {
|
|
this.quantity = 1; // Ensure it's 1 for non-disposable items
|
|
this.maxQuantity = null; // Clear maxQuantity for non-disposable items
|
|
}
|
|
},
|
|
immediate: true // Run the handler immediately when the component is mounted
|
|
}
|
|
},
|
|
computed: {
|
|
selectedStationPicName() {
|
|
const selectedStationObj = this.stationlist.find(station => station.stationId === this.selectedStation);
|
|
return selectedStationObj?.stationPic?.fullName || "";
|
|
},
|
|
filteredDepartments() {
|
|
if (!this.selectedCompany) {
|
|
return []; // No company selected, return empty list
|
|
}
|
|
const company = this.companies.find(c => c.companyId === this.selectedCompany);
|
|
// this.selectedDepartment = '';
|
|
return company ? company.departments : [];
|
|
},
|
|
showProduct() {
|
|
if (!this.selectedProduct) {
|
|
return []; // No company selected, return empty list
|
|
}
|
|
const product = this.products.find(c => c.productId === this.selectedProduct);
|
|
return product ? product : {};
|
|
},
|
|
showSerialNumber() {
|
|
return this.showProduct.category === 'Asset' || this.showProduct.category === 'Part';
|
|
},
|
|
},
|
|
methods: {
|
|
// Split Url dapatkan unique ID Je
|
|
onDecode(detectedCodes) {
|
|
// const endTime = performance.now();
|
|
// this.scanTime = Math.round(endTime - this.scanStartTime); Calculate scan time
|
|
|
|
if (detectedCodes.length > 0) {
|
|
this.qrCodeResult = detectedCodes[0].rawValue; // Ambil URL dari rawValue
|
|
this.UniqueID = this.qrCodeResult.split('/').pop(); // Ambil UniqueID dari URL
|
|
this.fetchItem(this.UniqueID);
|
|
}
|
|
},
|
|
|
|
//Showing Qr Error
|
|
onError(err) {
|
|
let message = `[${err.name}]: `;
|
|
if (err.name === "NotAllowedError") {
|
|
message += "You have to allow camera accecss.";
|
|
} else if (err.name === "NotFoundError") {
|
|
message += "There's no camera detect.";
|
|
} else if (err.name === "NotReadableError") {
|
|
message += "You are using camera on the other application.";
|
|
} else {
|
|
message += err.message;
|
|
}
|
|
this.error = message;
|
|
},
|
|
|
|
//Setting Camera
|
|
async onCameraReady(videoElement) {
|
|
|
|
const video = document.querySelector("video");
|
|
// console.log("📸 Found Video Element:", video);
|
|
// console.log("🎬 Video.srcObject:", video?.srcObject);
|
|
|
|
const track = video.srcObject.getVideoTracks()[0];
|
|
// console.log("🎞 Video Track:", track);
|
|
|
|
|
|
if (track && track.getCapabilities) {
|
|
const capabilities = track.getCapabilities(); // Get camera capabilities
|
|
// console.log("🎛 Camera Capabilities:", capabilities);
|
|
|
|
if (capabilities.sharpness) {
|
|
|
|
|
|
// Step 1: Apply resolution constraints first
|
|
track.applyConstraints({
|
|
advanced: [{ width: 1280, height: 720 }]
|
|
}).then(() => {
|
|
// console.log("✅ Resolution applied", track.getSettings().width, "x", track.getSettings().height);
|
|
|
|
// Step 2: Apply sharpness separately
|
|
return track.applyConstraints({ advanced: [{ sharpness: 100 }] });
|
|
}).then(() => {
|
|
// console.log("✅ Sharpness applied")
|
|
|
|
|
|
return track.applyConstraints({ advanced: [{ exposureMode: 'continuous' }] });
|
|
}).then(() => {
|
|
// console.log("✅ exposureMode applied");
|
|
|
|
|
|
})
|
|
.then(() => { console.log("📷 Applied Constraintsss:", track.getSettings());
|
|
})
|
|
.catch(err =>
|
|
console.error("❌ Failed to apply constraints:", err)
|
|
);
|
|
|
|
} else {
|
|
console.warn("⚠️ Some settings are not supported on this camera");
|
|
}
|
|
}
|
|
|
|
// console.log("📷 Applied Constraintsss:", track.getSettings());
|
|
// console.log("📷 Applied Capabilities:",track.getCapabilities());
|
|
|
|
try {
|
|
const devices = await navigator.mediaDevices.enumerateDevices();
|
|
this.videoInputDevices = devices.filter(device => device.kind === 'videoinput');
|
|
|
|
if (this.videoInputDevices.length > 0) {
|
|
// Keep the selected camera if already chosen
|
|
if (!this.selectedCameraId) {
|
|
this.selectedCameraId = this.videoInputDevices[0].deviceId;
|
|
}
|
|
|
|
this.selectedConstraints = { deviceId: { exact: this.selectedCameraId } };
|
|
} else {
|
|
this.error = "No camera detected.";
|
|
}
|
|
} catch (err) {
|
|
this.error = "Error accessing camera: " + err.message;
|
|
}
|
|
},
|
|
|
|
//Update Camera Category
|
|
updateCamera() {
|
|
this.selectedConstraints = { deviceId: { exact: this.selectedCameraId } };
|
|
},
|
|
|
|
//Red box if QR Detect
|
|
paintOutline(detectedCodes, ctx) {
|
|
for (const detectedCode of detectedCodes) {
|
|
const [firstPoint, ...otherPoints] = detectedCode.cornerPoints;
|
|
|
|
ctx.strokeStyle = 'red'; // Warna garis merah
|
|
ctx.lineWidth = 3;
|
|
|
|
ctx.beginPath();
|
|
ctx.moveTo(firstPoint.x, firstPoint.y);
|
|
for (const { x, y } of otherPoints) {
|
|
ctx.lineTo(x, y);
|
|
}
|
|
ctx.lineTo(firstPoint.x, firstPoint.y);
|
|
ctx.closePath();
|
|
ctx.stroke();
|
|
}
|
|
},
|
|
resetScanner(){
|
|
this.thisItem = null;
|
|
this.resetForm();
|
|
},
|
|
handleFileUpload(event) {
|
|
const file = event.target.files[0];
|
|
|
|
if (file) {
|
|
const reader = new FileReader();
|
|
reader.onload = (e) => {
|
|
this.document = e.target.result.split(',')[1]; // Get Base64 string (remove metadata)
|
|
};
|
|
reader.readAsDataURL(file);
|
|
} else {
|
|
this.document = null;
|
|
}
|
|
},
|
|
async addItemMovement() {
|
|
// Client-side validation for quantity
|
|
if (this.thisItem && this.thisItem.category === "Disposable" && this.quantity > this.thisItem.quantity) {
|
|
alert('Error!', `The quantity you entered (${this.quantity}) exceeds the available stock (${this.thisItem.quantity}). Please enter a quantity less than or equal to the available stock.`, 'error');
|
|
return; // Prevent form submission
|
|
}
|
|
|
|
// Check if the item is disposable and set serial number accordingly
|
|
let itemQuantityToSend = 1; // Default quantity for non-disposable
|
|
if (this.thisItem && this.thisItem.category === "Disposable") {
|
|
// Ensure serial number is null for disposable items
|
|
this.thisItem.serialNumber = null;
|
|
itemQuantityToSend = this.quantity; // Use the quantity from the input for disposable
|
|
}
|
|
|
|
const now = new Date();
|
|
const formData = {
|
|
|
|
...(this.selectedAction === 'user' ? { toStore: this.currentUser.store, toUser: this.currentUser.id, toOther: 'On Delivery', SendDate: this.assigndate, lastUser: this.selectedUser, MovementComplete: false, Remark: this.remark, ConsignmentNote: this.document} : {}),
|
|
...(this.selectedAction === 'station' ? { toStore: this.currentUser.store, toUser: this.currentUser.id, toOther: 'On Delivery', SendDate: this.assigndate, lastStation: this.selectedStation, lastUser: this.selectedStationPIC, MovementComplete: false, Remark: this.remark, ConsignmentNote: this.document} : {}),
|
|
...(this.selectedAction === 'store' ? { toStore: this.currentUser.store, toUser: this.currentUser.id, toOther: 'On Delivery', SendDate: this.assigndate, lastStore: this.selectedStore, MovementComplete: false, Remark: this.remark, ConsignmentNote: this.document} : {}),
|
|
...(this.selectedAction === 'supplier' ? { toStore: this.currentUser.store, toUser: this.currentUser.id, toOther: this.selectedOther, SendDate: this.assigndate, Remark: this.remark + '. Item sent to ' + this.selectedSupplier + ' for ' + this.selectedOther, ConsignmentNote: this.document, lastUser: this.currentUser.id, lastStore: this.currentUser.store, MovementComplete: false, } : {}),
|
|
...(this.selectedAction === 'faulty' ? { toStore: this.currentUser.store, toUser: this.currentUser.id,toOther: 'Faulty', SendDate: new Date(now.getTime() + 8 * 60 * 60 * 1000).toISOString(), ReceiveDate: new Date(now.getTime() + 8 * 60 * 60 * 1000).toISOString(), Remark: this.remark, ConsignmentNote: this.document, MovementComplete: true, } : {}),
|
|
|
|
ItemId: this.thisItem.itemID,
|
|
Action: 'Stock Out',
|
|
Quantity: itemQuantityToSend, // Use the determined quantity here
|
|
};
|
|
|
|
|
|
try {
|
|
|
|
// Proceed to send the data to the API
|
|
const response = await fetch('/InvMainAPI/AddItemMovement', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
// 'Authorization': `Bearer ${this.token}`
|
|
},
|
|
body: JSON.stringify(formData)
|
|
});
|
|
if (response.ok) {
|
|
// If the form submission was successful, display a success message
|
|
alert('Success!', 'Item form has been successfully submitted.', 'success');
|
|
// const updatedItem = await response.json();
|
|
// this.items.push(updatedItem);
|
|
// console.log(updatedItem);
|
|
|
|
// Reset the form
|
|
this.resetForm();
|
|
window.location.href = '/Inventory/InventoryMaster/ItemMovement';
|
|
|
|
} else {
|
|
throw new Error('Failed to submit form.');
|
|
}
|
|
|
|
} catch (error) {
|
|
console.error('Error:', error);
|
|
|
|
// Displaying error message
|
|
alert('Inventory PSTW Error', `An error occurred: ${error.message}`, 'error');
|
|
}
|
|
|
|
},
|
|
async receiveItemMovement() {
|
|
|
|
const now = new Date();
|
|
console.log('currentuser'+this.currentUser.id);
|
|
console.log('lastuser'+this.thisItem.lastuser);
|
|
|
|
const formData = {
|
|
|
|
Id: this.thisItem.movementId,
|
|
ReceiveDate: new Date(now.getTime() + 8 * 60 * 60 * 1000).toISOString(),
|
|
Remark: this.thisItem.remark,
|
|
LastUser: this.thisItem.lastuser == null ? this.currentUser.id : this.thisItem.lastuser,
|
|
LatestStatus: this.thisItem.toOther === "Return" ? "Faulty" : (this.thisItem.toOther === "Calibration" || this.thisItem.toOther === "Repair" || this.thisItem.toOther === "On Delivery" ) ? "Ready To Deploy" : (this.itemlateststatus == 'On Delivery' && this.thisItem.lastStore == this.currentUser.store ? "Delivered" : "")
|
|
};
|
|
|
|
|
|
try {
|
|
|
|
// Proceed to send the data to the API
|
|
const response = await fetch('/InvMainAPI/UpdateItemMovementMaster', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
// 'Authorization': `Bearer ${this.token}`
|
|
},
|
|
body: JSON.stringify(formData)
|
|
});
|
|
if (response.ok) {
|
|
// If the form submission was successful, display a success message
|
|
// alert('Success!', 'Item form has been successfully submitted.', 'success');
|
|
//const updatedItem = await response.json();
|
|
// this.items.push(updatedItem);
|
|
// console.log(updatedItem);
|
|
|
|
// Reset the form
|
|
this.resetForm();
|
|
window.location.href = '/Inventory/InventoryMaster/ItemMovement';
|
|
|
|
} else {
|
|
throw new Error('Failed to submit form.');
|
|
}
|
|
|
|
} catch (error) {
|
|
console.error('Error:', error);
|
|
|
|
// Displaying error message
|
|
alert('Inventory PSTW Error', `An error occurred: ${error.message}`, 'error');
|
|
}
|
|
|
|
},
|
|
async fetchItem(itemid) {
|
|
try {
|
|
const response = await fetch('/InvMainAPI/GetItem/' + itemid, {
|
|
method: 'POST',
|
|
});
|
|
|
|
if (response.ok) {
|
|
this.thisItem = await response.json();
|
|
// If the item is disposable, set the quantity to 1 by default, or to its current quantity if available
|
|
if (this.thisItem.category === 'Disposable') {
|
|
this.quantity = 1;
|
|
this.maxQuantity = this.thisItem.quantity;
|
|
} else {
|
|
this.quantity = 1;
|
|
this.maxQuantity = null;
|
|
}
|
|
|
|
console.log('last store' + this.thisItem.lastStore);
|
|
this.itemlateststatus = this.thisItem.latestStatus ? this.thisItem.latestStatus : this.thisItem.toOther;
|
|
this.itemassignedtouser = (this.thisItem.toUser === this.currentUser.id || this.thisItem.lastUser === this.currentUser.id) && this.thisItem.lastStore === this.currentUser.store ? true : false;
|
|
|
|
console.log(this.thisItem.lastStore);
|
|
console.log(this.thisItem.lastStore == this.currentUser.store ? true : false);
|
|
console.log(this.thisItem.toUser == this.currentUser.id ? true : false);
|
|
console.log(this.thisItem.lastUser == this.currentUser.id ? true : false);
|
|
console.log(((this.thisItem.toUser == this.currentUser.id) || (this.thisItem.lastUser == this.currentUser.id)) ? true : false);
|
|
console.log('currentuser store' + this.currentUser.store);
|
|
|
|
} else {
|
|
// If the response is not OK (e.g., 404 Not Found)
|
|
const errorData = await response.json(); // Assuming your API sends a JSON error object
|
|
// Show an alert message to the user
|
|
alert('QR Scan Error: ' + errorData.message);
|
|
this.resetScanner(); // Optionally reset the scanner on error
|
|
}
|
|
} catch (error) {
|
|
console.error('Error fetching item information:', error);
|
|
// Show an alert message for network or other unhandled errors
|
|
alert('An unexpected error occurred: ' + error.message);
|
|
this.resetScanner(); // Optionally reset the scanner on unexpected error
|
|
}
|
|
},
|
|
async fetchSuppliers() {
|
|
try {
|
|
const response = await fetch('/InvMainAPI/SupplierList', {
|
|
method: 'POST', // Specify the HTTP method
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
}
|
|
});
|
|
if (!response.ok) {
|
|
throw new Error('Failed to fetch suppliers');
|
|
}
|
|
this.supplierlist = await response.json(); // Get the full response object
|
|
|
|
} catch (error) {
|
|
console.error('Error fetching suppliers:', error);
|
|
}
|
|
},
|
|
resetForm() {
|
|
this.selectedUser = "";
|
|
this.selectedStore = "";
|
|
this.selectedSupplier = "";
|
|
this.remark = "";
|
|
this.assigndate = "";
|
|
this.selectedStore = "";
|
|
this.selectedOther = "";
|
|
this.selectedStation = "";
|
|
this.selectedStationPIC = "";
|
|
this.cancelRemark = "";
|
|
this.quantity = 1; // Reset quantity when the form is reset
|
|
this.maxQuantity = null; // Clear maxQuantity on form reset
|
|
|
|
|
|
},
|
|
|
|
|
|
async confirmCancelItemMovement() {
|
|
if (!window.confirm("Are you sure you want to cancel this item movement?")) {
|
|
return;
|
|
}
|
|
|
|
const now = new Date();
|
|
|
|
try {
|
|
// --- REMOVED: First Movement: Cancellation Record (cancellationMovementData) ---
|
|
|
|
// Fetch the current item movement details to get the existing Remark
|
|
const originalMovementDetailsResponse = await fetch(`/InvMainAPI/GetItemMovementById?id=${this.thisItem.movementId}`); // Assuming you have an API endpoint to get a single item movement by ID
|
|
if (!originalMovementDetailsResponse.ok) {
|
|
throw new Error('Failed to retrieve original item movement details.');
|
|
}
|
|
const originalMovementDetails = await originalMovementDetailsResponse.json();
|
|
const currentRemark = originalMovementDetails.remark || ''; // Get existing remark, default to empty string if null
|
|
|
|
// Second Movement: Re-registration/Re-stock Record
|
|
const registrationMovementData = {
|
|
ItemId: this.thisItem.itemID,
|
|
ToStore: this.currentUser.store,
|
|
ToUser: this.currentUser.id,
|
|
ToOther: null,
|
|
sendDate: null,
|
|
Action: 'Register',
|
|
Quantity: this.thisItem.movementQuantity, // Use the movement quantity, not item quantity
|
|
Remark: null,
|
|
ConsignmentNote: null,
|
|
LastUser: this.currentUser.id,
|
|
LastStore: this.currentUser.store,
|
|
LatestStatus: 'Ready To Deploy',
|
|
receiveDate: null,
|
|
MovementComplete: true,
|
|
};
|
|
|
|
// Update the original movement to mark it as cancelled
|
|
const updateOriginalResponse = await fetch('/InvMainAPI/UpdateItemMovementMaster', {
|
|
method: 'POST',
|
|
headers: { 'Content-Type': 'application/json' },
|
|
body: JSON.stringify({
|
|
Id: this.thisItem.movementId,
|
|
MovementComplete: true,
|
|
LatestStatus: 'Cancelled',
|
|
// Append the cancellation remark to the current remark
|
|
Remark: `${currentRemark.trim()}${currentRemark.trim() ? ' / ' : ''}Movement cancelled: ${this.cancelRemark}`
|
|
}),
|
|
});
|
|
|
|
if (!updateOriginalResponse.ok) {
|
|
throw new Error('Failed to update original movement as cancelled.');
|
|
}
|
|
|
|
// --- REMOVED: Send the first movement (cancellation) ---
|
|
// const response1 = await fetch('/InvMainAPI/AddItemMovement', { ... });
|
|
|
|
// Send the second movement (registration/re-stock)
|
|
const response2 = await fetch('/InvMainAPI/AddItemMovement', {
|
|
method: 'POST',
|
|
headers: { 'Content-Type': 'application/json' },
|
|
body: JSON.stringify(registrationMovementData),
|
|
});
|
|
|
|
if (!response2.ok) {
|
|
throw new Error('Failed to record re-registration movement.');
|
|
}
|
|
|
|
// Update the item's quantity by adding back the assigned quantity
|
|
const updateItemResponse = await fetch('/InvMainAPI/UpdateItemQuantity', {
|
|
method: 'POST',
|
|
headers: { 'Content-Type': 'application/json' },
|
|
body: JSON.stringify({
|
|
ItemId: this.thisItem.itemID,
|
|
MovementId: this.thisItem.movementId // Pass the movement ID to find the exact quantity
|
|
// Don't pass Quantity here - API will get it from the movement record
|
|
}),
|
|
});
|
|
|
|
if (!updateItemResponse.ok) {
|
|
throw new Error('Failed to update item quantity.');
|
|
}
|
|
|
|
alert('Success!', 'Item movement cancelled and quantity returned successfully.', 'success');
|
|
this.resetForm();
|
|
window.location.href = '/Inventory/InventoryMaster/ItemMovement';
|
|
|
|
} catch (error) {
|
|
console.error('Error during cancellation process:', error);
|
|
alert('Error', `An error occurred during cancellation: ${error.message}`, 'error');
|
|
}
|
|
},
|
|
|
|
// FRONT END FUNCTIONS
|
|
//----------------------//
|
|
async fetchUser() {
|
|
try {
|
|
const response = await fetch(`/IdentityAPI/GetUserInformation/`, {
|
|
method: 'POST',
|
|
});
|
|
if (response.ok) {
|
|
const data = await response.json();
|
|
this.currentUser = data?.userInfo || null;
|
|
const companyDeptData = await this.currentUser.department;
|
|
this.currentUserCompanyDept = companyDeptData;
|
|
this.selectedCompany = companyDeptData?.companyId || "";
|
|
this.selectedDepartment = companyDeptData?.departmentId || "";
|
|
|
|
|
|
}
|
|
else {
|
|
console.error(`Failed to fetch user: ${response.statusText}`);
|
|
}
|
|
}
|
|
catch (error) {
|
|
console.error('There was a problem with the fetch operation:', error);
|
|
}
|
|
},
|
|
async fetchUsers() {
|
|
try {
|
|
// const token = localStorage.getItem('token'); // Get the token from localStorage
|
|
const response = await fetch('/InvMainAPI/UserList', {
|
|
method: 'POST', // Specify the HTTP method
|
|
headers: {
|
|
'Content-Type': 'application/json', // Set content type
|
|
// 'Authorization': `Bearer ${token}` // Include the token in the headers
|
|
}
|
|
});
|
|
|
|
if (!response.ok) {
|
|
throw new Error('Failed to fetch item');
|
|
}
|
|
this.userlist = await response.json();
|
|
|
|
|
|
}
|
|
catch (error) {
|
|
console.error('Error fetching item:', error);
|
|
}
|
|
},
|
|
async fetchStations() {
|
|
try {
|
|
// const token = localStorage.getItem('token'); // Get the token from localStorage
|
|
const response = await fetch('/InvMainAPI/StationList', {
|
|
method: 'POST', // Specify the HTTP method
|
|
headers: {
|
|
'Content-Type': 'application/json', // Set content type
|
|
// 'Authorization': `Bearer ${token}` // Include the token in the headers
|
|
}
|
|
});
|
|
|
|
if (!response.ok) {
|
|
throw new Error('Failed to fetch item');
|
|
}
|
|
this.stationlist = await response.json();
|
|
// console.log(this.stationlist);
|
|
|
|
|
|
}
|
|
catch (error) {
|
|
console.error('Error fetching item:', error);
|
|
}
|
|
},
|
|
async fetchStores() {
|
|
try {
|
|
// const token = localStorage.getItem('token'); // Get the token from localStorage
|
|
const response = await fetch('/InvMainAPI/StoreList', {
|
|
method: 'POST', // Specify the HTTP method
|
|
headers: {
|
|
'Content-Type': 'application/json', // Set content type
|
|
// 'Authorization': `Bearer ${token}` // Include the token in the headers
|
|
}
|
|
});
|
|
|
|
if (!response.ok) {
|
|
throw new Error('Failed to fetch item');
|
|
}
|
|
this.storelist = await response.json();
|
|
|
|
|
|
}
|
|
catch (error) {
|
|
console.error('Error fetching item:', error);
|
|
}
|
|
},
|
|
},
|
|
});
|
|
|
|
app.component("qrcode-stream", VueQrcodeReader.QrcodeStream);
|
|
|
|
app.mount('#registerItemMovement');
|
|
</script>
|
|
|
|
|
|
</body>
|
|
</html>
|
|
|
|
|