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
a154ac1b
Commit
a154ac1b
authored
Oct 05, 2020
by
Rifka Kurnia Irfiana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issue managdoc
parent
32d31217
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
87 additions
and
21 deletions
+87
-21
AllDocument.js
src/container/DocumentManagement/AllDocument.js
+13
-3
CreateManagementDoc.js
src/container/DocumentManagement/CreateManagementDoc.js
+37
-9
DocumentManagement.js
src/container/DocumentManagement/DocumentManagement.js
+1
-0
EditManagementDoc.js
src/container/DocumentManagement/EditManagementDoc.js
+36
-9
No files found.
src/container/DocumentManagement/AllDocument.js
View file @
a154ac1b
...
@@ -10,6 +10,7 @@ import PopUpDelete from "./PopUpDelete";
...
@@ -10,6 +10,7 @@ import PopUpDelete from "./PopUpDelete";
import
api
from
'../../api'
;
import
api
from
'../../api'
;
import
CreateManagementDoc
from
'./CreateManagementDoc'
;
import
CreateManagementDoc
from
'./CreateManagementDoc'
;
import
EditManagementDoc
from
'./EditManagementDoc'
;
import
EditManagementDoc
from
'./EditManagementDoc'
;
import
PropagateLoader
from
"react-spinners/PropagateLoader"
var
ct
=
require
(
"../../library/CustomTable"
);
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
...
@@ -168,7 +169,7 @@ export default class getAllDocument extends Component {
...
@@ -168,7 +169,7 @@ export default class getAllDocument extends Component {
}
}
updateDocument
(
payload
)
{
updateDocument
(
payload
)
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
visibleEdit
:
false
,
loading
:
true
})
api
.
create
().
updateDocument
(
payload
).
then
(
response
=>
{
api
.
create
().
updateDocument
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
...
@@ -282,7 +283,16 @@ export default class getAllDocument extends Component {
...
@@ -282,7 +283,16 @@ export default class getAllDocument extends Component {
"Type"
,
"File Size"
,
"Created By"
,
"Created Date"
"Type"
,
"File Size"
,
"Created By"
,
"Created Date"
]
]
const
loadingComponent
=
(
<
div
style
=
{{
position
:
'absolute'
,
zIndex
:
110
,
top
:
0
,
left
:
0
,
width
:
'100%'
,
height
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
background
:
'rgba(255,255,255,0.8)'
}}
>
<
PropagateLoader
// css={override}
size
=
{
20
}
color
=
{
"#274B80"
}
loading
=
{
this
.
state
.
loading
}
/
>
<
/div
>
);
return
(
return
(
<
div
style
=
{{
width
:
'100%'
}}
>
<
div
style
=
{{
width
:
'100%'
}}
>
...
@@ -293,7 +303,7 @@ export default class getAllDocument extends Component {
...
@@ -293,7 +303,7 @@ export default class getAllDocument extends Component {
{
this
.
state
.
messageAlert
}
{
this
.
state
.
messageAlert
}
<
/Alert
>
<
/Alert
>
<
/Snackbar
>
<
/Snackbar
>
{
this
.
state
.
loading
&&
loadingComponent
}
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
<
MUIDataTable
// theme={getMuiTheme()}
// theme={getMuiTheme()}
...
...
src/container/DocumentManagement/CreateManagementDoc.js
View file @
a154ac1b
...
@@ -347,6 +347,7 @@ export default class CreateManagementDoc extends Component {
...
@@ -347,6 +347,7 @@ export default class CreateManagementDoc extends Component {
<
/div
>
<
/div
>
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
,
paddingTop
:
20
}}
>
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
,
paddingTop
:
20
}}
>
{
this
.
state
.
disabledPeriode
===
false
?
<
div
className
=
"column-1"
>
<
div
className
=
"column-1"
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
<
Autocomplete
...
@@ -366,6 +367,8 @@ export default class CreateManagementDoc extends Component {
...
@@ -366,6 +367,8 @@ export default class CreateManagementDoc extends Component {
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
:
true
}
{
this
.
state
.
disabledPeriode
===
false
?
<
div
className
=
"column-2"
>
<
div
className
=
"column-2"
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
<
Autocomplete
...
@@ -390,6 +393,32 @@ export default class CreateManagementDoc extends Component {
...
@@ -390,6 +393,32 @@ export default class CreateManagementDoc extends Component {
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
:
<
div
className
=
"column-1"
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
{...
this
.
state
.
document
}
// debug
clearOnEscape
id
=
"tipe"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
getDocument
:
newInputValue
},
()
=>
newInputValue
===
null
?
this
.
setState
({
disabledPeriode
:
false
})
:
newInputValue
.
document_category_name
===
'Manual Book TIA 4.0'
?
this
.
setState
({
disabledPeriode
:
true
},
()
=>
this
.
clearMessage
())
:
this
.
setState
({
disabledPeriode
:
false
},
()
=>
this
.
clearMessage
())
)}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
error
=
{
this
.
state
.
errorDocument
}
helperText
=
{
this
.
state
.
msgErrorDocument
}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
label
=
"Category"
/>
}
value
=
{
this
.
state
.
getDocument
}
/
>
<
/div
>
<
/div
>
}
{
this
.
state
.
disabledPeriode
===
false
?
{
this
.
state
.
disabledPeriode
===
false
?
<
div
className
=
"column-1"
>
<
div
className
=
"column-1"
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
...
@@ -433,7 +462,6 @@ export default class CreateManagementDoc extends Component {
...
@@ -433,7 +462,6 @@ export default class CreateManagementDoc extends Component {
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
// )}
:
true
}
:
true
}
<
/div
>
<
/div
>
<
div
style
=
{{
paddingLeft
:
30
,
paddingRight
:
30
,
paddingTop
:
10
}}
>
<
div
style
=
{{
paddingLeft
:
30
,
paddingRight
:
30
,
paddingTop
:
10
}}
>
...
...
src/container/DocumentManagement/DocumentManagement.js
View file @
a154ac1b
...
@@ -297,6 +297,7 @@ export default class DocumentManagement extends Component {
...
@@ -297,6 +297,7 @@ export default class DocumentManagement extends Component {
setId
=
{
this
.
state
.
id
}
setId
=
{
this
.
state
.
id
}
userCompActive
=
{
this
.
state
.
userCompActive
}
userCompActive
=
{
this
.
state
.
userCompActive
}
allsubcoEdit
=
{
this
.
state
.
btnadd
}
allsubcoEdit
=
{
this
.
state
.
btnadd
}
handleLoading
=
{
this
.
handleLoading
.
bind
(
this
)}
/
>
/
>
// this.state.id === 68542 ?
// this.state.id === 68542 ?
// <AuditTahunan
// <AuditTahunan
...
...
src/container/DocumentManagement/EditManagementDoc.js
View file @
a154ac1b
...
@@ -291,11 +291,11 @@ export default class EditManagementDoc extends Component {
...
@@ -291,11 +291,11 @@ export default class EditManagementDoc extends Component {
this
.
setState
({
errorPeriode
:
true
,
msgErrorPeriode
:
'Period Cannot be Empty'
})
this
.
setState
({
errorPeriode
:
true
,
msgErrorPeriode
:
'Period Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
monthId
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
monthId
))
{
this
.
setState
({
errorMonth
:
true
,
msgErrorMonth
:
'Month Cannot be Empty'
})
this
.
setState
({
errorMonth
:
true
,
msgErrorMonth
:
'Month Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getPerusahaan
))
{
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company Cannot be Empty'
})
}
}
}
}
if
(
R
.
isNil
(
this
.
state
.
getPerusahaan
))
{
if
(
R
.
isNil
(
this
.
state
.
getDocument
))
{
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getDocument
))
{
this
.
setState
({
errorDocument
:
true
,
msgErrorDocument
:
'Category Cannot be Empty'
})
this
.
setState
({
errorDocument
:
true
,
msgErrorDocument
:
'Category Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
file
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
file
))
{
this
.
setState
({
alert
:
true
,
messageAlert
:
'File Cannot be Empty'
,
tipeAlert
:
'warning'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
'File Cannot be Empty'
,
tipeAlert
:
'warning'
})
...
@@ -313,11 +313,13 @@ export default class EditManagementDoc extends Component {
...
@@ -313,11 +313,13 @@ export default class EditManagementDoc extends Component {
if
(
String
(
this
.
props
.
name
).
includes
(
'Manual Book TIA'
)){
if
(
String
(
this
.
props
.
name
).
includes
(
'Manual Book TIA'
)){
formData
.
append
(
"documentMonth"
,
null
);
formData
.
append
(
"documentMonth"
,
null
);
formData
.
append
(
"documentPeriode"
,
null
);
formData
.
append
(
"documentPeriode"
,
null
);
formData
.
append
(
"companyId"
,
1
);
}
else
{
}
else
{
formData
.
append
(
"documentMonth"
,
this
.
state
.
monthId
.
month_id
);
formData
.
append
(
"documentMonth"
,
this
.
state
.
monthId
.
month_id
);
formData
.
append
(
"documentPeriode"
,
this
.
state
.
periode
.
periode
);
formData
.
append
(
"documentPeriode"
,
this
.
state
.
periode
.
periode
);
}
formData
.
append
(
"companyId"
,
this
.
state
.
getPerusahaan
.
company_id
);
formData
.
append
(
"companyId"
,
this
.
state
.
getPerusahaan
.
company_id
);
}
formData
.
append
(
"settingId"
,
this
.
state
.
getDocument
.
document_category_id
);
formData
.
append
(
"settingId"
,
this
.
state
.
getDocument
.
document_category_id
);
formData
.
append
(
"description"
,
this
.
state
.
description
);
formData
.
append
(
"description"
,
this
.
state
.
description
);
formData
.
append
(
"extension"
,
this
.
state
.
fileType
);
formData
.
append
(
"extension"
,
this
.
state
.
fileType
);
...
@@ -359,6 +361,7 @@ export default class EditManagementDoc extends Component {
...
@@ -359,6 +361,7 @@ export default class EditManagementDoc extends Component {
<
/div
>
<
/div
>
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
,
paddingTop
:
20
}}
>
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
,
paddingTop
:
20
}}
>
{
this
.
state
.
disabledPeriode
===
false
?
<
div
className
=
"column-1"
>
<
div
className
=
"column-1"
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
<
Autocomplete
...
@@ -378,6 +381,8 @@ export default class EditManagementDoc extends Component {
...
@@ -378,6 +381,8 @@ export default class EditManagementDoc extends Component {
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
:
true
}
{
this
.
state
.
disabledPeriode
===
false
?
<
div
className
=
"column-2"
>
<
div
className
=
"column-2"
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
<
Autocomplete
...
@@ -402,8 +407,33 @@ export default class EditManagementDoc extends Component {
...
@@ -402,8 +407,33 @@ export default class EditManagementDoc extends Component {
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
:
<
div
className
=
"column-1"
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
{...
this
.
state
.
document
}
// debug
clearOnEscape
id
=
"tipe"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
getDocument
:
newInputValue
},
()
=>
newInputValue
===
null
?
this
.
setState
({
disabledPeriode
:
false
})
:
newInputValue
.
document_category_name
===
'Manual Book TIA 4.0'
?
this
.
setState
({
disabledPeriode
:
true
},
()
=>
this
.
clearMessage
())
:
this
.
setState
({
disabledPeriode
:
false
},
()
=>
this
.
clearMessage
())
)}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
error
=
{
this
.
state
.
errorDocument
}
helperText
=
{
this
.
state
.
msgErrorDocument
}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
label
=
"Category"
/>
}
value
=
{
this
.
state
.
getDocument
}
/
>
<
/div
>
<
/div
>
}
{
this
.
state
.
disabledPeriode
===
false
?
{
this
.
state
.
disabledPeriode
===
false
?
// {String(this.state.name).includes('Manual Book TIA') ? false : (
<
div
className
=
"column-1"
>
<
div
className
=
"column-1"
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
<
Autocomplete
...
@@ -424,10 +454,8 @@ export default class EditManagementDoc extends Component {
...
@@ -424,10 +454,8 @@ export default class EditManagementDoc extends Component {
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
// )}
:
true
}
:
true
}
{
this
.
state
.
disabledPeriode
===
false
?
{
this
.
state
.
disabledPeriode
===
false
?
// {String(this.state.name).includes('Manual Book TIA') ? false : (
<
div
className
=
"column-2"
>
<
div
className
=
"column-2"
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
<
Autocomplete
...
@@ -448,7 +476,6 @@ export default class EditManagementDoc extends Component {
...
@@ -448,7 +476,6 @@ export default class EditManagementDoc extends Component {
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
// )}
:
true
}
:
true
}
<
/div
>
<
/div
>
<
div
style
=
{{
paddingLeft
:
30
,
paddingRight
:
30
,
paddingTop
:
10
}}
>
<
div
style
=
{{
paddingLeft
:
30
,
paddingRight
:
30
,
paddingTop
:
10
}}
>
...
...
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