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
be25c9a0
Commit
be25c9a0
authored
Nov 12, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'faisal' into 'master'
dikit aje See merge request
!647
parents
3597f46a
a6eb6f48
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
87 additions
and
52 deletions
+87
-52
SubHolding.js
src/container/Laporan/SubHolding.js
+86
-51
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+1
-1
No files found.
src/container/Laporan/SubHolding.js
View file @
be25c9a0
import
React
,
{
Component
}
from
'react'
import
{
Typography
,
MenuItem
,
TextField
,
AppBar
,
Paper
,
Tabs
,
Tab
}
from
'@material-ui/core'
import
{
Typography
,
MenuItem
,
TextField
,
AppBar
,
Paper
,
Tabs
,
Tab
,
Snackbar
,
withStyles
}
from
'@material-ui/core'
import
Constant
from
'../../library/Constant'
import
api
from
'../../api'
import
{
titleCase
}
from
'../../library/Utils'
...
...
@@ -8,6 +8,10 @@ import TableSubHolding from './TableSubHolding'
import
{
PropagateLoader
}
from
'react-spinners'
import
ReactTooltip
from
'react-tooltip'
import
Images
from
'../../assets/Images'
import
MuiAlert
from
'@material-ui/lab/Alert'
;
const
Alert
=
withStyles
({
})((
props
)
=>
<
MuiAlert
elevation
=
{
6
}
variant
=
"filled"
{...
props
}
/>
)
;
export
default
class
SubHolding
extends
Component
{
constructor
(
props
)
{
...
...
@@ -193,7 +197,18 @@ export default class SubHolding extends Component {
this
.
getSubmission
()
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
}
})
}
...
...
@@ -493,6 +508,7 @@ export default class SubHolding extends Component {
console
.
log
(
response
);
let
dataTable
=
[]
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
let
res
=
response
.
data
.
data
const
handlePushChild
=
(
item
)
=>
{
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
...
...
@@ -571,7 +587,17 @@ export default class SubHolding extends Component {
})
this
.
setState
({
dataTable
,
previewTable
:
true
,
loading
:
false
,
previewDownload
:
true
})
}
else
{
this
.
setState
({
dataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
}
})
}
...
...
@@ -639,6 +665,10 @@ export default class SubHolding extends Component {
}
}
closeAlert
()
{
this
.
setState
({
alert
:
false
})
}
render
()
{
const
loadingComponent
=
(
<
div
style
=
{{
position
:
'fixed'
,
zIndex
:
110
,
top
:
0
,
left
:
0
,
width
:
'100%'
,
height
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
background
:
'rgba(255,255,255,0.8)'
}}
>
...
...
@@ -656,6 +686,11 @@ export default class SubHolding extends Component {
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Sub
Holding
Report
<
/Typography
>
<
/div
>
<
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
=
{{
padding
:
20
,
width
:
'100%'
}}
>
<
Paper
style
=
{{
paddingTop
:
10
}}
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
...
...
src/container/Laporan/TableSubHolding.js
View file @
be25c9a0
...
...
@@ -3037,7 +3037,7 @@ export default class TableSubHolding extends Component {
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
9
6
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
9
0
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
...
...
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