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
6a516f21
Commit
6a516f21
authored
Sep 29, 2020
by
Rifka Kurnia Irfiana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update doc manag
parent
1c026c14
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
85 additions
and
61 deletions
+85
-61
AllDocument.js
src/container/DocumentManagement/AllDocument.js
+2
-2
CreateManagementDoc.js
src/container/DocumentManagement/CreateManagementDoc.js
+40
-31
DocumentManagement.js
src/container/DocumentManagement/DocumentManagement.js
+1
-1
EditManagementDoc.js
src/container/DocumentManagement/EditManagementDoc.js
+42
-27
No files found.
src/container/DocumentManagement/AllDocument.js
View file @
6a516f21
...
@@ -259,13 +259,13 @@ export default class getAllDocument extends Component {
...
@@ -259,13 +259,13 @@ export default class getAllDocument extends Component {
}
}
},
"File Name"
,
"Description"
,
"Company Name"
,
},
"File Name"
,
"Description"
,
"Company Name"
,
{
{
name
:
"
Monthly
"
,
name
:
"
Period Month
"
,
options
:
{
options
:
{
display
:
String
(
this
.
props
.
data
.
value
).
includes
(
'Manual Book TIA'
)
?
false
:
true
display
:
String
(
this
.
props
.
data
.
value
).
includes
(
'Manual Book TIA'
)
?
false
:
true
}
}
},
},
{
{
name
:
"Period"
,
name
:
"Period
Year
"
,
options
:
{
options
:
{
display
:
String
(
this
.
props
.
data
.
value
).
includes
(
'Manual Book TIA'
)
?
false
:
true
display
:
String
(
this
.
props
.
data
.
value
).
includes
(
'Manual Book TIA'
)
?
false
:
true
}
}
...
...
src/container/DocumentManagement/CreateManagementDoc.js
View file @
6a516f21
...
@@ -29,8 +29,12 @@ export default class CreateManagementDoc extends Component {
...
@@ -29,8 +29,12 @@ export default class CreateManagementDoc extends Component {
msgErrorDocument
:
''
,
msgErrorDocument
:
''
,
listPeriode
:
null
,
listPeriode
:
null
,
periode
:
null
,
periode
:
null
,
errorPeriode
:
false
,
msgErrorPeriode
:
''
,
listMonth
:
null
,
listMonth
:
null
,
monthId
:
null
,
monthId
:
null
,
errorMonth
:
false
,
msgErrorMonth
:
''
,
description
:
''
,
description
:
''
,
errorDesc
:
false
,
errorDesc
:
false
,
msgErrorDesc
:
''
,
msgErrorDesc
:
''
,
...
@@ -202,6 +206,10 @@ export default class CreateManagementDoc extends Component {
...
@@ -202,6 +206,10 @@ export default class CreateManagementDoc extends Component {
msgErrorPerusahaan
:
''
,
msgErrorPerusahaan
:
''
,
errorDocument
:
false
,
errorDocument
:
false
,
msgErrorDocument
:
''
,
msgErrorDocument
:
''
,
errorMonth
:
false
,
msgErrorMonth
:
''
,
errorPeriode
:
false
,
msgErrorPeriode
:
''
,
})
})
}
}
...
@@ -221,17 +229,16 @@ export default class CreateManagementDoc extends Component {
...
@@ -221,17 +229,16 @@ export default class CreateManagementDoc extends Component {
}
}
validasi
()
{
validasi
()
{
console
.
log
(
this
.
state
.
monthId
.
month_id
)
if
(
R
.
isNil
(
this
.
state
.
getPerusahaan
))
{
if
(
R
.
isNil
(
this
.
state
.
getPerusahaan
))
{
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company Cannot be Empty'
})
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getDocument
))
{
}
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.periode)) {
else
if
(
R
.
isNil
(
this
.
state
.
periode
))
{
//
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
.
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'
})
}
else
{
}
else
{
...
@@ -298,25 +305,6 @@ export default class CreateManagementDoc extends Component {
...
@@ -298,25 +305,6 @@ export default class CreateManagementDoc extends Component {
value
=
{
this
.
state
.
getPerusahaan
}
value
=
{
this
.
state
.
getPerusahaan
}
/
>
/
>
<
/div
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
{...
this
.
state
.
listMonth
}
// debug
clearOnEscape
id
=
"month"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
monthId
:
newInputValue
},
()
=>
{
this
.
clearMessage
()
})}
style
=
{{
width
:
250
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Monthly"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
/>
}
value
=
{
this
.
state
.
monthId
}
/
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"column-2"
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
...
@@ -336,21 +324,42 @@ export default class CreateManagementDoc extends Component {
...
@@ -336,21 +324,42 @@ export default class CreateManagementDoc extends Component {
value
=
{
this
.
state
.
getDocument
}
value
=
{
this
.
state
.
getDocument
}
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"column-1"
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
{...
this
.
state
.
listMonth
}
// debug
clearOnEscape
id
=
"month"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
monthId
:
newInputValue
},
()
=>
this
.
clearMessage
())}
style
=
{{
width
:
250
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Period Month"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
error
=
{
this
.
state
.
errorMonth
}
helperText
=
{
this
.
state
.
msgErrorMonth
}
/>
}
value
=
{
this
.
state
.
monthId
}
/
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
<
Autocomplete
{...
this
.
state
.
listPeriode
}
{...
this
.
state
.
listPeriode
}
// debug
// debug
clearOnEscape
clearOnEscape
id
=
"periode"
id
=
"periode"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
},
()
=>
{
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
},
()
=>
this
.
clearMessage
())}
this
.
clearMessage
()
})}
style
=
{{
width
:
250
}}
style
=
{{
width
:
250
}}
renderInput
=
{(
params
)
=>
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Period"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
<
TextField
{...
params
}
label
=
"Period
Year
"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
error
=
{
this
.
state
.
errorPeriode
}
helperText
=
{
this
.
state
.
msgErrorPeriode
}
/>
}
/>
}
value
=
{
this
.
state
.
periode
}
value
=
{
this
.
state
.
periode
}
/
>
/
>
...
...
src/container/DocumentManagement/DocumentManagement.js
View file @
6a516f21
...
@@ -184,7 +184,7 @@ export default class DocumentManagement extends Component {
...
@@ -184,7 +184,7 @@ export default class DocumentManagement extends Component {
<
/Alert
>
<
/Alert
>
<
/Snackbar
>
<
/Snackbar
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Management
Docu
ment
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Document
Manage
ment
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
padding
:
20
}}
>
<
Paper
style
=
{{
padding
:
20
}}
>
<
Paper
style
=
{{
padding
:
20
}}
>
...
...
src/container/DocumentManagement/EditManagementDoc.js
View file @
6a516f21
...
@@ -34,6 +34,10 @@ export default class EditManagementDoc extends Component {
...
@@ -34,6 +34,10 @@ export default class EditManagementDoc extends Component {
description
:
''
,
description
:
''
,
errorDesc
:
false
,
errorDesc
:
false
,
msgErrorDesc
:
''
,
msgErrorDesc
:
''
,
errorMonth
:
false
,
msgErrorMonth
:
''
,
errorPeriode
:
false
,
msgErrorPeriode
:
''
,
file
:
null
,
file
:
null
,
alert
:
false
,
alert
:
false
,
tipeAlert
:
''
,
tipeAlert
:
''
,
...
@@ -250,6 +254,10 @@ export default class EditManagementDoc extends Component {
...
@@ -250,6 +254,10 @@ export default class EditManagementDoc extends Component {
msgErrorPerusahaan
:
''
,
msgErrorPerusahaan
:
''
,
errorDocument
:
false
,
errorDocument
:
false
,
msgErrorDocument
:
''
,
msgErrorDocument
:
''
,
errorMonth
:
false
,
msgErrorMonth
:
''
,
errorPeriode
:
false
,
msgErrorPeriode
:
''
,
})
})
}
}
...
@@ -277,8 +285,13 @@ export default class EditManagementDoc extends Component {
...
@@ -277,8 +285,13 @@ export default class EditManagementDoc extends Component {
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'
})
// this.setState({ errorDocument: true, msgErrorDocument: 'File Cannot be Empty' })
}
}
else
{
else
if
(
R
.
isNil
(
this
.
state
.
periode
))
{
this
.
setState
({
errorPeriode
:
true
,
msgErrorPeriode
:
'Period Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
monthId
))
{
this
.
setState
({
errorMonth
:
true
,
msgErrorMonth
:
'Month Cannot be Empty'
})
}
else
{
const
formData
=
new
FormData
();
const
formData
=
new
FormData
();
if
(
this
.
state
.
file
==
this
.
state
.
filePath
){
if
(
this
.
state
.
file
==
this
.
state
.
filePath
){
formData
.
append
(
"updated"
,
0
);
formData
.
append
(
"updated"
,
0
);
...
@@ -355,25 +368,6 @@ export default class EditManagementDoc extends Component {
...
@@ -355,25 +368,6 @@ export default class EditManagementDoc extends Component {
value
=
{
this
.
state
.
getPerusahaan
}
value
=
{
this
.
state
.
getPerusahaan
}
/
>
/
>
<
/div
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
{...
this
.
state
.
listMonth
}
// debug
clearOnEscape
id
=
"month"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
monthId
:
newInputValue
},
()
=>
{
this
.
clearMessage
()
})}
style
=
{{
width
:
250
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Monthly"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
/>
}
value
=
{
this
.
state
.
monthId
}
/
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"column-2"
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
...
@@ -393,21 +387,42 @@ export default class EditManagementDoc extends Component {
...
@@ -393,21 +387,42 @@ export default class EditManagementDoc extends Component {
value
=
{
this
.
state
.
getDocument
}
value
=
{
this
.
state
.
getDocument
}
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"column-1"
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
{...
this
.
state
.
listMonth
}
// debug
clearOnEscape
id
=
"month"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
monthId
:
newInputValue
},
()
=>
this
.
clearMessage
())}
style
=
{{
width
:
250
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Period Month"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
error
=
{
this
.
state
.
errorMonth
}
helperText
=
{
this
.
state
.
msgErrorMonth
}
/>
}
value
=
{
this
.
state
.
monthId
}
/
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
<
Autocomplete
{...
this
.
state
.
listPeriode
}
{...
this
.
state
.
listPeriode
}
// debug
// debug
clearOnEscape
clearOnEscape
id
=
"periode"
id
=
"periode"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
},
()
=>
{
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
},
()
=>
this
.
clearMessage
())}
this
.
clearMessage
()
})}
style
=
{{
width
:
250
}}
style
=
{{
width
:
250
}}
renderInput
=
{(
params
)
=>
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Period"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
<
TextField
{...
params
}
label
=
"Period
Year
"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
error
=
{
this
.
state
.
errorPeriode
}
helperText
=
{
this
.
state
.
msgErrorPeriode
}
/>
}
/>
}
value
=
{
this
.
state
.
periode
}
value
=
{
this
.
state
.
periode
}
/
>
/
>
...
...
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