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
64315224
Commit
64315224
authored
Dec 15, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alert error
parent
39839c11
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
+20
-13
ListOfCreditFacilitiesMR.js
src/container/MonthlyReport/ListOfCreditFacilitiesMR.js
+20
-13
No files found.
src/container/MonthlyReport/ListOfCreditFacilitiesMR.js
View file @
64315224
...
...
@@ -22,9 +22,12 @@ import { fixNumber, roundMath } from "../../library/Utils";
import
LOCF
from
'./LOCFMR'
;
import
LOV
from
'./LOVMR'
;
function
Alert
(
props
)
{
return
<
MuiAlert
elevation
=
{
6
}
variant
=
"filled"
{...
props
}
/>
;
}
const
Alert
=
withStyles
({
})((
props
)
=>
<
MuiAlert
elevation
=
{
6
}
variant
=
"filled"
{...
props
}
/>
)
;
// function Alert(props) {
// return <MuiAlert elevation={6} variant="filled" {...props} />;
// }
const
useStyles
=
makeStyles
((
theme
)
=>
({
root
:
{
...
...
@@ -136,6 +139,9 @@ export default class ListOfCreditFacilities extends Component {
saveTambahan
:
true
,
defaultCurrencyUpload
:
this
.
props
.
defaultCurrency
,
visibleAlertSave
:
false
,
alert
:
false
,
tipeAlert
:
''
,
messageAlert
:
''
,
}
}
...
...
@@ -456,17 +462,13 @@ export default class ListOfCreditFacilities extends Component {
let
error
=
false
// this.deleteReport()
if
(
this
.
state
.
dataTablelov
!==
undefined
&&
this
.
state
.
tambahLOV
==
undefined
)
{
console
.
log
(
'1'
);
dataTable2
=
this
.
state
.
dataTablelov
}
else
{
console
.
log
(
'2'
);
dataTable2
=
this
.
state
.
dataTableLOV
this
.
setState
({
updateTambah
:
true
,
updateData
:
false
})
if
(
this
.
state
.
tambahLOV
=
'tambah'
&&
this
.
state
.
updateData
==
false
)
{
console
.
log
(
'3'
);
dataTable2
=
this
.
state
.
dataTablelov
}
else
{
console
.
log
(
'4'
)
dataTable2
=
this
.
state
.
dataTableLOV
}
...
...
@@ -552,7 +554,7 @@ export default class ListOfCreditFacilities extends Component {
if
(
response
.
data
?.
message
==
"Please Set Up Rate Currency First"
)
{
this
.
setState
({
visibleAlertSave
:
true
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
Child
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
...
...
@@ -564,10 +566,11 @@ export default class ListOfCreditFacilities extends Component {
// alert(response.data.status)
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
,
loading
:
false
,
handleDoubleClick
:
0
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
,
loading
Child
:
false
,
handleDoubleClick
:
0
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
,
handleDoubleClick
:
0
})
console
.
log
(
response
.
problem
);
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loadingChild
:
false
,
handleDoubleClick
:
0
})
}
this
.
setState
({
handleDoubleClick
:
0
})
})
...
...
@@ -1403,6 +1406,10 @@ export default class ListOfCreditFacilities extends Component {
}
}
closeAlert
()
{
this
.
setState
({
alert
:
false
})
}
render
()
{
let
dataTable2
=
this
.
state
.
dataTable
let
loading
=
this
.
state
.
loading
...
...
@@ -1437,9 +1444,9 @@ export default class ListOfCreditFacilities extends Component {
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
{
this
.
state
.
visibleParent
?
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
20
}}
>
<
Snackbar
open
=
{
this
.
state
.
snekbar
}
autoHideDuration
=
{
3000
}
onClose
=
{
handleClose
}
>
<
Alert
onClose
=
{
handleClose
}
severity
=
"error"
>
{
this
.
state
.
snekbarMsg
}
<
Snackbar
open
=
{
this
.
state
.
alert
}
autoHideDuration
=
{
6000
}
onClose
=
{()
=>
this
.
closeAlert
()
}
>
<
Alert
onClose
=
{
()
=>
this
.
closeAlert
()}
severity
=
{
this
.
state
.
tipeAlert
}
>
{
this
.
state
.
messageAlert
}
<
/Alert
>
<
/Snackbar
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
...
...
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