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
3993eda7
Commit
3993eda7
authored
Dec 21, 2021
by
Chanachai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Validators หน้า admin
parent
bcdb8048
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
31 deletions
+14
-31
admin-equirment.component.html
src/app/pages/admin-equirment/admin-equirment.component.html
+3
-3
admin-equirment.component.ts
src/app/pages/admin-equirment/admin-equirment.component.ts
+11
-28
No files found.
src/app/pages/admin-equirment/admin-equirment.component.html
View file @
3993eda7
...
...
@@ -179,12 +179,12 @@
</div>
</div>
<label
for=
"exampleFormControlFile"
>
แนบไฟล์รูปภาพ
</label>
<input
type=
"file"
class=
"form-control-file"
id=
"exampleFormControlFile"
formControlName=
"eqPic"
>
<input
type=
"file"
class=
"form-control-file"
id=
"exampleFormControlFile"
>
</form>
</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"
[
disabled
]="
myFormEquir
.
invalid
"
type=
"submit"
(
click
)="
saveEquirment
()"
>
Save
</button>
<button
class=
" btn btn-fill btn-danger"
type=
"cancel"
(
click
)="
modal
.
dismiss
('
Cross
click
')"
>
Cancel
</button>
</div>
...
...
@@ -242,7 +242,7 @@
</form>
</div>
<div
class=
" card-footer"
>
<button
class=
" btn btn-fill btn-danger"
type=
"submit"
(
click
)="
saveRoom
()"
>
Save
</button>
<button
class=
" btn btn-fill btn-danger"
[
disabled
]="
myFormRoom
.
invalid
"
type=
"submit"
(
click
)="
saveRoom
()"
>
Save
</button>
<button
class=
" btn btn-fill btn-danger"
type=
"cancel"
(
click
)="
modal
.
dismiss
('
Cross
click
')"
>
Cancel
</button>
</div>
...
...
src/app/pages/admin-equirment/admin-equirment.component.ts
View file @
3993eda7
...
...
@@ -65,34 +65,7 @@ export class AdminEquirmentComponent implements OnInit {
this
.
collectionSizeListRoom
=
this
.
listRoomModel
.
length
this
.
collectionSize
=
this
.
listEquirmentModel
.
length
console
.
log
(
"listRoom"
,
this
.
listRoomModel
)
this
.
myFormRoom
=
new
FormGroup
({
userNameForm
:
new
FormControl
(
''
,[
Validators
.
required
]),
rTelephone
:
new
FormControl
(
''
,[
Validators
.
required
]),
email
:
new
FormControl
(
''
,[
Validators
.
required
,
Validators
.
email
]),
rName
:
new
FormControl
(
''
,[
Validators
.
required
]),
rDesc
:
new
FormControl
(
''
,[
Validators
.
required
]),
rType
:
new
FormControl
(
''
,[
Validators
.
required
]),
sDate
:
new
FormControl
(
''
,[
Validators
.
required
]),
eDate
:
new
FormControl
(
''
,[
Validators
.
required
]),
sTime
:
new
FormControl
(
''
,[
Validators
.
required
]),
eTime
:
new
FormControl
(
''
,[
Validators
.
required
]),
remark
:
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
]),
Quantity
:
new
FormControl
(
''
,[
Validators
.
required
]),
remark
:
new
FormControl
(
''
,[
Validators
.
required
]),
})
}
bookEquir
(
editLend
,
item
:
Equirment
)
{
...
...
@@ -195,6 +168,11 @@ export class AdminEquirmentComponent implements OnInit {
openItemDetail
(
contentequirment
)
{
this
.
modelEquirment
=
new
Equirment
();
this
.
myFormEquir
=
new
FormGroup
({
eqName
:
new
FormControl
(
this
.
modelEquirment
.
eqName
,[
Validators
.
required
]),
eqType
:
new
FormControl
(
this
.
modelEquirment
.
eqType
,[
Validators
.
required
]),
eqDesc
:
new
FormControl
(
this
.
modelEquirment
.
eqDesc
,[
Validators
.
required
]),
})
this
.
modalService
.
open
(
contentequirment
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
closeResult
=
`Closed with:
${
result
}
`
;
},
(
reason
)
=>
{
...
...
@@ -204,6 +182,11 @@ export class AdminEquirmentComponent implements OnInit {
openRoomDetail
(
contentroom
)
{
this
.
modelRoom
=
new
MyRoom
();
this
.
myFormRoom
=
new
FormGroup
({
rName
:
new
FormControl
(
this
.
modelRoom
.
rName
,[
Validators
.
required
]),
rType
:
new
FormControl
(
this
.
modelRoom
.
rType
,[
Validators
.
required
]),
rDesc
:
new
FormControl
(
this
.
modelRoom
.
rDesc
,[
Validators
.
required
]),
})
this
.
modalService
.
open
(
contentroom
,
{
ariaLabelledBy
:
'modal-basic-title'
}).
result
.
then
((
result
)
=>
{
this
.
closeResult
=
`Closed with:
${
result
}
`
;
},
(
reason
)
=>
{
...
...
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