Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BookingMyHrManagement
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chanachai
BookingMyHrManagement
Commits
5e6ea45f
Commit
5e6ea45f
authored
May 12, 2025
by
DESKTOP-E0VCCBD\zedan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
3f575b1c
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
2389 additions
and
966 deletions
+2389
-966
home-common.component.html
...src/app/DPU/common/home-common/home-common.component.html
+267
-379
home-common.component.ts
...e/src/app/DPU/common/home-common/home-common.component.ts
+625
-424
company-management.module.ts
...c/app/DPU/company-management/company-management.module.ts
+6
-0
emp-borrow-repair.component.html
...gement/emp-borrow-repair/emp-borrow-repair.component.html
+7
-77
emp-borrow-repair.component.ts
...nagement/emp-borrow-repair/emp-borrow-repair.component.ts
+318
-4
emp-borrow-return-status.component.html
...row-return-status/emp-borrow-return-status.component.html
+100
-4
emp-borrow-return-status.component.ts
...orrow-return-status/emp-borrow-return-status.component.ts
+30
-57
emp-borrow-status.component.html
...gement/emp-borrow-status/emp-borrow-status.component.html
+1
-1
emp-borrow-status.component.ts
...nagement/emp-borrow-status/emp-borrow-status.component.ts
+1
-1
home-installer.component.html
...y-management/home-installer/home-installer.component.html
+280
-0
home-installer.component.ts
...any-management/home-installer/home-installer.component.ts
+739
-13
header.component.html
...ge/src/app/shared/components/header/header.component.html
+4
-4
nav.service.ts
Web-Manage/src/app/shared/services/nav.service.ts
+11
-2
No files found.
Web-Manage/src/app/DPU/common/home-common/home-common.component.html
View file @
5e6ea45f
<app-page-header
[
title
]="'
Analytics
'"
[
activeTitle
]="'
Dashboards
'"
[
title1
]="'
Analytics
'"
></app-page-header>
<app-page-header
[
title
]="'
Dashboards
'"
[
activeTitle
]="'
Dashboards
'"
[
title1
]="'
Dashboards
'"
></app-page-header>
<div
class=
"grid grid-cols-12 gap-x-6"
>
<div
class=
"xl:col-span-7 col-span-12"
>
<div
class=
"grid grid-cols-12 gap-x-6"
>
<div
class=
"xl:col-span-4 lg:col-span-4 md:col-span-4 sm:col-span-6 col-span-12"
>
<div
class=
"box"
>
<div
class=
"box-body"
>
<div
class=
"flex flex-wrap items-center justify-between"
>
<div>
<h6
class=
"font-semibold mb-3 text-[1rem]"
>
Total Users
</h6>
<span
class=
"text-[1.5625rem] font-semibold"
>
9,789
</span>
<span
class=
"block text-success text-[0.75rem]"
>
+0.892
<i
class=
"ti ti-trending-up ms-1"
></i></span>
</div>
<div
id=
"analytics-users"
>
<apx-chart
[
series
]="
chartOptions1
.
series
"
[
chart
]="
chartOptions1
.
chart
"
[
xaxis
]="
chartOptions1
.
xaxis
"
[
dataLabels
]="
chartOptions1
.
dataLabels
"
[
colors
]="
chartOptions1
.
colors
"
[
fill
]="
chartOptions1
.
fill
"
[
markers
]="
chartOptions1
.
markers
"
[
stroke
]="
chartOptions1
.
stroke
"
></apx-chart>
</div>
</div>
<div
class=
"xxxl:col-span-6 col-span-12"
>
<div
class=
"grid grid-cols-12 gap-x-6"
>
<div
class=
"xxl:col-span-4 md:col-span-6 col-span-12"
>
<div
class=
"box"
>
<div
class=
"box-body !pb-[0.9rem]"
>
<div
class=
"flex items-start"
>
<div
class=
"me-4 gap-0"
>
<span
class=
"avatar avatar-md p-2 bg-primary"
>
<svg
class=
"svg-white"
xmlns=
"http://www.w3.org/2000/svg"
height=
"24px"
viewBox=
"0 0 24 24"
width=
"24px"
fill=
"#000000"
>
<path
d=
"M0 0h24v24H0V0z"
fill=
"none"
/>
<path
d=
"M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"
/>
</svg>
</span>
</div>
<div
class=
"flex-grow"
>
<div
class=
"flex mb-1 items-start justify-between"
>
<h5
class=
"font-semibold mb-0 leading-none text-[1.25rem]"
>
256
</h5>
<div
class=
"text-danger font-semibold"
>
<i
class=
"ri-arrow-down-s-fill me-1 align-middle"
></i>
-1.05%
</div>
</div>
<p
class=
"mb-0 text-[0.625rem] opacity-[0.7] text-[#8c9097] dark:text-white/50 font-semibold"
>
จำนวนพนักงานทั้งหมด
</p>
</div>
</div>
</div>
</div>
<div
class=
"xl:col-span-4 lg:col-span-4 md:col-span-4 sm:col-span-6 col-span-12"
>
<div
class=
"box"
>
<div
class=
"box-body"
>
<div
class=
"flex items-center justify-between"
>
<div>
<h6
class=
"font-semibold mb-3 text-[1rem]"
>
Live Visitors
</h6>
<span
class=
"text-[1.5625rem] font-semibold"
>
12,240
</span>
<span
class=
"block text-danger text-[0.75rem]"
>
+0.59
<i
class=
"ti ti-trending-down ms-1 inline-flex"
></i></span>
</div>
<div>
<span
class=
"avatar avatar-md bg-secondary text-white"
>
<i
class=
"ri-user-3-line"
></i>
</span>
</div>
</div>
</div>
<div
class=
"xxl:col-span-4 md:col-span-6 col-span-12"
>
<div
class=
"box"
>
<div
class=
"box-body !pb-[0.9rem]"
>
<div
class=
"flex items-start"
>
<div
class=
"me-4"
>
<span
class=
"avatar avatar-md p-2 bg-secondary"
>
<svg
class=
"svg-white"
xmlns=
"http://www.w3.org/2000/svg"
enable-background=
"new 0 0 24 24"
height=
"24px"
viewBox=
"0 0 24 24"
width=
"24px"
fill=
"#000000"
>
<rect
fill=
"none"
height=
"24"
width=
"24"
/>
<g>
<path
d=
"M4,13c1.1,0,2-0.9,2-2c0-1.1-0.9-2-2-2s-2,0.9-2,2C2,12.1,2.9,13,4,13z M5.13,14.1C4.76,14.04,4.39,14,4,14 c-0.99,0-1.93,0.21-2.78,0.58C0.48,14.9,0,15.62,0,16.43V18l4.5,0v-1.61C4.5,15.56,4.73,14.78,5.13,14.1z M20,13c1.1,0,2-0.9,2-2 c0-1.1-0.9-2-2-2s-2,0.9-2,2C18,12.1,18.9,13,20,13z M24,16.43c0-0.81-0.48-1.53-1.22-1.85C21.93,14.21,20.99,14,20,14 c-0.39,0-0.76,0.04-1.13,0.1c0.4,0.68,0.63,1.46,0.63,2.29V18l4.5,0V16.43z M16.24,13.65c-1.17-0.52-2.61-0.9-4.24-0.9 c-1.63,0-3.07,0.39-4.24,0.9C6.68,14.13,6,15.21,6,16.39V18h12v-1.61C18,15.21,17.32,14.13,16.24,13.65z M8.07,16 c0.09-0.23,0.13-0.39,0.91-0.69c0.97-0.38,1.99-0.56,3.02-0.56s2.05,0.18,3.02,0.56c0.77,0.3,0.81,0.46,0.91,0.69H8.07z M12,8 c0.55,0,1,0.45,1,1s-0.45,1-1,1s-1-0.45-1-1S11.45,8,12,8 M12,6c-1.66,0-3,1.34-3,3c0,1.66,1.34,3,3,3s3-1.34,3-3 C15,7.34,13.66,6,12,6L12,6z"
/>
</g>
</svg>
</span>
</div>
<div
class=
"flex-grow"
>
<div
class=
"flex mb-1 items-start justify-between"
>
<h5
class=
"font-semibold mb-0 leading-none text-[1.25rem]"
>
4,026
</h5>
<div
class=
"text-success font-semibold"
>
<i
class=
"ri-arrow-up-s-fill me-1 align-middle"
></i>
+0.40%
</div>
</div>
<p
class=
"mb-0 text-[0.625rem] opacity-[0.7] text-[#8c9097] dark:text-white/50 font-semibold"
>
จำนวนโปรเจคทั้งหมด
</p>
</div>
</div>
</div>
</div>
<div
class=
"xl:col-span-4 lg:col-span-4 md:col-span-4 sm:col-span-6 col-span-12"
>
<div
class=
"box overflow-hidden"
>
<div
class=
"box-body mb-3"
>
<div
class=
"flex items-center justify-between"
>
<div>
<h6
class=
"font-semibold text-primary mb-4 text-[1rem]"
>
Bounce Rate
</h6>
<span
class=
"text-[1.5625rem] flex items-center"
>
77.3%
<span
class=
" text-[0.75rem] text-warning opacity-[0.7] ms-2"
>
+0.59
<i
class=
"ti ti-arrow-big-up-line ms-1 inline-flex"
></i></span></span>
</div>
</div>
</div>
<div
id=
"analytics-bouncerate"
class=
"mt-1 w-full"
>
<apx-chart
[
series
]="
chartOptions2
.
series
"
[
chart
]="
chartOptions2
.
chart
"
[
xaxis
]="
chartOptions2
.
xaxis
"
[
dataLabels
]="
chartOptions2
.
dataLabels
"
[
colors
]="
chartOptions2
.
colors
"
[
fill
]="
chartOptions2
.
fill
"
[
markers
]="
chartOptions2
.
markers
"
[
stroke
]="
chartOptions2
.
stroke
"
></apx-chart>
</div>
<div
class=
"xxl:col-span-4 md:col-span-6 col-span-12"
>
<div
class=
"box"
>
<div
class=
"box-body !pb-[0.9rem]"
>
<div
class=
"flex items-start"
>
<div
class=
"me-3"
>
<span
class=
"avatar avatar-md p-2 bg-warning"
>
<svg
class=
"svg-white"
xmlns=
"http://www.w3.org/2000/svg"
height=
"24px"
viewBox=
"0 0 24 24"
width=
"24px"
fill=
"#000000"
>
<path
d=
"M0 0h24v24H0V0z"
fill=
"none"
/>
<path
d=
"M9.5,7h7C16.776123,7,17,6.776123,17,6.5S16.776123,6,16.5,6h-7C9.223877,6,9,6.223877,9,6.5S9.223877,7,9.5,7z M7.5,11h9c0.276123,0,0.5-0.223877,0.5-0.5S16.776123,10,16.5,10h-9C7.223877,10,7,10.223877,7,10.5S7.223877,11,7.5,11z M20.5,2H3.4993896C3.2234497,2.0001831,2.9998169,2.223999,3,2.5v19c-0.000061,0.1124268,0.0378418,0.2216187,0.1074829,0.3098755c0.1710205,0.2167358,0.4853516,0.2537231,0.7020874,0.0827026l2.8652344-2.2617188l2.3583984,1.7695312c0.1777954,0.1328125,0.421814,0.1328125,0.5996094,0L12,19.625l2.3671875,1.7753906c0.1777954,0.1328125,0.421814,0.1328125,0.5996094,0l2.3583984-1.7695312l2.8652344,2.2617188C20.2785034,21.9623413,20.3876343,22.0002441,20.5,22h0.0006104C20.7766113,21.9998169,21.0001831,21.7759399,21,21.5V2.4993896C20.9998169,2.2234497,20.776001,1.9998169,20.5,2z M20,20.46875l-2.3574219-1.8613281c-0.0882568-0.069519-0.1972656-0.1072998-0.3095703-0.1074219c-0.1080933-0.000061-0.2132568,0.0349121-0.2998047,0.0996094L14.6669922,20.375l-2.3671875-1.7753906c-0.1777954-0.1328125-0.421814-0.1328125-0.5996094,0L9.3330078,20.375l-2.3662109-1.7753906c-0.1817017-0.1348877-0.4311523-0.1317139-0.609375,0.0078125L4,20.46875V3h16V20.46875z M7.5,15h9c0.276123,0,0.5-0.223877,0.5-0.5S16.776123,14,16.5,14h-9C7.223877,14,7,14.223877,7,14.5S7.223877,15,7.5,15z"
/>
</svg>
</span>
</div>
<div
class=
"flex-grow"
>
<div
class=
"flex mb-1 items-start justify-between"
>
<h5
class=
"font-semibold mb-0 leading-none text-[1.25rem]"
>
48
</h5>
<div
class=
"text-success font-semibold"
>
<i
class=
"ri-arrow-up-s-fill me-1 align-middle"
></i>
+0.82%
</div>
</div>
<p
class=
"mb-0 text-[0.625rem] opacity-[0.7] text-[#8c9097] dark:text-white/50 font-semibold"
>
จำนวนรายการอุปการ์ทั้งหมด
</p>
</div>
</div>
</div>
</div>
<div
class=
"xl:col-span-12 col-span-12"
>
<div
class=
"box"
>
<div
class=
"box-header justify-between"
>
<div
class=
"box-title"
>
Audience Report
</div>
<div>
<button
type=
"button"
class=
"ti-btn ti-btn-primary ti-btn-wave !font-medium"
><i
class=
"ri-share-forward-line me-1 align-middle inline-block"
></i>
Export
</button>
</div>
</div>
<div
class=
"box-body"
>
<div
id=
"audienceReport"
>
<apx-chart
[
series
]="
chartOptions
.
series
"
[
chart
]="
chartOptions
.
chart
"
[
yaxis
]="
chartOptions
.
yaxis
"
[
xaxis
]="
chartOptions
.
xaxis
"
[
labels
]="
chartOptions
.
labels
"
[
stroke
]="
chartOptions
.
stroke
"
[
plotOptions
]="
chartOptions
.
plotOptions
"
[
markers
]="
chartOptions
.
markers
"
[
fill
]="
chartOptions
.
fill
"
[
tooltip
]="
chartOptions
.
tooltip
"
[
legend
]="
chartOptions
.
legend
"
[
colors
]="
chartOptions
.
colors
"
></apx-chart>
</div>
</div>
</div>
<div
class=
"col-span-12"
>
<div
class=
"box overflow-hidden"
>
<div
class=
"box-header justify-between items-center flex-wrap gap-4"
>
<div
class=
"box-title"
>
จำนวนการยืมอุปกรณ์
</div>
<div
class=
"flex gap-4 flex-wrap"
>
<!-- Select: เดือน -->
<select>
<option
value=
""
>
ALL
</option>
<option
value=
""
>
มกราคม
</option>
<option
value=
""
>
กุมภาพันธ์
</option>
<option
value=
""
>
มีนาคม
</option>
<option
value=
""
>
เมษายน
</option>
</select>
<!-- Select: โปรเจค -->
<select>
<option
value=
""
>
โปรเจคทั้งหมด
</option>
<option
value=
""
>
DPU001
</option>
<option
value=
""
>
DPU002
</option>
<option
value=
""
>
DPU003
</option>
<option
value=
""
>
DPU004
</option>
</select>
<div
class=
"inline-flex rounded-md shadow-sm"
role=
"group"
aria-label=
"Basic example"
>
<button
type=
"button"
class=
"ti-btn-group !border-0 !text-xs !py-2 !px-3 ti-btn-primary"
>
1M
</button>
<button
type=
"button"
class=
"ti-btn-group !border-0 !text-xs !py-2 !px-3 ti-btn-primary"
>
3M
</button>
<button
type=
"button"
class=
"ti-btn-group !border-0 !text-xs !py-2 !px-3 ti-btn-primary"
>
6M
</button>
<button
type=
"button"
class=
"ti-btn-group !border-0 !text-xs !py-2 !px-3 ti-btn-primary-full !rounded-s-none !text-white"
>
1Y
</button>
</div>
</div>
</div>
<div
class=
"xxl:col-span-6 xl:col-span-12 col-span-12"
>
</div>
<div
class=
"xl:col-span-12 col-span-12"
>
<div
class=
"box"
>
<div
class=
"box-header justify-between"
>
<div
class=
"box-title"
>
Top Countries Sessions vs Bounce Rate
</div>
<div
class=
"hs-dropdown ti-dropdown"
>
<a
href=
"javascript:void(0);"
class=
"px-2 font-normal text-[0.75rem] text-[#8c9097] dark:text-white/50"
aria-expanded=
"false"
>
View All
<i
class=
"ri-arrow-down-s-line align-middle ms-1 inline-block"
></i>
</a>
<ul
class=
"hs-dropdown-menu ti-dropdown-menu hidden"
role=
"menu"
>
<li><a
class=
"ti-dropdown-item !py-2 !px-[0.9375rem] !text-[0.8125rem] !font-medium block"
href=
"javascript:void(0);"
>
Today
</a></li>
<li><a
class=
"ti-dropdown-item !py-2 !px-[0.9375rem] !text-[0.8125rem] !font-medium block"
href=
"javascript:void(0);"
>
This Week
</a></li>
<li><a
class=
"ti-dropdown-item !py-2 !px-[0.9375rem] !text-[0.8125rem] !font-medium block"
href=
"javascript:void(0);"
>
Last Week
</a></li>
</ul>
</div>
</div>
<div
class=
"box-body"
>
<div
id=
"country-sessions"
>
<apx-chart
[
series
]="
chartOptions3
.
series
"
[
chart
]="
chartOptions3
.
chart
"
[
yaxis
]="
chartOptions3
.
yaxis
"
[
xaxis
]="
chartOptions3
.
xaxis
"
[
labels
]="
chartOptions3
.
labels
"
[
stroke
]="
chartOptions3
.
stroke
"
[
plotOptions
]="
chartOptions3
.
plotOptions
"
[
markers
]="
chartOptions3
.
markers
"
[
fill
]="
chartOptions3
.
fill
"
[
tooltip
]="
chartOptions3
.
tooltip
"
[
legend
]="
chartOptions3
.
legend
"
[
colors
]="
chartOptions3
.
colors
"
></apx-chart>
</div>
</div>
</div>
</div>
<div
class=
"xxl:col-span-6 xl:col-span-12 col-span-12"
>
<div
class=
"box overflow-hidden"
>
<div
class=
"box-header justify-between"
>
<div
class=
"box-title"
>
Traffic Sources
</div>
<div
class=
"hs-dropdown ti-dropdown"
>
<a
href=
"javascript:void(0);"
class=
"px-2 font-normal text-[0.75rem] text-[#8c9097] dark:text-white/50"
aria-expanded=
"false"
>
View All
<i
class=
"ri-arrow-down-s-line align-middle ms-1 inline-block"
></i>
</a>
<ul
class=
"hs-dropdown-menu ti-dropdown-menu hidden"
role=
"menu"
>
<li><a
class=
"ti-dropdown-item !py-2 !px-[0.9375rem] !text-[0.8125rem] !font-medium block"
href=
"javascript:void(0);"
>
Today
</a></li>
<li><a
class=
"ti-dropdown-item !py-2 !px-[0.9375rem] !text-[0.8125rem] !font-medium block"
href=
"javascript:void(0);"
>
This Week
</a></li>
<li><a
class=
"ti-dropdown-item !py-2 !px-[0.9375rem] !text-[0.8125rem] !font-medium block"
href=
"javascript:void(0);"
>
Last Week
</a></li>
</ul>
</div>
</div>
<div
class=
"box-body !p-0"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-hover whitespace-nowrap min-w-full"
>
<thead>
<tr>
<th
scope=
"col"
class=
"text-start"
>
Browser
</th>
<th
scope=
"col"
class=
"text-start"
>
Sessions
</th>
<th
scope=
"col"
class=
"text-start"
>
Traffic
</th>
</tr>
</thead>
<tbody>
<tr
class=
"border-t border-inherit border-solid hover:bg-gray-100 dark:hover:bg-light dark:border-defaultborder/10"
>
<td>
<div
class=
"flex items-center"
>
<span
class=
"avatar avatar-rounded avatar-sm p-2 bg-light me-2"
>
<i
class=
"ri-google-fill text-[1.125rem] text-primary"
></i>
</span>
<div
class=
"font-semibold"
>
Google
</div>
</div>
</td>
<td>
<span><i
class=
"ri-arrow-up-s-fill me-1 text-success align-middle text-[1.125rem]"
></i>
23,379
</span>
</td>
<td>
<div
class=
"progress progress-xs"
>
<div
class=
"progress-bar bg-primary w-[78%]"
aria-valuenow=
"78"
aria-valuemin=
"0"
aria-valuemax=
"100"
>
</div>
</div>
</td>
</tr>
<tr
class=
"border-t border-inherit border-solid hover:bg-gray-100 dark:hover:bg-light dark:border-defaultborder/10"
>
<td>
<div
class=
"flex items-center"
>
<span
class=
"avatar avatar-rounded avatar-sm p-2 bg-light me-2"
>
<i
class=
"ri-safari-line text-[1.125rem] text-secondary"
></i>
</span>
<div
class=
"font-semibold"
>
Safari
</div>
</div>
</td>
<td>
<span><i
class=
"ri-arrow-up-s-fill me-1 text-success align-middle text-[1.125rem]"
></i>
78,973
</span>
</td>
<td>
<div
class=
"progress progress-xs"
>
<div
class=
"progress-bar bg-primary w-[32%]"
aria-valuenow=
"32"
aria-valuemin=
"0"
aria-valuemax=
"100"
>
</div>
</div>
</td>
</tr>
<tr
class=
"border-t border-inherit border-solid hover:bg-gray-100 dark:hover:bg-light dark:border-defaultborder/10"
>
<td>
<div
class=
"flex items-center"
>
<span
class=
"avatar avatar-rounded avatar-sm p-2 bg-light me-2"
>
<i
class=
"ri-opera-fill text-[1.125rem] text-success"
></i>
</span>
<div
class=
"font-semibold"
>
Opera
</div>
</div>
</td>
<td>
<span><i
class=
"ri-arrow-down-s-fill me-1 text-danger align-middle text-[1.125rem]"
></i>
12,457
</span>
</td>
<td>
<div
class=
"progress progress-xs"
>
<div
class=
"progress-bar bg-primary w-[21%]"
aria-valuenow=
"21"
aria-valuemin=
"0"
aria-valuemax=
"100"
>
</div>
</div>
</td>
</tr>
<tr
class=
"border-t border-inherit border-solid hover:bg-gray-100 dark:hover:bg-light dark:border-defaultborder/10"
>
<td>
<div
class=
"flex items-center"
>
<span
class=
"avatar avatar-rounded avatar-sm p-2 bg-light me-2"
>
<i
class=
"ri-edge-fill text-[1.125rem] text-info"
></i>
</span>
<div
class=
"font-semibold"
>
Edge
</div>
</div>
</td>
<td>
<span><i
class=
"ri-arrow-up-s-fill me-1 text-success align-middle text-[1.125rem]"
></i>
8,570
</span>
</td>
<td>
<div
class=
"progress progress-xs"
>
<div
class=
"progress-bar bg-primary w-1/4"
aria-valuenow=
"25"
aria-valuemin=
"0"
aria-valuemax=
"100"
>
</div>
</div>
</td>
</tr>
<tr
class=
"border-t border-inherit border-solid hover:bg-gray-100 dark:hover:bg-light dark:border-defaultborder/10"
>
<td>
<div
class=
"flex items-center"
>
<span
class=
"avatar avatar-rounded avatar-sm p-2 bg-light me-2"
>
<i
class=
"ri-firefox-fill text-[1.125rem] text-warning"
></i>
</span>
<div
class=
"font-semibold"
>
Firefox
</div>
</div>
</td>
<td>
<span><i
class=
"ri-arrow-down-s-fill me-1 text-danger align-middle text-[1.125rem]"
></i>
6,135
</span>
</td>
<td>
<div
class=
"progress progress-xs"
>
<div
class=
"progress-bar bg-primary w-[35%]"
aria-valuenow=
"35"
aria-valuemin=
"0"
aria-valuemax=
"100"
>
</div>
</div>
</td>
</tr>
<tr
class=
"border-t border-inherit border-solid hover:bg-gray-100 dark:hover:bg-light dark:border-defaultborder/10"
>
<td
class=
"border-bottom-0"
>
<div
class=
"flex items-center"
>
<span
class=
"avatar avatar-rounded avatar-sm p-2 bg-light me-2"
>
<i
class=
"ri-ubuntu-fill text-[1.125rem] text-danger"
></i>
</span>
<div
class=
"font-semibold"
>
Ubuntu
</div>
</div>
</td>
<td
class=
"border-bottom-0"
>
<span><i
class=
"ri-arrow-up-s-fill me-1 text-success align-middle text-[1.125rem]"
></i>
4,789
</span>
</td>
<td
class=
"border-bottom-0"
>
<div
class=
"progress progress-xs"
>
<div
class=
"progress-bar bg-primary w-[12%]"
aria-valuenow=
"12"
aria-valuemin=
"0"
aria-valuemax=
"100"
>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div
class=
"box-body"
>
<div
id=
"audienceReport"
>
<apx-chart
[
series
]="
chartOptions
.
series
"
[
chart
]="
chartOptions
.
chart
"
[
yaxis
]="
chartOptions
.
yaxis
"
[
xaxis
]="
chartOptions
.
xaxis
"
[
labels
]="
chartOptions
.
labels
"
[
stroke
]="
chartOptions
.
stroke
"
[
plotOptions
]="
chartOptions
.
plotOptions
"
[
markers
]="
chartOptions
.
markers
"
[
fill
]="
chartOptions
.
fill
"
[
tooltip
]="
chartOptions
.
tooltip
"
[
legend
]="
chartOptions
.
legend
"
[
colors
]="
chartOptions
.
colors
"
></apx-chart>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"xl:col-span-5 col-span-12"
>
<div
class=
"grid grid-cols-12 gap-x-6"
>
<div
class=
"xxl:col-span-5 cxl:ol-span-12 col-span-12"
>
<div
class=
"box custom-card upgrade-card text-white"
>
<div
class=
"box-body text-white"
>
<span
class=
"avatar avatar-xxl !border-0"
>
<img
src=
"./assets/images/media/media-84.png"
alt=
""
>
</span>
<div
class=
"upgrade-card-content"
>
<span
class=
"opacity-[0.7] font-normal mb-1 !text-white"
>
Plan is expiring !
</span>
<span
class=
"text-[0.9375rem] font-semibold block mb-[3rem] upgrade-text !text-white"
>
Upgrade to premium
</span>
<button
type=
"button"
class=
"ti-btn !py-1 !px-2 bg-light text-defaulttextcolor !text-[0.75rem] font-medium ti-btn-wave"
>
Upgrade Now
</button>
</div>
</div>
</div>
<div
class=
"box"
>
<div
class=
"box-body !p-1"
>
<div
class=
"flex items-center flex-wrap"
>
<div
id=
"analytics-followers"
>
<apx-chart
[
series
]="
optionsCircle2
.
series
"
[
chart
]="
optionsCircle2
.
chart
"
[
xaxis
]="
optionsCircle2
.
xaxis
"
[
colors
]="
optionsCircle2
.
colors
"
[
labels
]="
optionsCircle2
.
labels
"
[
legend
]="
optionsCircle2
.
legend
"
[
stroke
]="
optionsCircle2
.
stroke
"
[
tooltip
]="
optionsCircle2
.
tooltip
"
[
plotOptions
]="
optionsCircle2
.
plotOptions
"
[
dataLabels
]="
optionsCircle2
.
dataLabels
"
></apx-chart>
</div>
<div
class=
"ms-1"
>
<p
class=
"mb-1 text-[#8c9097] dark:text-white/50"
>
Impressions
</p>
<h5
class=
"font-semibold mb-0 text-[1.25rem]"
>
9,903
</h5>
</div>
</div>
</div>
</div>
<div
class=
"box"
>
<div
class=
"box-body !p-1"
>
<div
class=
"flex items-center flex-wrap"
>
<div
id=
"analytics-views"
>
<apx-chart
[
series
]="
optionsCircle3
.
series
"
[
chart
]="
optionsCircle3
.
chart
"
[
xaxis
]="
optionsCircle3
.
xaxis
"
[
colors
]="
optionsCircle3
.
colors
"
[
labels
]="
optionsCircle3
.
labels
"
[
legend
]="
optionsCircle3
.
legend
"
[
stroke
]="
optionsCircle3
.
stroke
"
[
tooltip
]="
optionsCircle3
.
tooltip
"
[
plotOptions
]="
optionsCircle3
.
plotOptions
"
[
dataLabels
]="
optionsCircle3
.
dataLabels
"
></apx-chart>
</div>
<div
class=
"ms-1"
>
<p
class=
"mb-1 text-[#8c9097] dark:text-white/50"
>
Clicks
</p>
<h5
class=
"font-semibold mb-0 text-[1.25rem]"
>
16,789
</h5>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"grid grid-cols-12 gap-x-6"
>
<!-- Candidates (Left Half) -->
<div
class=
"xxl:col-span-6 col-span-12"
>
<div
class=
"box overflow-hidden"
>
<div
class=
"box-header justify-between"
>
<div
class=
"box-title"
>
อุปกรณ์ที่ยืม
</div>
<div>
<div
class=
"flex gap-4 flex-wrap"
>
<select>
<option
value=
""
>
ALL
</option>
<option
value=
""
>
จอบ
</option>
<option
value=
""
>
เสียม
</option>
<option
value=
""
>
ตะปู
</option>
<option
value=
""
>
เครื่องขุด
</option>
</select>
</div>
</div>
</div>
<div
class=
"box-body !p-0"
>
<div
class=
"p-3"
>
<apx-chart
[
series
]="
optionsCircle1
.
series
"
[
chart
]="
optionsCircle1
.
chart
"
[
xaxis
]="
optionsCircle1
.
xaxis
"
[
colors
]="
optionsCircle1
.
colors
"
[
labels
]="
optionsCircle1
.
labels
"
[
legend
]="
optionsCircle1
.
legend
"
[
stroke
]="
optionsCircle1
.
stroke
"
[
tooltip
]="
optionsCircle1
.
tooltip
"
[
plotOptions
]="
optionsCircle1
.
plotOptions
"
[
dataLabels
]="
optionsCircle1
.
dataLabels
"
></apx-chart>
</div>
<div
class=
"grid grid-cols-2 border-t border-dashed dark:border-defaultborder/10"
>
<div
class=
"col p-4 border-e border-dashed dark:border-defaultborder/10 text-center"
>
<div
class=
"text-[#8c9097] dark:text-white/50 text-[0.75rem] mb-1"
>
การยืมทั้งหมด
</div>
<div
class=
"xxl:col-span-7 xl:col-span-12 col-span-12"
>
<div
class=
"box"
>
<div
class=
"box-header justify-between"
>
<div
class=
"box-title"
>
Sessions By Device
</div>
<div>
<button
type=
"button"
class=
"ti-btn ti-btn-primary 1 !text-[0.85rem] !m-0 !font-medium"
>
View All
</button>
</div>
</div>
<div
class=
"box-body !my-2 !py-6 !px-2"
>
<div
id=
"sessions"
>
<apx-chart
[
series
]="
optionsCircle1
.
series
"
[
chart
]="
optionsCircle1
.
chart
"
[
xaxis
]="
optionsCircle1
.
xaxis
"
[
labels
]="
optionsCircle1
.
labels
"
[
legend
]="
optionsCircle1
.
legend
"
[
stroke
]="
optionsCircle1
.
stroke
"
[
tooltip
]="
optionsCircle1
.
tooltip
"
[
plotOptions
]="
optionsCircle1
.
plotOptions
"
[
dataLabels
]="
optionsCircle1
.
dataLabels
"[
colors
]="
optionsCircle1
.
colors
"
></apx-chart>
</div>
</div>
<div
class=
"box-footer !p-0"
>
<div
class=
"grid grid-cols-12 justify-center"
>
<div
class=
"col-span-3 pe-0 text-center"
>
<div
class=
"sm:p-4 p-2 "
>
<span
class=
"text-[#8c9097] dark:text-white/50 text-[0.6875rem]"
>
Mobile
</span>
<span
class=
"block text-[1rem] font-semibold"
>
68.3%
</span>
</div>
</div>
<div
class=
"col-span-3 px-0 text-center"
>
<div
class=
"sm:p-4 p-2"
>
<span
class=
"text-[#8c9097] dark:text-white/50 text-[0.6875rem]"
>
Tablet
</span>
<span
class=
"block text-[1rem] font-semibold"
>
17.68%
</span>
</div>
</div>
<div
class=
"col-span-3 px-0 text-center"
>
<div
class=
"sm:p-4 p-2 "
>
<span
class=
"text-[#8c9097] dark:text-white/50 text-[0.6875rem]"
>
Desktop
</span>
<span
class=
"block text-[1rem] font-semibold"
>
10.5%
</span>
</div>
</div>
<div
class=
"col-span-3 px-0 text-center"
>
<div
class=
"sm:p-4 p-2"
>
<span
class=
"text-[#8c9097] dark:text-white/50 text-[0.6875rem]"
>
Others
</span>
<span
class=
"block text-[1rem] font-semibold"
>
5.16%
</span>
</div>
</div>
</div>
</div>
</div>
<div
class=
"flex justify-center items-center"
>
<span
class=
"me-3 text-[1.625rem] font-semibold"
>
1,234
</span>
<span
class=
"text-success font-semibold"
><i
class=
"ri-arrow-up-s-fill me-1"
></i>
0.23%
</span
>
</div>
<div
class=
"xl:col-span-12 col-span-12"
>
<div
class=
"box"
>
<div
class=
"box-header justify-between"
>
<div
class=
"box-title"
>
Sessions Duration By New Users
</div>
<div
class=
"hs-dropdown ti-dropdown"
>
<a
href=
"javascript:void(0);"
class=
"px-2 font-normal text-[0.75rem] text-[#8c9097] dark:text-white/50"
aria-expanded=
"false"
>
View All
<i
class=
"ri-arrow-down-s-line align-middle ms-1 inline-block"
></i>
</a>
<ul
class=
"hs-dropdown-menu ti-dropdown-menu hidden"
role=
"menu"
>
<li><a
class=
"ti-dropdown-item !py-2 !px-[0.9375rem] !text-[0.8125rem] !font-medium block"
href=
"javascript:void(0);"
>
Today
</a></li>
<li><a
class=
"ti-dropdown-item !py-2 !px-[0.9375rem] !text-[0.8125rem] !font-medium block"
href=
"javascript:void(0);"
>
This Week
</a></li>
<li><a
class=
"ti-dropdown-item !py-2 !px-[0.9375rem] !text-[0.8125rem] !font-medium block"
href=
"javascript:void(0);"
>
Last Week
</a></li>
</ul>
</div>
</div>
<div
class=
"box-body"
>
<div
id=
"session-users"
>
<apx-chart
[
series
]="
chartOptions4
.
series
"
[
chart
]="
chartOptions4
.
chart
"
[
yaxis
]="
chartOptions4
.
yaxis
"
[
xaxis
]="
chartOptions4
.
xaxis
"
[
labels
]="
chartOptions4
.
labels
"
[
stroke
]="
chartOptions4
.
stroke
"
[
plotOptions
]="
chartOptions4
.
plotOptions
"
[
markers
]="
chartOptions4
.
markers
"
[
fill
]="
chartOptions4
.
fill
"
[
tooltip
]="
chartOptions4
.
tooltip
"
[
colors
]="
chartOptions4
.
colors
"
[
legend
]="
chartOptions4
.
legend
"
></apx-chart>
</div>
</div>
</div>
</div>
<div
class=
"col p-4 text-center"
>
<div
class=
"text-[#8c9097] dark:text-white/50 text-[0.75rem] mb-1"
>
การคืนทั้งหมด
</div>
<div
class=
"flex justify-center items-center"
>
<span
class=
"me-3 text-[1.625rem] font-semibold"
>
1,754
</span>
<span
class=
"text-danger font-semibold"
><i
class=
"ri-arrow-down-s-fill me-1"
></i>
0.11%
</span
>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Line Chart (Right Half) -->
<div
class=
"xxl:col-span-6 col-span-12"
>
<div
class=
"box custom-box"
>
<div
class=
"box-header"
>
<div
class=
"box-title"
>
แนวโน้มการยืม-คืนอุปกรณ์รายเดือน
</div>
</div>
<div
class=
"box-body"
>
<div
id=
"line-chart-datalabels"
class=
"chart-container"
>
<apx-chart
[
series
]="
chartOptions9
.
series
"
[
chart
]="
chartOptions9
.
chart
"
[
xaxis
]="
chartOptions9
.
xaxis
"
[
stroke
]="
chartOptions9
.
stroke
"
[
colors
]="
chartOptions9
.
colors
"
[
dataLabels
]="
chartOptions9
.
dataLabels
"
[
legend
]="
chartOptions9
.
legend
"
[
markers
]="
chartOptions9
.
markers
"
[
grid
]="
chartOptions9
.
grid
"
[
yaxis
]="
chartOptions9
.
yaxis
"
[
title
]="
chartOptions9
.
title
"
></apx-chart>
</div>
</div>
</div>
</div>
</div>
Web-Manage/src/app/DPU/common/home-common/home-common.component.ts
View file @
5e6ea45f
...
...
@@ -3,360 +3,449 @@ import { RouterModule } from '@angular/router';
import
ApexCharts
from
'apexcharts'
import
{
SharedModule
}
from
'../../../shared/shared.module'
;
import
{
NgApexchartsModule
}
from
'ng-apexcharts'
;
import
{
SimplebarAngularModule
}
from
'simplebar-angular'
;
@
Component
({
selector
:
'app-home-common'
,
imports
:
[
RouterModule
,
SharedModule
,
NgApexchartsModule
],
standalone
:
true
,
imports
:
[
RouterModule
,
SharedModule
,
NgApexchartsModule
,
SimplebarAngularModule
],
templateUrl
:
'./home-common.component.html'
,
styleUrls
:
[
'./home-common.component.css'
]
})
export
class
HomeCommonComponent
{
chartOptions1
:
any
;
chartOptions2
:
any
;
chartOptions3
:
any
chartOptions
:
any
;
optionsCircle1
:
any
;
chartOptions4
:
any
;
optionsCircle2
:
any
;
optionsCircle3
:
any
constructor
(
private
el
:
ElementRef
,
private
renderer
:
Renderer2
,
private
cdr
:
ChangeDetectorRef
){
this
.
chartOptions1
=
{
chart
:
{
type
:
'line'
,
height
:
40
,
width
:
120
,
sparkline
:
{
enabled
:
true
chartOptions
:
any
;
chartOptions1
:
any
;
chartOptions2
:
any
;
chartOptions3
:
any
;
chartOptions4
:
any
;
chartOptions5
:
any
;
chartOptions6
:
any
;
chartOptions7
:
any
;
chartOptions8
:
any
;
chartOptions9
:
any
optionsCircle1
:
any
;
optionsCircle2
:
any
;
optionsCircle3
:
any
;
chartOptions10
:
any
chartOptions11
:
any
chart3options
:
any
chart2options
:
any
chart1options
:
any
public
series
:
ApexAxisChartSeries
=
[];
public
chart
!
:
ApexChart
;
public
dataLabels
!
:
ApexDataLabels
;
public
markers
!
:
ApexMarkers
;
public
title
!
:
ApexTitleSubtitle
;
public
fill
!
:
ApexFill
;
public
yaxis
!
:
ApexYAxis
;
public
xaxis
!
:
ApexXAxis
;
public
tooltip
!
:
ApexTooltip
;
public
colors
!
:
any
;
public
commonOptions1
:
any
=
{
dataLabels
:
{
enabled
:
false
,
},
stroke
:
{
curve
:
'straight'
,
},
toolbar
:
{
tools
:
{
selection
:
false
,
},
dropShadow
:
{
},
markers
:
{
size
:
6
,
hover
:
{
size
:
10
,
},
},
tooltip
:
{
followCursor
:
false
,
theme
:
'dark'
,
x
:
{
show
:
false
,
},
marker
:
{
show
:
false
,
},
y
:
{
title
:
{
formatter
:
function
()
{
return
''
;
},
},
},
},
grid
:
{
clipMarkers
:
false
,
},
xaxis
:
{
type
:
'datetime'
,
},
};
constructor
(
private
el
:
ElementRef
,
private
renderer
:
Renderer2
,
private
cdr
:
ChangeDetectorRef
)
{
this
.
chartOptions9
=
{
series
:
[
{
name
:
'จำนวนการยืม'
,
data
:
[
40
,
55
,
60
,
80
,
70
,
65
,
90
]
},
{
name
:
'จำนวนการคืน'
,
data
:
[
30
,
50
,
58
,
75
,
68
,
63
,
85
]
}
],
chart
:
{
height
:
320
,
type
:
'line'
,
dropShadow
:
{
enabled
:
true
,
top
:
0
,
left
:
0
,
blur
:
3
,
color
:
'#000'
,
opacity
:
0.1
top
:
18
,
left
:
7
,
blur
:
10
,
opacity
:
0.2
},
toolbar
:
{
show
:
false
},
events
:
{
mounted
:
(
chart
:
any
)
=>
{
chart
.
windowResizeHandler
();
}
},
},
colors
:
[
'#845adf'
,
'#23b7e5'
],
dataLabels
:
{
enabled
:
true
},
stroke
:
{
curve
:
'smooth'
},
title
:
{
text
:
''
,
align
:
'left'
,
style
:
{
fontSize
:
'13px'
,
fontWeight
:
'bold'
,
color
:
'#8c9097'
},
},
grid
:
{
borderColor
:
'#f2f5f7'
,
},
markers
:
{
size
:
3
},
},
grid
:
{
show
:
false
,
xaxis
:
{
lines
:
{
show
:
false
categories
:
[
'ม.ค.'
,
'ก.พ.'
,
'มี.ค.'
,
'เม.ย.'
,
'พ.ค.'
,
'มิ.ย.'
,
'ก.ค.'
],
title
:
{
text
:
'เดือน'
,
style
:
{
color
:
"#8c9097"
,
fontSize
:
'13px'
,
fontWeight
:
'bold'
,
}
},
labels
:
{
style
:
{
colors
:
"#8c9097"
,
fontSize
:
'11px'
,
fontWeight
:
600
}
},
},
yaxis
:
{
lines
:
{
show
:
false
title
:
{
text
:
'จำนวนครั้ง'
,
style
:
{
color
:
"#8c9097"
,
fontSize
:
'13px'
,
fontWeight
:
'bold'
,
}
},
labels
:
{
style
:
{
colors
:
"#8c9097"
,
fontSize
:
'11px'
,
fontWeight
:
600
}
},
min
:
0
,
max
:
100
},
},
stroke
:
{
show
:
true
,
curve
:
'straight'
,
lineCap
:
'butt'
,
width
:
1.5
,
dashArray
:
0
,
},
fill
:
{
gradient
:
{
enabled
:
false
legend
:
{
position
:
'top'
,
horizontalAlign
:
'right'
,
floating
:
true
,
offsetY
:
-
25
,
offsetX
:
-
5
}
},
series
:
[{
name
:
'Value'
,
data
:
[
0
,
21
,
54
,
38
,
56
,
24
,
65
]
}],
yaxis
:
{
min
:
0
,
show
:
false
},
xaxis
:
{
show
:
false
,
axisTicks
:
{
};
this
.
chartOptions2
=
{
series
:
[
{
name
:
'Projects'
,
type
:
'column'
,
data
:
[
1.8
,
2.5
,
2.5
,
1.5
,
2.5
,
2.8
,
3.8
],
},
{
name
:
'Tasks'
,
type
:
'column'
,
data
:
[
1.1
,
2.2
,
3.1
,
4
,
4.1
,
4.9
,
6.5
],
},
{
name
:
'Revenue'
,
type
:
'line'
,
data
:
[
20
,
29
,
37
,
35
,
44
,
43
,
50
],
},
],
chart
:
{
toolbar
:
{
show
:
false
,
axisBorder
:
{
show
:
false
},
height
:
320
,
type
:
'line'
,
stacked
:
false
,
fontFamily
:
'Poppins, Arial, sans-serif'
,
},
axisBorder
:
{
show
:
false
}
},
colors
:
[
'#23b7e5'
],
}
this
.
chartOptions2
=
{
chart
:
{
type
:
'line'
,
height
:
45
,
sparkline
:
{
enabled
:
true
grid
:
{
borderColor
:
'#f5f4f4'
,
strokeDashArray
:
3
,
},
dropShadow
:
{
enabled
:
true
,
top
:
0
,
left
:
0
,
blur
:
1
,
color
:
'#fff'
,
opacity
:
0.05
}
},
stroke
:
{
show
:
true
,
curve
:
'smooth'
,
lineCap
:
'butt'
,
width
:
2
,
dashArray
:
0
,
},
fill
:
{
gradient
:
{
enabled
:
false
}
},
series
:
[{
name
:
'Value'
,
data
:
[
54
,
38
,
56
,
35
,
65
,
43
,
53
,
45
,
62
,
80
,
35
,
48
]
}],
yaxis
:
{
min
:
0
,
show
:
false
,
axisBorder
:
{
show
:
false
},
},
xaxis
:
{
axisBorder
:
{
show
:
false
dataLabels
:
{
enabled
:
false
,
},
},
colors
:
[
"rgba(132, 90, 223, 0.1)"
],
tooltip
:
{
enabled
:
false
,
}
}
this
.
optionsCircle1
=
{
series
:
[
1754
,
1234
,
878
,
270
],
labels
:
[
"Mobile"
,
"Tablet"
,
"Desktop"
,
"Others"
],
chart
:
{
height
:
250
,
type
:
'donut'
,
},
dataLabels
:
{
enabled
:
false
,
},
xaxis
:
{
categories
:
[
'Sun'
,
'Mon'
,
'Tue'
,
'Wed'
,
'Thu'
,
'Fri'
,
'Sat'
]
},
yaxis
:
[
{
show
:
true
,
legend
:
{
show
:
false
,
},
stroke
:
{
{
seriesName
:
'Projects'
,
opposite
:
true
,
axisTicks
:
{
show
:
true
,
curve
:
'smooth'
,
lineCap
:
'round'
,
colors
:
[
"#fff"
],
width
:
0
,
dashArray
:
0
,
},
plotOptions
:
{
pie
:
{
expandOnClick
:
false
,
donut
:
{
size
:
'80%'
,
background
:
'transparent'
,
labels
:
{
show
:
true
,
name
:
{
show
:
true
,
fontSize
:
'20px'
,
color
:
'#495057'
,
offsetY
:
-
4
},
value
:
{
show
:
true
,
fontSize
:
'18px'
,
offsetY
:
8
,
formatter
:
function
(
val
:
string
)
{
return
val
+
"%"
;
}
},
total
:
{
show
:
true
,
showAlways
:
true
,
label
:
'Total'
,
fontSize
:
'22px'
,
fontWeight
:
600
,
color
:
'#495057'
,
}
}
},
axisBorder
:
{
show
:
false
,
},
labels
:
{
style
:
{
colors
:
'#00E396'
,
},
},
},
colors
:
[
"rgba(132, 90, 223, 1)"
,
"rgba(35, 183, 229, 1)"
,
"rgba(38, 191, 148, 1)"
,
"rgba(245, 184, 73, 1)"
,],
};
this
.
chartOptions
=
{
series
:
[
{
name
:
'Views'
,
type
:
'column'
,
data
:
[
23
,
11
,
22
,
27
,
13
,
22
,
37
,
21
,
44
,
22
,
45
,
35
],
},
{
name
:
'Followers'
,
type
:
'line'
,
data
:
[
44
,
55
,
41
,
67
,
22
,
43
,
21
,
41
,
56
,
27
,
43
,
27
],
{
seriesName
:
'Revenue'
,
opposite
:
true
,
axisTicks
:
{
show
:
true
,
},
axisBorder
:
{
show
:
false
,
},
labels
:
{
show
:
false
,
},
},
],
tooltip
:
{
enabled
:
true
,
},
],
chart
:
{
toolbar
:
{
show
:
false
,
legend
:
{
show
:
true
,
position
:
'top'
},
type
:
'line'
,
height
:
250
,
},
grid
:
{
borderColor
:
'#f1f1f1'
,
strokeDashArray
:
3
,
},
labels
:
[
'Jan'
,
'Feb'
,
'Mar'
,
'Apr'
,
'May'
,
'Jun'
,
'Jul'
,
'Aug'
,
'Sep'
,
'Oct'
,
'Nov'
,
'Dec'
,
],
dataLabels
:
{
enabled
:
false
,
},
stroke
:
{
width
:
[
1
,
1.1
],
curve
:
[
'straight'
,
'smooth'
],
},
legend
:
{
show
:
true
,
position
:
'top'
,
},
xaxis
:
{
axisBorder
:
{
color
:
'#e9e9e9'
,
stroke
:
{
width
:
[
0
,
0
,
1.5
],
curve
:
'straight'
,
dashArray
:
[
0
,
0
,
0
],
},
},
plotOptions
:
{
bar
:
{
columnWidth
:
'20%'
,
borderRadius
:
2
,
plotOptions
:
{
bar
:
{
columnWidth
:
'35%'
,
borderRadius
:
3
,
},
},
},
colors
:
[
"rgba(132, 90, 223, 1)"
,
'#23b7e5'
],
};
this
.
chartOptions3
=
{
series
:
[
{
name
:
'Session'
,
data
:
[
24
,
23
,
20
,
25
,
27
,
26
,
24
,
23
,
23
,
25
,
23
,
23
],
colors
:
[
"rgb(132, 90, 223)"
,
"#ededed"
,
"#23b7e5"
]
};
this
.
chartOptions1
=
{
chart
:
{
type
:
'line'
,
height
:
40
,
width
:
120
,
sparkline
:
{
enabled
:
true
},
dropShadow
:
{
enabled
:
true
,
top
:
0
,
left
:
0
,
blur
:
3
,
color
:
'#000'
,
opacity
:
0.1
},
},
{
name
:
'Bounce Rate'
,
data
:
[
20
,
23
,
26
,
22
,
20
,
26
,
28
,
26
,
22
,
27
,
25
,
26
],
type
:
'bar'
,
},
],
chart
:
{
height
:
328
,
zoom
:
{
grid
:
{
show
:
false
,
xaxis
:
{
lines
:
{
show
:
false
}
},
yaxis
:
{
lines
:
{
show
:
false
}
},
},
stroke
:
{
show
:
true
,
curve
:
'straight'
,
lineCap
:
'butt'
,
width
:
1.5
,
dashArray
:
0
,
},
fill
:
{
gradient
:
{
enabled
:
false
}
},
},
dataLabels
:
{
enabled
:
false
,
},
grid
:
{
borderColor
:
'#f1f1f1'
,
strokeDashArray
:
3
},
legend
:
{
show
:
true
,
position
:
'top'
,
},
plotOptions
:
{
bar
:
{
borderRadius
:
5
,
columnWidth
:
"40%"
,
dataLabels
:
{
position
:
'top'
,
// top, center, bottom
series
:
[{
name
:
'Value'
,
data
:
[
0
,
21
,
54
,
38
,
56
,
24
,
65
]
}],
yaxis
:
{
min
:
0
,
show
:
false
},
xaxis
:
{
show
:
false
,
axisTicks
:
{
show
:
false
,
axisBorder
:
{
show
:
false
},
}
},
colors
:
[
"rgb(132, 90, 223)"
,
"#ededed"
],
stroke
:
{
curve
:
[
'smooth'
,
'stepline'
],
width
:
[
2
,
0
],
},
xaxis
:
{
categories
:
[
'Jan'
,
'Feb'
,
'Mar'
,
'Apr'
,
'May'
,
'Jun'
,
'Jul'
,
'Aug'
,
'Sep'
,
'Oct'
,
'Nov'
,
'Dec'
],
axisBorder
:
{
color
:
'#e9e9e9'
,
},
axisBorder
:
{
show
:
false
}
},
}
};
this
.
chartOptions4
=
{
series
:
[
{
name
:
'New Users'
,
data
:
[
32
,
15
,
63
,
51
,
36
,
62
,
99
,
42
,
78
,
76
,
32
,
120
],
},
{
name
:
'Sessions'
,
data
:
[
56
,
58
,
38
,
50
,
64
,
45
,
55
,
32
,
15
,
63
,
51
,
136
],
},
{
name
:
'Avg Session Duration'
,
data
:
[
48
,
29
,
50
,
69
,
20
,
59
,
52
,
12
,
48
,
28
,
17
,
98
],
},
],
chart
:
{
height
:
425
,
type
:
'line'
,
toolbar
:
{
colors
:
[
'#23b7e5'
],
}
this
.
optionsCircle1
=
{
series
:
[
1754
,
1234
,
878
,
270
],
labels
:
[
"Mobile"
,
"Tablet"
,
"Desktop"
,
"Others"
],
chart
:
{
height
:
250
,
type
:
'donut'
,
},
dataLabels
:
{
enabled
:
false
,
},
legend
:
{
show
:
false
,
},
background
:
'none'
,
fill
:
'#fff'
,
stroke
:
{
show
:
true
,
curve
:
'smooth'
,
lineCap
:
'round'
,
colors
:
[
"#fff"
],
width
:
0
,
dashArray
:
0
,
},
plotOptions
:
{
pie
:
{
expandOnClick
:
false
,
donut
:
{
size
:
'80%'
,
background
:
'transparent'
,
labels
:
{
show
:
true
,
name
:
{
show
:
true
,
fontSize
:
'20px'
,
color
:
'#495057'
,
offsetY
:
-
4
},
value
:
{
show
:
true
,
fontSize
:
'18px'
,
offsetY
:
8
,
formatter
:
function
(
val
:
string
)
{
return
val
+
"%"
;
}
},
total
:
{
show
:
true
,
showAlways
:
true
,
label
:
'Total'
,
fontSize
:
'22px'
,
fontWeight
:
600
,
color
:
'#495057'
,
}
},
grid
:
{
borderColor
:
'#f2f6f7'
,
},
colors
:
[
'rgb(132, 90, 223)'
,
'#23b7e5'
,
'#f5b849'
],
background
:
'transparent'
,
dataLabels
:
{
enabled
:
false
,
},
stroke
:
{
curve
:
'straight'
,
width
:
3
,
},
}
legend
:
{
show
:
true
,
position
:
'top'
,
},
xaxis
:
{
categories
:
[
},
},
},
colors
:
[
"rgba(132, 90, 223, 1)"
,
"rgba(35, 183, 229, 1)"
,
"rgba(38, 191, 148, 1)"
,
"rgba(245, 184, 73, 1)"
,],
};
this
.
chartOptions
=
{
series
:
[
{
name
:
'จำนวนการยืม'
,
type
:
'column'
,
data
:
[
23
,
11
,
22
,
27
,
13
,
22
,
37
,
21
,
44
,
22
,
45
,
35
],
},
{
name
:
'จำนวนการยืม1'
,
type
:
'column'
,
data
:
[
10
,
11
,
30
,
3
,
55
,
6
,
7
,
44
,
33
,
22
,
44
,
35
],
},
{
name
:
'จำนวนการยืม2'
,
type
:
'column'
,
data
:
[
3
,
44
,
30
,
11
,
23
,
98
,
92
,
29
,
39
,
40
,
11
,
9
],
},
],
chart
:
{
toolbar
:
{
show
:
false
,
},
type
:
'line'
,
height
:
250
,
},
grid
:
{
borderColor
:
'#f1f1f1'
,
strokeDashArray
:
3
,
},
labels
:
[
'Jan'
,
'Feb'
,
'Mar'
,
...
...
@@ -370,141 +459,253 @@ constructor(private el: ElementRef, private renderer: Renderer2,private cdr: Cha
'Nov'
,
'Dec'
,
],
show
:
false
,
axisBorder
:
{
show
:
false
,
color
:
'rgba(119, 119, 142, 0.05)'
,
offsetX
:
0
,
offsetY
:
0
,
dataLabels
:
{
enabled
:
false
,
},
axisTicks
:
{
show
:
false
,
borderType
:
'solid'
,
color
:
'rgba(119, 119, 142, 0.05)'
,
width
:
6
,
offsetX
:
0
,
offsetY
:
0
,
stroke
:
{
width
:
[
1
,
1.1
],
curve
:
[
'straight'
,
'smooth'
],
},
labels
:
{
rotate
:
-
90
,
legend
:
{
show
:
true
,
position
:
'top'
,
},
},
yaxis
:
{
show
:
false
,
axisBorder
:
{
xaxis
:
{
axisBorder
:
{
color
:
'#e9e9e9'
,
},
},
plotOptions
:
{
bar
:
{
columnWidth
:
'20%'
,
borderRadius
:
2
,
},
},
colors
:
[
"rgba(132, 90, 223, 1)"
,
'#23b7e5'
,
'#00E396'
],
};
this
.
chartOptions3
=
{
series
:
[
{
name
:
'Session'
,
data
:
[
24
,
23
,
20
,
25
,
27
,
26
,
24
,
23
,
23
,
25
,
23
,
23
],
type
:
'line'
,
},
{
name
:
'Bounce Rate'
,
data
:
[
20
,
23
,
26
,
22
,
20
,
26
,
28
,
26
,
22
,
27
,
25
,
26
],
type
:
'bar'
,
},
],
chart
:
{
height
:
328
,
zoom
:
{
enabled
:
false
},
},
dataLabels
:
{
enabled
:
false
,
},
grid
:
{
borderColor
:
'#f1f1f1'
,
strokeDashArray
:
3
},
legend
:
{
show
:
true
,
position
:
'top'
,
},
plotOptions
:
{
bar
:
{
borderRadius
:
5
,
columnWidth
:
"40%"
,
dataLabels
:
{
position
:
'top'
,
// top, center, bottom
},
}
},
colors
:
[
"rgb(132, 90, 223)"
,
"#ededed"
],
stroke
:
{
curve
:
[
'smooth'
,
'stepline'
],
width
:
[
2
,
0
],
},
xaxis
:
{
categories
:
[
'Jan'
,
'Feb'
,
'Mar'
,
'Apr'
,
'May'
,
'Jun'
,
'Jul'
,
'Aug'
,
'Sep'
,
'Oct'
,
'Nov'
,
'Dec'
],
axisBorder
:
{
color
:
'#e9e9e9'
,
},
}
};
this
.
chartOptions4
=
{
series
:
[
{
name
:
'New Users'
,
data
:
[
32
,
15
,
63
,
51
,
36
,
62
,
99
,
42
,
78
,
76
,
32
,
120
],
},
{
name
:
'Sessions'
,
data
:
[
56
,
58
,
38
,
50
,
64
,
45
,
55
,
32
,
15
,
63
,
51
,
136
],
},
{
name
:
'Avg Session Duration'
,
data
:
[
48
,
29
,
50
,
69
,
20
,
59
,
52
,
12
,
48
,
28
,
17
,
98
],
},
],
chart
:
{
height
:
425
,
type
:
'line'
,
toolbar
:
{
show
:
false
,
},
background
:
'none'
,
fill
:
'#fff'
,
},
grid
:
{
borderColor
:
'#f2f6f7'
,
},
colors
:
[
'rgb(132, 90, 223)'
,
'#23b7e5'
,
'#f5b849'
],
background
:
'transparent'
,
dataLabels
:
{
enabled
:
false
,
},
stroke
:
{
curve
:
'straight'
,
width
:
3
,
},
legend
:
{
show
:
true
,
position
:
'top'
,
},
xaxis
:
{
categories
:
[
'Jan'
,
'Feb'
,
'Mar'
,
'Apr'
,
'May'
,
'Jun'
,
'Jul'
,
'Aug'
,
'Sep'
,
'Oct'
,
'Nov'
,
'Dec'
,
],
show
:
false
,
axisBorder
:
{
show
:
false
,
color
:
'rgba(119, 119, 142, 0.05)'
,
offsetX
:
0
,
offsetY
:
0
,
},
axisTicks
:
{
show
:
false
,
borderType
:
'solid'
,
color
:
'rgba(119, 119, 142, 0.05)'
,
width
:
6
,
offsetX
:
0
,
offsetY
:
0
,
},
labels
:
{
rotate
:
-
90
,
},
},
axisTick
s
:
{
yaxi
s
:
{
show
:
false
,
axisBorder
:
{
show
:
false
,
},
axisTicks
:
{
show
:
false
,
},
},
},
tooltip
:
{
x
:
{
format
:
'dd/MM/yy HH:mm'
,
tooltip
:
{
x
:
{
format
:
'dd/MM/yy HH:mm'
,
}
,
},
},
};
this
.
optionsCircle2
=
{
chart
:
{
height
:
120
,
width
:
100
,
type
:
"radialBar"
,
},
series
:
[
48
],
colors
:
[
"#23b7e5"
],
plotOptions
:
{
radialBar
:
{
};
this
.
optionsCircle2
=
{
chart
:
{
height
:
120
,
width
:
100
,
type
:
"radialBar"
,
},
series
:
[
48
],
colors
:
[
"#23b7e5"
],
plotOptions
:
{
radialBar
:
{
hollow
:
{
margin
:
0
,
size
:
"50%"
,
background
:
"#fff"
margin
:
0
,
size
:
"50%"
,
background
:
"#fff"
},
dataLabels
:
{
name
:
{
offsetY
:
-
10
,
color
:
"#4b9bfa"
,
fontSize
:
"10px"
,
show
:
false
},
value
:
{
offsetY
:
5
,
color
:
"#4b9bfa"
,
fontSize
:
"12px"
,
show
:
true
,
fontWeight
:
800
}
name
:
{
offsetY
:
-
10
,
color
:
"#4b9bfa"
,
fontSize
:
"10px"
,
show
:
false
},
value
:
{
offsetY
:
5
,
color
:
"#4b9bfa"
,
fontSize
:
"12px"
,
show
:
true
,
fontWeight
:
800
}
}
}
},
stroke
:
{
lineCap
:
"round"
},
labels
:
[
"Followers"
]
}
},
stroke
:
{
lineCap
:
"round"
},
labels
:
[
"Followers"
]
}
this
.
optionsCircle3
=
{
chart
:
{
height
:
120
,
width
:
100
,
type
:
"radialBar"
,
},
series
:
[
65
],
colors
:
[
"#ffc107"
],
plotOptions
:
{
radialBar
:
{
}
this
.
optionsCircle3
=
{
chart
:
{
height
:
120
,
width
:
100
,
type
:
"radialBar"
,
},
series
:
[
65
],
colors
:
[
"#ffc107"
],
plotOptions
:
{
radialBar
:
{
hollow
:
{
margin
:
0
,
size
:
"50%"
,
background
:
"#fff"
margin
:
0
,
size
:
"50%"
,
background
:
"#fff"
},
dataLabels
:
{
name
:
{
offsetY
:
-
10
,
color
:
"#4b9bfa"
,
fontSize
:
"10px"
,
show
:
false
},
value
:
{
offsetY
:
5
,
color
:
"#4b9bfa"
,
fontSize
:
"12px"
,
show
:
true
,
fontWeight
:
800
},
name
:
{
offsetY
:
-
10
,
color
:
"#4b9bfa"
,
fontSize
:
"10px"
,
show
:
false
},
value
:
{
offsetY
:
5
,
color
:
"#4b9bfa"
,
fontSize
:
"12px"
,
show
:
true
,
fontWeight
:
800
},
}
}
},
stroke
:
{
lineCap
:
"round"
},
labels
:
[
"Views"
]
}
},
stroke
:
{
lineCap
:
"round"
},
labels
:
[
"Views"
]
}
}
}
// ngAfterViewInit(): void {
// this.setChartWidth();
// this.cdr.detectChanges();
// }
// private setChartWidth(): void {
// const chartContainer = this.el.nativeElement.querySelector('.chart-container');
// const chartContainer1 = this.el.nativeElement.querySelector('.chart-container1');
// const chartContainer2 = this.el.nativeElement.querySelector('.chart-container2');
// const chartContainer3 = this.el.nativeElement.querySelector('.chart-container3');
// const chart = new ApexCharts(chartContainer1, this.chartOptions);
// const chart1 = new ApexCharts(chartContainer, this.optionsCircle1);
// const chart2 = new ApexCharts(chartContainer2, this.chartOptions3);
// const chart3 = new ApexCharts(chartContainer3, this.chartOptions4);
// chart.render();
// chart2.render();
// chart1.render();
// chart3.render();
// }
}
Web-Manage/src/app/DPU/company-management/company-management.module.ts
View file @
5e6ea45f
...
...
@@ -81,6 +81,12 @@ export const companyRoutes: Routes = [
loadComponent
:
()
=>
import
(
'./emp-borrow-manage/emp-borrow-manage.component'
).
then
((
m
)
=>
m
.
EmpBorrowManageComponent
)
},
{
path
:
'company/emp-borrowrepair'
,
loadComponent
:
()
=>
import
(
'./emp-borrow-repair/emp-borrow-repair.component'
).
then
((
m
)
=>
m
.
EmpBorrowRepairComponent
)
},
{
path
:
'company/emp-transaction'
,
loadComponent
:
()
=>
...
...
Web-Manage/src/app/DPU/company-management/emp-borrow-repair/emp-borrow-repair.component.html
View file @
5e6ea45f
<app-page-header
[
title
]="'
อนุมัติการคืนอุปกรณ์
'"
[
title
]="'
จัดการอุปการณ์
ซ่อม
-
ชำรุด
'"
[
activeTitle
]="'ผู้ดูแลระบบ'"
[
title1
]="'
อนุมัติการคืนอุปกรณ์
'"
[
title1
]="'
จัดการอุปการณ์
ซ่อม
-
ชำรุด
'"
></app-page-header>
<div
class=
"grid grid-cols-12 gap-x-6"
>
...
...
@@ -17,49 +17,6 @@
</div>
<!-- แท็บสถานะ -->
<div
class=
"flex flex-wrap gap-2"
>
<!-- สถานะทั้งหมด -->
<div>
<button
class=
"px-4 py-2 rounded-full border text-sm font-medium bg-blue-100 text-blue-800 border-blue-200"
(
click
)="
selectedStatus =
'!requested,!rejected'
;
applyFilter
()"
>
ทั้งหมด
</button>
</div>
<div>
<button
class=
"px-4 py-2 rounded-full border text-sm font-medium bg-warning/10 text-warning border-warning/20"
(
click
)="
selectedStatus =
'approved'
;
applyFilter
()"
>
รอคืนอุปกรณื
</button>
</div>
<!-- <div>
<button
class="px-4 py-2 rounded-full border text-sm font-medium bg-success/10 text-success border-success/20"
(click)="filterByStatus('approved')"
>
อนุมัติแล้ว
</button>
</div> -->
<div>
<button
class=
"px-4 py-2 rounded-full border text-sm font-medium bg-info/10 text-info border-info/20"
(
click
)="
selectedStatus =
'returned'
;
applyFilter
()"
>
คืนแล้ว
</button>
</div>
<!-- <div>
<button
class="px-4 py-2 rounded-full border text-sm font-medium bg-danger/10 text-danger border-danger/20"
(click)="filterByStatus('rejected')"
>
ไม่อนุมัติ
</button>
</div> -->
</div>
<div
class=
"flex flex-wrap gap-2"
>
<div>
<input
[(
ngModel
)]="
searchTerm
"
...
...
@@ -81,8 +38,7 @@
<th
scope=
"col"
class=
"text-start"
>
อุปกรณ์ที่ยืม
</th>
<th
scope=
"col"
class=
"text-start"
>
พนักงาน
</th>
<th
scope=
"col"
class=
"text-start"
>
จำนวน
</th>
<th
scope=
"col"
class=
"text-start"
>
วันที่ยืม
</th>
<th
scope=
"col"
class=
"text-start"
>
วันที่คืน
</th>
<th
scope=
"col"
class=
"text-start"
>
วันที่ส่งซ่อม
</th>
<th
scope=
"col"
class=
"text-start"
>
สถานะ
</th>
<th
scope=
"col"
class=
"text-start"
>
ผู้อนุมัติ
</th>
<th
scope=
"col"
class=
"text-start"
>
การดำเนินการ
</th>
...
...
@@ -105,21 +61,18 @@
</td>
<td>
{{ product.quantity_borrowed }}
</td>
<td>
{{ product.created_at | date : "dd/MM/yyyy HH:mm" }}
</td>
<td>
@if(product.returned_date) {
{{ product.returned_date | date : "dd/MM/yyyy HH:mm" }}
}
</td>
<td>
<span
class=
"badge"
[
ngClass
]="{
'
bg-warning
/
10
text-warning
'
:
product
.
status =
==
'
approved
',
product
.
status =
==
'
repair
',
'
bg-danger
/
10
text-danger
'
:
product
.
status =
==
'
rejected
',
'
bg-info
/
10
text-info
'
:
product
.
status =
==
'
returned
',
}"
>
{{ getStatusText(product.status) }}
...
...
@@ -131,7 +84,7 @@
<div
class=
"flex gap-1"
>
<!-- ปุ่มอนุมัติการคืน -->
@if(product.project_equipment?.equipment?.is_returnable
&&
product.status === '
approved
'
&&
!product.returned_date) {
product.status === '
repair
'
&&
!product.returned_date) {
<button
aria-label=
"อนุมัติการคืน"
(
click
)="
view
(
product
)"
...
...
@@ -141,29 +94,6 @@
<i
class=
"ri-check-line"
></i>
</button>
}
<!-- ปุ่มแจ้งซ่อม -->
@if(product.project_equipment?.equipment?.is_returnable
&&
(product.status === 'returned' || product.status ===
'returned')) {
<button
aria-label=
"แจ้งซ่อม"
(
click
)="
reportRepair
(
product
)"
class=
"ti-btn ti-btn-sm ti-btn-warning"
>
<i
class=
"ri-tools-line"
></i>
</button>
} @if(product.status === 'approved' || product.status ===
'returned'){
<button
aria-label=
"รายละเอียด"
(
click
)="
view
(
product
)"
class=
"ti-btn ti-btn-sm ti-btn-light me-[0.375rem]"
data-hs-overlay=
"#detail-borrow"
>
<i
class=
"fe fe-eye"
></i>
</button>
}
</div>
</td>
</tr>
...
...
Web-Manage/src/app/DPU/company-management/emp-borrow-repair/emp-borrow-repair.component.ts
View file @
5e6ea45f
...
...
@@ -28,13 +28,327 @@ import { UserProfileModel } from '../../models/user.model';
@
Component
({
selector
:
'app-emp-borrow-repair'
,
templateUrl
:
'./emp-borrow-repair.component.html'
,
styleUrls
:
[
'./emp-borrow-repair.component.css'
]
standalone
:
true
,
imports
:
[
CommonModule
,
SharedModule
,
TranslateModule
,
NgSelectModule
,
FormsModule
],
styleUrls
:
[
'./emp-borrow-repair.component.scss'
]
})
export
class
EmpBorrowRepairComponent
implements
OnInit
{
export
class
EmpBorrowRepairComponent
{
@
ViewChild
(
'closeModal'
)
public
childModal
?:
ElementRef
;
@
ViewChild
(
'closeModalStock'
)
public
closeModalStock
?:
ElementRef
;
@
ViewChild
(
'modalDetail'
)
public
modalDetail
?:
ElementRef
;
returnList
:
BorrowTransactionsModel
[]
=
[];
memberList
:
UserModel
;
Projecteqlist
:
ProjectEquipmentModel
;
projecteMember
:
ProjectMemberModel
;
selectedBorrowItem
:
BorrowTransactionsModel
;
projectList
:
ProjectModel
;
allSelected
=
false
;
someSelected
=
false
;
uploadErrorMsg
:
string
=
""
;
itemsList
:
ProjectEquipmentModel
[]
=
[];
filterList
:
ProjectEquipmentModel
[]
=
[];
itemsListAll
:
EquipmentModel
[]
=
[];
filterListAll
:
EquipmentModel
[]
=
[];
selectModel
:
ProjectEquipmentModel
=
new
ProjectEquipmentModel
()
selectStock
:
EquipmentStockModel
selectedItems
=
new
Map
<
string
,
boolean
>
();
borrowSelect
:
BorrowTransactionsModel
=
new
BorrowTransactionsModel
()
filteredList
:
any
[]
=
[];
pageIndex
=
0
;
member
:
UserProfileModel
;
get
searchTerm
():
string
{
return
this
.
_searchTerm
;
}
set
searchTerm
(
val
:
string
)
{
this
.
pageIndex
=
0
;
this
.
allSelected
=
false
this
.
_searchTerm
=
val
;
if
(
val
!=
''
)
{
this
.
filterList
=
this
.
filter
(
val
);
}
else
{
this
.
updatePagedItems
()
}
}
projectId
=
""
_searchTerm
=
""
;
isEdit
=
false
;
empList
:
ProjectMemberModel
[]
=
[]
hisList
:
BorrowTransactionsModel
[]
=
[];
selectedStatus
:
string
=
'!requested,!rejected,!remove,!approved,!returned'
;
isProcessing
=
false
;
constructor
(
private
http
:
HttpClient
,
private
cdr
:
ChangeDetectorRef
,
private
eqService
:
EquipmentService
,
public
translate
:
TranslateService
,
private
tokenService
:
TokenService
,
private
projectEquipmentService
:
ProjectEquipmentService
,
private
borrowTransactionsService
:
BorrowTransactionsService
,
private
projectMemberService
:
ProjectMemberService
)
{
this
.
projectId
=
this
.
tokenService
.
getSelectCompany
().
projectId
!
;
}
@
ViewChild
(
'video'
)
video
:
ElementRef
;
@
ViewChild
(
'canvas'
)
canvas
:
ElementRef
;
capturedImage
:
string
|
null
=
null
;
uploadStatus
:
string
=
''
;
checkMatch
=
false
;
memberId
=
""
isFaceDetected
=
false
;
// Flag to determine if a face is detected
ngOnInit
():
void
{
this
.
loadReturnList
();
}
loadReturnList
():
void
{
this
.
borrowTransactionsService
.
getLists
().
subscribe
({
next
:
(
result
)
=>
{
// เก็บข้อมูลทั้งหมด
this
.
hisList
=
result
.
filter
(
e
=>
e
.
project_equipment
.
projectId
==
this
.
projectId
);
// เรียงลำดับจากวันที่ล่าสุด
this
.
hisList
.
sort
((
a
,
b
)
=>
new
Date
(
b
.
created_at
).
getTime
()
-
new
Date
(
a
.
created_at
).
getTime
()
);
// กรองเฉพาะรายการที่ต้องคืน (is_returnable === true)
this
.
hisList
=
this
.
hisList
.
filter
(
item
=>
item
.
project_equipment
?.
equipment
?.
is_returnable
===
true
);
// ใช้ applyFilter เพื่อกรองตามเงื่อนไขอื่นๆ
this
.
applyFilter
();
},
error
:
(
err
)
=>
{
console
.
error
(
'Error loading return list:'
,
err
);
// สามารถเพิ่มการแจ้งเตือนผู้ใช้ที่นี่
}
});
}
filterByStatus
(
status
:
string
):
void
{
this
.
selectedStatus
=
status
;
this
.
applyFilter
();
}
applyFilter
():
void
{
let
filtered
=
[...
this
.
hisList
];
// แยกค่าสถานะเป็น Array
const
statusConditions
=
this
.
selectedStatus
.
split
(
','
);
// กรองตามเงื่อนไขสถานะ
filtered
=
filtered
.
filter
(
item
=>
{
if
(
!
item
.
status
)
return
false
;
// ตรวจสอบแต่ละเงื่อนไข
for
(
const
condition
of
statusConditions
)
{
if
(
condition
.
startsWith
(
'!'
))
{
// กรณีเงื่อนไขแบบยกเว้น (!status)
const
excludedStatus
=
condition
.
substring
(
1
);
if
(
item
.
status
===
excludedStatus
)
{
return
false
;
}
}
else
{
// กรณีเงื่อนไขแบบบังคับ (status)
if
(
item
.
status
!==
condition
)
{
return
false
;
}
}
}
return
true
;
});
// กรองตามคำค้นหา
if
(
this
.
searchTerm
)
{
const
term
=
this
.
searchTerm
.
toLowerCase
();
filtered
=
filtered
.
filter
(
item
=>
(
item
.
project_equipment
?.
equipment
?.
equipmentName
?.
toLowerCase
().
includes
(
term
))
||
(
item
.
member
?.
getFullname
()?.
toLowerCase
().
includes
(
term
))
||
(
item
.
quantity_borrowed
?.
toString
().
includes
(
term
))
);
}
this
.
filteredList
=
filtered
;
}
getUserProject
()
{
this
.
projectMemberService
.
getLists
(
this
.
projectId
).
subscribe
(
result
=>
{
this
.
empList
=
result
})
}
getCompanyEquirment
()
{
this
.
eqService
.
getLists
().
subscribe
(
result
=>
{
this
.
itemsListAll
=
result
.
filter
(
e
=>
e
.
quantity
>
0
)
this
.
updatePagedItemsAll
()
})
}
getProjectEquirment
()
{
this
.
projectEquipmentService
.
getLists
(
this
.
projectId
).
subscribe
(
result
=>
{
this
.
itemsList
=
result
this
.
updatePagedItems
()
})
}
filter
(
v
:
string
)
{
this
.
pageIndex
=
0
;
return
this
.
itemsList
?.
filter
(
(
x
)
=>
x
.
equipment
.
equipmentName
.
toLowerCase
().
indexOf
(
v
.
toLowerCase
())
!==
-
1
||
x
.
equipment
.
description
?.
toLowerCase
().
indexOf
(
v
.
toLowerCase
())
!==
-
1
);
}
constructor
()
{
}
ngOnInit
()
{
getfilteredItems
()
{
return
this
.
returnList
.
filter
(
item
=>
item
.
project_equipment
?.
equipment
?.
equipmentName
.
toLowerCase
().
includes
(
this
.
searchTerm
.
toLowerCase
())
||
item
.
member
?.
getFullname
().
toLowerCase
().
includes
(
this
.
searchTerm
.
toLowerCase
())
);
}
getStatusText
(
status
:
string
):
string
{
switch
(
status
)
{
case
'requested'
:
return
'รออนุมัติ'
;
case
'approved'
:
return
'รอคืนอุปกรณ์'
;
case
'rejected'
:
return
'ไม่อนุมัติ'
;
case
'returned'
:
return
'คืนแล้ว'
;
case
'repair'
:
return
'กำลังซ่อม'
;
default
:
return
status
;
}
}
viewStock
(
item
:
ProjectEquipmentModel
)
{
this
.
selectModel
=
new
ProjectEquipmentModel
(
item
)
this
.
borrowSelect
=
new
BorrowTransactionsModel
()
// this.selectStock = new EquipmentStockModel()
// this.selectStock.equipmentId = this.selectModel.equipmentId
// this.selectStock.created_by = this.tokenService.getUser().member.memberId
// this.selectStock.action = "INBOUND"
}
viewHisStock
(
item
:
ProjectEquipmentModel
)
{
this
.
borrowTransactionsService
.
search
({
"peId"
:
item
.
peId
,
"member_id"
:
this
.
tokenService
.
getUser
().
member
.
memberId
}).
subscribe
(
result
=>
{
this
.
hisList
=
result
})
}
view
(
item
:
BorrowTransactionsModel
)
{
console
.
log
(
'รายการที่เลือก:'
,
item
);
this
.
isEdit
=
true
;
this
.
selectedBorrowItem
=
item
;
}
openBorrowDetail
(
item
:
any
)
{
this
.
selectedBorrowItem
=
item
;
setTimeout
(()
=>
{
const
detailModal
=
document
.
querySelector
(
'#detail-borrow'
)
as
any
;
if
(
detailModal
)
{
(
window
as
any
).
HSOverlay
.
open
(
detailModal
);
}
});
}
approve
(
item
:
BorrowTransactionsModel
)
{
swal
({
title
:
"Are you sure?"
,
text
:
"คุณต้องการบันทึกหรือไม่"
,
icon
:
"warning"
,
dangerMode
:
false
,
buttons
:
[
"Cancel"
,
"Confirm"
],
})
.
then
((
willDelete
:
any
)
=>
{
if
(
willDelete
)
{
// เตรียมข้อมูลที่จะส่งไป API
let
body
=
{
quantity_borrowed
:
item
.
quantity_borrowed
,
// อาจจะอัพเดทจำนวนยืมที่เหลือ
memberId
:
item
.
memberId
,
status
:
"returned"
,
// เปลี่ยนสถานะเป็น "returned"
approved_by
:
this
.
tokenService
.
getUser
().
member
.
memberId
// ค่าผู้ที่อนุมัติ
};
// ทำการอัพเดทข้อมูลใน API
this
.
borrowTransactionsService
.
update
(
item
.
borrowId
,
body
).
subscribe
(
(
result
)
=>
{
// เมื่อบันทึกสำเร็จ
swal
(
"Save Success!!"
,
"บันทึกข้อมูลสำเร็จ"
,
"success"
);
// อัพเดทข้อมูลในตัว item ด้วยค่าใหม่ที่ได้รับจาก API (ถ้ามี)
item
.
status
=
"returned"
;
// อัพเดทสถานะ
item
.
quantity_borrowed
=
0
;
// อัพเดทจำนวนยืม
// เรียก ngOnInit หรือการโหลดข้อมูลใหม่หลังการบันทึก
this
.
ngOnInit
();
},
(
error
:
any
)
=>
{
// เมื่อเกิดข้อผิดพลาด
swal
(
"Fail!!"
,
error
.
error
.
detail
,
"info"
);
}
);
}
});
}
reject
(
item
:
BorrowTransactionsModel
)
{
swal
({
title
:
"ยืนยันการไม่อนุมัติ"
,
text
:
"คุณต้องการไม่อนุมัติการยืมนี้หรือไม่?"
,
icon
:
"warning"
,
dangerMode
:
true
,
buttons
:
[
"ยกเลิก"
,
"ไม่อนุมัติ"
],
}).
then
((
willReject
)
=>
{
if
(
willReject
)
{
let
body
=
{
"quantity_borrowed"
:
item
.
quantity_borrowed
,
"memberId"
:
item
.
memberId
,
"status"
:
"rejected"
,
"approved_by"
:
this
.
tokenService
.
getUser
().
member
.
memberId
}
this
.
borrowTransactionsService
.
update
(
item
.
borrowId
,
body
).
subscribe
(
result
=>
{
swal
(
"ไม่อนุมัติสำเร็จ"
,
"การยืมอุปกรณ์ถูกปฏิเสธแล้ว"
,
"success"
);
this
.
loadReturnList
();
},
(
error
)
=>
{
swal
(
"เกิดข้อผิดพลาด"
,
error
.
error
.
detail
,
"error"
);
}
);
}
});
}
updatePagedItems
()
{
const
startIndex
=
this
.
pageIndex
*
10
;
const
endIndex
=
startIndex
+
10
;
const
source
=
this
.
searchTerm
?
this
.
itemsList
.
filter
(
x
=>
x
.
equipment
?.
equipmentName
?.
includes
(
this
.
searchTerm
))
:
this
.
itemsList
;
this
.
filterList
=
source
.
slice
(
startIndex
,
endIndex
);
}
updatePagedItemsAll
()
{
const
startIndex
=
this
.
pageIndex
*
10
;
const
endIndex
=
startIndex
+
10
;
// this.filterList = this.itemsList.slice(startIndex, endIndex);
this
.
filterListAll
=
this
.
itemsListAll
}
}
Web-Manage/src/app/DPU/company-management/emp-borrow-return-status/emp-borrow-return-status.component.html
View file @
5e6ea45f
...
...
@@ -21,7 +21,7 @@
<div>
<button
class=
"px-4 py-2 rounded-full border text-sm font-medium bg-blue-100 text-blue-800 border-blue-200"
(
click
)="
selectedStatus =
'!requested,!rejected'
;
applyFilter
()"
(
click
)="
selectedStatus =
'!requested,!rejected
,!remove,!repair
'
;
applyFilter
()"
>
ทั้งหมด
</button>
...
...
@@ -143,17 +143,19 @@
}
<!-- ปุ่มแจ้งซ่อม -->
@if(product.project_equipment?.equipment?.is_returnable
&&
<!--
@if(product.project_equipment?.equipment?.is_returnable &&
(product.status === 'returned' || product.status ===
'returned')) {
<button
aria-label="แจ้งซ่อม"
(
click
)="
reportRepair
(
product
)"
data-hs-overlay="#modal-repair"
(click)="view(product)"
class="ti-btn ti-btn-sm ti-btn-warning"
>
<i class="ri-tools-line"></i>
</button>
} @if(product.status === 'approved' || product.status ===
} -->
@if(product.status === 'approved' || product.status ===
'returned'){
<button
aria-label=
"รายละเอียด"
...
...
@@ -288,6 +290,100 @@
</div>
</div>
</div>
<!-- Start:: New Deal -->
<div
id=
"modal-repair"
class=
"hs-overlay hidden ti-modal"
*
ngIf=
"selectModel"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out"
>
<div
class=
"ti-modal-content"
>
<div
class=
"ti-modal-header"
>
<h6
class=
"modal-title text-[1rem] font-semibold text-defaulttextcolor"
id=
"mail-ComposeLabel"
>
ซ่อม/ซำรุด
</h6>
<button
type=
"button"
class=
"hs-dropdown-toggle !text-[1rem] !font-semibold !text-defaulttextcolor"
data-hs-overlay=
"#modal-repair"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ri-close-line"
></i>
</button>
</div>
<div
class=
"ti-modal-body px-4"
>
<div
class=
"xl:col-span-12 col-span-12"
>
<img
[
src
]="
selectModel
.
equipment
.
getPicture
()"
class=
"!rounded-t-md"
alt=
"..."
style=
"width: 100%; height: auto; object-fit: cover"
/>
</div>
<div
class=
"grid grid-cols-12 gap-4"
>
<div
class=
"xl:col-span-12 col-span-12"
>
<label
for=
"deal-name"
class=
"form-label"
>
ชื่ออุปกรณ์
</label>
<input
readonly
type=
"text"
class=
"form-control"
id=
"deal-name"
placeholder=
"ชื่ออุปกรณ์"
[(
ngModel
)]="
selectedBorrowItem
.
project_equipment
.
equipment
.
equipmentName
"
/>
</div>
<div
class=
"xl:col-span-12 col-span-12"
>
<label
for=
"input-label"
class=
"form-label"
>
{{
"สถานะ" | translate
}}
</label>
<!-- <ng-select [items]="customerList" bindLabel="companyThName" [(ngModel)]="projectModel.customer">
</ng-select> -->
<select
class=
"mb-4 sm:mb-0 form-select !py-3"
id=
"inlineFormSelectPref"
[(
ngModel
)]="
borrowSelect
.
status
"
>
<option
ngValue=
"repair"
selected
>
ส่งซ่อม
</option>
<option
ngValue=
"remove"
selected
>
นำอุปกรณ์ออก
</option>
</select>
<!-- <select class="mb-4 sm:mb-0 form-select !py-3" id="inlineFormSelectPref"
[(ngModel)]="projectModel.customer">
<option [ngValue]="null" selected>-</option>
<option *ngFor="let item of customerList" [ngValue]="item">{{item.getCompanyName()}}</option>
</select> -->
</div>
<div
class=
"xl:col-span-12 col-span-12"
>
<label
for=
"deal-name"
class=
"form-label"
>
จำนวน
</label>
<input
type=
"number"
class=
"form-control"
id=
"deal-name"
placeholder=
"จำนวนที่ชำรุด"
[(
ngModel
)]="
selectedBorrowItem
.
quantity_borrowed
"
/>
</div>
</div>
</div>
<div
class=
"ti-modal-footer"
>
<button
#
closeModalStock
type=
"button"
class=
"hs-dropdown-toggle ti-btn ti-btn-light align-middle"
data-hs-overlay=
"#modal-repair"
>
ยกเลิก
</button>
<button
type=
"button"
class=
"ti-btn bg-primary text-white !font-medium"
(
click
)="
saveRepair
()"
>
บันทึก
</button>
</div>
</div>
</div>
</div>
<div
id=
"detail-borrow"
class=
"hs-overlay hidden ti-modal"
...
...
Web-Manage/src/app/DPU/company-management/emp-borrow-return-status/emp-borrow-return-status.component.ts
View file @
5e6ea45f
...
...
@@ -62,6 +62,8 @@ export class EmpBorrowReturnStatusComponent {
borrowSelect
:
BorrowTransactionsModel
=
new
BorrowTransactionsModel
()
filteredList
:
any
[]
=
[];
pageIndex
=
0
;
damagedQuantity
:
number
=
0
;
quantityExceeded
:
boolean
=
false
;
member
:
UserProfileModel
;
get
searchTerm
():
string
{
return
this
.
_searchTerm
;
...
...
@@ -81,7 +83,7 @@ export class EmpBorrowReturnStatusComponent {
isEdit
=
false
;
empList
:
ProjectMemberModel
[]
=
[]
hisList
:
BorrowTransactionsModel
[]
=
[];
selectedStatus
:
string
=
'!requested,!rejected'
;
selectedStatus
:
string
=
'!requested,!rejected
,!remove,!repair
'
;
isProcessing
=
false
;
constructor
(
private
http
:
HttpClient
,
...
...
@@ -330,67 +332,38 @@ export class EmpBorrowReturnStatusComponent {
}
});
}
reportRepair
(
item
:
BorrowTransactionsModel
):
void
{
swal
({
title
:
"แจ้งซ่อมอุปกรณ์"
,
text
:
`คุณต้องการแจ้งซ่อมอุปกรณ์
${
item
.
project_equipment
?.
equipment
?.
equipmentName
}
หรือไม่
?
`,
content: {
element: this.createRepairForm(item.quantity_borrowed) // << ส่งจำนวนยืมเข้าไป
},
icon: "warning",
buttons: ["ยกเลิก", "แจ้งซ่อม"],
}).then((confirmed) => {
if (confirmed) {
const description = (document.getElementById("repairDescription") as HTMLInputElement).value;
const quantity = +(document.getElementById("repairQuantity") as HTMLInputElement).value;
if (!description || quantity <= 0) {
swal("กรุณากรอกข้อมูลให้ครบถ้วน", "", "error");
return;
}
const repairData = {
borrowTransactionId: item.borrowId,
equipmentId: item.project_equipment?.equipment?.equipmentId,
reportedBy: this.tokenService.getUser().member.memberId,
description: `
$
{
description
}
(
จำนวน
$
{
quantity
})
`,
status: 'pending'
};
const updateBorrowData = {
status: 'repairing'
};
// เรียก service เพื่อบันทึกการแจ้งซ่อม...
}
});
}
private createRepairForm(defaultQuantity: number): HTMLElement {
const wrapper = document.createElement("div");
const qtyInput = document.createElement("input");
qtyInput.id = "repairQuantity";
qtyInput.placeholder = "จำนวนที่แจ้งซ่อม";
qtyInput.type = "number";
qtyInput.min = "1";
qtyInput.className = "swal-content__input";
qtyInput.style.marginTop = "10px";
qtyInput.value = defaultQuantity?.toString() || '1';
const descInput = document.createElement("input");
descInput.id = "repairDescription";
descInput.placeholder = "ระบุอาการเสีย/ปัญหาที่พบ";
descInput.type = "text";
descInput.className = "swal-content__input";
saveRepair
()
{
// console.log(this.selectStock)
swal
({
title
:
"Are you sure?"
,
text
:
"คุณต้องการบันทึกหรือไม่"
,
icon
:
"warning"
,
dangerMode
:
false
,
buttons
:
[
"Cancel"
,
"Confirm"
],
})
.
then
((
willDelete
:
any
)
=>
{
if
(
willDelete
)
{
this
.
borrowTransactionsService
.
save
({
"peId"
:
this
.
selectModel
.
peId
,
"quantity_borrowed"
:
this
.
borrowSelect
.
quantity_borrowed
,
"status"
:
this
.
borrowSelect
.
status
,
"memberId"
:
this
.
tokenService
.
getUser
().
member
.
memberId
,
"approved_by"
:
this
.
tokenService
.
getUser
().
member
.
memberId
}).
subscribe
(
result
=>
{
swal
(
"Save Success!!"
,
"บันทึกข้อมูลสำเร็จ"
,
"success"
);
this
.
ngOnInit
()
this
.
closeModalStock
?.
nativeElement
.
click
()
},
(
error
:
any
)
=>
{
swal
(
"Fail!!"
,
error
.
error
.
detail
,
"info"
);
})
}
});
wrapper.appendChild(descInput);
wrapper.appendChild(qtyInput);
return wrapper;
}
}
updatePagedItems
()
{
const
startIndex
=
this
.
pageIndex
*
10
;
...
...
Web-Manage/src/app/DPU/company-management/emp-borrow-status/emp-borrow-status.component.html
View file @
5e6ea45f
...
...
@@ -21,7 +21,7 @@
<div>
<button
class=
"px-4 py-2 rounded-full border text-sm font-medium bg-blue-100 text-blue-800 border-blue-200"
(
click
)="
selectedStatus =
'!returned'
;
applyFilter
()"
(
click
)="
selectedStatus =
'!returned
,!remove,!repair
'
;
applyFilter
()"
>
ทั้งหมด
</button>
...
...
Web-Manage/src/app/DPU/company-management/emp-borrow-status/emp-borrow-status.component.ts
View file @
5e6ea45f
...
...
@@ -68,7 +68,7 @@ export class EmpBorrowStatusComponent {
isEdit
=
false
;
empList
:
ProjectMemberModel
[]
=
[]
hisList
:
BorrowTransactionsModel
[]
=
[];
selectedStatus
:
string
=
'!returned'
;
selectedStatus
:
string
=
'!returned
,!remove,!repair
'
;
constructor
(
private
http
:
HttpClient
,
private
eqService
:
EquipmentService
,
...
...
Web-Manage/src/app/DPU/company-management/home-installer/home-installer.component.html
View file @
5e6ea45f
<app-page-header
[
title
]="'
Dashboards
'"
[
activeTitle
]="'
Dashboards
'"
[
title1
]="'
Dashboards
'"
></app-page-header>
<div
class=
"grid grid-cols-12 gap-x-6"
>
<div
class=
"xxxl:col-span-6 col-span-12"
>
<div
class=
"grid grid-cols-12 gap-x-6"
>
<div
class=
"xxl:col-span-4 md:col-span-6 col-span-12"
>
<div
class=
"box"
>
<div
class=
"box-body !pb-[0.9rem]"
>
<div
class=
"flex items-start"
>
<div
class=
"me-4 gap-0"
>
<span
class=
"avatar avatar-md p-2 bg-primary"
>
<svg
class=
"svg-white"
xmlns=
"http://www.w3.org/2000/svg"
height=
"24px"
viewBox=
"0 0 24 24"
width=
"24px"
fill=
"#000000"
>
<path
d=
"M0 0h24v24H0V0z"
fill=
"none"
/>
<path
d=
"M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"
/>
</svg>
</span>
</div>
<div
class=
"flex-grow"
>
<div
class=
"flex mb-1 items-start justify-between"
>
<h5
class=
"font-semibold mb-0 leading-none text-[1.25rem]"
>
256
</h5>
<div
class=
"text-danger font-semibold"
>
<i
class=
"ri-arrow-down-s-fill me-1 align-middle"
></i>
-1.05%
</div>
</div>
<p
class=
"mb-0 text-[0.625rem] opacity-[0.7] text-[#8c9097] dark:text-white/50 font-semibold"
>
จำนวนพนักงานทั้งหมด
</p>
</div>
</div>
</div>
</div>
</div>
<div
class=
"xxl:col-span-4 md:col-span-6 col-span-12"
>
<div
class=
"box"
>
<div
class=
"box-body !pb-[0.9rem]"
>
<div
class=
"flex items-start"
>
<div
class=
"me-4"
>
<span
class=
"avatar avatar-md p-2 bg-secondary"
>
<svg
class=
"svg-white"
xmlns=
"http://www.w3.org/2000/svg"
enable-background=
"new 0 0 24 24"
height=
"24px"
viewBox=
"0 0 24 24"
width=
"24px"
fill=
"#000000"
>
<rect
fill=
"none"
height=
"24"
width=
"24"
/>
<g>
<path
d=
"M4,13c1.1,0,2-0.9,2-2c0-1.1-0.9-2-2-2s-2,0.9-2,2C2,12.1,2.9,13,4,13z M5.13,14.1C4.76,14.04,4.39,14,4,14 c-0.99,0-1.93,0.21-2.78,0.58C0.48,14.9,0,15.62,0,16.43V18l4.5,0v-1.61C4.5,15.56,4.73,14.78,5.13,14.1z M20,13c1.1,0,2-0.9,2-2 c0-1.1-0.9-2-2-2s-2,0.9-2,2C18,12.1,18.9,13,20,13z M24,16.43c0-0.81-0.48-1.53-1.22-1.85C21.93,14.21,20.99,14,20,14 c-0.39,0-0.76,0.04-1.13,0.1c0.4,0.68,0.63,1.46,0.63,2.29V18l4.5,0V16.43z M16.24,13.65c-1.17-0.52-2.61-0.9-4.24-0.9 c-1.63,0-3.07,0.39-4.24,0.9C6.68,14.13,6,15.21,6,16.39V18h12v-1.61C18,15.21,17.32,14.13,16.24,13.65z M8.07,16 c0.09-0.23,0.13-0.39,0.91-0.69c0.97-0.38,1.99-0.56,3.02-0.56s2.05,0.18,3.02,0.56c0.77,0.3,0.81,0.46,0.91,0.69H8.07z M12,8 c0.55,0,1,0.45,1,1s-0.45,1-1,1s-1-0.45-1-1S11.45,8,12,8 M12,6c-1.66,0-3,1.34-3,3c0,1.66,1.34,3,3,3s3-1.34,3-3 C15,7.34,13.66,6,12,6L12,6z"
/>
</g>
</svg>
</span>
</div>
<div
class=
"flex-grow"
>
<div
class=
"flex mb-1 items-start justify-between"
>
<h5
class=
"font-semibold mb-0 leading-none text-[1.25rem]"
>
4,026
</h5>
<div
class=
"text-success font-semibold"
>
<i
class=
"ri-arrow-up-s-fill me-1 align-middle"
></i>
+0.40%
</div>
</div>
<p
class=
"mb-0 text-[0.625rem] opacity-[0.7] text-[#8c9097] dark:text-white/50 font-semibold"
>
จำนวนพนักงานที่ยืม
</p>
</div>
</div>
</div>
</div>
</div>
<div
class=
"xxl:col-span-4 md:col-span-6 col-span-12"
>
<div
class=
"box"
>
<div
class=
"box-body !pb-[0.9rem]"
>
<div
class=
"flex items-start"
>
<div
class=
"me-3"
>
<span
class=
"avatar avatar-md p-2 bg-warning"
>
<svg
class=
"svg-white"
xmlns=
"http://www.w3.org/2000/svg"
height=
"24px"
viewBox=
"0 0 24 24"
width=
"24px"
fill=
"#000000"
>
<path
d=
"M0 0h24v24H0V0z"
fill=
"none"
/>
<path
d=
"M9.5,7h7C16.776123,7,17,6.776123,17,6.5S16.776123,6,16.5,6h-7C9.223877,6,9,6.223877,9,6.5S9.223877,7,9.5,7z M7.5,11h9c0.276123,0,0.5-0.223877,0.5-0.5S16.776123,10,16.5,10h-9C7.223877,10,7,10.223877,7,10.5S7.223877,11,7.5,11z M20.5,2H3.4993896C3.2234497,2.0001831,2.9998169,2.223999,3,2.5v19c-0.000061,0.1124268,0.0378418,0.2216187,0.1074829,0.3098755c0.1710205,0.2167358,0.4853516,0.2537231,0.7020874,0.0827026l2.8652344-2.2617188l2.3583984,1.7695312c0.1777954,0.1328125,0.421814,0.1328125,0.5996094,0L12,19.625l2.3671875,1.7753906c0.1777954,0.1328125,0.421814,0.1328125,0.5996094,0l2.3583984-1.7695312l2.8652344,2.2617188C20.2785034,21.9623413,20.3876343,22.0002441,20.5,22h0.0006104C20.7766113,21.9998169,21.0001831,21.7759399,21,21.5V2.4993896C20.9998169,2.2234497,20.776001,1.9998169,20.5,2z M20,20.46875l-2.3574219-1.8613281c-0.0882568-0.069519-0.1972656-0.1072998-0.3095703-0.1074219c-0.1080933-0.000061-0.2132568,0.0349121-0.2998047,0.0996094L14.6669922,20.375l-2.3671875-1.7753906c-0.1777954-0.1328125-0.421814-0.1328125-0.5996094,0L9.3330078,20.375l-2.3662109-1.7753906c-0.1817017-0.1348877-0.4311523-0.1317139-0.609375,0.0078125L4,20.46875V3h16V20.46875z M7.5,15h9c0.276123,0,0.5-0.223877,0.5-0.5S16.776123,14,16.5,14h-9C7.223877,14,7,14.223877,7,14.5S7.223877,15,7.5,15z"
/>
</svg>
</span>
</div>
<div
class=
"flex-grow"
>
<div
class=
"flex mb-1 items-start justify-between"
>
<h5
class=
"font-semibold mb-0 leading-none text-[1.25rem]"
>
48
</h5>
<div
class=
"text-success font-semibold"
>
<i
class=
"ri-arrow-up-s-fill me-1 align-middle"
></i>
+0.82%
</div>
</div>
<p
class=
"mb-0 text-[0.625rem] opacity-[0.7] text-[#8c9097] dark:text-white/50 font-semibold"
>
จำนวนรายการอุปการ์ทั้งหมด
</p>
</div>
</div>
</div>
</div>
</div>
<div
class=
"col-span-12"
>
<div
class=
"box overflow-hidden"
>
<div
class=
"box-header justify-between items-center flex-wrap gap-4"
>
<div
class=
"box-title"
>
จำนวนการยืมอุปกรณ์
</div>
<div
class=
"flex gap-4 flex-wrap"
>
<select>
<option
value=
""
>
ALL
</option>
<option
value=
""
>
มกราคม
</option>
<option
value=
""
>
กุมภาพันธ์
</option>
<option
value=
""
>
มีนาคม
</option>
<option
value=
""
>
เมษายน
</option>
</select>
<div
class=
"inline-flex rounded-md shadow-sm"
role=
"group"
aria-label=
"Basic example"
>
<button
type=
"button"
class=
"ti-btn-group !border-0 !text-xs !py-2 !px-3 ti-btn-primary"
>
1M
</button>
<button
type=
"button"
class=
"ti-btn-group !border-0 !text-xs !py-2 !px-3 ti-btn-primary"
>
3M
</button>
<button
type=
"button"
class=
"ti-btn-group !border-0 !text-xs !py-2 !px-3 ti-btn-primary"
>
6M
</button>
<button
type=
"button"
class=
"ti-btn-group !border-0 !text-xs !py-2 !px-3 ti-btn-primary-full !rounded-s-none !text-white"
>
1Y
</button>
</div>
</div>
</div>
<div
class=
"xl:col-span-12 col-span-12"
>
<div
class=
"box"
>
<div
class=
"box-body"
>
<div
id=
"audienceReport"
>
<apx-chart
[
series
]="
chartOptions
.
series
"
[
chart
]="
chartOptions
.
chart
"
[
yaxis
]="
chartOptions
.
yaxis
"
[
xaxis
]="
chartOptions
.
xaxis
"
[
labels
]="
chartOptions
.
labels
"
[
stroke
]="
chartOptions
.
stroke
"
[
plotOptions
]="
chartOptions
.
plotOptions
"
[
markers
]="
chartOptions
.
markers
"
[
fill
]="
chartOptions
.
fill
"
[
tooltip
]="
chartOptions
.
tooltip
"
[
legend
]="
chartOptions
.
legend
"
[
colors
]="
chartOptions
.
colors
"
></apx-chart>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"grid grid-cols-12 gap-x-6"
>
<!-- Candidates (Left Half) -->
<div
class=
"xxl:col-span-6 col-span-12"
>
<div
class=
"box overflow-hidden"
>
<div
class=
"box-header justify-between"
>
<div
class=
"box-title"
>
อุปกรณ์ที่ยืม
</div>
<div>
<div
class=
"flex gap-4 flex-wrap"
>
<select>
<option
value=
""
>
ALL
</option>
<option
value=
""
>
จอบ
</option>
<option
value=
""
>
เสียม
</option>
<option
value=
""
>
ตะปู
</option>
<option
value=
""
>
เครื่องขุด
</option>
</select>
</div>
</div>
</div>
<div
class=
"box-body !p-0"
>
<div
class=
"p-3"
>
<apx-chart
[
series
]="
optionsCircle1
.
series
"
[
chart
]="
optionsCircle1
.
chart
"
[
xaxis
]="
optionsCircle1
.
xaxis
"
[
colors
]="
optionsCircle1
.
colors
"
[
labels
]="
optionsCircle1
.
labels
"
[
legend
]="
optionsCircle1
.
legend
"
[
stroke
]="
optionsCircle1
.
stroke
"
[
tooltip
]="
optionsCircle1
.
tooltip
"
[
plotOptions
]="
optionsCircle1
.
plotOptions
"
[
dataLabels
]="
optionsCircle1
.
dataLabels
"
></apx-chart>
</div>
<div
class=
"grid grid-cols-2 border-t border-dashed dark:border-defaultborder/10"
>
<div
class=
"col p-4 border-e border-dashed dark:border-defaultborder/10 text-center"
>
<div
class=
"text-[#8c9097] dark:text-white/50 text-[0.75rem] mb-1"
>
การยืมทั้งหมด
</div>
<div
class=
"flex justify-center items-center"
>
<span
class=
"me-3 text-[1.625rem] font-semibold"
>
1,234
</span>
<span
class=
"text-success font-semibold"
><i
class=
"ri-arrow-up-s-fill me-1"
></i>
0.23%
</span
>
</div>
</div>
<div
class=
"col p-4 text-center"
>
<div
class=
"text-[#8c9097] dark:text-white/50 text-[0.75rem] mb-1"
>
การคืนทั้งหมด
</div>
<div
class=
"flex justify-center items-center"
>
<span
class=
"me-3 text-[1.625rem] font-semibold"
>
1,754
</span>
<span
class=
"text-danger font-semibold"
><i
class=
"ri-arrow-down-s-fill me-1"
></i>
0.11%
</span
>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Line Chart (Right Half) -->
<div
class=
"xxl:col-span-6 col-span-12"
>
<div
class=
"box custom-box"
>
<div
class=
"box-header"
>
<div
class=
"box-title"
>
แนวโน้มการยืม-คืนอุปกรณ์รายเดือน
</div>
</div>
<div
class=
"box-body"
>
<div
id=
"line-chart-datalabels"
class=
"chart-container"
>
<apx-chart
[
series
]="
chartOptions9
.
series
"
[
chart
]="
chartOptions9
.
chart
"
[
xaxis
]="
chartOptions9
.
xaxis
"
[
stroke
]="
chartOptions9
.
stroke
"
[
colors
]="
chartOptions9
.
colors
"
[
dataLabels
]="
chartOptions9
.
dataLabels
"
[
legend
]="
chartOptions9
.
legend
"
[
markers
]="
chartOptions9
.
markers
"
[
grid
]="
chartOptions9
.
grid
"
[
yaxis
]="
chartOptions9
.
yaxis
"
[
title
]="
chartOptions9
.
title
"
></apx-chart>
</div>
</div>
</div>
</div>
</div>
Web-Manage/src/app/DPU/company-management/home-installer/home-installer.component.ts
View file @
5e6ea45f
import
{
CommonModule
}
from
'@angular/common'
;
import
{
C
omponent
,
OnInit
}
from
'@angular/core'
;
import
{
C
hangeDetectorRef
,
Component
,
OnInit
,
Renderer2
,
ElementRef
}
from
'@angular/core'
;
import
{
NgApexchartsModule
}
from
'ng-apexcharts'
;
import
{
SharedModule
}
from
'../../../shared/shared.module'
;
import
{
TranslateModule
}
from
'@ngx-translate/core'
;
...
...
@@ -15,19 +15,745 @@ import { ProjectService } from '../../services/project.service';
imports
:
[
CommonModule
,
SharedModule
,
NgApexchartsModule
,
TranslateModule
],
styleUrls
:
[
'./home-installer.component.css'
]
})
export
class
HomeInstallerComponent
implements
OnInit
{
projectId
=
""
constructor
(
private
router
:
Router
,
private
route
:
ActivatedRoute
,
private
projectService
:
ProjectService
,
private
tokenService
:
TokenService
)
{
this
.
projectId
=
this
.
route
.
snapshot
.
paramMap
.
get
(
'projectId'
)
!
;
this
.
projectService
.
getById
(
this
.
projectId
).
subscribe
(
result
=>
{
console
.
log
(
"SAVEEE"
)
this
.
tokenService
.
saveSelectCompany
(
result
);
// this.router.navigate(["/company"]);
})
}
export
class
HomeInstallerComponent
{
chartOptions1
:
any
;
chartOptions2
:
any
;
chartOptions3
:
any
chartOptions
:
any
;
optionsCircle1
:
any
;
chartOptions4
:
any
;
optionsCircle2
:
any
;
optionsCircle3
:
any
ngOnInit
()
{
chartOptions5
:
any
;
chartOptions6
:
any
;
chartOptions7
:
any
;
chartOptions8
:
any
;
chartOptions9
:
any
}
chartOptions10
:
any
chartOptions11
:
any
chart3options
:
any
chart2options
:
any
chart1options
:
any
public
series
:
ApexAxisChartSeries
=
[];
public
chart
!
:
ApexChart
;
public
dataLabels
!
:
ApexDataLabels
;
public
markers
!
:
ApexMarkers
;
public
title
!
:
ApexTitleSubtitle
;
public
fill
!
:
ApexFill
;
public
yaxis
!
:
ApexYAxis
;
public
xaxis
!
:
ApexXAxis
;
public
tooltip
!
:
ApexTooltip
;
public
colors
!
:
any
;
public
commonOptions1
:
any
=
{
dataLabels
:
{
enabled
:
false
,
},
stroke
:
{
curve
:
'straight'
,
},
toolbar
:
{
tools
:
{
selection
:
false
,
},
},
markers
:
{
size
:
6
,
hover
:
{
size
:
10
,
},
},
tooltip
:
{
followCursor
:
false
,
theme
:
'dark'
,
x
:
{
show
:
false
,
},
marker
:
{
show
:
false
,
},
y
:
{
title
:
{
formatter
:
function
()
{
return
''
;
},
},
},
},
grid
:
{
clipMarkers
:
false
,
},
xaxis
:
{
type
:
'datetime'
,
},
};
constructor
(
private
el
:
ElementRef
,
private
renderer
:
Renderer2
,
private
cdr
:
ChangeDetectorRef
)
{
this
.
chartOptions9
=
{
series
:
[
{
name
:
'จำนวนการยืม'
,
data
:
[
40
,
55
,
60
,
80
,
70
,
65
,
90
]
},
{
name
:
'จำนวนการคืน'
,
data
:
[
30
,
50
,
58
,
75
,
68
,
63
,
85
]
}
],
chart
:
{
height
:
320
,
type
:
'line'
,
dropShadow
:
{
enabled
:
true
,
color
:
'#000'
,
top
:
18
,
left
:
7
,
blur
:
10
,
opacity
:
0.2
},
toolbar
:
{
show
:
false
},
events
:
{
mounted
:
(
chart
:
any
)
=>
{
chart
.
windowResizeHandler
();
}
},
},
colors
:
[
'#845adf'
,
'#23b7e5'
],
dataLabels
:
{
enabled
:
true
},
stroke
:
{
curve
:
'smooth'
},
title
:
{
text
:
''
,
align
:
'left'
,
style
:
{
fontSize
:
'13px'
,
fontWeight
:
'bold'
,
color
:
'#8c9097'
},
},
grid
:
{
borderColor
:
'#f2f5f7'
,
},
markers
:
{
size
:
3
},
xaxis
:
{
categories
:
[
'ม.ค.'
,
'ก.พ.'
,
'มี.ค.'
,
'เม.ย.'
,
'พ.ค.'
,
'มิ.ย.'
,
'ก.ค.'
],
title
:
{
text
:
'เดือน'
,
style
:
{
color
:
"#8c9097"
,
fontSize
:
'13px'
,
fontWeight
:
'bold'
,
}
},
labels
:
{
style
:
{
colors
:
"#8c9097"
,
fontSize
:
'11px'
,
fontWeight
:
600
}
},
},
yaxis
:
{
title
:
{
text
:
'จำนวนครั้ง'
,
style
:
{
color
:
"#8c9097"
,
fontSize
:
'13px'
,
fontWeight
:
'bold'
,
}
},
labels
:
{
style
:
{
colors
:
"#8c9097"
,
fontSize
:
'11px'
,
fontWeight
:
600
}
},
min
:
0
,
max
:
100
},
legend
:
{
position
:
'top'
,
horizontalAlign
:
'right'
,
floating
:
true
,
offsetY
:
-
25
,
offsetX
:
-
5
}
};
this
.
chartOptions2
=
{
series
:
[
{
name
:
"High - 2013"
,
data
:
[
28
,
29
,
33
,
36
,
32
,
32
,
33
]
},
{
name
:
"Low - 2013"
,
data
:
[
12
,
11
,
14
,
18
,
17
,
13
,
13
]
}
],
chart
:
{
height
:
320
,
type
:
'line'
,
dropShadow
:
{
enabled
:
true
,
color
:
'#000'
,
top
:
18
,
left
:
7
,
blur
:
10
,
opacity
:
0.2
},
toolbar
:
{
show
:
false
},
events
:
{
mounted
:
(
chart
:
any
)
=>
{
chart
.
windowResizeHandler
();
}
},
},
colors
:
[
'#845adf'
,
'#23b7e5'
],
dataLabels
:
{
enabled
:
true
,
},
stroke
:
{
curve
:
'smooth'
},
title
:
{
text
:
'Average High & Low Temperature'
,
align
:
'left'
,
style
:
{
fontSize
:
'13px'
,
fontWeight
:
'bold'
,
color
:
'#8c9097'
},
},
grid
:
{
borderColor
:
'#f2f5f7'
,
},
markers
:
{
size
:
1
},
xaxis
:
{
categories
:
[
'Jan'
,
'Feb'
,
'Mar'
,
'Apr'
,
'May'
,
'Jun'
,
'Jul'
],
title
:
{
text
:
'Month'
,
style
:
{
color
:
"#8c9097"
,
fontSize
:
'13px'
,
fontWeight
:
'bold'
,
}
},
labels
:
{
show
:
true
,
style
:
{
colors
:
"#8c9097"
,
fontSize
:
'11px'
,
fontWeight
:
600
,
cssClass
:
'apexcharts-xaxis-label'
,
},
},
},
yaxis
:
{
title
:
{
text
:
'Temperature'
,
style
:
{
color
:
"#8c9097"
,
fontSize
:
'13px'
,
fontWeight
:
'bold'
,
}
},
labels
:
{
show
:
true
,
style
:
{
colors
:
"#8c9097"
,
fontSize
:
'11px'
,
fontWeight
:
600
,
cssClass
:
'apexcharts-yaxis-label'
,
},
},
min
:
5
,
max
:
40
},
legend
:
{
position
:
'top'
,
horizontalAlign
:
'right'
,
floating
:
true
,
offsetY
:
-
25
,
offsetX
:
-
5
}
}
this
.
chartOptions1
=
{
chart
:
{
type
:
'line'
,
height
:
40
,
width
:
120
,
sparkline
:
{
enabled
:
true
},
dropShadow
:
{
enabled
:
true
,
top
:
0
,
left
:
0
,
blur
:
3
,
color
:
'#000'
,
opacity
:
0.1
},
},
grid
:
{
show
:
false
,
xaxis
:
{
lines
:
{
show
:
false
}
},
yaxis
:
{
lines
:
{
show
:
false
}
},
},
stroke
:
{
show
:
true
,
curve
:
'straight'
,
lineCap
:
'butt'
,
width
:
1.5
,
dashArray
:
0
,
},
fill
:
{
gradient
:
{
enabled
:
false
}
},
series
:
[{
name
:
'Value'
,
data
:
[
0
,
21
,
54
,
38
,
56
,
24
,
65
]
}],
yaxis
:
{
min
:
0
,
show
:
false
},
xaxis
:
{
show
:
false
,
axisTicks
:
{
show
:
false
,
axisBorder
:
{
show
:
false
},
},
axisBorder
:
{
show
:
false
}
},
colors
:
[
'#23b7e5'
],
}
this
.
chartOptions2
=
{
chart
:
{
type
:
'line'
,
height
:
45
,
sparkline
:
{
enabled
:
true
},
dropShadow
:
{
enabled
:
true
,
top
:
0
,
left
:
0
,
blur
:
1
,
color
:
'#fff'
,
opacity
:
0.05
}
},
stroke
:
{
show
:
true
,
curve
:
'smooth'
,
lineCap
:
'butt'
,
width
:
2
,
dashArray
:
0
,
},
fill
:
{
gradient
:
{
enabled
:
false
}
},
series
:
[{
name
:
'Value'
,
data
:
[
54
,
38
,
56
,
35
,
65
,
43
,
53
,
45
,
62
,
80
,
35
,
48
]
}],
yaxis
:
{
min
:
0
,
show
:
false
,
axisBorder
:
{
show
:
false
},
},
xaxis
:
{
axisBorder
:
{
show
:
false
},
},
colors
:
[
"rgba(132, 90, 223, 0.1)"
],
tooltip
:
{
enabled
:
false
,
}
}
this
.
optionsCircle1
=
{
series
:
[
1754
,
1234
,
878
,
270
],
labels
:
[
"Mobile"
,
"Tablet"
,
"Desktop"
,
"Others"
],
chart
:
{
height
:
250
,
type
:
'donut'
,
},
dataLabels
:
{
enabled
:
false
,
},
legend
:
{
show
:
false
,
},
stroke
:
{
show
:
true
,
curve
:
'smooth'
,
lineCap
:
'round'
,
colors
:
[
"#fff"
],
width
:
0
,
dashArray
:
0
,
},
plotOptions
:
{
pie
:
{
expandOnClick
:
false
,
donut
:
{
size
:
'80%'
,
background
:
'transparent'
,
labels
:
{
show
:
true
,
name
:
{
show
:
true
,
fontSize
:
'20px'
,
color
:
'#495057'
,
offsetY
:
-
4
},
value
:
{
show
:
true
,
fontSize
:
'18px'
,
offsetY
:
8
,
formatter
:
function
(
val
:
string
)
{
return
val
+
"%"
;
}
},
total
:
{
show
:
true
,
showAlways
:
true
,
label
:
'Total'
,
fontSize
:
'22px'
,
fontWeight
:
600
,
color
:
'#495057'
,
}
}
},
},
},
colors
:
[
"rgba(132, 90, 223, 1)"
,
"rgba(35, 183, 229, 1)"
,
"rgba(38, 191, 148, 1)"
,
"rgba(245, 184, 73, 1)"
,],
};
this
.
chartOptions
=
{
series
:
[
{
name
:
'จำนวนการยืม'
,
type
:
'column'
,
data
:
[
23
,
11
,
22
,
27
,
13
,
22
,
37
,
21
,
44
,
22
,
45
,
35
],
},
],
chart
:
{
toolbar
:
{
show
:
false
,
},
type
:
'line'
,
height
:
250
,
},
grid
:
{
borderColor
:
'#f1f1f1'
,
strokeDashArray
:
3
,
},
labels
:
[
'Jan'
,
'Feb'
,
'Mar'
,
'Apr'
,
'May'
,
'Jun'
,
'Jul'
,
'Aug'
,
'Sep'
,
'Oct'
,
'Nov'
,
'Dec'
,
],
dataLabels
:
{
enabled
:
false
,
},
stroke
:
{
width
:
[
1
,
1.1
],
curve
:
[
'straight'
,
'smooth'
],
},
legend
:
{
show
:
true
,
position
:
'top'
,
},
xaxis
:
{
axisBorder
:
{
color
:
'#e9e9e9'
,
},
},
plotOptions
:
{
bar
:
{
columnWidth
:
'20%'
,
borderRadius
:
2
,
},
},
colors
:
[
"rgba(132, 90, 223, 1)"
,
'#23b7e5'
],
};
this
.
chartOptions3
=
{
series
:
[
{
name
:
'Session'
,
data
:
[
24
,
23
,
20
,
25
,
27
,
26
,
24
,
23
,
23
,
25
,
23
,
23
],
type
:
'line'
,
},
{
name
:
'Bounce Rate'
,
data
:
[
20
,
23
,
26
,
22
,
20
,
26
,
28
,
26
,
22
,
27
,
25
,
26
],
type
:
'bar'
,
},
],
chart
:
{
height
:
328
,
zoom
:
{
enabled
:
false
},
},
dataLabels
:
{
enabled
:
false
,
},
grid
:
{
borderColor
:
'#f1f1f1'
,
strokeDashArray
:
3
},
legend
:
{
show
:
true
,
position
:
'top'
,
},
plotOptions
:
{
bar
:
{
borderRadius
:
5
,
columnWidth
:
"40%"
,
dataLabels
:
{
position
:
'top'
,
// top, center, bottom
},
}
},
colors
:
[
"rgb(132, 90, 223)"
,
"#ededed"
],
stroke
:
{
curve
:
[
'smooth'
,
'stepline'
],
width
:
[
2
,
0
],
},
xaxis
:
{
categories
:
[
'Jan'
,
'Feb'
,
'Mar'
,
'Apr'
,
'May'
,
'Jun'
,
'Jul'
,
'Aug'
,
'Sep'
,
'Oct'
,
'Nov'
,
'Dec'
],
axisBorder
:
{
color
:
'#e9e9e9'
,
},
}
};
this
.
chartOptions4
=
{
series
:
[
{
name
:
'New Users'
,
data
:
[
32
,
15
,
63
,
51
,
36
,
62
,
99
,
42
,
78
,
76
,
32
,
120
],
},
{
name
:
'Sessions'
,
data
:
[
56
,
58
,
38
,
50
,
64
,
45
,
55
,
32
,
15
,
63
,
51
,
136
],
},
{
name
:
'Avg Session Duration'
,
data
:
[
48
,
29
,
50
,
69
,
20
,
59
,
52
,
12
,
48
,
28
,
17
,
98
],
},
],
chart
:
{
height
:
425
,
type
:
'line'
,
toolbar
:
{
show
:
false
,
},
background
:
'none'
,
fill
:
'#fff'
,
},
grid
:
{
borderColor
:
'#f2f6f7'
,
},
colors
:
[
'rgb(132, 90, 223)'
,
'#23b7e5'
,
'#f5b849'
],
background
:
'transparent'
,
dataLabels
:
{
enabled
:
false
,
},
stroke
:
{
curve
:
'straight'
,
width
:
3
,
},
legend
:
{
show
:
true
,
position
:
'top'
,
},
xaxis
:
{
categories
:
[
'Jan'
,
'Feb'
,
'Mar'
,
'Apr'
,
'May'
,
'Jun'
,
'Jul'
,
'Aug'
,
'Sep'
,
'Oct'
,
'Nov'
,
'Dec'
,
],
show
:
false
,
axisBorder
:
{
show
:
false
,
color
:
'rgba(119, 119, 142, 0.05)'
,
offsetX
:
0
,
offsetY
:
0
,
},
axisTicks
:
{
show
:
false
,
borderType
:
'solid'
,
color
:
'rgba(119, 119, 142, 0.05)'
,
width
:
6
,
offsetX
:
0
,
offsetY
:
0
,
},
labels
:
{
rotate
:
-
90
,
},
},
yaxis
:
{
show
:
false
,
axisBorder
:
{
show
:
false
,
},
axisTicks
:
{
show
:
false
,
},
},
tooltip
:
{
x
:
{
format
:
'dd/MM/yy HH:mm'
,
},
},
};
this
.
optionsCircle2
=
{
chart
:
{
height
:
120
,
width
:
100
,
type
:
"radialBar"
,
},
series
:
[
48
],
colors
:
[
"#23b7e5"
],
plotOptions
:
{
radialBar
:
{
hollow
:
{
margin
:
0
,
size
:
"50%"
,
background
:
"#fff"
},
dataLabels
:
{
name
:
{
offsetY
:
-
10
,
color
:
"#4b9bfa"
,
fontSize
:
"10px"
,
show
:
false
},
value
:
{
offsetY
:
5
,
color
:
"#4b9bfa"
,
fontSize
:
"12px"
,
show
:
true
,
fontWeight
:
800
}
}
}
},
stroke
:
{
lineCap
:
"round"
},
labels
:
[
"Followers"
]
}
this
.
optionsCircle3
=
{
chart
:
{
height
:
120
,
width
:
100
,
type
:
"radialBar"
,
},
series
:
[
65
],
colors
:
[
"#ffc107"
],
plotOptions
:
{
radialBar
:
{
hollow
:
{
margin
:
0
,
size
:
"50%"
,
background
:
"#fff"
},
dataLabels
:
{
name
:
{
offsetY
:
-
10
,
color
:
"#4b9bfa"
,
fontSize
:
"10px"
,
show
:
false
},
value
:
{
offsetY
:
5
,
color
:
"#4b9bfa"
,
fontSize
:
"12px"
,
show
:
true
,
fontWeight
:
800
},
}
}
},
stroke
:
{
lineCap
:
"round"
},
labels
:
[
"Views"
]
}
}
}
Web-Manage/src/app/shared/components/header/header.component.html
View file @
5e6ea45f
...
...
@@ -52,7 +52,7 @@
<!--Header Notifictaion -->
<!--
<div
<div
class=
"header-element py-[1rem] md:px-[0.65rem] px-2 notifications-dropdown header-notification hs-dropdown ti-dropdown !hidden md:!block [--placement:bottom-left]"
>
<button
id=
"dropdown-notification"
type=
"button"
class=
"hs-dropdown-toggle relative ti-dropdown-toggle !p-0 !border-0 flex-shrink-0 !rounded-full !shadow-none align-middle text-xs"
>
...
...
@@ -72,10 +72,10 @@
<div
class=
"ti-dropdown-header !m-0 !p-4 !bg-transparent flex justify-between items-center"
>
<p
class=
"mb-0 text-[1.0625rem] text-defaulttextcolor font-semibold dark:text-[#8c9097] dark:text-white/50"
>
Notifications
</p>
แจ้งเตือน
</p>
<span
class=
"text-[0.75em] py-[0.25rem/2] px-[0.45rem] font-[600] rounded-sm bg-secondary/10 text-secondary"
id="notifiation-data">{{ notificationCount }}
Unread
</span>
id=
"notifiation-data"
>
{{ notificationCount }}
รายการ
</span>
</div>
<div
class=
"dropdown-divider"
></div>
<ul
class=
"list-none !m-0 !p-0 end-0"
id=
"header-notification-scroll"
(
click
)="
handleCardClick
($
event
)"
>
...
...
@@ -225,7 +225,7 @@
</div>
</div>
</div>
</div>
-->
</div>
<!--End Header Notifictaion -->
<!-- Related Apps -->
...
...
Web-Manage/src/app/shared/services/nav.service.ts
View file @
5e6ea45f
...
...
@@ -152,7 +152,7 @@ export class NavService implements OnDestroy {
{
headTitle
:
'จัดการโครงการ'
},
{
icon
:
'home'
,
path
:
'/company/home'
,
path
:
'/company/home
/:projectId
'
,
title
:
'หน้าแรก'
,
type
:
'link'
,
selected
:
false
,
...
...
@@ -192,7 +192,7 @@ export class NavService implements OnDestroy {
active
:
false
,
Menusub
:
true
,
children
:
[
{
path
:
'/company/emp-borrow
-status
'
,
title
:
'อุปกรณ์ที่ซ่อม/ชำรุด'
,
type
:
'link'
},
{
path
:
'/company/emp-borrow
repair
'
,
title
:
'อุปกรณ์ที่ซ่อม/ชำรุด'
,
type
:
'link'
},
],
},
];
...
...
@@ -204,6 +204,15 @@ export class NavService implements OnDestroy {
{
headTitle
:
'จัดการบริษัท'
},
// { headTitle: 'User Management' }
{
icon
:
'home'
,
path
:
'/company/home/:projectId'
,
title
:
'หน้าแรก'
,
type
:
'link'
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
},
{
title
:
'หน้าทำรายการ'
,
icon
:
'time'
,
type
:
'sub'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment