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
c77efee4
Commit
c77efee4
authored
Feb 03, 2022
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update หมวดหมู่ api eq , ad eq
parent
749dd2e3
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
51 additions
and
53 deletions
+51
-53
equirment.model.ts
src/app/models/equirment.model.ts
+2
-2
rooms.model.ts
src/app/models/rooms.model.ts
+3
-3
admin-equirment.component.html
src/app/pages/admin-equirment/admin-equirment.component.html
+2
-1
admin-pending.component.html
src/app/pages/admin-pending/admin-pending.component.html
+18
-10
admin-pending.component.ts
src/app/pages/admin-pending/admin-pending.component.ts
+2
-6
equipment.component.html
src/app/pages/equipment/equipment.component.html
+10
-7
home-page.component.ts
src/app/pages/home-page/home-page.component.ts
+2
-6
pending.component.ts
src/app/pages/pending/pending.component.ts
+2
-6
equirment.service.ts
src/app/service/equirment.service.ts
+1
-1
item-detail.service.ts
src/app/service/item-detail.service.ts
+4
-4
room-detail.service.ts
src/app/service/room-detail.service.ts
+4
-6
room.service.ts
src/app/service/room.service.ts
+1
-1
No files found.
src/app/models/equirment.model.ts
View file @
c77efee4
...
...
@@ -2,14 +2,14 @@ export class Equirment {
eqId
:
number
;
eqName
:
string
;
eqDesc
:
string
;
eqType
:
string
;
eqType
:
number
;
eqPic
:
string
;
constructor
(
init
?:
Equirment
){
Object
.
assign
(
this
,
init
);
this
.
eqId
=
0
;
this
.
eqName
=
''
;
this
.
eqDesc
=
''
;
this
.
eqType
=
''
;
this
.
eqType
=
0
;
this
.
eqPic
=
'assets/img/nopic.jpg'
;
}
}
...
...
src/app/models/rooms.model.ts
View file @
c77efee4
...
...
@@ -2,7 +2,7 @@ import { RoomDetail } from "./RoomDetail.model"
export
interface
Room
{
rId
:
number
;
rName
:
string
;
rType
:
string
;
rType
:
number
;
rPic
:
string
;
roomLimit
:
number
;
rDesc
:
string
;
...
...
@@ -10,7 +10,7 @@ export interface Room {
export
class
MyRoom
implements
Room
{
rId
:
number
;
rName
:
string
;
rType
:
string
;
rType
:
number
;
rPic
:
string
;
roomLimit
:
number
;
rDesc
:
string
;
...
...
@@ -22,7 +22,7 @@ export class MyRoom implements Room{
this
.
rPic
=
'assets/img/nopic.jpg'
;
this
.
roomLimit
=
0
;
this
.
rDesc
=
''
;
this
.
rType
=
0
;
}
}
...
...
src/app/pages/admin-equirment/admin-equirment.component.html
View file @
c77efee4
...
...
@@ -33,6 +33,7 @@
<br>
<p
class=
"text-left"
>
ชื่อ : {{item.rName}}
</p>
<p
class=
"text-left"
>
รายละเอียด : {{item.rDesc}}
</p>
<p
class=
"text-left"
>
หมวดหมู่ :
<td
*
ngIf=
"item.rType==1"
>
ห้อง
</td><td
*
ngIf=
"item.rType==2"
>
รถ
</td></p>
</div>
<div
class=
"text-center"
>
...
...
@@ -88,7 +89,7 @@
<br>
<p
class=
"text-left"
>
ชื่อ : {{item.eqName}}
</p>
<p
class=
"text-left"
>
รายละเอียด : {{item.eqDesc}}
</p>
<p
class=
"text-left"
>
ประเภท : {{item.eqType}}
</p>
<p
class=
"text-left"
>
หมวดหมู่ :
<td
*
ngIf=
"item.eqType==4"
>
IT
</td><td
*
ngIf=
"item.eqType==5"
>
Company
</td>
</p>
</div>
<div
class=
"text-center"
>
...
...
src/app/pages/admin-pending/admin-pending.component.html
View file @
c77efee4
...
...
@@ -88,7 +88,8 @@
<tbody>
<tr
*
ngFor=
"let item of listRoomDetail"
>
<th
scope=
"row"
style=
"color: rgb(255, 255, 255);"
>
{{ item.id }}
</th>
<td>
{{ item.room.rType }}
</td>
<td
*
ngIf=
"item.rStatus==1"
>
ห้อง
</td>
<td
*
ngIf=
"item.rStatus==2"
>
รถ
</td>
<td>
{{ item.room.rName }}
</td>
<td>
{{ item.room.rDesc }}
</td>
<td>
{{ item.userName }}
</td>
...
...
@@ -149,7 +150,8 @@
<tbody>
<tr
*
ngFor=
"let item of listItemDetail"
>
<th
scope=
"row"
style=
"color: rgb(255, 255, 255);"
>
{{ item.id }}
</th>
<td>
{{ item.equirment.eqType }}
</td>
<td
*
ngIf=
"item.equirment.eqType==4"
>
IT
</td>
<td
*
ngIf=
"item.equirment.eqType==5"
>
Company
</td>
<td>
{{ item.equirment.eqName }}
</td>
<td>
{{ item.equirment.eqDesc }}
</td>
<td>
{{ item.userName }}
</td>
...
...
@@ -224,7 +226,8 @@
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<label>
เบอร์โทร
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
formControlName=
"rTelephone"
maxlength=
"10"
/>
<input
class=
" form-control"
placeholder=
""
type=
"text"
formControlName=
"rTelephone"
maxlength=
"10"
/>
<div
style=
"color: red;"
*
ngIf=
"myFormRoom.controls.rTelephone.status=='INVALID'"
>
กรุณากรอกหมายเลขโทรศัพท์.
</div>
</div>
...
...
@@ -246,21 +249,23 @@
กรุณากรอกรายละเอียดการจอง.
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่เริ่มต้น
</label>
<input
type=
"date"
class=
"form-control"
[(
ngModel
)]="
modelRoomDetail
.
sDate
"
formControlName=
"sDate"
/>
<input
type=
"date"
class=
"form-control"
[(
ngModel
)]="
modelRoomDetail
.
sDate
"
formControlName=
"sDate"
/>
<div
style=
"color: red;"
*
ngIf=
"myFormRoom.controls.sDate.status=='INVALID'"
>
กรุณากรอกวันที่เริ่มต้นการจอง.
</div>
</div>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่สิ้นสุด
</label>
<input
type=
"date"
class=
"form-control"
[(
ngModel
)]="
modelRoomDetail
.
eDate
"
formControlName=
"eDate"
/>
<input
type=
"date"
class=
"form-control"
[(
ngModel
)]="
modelRoomDetail
.
eDate
"
formControlName=
"eDate"
/>
<div
style=
"color: red;"
*
ngIf=
"myFormRoom.controls.eDate.status=='INVALID'"
>
กรุณากรอกวันที่สิ้นสุดการจอง.
</div>
</div>
</div>
<div
class=
"row"
*
ngIf=
"!modelRoomDetail.allDay"
>
<div
class=
"row"
*
ngIf=
"!modelRoomDetail.allDay"
>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
เวลาที่เริ่มต้น
</label>
<input
class=
"form-control"
type=
"time"
formControlName=
"sTime"
/>
...
...
@@ -338,7 +343,8 @@
<div
class=
" col-md-12"
>
<div
class=
" form-group"
>
<label>
เบอร์โทร
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
formControlName=
"eTelephone"
maxlength=
"10"
/>
<input
class=
" form-control"
placeholder=
""
type=
"text"
formControlName=
"eTelephone"
maxlength=
"10"
/>
<div
style=
"color: red;"
*
ngIf=
"myFormEquir.controls.eTelephone.status=='INVALID'"
>
กรุณากรอกหมายเลขโทรศัพท์
</div>
</div>
...
...
@@ -363,7 +369,8 @@
<div
class=
"row"
>
<div
class=
"col-sm-12 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่เริ่มต้น
</label>
<input
type=
"date"
class=
"form-control"
[(
ngModel
)]="
modelItemDetail
.
sDate
"
formControlName=
"sDate"
/>
<input
type=
"date"
class=
"form-control"
[(
ngModel
)]="
modelItemDetail
.
sDate
"
formControlName=
"sDate"
/>
<div
style=
"color: red;"
*
ngIf=
"myFormEquir.controls.sDate.status=='INVALID'"
>
กรุณากรอกวันที่เริ่มต้นการเบิก
</div>
</div>
...
...
@@ -418,7 +425,8 @@
<div
class=
"row"
*
ngIf=
"modelItemDetail.returnItem"
>
<div
class=
"col-sm-12 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่สิ้นสุด
</label>
<input
type=
"date"
class=
"form-control"
[
value
]="
modelItemDetail
.
eDate
"
formControlName=
"eDate"
/>
<input
type=
"date"
class=
"form-control"
[
value
]="
modelItemDetail
.
eDate
"
formControlName=
"eDate"
/>
</div>
</div>
</form>
...
...
src/app/pages/admin-pending/admin-pending.component.ts
View file @
c77efee4
...
...
@@ -209,12 +209,8 @@ export class AdminPendingComponent implements OnInit {
myFormEquir
:
FormGroup
;
ngOnInit
():
void
{
this
.
ItemDetailService
.
getListItemDetail
().
subscribe
(
result
=>
{
this
.
listItemDetail
=
result
;
});;
this
.
RoomDetailService
.
getListRoomDetail
().
subscribe
(
result
=>
{
this
.
listRoomDetail
=
result
;
});;
this
.
listItemDetail
=
this
.
ItemDetailService
.
getListItemDetail
();
this
.
listRoomDetail
=
this
.
RoomDetailService
.
getListRoomDetail
();
this
.
collectionSizeListRoom
=
this
.
listItemDetail
.
length
;
}
...
...
src/app/pages/equipment/equipment.component.html
View file @
c77efee4
...
...
@@ -24,11 +24,12 @@
<div
class=
"card"
style=
"
padding: 10px;"
>
<div
class=
"card-body"
>
<img
style=
"object-fit: cover;"
[
src
]="
item
.
rPic
"
class=
"nav justify-content-center"
alt=
"..."
>
<img
style=
"object-fit: cover;"
[
src
]="
item
.
rPic
"
class=
"nav justify-content-center"
alt=
"..."
>
<br>
<p
class=
"text-left"
>
ชื่อ : {{item.rName}}
</p>
<p
class=
"text-left"
>
รายละเอียด : {{item.rDesc}}
</p>
<p
class=
"text-left"
>
หมวดหมู่ :
<td
*
ngIf=
"item.rStatus==1"
>
ห้อง
</td><td
*
ngIf=
"item.rStatus==2"
>
รถ
</td></p>
</div>
<div
class=
"text-center"
>
...
...
@@ -73,12 +74,12 @@
<div
class=
"card"
style=
"
padding: 10px;"
>
<div
class=
"card-body"
>
<img
style=
"object-fit: cover;"
[
src
]="
item
.
eqPic
"
class=
"nav justify-content-center"
alt=
"..."
>
<img
style=
"object-fit: cover;"
[
src
]="
item
.
eqPic
"
class=
"nav justify-content-center"
alt=
"..."
>
<br>
<p
class=
"text-left"
>
ชื่อ : {{item.eqName}}
</p>
<p
class=
"text-left"
>
รายละเอียด : {{item.eqDesc}}
</p>
<p
class=
"text-left"
>
ประเภท : {{item.eqType}}
</p>
<p
class=
"text-left"
>
หมวดหมู่ :
<td
*
ngIf=
"item.eqType==4"
>
IT
</td><td
*
ngIf=
"item.eqType==5"
>
Company
</td>
</p>
</div>
<div
class=
"text-center"
>
...
...
@@ -269,7 +270,8 @@
<div
class=
" form-group"
>
<label>
เบอร์โทร
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
value=
""
[(
ngModel
)]="
modelRoomDetail
.
rTelephone
"
formControlName=
"rTelephone"
maxlength=
"10"
/>
[(
ngModel
)]="
modelRoomDetail
.
rTelephone
"
formControlName=
"rTelephone"
maxlength=
"10"
/>
<div
style=
"color: red;"
*
ngIf=
"myFormRoom.controls.rTelephone.status=='INVALID'"
>
กรุณากรอกหมายเลขโทรศัพท์.
</div>
</div>
...
...
@@ -398,7 +400,8 @@
<div
class=
" form-group"
>
<label>
เบอร์โทร
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
value=
""
[(
ngModel
)]="
modelItemDetail
.
eTelephone
"
formControlName=
"eTelephone"
maxlength=
"10"
/>
[(
ngModel
)]="
modelItemDetail
.
eTelephone
"
formControlName=
"eTelephone"
maxlength=
"10"
/>
<div
style=
"color: red;"
*
ngIf=
"myFormEquir.controls.eTelephone.status=='INVALID'"
>
กรุณากรอกหมายเลขโทรศัพท์.
</div>
...
...
src/app/pages/home-page/home-page.component.ts
View file @
c77efee4
...
...
@@ -204,12 +204,8 @@ export class HomePageComponent implements OnInit {
setTimeout
(
function
()
{
window
.
dispatchEvent
(
new
Event
(
'resize'
))
},
1
)
this
.
ItemDetailService
.
getListItemDetail
().
subscribe
(
result
=>
{
this
.
listItemDetail
=
result
;
});;
this
.
RoomDetailService
.
getListRoomDetail
().
subscribe
(
result
=>
{
this
.
listRoomDetail
=
result
;
});;
this
.
listItemDetail
=
this
.
ItemDetailService
.
getListItemDetail
();
this
.
listRoomDetail
=
this
.
RoomDetailService
.
getListRoomDetail
();
for
(
let
i
=
0
;
i
<
this
.
listRoomDetail
.
length
;
i
++
)
{
if
(
this
.
listRoomDetail
[
i
].
rStatus
==
0
)
{
this
.
eventRoom
.
push
({
...
...
src/app/pages/pending/pending.component.ts
View file @
c77efee4
...
...
@@ -209,12 +209,8 @@ export class PendingComponent implements OnInit {
}
ngOnInit
()
{
this
.
ItemDetailService
.
getListItemDetail
()
.
subscribe
(
result
=>
{
this
.
listItemDetail
=
result
;
});;
this
.
RoomDetailService
.
getListRoomDetail
()
.
subscribe
(
result
=>
{
this
.
listRoomDetail
=
result
;
});;
this
.
listItemDetail
=
this
.
ItemDetailService
.
getListItemDetail
();
this
.
listRoomDetail
=
this
.
RoomDetailService
.
getListRoomDetail
();
this
.
collectionSizeListRoom
=
this
.
listRoomDetail
.
length
;
}
...
...
src/app/service/equirment.service.ts
View file @
c77efee4
...
...
@@ -8,7 +8,7 @@ import { Observable } from 'rxjs';
export
class
EquirmentService
{
constructor
(
private
http
:
HttpClient
)
{
}
url
:
string
=
"http://
11f3
-49-0-64-28.ngrok.io"
;
url
:
string
=
"http://
2475
-49-0-64-28.ngrok.io"
;
listEquirment
:
Equirment
[]
=
[]
addEquirment
(
model
:
Equirment
)
{
...
...
src/app/service/item-detail.service.ts
View file @
c77efee4
import
{
Injectable
}
from
'@angular/core'
;
import
{
HttpClient
,
HttpHeaders
}
from
'@angular/common/http'
;
import
{
ItemDetail
,
SearchItemDetailModel
}
from
'../models/itemDetail.model'
;
import
{
Observable
}
from
'rxjs'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
ItemDetailService
{
constructor
(
private
http
:
HttpClient
)
{
}
url
:
string
=
"http://
11f3
-49-0-64-28.ngrok.io"
;
url
:
string
=
"http://
2475
-49-0-64-28.ngrok.io"
;
listItemDetail
:
ItemDetail
[]
=
[]
addItemDetail
(
model
:
ItemDetail
)
{
...
...
@@ -18,9 +17,10 @@ export class ItemDetailService {
getListItemDetail
()
:
Observable
<
ItemDetail
[]
>
{
return
this
.
http
.
get
<
ItemDetail
[]
>
(
this
.
url
+
"/lend/lists"
)
;
getListItemDetail
()
{
return
this
.
listItemDetail
;
}
// getListItemDetail() {
// this.http.get(this.url).subscribe((response: any) => {
// console.log(response);
...
...
src/app/service/room-detail.service.ts
View file @
c77efee4
import
{
Injectable
}
from
'@angular/core'
;
import
{
HttpClient
,
HttpHeaders
}
from
'@angular/common/http'
;
import
{
RoomDetail
,
SearchRoomDetailModel
}
from
'../models/RoomDetail.model'
;
import
{
Observable
}
from
'rxjs'
;
import
{
Equirment
}
from
'../models/equirment.model'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
RoomDetailService
{
constructor
(
private
http
:
HttpClient
)
{
}
url
:
string
=
"
http://11f3
-49-0-64-28.ngrok.io"
;
url
:
string
=
"
http://2475
-49-0-64-28.ngrok.io"
;
listRoomDetail
:
RoomDetail
[]
=
[]
editRoomDetail
(
model
:
RoomDetail
)
{
...
...
@@ -37,9 +35,9 @@ export class RoomDetailService {
}
getListRoomDetail
()
:
Observable
<
RoomDetail
[]
>
{
return
this
.
http
.
get
<
RoomDetail
[]
>
(
this
.
url
+
"/book/lists"
)
;
}
getListRoomDetail
()
{
return
this
.
listRoomDetail
;
}
...
...
src/app/service/room.service.ts
View file @
c77efee4
...
...
@@ -7,7 +7,7 @@ import { RoomDetail } from '../models/RoomDetail.model';
export
class
RoomService
{
constructor
(
private
http
:
HttpClient
)
{
}
url
:
string
=
'http://
11f3
-49-0-64-28.ngrok.io'
;
url
:
string
=
'http://
2475
-49-0-64-28.ngrok.io'
;
listRoomModel
:
Room
[]
=
[]
listRoomSearch
:
Room
[]
=
[];
...
...
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