443 lines
22 KiB
HTML
443 lines
22 KiB
HTML
<!DOCTYPE html>
|
|
<html class="light" lang="en">
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
|
<title>Robot Manager Account - Hệ thống quản lý</title>
|
|
<link rel="icon" type="image/png" href="../image/logo_PNKX.png"/>
|
|
<!-- Fonts -->
|
|
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap" rel="stylesheet"/>
|
|
<!-- Material Symbols -->
|
|
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap" rel="stylesheet"/>
|
|
<link rel="stylesheet" href="../css/main.css?v=20261019-4" />
|
|
<link rel="stylesheet" href="../css/robot-bom.css?v=20261102-5" />
|
|
<!-- Notiflix Notify -->
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/notiflix@3.2.7/dist/notiflix-3.2.7.min.css" />
|
|
<script src="https://cdn.jsdelivr.net/npm/notiflix@3.2.7/dist/notiflix-aio-3.2.7.min.js"></script>
|
|
<script src="https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/xlsx.full.min.js"></script>
|
|
<style>
|
|
.material-symbols-outlined {
|
|
font-family: 'Material Symbols Outlined';
|
|
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
|
|
font-size: 1.25rem;
|
|
line-height: 1;
|
|
letter-spacing: normal;
|
|
text-transform: none;
|
|
display: inline-flex;
|
|
white-space: nowrap;
|
|
word-wrap: normal;
|
|
direction: ltr;
|
|
}
|
|
body { font-family: 'Inter', sans-serif; height: 100vh; overflow: hidden; }
|
|
h1, h2, h3, .brand-logo { font-family: 'Manrope', sans-serif; }
|
|
.modal-backdrop {
|
|
opacity: 0;
|
|
transition: opacity 0.2s ease-in-out;
|
|
pointer-events: none;
|
|
}
|
|
.modal-backdrop.open {
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
}
|
|
.modal-content {
|
|
transform: scale(0.95);
|
|
transition: transform 0.2s ease-in-out;
|
|
}
|
|
.modal-backdrop.open .modal-content {
|
|
transform: scale(1);
|
|
}
|
|
|
|
body.app-shell {
|
|
overflow: hidden;
|
|
}
|
|
|
|
#mobileMenuBtn,
|
|
#sidebarBackdrop {
|
|
display: none;
|
|
}
|
|
|
|
.assets-mobile-list,
|
|
.consumables-mobile-list {
|
|
display: none;
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
body.app-shell {
|
|
width: 100%;
|
|
min-height: 100dvh;
|
|
height: 100dvh;
|
|
overflow: hidden;
|
|
position: relative;
|
|
}
|
|
|
|
#mobileMenuBtn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
#sidebarBackdrop {
|
|
display: block;
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 70;
|
|
background: rgba(15, 23, 42, 0.45);
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.2s ease-in-out;
|
|
}
|
|
|
|
#appSidebar {
|
|
position: fixed;
|
|
inset: 0 auto 0 0;
|
|
height: 100dvh;
|
|
width: min(82vw, 16rem);
|
|
z-index: 80;
|
|
transform: translateX(-100%);
|
|
transition: transform 0.2s ease-in-out;
|
|
box-shadow: 0 20px 45px rgba(15, 23, 42, 0.35);
|
|
}
|
|
|
|
body.mobile-nav-open #sidebarBackdrop {
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
body.mobile-nav-open #appSidebar {
|
|
transform: translateX(0);
|
|
}
|
|
|
|
#appMain {
|
|
width: 100%;
|
|
min-width: 0;
|
|
height: 100dvh;
|
|
}
|
|
|
|
#appMain > header {
|
|
padding-left: 0.75rem;
|
|
padding-right: 0.75rem;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.topbar-actions {
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
#profileBtn {
|
|
padding: 0.4rem 0.55rem;
|
|
}
|
|
|
|
#profileBtn .profile-meta {
|
|
display: none;
|
|
}
|
|
|
|
.dashboard-header,
|
|
.page-header,
|
|
.page-filters,
|
|
.users-controls {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.page-filters > div,
|
|
.users-controls > div,
|
|
.users-controls select {
|
|
width: 100%;
|
|
}
|
|
|
|
.dashboard-actions,
|
|
.page-header button,
|
|
.page-header > button {
|
|
width: 100%;
|
|
}
|
|
|
|
.dashboard-stats,
|
|
.apps-stats {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
}
|
|
|
|
.table-wrap {
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.table-wrap table {
|
|
min-width: 700px;
|
|
}
|
|
|
|
.assets-page,
|
|
.consumables-page {
|
|
padding: 0.75rem;
|
|
}
|
|
|
|
.assets-page .page-header,
|
|
.consumables-page .page-header {
|
|
margin-bottom: 0.75rem;
|
|
}
|
|
|
|
.assets-page .asset-header-actions,
|
|
.consumables-page .consumable-header-actions {
|
|
width: 100%;
|
|
display: flex;
|
|
flex-flow: row nowrap;
|
|
overflow-x: auto;
|
|
overscroll-behavior-x: contain;
|
|
-webkit-overflow-scrolling: touch;
|
|
padding-bottom: 0.25rem;
|
|
}
|
|
|
|
.assets-page .asset-header-actions > button,
|
|
.consumables-page .consumable-header-actions > button {
|
|
width: auto;
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
.assets-page .page-filters,
|
|
.consumables-page .page-filters {
|
|
margin-bottom: 0.75rem;
|
|
}
|
|
|
|
.assets-page .assets-desktop-table,
|
|
.consumables-page .consumables-desktop-table {
|
|
display: none;
|
|
}
|
|
|
|
.assets-page .assets-mobile-list,
|
|
.consumables-page .consumables-mobile-list {
|
|
display: flex;
|
|
min-height: 0;
|
|
}
|
|
|
|
.assets-page .asset-mobile-card,
|
|
.consumables-page .consumable-mobile-card {
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.page-pager {
|
|
gap: 0.5rem;
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.modal-backdrop {
|
|
align-items: flex-end;
|
|
}
|
|
|
|
.modal-backdrop .modal-content {
|
|
width: calc(100% - 1rem);
|
|
max-height: min(88dvh, 700px);
|
|
margin: 0.5rem;
|
|
overflow-y: auto;
|
|
border-radius: 0.9rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 560px) {
|
|
.dashboard-stats,
|
|
.apps-stats {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.assets-page .page-header h1,
|
|
.consumables-page .page-header h1 {
|
|
font-size: 1.25rem;
|
|
}
|
|
|
|
.assets-page .page-header p,
|
|
.consumables-page .page-header p {
|
|
font-size: 0.75rem;
|
|
}
|
|
}
|
|
|
|
</style>
|
|
<link rel="stylesheet" href="../css/responsive.css?v=20261019-3" />
|
|
</head>
|
|
<body class="app-shell bg-background text-on-surface antialiased flex h-screen w-screen">
|
|
<!-- SideNavBar -->
|
|
<aside id="appSidebar" class="h-screen w-64 flex flex-col bg-slate-100 dark:bg-slate-900 font-manrope text-sm font-medium border-r border-outline-variant/10 shrink-0">
|
|
<div class="flex flex-col h-full min-h-0 py-4">
|
|
<!-- Header -->
|
|
<div class="px-5 mb-4 shrink-0">
|
|
<a href="#dashboard" class="sidebar-brand-link" aria-label="PNKX - Về trang tổng quan">
|
|
<img src="../image/logo_PNKX.png" alt="PNKX" class="sidebar-brand-image"/>
|
|
</a>
|
|
</div>
|
|
<!-- Primary Nav -->
|
|
<nav id="sidebarNav" class="sidebar-nav flex-1 min-h-0 overflow-y-auto" aria-label="Điều hướng chính">
|
|
<ul class="sidebar-menu">
|
|
<li>
|
|
<a href="#dashboard" data-nav="dashboard" class="sidebar-link" aria-current="page">
|
|
<span class="material-symbols-outlined" aria-hidden="true">dashboard</span>
|
|
<span class="sidebar-text">Tổng quan</span>
|
|
</a>
|
|
</li>
|
|
<li data-nav-group="accounts">
|
|
<button id="sidebarAccountsToggle" type="button" class="sidebar-link sidebar-group-toggle" data-nav-toggle="accounts" aria-expanded="false" aria-controls="sidebarAccounts">
|
|
<span class="material-symbols-outlined" aria-hidden="true">manage_accounts</span>
|
|
<span class="sidebar-text">Tài khoản</span>
|
|
<span class="material-symbols-outlined sidebar-chevron" aria-hidden="true">chevron_right</span>
|
|
</button>
|
|
<ul id="sidebarAccounts" class="sidebar-children" aria-labelledby="sidebarAccountsToggle" hidden>
|
|
<li><a href="#applications" data-nav="applications" class="sidebar-link">
|
|
<span class="material-symbols-outlined" aria-hidden="true">apps</span>
|
|
<span class="sidebar-text">Ứng dụng</span>
|
|
</a></li>
|
|
<li><a href="#accounts" data-nav="accounts" class="sidebar-link">
|
|
<span class="material-symbols-outlined" aria-hidden="true">manage_accounts</span>
|
|
<span class="sidebar-text">Tài khoản</span>
|
|
</a></li>
|
|
<li><a href="#notifications" data-nav="notifications" class="sidebar-link">
|
|
<span class="material-symbols-outlined" aria-hidden="true">notifications</span>
|
|
<span class="sidebar-text">Thông báo</span>
|
|
<span id="notificationNavBadge" class="hidden ml-auto min-w-[20px] h-5 px-1.5 rounded-full bg-red-600 text-white text-[10px] font-extrabold leading-5 text-center">0</span>
|
|
</a></li>
|
|
</ul>
|
|
</li>
|
|
<li data-nav-group="assets">
|
|
<button id="sidebarAssetsToggle" type="button" class="sidebar-link sidebar-group-toggle" data-nav-toggle="assets" aria-expanded="false" aria-controls="sidebarAssets">
|
|
<span class="material-symbols-outlined" aria-hidden="true">inventory_2</span>
|
|
<span class="sidebar-text">Quản lý tài sản</span>
|
|
<span class="material-symbols-outlined sidebar-chevron" aria-hidden="true">chevron_right</span>
|
|
</button>
|
|
<ul id="sidebarAssets" class="sidebar-children" aria-labelledby="sidebarAssetsToggle" hidden>
|
|
<li><a href="#assets" data-nav="assets" class="sidebar-link">
|
|
<span class="material-symbols-outlined" aria-hidden="true">inventory_2</span>
|
|
<span class="sidebar-text">Tài sản</span>
|
|
</a></li>
|
|
<li><a href="#asset-borrows" data-nav="asset-borrows" class="sidebar-link">
|
|
<span class="material-symbols-outlined" aria-hidden="true">assignment_returned</span>
|
|
<span class="sidebar-text">Mượn/Trả tài sản</span>
|
|
</a></li>
|
|
<li><a href="#my-borrowed-assets" data-nav="my-borrowed-assets" class="sidebar-link">
|
|
<span class="material-symbols-outlined" aria-hidden="true">inventory</span>
|
|
<span class="sidebar-text">Tài sản đang mượn</span>
|
|
</a></li>
|
|
<li><a href="#asset-departments" data-nav="asset-departments" class="sidebar-link">
|
|
<span class="material-symbols-outlined" aria-hidden="true">apartment</span>
|
|
<span class="sidebar-text">Phòng ban</span>
|
|
</a></li>
|
|
<li><a href="#asset-projects" data-nav="asset-projects" class="sidebar-link">
|
|
<span class="material-symbols-outlined" aria-hidden="true">workspaces</span>
|
|
<span class="sidebar-text">Dự án</span>
|
|
</a></li>
|
|
</ul>
|
|
</li>
|
|
<li data-nav-group="consumables">
|
|
<button id="sidebarConsumablesToggle" type="button" class="sidebar-link sidebar-group-toggle" data-nav-toggle="consumables" aria-expanded="false" aria-controls="sidebarConsumables">
|
|
<span class="material-symbols-outlined" aria-hidden="true">category</span>
|
|
<span class="sidebar-text">Vật tư tiêu hao</span>
|
|
<span class="material-symbols-outlined sidebar-chevron" aria-hidden="true">chevron_right</span>
|
|
</button>
|
|
<ul id="sidebarConsumables" class="sidebar-children" aria-labelledby="sidebarConsumablesToggle" hidden>
|
|
<li><a href="#consumables" data-nav="consumables" class="sidebar-link">
|
|
<span class="material-symbols-outlined" aria-hidden="true">category</span>
|
|
<span class="sidebar-text">Danh sách VTTH</span>
|
|
</a></li>
|
|
<li><a href="#consumable-exports" data-nav="consumable-exports" class="sidebar-link">
|
|
<span class="material-symbols-outlined" aria-hidden="true">outbox</span>
|
|
<span class="sidebar-text">Lịch sử xuất</span>
|
|
</a></li>
|
|
</ul>
|
|
</li>
|
|
<li data-nav-group="robots">
|
|
<button id="sidebarRobotsToggle" type="button" class="sidebar-link sidebar-group-toggle" data-nav-toggle="robots" aria-expanded="false" aria-controls="sidebarRobots">
|
|
<span class="material-symbols-outlined" aria-hidden="true">smart_toy</span>
|
|
<span class="sidebar-text">Quản lý robot</span>
|
|
<span class="material-symbols-outlined sidebar-chevron" aria-hidden="true">chevron_right</span>
|
|
</button>
|
|
<ul id="sidebarRobots" class="sidebar-children" aria-labelledby="sidebarRobotsToggle" hidden>
|
|
<li><a href="#robots" data-nav="robots" class="sidebar-link">
|
|
<span class="material-symbols-outlined" aria-hidden="true">smart_toy</span>
|
|
<span class="sidebar-text">Danh sách robot</span>
|
|
</a></li>
|
|
<li><a href="#robot-types" data-nav="robot-types" class="sidebar-link">
|
|
<span class="material-symbols-outlined" aria-hidden="true">category</span>
|
|
<span class="sidebar-text">Thể loại robot</span>
|
|
</a></li>
|
|
<li><a href="#robot-bom" data-nav="robot-bom" class="sidebar-link">
|
|
<span class="material-symbols-outlined" aria-hidden="true">receipt_long</span>
|
|
<span class="sidebar-text">BOM robot</span>
|
|
</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#documents" data-nav="documents" class="sidebar-link">
|
|
<span class="material-symbols-outlined" aria-hidden="true">folder_open</span>
|
|
<span class="sidebar-text">Tài liệu</span>
|
|
</a></li>
|
|
<li id="usersSection" class="sidebar-admin" style="display: none;">
|
|
<a id="usersNav" href="#users" data-nav="users" class="sidebar-link" style="display: none;">
|
|
<span class="material-symbols-outlined" aria-hidden="true">people</span>
|
|
<span class="sidebar-text">Người dùng</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
<!-- Footer -->
|
|
<div class="px-5 pt-3 mt-3 border-t border-outline-variant/10 shrink-0">
|
|
<div class="text-[10px] font-bold text-on-surface-variant/40 uppercase tracking-widest">v1.0.0</div>
|
|
</div>
|
|
</div>
|
|
</aside>
|
|
|
|
<button id="sidebarBackdrop" type="button" aria-label="Đóng menu điều hướng"></button>
|
|
|
|
<!-- Main Content -->
|
|
<main id="appMain" class="flex-1 flex flex-col h-screen min-w-0">
|
|
<!-- TopAppBar -->
|
|
<header class="h-14 flex items-center justify-between px-6 bg-slate-50/80 dark:bg-slate-950/80 backdrop-blur-xl border-b border-outline-variant/10 shrink-0">
|
|
<div class="flex items-center gap-4 flex-1">
|
|
<button id="mobileMenuBtn" type="button" class="p-2 rounded-lg text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors" aria-label="Mở menu điều hướng" aria-controls="appSidebar" aria-expanded="false">
|
|
<span class="material-symbols-outlined">menu</span>
|
|
</button>
|
|
</div>
|
|
<div class="topbar-actions flex items-center gap-4">
|
|
<div id="notificationCenterShell" class="relative">
|
|
<button id="notificationsBellBtn" type="button" class="relative inline-flex items-center justify-center w-10 h-10 rounded-lg text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors" title="Thông báo" aria-label="Mở thông báo" aria-haspopup="true" aria-expanded="false">
|
|
<span class="material-symbols-outlined">notifications</span>
|
|
<span id="notificationBadge" class="hidden absolute -top-1 -right-1 min-w-[20px] h-5 px-1 rounded-full bg-red-600 text-white text-[10px] font-extrabold leading-5 text-center ring-2 ring-slate-50 dark:ring-slate-950">0</span>
|
|
</button>
|
|
<div id="notificationPopover" class="hidden absolute right-0 top-12 z-50 w-[min(390px,calc(100vw-24px))] overflow-hidden rounded-2xl border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900 shadow-2xl" role="dialog" aria-label="Thông báo gần đây">
|
|
<div class="flex items-center justify-between gap-3 px-4 py-3 border-b border-slate-100 dark:border-slate-800">
|
|
<div>
|
|
<h2 class="text-sm font-bold text-slate-900 dark:text-slate-50">Thông báo</h2>
|
|
<p id="notificationPopoverSummary" class="text-[11px] text-slate-500">Không có thông báo mới</p>
|
|
</div>
|
|
<button id="notificationMarkAllBtn" type="button" class="text-xs font-semibold text-primary hover:underline">Đánh dấu đã đọc</button>
|
|
</div>
|
|
<div id="notificationPopoverList" class="max-h-[420px] overflow-y-auto"></div>
|
|
<a href="#notifications" id="notificationViewAllLink" class="flex items-center justify-center gap-1 px-4 py-3 border-t border-slate-100 dark:border-slate-800 text-xs font-bold text-primary hover:bg-slate-50 dark:hover:bg-slate-800 transition-colors">
|
|
Xem tất cả
|
|
<span class="material-symbols-outlined text-base">arrow_forward</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<button id="pendingAssetRequestsBtn" type="button" class="hidden relative flex items-center gap-2 px-3 py-2 rounded-lg border border-amber-200 bg-amber-50 hover:bg-amber-100 text-amber-800 transition-colors" title="Đơn chờ xử lý">
|
|
<span class="material-symbols-outlined text-base">notifications_active</span>
|
|
<span class="text-xs font-bold">Đơn chờ</span>
|
|
<span id="pendingAssetRequestsBadge" class="hidden absolute -top-2.5 -right-2.5 min-w-[22px] h-[22px] px-1.5 rounded-[999px] bg-red-600 text-white text-xs font-extrabold leading-[22px] text-center ring-2 ring-white">0</span>
|
|
</button>
|
|
<button id="profileBtn" type="button" class="profile-btn flex items-center gap-2 px-4 py-2 rounded-lg bg-slate-100 dark:bg-slate-800 hover:bg-slate-200 dark:hover:bg-slate-700 transition-colors" title="Sửa hồ sơ">
|
|
<span class="material-symbols-outlined text-slate-600 dark:text-slate-400">account_circle</span>
|
|
<div class="profile-meta flex flex-col">
|
|
<span id="accountUsername" class="text-xs font-semibold text-slate-900 dark:text-slate-50">Tài khoản người dùng</span>
|
|
<span id="accountRole" class="text-[10px] text-slate-500 dark:text-slate-400">Quản trị viên</span>
|
|
</div>
|
|
</button>
|
|
<button id="logoutBtn" class="p-2 rounded-lg text-slate-600 dark:text-slate-300 hover:bg-red-100 dark:hover:bg-red-950 hover:text-red-700 dark:hover:text-red-300 transition-colors" title="Đăng xuất">
|
|
<span class="material-symbols-outlined">logout</span>
|
|
</button>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- Main Content Area -->
|
|
<div id="mainContent" class="flex-1 overflow-hidden">
|
|
<!-- Content will be rendered here by JavaScript -->
|
|
</div>
|
|
</main>
|
|
|
|
<script src="../js/document-formats.js?v=20261019-1"></script>
|
|
<script src="../js/robot-bom.js?v=20261102-5"></script>
|
|
<script src="../js/app.js?v=20261102-2"></script>
|
|
</body>
|
|
</html>
|