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
51383543
Commit
51383543
authored
Nov 29, 2021
by
DESKTOP-HF0LVOG\myhr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add model และ แก้ไขหน้าต่างการเบิกจอง
parent
0342af61
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
92 additions
and
43 deletions
+92
-43
items.model.ts
src/app/models/items.model.ts
+3
-0
admin-pending.component.html
src/app/pages/admin-pending/admin-pending.component.html
+8
-6
admin-pending.component.ts
src/app/pages/admin-pending/admin-pending.component.ts
+6
-12
equipment.component.html
src/app/pages/equipment/equipment.component.html
+46
-6
equipment.component.ts
src/app/pages/equipment/equipment.component.ts
+11
-2
lend-page.component.ts
src/app/pages/lend-page/lend-page.component.ts
+4
-0
pending.component.html
src/app/pages/pending/pending.component.html
+8
-6
pending.component.ts
src/app/pages/pending/pending.component.ts
+6
-11
No files found.
src/app/models/items.model.ts
View file @
51383543
...
...
@@ -26,6 +26,8 @@ interface Country {
name
:
string
;
sdate
:
string
;
edate
:
string
;
stime
:
string
;
etime
:
string
;
status
:
string
;
quantity
:
string
;
}
\ No newline at end of file
src/app/pages/admin-pending/admin-pending.component.html
View file @
51383543
...
...
@@ -67,7 +67,7 @@
<li
ngbNavItem
>
<a
ngbNavLink
>
การจอง
</a>
<ng-template
ngbNavContent
>
<div
class=
"row"
>
<div
class=
"row
text-center
"
>
<div
class=
"col-sm-12"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
...
...
@@ -91,8 +91,8 @@
<td>
{{ country.type }}
</td>
<td>
{{ country.detail }}
</td>
<td>
{{ country.name }}
</td>
<td>
{{ country.sdate | date:'dd-MM-yyyy' }}
</td>
<td>
{{ country.edate | date:'dd-MM-yyyy' }}
</td>
<td>
{{ country.sdate | date:'dd-MM-yyyy' }}
{{ country.stime }}
</td>
<td>
{{ country.edate | date:'dd-MM-yyyy' }}
{{ country.etime }}
</td>
<td>
{{ country.status }}
</td>
<div
class=
"d-grid gap-3 d-sm-flex justify-content-end"
>
<button
class=
"btn btn-primary btn-sm align-end"
...
...
@@ -126,7 +126,7 @@
<li
ngbNavItem
>
<a
ngbNavLink
>
การเบิก
</a>
<ng-template
ngbNavContent
>
<div
class=
"row"
>
<div
class=
"row
text-center
"
>
<div
class=
"col-sm-12"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
...
...
@@ -140,6 +140,7 @@
<th
scope=
"col"
>
Name
</th>
<th
scope=
"col"
>
Start-Date
</th>
<th
scope=
"col"
>
End-Date
</th>
<th
scope=
"col"
>
Quantity
</th>
<th
scope=
"col"
>
Status
</th>
</tr>
</thead>
...
...
@@ -150,8 +151,9 @@
<td>
{{ country.type }}
</td>
<td>
{{ country.detail }}
</td>
<td>
{{ country.name }}
</td>
<td>
{{ country.sdate | date:'dd-MM-yyyy' }}
</td>
<td>
{{ country.edate | date:'dd-MM-yyyy' }}
</td>
<td>
{{ country.sdate | date:'dd-MM-yyyy' }} {{ country.stime }}
</td>
<td>
{{ country.edate | date:'dd-MM-yyyy' }} {{ country.etime }}
</td>
<td>
{{ country.quantity }}
</td>
<td>
{{ country.status }}
</td>
<div
class=
"d-grid gap-3 d-sm-flex justify-content-end"
>
<button
class=
"btn btn-primary btn-sm align-end"
...
...
src/app/pages/admin-pending/admin-pending.component.ts
View file @
51383543
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
NgbDate
,
NgbCalendar
,
NgbDateParserFormatter
}
from
'@ng-bootstrap/ng-bootstrap'
;
interface
Country
{
id
?:
number
;
catagory
:
string
;
type
:
string
;
detail
:
string
;
name
:
string
;
sdate
:
string
;
edate
:
string
;
status
:
string
;
}
@
Component
({
selector
:
'app-admin-pending'
,
templateUrl
:
'./admin-pending.component.html'
,
...
...
@@ -57,7 +45,10 @@ export class AdminPendingComponent implements OnInit {
name
:
'a'
,
sdate
:
'2021-11-25'
,
edate
:
'2021-11-25'
,
stime
:
'12.00'
,
etime
:
'12.00'
,
status
:
'waiting'
,
quantity
:
'1'
,
},
{
catagory
:
'string'
,
...
...
@@ -66,7 +57,10 @@ export class AdminPendingComponent implements OnInit {
name
:
'b'
,
sdate
:
'2021-11-25'
,
edate
:
'2021-11-25'
,
stime
:
'12.00'
,
etime
:
'12.00'
,
status
:
'waiting'
,
quantity
:
'1'
,
}
];
...
...
src/app/pages/equipment/equipment.component.html
View file @
51383543
...
...
@@ -243,17 +243,37 @@
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-
5 mb-3
"
>
<div
class=
"col-sm-
12 mb-1
"
>
<label
for=
"exampleFormControlSelect1"
>
ชื่อห้อง
</label>
<input
readonly
class=
"form-control"
type=
"text"
value=
"{{item.rname}}"
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-
5 mb-3
"
>
<div
class=
"col-sm-
12 mb-1
"
>
<label
for=
"exampleFormControlSelect1"
>
รายละเอียด
</label>
<input
readonly
class=
"form-control"
type=
"text"
value=
"{{item.rdecs}}"
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่เริ่มใช้
</label>
<input
type=
"date"
class=
"form-control"
value=
""
>
</div>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่สิ้นสุด
</label>
<input
type=
"date"
class=
"form-control"
value=
""
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
เวลาที่เริ่มต้น
</label>
<ngb-timepicker
[(
ngModel
)]="
time
"
></ngb-timepicker>
</div>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
เวลาที่สิ้นสุด
</label>
<ngb-timepicker
[(
ngModel
)]="
time
"
></ngb-timepicker>
</div>
</div>
</form>
</div>
<div
class=
" card-footer"
>
...
...
@@ -273,7 +293,7 @@
<div
class=
" card-body"
>
<form>
<div
class=
" row"
>
<div
class=
" col-
md-12
"
>
<div
class=
" col-
sm-12 mb-1
"
>
<div
class=
" form-group"
>
<label>
ชื่อผู้จอง
</label>
<input
class=
" form-control"
placeholder=
""
type=
"text"
value=
""
/>
...
...
@@ -281,19 +301,39 @@
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-
5 mb-3
"
>
<div
class=
"col-sm-
12 mb-1
"
>
<label
for=
"exampleFormControlSelect1"
>
ชื่ออุปกรณ์
</label>
<input
readonly
class=
"form-control"
type=
"text"
value=
"{{item.rname}}"
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-
5 mb-3
"
>
<div
class=
"col-sm-
12 mb-1
"
>
<label
for=
"exampleFormControlSelect1"
>
รายละเอียดอุปกรณ์
</label>
<input
readonly
class=
"form-control"
type=
"text"
value=
"{{item.rdecs}}"
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่เริ่มใช้
</label>
<input
type=
"date"
class=
"form-control"
value=
""
>
</div>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
วันที่สิ้นสุด
</label>
<input
type=
"date"
class=
"form-control"
value=
""
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
เวลาที่เริ่มต้น
</label>
<ngb-timepicker
[(
ngModel
)]="
time
"
></ngb-timepicker>
</div>
<div
class=
"col-6 mb-1"
>
<label
for=
"exampleFormControlSelect1"
>
เวลาที่สิ้นสุด
</label>
<ngb-timepicker
[(
ngModel
)]="
time
"
></ngb-timepicker>
</div>
</div>
<div
class=
" row"
>
<div
class=
" col-sm-6 mb-
2
"
>
<div
class=
" col-sm-6 mb-
1
"
>
<label
for=
"changequantity"
>
จำนวน
</label>
<input
id=
"changequantity"
type=
"number"
class=
"form-control form-control-sm"
[(
ngModel
)]="
quantity
"
/>
...
...
src/app/pages/equipment/equipment.component.ts
View file @
51383543
...
...
@@ -21,6 +21,7 @@ interface RoomModel{
styleUrls
:
[
'./equipment.component.scss'
]
})
export
class
EquipmentComponent
implements
OnInit
{
time
=
{
hour
:
13
,
minute
:
30
};
page
=
1
;
pageSize
=
10
;
...
...
@@ -92,6 +93,8 @@ export class EquipmentComponent implements OnInit {
name
:
'a'
,
sdate
:
'2021-11-25'
,
edate
:
'2021-11-25'
,
stime
:
'12.00'
,
etime
:
'12.00'
,
status
:
'waiting'
,
quantity
:
'1'
,
},
...
...
@@ -103,6 +106,8 @@ export class EquipmentComponent implements OnInit {
name
:
'b'
,
sdate
:
'2021-11-25'
,
edate
:
'2021-11-25'
,
stime
:
'12.00'
,
etime
:
'12.00'
,
status
:
'waiting'
,
quantity
:
'1'
,
}
...
...
@@ -136,4 +141,9 @@ export class EquipmentComponent implements OnInit {
.
map
((
item
,
i
)
=>
({
id
:
i
+
1
,
...
item
}))
.
slice
((
this
.
page
-
1
)
*
this
.
pageSize
,
(
this
.
page
-
1
)
*
this
.
pageSize
+
this
.
pageSize
);
}
}
\ No newline at end of file
NgbdTimepickerBasic
()
{
}
}
src/app/pages/lend-page/lend-page.component.ts
View file @
51383543
...
...
@@ -16,6 +16,8 @@ export class LendPageComponent implements OnInit {
name
:
'a'
,
sdate
:
'2021-11-25'
,
edate
:
'2021-11-25'
,
stime
:
'12.00'
,
etime
:
'12.00'
,
status
:
'waiting'
,
quantity
:
'1'
,
},
...
...
@@ -27,6 +29,8 @@ export class LendPageComponent implements OnInit {
name
:
'b'
,
sdate
:
'2021-11-25'
,
edate
:
'2021-11-25'
,
stime
:
'12.00'
,
etime
:
'12.00'
,
status
:
'waiting'
,
quantity
:
'1'
,
}
...
...
src/app/pages/pending/pending.component.html
View file @
51383543
...
...
@@ -68,7 +68,7 @@
<li
ngbNavItem
>
<a
ngbNavLink
>
การจอง
</a>
<ng-template
ngbNavContent
>
<div
class=
"row"
>
<div
class=
"row
text-center
"
>
<div
class=
"col-sm-12"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
...
...
@@ -92,8 +92,8 @@
<td>
{{ country.type }}
</td>
<td>
{{ country.detail }}
</td>
<td>
{{ country.name }}
</td>
<td>
{{ country.sdate | date:'dd-MM-yyyy' }}
</td>
<td>
{{ country.edate | date:'dd-MM-yyyy' }}
</td>
<td>
{{ country.sdate | date:'dd-MM-yyyy' }}
{{ country.stime }}
</td>
<td>
{{ country.edate | date:'dd-MM-yyyy' }}
{{ country.etime }}
</td>
<td>
{{ country.status }}
</td>
</tr>
</tbody>
...
...
@@ -121,7 +121,7 @@
<li
ngbNavItem
>
<a
ngbNavLink
>
การเบิก
</a>
<ng-template
ngbNavContent
>
<div
class=
"row"
>
<div
class=
"row
text-center
"
>
<div
class=
"col-sm-12"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
...
...
@@ -135,6 +135,7 @@
<th
scope=
"col"
>
Name
</th>
<th
scope=
"col"
>
Start-Date
</th>
<th
scope=
"col"
>
End-Date
</th>
<th
scope=
"col"
>
Quantity
</th>
<th
scope=
"col"
>
Status
</th>
</tr>
</thead>
...
...
@@ -145,8 +146,9 @@
<td>
{{ country.type }}
</td>
<td>
{{ country.detail }}
</td>
<td>
{{ country.name }}
</td>
<td>
{{ country.sdate | date:'dd-MM-yyyy' }}
</td>
<td>
{{ country.edate | date:'dd-MM-yyyy' }}
</td>
<td>
{{ country.sdate | date:'dd-MM-yyyy' }} {{ country.stime }}
</td>
<td>
{{ country.edate | date:'dd-MM-yyyy' }} {{ country.etime }}
</td>
<td>
{{ country.quantity }}
</td>
<td>
{{ country.status }}
</td>
</tr>
</tbody>
...
...
src/app/pages/pending/pending.component.ts
View file @
51383543
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
NgbDate
,
NgbCalendar
,
NgbDateParserFormatter
}
from
'@ng-bootstrap/ng-bootstrap'
;
interface
Country
{
id
?:
number
;
catagory
:
string
;
type
:
string
;
detail
:
string
;
name
:
string
;
sdate
:
string
;
edate
:
string
;
status
:
string
;
}
@
Component
({
selector
:
'app-pending'
,
templateUrl
:
'./pending.component.html'
,
...
...
@@ -55,7 +44,10 @@ export class PendingComponent implements OnInit {
name
:
'a'
,
sdate
:
'2021-11-25'
,
edate
:
'2021-11-25'
,
stime
:
'12.00'
,
etime
:
'12.00'
,
status
:
'waiting'
,
quantity
:
'1'
,
},
{
catagory
:
'string'
,
...
...
@@ -64,7 +56,10 @@ export class PendingComponent implements OnInit {
name
:
'b'
,
sdate
:
'2021-11-25'
,
edate
:
'2021-11-25'
,
stime
:
'12.00'
,
etime
:
'12.00'
,
status
:
'waiting'
,
quantity
:
'1'
,
}
];
collectionSize
=
this
.
countries
.
length
;
...
...
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