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
bcdb8048
Commit
bcdb8048
authored
Dec 21, 2021
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Validator หน้า equirment
parent
a7c3cead
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
20 deletions
+47
-20
contact-admin.component.ts
src/app/pages/contact-admin/contact-admin.component.ts
+0
-2
equipment.component.html
src/app/pages/equipment/equipment.component.html
+9
-10
equipment.component.ts
src/app/pages/equipment/equipment.component.ts
+38
-8
No files found.
src/app/pages/contact-admin/contact-admin.component.ts
View file @
bcdb8048
...
...
@@ -48,8 +48,6 @@ export class ContactAdminComponent implements OnInit {
this
.
collectionSizeListRoom
=
this
.
listContact
.
length
;
this
.
collectionSize
=
this
.
listContact
.
length
this
.
myFormAddContact
=
new
FormGroup
({
ctName
:
new
FormControl
(
''
,
[
Validators
.
required
]),
ctDesc
:
new
FormControl
(
''
),
...
...
src/app/pages/equipment/equipment.component.html
View file @
bcdb8048
...
...
@@ -172,9 +172,9 @@
</div>
<div
class=
" card-footer"
>
<button
class=
" btn btn-fill btn-danger"
type=
"submit"
(
click
)="
saveEquirment
()"
>
Save
</button>
<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
')"
>
Cancel
</button>
(
click
)="
modal
.
dismiss
('
Cross
click
')"
>
ยกเลิก
</button>
</div>
</div>
</div>
...
...
@@ -339,7 +339,6 @@
<label
for=
"exampleFormControlSelect1"
>
เวลาที่สิ้นสุด
</label>
<input
class=
"form-control"
type=
"time"
[(
ngModel
)]="
modelRoomDetail
.
eTime
"
formControlName=
"eTime"
/>
<div
style=
"color: red;"
*
ngIf=
"myFormRoom.controls.eTime.status=='INVALID'"
>
กรุณากรอกเวลาที่สิ้นสุดการจอง.
</div>
...
...
@@ -350,16 +349,16 @@
<div
class=
" form-group"
>
<label>
หมายเหตุ
</label>
<textarea
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
placeholder=
"......"
[(
ngModel
)]="
modelRoomDetail
.
R
emark
"
formControlName=
"
R
emark"
></textarea>
placeholder=
"......"
[(
ngModel
)]="
modelRoomDetail
.
r
emark
"
formControlName=
"
r
emark"
></textarea>
</div>
</div>
</div>
</form>
</div>
<div
class=
" card-footer"
>
<button
class=
" btn btn-fill btn-danger"
[
disabled
]="
"
type=
"button"
(
click
)="
saveBook
()"
>
Save
</button>
<button
class=
" btn btn-fill btn-danger"
type=
"cancel"
(
click
)="
modal
.
dismiss
('
Cross
click
')"
>
Cancel
</button>
<button
class=
" btn btn-fill btn-danger"
[
disabled
]="
myFormRoom
.
invalid
"
type=
"button"
(
click
)="
saveBook
()"
>
บันทึก
</button>
<button
class=
" btn btn-fill btn-danger"
type=
"cancel"
(
click
)="
modal
.
dismiss
('
Cross
click
')"
>
ยกเลิก
</button>
</div>
</div>
</div>
...
...
@@ -448,15 +447,15 @@
<div
class=
" form-group"
>
<label>
หมายเหตุ
</label>
<textarea
class=
"form-control"
id=
"exampleFormControlTextarea1"
rows=
"3"
placeholder=
"......"
[(
ngModel
)]="
modelItemDetail
.
R
emark
"
formControlName=
"
R
emark"
></textarea>
placeholder=
"......"
[(
ngModel
)]="
modelItemDetail
.
r
emark
"
formControlName=
"
r
emark"
></textarea>
</div>
</div>
</div>
</form>
</div>
<div
class=
" card-footer"
>
<button
class=
" btn btn-fill btn-danger"
type=
"submit"
(
click
)="
saveLend
()"
>
Save
</button>
<button
class=
" btn btn-fill btn-danger"
[
disabled
]="
myFormEquir
.
invalid
"
type=
"submit"
(
click
)="
saveLend
()"
>
Save
</button>
<button
class=
" btn btn-fill btn-danger"
type=
"cancel"
(
click
)="
modal
.
dismiss
('
Cross
click
')"
>
Cancel
</button>
</div>
</div>
...
...
src/app/pages/equipment/equipment.component.ts
View file @
bcdb8048
...
...
@@ -79,23 +79,22 @@ export class EquipmentComponent implements OnInit {
eDate
:
new
FormControl
(
''
,[
Validators
.
required
]),
sTime
:
new
FormControl
(
''
,[
Validators
.
required
]),
eTime
:
new
FormControl
(
''
,[
Validators
.
required
]),
Remark
:
new
FormControl
(
),
allDay
:
new
FormControl
()
remark
:
new
FormControl
(
''
),
allDay
:
new
FormControl
(
''
)
});
this
.
myFormEquir
=
new
FormGroup
({
userNameForm
:
new
FormControl
(
''
,[
Validators
.
required
]),
eTelephone
:
new
FormControl
(
''
,[
Validators
.
required
]),
email
:
new
FormControl
(
''
,[
Validators
.
required
,
Validators
.
email
]),
eqName
:
new
FormControl
(
''
,[
Validators
.
required
]),
eqDesc
:
new
FormControl
(
''
,[
Validators
.
required
]),
eqType
:
new
FormControl
(
''
,[
Validators
.
required
]),
eqPic
:
new
FormControl
(
''
,[
Validators
.
required
]),
sDate
:
new
FormControl
(
''
,[
Validators
.
required
]),
eDate
:
new
FormControl
(
''
,[
Validators
.
required
]
),
sTime
:
new
FormControl
(
''
,[
Validators
.
required
]
),
eTime
:
new
FormControl
(
''
,[
Validators
.
required
]
),
eDate
:
new
FormControl
(
''
),
sTime
:
new
FormControl
(
''
),
eTime
:
new
FormControl
(
''
),
Quantity
:
new
FormControl
(
''
,[
Validators
.
required
]),
Remark
:
new
FormControl
(
''
,[
Validators
.
required
]
),
remark
:
new
FormControl
(
''
),
})
}
...
...
@@ -114,6 +113,21 @@ export class EquipmentComponent implements OnInit {
this
.
modelItemDetail
=
new
ItemDetail
();
this
.
modelItemDetail
.
equirment
=
item
;
this
.
myFormEquir
=
new
FormGroup
({
userNameForm
:
new
FormControl
(
this
.
modelItemDetail
.
userName
,[
Validators
.
required
]),
eTelephone
:
new
FormControl
(
this
.
modelItemDetail
.
eTelephone
,[
Validators
.
required
]),
email
:
new
FormControl
(
this
.
modelItemDetail
.
email
,[
Validators
.
required
,
Validators
.
email
]),
eqName
:
new
FormControl
(
this
.
modelItemDetail
.
equirment
.
eqName
,[
Validators
.
required
]),
eqDesc
:
new
FormControl
(
this
.
modelItemDetail
.
equirment
.
eqDesc
,[
Validators
.
required
]),
sDate
:
new
FormControl
(
this
.
modelItemDetail
.
sDate
,[
Validators
.
required
]),
eDate
:
new
FormControl
(
''
),
sTime
:
new
FormControl
(
''
),
eTime
:
new
FormControl
(
''
),
Quantity
:
new
FormControl
(
''
,[
Validators
.
required
]),
remark
:
new
FormControl
(
''
),
})
console
.
log
(
"item"
,
this
.
modelItemDetail
);
this
.
modalService
.
open
(
Lend
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
...
...
@@ -127,6 +141,22 @@ export class EquipmentComponent implements OnInit {
this
.
modelRoomDetail
=
new
RoomDetail
();
this
.
modelRoomDetail
.
room
=
item
;
this
.
myFormRoom
=
new
FormGroup
({
userNameForm
:
new
FormControl
(
this
.
modelRoomDetail
.
userName
,[
Validators
.
required
]),
rTelephone
:
new
FormControl
(
this
.
modelRoomDetail
.
rTelephone
,[
Validators
.
required
]),
email
:
new
FormControl
(
this
.
modelRoomDetail
.
email
,[
Validators
.
required
,
Validators
.
email
]),
rName
:
new
FormControl
(
this
.
modelRoomDetail
.
room
.
rName
,[
Validators
.
required
]),
rDesc
:
new
FormControl
(
this
.
modelRoomDetail
.
room
.
rDesc
,[
Validators
.
required
]),
rType
:
new
FormControl
(
this
.
modelRoomDetail
.
room
.
rType
,[
Validators
.
required
]),
sDate
:
new
FormControl
(
this
.
modelRoomDetail
.
sDate
,[
Validators
.
required
]),
eDate
:
new
FormControl
(
this
.
modelRoomDetail
.
eDate
,[
Validators
.
required
]),
sTime
:
new
FormControl
(
this
.
modelRoomDetail
.
sTime
,[
Validators
.
required
]),
eTime
:
new
FormControl
(
this
.
modelRoomDetail
.
eTime
,[
Validators
.
required
]),
remark
:
new
FormControl
(
''
),
allDay
:
new
FormControl
(
''
)
});
console
.
log
(
"room"
,
this
.
modelRoomDetail
);
this
.
modalService
.
open
(
Room
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
...
...
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