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
Show 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 {
...
@@ -184,17 +184,19 @@ export default class CarfmDocument extends Component {
}
}
createDocument
(
payload
)
{
//upload apinya disini
createDocument
(
payload
)
{
//upload apinya disini
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
,
visibleTrue
:
false
})
api
.
create
().
uploadCarfmDocument
(
payload
).
then
(
response
=>
{
api
.
create
().
uploadCarfmDocument
(
payload
).
then
(
response
=>
{
// console.log(response)
// console.log(response)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
message
===
"Data was Saved Successfully"
)
{
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')
// this.getDataCarfm('create')
}
}
else
{
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"
))
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
localStorage
.
removeItem
(
Constant
.
TOKEN
)
...
@@ -204,10 +206,10 @@ export default class CarfmDocument extends Component {
...
@@ -204,10 +206,10 @@ export default class CarfmDocument extends Component {
})
})
}
}
}
else
{
}
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
{
}
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 {
...
@@ -35,8 +35,8 @@ export default class TableDocument extends Component {
}
}
componentWillReceiveProps
(
props
)
{
componentWillReceiveProps
(
props
)
{
//
console.log(props);
console
.
log
(
props
);
const
{
refresh
}
=
this
.
props
;
const
{
refresh
}
=
this
.
props
;
if
(
props
.
refresh
!==
refresh
)
{
if
(
props
.
refresh
!==
refresh
)
{
this
.
getData
()
this
.
getData
()
}
}
...
@@ -139,7 +139,6 @@ export default class TableDocument extends Component {
...
@@ -139,7 +139,6 @@ export default class TableDocument extends Component {
sort
:
false
,
sort
:
false
,
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
this
.
props
.
btndownload
&&
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
{
this
.
props
.
btndownload
&&
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
...
@@ -155,9 +154,7 @@ export default class TableDocument extends Component {
...
@@ -155,9 +154,7 @@ export default class TableDocument extends Component {
<
img
src
=
{
Images
.
download
}
/
>
<
img
src
=
{
Images
.
download
}
/
>
<
/button
>
<
/button
>
<
/a>
}
<
/a>
}
<
ReactTooltip
border
=
{
true
}
id
=
"download"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"download"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/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