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
2d0edb47
Commit
2d0edb47
authored
Dec 15, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-riri' into 'ENV-DEV'
alert error See merge request
!2260
parents
c2c53026
c555d1e5
Changes
1
Hide 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 @
2d0edb47
...
@@ -22,9 +22,12 @@ import { fixNumber, roundMath } from "../../library/Utils";
...
@@ -22,9 +22,12 @@ import { fixNumber, roundMath } from "../../library/Utils";
import
LOCF
from
'./LOCFMR'
;
import
LOCF
from
'./LOCFMR'
;
import
LOV
from
'./LOVMR'
;
import
LOV
from
'./LOVMR'
;
function
Alert
(
props
)
{
const
Alert
=
withStyles
({
return
<
MuiAlert
elevation
=
{
6
}
variant
=
"filled"
{...
props
}
/>
;
})((
props
)
=>
<
MuiAlert
elevation
=
{
6
}
variant
=
"filled"
{...
props
}
/>
)
;
}
// function Alert(props) {
// return <MuiAlert elevation={6} variant="filled" {...props} />;
// }
const
useStyles
=
makeStyles
((
theme
)
=>
({
const
useStyles
=
makeStyles
((
theme
)
=>
({
root
:
{
root
:
{
...
@@ -136,6 +139,9 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -136,6 +139,9 @@ export default class ListOfCreditFacilities extends Component {
saveTambahan
:
true
,
saveTambahan
:
true
,
defaultCurrencyUpload
:
this
.
props
.
defaultCurrency
,
defaultCurrencyUpload
:
this
.
props
.
defaultCurrency
,
visibleAlertSave
:
false
,
visibleAlertSave
:
false
,
alert
:
false
,
tipeAlert
:
''
,
messageAlert
:
''
,
}
}
}
}
...
@@ -456,17 +462,13 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -456,17 +462,13 @@ export default class ListOfCreditFacilities extends Component {
let
error
=
false
let
error
=
false
// this.deleteReport()
// this.deleteReport()
if
(
this
.
state
.
dataTablelov
!==
undefined
&&
this
.
state
.
tambahLOV
==
undefined
)
{
if
(
this
.
state
.
dataTablelov
!==
undefined
&&
this
.
state
.
tambahLOV
==
undefined
)
{
console
.
log
(
'1'
);
dataTable2
=
this
.
state
.
dataTablelov
dataTable2
=
this
.
state
.
dataTablelov
}
else
{
}
else
{
console
.
log
(
'2'
);
dataTable2
=
this
.
state
.
dataTableLOV
dataTable2
=
this
.
state
.
dataTableLOV
this
.
setState
({
updateTambah
:
true
,
updateData
:
false
})
this
.
setState
({
updateTambah
:
true
,
updateData
:
false
})
if
(
this
.
state
.
tambahLOV
=
'tambah'
&&
this
.
state
.
updateData
==
false
)
{
if
(
this
.
state
.
tambahLOV
=
'tambah'
&&
this
.
state
.
updateData
==
false
)
{
console
.
log
(
'3'
);
dataTable2
=
this
.
state
.
dataTablelov
dataTable2
=
this
.
state
.
dataTablelov
}
else
{
}
else
{
console
.
log
(
'4'
)
dataTable2
=
this
.
state
.
dataTableLOV
dataTable2
=
this
.
state
.
dataTableLOV
}
}
...
@@ -552,7 +554,7 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -552,7 +554,7 @@ export default class ListOfCreditFacilities extends Component {
if
(
response
.
data
?.
message
==
"Please Set Up Rate Currency First"
)
{
if
(
response
.
data
?.
message
==
"Please Set Up Rate Currency First"
)
{
this
.
setState
({
visibleAlertSave
:
true
})
this
.
setState
({
visibleAlertSave
:
true
})
}
else
{
}
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"
))
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
localStorage
.
removeItem
(
Constant
.
TOKEN
)
...
@@ -564,10 +566,11 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -564,10 +566,11 @@ export default class ListOfCreditFacilities extends Component {
// alert(response.data.status)
// alert(response.data.status)
}
}
}
else
{
}
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
{
}
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
})
this
.
setState
({
handleDoubleClick
:
0
})
})
})
...
@@ -1403,6 +1406,10 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -1403,6 +1406,10 @@ export default class ListOfCreditFacilities extends Component {
}
}
}
}
closeAlert
()
{
this
.
setState
({
alert
:
false
})
}
render
()
{
render
()
{
let
dataTable2
=
this
.
state
.
dataTable
let
dataTable2
=
this
.
state
.
dataTable
let
loading
=
this
.
state
.
loading
let
loading
=
this
.
state
.
loading
...
@@ -1437,9 +1444,9 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -1437,9 +1444,9 @@ export default class ListOfCreditFacilities extends Component {
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
{
this
.
state
.
visibleParent
?
{
this
.
state
.
visibleParent
?
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
20
}}
>
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
20
}}
>
<
Snackbar
open
=
{
this
.
state
.
snekbar
}
autoHideDuration
=
{
3000
}
onClose
=
{
handleClose
}
>
<
Snackbar
open
=
{
this
.
state
.
alert
}
autoHideDuration
=
{
6000
}
onClose
=
{()
=>
this
.
closeAlert
()
}
>
<
Alert
onClose
=
{
handleClose
}
severity
=
"error"
>
<
Alert
onClose
=
{
()
=>
this
.
closeAlert
()}
severity
=
{
this
.
state
.
tipeAlert
}
>
{
this
.
state
.
snekbarMsg
}
{
this
.
state
.
messageAlert
}
<
/Alert
>
<
/Alert
>
<
/Snackbar
>
<
/Snackbar
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
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