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
46be3014
Commit
46be3014
authored
Oct 05, 2020
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rifka' into 'master'
loading create auah See merge request
!455
parents
8edb12a0
a649918d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
13 deletions
+11
-13
CreateManagementDoc.js
src/container/DocumentManagement/CreateManagementDoc.js
+6
-6
DocumentManagement.js
src/container/DocumentManagement/DocumentManagement.js
+5
-7
No files found.
src/container/DocumentManagement/CreateManagementDoc.js
View file @
46be3014
...
...
@@ -327,7 +327,7 @@ export default class CreateManagementDoc extends Component {
);
return
(
<
div
>
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"test app-popup-show"
style
=
{{
zIndex
:
120
}}
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
}}
>
<
div
className
=
"popup-panel grid grid-2x main-color"
style
=
{{
height
:
64
,
borderTopRightRadius
:
8
,
borderTopLeftRadius
:
8
}}
>
<
div
className
=
"col-1"
style
=
{{
maxWidth
:
"inherit"
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
...
...
@@ -528,11 +528,11 @@ export default class CreateManagementDoc extends Component {
<
button
type
=
"button"
onClick
=
{()
=>
//
{this.props.handleLoading(1)
setTimeout
(()
=>
{
this
.
validasi
()
},
100
)
//
}
{
this
.
props
.
handleLoading
(
1
)
setTimeout
(()
=>
{
this
.
validasi
()
},
100
)
}
}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
...
...
src/container/DocumentManagement/DocumentManagement.js
View file @
46be3014
...
...
@@ -93,19 +93,17 @@ export default class DocumentManagement extends Component {
}
createDocument
(
payload
,
settingID
,
menuName
)
{
this
.
setState
({
visibleCreate
:
false
,
loading
:
true
})
//
this.setState({ visibleCreate: false, loading: true })
api
.
create
().
uploadDocument
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
message
===
"The Document Already Exists in The System, Do You Want to Overwrite It?"
)
{
this
.
setState
({
formData
:
payload
,
docId
:
response
.
data
.
data
.
document_id
,
settingID
,
menuName
,
loading
:
false
},
()
=>
{
this
.
setState
({
konfirmasi
:
true
})
})
this
.
setState
({
konfirmasi
:
true
,
formData
:
payload
,
docId
:
response
.
data
.
data
.
document_id
,
settingID
,
menuName
,
loading
:
false
})
}
else
if
(
response
.
data
.
message
===
"Data was Saved Successfully"
)
{
this
.
getDataDocument
(
settingID
,
menuName
)
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
,
settingID
,
menuName
,
visibleCreate
:
false
,
loading
:
fals
e
})
this
.
setState
({
visibleCreate
:
false
,
loading
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
,
settingID
,
menuNam
e
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
...
...
@@ -127,7 +125,7 @@ export default class DocumentManagement extends Component {
}
createUploadDocument
()
{
this
.
setState
({
visibleCreate
:
false
,
loading
:
tru
e
})
this
.
setState
({
visibleCreate
:
false
,
konfirmasi
:
fals
e
})
const
formData
=
this
.
state
.
formData
formData
.
append
(
"documentId"
,
this
.
state
.
docId
)
formData
.
append
(
"updated"
,
1
)
...
...
@@ -138,7 +136,7 @@ export default class DocumentManagement extends Component {
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
getDataDocument
(
this
.
state
.
settingID
,
this
.
state
.
menuName
)
this
.
setState
({
konfirmasi
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
,
visibleCreate
:
false
})
this
.
setState
({
konfirmasi
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
,
visibleCreate
:
false
,
loading
:
false
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
...
...
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