Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tia-dev
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Dida Adams Arizona
Tia-dev
Commits
9e511e14
Commit
9e511e14
authored
Sep 09, 2020
by
Rifka Kurnia Irfiana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update hapus titik validasi
parent
b98fc12c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
93 additions
and
15 deletions
+93
-15
CreateApprovalMatrix.js
src/container/ApprovalMatrix/CreateApprovalMatrix.js
+5
-5
EditApprovalMatrix.js
src/container/ApprovalMatrix/EditApprovalMatrix.js
+6
-6
DocumentManagement.js
src/container/DocumentManagement/DocumentManagement.js
+14
-4
QReview.js
src/container/DocumentManagement/QReview.js
+68
-0
No files found.
src/container/ApprovalMatrix/CreateApprovalMatrix.js
View file @
9e511e14
...
...
@@ -209,21 +209,21 @@ export default class CreateApprovalMatrix extends Component {
validasi
()
{
if
(
R
.
isNil
(
this
.
state
.
typeId
))
{
this
.
setState
({
errorType
:
true
,
msgErrType
:
'Approval Type Cannot be Empty
.
'
})
this
.
setState
({
errorType
:
true
,
msgErrType
:
'Approval Type Cannot be Empty'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
order
))
{
this
.
setState
({
errorOrder
:
true
,
msgErrOrder
:
'Order Cannot be Empty
.
'
})
this
.
setState
({
errorOrder
:
true
,
msgErrOrder
:
'Order Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
userId
))
{
this
.
setState
({
errorApproved
:
true
,
msgErrApproved
:
'Approver Name Cannot be Empty
.
'
})
this
.
setState
({
errorApproved
:
true
,
msgErrApproved
:
'Approver Name Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
operatorId
))
{
this
.
setState
({
errorOperator
:
true
,
msgErrOperator
:
'Operator Cannot be Empty. Please Choose - Option'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Valid From Cannot be Empty
.
'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Valid From Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty
.
'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
console
.
log
(
'masuk'
);
let
payload
=
{
...
...
src/container/ApprovalMatrix/EditApprovalMatrix.js
View file @
9e511e14
...
...
@@ -249,21 +249,21 @@ export default class EditApprovalMatrix extends Component {
validasi
()
{
if
(
R
.
isNil
(
this
.
state
.
getTypes
))
{
this
.
setState
({
errorType
:
true
,
msgErrType
:
'Approval Type Cannot be Empty
.
'
})
this
.
setState
({
errorType
:
true
,
msgErrType
:
'Approval Type Cannot be Empty'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
order
))
{
this
.
setState
({
errorOrder
:
true
,
msgErrOrder
:
'Order Cannot be Empty
.
'
})
this
.
setState
({
errorOrder
:
true
,
msgErrOrder
:
'Order Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getApprovedBy
))
{
this
.
setState
({
errorApproved
:
true
,
msgErrApproved
:
'Approver Name Cannot be Empty
.
'
})
this
.
setState
({
errorApproved
:
true
,
msgErrApproved
:
'Approver Name Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getOperators
))
{
this
.
setState
({
errorOperator
:
true
,
msgErrOperator
:
'Operator Cannot be Empty
.
'
})
this
.
setState
({
errorOperator
:
true
,
msgErrOperator
:
'Operator Cannot be Empty'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Valid From Cannot be Empty
.
'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Valid From Cannot be Empty'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty
.
'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
console
.
log
(
'masuk'
);
if
(
this
.
props
.
type
==
'edit'
)
{
...
...
src/container/DocumentManagement/DocumentManagement.js
View file @
9e511e14
...
...
@@ -6,6 +6,7 @@ import ManualBookTia from './ManualBookTia'
import
api
from
'../../api'
import
AuditTahunan
from
'./AuditTahunan'
import
CreateManagementDoc
from
'./CreateManagementDoc'
import
QReview
from
'./QReview'
export
default
class
DocumentManagement
extends
Component
{
constructor
(
props
)
{
...
...
@@ -19,6 +20,7 @@ export default class DocumentManagement extends Component {
selectTab
=
(
event
,
newEvent
)
=>
{
this
.
setState
({
tab
:
newEvent
})
console
.
log
(
this
.
state
.
tab
)
}
componentDidMount
()
{
...
...
@@ -32,6 +34,7 @@ export default class DocumentManagement extends Component {
id
:
response
.
data
.
data
[
0
].
document_category_id
,
loadTable
:
true
})
console
.
log
(
this
.
state
.
listData
)
})
}
...
...
@@ -81,9 +84,16 @@ export default class DocumentManagement extends Component {
this
.
state
.
id
===
2
?
<
AuditTahunan
data
=
{
this
.
state
.
listData
[
this
.
state
.
tab
]}
/>
:
/>
:
this
.
state
.
id
===
1
?
<
ManualBookTia
/>
:
<
ManualBookTia
/>
:
this
.
state
.
id
===
3
?
<
QReview
data
=
{
this
.
state
.
listData
[
this
.
state
.
tab
]}
/>
:
<
span
>
Test2
<
/span
>
)}
...
...
src/container/DocumentManagement/QReview.js
0 → 100644
View file @
9e511e14
import
React
,
{
Component
}
from
'react'
import
MUIDataTable
from
'mui-datatables'
import
{
createMuiTheme
,
MuiThemeProvider
}
from
'@material-ui/core'
;
import
api
from
'../../api'
;
import
CreateManagementDoc
from
'./CreateManagementDoc'
;
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
const
options
=
ct
.
customOptionsManagementDocument
();
export
default
class
AuditTahunan
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
dataTable
:
[],
visibleCreate
:
false
}
}
componentDidMount
()
{
console
.
log
(
this
.
props
.
data
)
this
.
getData
()
}
getData
()
{
let
payload
=
{
"company_id"
:
1
,
"document_category_id"
:
3
}
api
.
create
().
getAllDocument
(
payload
).
then
(
respone
=>
{
let
dataTable
=
respone
.
data
.
data
.
map
(
item
=>
{
return
[
item
.
document_name
,
item
.
description
,
item
.
company_name
,
""
,
item
.
document_type
,
String
(
Number
(
item
.
document_size
)
/
1000
+
' MB'
),
item
.
created_by
,
item
.
created_at
,
]
})
this
.
setState
({
dataTable
})
})
}
render
()
{
let
columns
=
[
"Nama File"
,
"Keterangan"
,
"Perusahaan"
,
"Periode"
,
"Tipe"
,
"Ukuran"
,
"Ditambahkan Oleh"
,
"Ditambahkan Tanggal"
]
return
(
<
div
style
=
{{
width
:
'100%'
}}
>
<
div
style
=
{{
padding
:
25
}}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
theme
=
{
getMuiTheme
()}
data
=
{
this
.
state
.
dataTable
}
columns
=
{
columns
}
options
=
{
options
}
/
>
<
/MuiThemeProvider
>
<
/div
>
<
/div
>
)
}
}
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