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
cc22bb61
Commit
cc22bb61
authored
Dec 09, 2021
by
Chanachai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update ข้อความในปุ่มค้นหาขึ้น
parent
513f6499
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
189 additions
and
86 deletions
+189
-86
itemDetail.model.ts
src/app/models/itemDetail.model.ts
+3
-1
roomDetail.model.ts
src/app/models/roomDetail.model.ts
+3
-1
admin-pending.component.html
src/app/pages/admin-pending/admin-pending.component.html
+64
-32
admin-pending.component.ts
src/app/pages/admin-pending/admin-pending.component.ts
+22
-2
pending.component.html
src/app/pages/pending/pending.component.html
+75
-40
pending.component.ts
src/app/pages/pending/pending.component.ts
+18
-10
item-detail.service.ts
src/app/service/item-detail.service.ts
+2
-0
room-detail.service.ts
src/app/service/room-detail.service.ts
+2
-0
No files found.
src/app/models/itemDetail.model.ts
View file @
cc22bb61
...
@@ -18,7 +18,8 @@ export class ItemDetail {
...
@@ -18,7 +18,8 @@ export class ItemDetail {
};
};
eStatus
:
string
;
eStatus
:
string
;
Quantity
:
string
;
Quantity
:
string
;
eTelephone
:
number
;
eTelephone
:
string
;
email
:
string
;
Remark
:
string
;
Remark
:
string
;
constructor
(
init
?:
ItemDetail
)
{
constructor
(
init
?:
ItemDetail
)
{
Object
.
assign
(
this
,
init
);
Object
.
assign
(
this
,
init
);
...
@@ -30,6 +31,7 @@ export class ItemDetail {
...
@@ -30,6 +31,7 @@ export class ItemDetail {
this
.
eStatus
=
''
;
this
.
eStatus
=
''
;
this
.
Quantity
=
''
;
this
.
Quantity
=
''
;
this
.
eTelephone
=
undefined
;
this
.
eTelephone
=
undefined
;
this
.
email
=
undefined
;
this
.
Remark
=
''
;
this
.
Remark
=
''
;
}
}
}
}
...
...
src/app/models/roomDetail.model.ts
View file @
cc22bb61
...
@@ -17,7 +17,8 @@ export class RoomDetail {
...
@@ -17,7 +17,8 @@ export class RoomDetail {
second
:
number
;
second
:
number
;
};
};
rStatus
:
string
;
rStatus
:
string
;
rTelephone
:
number
;
rTelephone
:
string
;
email
:
string
;
Remark
:
string
;
Remark
:
string
;
constructor
(
init
?:
RoomDetail
)
{
constructor
(
init
?:
RoomDetail
)
{
Object
.
assign
(
this
,
init
);
Object
.
assign
(
this
,
init
);
...
@@ -28,6 +29,7 @@ export class RoomDetail {
...
@@ -28,6 +29,7 @@ export class RoomDetail {
this
.
eDate
=
''
;
this
.
eDate
=
''
;
this
.
rStatus
=
''
;
this
.
rStatus
=
''
;
this
.
rTelephone
=
undefined
;
this
.
rTelephone
=
undefined
;
this
.
email
=
undefined
;
this
.
Remark
=
''
;
this
.
Remark
=
''
;
}
}
}
}
...
...
src/app/pages/admin-pending/admin-pending.component.html
View file @
cc22bb61
...
@@ -103,14 +103,15 @@
...
@@ -103,14 +103,15 @@
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
<div
class=
"d-flex justify-content-between p-2"
>
<div
class=
"d-flex justify-content-between p-2"
>
<ngb-pagination
[
collectionSize
]="
collectionSize
"
[(
page
)]="
page
"
<ngb-pagination
[
collectionSize
]="
collectionSizeListRoom
"
[(
page
)]="
pageListRoom
"
[
pageSize
]="
pageSize
"
(
pageChange
)="
refreshCountries
()"
>
[
pageSize
]="
pageSizeListRoom
"
>
<ng-template
ngbPaginationPrevious
>
Previous
</ng-template>
<ng-template
ngbPaginationNext
>
Next
</ng-template>
</ngb-pagination>
</ngb-pagination>
<select
class=
"custom-select"
style=
"width: auto"
[(
ngModel
)]="
pageSize
"
<select
class=
"custom-select"
style=
"width: auto"
[(
ngModel
)]="
pageSize
ListRoom
"
(
ngModelChange
)="
refreshCountries
()
"
>
(
ngModelChange
)="
pageListRoom=
1
"
>
<option
[
ngValue
]="
10
"
>
10 items per page
</option>
<option
[
ngValue
]="
10
"
>
10 items per page
</option>
<option
[
ngValue
]="
50
"
>
50 items per page
</option>
<option
[
ngValue
]="
50
"
>
50 items per page
</option>
<option
[
ngValue
]="
100
"
>
100 items per page
</option>
<option
[
ngValue
]="
100
"
>
100 items per page
</option>
...
@@ -165,14 +166,15 @@
...
@@ -165,14 +166,15 @@
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
<div
class=
"d-flex justify-content-between p-2"
>
<div
class=
"d-flex justify-content-between p-2"
>
<ngb-pagination
[
collectionSize
]="
collectionSize
"
[(
page
)]="
page
"
<ngb-pagination
[
collectionSize
]="
collectionSizeListRoom
"
[(
page
)]="
pageListRoom
"
[
pageSize
]="
pageSize
"
(
pageChange
)="
refreshCountries
()"
>
[
pageSize
]="
pageSizeListRoom
"
>
<ng-template
ngbPaginationPrevious
>
Previous
</ng-template>
<ng-template
ngbPaginationNext
>
Next
</ng-template>
</ngb-pagination>
</ngb-pagination>
<select
class=
"custom-select"
style=
"width: auto"
[(
ngModel
)]="
pageSize
"
<select
class=
"custom-select"
style=
"width: auto"
[(
ngModel
)]="
pageSize
ListRoom
"
(
ngModelChange
)="
refreshCountries
()
"
>
(
ngModelChange
)="
pageListRoom=
1
"
>
<option
[
ngValue
]="
10
"
>
10 items per page
</option>
<option
[
ngValue
]="
10
"
>
10 items per page
</option>
<option
[
ngValue
]="
50
"
>
50 items per page
</option>
<option
[
ngValue
]="
50
"
>
50 items per page
</option>
<option
[
ngValue
]="
100
"
>
100 items per page
</option>
<option
[
ngValue
]="
100
"
>
100 items per page
</option>
...
@@ -199,8 +201,15 @@
...
@@ -199,8 +201,15 @@
<div
class=
" col-md-12"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<div
class=
" form-group"
>
<label>
ชื่อผู้จอง
</label>
<label>
ชื่อผู้จอง
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
<input
class=
" form-control"
placeholder=
""
type=
"text"
[(
ngModel
)]="
modelRoomDetail
.
userName
"
/>
[(
ngModel
)]="
modelroomDetail
.
userName
"
/>
</div>
</div>
</div>
<div
class=
" row"
>
<div
class=
" col-sm-12 mb-1"
>
<div
class=
" form-group"
>
<label>
อีเมล
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
[(
ngModel
)]="
modelRoomDetail
.
email
"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -208,42 +217,42 @@
...
@@ -208,42 +217,42 @@
<div
class=
" col-md-12"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<div
class=
" form-group"
>
<label>
เบอร์โทร
</label>
<label>
เบอร์โทร
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
value=
"
"
/>
<input
class=
" form-control"
placeholder=
""
type=
"text"
[(
ngModel
)]="
modelRoomDetail
.
room
.
rTelephone
"
/>
</div>
</div>
</div>
</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>
<input
class=
"form-control"
type=
"text"
[(
ngModel
)]="
model
roomDetail
.
room
.
rName
"
>
<input
class=
"form-control"
type=
"text"
[(
ngModel
)]="
model
RoomDetail
.
room
.
rName
"
/
>
</div>
</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>
<input
class=
"form-control"
type=
"text"
[(
ngModel
)]="
model
roomDetail
.
room
.
rDesc
"
>
<input
class=
"form-control"
type=
"text"
[(
ngModel
)]="
model
RoomDetail
.
room
.
rDesc
"
/
>
</div>
</div>
</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"
[(
ngModel
)]="
sDate
"
(
ngModelChange
)="
rDate
(
sDate
,'
sdate
')"
>
<input
type=
"date"
class=
"form-control"
[(
ngModel
)]="
sDate
"
(
ngModelChange
)="
rDate
(
sDate
,'
sdate
')"
/
>
</div>
</div>
<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"
[(
ngModel
)]="
eDate
"
(
ngModelChange
)="
rDate
(
eDate
,'
edate
')"
>
<input
type=
"date"
class=
"form-control"
[(
ngModel
)]="
eDate
"
(
ngModelChange
)="
rDate
(
eDate
,'
edate
')"
/
>
</div>
</div>
</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
class=
"form-control"
type=
"time"
<input
class=
"form-control"
type=
"time"
[(
ngModel
)]="
thStime
"
(
ngModelChange
)="
thtimeChange
(
thStime
,
model
roomDetail
.
sTime
)"
>
[(
ngModel
)]="
thStime
"
(
ngModelChange
)="
thtimeChange
(
thStime
,
model
RoomDetail
.
sTime
)"
/
>
</div>
</div>
<div
class=
"col-6 mb-1"
>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
เวลาที่สิ้นสุด
</label>
<label
for=
"exampleFormControlSelect1"
>
เวลาที่สิ้นสุด
</label>
<input
class=
"form-control"
type=
"time"
<input
class=
"form-control"
type=
"time"
[(
ngModel
)]="
thEtime
"
(
ngModelChange
)="
thtimeChange
(
thEtime
,
model
roomDetail
.
eTime
)"
>
[(
ngModel
)]="
thEtime
"
(
ngModelChange
)="
thtimeChange
(
thEtime
,
model
RoomDetail
.
eTime
)"
/
>
</div>
</div>
</div>
</div>
<div
class=
" row"
>
<div
class=
" row"
>
...
@@ -251,12 +260,12 @@
...
@@ -251,12 +260,12 @@
<div
class=
" form-group"
>
<div
class=
" form-group"
>
<label>
หมายเหตุ
</label>
<label>
หมายเหตุ
</label>
<textarea
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
<textarea
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
placeholder=
"......"
value=
"{{modelroomDetail.Remark}}
"
></textarea>
placeholder=
"......"
[(
ngModel
)]="
modelRoomDetail
.
Remark
"
></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
" card-footer"
>
<div
class=
" card-footer"
>
<button
class=
" btn btn-fill btn-danger"
type=
"submit"
(
click
)="
save
Equirment
()"
>
อนุมัติ
</button>
<button
class=
" btn btn-fill btn-danger"
type=
"submit"
(
click
)="
save
Room
()"
>
อนุมัติ
</button>
<button
class=
" btn btn-fill btn-danger"
type=
"cancel"
<button
class=
" btn btn-fill btn-danger"
type=
"cancel"
(
click
)="
modal
.
dismiss
('
Cross
click
')"
>
ยกเลิก
</button>
(
click
)="
modal
.
dismiss
('
Cross
click
')"
>
ยกเลิก
</button>
<div
ngbDropdown
class=
"d-inline-block"
>
<div
ngbDropdown
class=
"d-inline-block"
>
...
@@ -279,7 +288,7 @@
...
@@ -279,7 +288,7 @@
<div
class=
" col-md-12"
style=
"padding: 0; "
>
<div
class=
" col-md-12"
style=
"padding: 0; "
>
<div
class=
"card"
style=
"margin: 0; "
>
<div
class=
"card"
style=
"margin: 0; "
>
<div
class=
" card-header"
>
<div
class=
" card-header"
>
<h5
class=
" title"
>
Lend Equirment
</h5>
<h5
class=
" title"
>
การเบิก
</h5>
</div>
</div>
<div
class=
" card-body"
>
<div
class=
" card-body"
>
<div
class=
" row"
>
<div
class=
" row"
>
...
@@ -287,7 +296,15 @@
...
@@ -287,7 +296,15 @@
<div
class=
" form-group"
>
<div
class=
" form-group"
>
<label>
ชื่อผู้จอง
</label>
<label>
ชื่อผู้จอง
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
<input
class=
" form-control"
placeholder=
""
type=
"text"
[(
ngModel
)]="
modelitemDetail
.
userName
"
>
[(
ngModel
)]="
modelItemDetail
.
userName
"
/>
</div>
</div>
</div>
<div
class=
" row"
>
<div
class=
" col-sm-12 mb-1"
>
<div
class=
" form-group"
>
<label>
อีเมล
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
[(
ngModel
)]="
modelItemDetail
.
email
"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -295,49 +312,49 @@
...
@@ -295,49 +312,49 @@
<div
class=
" col-md-12"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<div
class=
" form-group"
>
<label>
เบอร์โทร
</label>
<label>
เบอร์โทร
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
value=
"
"
/>
<input
class=
" form-control"
placeholder=
""
type=
"text"
[(
ngModel
)]="
modelItemDetail
.
equirment
.
eTelephone
"
/>
</div>
</div>
</div>
</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>
<input
class=
"form-control"
type=
"text"
[(
ngModel
)]="
model
itemDetail
.
equirment
.
eqName
"
>
<input
class=
"form-control"
type=
"text"
[(
ngModel
)]="
model
ItemDetail
.
equirment
.
eqName
"
/
>
</div>
</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>
<input
class=
"form-control"
type=
"text"
[(
ngModel
)]="
model
itemDetail
.
equirment
.
eqDesc
"
>
<input
class=
"form-control"
type=
"text"
[(
ngModel
)]="
model
ItemDetail
.
equirment
.
eqDesc
"
/
>
</div>
</div>
</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"
[(
ngModel
)]="
sDate
"
(
ngModelChange
)="
rDate
(
sDate
,'
sdate
')"
>
<input
type=
"date"
class=
"form-control"
[(
ngModel
)]="
sDate
"
(
ngModelChange
)="
rDate
(
sDate
,'
sdate
')"
/
>
</div>
</div>
<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"
[(
ngModel
)]="
eDate
"
(
ngModelChange
)="
rDate
(
eDate
,'
edate
')"
>
<input
type=
"date"
class=
"form-control"
[(
ngModel
)]="
eDate
"
(
ngModelChange
)="
rDate
(
eDate
,'
edate
')"
/
>
</div>
</div>
</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
class=
"form-control"
type=
"time"
<input
class=
"form-control"
type=
"time"
[(
ngModel
)]="
thStime
"
(
ngModelChange
)="
thtimeChange
(
thStime
,
model
itemDetail
.
sTime
)"
>
[(
ngModel
)]="
thStime
"
(
ngModelChange
)="
thtimeChange
(
thStime
,
model
ItemDetail
.
sTime
)"
/
>
</div>
</div>
<div
class=
"col-6 mb-1"
>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
เวลาที่สิ้นสุด
</label>
<label
for=
"exampleFormControlSelect1"
>
เวลาที่สิ้นสุด
</label>
<input
class=
"form-control"
type=
"text"
<input
class=
"form-control"
type=
"text"
[(
ngModel
)]="
thEtime
"
(
ngModelChange
)="
thtimeChange
(
thStime
,
model
itemDetail
.
eTime
)"
>
[(
ngModel
)]="
thEtime
"
(
ngModelChange
)="
thtimeChange
(
thStime
,
model
ItemDetail
.
eTime
)"
/
>
</div>
</div>
</div>
</div>
<div
class=
" row"
>
<div
class=
" row"
>
<div
class=
" col-sm-6 mb-1"
>
<div
class=
" col-sm-6 mb-1"
>
<label
for=
"changequantity"
>
จำนวน
</label>
<label
for=
"changequantity"
>
จำนวน
</label>
<input
id=
"changequantity"
type=
"number"
class=
"form-control form-control-sm"
<input
id=
"changequantity"
type=
"number"
class=
"form-control form-control-sm"
value=
"{{modelitemDetail.Quantity}}
"
/>
[(
ngModel
)]="
modelItemDetail
.
Quantity
"
/>
</div>
</div>
</div>
</div>
<div
class=
" row"
>
<div
class=
" row"
>
...
@@ -345,7 +362,22 @@
...
@@ -345,7 +362,22 @@
<div
class=
" form-group"
>
<div
class=
" form-group"
>
<label>
หมายเหตุ
</label>
<label>
หมายเหตุ
</label>
<textarea
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
<textarea
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
placeholder=
"......"
value=
"{{modelitemDetail.Remark}}"
></textarea>
placeholder=
"......"
[(
ngModel
)]="
modelItemDetail
.
Remark
"
></textarea>
</div>
</div>
</div>
<div
class=
" card-footer"
>
<button
class=
" btn btn-fill btn-danger"
type=
"submit"
(
click
)="
saveEquirment
()"
>
อนุมัติ
</button>
<button
class=
" btn btn-fill btn-danger"
type=
"cancel"
(
click
)="
modal
.
dismiss
('
Cross
click
')"
>
ยกเลิก
</button>
<div
ngbDropdown
class=
"d-inline-block"
>
<button
class=
"btn btn-sm btn-outline-primary"
id=
"dropdownBasic1"
ngbDropdownToggle
>
สถานะ
</button>
<div
ngbDropdownMenu
aria-labelledby=
"dropdownBasic1"
>
<button
ngbDropdownItem
>
รอดำเนินการ
</button>
<button
ngbDropdownItem
>
อนุมัติ
</button>
<button
ngbDropdownItem
>
ยกเลิก
</button>
<button
ngbDropdownItem
>
สำเร็จแล้ว
</button>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/pages/admin-pending/admin-pending.component.ts
View file @
cc22bb61
...
@@ -7,6 +7,8 @@ import { ItemDetailService } from 'src/app/service/item-detail.service';
...
@@ -7,6 +7,8 @@ import { ItemDetailService } from 'src/app/service/item-detail.service';
import
{
RoomDetail
}
from
'src/app/models/roomDetail.model'
;
import
{
RoomDetail
}
from
'src/app/models/roomDetail.model'
;
import
{
RoomDetailService
}
from
'src/app/service/room-detail.service'
;
import
{
RoomDetailService
}
from
'src/app/service/room-detail.service'
;
import
{
MyRoom
,
Room
}
from
'src/app/models/rooms.model'
;
import
{
MyRoom
,
Room
}
from
'src/app/models/rooms.model'
;
import
{
EquirmentService
}
from
'src/app/service/equirment.service'
;
import
{
RoomService
}
from
'src/app/service/room.service'
;
@
Component
({
@
Component
({
selector
:
'app-admin-pending'
,
selector
:
'app-admin-pending'
,
...
@@ -41,8 +43,15 @@ import { MyRoom, Room } from 'src/app/models/rooms.model';
...
@@ -41,8 +43,15 @@ import { MyRoom, Room } from 'src/app/models/rooms.model';
})
})
export
class
AdminPendingComponent
implements
OnInit
{
export
class
AdminPendingComponent
implements
OnInit
{
time
=
{
hour
:
13
,
minute
:
30
};
page
=
1
;
page
=
1
;
pageSize
=
10
;
pageSize
=
10
;
collectionSize
=
0
;
pageListRoom
=
1
;
pageSizeListRoom
=
10
;
collectionSizeListRoom
=
0
;
closeResult
=
''
;
closeResult
=
''
;
...
@@ -54,7 +63,6 @@ export class AdminPendingComponent implements OnInit {
...
@@ -54,7 +63,6 @@ export class AdminPendingComponent implements OnInit {
modelItemDetail
=
new
ItemDetail
();
modelItemDetail
=
new
ItemDetail
();
modelRoomDetail
=
new
RoomDetail
();
modelRoomDetail
=
new
RoomDetail
();
collectionSize
=
this
.
listitemDetail
.
length
;
hoveredDate
:
NgbDate
|
null
=
null
;
hoveredDate
:
NgbDate
|
null
=
null
;
fromDate
:
NgbDate
|
null
;
fromDate
:
NgbDate
|
null
;
...
@@ -70,7 +78,8 @@ export class AdminPendingComponent implements OnInit {
...
@@ -70,7 +78,8 @@ export class AdminPendingComponent implements OnInit {
}
}
constructor
(
private
calendar
:
NgbCalendar
,
public
formatter
:
NgbDateParserFormatter
,
private
modalService
:
NgbModal
,
private
ItemDetailService
:
ItemDetailService
,
private
RoomDetailService
:
RoomDetailService
)
{
constructor
(
private
calendar
:
NgbCalendar
,
public
formatter
:
NgbDateParserFormatter
,
private
modalService
:
NgbModal
,
private
ItemDetailService
:
ItemDetailService
,
private
RoomDetailService
:
RoomDetailService
,
private
equirmentService
:
EquirmentService
,
private
roomService
:
RoomService
)
{
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
.
refreshitemDetail
();
this
.
refreshitemDetail
();
...
@@ -179,10 +188,21 @@ export class AdminPendingComponent implements OnInit {
...
@@ -179,10 +188,21 @@ export class AdminPendingComponent implements OnInit {
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
listitemDetail
=
this
.
ItemDetailService
.
getListItemDetail
();
this
.
listitemDetail
=
this
.
ItemDetailService
.
getListItemDetail
();
this
.
listroomDetail
=
this
.
RoomDetailService
.
getListRoomDetail
();
this
.
listroomDetail
=
this
.
RoomDetailService
.
getListRoomDetail
();
this
.
collectionSizeListRoom
=
this
.
listitemDetail
.
length
;
console
.
log
(
this
.
listitemDetail
);
console
.
log
(
this
.
listitemDetail
);
}
}
saveEquirment
()
{
this
.
equirmentService
.
addEquirment
(
this
.
modelEquirment
);
this
.
modalService
.
dismissAll
();
this
.
ngOnInit
();
}
saveRoom
()
{
this
.
roomService
.
addRoom
(
this
.
modelRoom
);
this
.
modalService
.
dismissAll
();
this
.
ngOnInit
();
}
}
}
export
class
NgbdDropdownBasic
{
export
class
NgbdDropdownBasic
{
...
...
src/app/pages/pending/pending.component.html
View file @
cc22bb61
...
@@ -90,24 +90,29 @@
...
@@ -90,24 +90,29 @@
<td>
{{ item.room.rName }}
</td>
<td>
{{ item.room.rName }}
</td>
<td>
{{ item.room.rDesc }}
</td>
<td>
{{ item.room.rDesc }}
</td>
<td>
{{ item.userName }}
</td>
<td>
{{ item.userName }}
</td>
<td>
{{ item.sDate.replaceAll("/","-") }} {{ item.sTime.hour }}:{{ item.sTime.minute }}
</td>
<td>
{{ item.sDate.replaceAll("/","-") }} {{ item.sTime.hour }}:{{
<td>
{{ item.eDate.replaceAll("/","-") }} {{ item.eTime.hour }}:{{ item.eTime.minute }}
</td>
item.sTime.minute }}
</td>
<td>
{{ item.eDate.replaceAll("/","-") }} {{ item.eTime.hour }}:{{
item.eTime.minute }}
</td>
<td>
{{ item.rStatus }}
</td>
<td>
{{ item.rStatus }}
</td>
<div
class=
"col-auto align-self-sm-center"
>
<div
class=
"col-auto align-self-sm-center"
>
<button
type=
"button"
class=
"btn btn-info btn-sm btn-circle "
<button
type=
"button"
class=
"btn btn-info btn-sm btn-circle "
style=
"line-height: 0px"
(
click
)="
openRoomDetail
(
Room
,
item
)"
><i
class=
"fa fa-search"
></i>
</button>
style=
"line-height: 0px"
(
click
)="
openRoomDetail
(
Room
,
item
)"
><i
class=
"fa fa-search"
></i>
</button>
</div>
</div>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
<div
class=
"d-flex justify-content-between p-2"
>
<div
class=
"d-flex justify-content-between p-2"
>
<ngb-pagination
[
collectionSize
]="
collectionSize
"
[(
page
)]="
page
"
<ngb-pagination
[
collectionSize
]="
collectionSizeListRoom
"
[(
page
)]="
pageListRoom
"
[
pageSize
]="
pageSize
"
(
pageChange
)="
refreshCountries
()"
>
[
pageSize
]="
pageSizeListRoom
"
>
<ng-template
ngbPaginationPrevious
>
Previous
</ng-template>
<ng-template
ngbPaginationNext
>
Next
</ng-template>
</ngb-pagination>
</ngb-pagination>
<select
class=
"custom-select"
style=
"width: auto"
[(
ngModel
)]="
pageSize
"
<select
class=
"custom-select"
style=
"width: auto"
[(
ngModel
)]="
pageSize
ListRoom
"
(
ngModelChange
)="
refreshCountries
()
"
>
(
ngModelChange
)="
pageListRoom=
1
"
>
<option
[
ngValue
]="
10
"
>
10 items per page
</option>
<option
[
ngValue
]="
10
"
>
10 items per page
</option>
<option
[
ngValue
]="
50
"
>
50 items per page
</option>
<option
[
ngValue
]="
50
"
>
50 items per page
</option>
<option
[
ngValue
]="
100
"
>
100 items per page
</option>
<option
[
ngValue
]="
100
"
>
100 items per page
</option>
...
@@ -148,25 +153,30 @@
...
@@ -148,25 +153,30 @@
<td>
{{ item.equirment.eqName }}
</td>
<td>
{{ item.equirment.eqName }}
</td>
<td>
{{ item.equirment.eqDesc }}
</td>
<td>
{{ item.equirment.eqDesc }}
</td>
<td>
{{ item.userName }}
</td>
<td>
{{ item.userName }}
</td>
<td>
{{ item.sDate.replaceAll("/","-") }} {{ item.sTime.hour }}:{{ item.sTime.minute }}
</td>
<td>
{{ item.sDate.replaceAll("/","-") }} {{ item.sTime.hour }}:{{
<td>
{{ item.eDate.replaceAll("/","-") }} {{ item.eTime.hour }}:{{ item.eTime.minute }}
</td>
item.sTime.minute }}
</td>
<td>
{{ item.eDate.replaceAll("/","-") }} {{ item.eTime.hour }}:{{
item.eTime.minute }}
</td>
<td>
{{ item.Quantity }}
</td>
<td>
{{ item.Quantity }}
</td>
<td>
{{ item.eStatus }}
</td>
<td>
{{ item.eStatus }}
</td>
<div
class=
"col-auto align-self-sm-center"
>
<div
class=
"col-auto align-self-sm-center"
>
<button
type=
"button"
class=
"btn btn-info btn-sm btn-circle "
<button
type=
"button"
class=
"btn btn-info btn-sm btn-circle "
style=
"line-height: 0px"
(
click
)="
openItemDetail
(
lend
,
item
)"
><i
class=
"fa fa-search"
></i>
</button>
style=
"line-height: 0px"
(
click
)="
openItemDetail
(
lend
,
item
)"
><i
class=
"fa fa-search"
></i>
</button>
</div>
</div>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
<div
class=
"d-flex justify-content-between p-2"
>
<div
class=
"d-flex justify-content-between p-2"
>
<ngb-pagination
[
collectionSize
]="
collectionSize
"
[(
page
)]="
page
"
<ngb-pagination
[
collectionSize
]="
collectionSizeListRoom
"
[(
page
)]="
pageListRoom
"
[
pageSize
]="
pageSize
"
(
pageChange
)="
refreshCountries
()"
>
[
pageSize
]="
pageSizeListRoom
"
>
<ng-template
ngbPaginationPrevious
>
Previous
</ng-template>
<ng-template
ngbPaginationNext
>
Next
</ng-template>
</ngb-pagination>
</ngb-pagination>
<select
class=
"custom-select"
style=
"width: auto"
[(
ngModel
)]="
pageSize
"
<select
class=
"custom-select"
style=
"width: auto"
[(
ngModel
)]="
pageSize
ListRoom
"
(
ngModelChange
)="
refreshCountries
()
"
>
(
ngModelChange
)="
pageListRoom=
1
"
>
<option
[
ngValue
]="
10
"
>
10 items per page
</option>
<option
[
ngValue
]="
10
"
>
10 items per page
</option>
<option
[
ngValue
]="
50
"
>
50 items per page
</option>
<option
[
ngValue
]="
50
"
>
50 items per page
</option>
<option
[
ngValue
]="
100
"
>
100 items per page
</option>
<option
[
ngValue
]="
100
"
>
100 items per page
</option>
...
@@ -189,12 +199,21 @@
...
@@ -189,12 +199,21 @@
<h5
class=
" title"
>
การจอง
</h5>
<h5
class=
" title"
>
การจอง
</h5>
</div>
</div>
<div
class=
" card-body"
>
<div
class=
" card-body"
>
<form>
<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>
ชื่อผู้จอง
</label>
<label>
ชื่อผู้จอง
</label>
<input
readonly
class=
" form-control"
placeholder=
""
type=
"text"
value=
"{{modelRoomDetail.userName}}"
/>
<input
readonly
class=
" form-control"
placeholder=
""
type=
"text"
[(
ngModel
)]="
modelRoomDetail
.
userName
"
/>
</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"
[(
ngModel
)]="
modelRoomDetail
.
email
"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -202,40 +221,45 @@
...
@@ -202,40 +221,45 @@
<div
class=
" col-md-12"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<div
class=
" form-group"
>
<label>
เบอร์โทร
</label>
<label>
เบอร์โทร
</label>
<input
readonly
class=
" form-control"
placeholder=
""
type=
"text"
value=
""
/>
<input
readonly
class=
" form-control"
placeholder=
""
type=
"text"
[(
ngModel
)]="
modelRoomDetail
.
rTelephone
"
/>
</div>
</div>
</div>
</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>
<input
readonly
class=
"form-control"
type=
"text"
value=
"{{modelRoomDetail.room.rName}}
"
>
<input
readonly
class=
"form-control"
type=
"text"
[(
ngModel
)]="
modelRoomDetail
.
room
.
rName
"
>
</div>
</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>
<input
readonly
class=
"form-control"
type=
"text"
value=
"{{modelRoomDetail.room.rDesc}}
"
>
<input
readonly
class=
"form-control"
type=
"text"
[(
ngModel
)]="
modelRoomDetail
.
room
.
rDesc
"
>
</div>
</div>
</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
readonly
type=
"text"
class=
"form-control"
value=
"{{modelRoomDetail.sDate | date:'dd-MM-yyyy'}}"
>
<input
readonly
type=
"date"
class=
"form-control"
[(
ngModel
)]="
sDate
"
(
ngModelChange
)="
rDate
(
sDate
,'
sdate
')"
>
</div>
</div>
<div
class=
"col-6 mb-1"
>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่สิ้นสุด
</label>
<label
for=
"exampleFormControlSelect1"
>
วันที่สิ้นสุด
</label>
<input
readonly
type=
"text"
class=
"form-control"
value=
"{{modelRoomDetail.eDate | date:'dd-MM-yyyy'}}"
>
<input
readonly
type=
"date"
class=
"form-control"
[(
ngModel
)]="
eDate
"
(
ngModelChange
)="
rDate
(
eDate
,'
edate
')"
>
</div>
</div>
</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
readonly
class=
"form-control"
type=
"text"
value=
"{{modelRoomDetail.sTime.hour}} {{modelRoomDetail.sTime.minute}}"
>
<input
readonly
class=
"form-control"
type=
"time"
[(
ngModel
)]="
thStime
"
(
ngModelChange
)="
thtimeChange
(
thStime
,
modelroomDetail
.
sTime
)"
>
</div>
</div>
<div
class=
"col-6 mb-1"
>
<div
class=
"col-6 mb-1"
>
<label
[
readonly
]
for=
"exampleFormControlSelect1"
>
เวลาที่สิ้นสุด
</label>
<label
[
readonly
]
for=
"exampleFormControlSelect1"
>
เวลาที่สิ้นสุด
</label>
<input
readonly
class=
"form-control"
type=
"text"
value=
"{{modelRoomDetail.eTime.hour}} {{modelRoomDetail.eTime.minute}}"
>
<input
readonly
class=
"form-control"
type=
"time"
[(
ngModel
)]="
thEtime
"
(
ngModelChange
)="
thtimeChange
(
thEtime
,
modelroomDetail
.
eTime
)"
>
</div>
</div>
</div>
</div>
<div
class=
" row"
>
<div
class=
" row"
>
...
@@ -243,11 +267,10 @@
...
@@ -243,11 +267,10 @@
<div
class=
" form-group"
>
<div
class=
" form-group"
>
<label>
หมายเหตุ
</label>
<label>
หมายเหตุ
</label>
<textarea
readonly
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
<textarea
readonly
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
placeholder=
"......"
value=
"{{modelRoomDetail.Remark}}
"
></textarea>
placeholder=
"......"
[(
ngModel
)]="
modelRoomDetail
.
Remark
"
></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -257,15 +280,24 @@
...
@@ -257,15 +280,24 @@
<div
class=
" col-md-12"
style=
"padding: 0; "
>
<div
class=
" col-md-12"
style=
"padding: 0; "
>
<div
class=
"card"
style=
"margin: 0; "
>
<div
class=
"card"
style=
"margin: 0; "
>
<div
class=
" card-header"
>
<div
class=
" card-header"
>
<h5
class=
" title"
>
Lend Equirment
</h5>
<h5
class=
" title"
>
การเบิก
</h5>
</div>
</div>
<div
class=
" card-body"
>
<div
class=
" card-body"
>
<form>
<div
class=
" row"
>
<div
class=
" row"
>
<div
class=
" col-sm-12 mb-1"
>
<div
class=
" col-sm-12 mb-1"
>
<div
class=
" form-group"
>
<div
class=
" form-group"
>
<label>
ชื่อผู้จอง
</label>
<label>
ชื่อผู้จอง
</label>
<input
readonly
class=
" form-control"
placeholder=
""
type=
"text"
value=
"{{modelItemDetail.userName}}"
/>
<input
readonly
class=
" form-control"
placeholder=
""
type=
"text"
[(
ngModel
)]="
modelItemDetail
.
userName
"
/>
</div>
</div>
</div>
<div
class=
" row"
>
<div
class=
" col-sm-12 mb-1"
>
<div
class=
" form-group"
>
<label>
อีเมล
</label>
<input
readonly
class=
" form-control"
placeholder=
""
type=
"text"
[(
ngModel
)]="
modelItemDetail
.
email
"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -273,46 +305,52 @@
...
@@ -273,46 +305,52 @@
<div
class=
" col-md-12"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<div
class=
" form-group"
>
<label>
เบอร์โทร
</label>
<label>
เบอร์โทร
</label>
<input
readonly
class=
" form-control"
placeholder=
""
type=
"text"
value=
""
/>
<input
readonly
class=
" form-control"
placeholder=
""
type=
"text"
[(
ngModel
)]="
modelItemDetail
.
rTelephone
"
/>
</div>
</div>
</div>
</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>
<input
readonly
class=
"form-control"
type=
"text"
value=
"{{modelItemDetail.equirment.eqName}}
"
>
<input
readonly
class=
"form-control"
type=
"text"
[(
ngModel
)]="
modelItemDetail
.
equirment
.
eqName
"
>
</div>
</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>
<input
readonly
class=
"form-control"
type=
"text"
value=
"{{modelItemDetail.equirment.eqDesc}}
"
>
<input
readonly
class=
"form-control"
type=
"text"
[(
ngModel
)]="
modelItemDetail
.
equirment
.
eqDesc
"
>
</div>
</div>
</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
readonly
type=
"text"
class=
"form-control"
value=
"{{modelItemDetail.sDate | date:'dd-MM-yyyy'}}"
>
<input
readonly
type=
"date"
class=
"form-control"
[(
ngModel
)]="
sDate
"
(
ngModelChange
)="
rDate
(
sDate
,'
sdate
')"
>
</div>
</div>
<div
class=
"col-6 mb-1"
>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่สิ้นสุด
</label>
<label
for=
"exampleFormControlSelect1"
>
วันที่สิ้นสุด
</label>
<input
readonly
type=
"text"
class=
"form-control"
value=
"{{modelItemDetail.eDate | date:'dd-MM-yyyy'}}"
>
<input
readonly
type=
"date"
class=
"form-control"
[(
ngModel
)]="
eDate
"
(
ngModelChange
)="
rDate
(
eDate
,'
edate
')"
>
</div>
</div>
</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
readonly
class=
"form-control"
type=
"text"
value=
"{{modelItemDetail.sTime.hour}} {{modelItemDetail.sTime.minute}}"
>
<input
readonly
class=
"form-control"
type=
"time"
[(
ngModel
)]="
thStime
"
(
ngModelChange
)="
thtimeChange
(
thStime
,
modelItemDetail
.
sTime
)"
>
</div>
</div>
<div
class=
"col-6 mb-1"
>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
เวลาที่สิ้นสุด
</label>
<label
for=
"exampleFormControlSelect1"
>
เวลาที่สิ้นสุด
</label>
<input
readonly
class=
"form-control"
type=
"text"
value=
"{{modelItemDetail.eTime.hour}} {{modelItemDetail.eTime.minute}}"
>
<input
readonly
class=
"form-control"
type=
"time"
[(
ngModel
)]="
thEtime
"
(
ngModelChange
)="
thtimeChange
(
thEtime
,
modelItemDetail
.
eTime
)"
>
</div>
</div>
</div>
</div>
<div
class=
" row"
>
<div
class=
" row"
>
<div
class=
" col-sm-6 mb-1"
>
<div
class=
" col-sm-6 mb-1"
>
<label
for=
"changequantity"
>
จำนวน
</label>
<label
for=
"changequantity"
>
จำนวน
</label>
<input
readonly
id=
"changequantity"
type=
"number"
class=
"form-control form-control-sm"
value=
"{{modelItemDetail.Quantity}}"
/>
<input
readonly
id=
"changequantity"
type=
"number"
class=
"form-control form-control-sm"
[(
ngModel
)]="
modelItemDetail
.
Quantity
"
/>
</div>
</div>
</div>
</div>
<div
class=
" row"
>
<div
class=
" row"
>
...
@@ -320,13 +358,11 @@
...
@@ -320,13 +358,11 @@
<div
class=
" form-group"
>
<div
class=
" form-group"
>
<label>
หมายเหตุ
</label>
<label>
หมายเหตุ
</label>
<textarea
readonly
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
<textarea
readonly
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
placeholder=
"......"
value=
"{{modelItemDetail.Remark}}"
></textarea>
placeholder=
"......"
[(
ngModel
)]="
modelItemDetail
.
Remark
"
></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</ng-template>
</ng-template>
\ No newline at end of file
src/app/pages/pending/pending.component.ts
View file @
cc22bb61
...
@@ -40,20 +40,26 @@ import { MyRoom, Room } from 'src/app/models/rooms.model';
...
@@ -40,20 +40,26 @@ import { MyRoom, Room } from 'src/app/models/rooms.model';
})
})
export
class
PendingComponent
implements
OnInit
{
export
class
PendingComponent
implements
OnInit
{
page
=
1
;
time
=
{
hour
:
13
,
minute
:
30
};
pageSize
=
10
;
closeResult
=
''
;
closeResult
=
''
;
listItemDetail
:
ItemDetail
[]
=
[];
listItemDetail
:
ItemDetail
[]
=
[];
listRoomDetail
:
RoomDetail
[]
=
[];
listRoomDetail
:
RoomDetail
[]
=
[];
page
=
1
;
pageSize
=
10
;
collectionSize
=
0
;
pageListRoom
=
1
;
pageSizeListRoom
=
10
;
collectionSizeListRoom
=
0
;
modelEquirment
=
new
Equirment
();
modelEquirment
=
new
Equirment
();
modelRoom
=
new
MyRoom
();
modelRoom
=
new
MyRoom
();
modelItemDetail
=
new
ItemDetail
();
modelItemDetail
=
new
ItemDetail
();
modelRoomDetail
=
new
RoomDetail
();
modelRoomDetail
=
new
RoomDetail
();
collectionSize
=
this
.
listItemDetail
.
length
;
hoveredDate
:
NgbDate
|
null
=
null
;
hoveredDate
:
NgbDate
|
null
=
null
;
fromDate
:
NgbDate
|
null
;
fromDate
:
NgbDate
|
null
;
...
@@ -98,7 +104,12 @@ export class PendingComponent implements OnInit {
...
@@ -98,7 +104,12 @@ export class PendingComponent implements OnInit {
this
.
closeResult
=
`Dismissed
${
this
.
getDismissReason
(
reason
)}
`
;
this
.
closeResult
=
`Dismissed
${
this
.
getDismissReason
(
reason
)}
`
;
});
});
}
}
date
=
'10-12-2561'
show
(
a
:
string
){
console
.
log
(
a
)
}
sDate
=
""
eDate
=
""
openItemDetail
(
content
:
string
,
item
:
ItemDetail
)
{
openItemDetail
(
content
:
string
,
item
:
ItemDetail
)
{
this
.
modelItemDetail
=
item
;
this
.
modelItemDetail
=
item
;
this
.
thStime
=
this
.
modelItemDetail
.
sTime
.
hour
+
':'
+
this
.
modelItemDetail
.
sTime
.
minute
this
.
thStime
=
this
.
modelItemDetail
.
sTime
.
hour
+
':'
+
this
.
modelItemDetail
.
sTime
.
minute
...
@@ -106,6 +117,7 @@ export class PendingComponent implements OnInit {
...
@@ -106,6 +117,7 @@ export class PendingComponent implements OnInit {
let
SDate
=
this
.
modelItemDetail
.
sDate
.
split
(
'/'
)
let
SDate
=
this
.
modelItemDetail
.
sDate
.
split
(
'/'
)
this
.
sDate
=
SDate
[
2
]
+
"-"
+
SDate
[
1
]
+
"-"
+
SDate
[
0
]
this
.
sDate
=
SDate
[
2
]
+
"-"
+
SDate
[
1
]
+
"-"
+
SDate
[
0
]
let
EDate
=
this
.
modelItemDetail
.
eDate
.
split
(
'/'
)
let
EDate
=
this
.
modelItemDetail
.
eDate
.
split
(
'/'
)
this
.
eDate
=
EDate
[
2
]
+
"-"
+
EDate
[
1
]
+
"-"
+
EDate
[
0
]
console
.
log
(
item
);
console
.
log
(
item
);
this
.
modalService
.
open
(
content
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
modalService
.
open
(
content
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
closeResult
=
`Closed with:
${
result
}
`
;
this
.
closeResult
=
`Closed with:
${
result
}
`
;
...
@@ -114,12 +126,6 @@ export class PendingComponent implements OnInit {
...
@@ -114,12 +126,6 @@ export class PendingComponent implements OnInit {
});
});
}
}
date
=
'10-12-2561'
show
(
a
:
string
){
console
.
log
(
a
)
}
sDate
=
""
eDate
=
""
openRoomDetail
(
content
:
string
,
item
:
RoomDetail
)
{
openRoomDetail
(
content
:
string
,
item
:
RoomDetail
)
{
this
.
modelRoomDetail
=
item
;
this
.
modelRoomDetail
=
item
;
this
.
thStime
=
this
.
modelRoomDetail
.
sTime
.
hour
+
':'
+
this
.
modelRoomDetail
.
sTime
.
minute
this
.
thStime
=
this
.
modelRoomDetail
.
sTime
.
hour
+
':'
+
this
.
modelRoomDetail
.
sTime
.
minute
...
@@ -127,6 +133,7 @@ export class PendingComponent implements OnInit {
...
@@ -127,6 +133,7 @@ export class PendingComponent implements OnInit {
let
SDate
=
this
.
modelRoomDetail
.
sDate
.
split
(
'/'
)
let
SDate
=
this
.
modelRoomDetail
.
sDate
.
split
(
'/'
)
this
.
sDate
=
SDate
[
2
]
+
"-"
+
SDate
[
1
]
+
"-"
+
SDate
[
0
]
this
.
sDate
=
SDate
[
2
]
+
"-"
+
SDate
[
1
]
+
"-"
+
SDate
[
0
]
let
EDate
=
this
.
modelRoomDetail
.
eDate
.
split
(
'/'
)
let
EDate
=
this
.
modelRoomDetail
.
eDate
.
split
(
'/'
)
this
.
eDate
=
EDate
[
2
]
+
"-"
+
EDate
[
1
]
+
"-"
+
EDate
[
0
]
this
.
modalService
.
open
(
content
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
modalService
.
open
(
content
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
closeResult
=
`Closed with:
${
result
}
`
;
this
.
closeResult
=
`Closed with:
${
result
}
`
;
},
(
reason
)
=>
{
},
(
reason
)
=>
{
...
@@ -178,6 +185,7 @@ export class PendingComponent implements OnInit {
...
@@ -178,6 +185,7 @@ export class PendingComponent implements OnInit {
ngOnInit
()
{
ngOnInit
()
{
this
.
listItemDetail
=
this
.
ItemDetailService
.
getListItemDetail
();
this
.
listItemDetail
=
this
.
ItemDetailService
.
getListItemDetail
();
this
.
listRoomDetail
=
this
.
RoomDetailService
.
getListRoomDetail
();
this
.
listRoomDetail
=
this
.
RoomDetailService
.
getListRoomDetail
();
this
.
collectionSizeListRoom
=
this
.
listRoomDetail
.
length
;
console
.
log
(
this
.
listItemDetail
);
console
.
log
(
this
.
listItemDetail
);
}
}
...
...
src/app/service/item-detail.service.ts
View file @
cc22bb61
...
@@ -33,6 +33,7 @@ export class ItemDetailService {
...
@@ -33,6 +33,7 @@ export class ItemDetailService {
eStatus
:
'รอการอนุมัติ'
,
eStatus
:
'รอการอนุมัติ'
,
Quantity
:
'1'
,
Quantity
:
'1'
,
eTelephone
:
undefined
,
eTelephone
:
undefined
,
email
:
undefined
,
Remark
:
'test'
,
Remark
:
'test'
,
},
},
{
{
...
@@ -60,6 +61,7 @@ export class ItemDetailService {
...
@@ -60,6 +61,7 @@ export class ItemDetailService {
eStatus
:
'รอการอนุมัติ'
,
eStatus
:
'รอการอนุมัติ'
,
Quantity
:
'1'
,
Quantity
:
'1'
,
eTelephone
:
undefined
,
eTelephone
:
undefined
,
email
:
undefined
,
Remark
:
'test'
,
Remark
:
'test'
,
},
},
...
...
src/app/service/room-detail.service.ts
View file @
cc22bb61
...
@@ -33,6 +33,7 @@ export class RoomDetailService {
...
@@ -33,6 +33,7 @@ export class RoomDetailService {
},
},
rStatus
:
'รอการอนุมัติ'
,
rStatus
:
'รอการอนุมัติ'
,
rTelephone
:
undefined
,
rTelephone
:
undefined
,
email
:
undefined
,
Remark
:
'test'
,
Remark
:
'test'
,
},
},
{
{
...
@@ -60,6 +61,7 @@ export class RoomDetailService {
...
@@ -60,6 +61,7 @@ export class RoomDetailService {
},
},
rStatus
:
'รอการอนุมัติ'
,
rStatus
:
'รอการอนุมัติ'
,
rTelephone
:
undefined
,
rTelephone
:
undefined
,
email
:
undefined
,
Remark
:
'test'
,
Remark
:
'test'
,
},
},
...
...
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