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
e9fc6aa2
Commit
e9fc6aa2
authored
Feb 08, 2022
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update work
parent
862fec6f
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
563 additions
and
222 deletions
+563
-222
search.model.ts
src/app/models/search.model.ts
+5
-2
type.model.ts
src/app/models/type.model.ts
+9
-0
admin-equirment.component.html
src/app/pages/admin-equirment/admin-equirment.component.html
+37
-1
admin-equirment.component.ts
src/app/pages/admin-equirment/admin-equirment.component.ts
+27
-1
admin-pending.component.html
src/app/pages/admin-pending/admin-pending.component.html
+151
-65
home-page.component.html
src/app/pages/home-page/home-page.component.html
+151
-82
pending.component.html
src/app/pages/pending/pending.component.html
+150
-65
contact.service.ts
src/app/service/contact.service.ts
+1
-1
equirment.service.ts
src/app/service/equirment.service.ts
+1
-1
item-detail.service.ts
src/app/service/item-detail.service.ts
+1
-1
room-detail.service.ts
src/app/service/room-detail.service.ts
+4
-1
room.service.ts
src/app/service/room.service.ts
+1
-1
search.service.ts
src/app/service/search.service.ts
+1
-1
type.service.ts
src/app/service/type.service.ts
+24
-0
No files found.
src/app/models/search.model.ts
View file @
e9fc6aa2
export
class
Search
{
type
:
string
;
sType
:
number
;
sDate
:
string
;
eDate
:
string
;
sStasus
:
number
;
constructor
(
init
?
:
Search
){
Object
.
assign
(
this
,
init
);
this
.
type
=
''
;
this
.
sType
=
0
;
this
.
sDate
=
''
;
this
.
eDate
=
''
;
this
.
sStasus
=
0
;
}
}
\ No newline at end of file
src/app/models/type.model.ts
0 → 100644
View file @
e9fc6aa2
export
class
Type
{
typeId
:
number
;
typeName
:
String
;
constructor
(
init
?:
Type
){
Object
.
assign
(
this
,
init
);
this
.
typeId
=
0
;
this
.
typeName
=
''
;
}
}
src/app/pages/admin-equirment/admin-equirment.component.html
View file @
e9fc6aa2
...
...
@@ -22,6 +22,8 @@
<button
class=
"btn btn-lg btn-outline-primary"
(
click
)="
openRoomDetail
(
contentroom
)"
>
เพิ่มรายการ
</button>
<button
class=
"btn btn-lg btn-outline-primary"
(
click
)="
openType
(
contenttype
)"
>
เพิ่มประเภท
</button>
<div
class=
"row"
>
<div
class=
"col-sm-3"
*
ngFor=
"let item of listRoomModel|slice: (pageListRoom-1) * pageSizeListRoom :(pageListRoom-1) * pageSizeListRoom + pageSizeListRoom ;let i = index"
>
...
...
@@ -77,6 +79,8 @@
<div
class=
"card-body"
>
<button
class=
"btn btn-lg btn-outline-primary"
(
click
)="
openItemDetail
(
contentequirment
)"
>
เพิ่มรายการ
</button>
<button
class=
"btn btn-lg btn-outline-primary"
(
click
)="
openType
(
contenttype
)"
>
เพิ่มประเภท
</button>
<div
class=
"row"
>
<div
class=
"col-sm-3"
...
...
@@ -240,7 +244,7 @@
</div>
<div
class=
" card-footer"
>
<button
class=
" btn btn-fill btn-danger"
[
disabled
]="
myFormRoom
.
invalid
"
type=
"submit"
(
click
)="
save
Room
()"
>
Save
</button>
(
click
)="
save
Type
()"
>
Save
</button>
<button
class=
" btn btn-fill btn-danger"
type=
"cancel"
(
click
)="
modal
.
dismiss
('
Cross
click
')"
>
Cancel
</button>
</div>
...
...
@@ -365,4 +369,35 @@
</div>
</div>
</div>
</ng-template>
<ng-template
#
contenttype
let-model
>
<div
class=
" col-md-12"
style=
"padding: 0; "
>
<div
class=
"card"
style=
"margin: 0; "
>
<div
class=
" card-header"
>
<h5
class=
" title"
>
เพิ่มประเภท
</h5>
</div>
<div
class=
" card-body"
>
<form
[
formGroup
]="
myFormType
"
class=
"needs-validation"
>
<div
class=
" row"
>
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<label>
ชื่อประเภท
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
[(
ngModel
)]="
modelType
.
typeName
"
formControlName=
"typeName"
>
<div
style=
"color: red;"
*
ngIf=
"myFormType.controls.typeName.status=='INVALID'"
>
กรุณากรอกชื่อประเภท.
</div>
</div>
</div>
</div>
</form>
</div>
<div
class=
" card-footer"
>
<button
class=
" btn btn-fill btn-danger"
[
disabled
]="
myFormType
.
invalid
"
type=
"submit"
(
click
)="
saveType
()"
>
Save
</button>
<button
class=
" btn btn-fill btn-danger"
type=
"cancel"
(
click
)="
modal
.
dismiss
('
Cross
click
')"
>
Cancel
</button>
</div>
</div>
</div>
</ng-template>
\ No newline at end of file
src/app/pages/admin-equirment/admin-equirment.component.ts
View file @
e9fc6aa2
...
...
@@ -3,11 +3,13 @@ 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
{
Type
}
from
'src/app/models/type.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'
;
import
{
RoomDetailService
}
from
'src/app/service/room-detail.service'
;
import
{
FormBuilder
,
FormControl
,
FormGroup
,
Validators
}
from
'@angular/forms'
;
import
{
TypeService
}
from
'src/app/service/type.service'
;
@
Component
({
selector
:
'app-admin-equirment'
,
...
...
@@ -42,6 +44,7 @@ export class AdminEquirmentComponent implements OnInit {
modelRoom
:
Room
modelItemDetail
=
new
ItemDetail
();
modelRoomDetail
=
new
RoomDetail
();
modelType
=
new
Type
();
RoomForm
=
new
FormGroup
({
rId
:
new
FormControl
(
''
),
...
...
@@ -54,9 +57,10 @@ export class AdminEquirmentComponent implements OnInit {
myFormRoom
:
FormGroup
;
myFormEquir
:
FormGroup
;
myFormType
:
FormGroup
;
constructor
(
private
modalService
:
NgbModal
,
private
equirmentService
:
EquirmentService
,
private
roomService
:
RoomService
,
private
RoomDetailService
:
RoomDetailService
,
private
fb
:
FormBuilder
)
{
,
private
fb
:
FormBuilder
,
private
typeService
:
TypeService
)
{
}
ngOnInit
()
{
...
...
@@ -97,6 +101,10 @@ export class AdminEquirmentComponent implements OnInit {
Quantity
:
new
FormControl
(
''
,[
Validators
.
required
]),
remark
:
new
FormControl
(
''
),
})
this
.
myFormType
=
new
FormGroup
({
Type
:
new
FormControl
(
''
,[
Validators
.
required
]),
})
}
...
...
@@ -228,6 +236,18 @@ export class AdminEquirmentComponent implements OnInit {
});
}
openType
(
contenttype
)
{
this
.
modelType
=
new
Type
();
this
.
myFormType
=
new
FormGroup
({
typeId
:
new
FormControl
(
this
.
modelType
.
typeId
,[
Validators
.
required
]),
typeName
:
new
FormControl
(
this
.
modelType
.
typeName
,[
Validators
.
required
]),
})
this
.
modalService
.
open
(
contenttype
,
{
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
)
{
...
...
@@ -265,6 +285,12 @@ export class AdminEquirmentComponent implements OnInit {
}
saveType
(){
// this.typeService.addType(this.modelType);
this
.
modalService
.
dismissAll
();
this
.
ngOnInit
();
}
editRoom
()
{
this
.
roomService
.
editroom
(
this
.
modelRoom
);
this
.
modalService
.
dismissAll
();
...
...
src/app/pages/admin-pending/admin-pending.component.html
View file @
e9fc6aa2
<div
class=
" content"
>
<div
class=
"row"
>
<div
class=
"col-sm-8"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<form
class=
"form-inline"
>
<div
class=
"form-group hidden"
>
<div
class=
"input-group"
>
<input
name=
"datepicker"
class=
"form-control"
ngbDatepicker
#
datepicker=
"ngbDatepicker"
[
autoClose
]="'
outside
'"
(
dateSelect
)="
onDateSelection
($
event
)"
[
displayMonths
]="
2
"
[
dayTemplate
]="
t
"
outsideDays=
"hidden"
[
startDate
]="
fromDate
!"
tabindex=
"-1"
>
<ng-template
#
t
let-date
let-focused=
"focused"
>
<span
class=
"custom-day"
[
class
.
focused
]="
focused
"
[
class
.
range
]="
isRange
(
date
)"
[
class
.
faded
]="
isHovered
(
date
)
||
isInside
(
date
)"
(
mouseenter
)="
hoveredDate =
date"
(
mouseleave
)="
hoveredDate =
null"
>
{{ date.day }}
</span>
</ng-template>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"input-group"
>
<input
#
dpFromDate
class=
"form-control"
placeholder=
"yyyy-mm-dd"
name=
"dpFromDate"
[
value
]="
formatter
.
format
(
fromDate
)"
(
input
)="
fromDate =
validateInput(fromDate,
dpFromDate
.
value
)"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary calendar"
(
click
)="
datepicker
.
toggle
()"
type=
"button"
></button>
</div>
</div>
</div>
<div
class=
"form-group ml-2"
>
<div
class=
"input-group"
>
<input
#
dpToDate
class=
"form-control"
placeholder=
"yyyy-mm-dd"
name=
"dpToDate"
[
value
]="
formatter
.
format
(
toDate
)"
(
input
)="
toDate =
validateInput(toDate,
dpToDate
.
value
)"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary calendar"
(
click
)="
datepicker
.
toggle
()"
type=
"button"
></button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<div
class=
"col-4"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<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>
<button
class=
"btn btn-sm btn-outline-success"
type=
"submit"
>
Search
</button>
</div>
</div>
</div>
</div>
</div>
<ul
ngbNav
#
nav=
"ngbNav"
class=
"nav-tabs"
>
<li
ngbNavItem
>
<a
ngbNavLink
>
การจอง
</a>
...
...
@@ -71,6 +6,82 @@
<div
class=
"row text-center"
>
<div
class=
"col-sm-12"
>
<div
class=
"card"
>
<div
class=
"card-header"
>
<div
class=
"col-sm-12"
>
<form
class=
"form-inline"
>
<div
class=
"form-group hidden"
>
<div
class=
"input-group"
>
<input
name=
"datepicker"
class=
"form-control"
ngbDatepicker
#
datepicker=
"ngbDatepicker"
[
autoClose
]="'
outside
'"
(
dateSelect
)="
onDateSelection
($
event
)"
[
displayMonths
]="
2
"
[
dayTemplate
]="
t
"
outsideDays=
"hidden"
[
startDate
]="
fromDate
!"
tabindex=
"-1"
>
<ng-template
#
t
let-date
let-focused=
"focused"
>
<span
class=
"custom-day"
[
class
.
focused
]="
focused
"
[
class
.
range
]="
isRange
(
date
)"
[
class
.
faded
]="
isHovered
(
date
)
||
isInside
(
date
)"
(
mouseenter
)="
hoveredDate =
date"
(
mouseleave
)="
hoveredDate =
null"
>
{{ date.day }}
</span>
</ng-template>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"input-group"
>
<input
#
dpFromDate
class=
"form-control"
placeholder=
"yyyy-mm-dd"
name=
"dpFromDate"
[
value
]="
formatter
.
format
(
fromDate
)"
(
input
)="
fromDate =
validateInput(fromDate,
dpFromDate
.
value
)"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary calendar"
(
click
)="
datepicker
.
toggle
()"
type=
"button"
></button>
</div>
</div>
</div>
<div
class=
"form-group ml-2"
>
<div
class=
"input-group"
>
<input
#
dpToDate
class=
"form-control"
placeholder=
"yyyy-mm-dd"
name=
"dpToDate"
[
value
]="
formatter
.
format
(
toDate
)"
(
input
)="
toDate =
validateInput(toDate,
dpToDate
.
value
)"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary calendar"
(
click
)="
datepicker
.
toggle
()"
type=
"button"
></button>
</div>
</div>
</div>
<div
class=
"form-group ml-3"
>
<div
class=
"input-group"
>
<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>
<button
class=
"btn btn-sm btn-outline-success"
type=
"submit"
>
Search
</button>
</div>
</div>
</div>
</form>
</div>
<!-- <div class="col-4">
<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>
<button class="btn btn-sm btn-outline-success" type="submit">Search</button>
</div>
</div> -->
</div>
<div
class=
"card-body"
>
<table
class=
"table table-striped"
>
<thead>
...
...
@@ -133,6 +144,81 @@
<div
class=
"row text-center"
>
<div
class=
"col-sm-12"
>
<div
class=
"card"
>
<div
class=
"card-header"
>
<div
class=
"col-sm-12"
>
<form
class=
"form-inline"
>
<div
class=
"form-group hidden"
>
<div
class=
"input-group"
>
<input
name=
"datepicker"
class=
"form-control"
ngbDatepicker
#
datepicker=
"ngbDatepicker"
[
autoClose
]="'
outside
'"
(
dateSelect
)="
onDateSelection
($
event
)"
[
displayMonths
]="
2
"
[
dayTemplate
]="
t
"
outsideDays=
"hidden"
[
startDate
]="
fromDate
!"
tabindex=
"-1"
>
<ng-template
#
t
let-date
let-focused=
"focused"
>
<span
class=
"custom-day"
[
class
.
focused
]="
focused
"
[
class
.
range
]="
isRange
(
date
)"
[
class
.
faded
]="
isHovered
(
date
)
||
isInside
(
date
)"
(
mouseenter
)="
hoveredDate =
date"
(
mouseleave
)="
hoveredDate =
null"
>
{{ date.day }}
</span>
</ng-template>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"input-group"
>
<input
#
dpFromDate
class=
"form-control"
placeholder=
"yyyy-mm-dd"
name=
"dpFromDate"
[
value
]="
formatter
.
format
(
fromDate
)"
(
input
)="
fromDate =
validateInput(fromDate,
dpFromDate
.
value
)"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary calendar"
(
click
)="
datepicker
.
toggle
()"
type=
"button"
></button>
</div>
</div>
</div>
<div
class=
"form-group ml-2"
>
<div
class=
"input-group"
>
<input
#
dpToDate
class=
"form-control"
placeholder=
"yyyy-mm-dd"
name=
"dpToDate"
[
value
]="
formatter
.
format
(
toDate
)"
(
input
)="
toDate =
validateInput(toDate,
dpToDate
.
value
)"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary calendar"
(
click
)="
datepicker
.
toggle
()"
type=
"button"
></button>
</div>
</div>
</div>
<div
class=
"form-group ml-3"
>
<div
class=
"input-group"
>
<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>
<button
class=
"btn btn-sm btn-outline-success"
type=
"submit"
>
Search
</button>
</div>
</div>
</div>
</form>
</div>
<!-- <div class="col-4">
<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>
<button class="btn btn-sm btn-outline-success" type="submit">Search</button>
</div>
</div> -->
</div>
<div
class=
"card-body"
>
<table
class=
"table table-striped"
>
<thead>
...
...
src/app/pages/home-page/home-page.component.html
View file @
e9fc6aa2
<div
class=
" content"
>
<div
class=
"row"
>
<div
class=
"col-sm-8"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<form
class=
"form-inline"
>
<div
class=
"form-group hidden"
>
<div
class=
"input-group"
>
<input
name=
"datepicker"
class=
"form-control"
ngbDatepicker
#
datepicker=
"ngbDatepicker"
[
autoClose
]="'
outside
'"
(
dateSelect
)="
onDateSelection
($
event
)"
[
displayMonths
]="
2
"
[
dayTemplate
]="
t
"
outsideDays=
"hidden"
[
startDate
]="
fromDate
!"
tabindex=
"-1"
>
<ng-template
#
t
let-date
let-focused=
"focused"
>
<span
class=
"custom-day"
[
class
.
focused
]="
focused
"
[
class
.
range
]="
isRange
(
date
)"
[
class
.
faded
]="
isHovered
(
date
)
||
isInside
(
date
)"
(
mouseenter
)="
hoveredDate =
date"
(
mouseleave
)="
hoveredDate =
null"
>
{{ date.day }}
</span>
</ng-template>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"input-group"
>
<input
#
dpFromDate
class=
"form-control"
placeholder=
"yyyy-mm-dd"
name=
"dpFromDate"
[
value
]="
formatter
.
format
(
fromDate
)"
(
input
)="
fromDate =
validateInput(fromDate,
dpFromDate
.
value
)"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary calendar"
(
click
)="
datepicker
.
toggle
()"
type=
"button"
></button>
<div
class=
"content"
>
<ul
ngbNav
#
nav=
"ngbNav"
(
navChange
)="
onNavChange
($
event
)"
class=
"nav-tabs"
>
<li
ngbNavItem
>
<a
ngbNavLink
>
ปฏิทินการจอง
</a>
<ng-template
ngbNavContent
>
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<div
class=
"card"
>
<div
class=
"card-header"
>
<div
class=
"col-sm-12"
>
<form
class=
"form-inline"
>
<div
class=
"form-group hidden"
>
<div
class=
"input-group"
>
<input
name=
"datepicker"
class=
"form-control"
ngbDatepicker
#
datepicker=
"ngbDatepicker"
[
autoClose
]="'
outside
'"
(
dateSelect
)="
onDateSelection
($
event
)"
[
displayMonths
]="
2
"
[
dayTemplate
]="
t
"
outsideDays=
"hidden"
[
startDate
]="
fromDate
!"
tabindex=
"-1"
>
<ng-template
#
t
let-date
let-focused=
"focused"
>
<span
class=
"custom-day"
[
class
.
focused
]="
focused
"
[
class
.
range
]="
isRange
(
date
)"
[
class
.
faded
]="
isHovered
(
date
)
||
isInside
(
date
)"
(
mouseenter
)="
hoveredDate =
date"
(
mouseleave
)="
hoveredDate =
null"
>
{{ date.day }}
</span>
</ng-template>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"input-group"
>
<input
#
dpFromDate
class=
"form-control"
placeholder=
"yyyy-mm-dd"
name=
"dpFromDate"
[
value
]="
formatter
.
format
(
fromDate
)"
(
input
)="
fromDate =
validateInput(fromDate,
dpFromDate
.
value
)"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary calendar"
(
click
)="
datepicker
.
toggle
()"
type=
"button"
></button>
</div>
</div>
</div>
<div
class=
"form-group ml-2"
>
<div
class=
"input-group"
>
<input
#
dpToDate
class=
"form-control"
placeholder=
"yyyy-mm-dd"
name=
"dpToDate"
[
value
]="
formatter
.
format
(
toDate
)"
(
input
)="
toDate =
validateInput(toDate,
dpToDate
.
value
)"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary calendar"
(
click
)="
datepicker
.
toggle
()"
type=
"button"
></button>
</div>
</div>
</div>
<div
class=
"form-group ml-3"
>
<div
class=
"input-group"
>
<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>
<button
class=
"btn btn-sm btn-outline-success"
type=
"submit"
>
Search
</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<div
class=
"form-group ml-2"
>
<div
class=
"input-group"
>
<input
#
dpToDate
class=
"form-control"
placeholder=
"yyyy-mm-dd"
name=
"dpToDate"
[
value
]="
formatter
.
format
(
toDate
)"
(
input
)="
toDate =
validateInput(toDate,
dpToDate
.
value
)"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary calendar"
(
click
)="
datepicker
.
toggle
()"
type=
"button"
></button>
</div>
<div
class=
"card-body"
>
<full-calendar
#
calendarBook
[
options
]="
calendarRoom
"
style=
"
margin-top: 20px;"
*
ngIf=
"listRoomDetail.length > 0"
></full-calendar>
</div>
</div>
</
form
>
</
div
>
</div>
</div>
</div>
<div
class=
"col-4"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<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>
</ng-template>
</li>
<li
ngbNavItem
>
<a
ngbNavLink
>
ปฏิทินการยืมอุปกรณ์
</a>
<ng-template
ngbNavContent
>
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<div
class=
"card"
>
<div
class=
"card-header"
>
<div
class=
"col-sm-12"
>
<form
class=
"form-inline"
>
<div
class=
"form-group hidden"
>
<div
class=
"input-group"
>
<input
name=
"datepicker"
class=
"form-control"
ngbDatepicker
#
datepicker=
"ngbDatepicker"
[
autoClose
]="'
outside
'"
(
dateSelect
)="
onDateSelection
($
event
)"
[
displayMonths
]="
2
"
[
dayTemplate
]="
t
"
outsideDays=
"hidden"
[
startDate
]="
fromDate
!"
tabindex=
"-1"
>
<ng-template
#
t
let-date
let-focused=
"focused"
>
<span
class=
"custom-day"
[
class
.
focused
]="
focused
"
[
class
.
range
]="
isRange
(
date
)"
[
class
.
faded
]="
isHovered
(
date
)
||
isInside
(
date
)"
(
mouseenter
)="
hoveredDate =
date"
(
mouseleave
)="
hoveredDate =
null"
>
{{ date.day }}
</span>
</ng-template>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"input-group"
>
<input
#
dpFromDate
class=
"form-control"
placeholder=
"yyyy-mm-dd"
name=
"dpFromDate"
[
value
]="
formatter
.
format
(
fromDate
)"
(
input
)="
fromDate =
validateInput(fromDate,
dpFromDate
.
value
)"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary calendar"
(
click
)="
datepicker
.
toggle
()"
type=
"button"
></button>
</div>
</div>
</div>
<div
class=
"form-group ml-2"
>
<div
class=
"input-group"
>
<input
#
dpToDate
class=
"form-control"
placeholder=
"yyyy-mm-dd"
name=
"dpToDate"
[
value
]="
formatter
.
format
(
toDate
)"
(
input
)="
toDate =
validateInput(toDate,
dpToDate
.
value
)"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary calendar"
(
click
)="
datepicker
.
toggle
()"
type=
"button"
></button>
</div>
</div>
</div>
<div
class=
"form-group ml-3"
>
<div
class=
"input-group"
>
<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>
<button
class=
"btn btn-sm btn-outline-success"
type=
"submit"
>
Search
</button>
</div>
</div>
</div>
</form>
</div>
</div>
<div
class=
"card-body"
>
<full-calendar
#
calenderLend
[
options
]="
calendarEquirment
"
style=
"margin-top: 20px;"
*
ngIf=
"listItemDetail.length> 0"
></full-calendar>
</div>
</div>
<button
class=
"btn btn-sm btn-outline-success"
type=
"submit"
>
Search
</button>
</div>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<ul
ngbNav
#
nav=
"ngbNav"
[(
activeId
)]="
active
"
(
navChange
)="
onNavChange
($
event
)"
class=
"nav-tabs"
>
<li
[
ngbNavItem
]="
1
"
>
<a
ngbNavLink
>
ปฏิทินการจอง
</a>
<ng-template
ngbNavContent
>
<full-calendar
#
calendarBook
[
options
]="
calendarRoom
"
style=
"
margin-top: 20px;"
*
ngIf=
"listRoomDetail.length > 0"
></full-calendar>
</ng-template>
</li>
<li
[
ngbNavItem
]="
2
"
>
<a
ngbNavLink
>
ปฏิทินการยืมอุปกรณ์
</a>
<ng-template
ngbNavContent
>
<full-calendar
#
calendar
[
options
]="
calendarEquirment
"
style=
"
margin-top: 20px;"
*
ngIf=
"listRoomDetail.length > 0"
></full-calendar>
</ng-template>
</li>
</ul>
<div
[
ngbNavOutlet
]="
nav
"
></div>
</div>
</div>
</div>
</div>
</ng-template>
</li>
</ul>
<div
[
ngbNavOutlet
]="
nav
"
></div>
</div>
\ No newline at end of file
src/app/pages/pending/pending.component.html
View file @
e9fc6aa2
<div
class=
" content"
>
<div
class=
"row"
>
<div
class=
"col-sm-8"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<form
class=
"form-inline"
>
<div
class=
"form-group hidden"
>
<div
class=
"input-group"
>
<input
name=
"datepicker"
class=
"form-control"
ngbDatepicker
#
datepicker=
"ngbDatepicker"
[
autoClose
]="'
outside
'"
(
dateSelect
)="
onDateSelection
($
event
)"
[
displayMonths
]="
2
"
[
dayTemplate
]="
t
"
outsideDays=
"hidden"
[
startDate
]="
fromDate
!"
tabindex=
"-1"
>
<ng-template
#
t
let-date
let-focused=
"focused"
>
<span
class=
"custom-day"
[
class
.
focused
]="
focused
"
[
class
.
range
]="
isRange
(
date
)"
[
class
.
faded
]="
isHovered
(
date
)
||
isInside
(
date
)"
(
mouseenter
)="
hoveredDate =
date"
(
mouseleave
)="
hoveredDate =
null"
>
{{ date.day }}
</span>
</ng-template>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"input-group"
>
<input
#
dpFromDate
class=
"form-control"
placeholder=
"yyyy-mm-dd"
name=
"dpFromDate"
[
value
]="
formatter
.
format
(
fromDate
)"
(
input
)="
fromDate =
validateInput(fromDate,
dpFromDate
.
value
)"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary calendar"
(
click
)="
datepicker
.
toggle
()"
type=
"button"
></button>
</div>
</div>
</div>
<div
class=
"form-group ml-2"
>
<div
class=
"input-group"
>
<input
#
dpToDate
class=
"form-control"
placeholder=
"yyyy-mm-dd"
name=
"dpToDate"
[
value
]="
formatter
.
format
(
toDate
)"
(
input
)="
toDate =
validateInput(toDate,
dpToDate
.
value
)"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary calendar"
(
click
)="
datepicker
.
toggle
()"
type=
"button"
></button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<div
class=
"col-4"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<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>
<button
class=
"btn btn-sm btn-outline-success"
type=
"submit"
>
Search
</button>
</div>
</div>
</div>
</div>
</div>
<ul
ngbNav
#
nav=
"ngbNav"
class=
"nav-tabs"
>
<li
ngbNavItem
>
<a
ngbNavLink
>
การจอง
</a>
...
...
@@ -71,6 +6,81 @@
<div
class=
"row text-center"
>
<div
class=
"col-sm-12"
>
<div
class=
"card"
>
<div
class=
"card-header"
>
<div
class=
"col-sm-12"
>
<form
class=
"form-inline"
>
<div
class=
"form-group hidden"
>
<div
class=
"input-group"
>
<input
name=
"datepicker"
class=
"form-control"
ngbDatepicker
#
datepicker=
"ngbDatepicker"
[
autoClose
]="'
outside
'"
(
dateSelect
)="
onDateSelection
($
event
)"
[
displayMonths
]="
2
"
[
dayTemplate
]="
t
"
outsideDays=
"hidden"
[
startDate
]="
fromDate
!"
tabindex=
"-1"
>
<ng-template
#
t
let-date
let-focused=
"focused"
>
<span
class=
"custom-day"
[
class
.
focused
]="
focused
"
[
class
.
range
]="
isRange
(
date
)"
[
class
.
faded
]="
isHovered
(
date
)
||
isInside
(
date
)"
(
mouseenter
)="
hoveredDate =
date"
(
mouseleave
)="
hoveredDate =
null"
>
{{ date.day }}
</span>
</ng-template>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"input-group"
>
<input
#
dpFromDate
class=
"form-control"
placeholder=
"yyyy-mm-dd"
name=
"dpFromDate"
[
value
]="
formatter
.
format
(
fromDate
)"
(
input
)="
fromDate =
validateInput(fromDate,
dpFromDate
.
value
)"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary calendar"
(
click
)="
datepicker
.
toggle
()"
type=
"button"
></button>
</div>
</div>
</div>
<div
class=
"form-group ml-2"
>
<div
class=
"input-group"
>
<input
#
dpToDate
class=
"form-control"
placeholder=
"yyyy-mm-dd"
name=
"dpToDate"
[
value
]="
formatter
.
format
(
toDate
)"
(
input
)="
toDate =
validateInput(toDate,
dpToDate
.
value
)"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary calendar"
(
click
)="
datepicker
.
toggle
()"
type=
"button"
></button>
</div>
</div>
</div>
<div
class=
"form-group ml-3"
>
<div
class=
"input-group"
>
<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>
<button
class=
"btn btn-sm btn-outline-success"
type=
"submit"
>
Search
</button>
</div>
</div>
</div>
</form>
</div>
<!-- <div class="col-sm-4">
<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>
<button class="btn btn-sm btn-outline-success" type="submit">Search</button>
</div>
</div> -->
</div>
<div
class=
"card-body"
>
<table
class=
"table table-striped"
>
<thead>
...
...
@@ -134,6 +144,81 @@
<div
class=
"row text-center"
>
<div
class=
"col-sm-12"
>
<div
class=
"card"
>
<div
class=
"card-header"
>
<div
class=
"col-sm-12"
>
<form
class=
"form-inline"
>
<div
class=
"form-group hidden"
>
<div
class=
"input-group"
>
<input
name=
"datepicker"
class=
"form-control"
ngbDatepicker
#
datepicker=
"ngbDatepicker"
[
autoClose
]="'
outside
'"
(
dateSelect
)="
onDateSelection
($
event
)"
[
displayMonths
]="
2
"
[
dayTemplate
]="
t
"
outsideDays=
"hidden"
[
startDate
]="
fromDate
!"
tabindex=
"-1"
>
<ng-template
#
t
let-date
let-focused=
"focused"
>
<span
class=
"custom-day"
[
class
.
focused
]="
focused
"
[
class
.
range
]="
isRange
(
date
)"
[
class
.
faded
]="
isHovered
(
date
)
||
isInside
(
date
)"
(
mouseenter
)="
hoveredDate =
date"
(
mouseleave
)="
hoveredDate =
null"
>
{{ date.day }}
</span>
</ng-template>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"input-group"
>
<input
#
dpFromDate
class=
"form-control"
placeholder=
"yyyy-mm-dd"
name=
"dpFromDate"
[
value
]="
formatter
.
format
(
fromDate
)"
(
input
)="
fromDate =
validateInput(fromDate,
dpFromDate
.
value
)"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary calendar"
(
click
)="
datepicker
.
toggle
()"
type=
"button"
></button>
</div>
</div>
</div>
<div
class=
"form-group ml-2"
>
<div
class=
"input-group"
>
<input
#
dpToDate
class=
"form-control"
placeholder=
"yyyy-mm-dd"
name=
"dpToDate"
[
value
]="
formatter
.
format
(
toDate
)"
(
input
)="
toDate =
validateInput(toDate,
dpToDate
.
value
)"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary calendar"
(
click
)="
datepicker
.
toggle
()"
type=
"button"
></button>
</div>
</div>
</div>
<div
class=
"form-group ml-3"
>
<div
class=
"input-group"
>
<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>
<button
class=
"btn btn-sm btn-outline-success"
type=
"submit"
>
Search
</button>
</div>
</div>
</div>
</form>
</div>
<!-- <div class="col-4">
<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>
<button class="btn btn-sm btn-outline-success" type="submit">Search</button>
</div>
</div> -->
</div>
<div
class=
"card-body"
>
<table
class=
"table table-striped"
>
<thead>
...
...
src/app/service/contact.service.ts
View file @
e9fc6aa2
...
...
@@ -7,7 +7,7 @@ import { Contact } from "../models/contact.model";
export
class
ContactService
{
constructor
(
private
http
:
HttpClient
)
{
}
url
:
string
=
"http://
915e-49-0-64-28
.ngrok.io"
;
url
:
string
=
"http://
5fa9-110-169-221-194
.ngrok.io"
;
listContact
:
Contact
[]
=
[]
addContact
(
model
:
Contact
)
{
...
...
src/app/service/equirment.service.ts
View file @
e9fc6aa2
...
...
@@ -8,7 +8,7 @@ import { Observable } from 'rxjs';
export
class
EquirmentService
{
constructor
(
private
http
:
HttpClient
)
{
}
url
:
string
=
"http://
915e-49-0-64-28
.ngrok.io"
;
url
:
string
=
"http://
5fa9-110-169-221-194
.ngrok.io"
;
listEquirment
:
Equirment
[]
=
[]
addEquirment
(
model
:
Equirment
)
{
...
...
src/app/service/item-detail.service.ts
View file @
e9fc6aa2
...
...
@@ -7,7 +7,7 @@ import { Observable } from 'rxjs';
export
class
ItemDetailService
{
constructor
(
private
http
:
HttpClient
)
{
}
url
:
string
=
"http://
915e-49-0-64-28
.ngrok.io"
;
url
:
string
=
"http://
5fa9-110-169-221-194
.ngrok.io"
;
listItemDetail
:
ItemDetail
[]
=
[]
addItemDetail
(
model
:
ItemDetail
)
{
...
...
src/app/service/room-detail.service.ts
View file @
e9fc6aa2
...
...
@@ -6,9 +6,12 @@ import { Observable } from 'rxjs';
@
Injectable
({
providedIn
:
'root'
})
export
class
RoomDetailService
{
open
(
contenttype
:
any
,
arg1
:
{
ariaLabelledBy
:
string
;
})
{
throw
new
Error
(
'Method not implemented.'
);
}
constructor
(
private
http
:
HttpClient
)
{
}
url
:
string
=
"http://
915e-49-0-64-28
.ngrok.io"
;
url
:
string
=
"http://
5fa9-110-169-221-194
.ngrok.io"
;
listRoomDetail
:
RoomDetail
[]
=
[]
editRoomDetail
(
model
:
RoomDetail
)
{
...
...
src/app/service/room.service.ts
View file @
e9fc6aa2
...
...
@@ -7,7 +7,7 @@ import { RoomDetail } from '../models/RoomDetail.model';
export
class
RoomService
{
constructor
(
private
http
:
HttpClient
)
{
}
url
:
string
=
"http://
915e-49-0-64-28
.ngrok.io"
;
url
:
string
=
"http://
5fa9-110-169-221-194
.ngrok.io"
;
listRoomModel
:
Room
[]
=
[]
listRoomSearch
:
Room
[]
=
[];
...
...
src/app/service/search.service.ts
View file @
e9fc6aa2
...
...
@@ -6,7 +6,7 @@ import { Search } from '../models/search.model';
export
class
SearchService
{
constructor
(
private
http
:
HttpClient
)
{}
url
:
string
=
"http://
915e-49-0-64-28
.ngrok.io"
;
url
:
string
=
"http://
5fa9-110-169-221-194
.ngrok.io"
;
listSearch
:
Search
[]
=
[]
getListSearch
(){
...
...
src/app/service/type.service.ts
0 → 100644
View file @
e9fc6aa2
import
{
HttpClient
}
from
'@angular/common/http'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
Observable
}
from
'rxjs'
;
import
{
Type
}
from
'../models/type.model'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
TypeService
{
// addType(modelType: Function) {
// throw new Error('Method not implemented.');
// }
constructor
(
private
http
:
HttpClient
)
{
}
url
:
string
=
"http://5fa9-110-169-221-194.ngrok.io"
;
listType
:
Type
[]
=
[]
addType
(
model
:
Type
)
{
this
.
listType
.
push
(
model
);
this
.
listType
.
reverse
}
getListType
():
Observable
<
Type
[]
>
{
return
this
.
http
.
get
<
Type
[]
>
(
this
.
url
+
"/Type/lists"
);
}
}
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