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
b4dabb9c
Commit
b4dabb9c
authored
Sep 09, 2020
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rifka' into 'master'
update hapus titik See merge request
!272
parents
48e65be2
d0695bc5
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 @
b4dabb9c
...
@@ -209,21 +209,21 @@ export default class CreateApprovalMatrix extends Component {
...
@@ -209,21 +209,21 @@ export default class CreateApprovalMatrix extends Component {
validasi
()
{
validasi
()
{
if
(
R
.
isNil
(
this
.
state
.
typeId
))
{
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
))
{
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
))
{
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
))
{
else
if
(
R
.
isNil
(
this
.
state
.
operatorId
))
{
this
.
setState
({
errorOperator
:
true
,
msgErrOperator
:
'Operator Cannot be Empty. Please Choose - Option'
})
this
.
setState
({
errorOperator
:
true
,
msgErrOperator
:
'Operator Cannot be Empty. Please Choose - Option'
})
}
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
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
))
{
}
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
{
}
else
{
console
.
log
(
'masuk'
);
console
.
log
(
'masuk'
);
let
payload
=
{
let
payload
=
{
...
...
src/container/ApprovalMatrix/EditApprovalMatrix.js
View file @
b4dabb9c
...
@@ -249,21 +249,21 @@ export default class EditApprovalMatrix extends Component {
...
@@ -249,21 +249,21 @@ export default class EditApprovalMatrix extends Component {
validasi
()
{
validasi
()
{
if
(
R
.
isNil
(
this
.
state
.
getTypes
))
{
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
))
{
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
))
{
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
))
{
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
))
{
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
))
{
}
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
{
}
else
{
console
.
log
(
'masuk'
);
console
.
log
(
'masuk'
);
if
(
this
.
props
.
type
==
'edit'
)
{
if
(
this
.
props
.
type
==
'edit'
)
{
...
...
src/container/DocumentManagement/DocumentManagement.js
View file @
b4dabb9c
...
@@ -6,6 +6,7 @@ import ManualBookTia from './ManualBookTia'
...
@@ -6,6 +6,7 @@ import ManualBookTia from './ManualBookTia'
import
api
from
'../../api'
import
api
from
'../../api'
import
AuditTahunan
from
'./AuditTahunan'
import
AuditTahunan
from
'./AuditTahunan'
import
CreateManagementDoc
from
'./CreateManagementDoc'
import
CreateManagementDoc
from
'./CreateManagementDoc'
import
QReview
from
'./QReview'
export
default
class
DocumentManagement
extends
Component
{
export
default
class
DocumentManagement
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -19,6 +20,7 @@ export default class DocumentManagement extends Component {
...
@@ -19,6 +20,7 @@ export default class DocumentManagement extends Component {
selectTab
=
(
event
,
newEvent
)
=>
{
selectTab
=
(
event
,
newEvent
)
=>
{
this
.
setState
({
tab
:
newEvent
})
this
.
setState
({
tab
:
newEvent
})
console
.
log
(
this
.
state
.
tab
)
}
}
componentDidMount
()
{
componentDidMount
()
{
...
@@ -32,6 +34,7 @@ export default class DocumentManagement extends Component {
...
@@ -32,6 +34,7 @@ export default class DocumentManagement extends Component {
id
:
response
.
data
.
data
[
0
].
document_category_id
,
id
:
response
.
data
.
data
[
0
].
document_category_id
,
loadTable
:
true
loadTable
:
true
})
})
console
.
log
(
this
.
state
.
listData
)
})
})
}
}
...
@@ -81,9 +84,16 @@ export default class DocumentManagement extends Component {
...
@@ -81,9 +84,16 @@ export default class DocumentManagement extends Component {
this
.
state
.
id
===
2
?
this
.
state
.
id
===
2
?
<
AuditTahunan
<
AuditTahunan
data
=
{
this
.
state
.
listData
[
this
.
state
.
tab
]}
data
=
{
this
.
state
.
listData
[
this
.
state
.
tab
]}
/>
:
/>
:
this
.
state
.
id
===
1
?
this
.
state
.
id
===
1
?
<
ManualBookTia
/>
:
<
ManualBookTia
/>
:
this
.
state
.
id
===
3
?
<
QReview
data
=
{
this
.
state
.
listData
[
this
.
state
.
tab
]}
/>
:
<
span
>
Test2
<
/span
>
<
span
>
Test2
<
/span
>
)}
)}
...
...
src/container/DocumentManagement/QReview.js
0 → 100644
View file @
b4dabb9c
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