<div id="mediq-dashboard" dir="rtl">
<style>
/* ============================================================
MEDIQ DASHBOARD - PROTOTYPE
============================================================ */
#mediq-dashboard,
#mediq-dashboard * {
box-sizing: border-box;
}
#mediq-dashboard {
--navy: #082f4f;
--navy-2: #123f60;
--text: #173b59;
--muted: #71899d#70889c;
--primary: #0bb9b1;
--primary-dark: #079f99;
--bg: #f4f9fb;
--border: #dbe9ef#dbe8ee;
--whitebackground: #ffffff#f5fafc;
position: fixed;
inset: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
z-index: 9999;
overflowdirection: hiddenrtl;
backgroundfont-family:
radial-gradient(Tahoma,
circle at 15% 5%Arial,
sans-serif;
color: rgba(11,185,177,.08),var(--text);
background:
transparent 27%
),
#f4f9fb;
font-family: Tahoma, Arial, sans-serif;
color: var(--text);
direction: rtl;
}
#f5fafc;
}
/* ============================================================
HIDE CONFLUENCE
============================================================ */
html,
#footerbody,
footer#page,
.aui-footer#full-height-container,
#main,
#header#content,
#main-headercontent,
.breadcrumbsaui-page-panel,
#breadcrumbs.aui-page-panel-inner,
.aui-page-panel-metadatacontent,
#likes-and-labels-container.content-body {
displaywidth: none100% !important;
}
html,
body,
#page,
#full-height-container,
#main,
#content,
#main-content,
.aui-page-panel,
.aui-page-panel-inner,
.aui-page-panel-content,
.content-body {
marginheight: 0100% !important;
padding: 0 !important;
max-width: 100%none !important;
heightmargin: 100%0 !important;
max-widthpadding: none0 !important;
}
html,
body {
overflow: hidden !important;
}
#footer,
/* =======footer,
.aui-footer,
#header,
#main-header,
.breadcrumbs,
#breadcrumbs,
.page-metadata {
display: none !important;
}
/* ============================================================
APP
============================================================ */
.mq-app {
width: 100%;
height: 100%;
display: grid;
grid-template-columns:
minmax(0, 1fr)
260px235px;
direction: ltr;
}
/* ============================================================
SIDEBAR
============================================================ */
.mq-sidebar {
grid-column: 2;
height: 100vh;
padding: 25px 17px;
background:
linear-gradient(
180deg,
#073252#073553,
#092944#082e4b
);
color: #fffpadding:
25px
17px;
direction: rtl;
display: flex;
flex-direction: column;
box-shadow:
color: #fff;
}
.mq-logo {
-10px 0 40pxwidth: 100%;
rgba(8,43,75,.08);
}
/* LOGO */
.mq-logo {
padding: 7px 9px 25pxtext-align: center;
padding-bottom: 24px;
border-bottom:
1px solid
rgba(255,255,255,.10);
text-align: center;
}
}
.mq-logo img {
width: 170px165px;
max-width: 90%;
filterheight:
drop-shadow(
0 4px 10px
rgba(0,0,0,.10)
);
}
/* USER */
.mq-user {
margin-top: 20px;
padding: 15px;
border-radius: 14px auto;
}
/* ============================================================
USER
============================================================ */
.mq-user {
margin-top: 18px;
padding: 14px;
border-radius: 13px;
background:
rgba(255,255,255,.07);
border:
1px solid
rgba(255,255,255,.08);
}
.mq-user-name {
font-size: 13px;
font-weight: 800;
}
.mq-user-role {
margin-top: 5px;
font-size: 6px10px;
color:
rgba(255,255,255,.6560);
font-size: 11px;
}
/* NAV */
.mq-nav {============================================================
LIFE margin-top: 23px;
display: flex;
flex-direction: column;
gap: 7px;
}CYCLE MENU
============================================================ */
.mq-nav-itemlife {
minmargin-heighttop: 45px25px;
paddingdisplay: 0 13pxflex;
borderflex-radiusdirection: 11pxcolumn;
displaygap: flex;
7px;
}
.mq-life-item {
alignmin-itemsheight: center44px;
gappadding: 11px;
color:0
rgba(255,255,255,.73)14px;
font-sizedisplay: 12pxflex;
fontalign-weightitems: 700center;
cursor: border-radius: 10px;
color:
rgba(255,255,255,.75);
font-size: 12px;
font-weight: 700;
cursor: pointer;
transition: .15s;
}
.mq-navlife-item:hover {
color: #fff;
background:
rgba(255,255,255,.08);
color: #fff;
}}
.mq-navlife-item.active {
color: #fff;
background:
linear-gradient(
90deg,
#0bb9b1,
#09a7a2#08a69f
);
color: #fff;}
box-shadow:
0 9px 20px
rgba(11,185,177,.20);
}
.mq-nav-icon {
width: 21px;
height: 21px/* ============================================================
LOGOUT
============================================================ */
.mq-sidebar-bottom {
margin-top: auto;
}
.mq-logout {
min-height: 44px;
display: flex;
align-items: center;
justify-contentpadding: center;
}
.mq-nav-icon svg {
width: 20px;0
height: 20px14px;
fillborder-radius: none10px;
strokecolor: currentColor;
stroke-width: 1.8;
stroke-linecap: round;rgba(255,255,255,.70);
strokefont-linejoinsize: round11px;
}
/* LOGOUT */
.mq-sidebar-bottom {
margin-top cursor: autopointer;
}
.mq-logout:hover {
min-height: 43px;
padding: 0 13px;
background:
border-radius: 10px;
display: flexrgba(255,255,255,.07);
align-itemscolor: center#fff;
gap: 10px;}
color:
rgba(255,255,255,.72);
font-size: 12px;
cursor: pointer;
}
.mq-logout:hover {
background:
rgba(255,255,255,.07);
color: #fff;
}
/* ====/* ============================================================
MAIN
============================================================ */
.mq-main {
grid-column: 1;
height: 100vh;
overflow-y: auto;
direction: rtl;
padding:
028px
clamp(25px, 4vw, 55px)
45px;
}
/* ============================================================
HEADER
============================================================ */
.mq-header {
min-height: 90px65px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
border-bottom:
border-bottom:
1px solid
var(--border);
}
.mq-page-title {
color: var(--navy);
font-size: 21px;
font-weight: 900;
}margin-bottom: 25px;
}
.mq-pageheader-subtitletitle {
margin-top: 7px;
color:
color: var(--mutednavy);
font-size: 11px20px;
font-weight: 600900;
}
/* HEADER LEFT */
.mq-header-actions {
display: flex;
align-items: center;============================================================
GRID
============================================================ */
.mq-content-grid {
gapwidth: 10px100%;
}
.mq-hospital {
paddingdisplay:
10px
14px grid;
bordergrid-template-columns:
1px solidminmax(250px, .72fr)
var(--border);
minmax(250px, .72fr)
border-radius: 11px;
background: #fff;
minmax(400px, 1.6fr)
color: var(--textminmax(400px, 1.6fr);
font-sizegap: 11px18px;
fontalign-weightitems: 700stretch;
}
/* ============================================================
WELCOMECARD
============================================================ */
.mq-welcome-panelcard {
marginmin-topheight: 25px415px;
padding: 20px;
border:
1px 22pxsolid
25pxvar(--border);
border-radius: 17px18px;
background:
linear-gradient(
100deg,#fff;
#073553,box-shadow:
0 12px #09666d32px
rgba(27,72,98,.05);
}
.mq-card-header {
colorpadding-bottom: #fff14px;
displaymargin-bottom: flex11px;
alignborder-itemsbottom:
center;
justify-content: space-between;
1px solid
overflow: hidden;
position: relative #edf3f6;
}
.mq-welcome-panel::after {
content: "";card-title {
positioncolor: absolute;
width: 230px;
height: 230px;
left: -60px;
top: -120pxvar(--navy);
borderfont-radiussize: 50%15px;
backgroundfont-weight:
rgba(25,220,205,.15) 900;
}
.mq-welcome-title {
position: relative;
z-index: 2;
font-size: 17px;
font-weight: 900;
}
.mq-welcome-text {
position: relative;
z-index: 2;
margin-top: 7px;
color:
rgba(255,255,255,.72);
font-size: 11px;
}
/* ===================================
/* ============================================================
ACTION
===================================================
STATS
============================================================ */
.mq-stats {
margin-top: 20px;
display: grid;
grid-template-columns:
repeat(4,1fr);
gap: 13px;
}
.mq-stat {
padding: 17px;
border:
1px solid
var(--border);
border-radius: 15px;
background: #fff;
box-shadow:
0 8px 25px
rgba(27,73,99,.035);
}
.mq-stat-label {
color: var(--muted);
font-size: 11px;
font-weight: 700;
}
.mq-stat-value {
margin-top: 8px;
color: var(--navy);
font-size: 23px;
font-weight: 900;
}
.mq-stat-note {
margin-top: 5px;
color: #91a4b3;
font-size: 9px;
}
/* ============================================================
SECTION
============================================================ */
.mq-section {
margin-top: 30px;
}
.mq-section-head {
margin-bottom: 15px;
display: flex;
align-items: center;
justify-content: space-between;
}
.mq-section-title {
color: var(--navy);
font-size: 15px;
font-weight: 900;
}
.mq-section-description {
margin-top: 5px;
color: var(--muted);
font-size: 10px;
}
/* ============================================================
MODULE GRID
============================================================ */
.mq-modules {
display: grid;
grid-template-columns:
repeat(3,minmax(0,1fr));
gap: 16px;
}
/* ============================================================
MODULE CARD
============================================================ */
.mq-module {
min-height: 245px;
padding: 20px;
border:
1px solid
var(--border);
border-radius: 18px;
background:
rgba(255,255,255,.93);
box-shadow:
0 12px 35px
rgba(23,72,99,.045);
transition:
transform .18s ease,
box-shadow .18s ease,
border-color .18s ease;
}
.mq-module:hover {
transform:
translateY(-3px);
border-color:
rgba(11,185,177,.40);
box-shadow:
0 17px 40px
rgba(23,72,99,.08);
}
/* MODULE HEADER */
.mq-module-header {
display: flex;
align-items: center;
gap: 12px;
padding-bottom: 15px;
border-bottom:
1px solid
#edf3f6;
}
.mq-module-icon {
flex: 0 0 auto;
width: 44px;
height: 44px;
border-radius: 13px;
display: flex;
align-items: center;
justify-content: center;
background:
#e4faf8;
color:
var(--primary-dark);
}
.mq-module-icon svg {
width: 23px;
height: 23px;
fill: none;
stroke: currentColor;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}
.mq-module-title {
color: var(--navy);
font-size: 14px;
font-weight: 900;
}
.mq-module-subtitle {
margin-top: 4px;
color: var(--muted);
font-size: 9px;
}
/* ============================================================
MODULE ACTIONS
============================================================ */
.mq-actions {
margin-top: 14px;
display: flex;
flex-direction: column;
gap: 4px;
}
.mq-action {
min-height: 35px;
padding:
0
10px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: space-between;
color: #49677e;
font-size: 10px;
font-weight: 700;
cursor: pointer;
transition: .15s;
}
.mq-action:hover {
color:
var(--primary-dark);
background:
#effaf9;
}
.mq-action-arrow {
color: #9ab0bf;
font-size: 15px;
}
/* ============================================================
EMPTY
============================================================ */
.mq-empty {
padding: 40px;
border:
1px dashed
#cbdde6;
border-radius: 15px;
background:
rgba(255,255,255,.60);
text-align: center;
color: var(--muted);
font-size: 12px;
}
/* ============================================================
RESPONSIVE
============================================================ */
@media(max-width:1200px) {
.mq-modules {
grid-template-columns:
repeat(2,1fr);
}
.mq-stats {
grid-template-columns:
repeat(2,1fr);
}
}
</style>
<div class="mq-app">
<!-- =====================================================
MAIN
===================================================== -->
<main class="mq-main">
<header class="mq-header">
<div>
<div class="mq-page-title">
داشبورد مدیکیو
</div>
<div class="mq-page-subtitle">
سامانه جامع مدیریت تجهیزات پزشکی
</div>
</div>
<div class="mq-header-actions">
<div class="mq-hospital">
بیمارستان / مرکز درمانی
</div>
</div>
</header>
<!-- =================================================
WELCOME
================================================= -->
<section class="mq-welcome-panel">
<div>
<div class="mq-welcome-title">
خوش آمدید، <span id="mqWelcomeName">کاربر مدیکیو</span>
</div>
<div class="mq-welcome-text">
ماژولها و امکانات این صفحه بر اساس سطح دسترسی شما نمایش داده میشوند.
</div>
</div>
</section>
<!-- =================================================
STATS
================================================= -->
<section
id="mqStats"
class="mq-stats"
>
<div class="mq-stat">
<div class="mq-stat-label">
کل تجهیزات
</div>
<div class="mq-stat-value">
۱,۲۴۸
</div>
<div class="mq-stat-note">
تجهیزات ثبتشده
</div>
</div>
<div class="mq-stat">
<div class="mq-stat-label">
تجهیزات فعال
</div>
<div class="mq-stat-value">
۱,۱۰۲
</div>
<div class="mq-stat-note">
در حال بهرهبرداری
</div>
</div>
<div class="mq-stat">
<div class="mq-stat-label">
تعمیرات باز
</div>
<div class="mq-stat-value">
۲۳
</div>
<div class="mq-stat-note">
نیازمند پیگیری
</div>
</div>
<div class="mq-stat">
<div class="mq-stat-label">
PM نزدیک
</div>
<div class="mq-stat-value">
۳۷
</div>
<div class="mq-stat-note">
در ۳۰ روز آینده
</div>
</div>
</section>
<!-- =================================================
MODULES
================================================= -->
<section class="mq-section">
<div class="mq-section-head">
<div>
<div class="mq-section-title">
خدمات و ماژولهای من
</div>
<div class="mq-section-description">
فقط بخشهایی که مجوز استفاده از آنها را دارید نمایش داده میشوند.
</div>
</div>
</div>
<div
id="mqModules"
class="mq-modules"
></div>
</section>
</main>
<!-- =====================================================
SIDEBAR
===================================================== -->
<aside class="mq-sidebar">
<div class="mq-logo">
<img
src="/download/attachments/174855060/MediQ%20Heart%20Medical%20Logo.png"
alt="MediQ"
>
</div>
<div class="mq-user">
<div
id="mqUserName"
class="mq-user-name"
>
کاربر مدیکیو
</div>
<div
id="mqUserRole"
class="mq-user-role"
>
کارشناس تجهیزات پزشکی
</div>
</div>
<nav class="mq-nav">
<div class="mq-nav-item active">
<span class="mq-nav-icon">
<svg viewBox="0 0 24 24">
<path d="M3 12l9-8 9 8"></path>
<path d="M5 10v10h14V10"></path>
</svg>
</span>
داشبورد
</div>
<div
class="mq-nav-item"
data-permission="ASSET_VIEW"
>
<span class="mq-nav-icon">
<svg viewBox="0 0 24 24">
<path d="M12 3l7 4-7 4-7-4 7-4z"></path>
<path d="M5 7v9l7 4 7-4V7"></path>
</svg>
</span>
تجهیزات پزشکی
</div>
<div
class="mq-nav-item"
data-permission="MAINTENANCE_VIEW"
>
<span class="mq-nav-icon">
<svg viewBox="0 0 24 24">
<circle cx="12" cy="12" r="3"></circle>
<path d="M12 2v3"></path>
<path d="M12 19v3"></path>
<path d="M2 12h3"></path>
<path d="M19 12h3"></path>
</svg>
</span>
نگهداری و تعمیرات
</div>
<div
class="mq-nav-item"
data-permission="REPORT_VIEW"
>
<span class="mq-nav-icon">
<svg viewBox="0 0 24 24">
<path d="M5 20V10"></path>
<path d="M10 20V5"></path>
<path d="M15 20V13"></path>
<path d="M20 20V8"></path>
</svg>
</span>
گزارشها
</div>
</nav>
<div class="mq-sidebar-bottom">
<div
id="mqLogout"
class="mq-logout"
>
خروج از حساب کاربری
</div>
</div>
</aside>
</div>
<script>
(function () {
"use strict";
/* ============================================================
MEDIQ CONFIG
فعلاً برای تست UI دسترسیها اینجاست.
بعداً این بخش از Backend / Jira / Assets خوانده میشود.
============================================================ */
var CFG = {
user: {
name:
"سیما صیاف",
role:
"مدیر تجهیزات پزشکی"
},
/*
* برای تست:
*
* هر Permission را حذف کنی،
* همان قسمت از Dashboard ناپدید میشود.
*/
permissions: [
"ASSET_VIEW",
"ASSET_CREATE",
"ASSET_PURCHASE",
"ASSET_INVENTORY",
"CONSUMABLE_VIEW",
"MAINTENANCE_VIEW",
"PM_VIEW",
"EM_VIEW",
"CALIBRATION_VIEW",
"CONTRACT_VIEW",
"REQUEST_VIEW",
"REPORT_VIEW"
]
};
/* ============================================================
MODULE DEFINITIONS
============================================================ */
var MODULES = [
/* --------------------------------------------------------
EQUIPMENT
-------------------------------------------------------- */
{
title:
"مدیریت تجهیزات",
subtitle:
"مدیریت چرخه عمر داراییهای پزشکی",
permission:
"ASSET_VIEW",
icon:
'<path d="M12 3l7 4-7 4-7-4 7-4z"></path>' +
'<path d="M5 7v9l7 4 7-4V7"></path>' +
'<path d="M12 11v9"></path>',
actions: [
{
title:
"مدیریت تأمین و لجستیک",
permission:
"ASSET_VIEW"
},
{
title:
"خرید دارایی",
permission:
"ASSET_PURCHASE"
},
{
title:
"ورود دارایی جدید",
permission:
"ASSET_CREATE"
},
{
title:
"اموالگردانی",
permission:
"ASSET_INVENTORY"
},
{
title:
"کالاهای مصرفی",
permission:
"CONSUMABLE_VIEW"
}
]
},
/* --------------------------------------------------------
MAINTENANCE
-------------------------------------------------------- */
{
========= */
.mq-actions {
display: flex;
flex-direction: column;
gap: 5px;
}
.mq-action {
min-height: 42px;
padding:
title:0
12px;
"نگهداری و تعمیرات",border-radius: 9px;
display: flex;
subtitle:
align-items: center;
justify-content: space-between;
color:
"PM، تعمیرات و کالیبراسیون",#49677e;
font-size: 11px;
permission:font-weight: 700;
cursor: pointer;
transition: .15s;
}
.mq-action:hover {
"MAINTENANCE_VIEW",
color:
icon:#079f99;
background:
'<circle cx="12" cy="12" r="3"></circle>' +#effafa;
}
.mq-arrow {
color:
#a2b6c4;
'<path d="M12 2v3"></path>' +font-size: 16px;
}
/* ============================================================
FORM '<path d="M12 19v3"></path>' +
'<path d="M2 12h3"></path>' +
'<path d="M19 12h3"></path>',
actions: [CARDS
============================================================ */
.mq-form-card {
min-height: 415px;
padding:
{25px
17px;
titleborder:
1px solid
"نگهداری پیشگیرانه (PM)",var(--border);
border-radius: 18px;
permission:
"PM_VIEW"
background:
},#fff;
box-shadow:
{
0 12px 32px
rgba(27,72,98,.04);
}
.mq-form-title {
title:min-height: 55px;
display: flex;
align-items: center;
justify-content: center;
"درخواست تعمیر",text-align: center;
color:
var(--navy);
permission:font-size: 13px;
font-weight: 900;
border-bottom:
"EM_VIEW"
1px solid
#edf3f6;
margin-bottom: 16px;
},
.mq-form-actions {
display: flex;
{flex-direction: column;
gap: 6px;
}
.mq-form-action {
min-height: 38px;
titlepadding:
0
6px;
"تعمیرات در حال انجام",display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
permissioncolor:
#49677e;
text-align: center;
"EM_VIEW"font-size: 10px;
font-weight: 700;
cursor: },pointer;
}
.mq-form-action:hover {
color:
{#079f99;
background:
title:
"سوابق تعمیرات",
permission:
#effafa;
}
/* ============================================================
RESPONSIVE
============================================================ */
@media(max-width:1400px) {
.mq-content-grid {
grid-template-columns:
"EM_VIEW"
repeat(2,minmax(0,1fr));
},}
}
@media(max-width:900px) {
.mq-app {
{ grid-template-columns:
1fr;
title:}
.mq-sidebar {
display: none;
"کالیبراسیون",}
.mq-main {
permission:grid-column: 1;
}
.mq-content-grid {
"CALIBRATION_VIEW"grid-template-columns:
}
1fr;
]}
},}
</style>
<div class="mq-app">
/* --------------------------------------------------------
<!-- =====================================================
REQUESTSMAIN
-------------------------------------------------------- */
{
title:===================================================== -->
<main class="mq-main">
<header "درخواستها",class="mq-header">
subtitle:
"مدیریت درخواستهای تجهیزات پزشکی",
<div class="mq-header-title">
permission:
"REQUEST_VIEW",
مدیریت تجهیزات
icon:
'<path d="M6 3h12v18H6z"></path>' +
</div>
</header>
'<path<div dclass="M9 8h6"></path>' +mq-content-grid">
'<path d="M9 12h6"></path>' +
<!-- =================================================
'<path d="M9 16h4"></path>',
EDIT EXISTING ASSET
actions: [
================================================= -->
{
<section class="mq-form-card">
title:
<div class="mq-form-title">
"درخواست جدید",
ثبت ویرایش دارایی موجود
permission:
</div>
"REQUEST_VIEW"
},<div class="mq-form-actions">
{
<div class="mq-form-action">
title:
ثبت داراییهای "درخواستهای من",
خریداری شده
permission:
</div>
"REQUEST_VIEW"
<div class="mq-form-action">
},
{
شناسنامه فنی
title:
</div>
"درخواستهای در انتظار بررسی",
<div class="mq-form-action">
permission:
"REQUEST_VIEW"شناسنامه مالی
}
]</div>
},
/* --------------------------------------------------------
CONTRACTS
<div class="mq-------------------------------------------------------- */
form-action">
{
title:
"قراردادها",
شناسنامه نگهداری و تعمیر
subtitle:
"قراردادهای سرویس و پشتیبانی", </div>
permission:
<div "CONTRACT_VIEW",
class="mq-form-action">
icon:
'<path d="M6 3h9l3 3v15H6z"></path>' +
شناسنامه بازرگانی
'<path d="M14 3v4h4"></path>' +
</div>
'<path d="M9 12h6"></path>' + </div>
'<path d="M9 16h6"></path>',
</section>
actions: [
<!-- =================================================
NEW {ASSET
title:================================================= -->
"قراردادهای فعال",<section class="mq-form-card">
permission:
"CONTRACT_VIEW"<div class="mq-form-title">
},
ثبت ورود دارایی {جدید
title:</div>
<div "ثبت قرارداد",
class="mq-form-actions">
permission:
<div "CONTRACT_VIEW"
class="mq-form-action">
},
ثبت داراییهای خریداری {شده
title:
</div>
"قراردادهای نزدیک به انقضا",
<div class="mq-form-action">
permission:
شناسنامه فنی
"CONTRACT_VIEW"
</div>
}
]
},
/* --------------------------------------------------------
<div class="mq-form-action">
شناسنامه REPORTSمالی
-------------------------------------------------------- */
{</div>
title:
<div "گزارشها و تحلیل",
class="mq-form-action">
subtitle:
"گزارشهایشناسنامه مدیریتینگهداری و عملیاتی",
تعمیر
permission:
"REPORT_VIEW",</div>
icon:
'<path<div dclass="M5 20V11"></path>' +mq-form-action">
'<path d="M10 20V6"></path>' +
شناسنامه بازرگانی
'<path d="M15 20V9"></path>' +
'<path d="M20 20V3"></path>', </div>
actions: [
{</div>
title:
</section>
"گزارش وضعیت تجهیزات",
<!-- =================================================
permission:
MANAGEMENT CARD 2
"REPORT_VIEW"
},
================================================= -->
{<section class="mq-card">
title:<div class="mq-card-header">
"گزارش تعمیرات",
<div class="mq-card-title">
permission:
مدیریت تجهیزات
"REPORT_VIEW"
},</div>
{
title:</div>
<div "گزارش PM",
class="mq-actions">
permission:
<div class="mq-action">
"REPORT_VIEW"
},
<span>
{
title:
مدیریت تأمین و لجستیک
"داشبورد مدیریتی",
</span>
permission:
<span "REPORT_VIEW"
class="mq-arrow">‹</span>
}
]</div>
}
];
/* ============================================================
PERMISSION
============================================================ */
function hasPermission(permission) {
return (
<div class="mq-action">
<span>
CFG.permissions.indexOf(
خرید permission
دارایی
) !== -1
);
}
/* ============================================================
USER
============================================================ */
var userName =
document.getElementById(
</span>
<span class="mq-arrow">‹</span>
</div>
<div class="mq-action">
<span>
ورود دارایی "mqUserName"جدید
);
var userRole =
document.getElementById(
"mqUserRole"
);</span>
var welcomeName =
document.getElementById(
"mqWelcomeName"
);
if (userName) {
userName.textContent =<span class="mq-arrow">‹</span>
CFG.user.name;
}
if (userRole) {
userRole.textContent =
CFG.user.role;
}</div>
if (welcomeName) {
welcomeName.textContent =
CFG.user.name;
}
/* ============================================================
BUILD MODULES
============================================================ */
var modulesContainer =
document.getElementById(
<div class="mq-action">
<span>
ویرایش دارایی
"mqModules"
);
function buildModules() {
if (!modulesContainer) { </span>
return;
}
modulesContainer.innerHTML =
<span class="";
mq-arrow">‹</span>
var visibleModuleCount =
0;</div>
MODULES.forEach(
function (module) {
<div class="mq-action">
if (
!hasPermission(<span>
module.permission
کالاهای مصرفی
)
) {
</span>
return;
}
<span class="mq-arrow">‹</span>
var actionsHtml =
</div>
"";
</div>
module.actions.forEach(
</section>
function (action) {
<!-- =================================================
MANAGEMENT CARD if (1
================================================= -->
!hasPermission(
<section class="mq-card">
action.permission<div class="mq-card-header">
)<div class="mq-card-title">
) {
مدیریت تجهیزات
return;
</div>
}</div>
actionsHtml +=
<div class="mq-actions">
'<div class="mq-action">' +
<span>
'<span>' +
مدیریت اموال
action.title +
</span>
'</span>' +
<span class="mq-arrow">‹</span>
'<span class="mq-action-arrow">' + </div>
<div class="mq-action">
'‹' +
<span>
'</span>' +
مدیریت نگهداری و تعمیر
'</div>';
}</span>
);
var html<span class="mq-arrow">‹</span>
'<article class="mq-module">' + </div>
'<div class="mq-module-headeraction">' +
'<div class="mq-module-icon">' +
<span>
مدیریت مالی و بهرهوری
'<svg viewBox="0 0 24 24">' +
</span>
module.icon +
<span class="mq-arrow">‹</span>
</div>
'</svg>' +
<div class="mq-action">
'</div>' +
<span>
'<div>' +
مدیریت تأمین و لجستیک
'<div class="mq-module-title">' +
</span>
module.title +
<span class="mq-arrow">‹</span>
'</div>' +
</div>
</section>
'<div class="mq-module-subtitle">' +
</div>
</main>
<!-- =====================================================
SIDEBAR
module.subtitle +===================================================== -->
<aside class="mq-sidebar">
'</div>' +<div class="mq-logo">
'</div>' +
<img
'</div>' +
src="/download/attachments/174855060/MediQ%20Heart%20Medical%20Logo.png"
'<div classalt="mq-actions">' +
MediQ"
>
actionsHtml +</div>
<div class="mq-user">
'</div>' +
<div class="mq-user-name">
'</article>';
سیما صیاف
modulesContainer.insertAdjacentHTML(</div>
<div "beforeend",
class="mq-user-role">
مدیریت htmlتجهیزات
);
</div>
</div>
visibleModuleCount++;
<div class="mq-life">
}
);
if (<div class="mq-life-item active">
visibleModuleCount === 0
) {تأمین
modulesContainer.innerHTML = </div>
'<div class="mq-life-emptyitem">' +
'در حال حاضر ماژولی برای حساب کاربری شما فعال نشده است.' +
بهرهبرداری
'</div>';
}
}
buildModules();
/* ============================================================
SIDEBAR PERMISSIONS
============================================================ */
var protectedNavItems =
document.querySelectorAll(
</div>
<div class="mq-life-item">
جایگزینی
</div>
<div "#mediq-dashboard .class="mq-navlife-item[data-permission]">
);
for (
var i = 0;
iنگهداری
< protectedNavItems.length;
i++
) {
var permission = </div>
protectedNavItems[i]</div>
.getAttribute(<div class="mq-sidebar-bottom">
"data-permission"<div
);
if (id="mqLogout"
!hasPermission(
class="mq-logout"
permission
)>
) {
protectedNavItems[i]
خروج از حساب کاربری
.style.display =
</div>
"none";</div>
}</aside>
</div>
}
<script>
/* ============================================================
LOGOUT
============================================================ */
(function () {
"use strict";
var logout =
document.getElementById(
"mqLogout"
);
if (logout) {
logout.addEventListener(
"click",
function () {
window.location.href =
"/logout.action";
}
);
}
})();
</script>
</div> |