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
2b192e68
Commit
2b192e68
authored
Dec 03, 2021
by
DESKTOP-HF0LVOG\myhr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update ปุ่มกดจองห้อง
parent
1e0fa993
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
12 deletions
+37
-12
rooms.model.ts
src/app/models/rooms.model.ts
+2
-0
equipment.component.html
src/app/pages/equipment/equipment.component.html
+10
-10
equipment.component.ts
src/app/pages/equipment/equipment.component.ts
+24
-1
pending.component.html
src/app/pages/pending/pending.component.html
+1
-1
No files found.
src/app/models/rooms.model.ts
View file @
2b192e68
import
{
roomDetail
}
from
"./roomDetail.model"
export
class
Room
{
rId
:
number
;
rName
:
string
;
...
...
src/app/pages/equipment/equipment.component.html
View file @
2b192e68
...
...
@@ -38,7 +38,7 @@
<div
class=
"text-center"
>
<div
class=
"d-grid gap-2 a-md-flex justify-content-md-end "
>
<button
class=
"btn btn-sm btn-outline-primary"
(
click
)="
Ropen
(
Roo
m
)"
>
จอง
</button>
(
click
)="
bookRoom
(
Room
,
ite
m
)"
>
จอง
</button>
</div>
</div>
</div>
...
...
@@ -238,7 +238,7 @@
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<label>
ชื่อผู้จอง
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
value=
""
/>
<input
class=
" form-control"
placeholder=
""
type=
"text"
value=
""
[(
ngModel
)]="
modelroomDetail
.
userName
"
/>
</div>
</div>
</div>
...
...
@@ -253,33 +253,33 @@
<div
class=
"row"
>
<div
class=
"col-sm-12 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
ชื่อห้อง
</label>
<input
readonly
class=
"form-control"
type=
"text"
value=
"
"
>
<input
readonly
class=
"form-control"
type=
"text"
[
value
]="
modelroomDetail
.
room
.
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=
"
"
>
<input
readonly
class=
"form-control"
type=
"text"
[
value
]="
modelroomDetail
.
room
.
rDesc
"
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่เริ่มต้น
</label>
<input
type=
"date"
class=
"form-control"
value=
""
>
<input
type=
"date"
class=
"form-control"
value=
""
[(
ngModel
)]="
modelroomDetail
.
sDate
"
>
</div>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่สิ้นสุด
</label>
<input
type=
"date"
class=
"form-control"
value=
""
>
<input
type=
"date"
class=
"form-control"
value=
""
[(
ngModel
)]="
modelroomDetail
.
eDate
"
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
เวลาที่เริ่มต้น
</label>
<ngb-timepicker
[(
ngModel
)]="
st
ime
"
></ngb-timepicker>
<ngb-timepicker
[(
ngModel
)]="
modelroomDetail
.
sT
ime
"
></ngb-timepicker>
</div>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
เวลาที่สิ้นสุด
</label>
<ngb-timepicker
[(
ngModel
)]="
etime
"
></ngb-timepicker>
<ngb-timepicker
[(
ngModel
)]="
modelroomDetail
.
etime
"
></ngb-timepicker>
</div>
</div>
<div
class=
" row"
>
...
...
@@ -287,14 +287,14 @@
<div
class=
" form-group"
>
<label>
หมายเหตุ
</label>
<textarea
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
placeholder=
"......"
></textarea>
placeholder=
"......"
[(
ngModel
)]="
modelroomDetail
.
Remark
"
></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=
"submit"
(
click
)="
saveBook
()"
>
Save
</button>
<button
class=
" btn btn-fill btn-danger"
type=
"close"
>
Cancel
</button>
</div>
</div>
...
...
src/app/pages/equipment/equipment.component.ts
View file @
2b192e68
...
...
@@ -2,10 +2,12 @@ import { Component, OnInit } from '@angular/core';
import
{
NgbModal
,
ModalDismissReasons
}
from
'@ng-bootstrap/ng-bootstrap'
;
import
{
Equirment
}
from
'src/app/models/equirment.model'
;
import
{
itemDetail
}
from
'src/app/models/itemDetail.model'
;
import
{
roomDetail
}
from
'src/app/models/roomDetail.model'
;
import
{
Room
}
from
'src/app/models/rooms.model'
;
import
{
EquirmentService
}
from
'src/app/service/equirment.service'
;
import
{
itemDetailService
}
from
'src/app/service/item-detail.service'
;
import
{
RoomService
}
from
'src/app/service/room.service'
;
import
{
roomDetailService
}
from
'src/app/service/room-detail.service'
;
@
Component
({
...
...
@@ -27,8 +29,9 @@ export class EquipmentComponent implements OnInit {
modelEquirment
=
new
Equirment
();
modelRoom
=
new
Room
();
modelitemDetail
=
new
itemDetail
();
modelroomDetail
=
new
roomDetail
();
constructor
(
private
modalService
:
NgbModal
,
private
equirmentService
:
EquirmentService
,
private
roomService
:
RoomService
,
private
itemDetailService
:
itemDetailService
)
{
constructor
(
private
modalService
:
NgbModal
,
private
equirmentService
:
EquirmentService
,
private
roomService
:
RoomService
,
private
itemDetailService
:
itemDetailService
,
private
roomDetailService
:
roomDetailService
)
{
}
...
...
@@ -61,6 +64,19 @@ export class EquipmentComponent implements OnInit {
});
}
bookRoom
(
Room
,
item
:
Room
)
{
this
.
modelroomDetail
=
new
roomDetail
();
this
.
modelroomDetail
.
room
=
item
;
console
.
log
(
"room"
,
this
.
modelroomDetail
);
this
.
modalService
.
open
(
Room
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
closeResult
=
`Closed with:
${
result
}
`
;
},
(
reason
)
=>
{
this
.
closeResult
=
`Dismissed
${
this
.
getDismissReason
(
reason
)}
`
;
});
}
Ropen
(
contentroom
)
{
this
.
modelRoom
=
new
Room
();
this
.
modalService
.
open
(
contentroom
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
...
...
@@ -113,5 +129,12 @@ export class EquipmentComponent implements OnInit {
this
.
ngOnInit
();
console
.
log
(
this
.
itemDetailService
);
}
saveBook
()
{
this
.
roomDetailService
.
addroomDetail
(
this
.
modelroomDetail
);
this
.
modalService
.
dismissAll
();
this
.
ngOnInit
();
console
.
log
(
this
.
roomDetailService
);
}
}
src/app/pages/pending/pending.component.html
View file @
2b192e68
...
...
@@ -76,7 +76,7 @@
<thead>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
ชื่อ
อุปกรณ์
</th>
<th
scope=
"col"
>
ชื่อ
ห้อง
</th>
<th
scope=
"col"
>
รายละเอียด
</th>
<th
scope=
"col"
>
ชื่อผู้เบิก
</th>
<th
scope=
"col"
>
วันที่เริ่มต้น
</th>
...
...
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