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
37fd070b
Commit
37fd070b
authored
Nov 29, 2021
by
Chanachai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edit ภาษาและaddปุ่มค้นหา
parent
51383543
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
274 additions
and
56 deletions
+274
-56
admin-pending.component.html
src/app/pages/admin-pending/admin-pending.component.html
+15
-15
equipment.component.html
src/app/pages/equipment/equipment.component.html
+49
-15
lend-page.component.html
src/app/pages/lend-page/lend-page.component.html
+9
-8
pending.component.html
src/app/pages/pending/pending.component.html
+179
-17
pending.component.ts
src/app/pages/pending/pending.component.ts
+22
-1
No files found.
src/app/pages/admin-pending/admin-pending.component.html
View file @
37fd070b
...
@@ -75,13 +75,13 @@
...
@@ -75,13 +75,13 @@
<thead>
<thead>
<tr>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
Catagory
</th>
<th
scope=
"col"
>
หมวดหมู่
</th>
<th
scope=
"col"
>
Type
</th>
<th
scope=
"col"
>
ประเภท
</th>
<th
scope=
"col"
>
Detail
</th>
<th
scope=
"col"
>
รายละเอียด
</th>
<th
scope=
"col"
>
Name
</th>
<th
scope=
"col"
>
ชื่อ
</th>
<th
scope=
"col"
>
Start-Date
</th>
<th
scope=
"col"
>
วันที่เริ่มต้น
</th>
<th
scope=
"col"
>
End-Date
</th>
<th
scope=
"col"
>
วันที่สิ้นสุด
</th>
<th
scope=
"col"
>
Status
</th>
<th
scope=
"col"
>
สถานะ
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -134,14 +134,14 @@
...
@@ -134,14 +134,14 @@
<thead>
<thead>
<tr>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
Catagory
</th>
<th
scope=
"col"
>
หมวดหมู่
</th>
<th
scope=
"col"
>
Type
</th>
<th
scope=
"col"
>
ประเภท
</th>
<th
scope=
"col"
>
Detail
</th>
<th
scope=
"col"
>
รายละเอียด
</th>
<th
scope=
"col"
>
Name
</th>
<th
scope=
"col"
>
ชื่อ
</th>
<th
scope=
"col"
>
Start-Date
</th>
<th
scope=
"col"
>
วันที่เริ่มต้น
</th>
<th
scope=
"col"
>
End-Date
</th>
<th
scope=
"col"
>
วันที่สิ้นสุด
</th>
<th
scope=
"col"
>
Quantity
</th>
<th
scope=
"col"
>
จำนวน
</th>
<th
scope=
"col"
>
Status
</th>
<th
scope=
"col"
>
สถานะ
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
...
src/app/pages/equipment/equipment.component.html
View file @
37fd070b
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
<div
class=
"text-center"
>
<div
class=
"text-center"
>
<div
class=
"d-grid gap-2 a-md-flex justify-content-md-end "
>
<div
class=
"d-grid gap-2 a-md-flex justify-content-md-end "
>
<button
class=
"btn btn-sm btn-outline-primary"
<button
class=
"btn btn-sm btn-outline-primary"
(
click
)="
open
(
Room
)"
>
ยืม
</button>
(
click
)="
open
(
Room
)"
>
จอง
</button>
<button
class=
"btn btn-sm btn-primary"
type=
"button"
>
ยกเลิก
</button>
<button
class=
"btn btn-sm btn-primary"
type=
"button"
>
ยกเลิก
</button>
</div>
</div>
</div>
</div>
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
<div
class=
" row"
>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<div
class=
" form-group"
>
<label>
Name
</label>
<label>
ชื่อ
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
<input
class=
" form-control"
placeholder=
""
type=
"text"
value=
""
/>
value=
""
/>
</div>
</div>
...
@@ -91,11 +91,11 @@
...
@@ -91,11 +91,11 @@
<div
class=
" row"
>
<div
class=
" row"
>
<div
class=
" col-md-6 mb-2"
>
<div
class=
" col-md-6 mb-2"
>
<div
class=
" form-group"
>
<div
class=
" form-group"
>
<label>
Category
</label>
<label>
หมวดหมู่
</label>
<br>
<br>
<select
class=
"form-select"
<select
class=
"form-select"
aria-label=
"Default select example"
>
aria-label=
"Default select example"
>
<option
selected
>
Open this select type
</option>
<option
selected
>
เลือกหมวดหมู่
</option>
<option
value=
"4"
>
IT
</option>
<option
value=
"4"
>
IT
</option>
<option
value=
"5"
>
Company
</option>
<option
value=
"5"
>
Company
</option>
</select>
</select>
...
@@ -105,7 +105,7 @@
...
@@ -105,7 +105,7 @@
<div
class=
" row"
>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<div
class=
" form-group"
>
<label>
Details
</label>
<label>
รายละเอียด
</label>
<textarea
class=
"form-control"
<textarea
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
id=
"exampleFormControlTextarea1"
rows=
"3"
placeholder=
"......"
></textarea>
placeholder=
"......"
></textarea>
...
@@ -145,7 +145,7 @@
...
@@ -145,7 +145,7 @@
<div
class=
"text-center"
>
<div
class=
"text-center"
>
<div
class=
"d-grid gap-2 a-md-flex justify-content-md-end"
>
<div
class=
"d-grid gap-2 a-md-flex justify-content-md-end"
>
<button
class=
"btn btn-sm btn-outline-primary"
<button
class=
"btn btn-sm btn-outline-primary"
(
click
)="
open
(
lend
)"
>
ยืม
</button>
(
click
)="
open
(
lend
)"
>
เบิก
</button>
<button
class=
"btn btn-sm btn-primary"
type=
"button"
>
ยกเลิก
</button>
<button
class=
"btn btn-sm btn-primary"
type=
"button"
>
ยกเลิก
</button>
</div>
</div>
</div>
</div>
...
@@ -187,7 +187,7 @@
...
@@ -187,7 +187,7 @@
<div
class=
" row"
>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<div
class=
" form-group"
>
<label>
Name
</label>
<label>
ชื่อ
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
value=
""
/>
<input
class=
" form-control"
placeholder=
""
type=
"text"
value=
""
/>
</div>
</div>
</div>
</div>
...
@@ -195,12 +195,12 @@
...
@@ -195,12 +195,12 @@
<div
class=
" row"
>
<div
class=
" row"
>
<div
class=
" col-md-6 mb-2"
>
<div
class=
" col-md-6 mb-2"
>
<div
class=
" form-group"
>
<div
class=
" form-group"
>
<label>
Type
</label>
<label>
ประเภท
</label>
<br>
<br>
<select
class=
"form-select"
aria-label=
"Default select example"
>
<select
class=
"form-select"
aria-label=
"Default select example"
>
<option
selected
>
Open this select type
</option>
<option
selected
>
เลือกประเภท
</option>
<option
value=
"1"
>
Rooms
</option>
<option
value=
"1"
>
ห้อง
</option>
<option
value=
"2"
>
Cars
</option>
<option
value=
"2"
>
รถ
</option>
</select>
</select>
</div>
</div>
</div>
</div>
...
@@ -208,7 +208,7 @@
...
@@ -208,7 +208,7 @@
<div
class=
" row"
>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<div
class=
" form-group"
>
<label>
Details
</label>
<label>
รายละเอียด
</label>
<textarea
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
<textarea
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
placeholder=
"......"
></textarea>
placeholder=
"......"
></textarea>
</div>
</div>
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
<div
class=
" col-md-12"
>
<div
class=
" col-md-12"
>
<div
class=
"card"
>
<div
class=
"card"
>
<div
class=
" card-header"
>
<div
class=
" card-header"
>
<h5
class=
" title"
>
Booking
</h5>
<h5
class=
" title"
>
การจอง
</h5>
</div>
</div>
<div
class=
" card-body"
>
<div
class=
" card-body"
>
<form>
<form>
...
@@ -242,6 +242,14 @@
...
@@ -242,6 +242,14 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<label>
เบอร์โทร
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
value=
""
/>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-sm-12 mb-1"
>
<div
class=
"col-sm-12 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
ชื่อห้อง
</label>
<label
for=
"exampleFormControlSelect1"
>
ชื่อห้อง
</label>
...
@@ -256,7 +264,7 @@
...
@@ -256,7 +264,7 @@
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-6 mb-1"
>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่เริ่ม
ใช้
</label>
<label
for=
"exampleFormControlSelect1"
>
วันที่เริ่ม
ต้น
</label>
<input
type=
"date"
class=
"form-control"
value=
""
>
<input
type=
"date"
class=
"form-control"
value=
""
>
</div>
</div>
<div
class=
"col-6 mb-1"
>
<div
class=
"col-6 mb-1"
>
...
@@ -274,6 +282,15 @@
...
@@ -274,6 +282,15 @@
<ngb-timepicker
[(
ngModel
)]="
time
"
></ngb-timepicker>
<ngb-timepicker
[(
ngModel
)]="
time
"
></ngb-timepicker>
</div>
</div>
</div>
</div>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<label>
หมายเหตุ
</label>
<textarea
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
placeholder=
"......"
></textarea>
</div>
</div>
</div>
</form>
</form>
</div>
</div>
<div
class=
" card-footer"
>
<div
class=
" card-footer"
>
...
@@ -300,6 +317,14 @@
...
@@ -300,6 +317,14 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<label>
เบอร์โทร
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
value=
""
/>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-sm-12 mb-1"
>
<div
class=
"col-sm-12 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
ชื่ออุปกรณ์
</label>
<label
for=
"exampleFormControlSelect1"
>
ชื่ออุปกรณ์
</label>
...
@@ -314,7 +339,7 @@
...
@@ -314,7 +339,7 @@
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-6 mb-1"
>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่เริ่ม
ใช้
</label>
<label
for=
"exampleFormControlSelect1"
>
วันที่เริ่ม
ต้น
</label>
<input
type=
"date"
class=
"form-control"
value=
""
>
<input
type=
"date"
class=
"form-control"
value=
""
>
</div>
</div>
<div
class=
"col-6 mb-1"
>
<div
class=
"col-6 mb-1"
>
...
@@ -339,6 +364,15 @@
...
@@ -339,6 +364,15 @@
[(
ngModel
)]="
quantity
"
/>
[(
ngModel
)]="
quantity
"
/>
</div>
</div>
</div>
</div>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<label>
หมายเหตุ
</label>
<textarea
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
placeholder=
"......"
></textarea>
</div>
</div>
</div>
</form>
</form>
</div>
</div>
<div
class=
" card-footer"
>
<div
class=
" card-footer"
>
...
...
src/app/pages/lend-page/lend-page.component.html
View file @
37fd070b
...
@@ -7,13 +7,13 @@
...
@@ -7,13 +7,13 @@
<thead>
<thead>
<tr>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
Catagory
</th>
<th
scope=
"col"
>
หมวดหมู่
</th>
<th
scope=
"col"
>
Type
</th>
<th
scope=
"col"
>
ประเภท
</th>
<th
scope=
"col"
>
Detail
</th>
<th
scope=
"col"
>
รายละเอียด
</th>
<th
scope=
"col"
>
Name
</th>
<th
scope=
"col"
>
ชื่อ
</th>
<th
scope=
"col"
>
Start-Date
</th>
<th
scope=
"col"
>
วันที่เริ่มต้น
</th>
<th
scope=
"col"
>
End-Date
</th>
<th
scope=
"col"
>
วันที่สิ้นสุด
</th>
<th
scope=
"col"
>
Quantity
</th>
<th
scope=
"col"
>
จำนวน
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -26,7 +26,8 @@
...
@@ -26,7 +26,8 @@
<td>
{{ country.sdate | date:'dd-MM-yyyy' }}
</td>
<td>
{{ country.sdate | date:'dd-MM-yyyy' }}
</td>
<td>
{{ country.edate | date:'dd-MM-yyyy' }}
</td>
<td>
{{ country.edate | date:'dd-MM-yyyy' }}
</td>
<td>
<td>
<button
class=
"btn btn-primary btn-sm"
(
click
)="
_increamentQTY
(
item
.
productId
.
_id
,
1
)"
>
+
</button>
<button
class=
"btn btn-primary btn-sm"
(
click
)="
_increamentQTY
(
item
.
productId
.
_id
,
1
)"
>
+
</button>
{{ country.quantity }}
{{ country.quantity }}
<button
class=
"btn btn-primary btn-sm"
>
-
</button>
<button
class=
"btn btn-primary btn-sm"
>
-
</button>
</td>
</td>
...
...
src/app/pages/pending/pending.component.html
View file @
37fd070b
...
@@ -76,13 +76,13 @@
...
@@ -76,13 +76,13 @@
<thead>
<thead>
<tr>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
Catagory
</th>
<th
scope=
"col"
>
หมวดหมู่
</th>
<th
scope=
"col"
>
Type
</th>
<th
scope=
"col"
>
ประเภท
</th>
<th
scope=
"col"
>
Detail
</th>
<th
scope=
"col"
>
รายละเอียด
</th>
<th
scope=
"col"
>
Name
</th>
<th
scope=
"col"
>
ชื่อ
</th>
<th
scope=
"col"
>
Start-Date
</th>
<th
scope=
"col"
>
วันที่เริ่มต้น
</th>
<th
scope=
"col"
>
End-Date
</th>
<th
scope=
"col"
>
วันที่สิ้นสุด
</th>
<th
scope=
"col"
>
Status
</th>
<th
scope=
"col"
>
สถานะ
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -95,6 +95,10 @@
...
@@ -95,6 +95,10 @@
<td>
{{ country.sdate | date:'dd-MM-yyyy' }} {{ country.stime }}
</td>
<td>
{{ country.sdate | date:'dd-MM-yyyy' }} {{ country.stime }}
</td>
<td>
{{ country.edate | date:'dd-MM-yyyy' }} {{ country.etime }}
</td>
<td>
{{ country.edate | date:'dd-MM-yyyy' }} {{ country.etime }}
</td>
<td>
{{ country.status }}
</td>
<td>
{{ country.status }}
</td>
<div
class=
"col-auto align-self-sm-center"
>
<button
type=
"button"
class=
"btn btn-info btn-sm btn-circle "
style=
"line-height: 0px"
(
click
)="
open
(
Room
)"
><i
class=
"fa fa-search"
></i>
</button>
</div>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
...
@@ -129,14 +133,14 @@
...
@@ -129,14 +133,14 @@
<thead>
<thead>
<tr>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
Catagory
</th>
<th
scope=
"col"
>
หมวดหมู่
</th>
<th
scope=
"col"
>
Type
</th>
<th
scope=
"col"
>
ประเภท
</th>
<th
scope=
"col"
>
Detail
</th>
<th
scope=
"col"
>
รายละเอียด
</th>
<th
scope=
"col"
>
Name
</th>
<th
scope=
"col"
>
ชื่อ
</th>
<th
scope=
"col"
>
Start-Date
</th>
<th
scope=
"col"
>
วันที่เริ่มใช้
</th>
<th
scope=
"col"
>
End-Date
</th>
<th
scope=
"col"
>
วันที่สิ้นสุด
</th>
<th
scope=
"col"
>
Quantity
</th>
<th
scope=
"col"
>
จำนวน
</th>
<th
scope=
"col"
>
Status
</th>
<th
scope=
"col"
>
สถานะ
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -150,6 +154,10 @@
...
@@ -150,6 +154,10 @@
<td>
{{ country.edate | date:'dd-MM-yyyy' }} {{ country.etime }}
</td>
<td>
{{ country.edate | date:'dd-MM-yyyy' }} {{ country.etime }}
</td>
<td>
{{ country.quantity }}
</td>
<td>
{{ country.quantity }}
</td>
<td>
{{ country.status }}
</td>
<td>
{{ country.status }}
</td>
<div
class=
"col-auto align-self-sm-center"
>
<button
type=
"button"
class=
"btn btn-info btn-sm btn-circle "
style=
"line-height: 0px"
(
click
)="
open
(
lend
)"
><i
class=
"fa fa-search"
></i>
</button>
</div>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
...
@@ -174,8 +182,163 @@
...
@@ -174,8 +182,163 @@
</li>
</li>
</ul>
</ul>
<div
[
ngbNavOutlet
]="
nav
"
></div>
<div
[
ngbNavOutlet
]="
nav
"
></div>
</div>
<ng-template
#
Room
let-modal
style=
"padding: 0; "
>
<div
class=
" col-md-12"
>
<div
class=
"card"
>
<div
class=
" card-header"
>
<h5
class=
" title"
>
การจอง
</h5>
</div>
<div
class=
" card-body"
>
<form>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<label>
ชื่อผู้จอง
</label>
<input
readonly
class=
" form-control"
placeholder=
""
type=
"text"
value=
""
/>
</div>
</div>
</div>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<label>
เบอร์โทร
</label>
<input
readonly
class=
" form-control"
placeholder=
""
type=
"text"
value=
""
/>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-12 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
ชื่อห้อง
</label>
<input
readonly
class=
"form-control"
type=
"text"
value=
"{{item.rname}}"
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-12 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
รายละเอียด
</label>
<input
readonly
class=
"form-control"
type=
"text"
value=
"{{item.rdecs}}"
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่เริ่มต้น
</label>
<input
readonly
type=
"date"
class=
"form-control"
value=
""
>
</div>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่สิ้นสุด
</label>
<input
readonly
type=
"date"
class=
"form-control"
value=
""
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
เวลาที่เริ่มต้น
</label>
<input
readonly
class=
"form-control"
type=
"text"
value=
"{{country.stime}}"
>
</div>
<div
class=
"col-6 mb-1"
>
<label
[
readonly
]
for=
"exampleFormControlSelect1"
>
เวลาที่สิ้นสุด
</label>
<input
readonly
class=
"form-control"
type=
"text"
value=
"{{country.etime}}"
>
</div>
</div>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<label>
หมายเหตุ
</label>
<textarea
readonly
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
placeholder=
"......"
></textarea>
</div>
</div>
</div>
</form>
</div>
<div
class=
" card-footer"
>
<button
class=
" btn btn-fill btn-danger"
type=
"submit"
>
Save
</button>
<button
class=
" btn btn-fill btn-danger"
type=
"close"
>
Cancel
</button>
</div>
</div>
</div>
</ng-template>
<ng-template
#
lend
let-modal
style=
"padding: 0; "
>
<div
class=
" col-md-12"
>
<div
class=
"card"
>
<div
class=
" card-header"
>
<h5
class=
" title"
>
Lend Equirment
</h5>
</div>
<div
class=
" card-body"
>
<form>
<div
class=
" row"
>
<div
class=
" col-sm-12 mb-1"
>
<div
class=
" form-group"
>
<label>
ชื่อผู้จอง
</label>
<input
readonly
class=
" form-control"
placeholder=
""
type=
"text"
value=
""
/>
</div>
</div>
</div>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<label>
เบอร์โทร
</label>
<input
readonly
class=
" form-control"
placeholder=
""
type=
"text"
value=
""
/>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-12 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
ชื่ออุปกรณ์
</label>
<input
readonly
class=
"form-control"
type=
"text"
value=
"{{item.rname}}"
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-12 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
รายละเอียดอุปกรณ์
</label>
<input
readonly
class=
"form-control"
type=
"text"
value=
"{{item.rdecs}}"
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่เริ่มต้น
</label>
<input
readonly
type=
"date"
class=
"form-control"
value=
""
>
</div>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่สิ้นสุด
</label>
<input
readonly
type=
"date"
class=
"form-control"
value=
""
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
เวลาที่เริ่มต้น
</label>
<input
readonly
class=
"form-control"
type=
"text"
value=
"{{country.stime}}"
>
</div>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
เวลาที่สิ้นสุด
</label>
<input
readonly
class=
"form-control"
type=
"text"
value=
"{{country.etime}}"
>
</div>
</div>
<div
class=
" row"
>
<div
class=
" col-sm-6 mb-1"
>
<label
for=
"changequantity"
>
จำนวน
</label>
<input
readonly
id=
"changequantity"
type=
"number"
class=
"form-control form-control-sm"
[(
ngModel
)]="
quantity
"
/>
</div>
</div>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<label>
หมายเหตุ
</label>
<textarea
readonly
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
placeholder=
"......"
></textarea>
</div>
</div>
</div>
</form>
</div>
<div
class=
" card-footer"
>
<button
class=
" btn btn-fill btn-danger"
type=
"submit"
>
Save
</button>
<button
class=
" btn btn-fill btn-danger"
type=
"close"
>
Cancel
</button>
</div>
</div>
</div>
</ng-template>
</div>
\ No newline at end of file
src/app/pages/pending/pending.component.ts
View file @
37fd070b
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
NgbDate
,
NgbCalendar
,
NgbDateParserFormatter
}
from
'@ng-bootstrap/ng-bootstrap'
;
import
{
NgbDate
,
NgbCalendar
,
NgbDateParserFormatter
}
from
'@ng-bootstrap/ng-bootstrap'
;
import
{
NgbModal
,
ModalDismissReasons
}
from
'@ng-bootstrap/ng-bootstrap'
;
@
Component
({
@
Component
({
selector
:
'app-pending'
,
selector
:
'app-pending'
,
...
@@ -36,6 +37,8 @@ export class PendingComponent implements OnInit {
...
@@ -36,6 +37,8 @@ export class PendingComponent implements OnInit {
page
=
1
;
page
=
1
;
pageSize
=
10
;
pageSize
=
10
;
closeResult
=
''
;
countries
:
Country
[]
=
[
countries
:
Country
[]
=
[
{
{
catagory
:
'string'
,
catagory
:
'string'
,
...
@@ -68,7 +71,7 @@ export class PendingComponent implements OnInit {
...
@@ -68,7 +71,7 @@ export class PendingComponent implements OnInit {
fromDate
:
NgbDate
|
null
;
fromDate
:
NgbDate
|
null
;
toDate
:
NgbDate
|
null
;
toDate
:
NgbDate
|
null
;
constructor
(
private
calendar
:
NgbCalendar
,
public
formatter
:
NgbDateParserFormatter
)
{
constructor
(
private
calendar
:
NgbCalendar
,
public
formatter
:
NgbDateParserFormatter
,
private
modalService
:
NgbModal
)
{
this
.
fromDate
=
calendar
.
getToday
();
this
.
fromDate
=
calendar
.
getToday
();
this
.
toDate
=
calendar
.
getNext
(
calendar
.
getToday
(),
'd'
,
10
);
this
.
toDate
=
calendar
.
getNext
(
calendar
.
getToday
(),
'd'
,
10
);
this
.
refreshCountries
();
this
.
refreshCountries
();
...
@@ -91,6 +94,24 @@ export class PendingComponent implements OnInit {
...
@@ -91,6 +94,24 @@ export class PendingComponent implements OnInit {
}
}
}
}
open
(
content
)
{
this
.
modalService
.
open
(
content
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
closeResult
=
`Closed with:
${
result
}
`
;
},
(
reason
)
=>
{
this
.
closeResult
=
`Dismissed
${
this
.
getDismissReason
(
reason
)}
`
;
});
}
private
getDismissReason
(
reason
:
any
):
string
{
if
(
reason
===
ModalDismissReasons
.
ESC
)
{
return
'by pressing ESC'
;
}
else
if
(
reason
===
ModalDismissReasons
.
BACKDROP_CLICK
)
{
return
'by clicking on a backdrop'
;
}
else
{
return
`with:
${
reason
}
`
;
}
}
isHovered
(
date
:
NgbDate
)
{
isHovered
(
date
:
NgbDate
)
{
return
this
.
fromDate
&&
!
this
.
toDate
&&
this
.
hoveredDate
&&
date
.
after
(
this
.
fromDate
)
&&
date
.
before
(
this
.
hoveredDate
);
return
this
.
fromDate
&&
!
this
.
toDate
&&
this
.
hoveredDate
&&
date
.
after
(
this
.
fromDate
)
&&
date
.
before
(
this
.
hoveredDate
);
}
}
...
...
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