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
a6ad5deb
Commit
a6ad5deb
authored
Jul 17, 2022
by
syadziy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update fixing UAT
parent
ed408605
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
CafrmDocument.js
src/container/CAFRM/CafrmDocument.js
+7
-5
TableCafrmDocument.js
src/container/CAFRM/TableCafrmDocument.js
+2
-5
No files found.
src/container/CAFRM/CafrmDocument.js
View file @
a6ad5deb
...
...
@@ -184,17 +184,19 @@ export default class CarfmDocument extends Component {
}
createDocument
(
payload
)
{
//upload apinya disini
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
,
visibleTrue
:
false
})
api
.
create
().
uploadCarfmDocument
(
payload
).
then
(
response
=>
{
// console.log(response)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
message
===
"Data was Saved Successfully"
)
{
this
.
setState
({
visibleCreate
:
false
,
loading
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
this
.
setState
({
visibleCreate
:
false
,
visibleTrue
:
true
,
loading
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
},
()
=>
{
// window.location.reload();
})
// this.getDataCarfm('create')
}
else
{
this
.
setState
({
visibleCreate
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
this
.
setState
({
visibleCreate
:
false
,
visibleTrue
:
true
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
...
...
@@ -204,10 +206,10 @@ export default class CarfmDocument extends Component {
})
}
}
else
{
this
.
setState
({
visibleCreate
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
,
loading
:
false
})
this
.
setState
({
visibleCreate
:
false
,
visibleTrue
:
true
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
,
loading
:
false
})
}
}
else
{
this
.
setState
({
visibleCreate
:
false
,
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
this
.
setState
({
visibleCreate
:
false
,
visibleTrue
:
true
,
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
}
})
}
...
...
src/container/CAFRM/TableCafrmDocument.js
View file @
a6ad5deb
...
...
@@ -35,8 +35,8 @@ export default class TableDocument extends Component {
}
componentWillReceiveProps
(
props
)
{
//
console.log(props);
const
{
refresh
}
=
this
.
props
;
console
.
log
(
props
);
const
{
refresh
}
=
this
.
props
;
if
(
props
.
refresh
!==
refresh
)
{
this
.
getData
()
}
...
...
@@ -139,7 +139,6 @@ export default class TableDocument extends Component {
sort
:
false
,
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
this
.
props
.
btndownload
&&
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
...
...
@@ -155,9 +154,7 @@ export default class TableDocument extends Component {
<
img
src
=
{
Images
.
download
}
/
>
<
/button
>
<
/a>
}
<
ReactTooltip
border
=
{
true
}
id
=
"download"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/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