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
538a7e59
Commit
538a7e59
authored
Aug 27, 2020
by
EKSAD
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
list rolling outlook
parent
06740938
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
315 additions
and
3 deletions
+315
-3
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+2
-2
RollingOutlook.js
src/container/RollingOutlook.js
+307
-0
Array.js
src/library/Array.js
+1
-1
homeRoutes.js
src/router/homeRoutes.js
+5
-0
No files found.
src/container/BudgetTahunan/ProfitLoss.js
View file @
538a7e59
...
...
@@ -211,7 +211,7 @@ export default class ProfitLoss extends Component {
value
=
{
value
}
control
=
{
<
TextField
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'
righ
t'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'
lef
t'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
InputProps
=
{{
disableUnderline
:
true
}}
...
...
@@ -233,7 +233,7 @@ export default class ProfitLoss extends Component {
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
TextField
style
=
{{
fontSize
:
12
,
textAlign
:
'
righ
t'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'
lef
t'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
InputProps
=
{{
disableUnderline
:
true
}}
placeholder
=
""
...
...
src/container/RollingOutlook.js
0 → 100644
View file @
538a7e59
import
React
,
{
Component
}
from
'react'
;
import
{
Typography
,
Paper
,
TextField
,
MenuItem
}
from
'@material-ui/core'
;
import
MUIDataTable
from
'mui-datatables'
;
import
Images
from
'../assets/Images'
;
import
api
from
'../api'
;
import
Autocomplete
from
'@material-ui/lab/Autocomplete'
;
import
{
titleCase
}
from
'../library/Utils'
;
export
default
class
RollingOutlook
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
periode
:
'2020'
,
perusahaan
:
'TAP Group'
,
revisi
:
'0'
,
visibleRollingOutlook
:
true
,
listCompany
:
null
,
company
:
null
,
report_id
:
null
,
visibleBS
:
false
,
visiblePL
:
false
,
visibleTP
:
false
,
visibleCAT
:
false
}
}
componentDidMount
()
{
this
.
getCompanyActive
()
}
getReport
()
{
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
,
"report_type"
:
"Rolling Outlook"
,
}
console
.
log
(
payload
)
api
.
create
().
getReportTypeBody
(
payload
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
dataTable
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
return
[
index
+
1
,
item
.
report_name
,
""
,
item
.
report_id
]
})
this
.
setState
({
dataTable
})
}
}
})
}
getCompanyActive
()
{
api
.
create
().
getPerusahaanActive
().
then
((
response
)
=>
{
if
(
response
.
data
.
status
===
'success'
)
{
let
data
=
response
.
data
.
data
let
companyData
=
data
.
map
((
item
)
=>
{
return
{
company_id
:
item
.
company_id
,
company_name
:
item
.
company_name
,
}
})
let
defaultProps
=
{
options
:
companyData
,
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
company_name
),
};
this
.
setState
({
listCompany
:
defaultProps
,
company
:
companyData
[
0
]
},
()
=>
this
.
getReport
())
}
else
{
alert
(
response
.
data
.
message
)
}
})
}
clickDetail
(
item
,
id
)
{
this
.
setState
({
report_id
:
id
})
if
(
item
===
'Balance Sheet'
)
{
this
.
setState
({
visibleRollingOutlook
:
false
,
visibleBS
:
true
,
visiblePL
:
false
,
visibleCAT
:
false
,
visibleTP
:
false
,
})
}
else
if
(
item
===
'Profit & Loss'
)
{
this
.
setState
({
visibleRollingOutlook
:
false
,
visibleBS
:
false
,
visiblePL
:
true
,
visibleCAT
:
false
,
visibleTP
:
false
})
}
else
if
(
item
===
'Tax Planning'
)
{
this
.
setState
({
visibleRollingOutlook
:
false
,
visibleBS
:
false
,
visiblePL
:
false
,
visibleCAT
:
false
,
visibleTP
:
true
})
}
else
if
(
item
===
'Fixed Assets Movement'
)
{
this
.
setState
({
visibleRollingOutlook
:
false
,
visibleBS
:
false
,
visiblePL
:
false
,
visibleCAT
:
false
,
visibleFAM
:
true
,
visibleTP
:
false
})
}
else
if
(
item
===
'CAT'
)
{
this
.
setState
({
visibleRollingOutlook
:
false
,
visibleBS
:
false
,
visiblePL
:
false
,
visibleCAT
:
true
,
visibleFAM
:
false
,
visibleTP
:
false
})
}
}
render
()
{
const
columns
=
[
"#"
,
"Jenis Laporan"
,
{
name
:
"Status"
,
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
val
===
"acc"
?
<
img
src
=
{
Images
.
ceklis
}
style
=
{{
width
:
31
,
height
:
24
}}
/>
:
null
}
<
/div
>
);
}
}
},
{
name
:
"Action"
,
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
}}
onClick
=
{()
=>
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
3
])}
>
<
Typography
style
=
{{
color
:
'#5198ea'
,
fontSize
:
12
,
}}
>
Detail
<
/Typography
>
<
/button
>
<
/div
>
);
}
}
}]
const
dataTable
=
[
[
"1"
,
"Balance Sheet"
,
"done"
],
[
"2"
,
"Profit & Loss"
,
""
],
[
"3"
,
"CAT"
,
"done"
],
[
"4"
,
"Fixed Assets Movement"
,
""
],
[
"5"
,
"Tax Planning"
,
"done"
],
[
"6"
,
"Balance Sheet"
,
"done"
],
[
"7"
,
"Profit & Loss"
,
""
],
[
"8"
,
"CAT"
,
"done"
],
[
"9"
,
"Fixed Assets Movement"
,
""
],
[
"10"
,
"Tax Planning"
,
"done"
],
[
"11"
,
"Balance Sheet"
,
"done"
],
[
"12"
,
"Profit & Loss"
,
"done"
],
[
"13"
,
"CAT"
,
"done"
],
[
"14"
,
"Fixed Assets Movement"
,
"done"
],
[
"15"
,
"Tax Planning"
,
"done"
],
]
const
options
=
{
filter
:
false
,
sort
:
false
,
responsive
:
"scroll"
,
print
:
false
,
download
:
false
,
selectableRows
:
false
,
viewColumns
:
false
,
rowsPerPage
:
5
,
rowsPerPageOptions
:
[
5
,
25
,
100
],
search
:
false
}
const
periode
=
[
{
value
:
'2020'
,
label
:
'2020'
},
{
value
:
'2019'
,
label
:
'2019'
},
{
value
:
'2018'
,
label
:
'2018'
},
{
value
:
'2017'
,
label
:
'2017'
},
{
value
:
'2016'
,
label
:
'2016'
},
]
const
perusahaan
=
[
{
value
:
'TAP Group'
,
label
:
'TAP Group'
},
{
value
:
'2019'
,
label
:
'2019'
},
{
value
:
'2018'
,
label
:
'2018'
},
{
value
:
'2017'
,
label
:
'2017'
},
{
value
:
'2016'
,
label
:
'2016'
},
]
const
revisi
=
[
{
value
:
'0'
,
label
:
'0'
},
{
value
:
'1'
,
label
:
'1'
},
]
return
(
<
div
style
=
{{
flex
:
1
,
backgroundColor
:
'#f8f8f8'
}}
>
{
this
.
state
.
visibleRollingOutlook
&&
(
<
div
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Rolling
Outlook
&
Revisi
CAT
<
/Typography
>
<
/div
>
<
div
style
=
{{
padding
:
20
,
width
:
'100%'
}}
>
<
Paper
style
=
{{
paddingTop
:
10
}}
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Rolling
Outlook
&
Revisi
CAT
<
/Typography
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
>
<
TextField
style
=
{{
width
:
250
,
}}
id
=
"periode"
select
label
=
"Periode"
value
=
{
this
.
state
.
periode
}
onChange
=
{(
e
)
=>
this
.
setState
({
periode
:
e
.
target
.
value
})}
>
{
periode
.
map
((
option
)
=>
(
<
MenuItem
key
=
{
option
.
value
}
value
=
{
option
.
value
}
>
{
option
.
label
}
<
/MenuItem
>
))}
<
/TextField
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
Autocomplete
{...
this
.
state
.
listCompany
}
id
=
"company"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
})}
debug
disableClearable
style
=
{{
width
:
250
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Company"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
value
=
{
this
.
state
.
company
}
/
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
TextField
style
=
{{
width
:
250
,
}}
id
=
"reivisi"
select
label
=
"Revisi"
value
=
{
this
.
state
.
revisi
}
onChange
=
{(
e
)
=>
this
.
setState
({
revisi
:
e
.
target
.
value
})}
>
{
revisi
.
map
((
option
)
=>
(
<
MenuItem
key
=
{
option
.
value
}
value
=
{
option
.
value
}
>
{
option
.
label
}
<
/MenuItem
>
))}
<
/TextField
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
MUIDataTable
data
=
{
this
.
state
.
dataTable
}
columns
=
{
columns
}
options
=
{
options
}
/
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
marginTop
:
20
}}
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'#4b4b4b'
,
fontWeight
:
'bold'
}}
>
Attachment
:
<
/Typography
>
<
/div
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'#5198ea'
}}
>
Upload
File
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
marginTop
:
10
}}
>
<
div
style
=
{{
width
:
'50%'
,
paddingLeft
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'#4b4b4b'
}}
>
File
1
.
xls
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'#4b4b4b'
}}
>
File
2
.
xls
<
/Typography
>
<
/div
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'#ff3939'
}}
>
Delete
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'#ff3939'
}}
>
Delete
<
/Typography
>
<
/div
>
<
/div
>
<
/div
>
<
div
style
=
{{
borderTop
:
'solid 1px #c4c4c4'
,
padding
:
10
,
backgroundColor
:
'#f5f5f5'
,
width
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'flex-end'
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Submit
<
/Typography
>
<
/div
>
<
/div
>
<
/Paper
>
<
/div
>
<
/div
>
)}
<
/div
>
);
}
}
src/library/Array.js
View file @
538a7e59
...
...
@@ -22,7 +22,7 @@ const arraySide = [
{
img
:
Images
.
rolling
,
label
:
'Rolling Outlook & CAT Revision'
,
path
:
'
beranda
'
,
path
:
'
rolling-outlook
'
,
subItem
:
null
},
{
...
...
src/router/homeRoutes.js
View file @
538a7e59
...
...
@@ -11,6 +11,7 @@ import Parameter from '../container/MasterData/Parameter/Parameter'
import
ReportItems
from
'../container/MasterData/ReportItems'
import
DashboardCAT
from
'../container/Laporan/DashboardCAT'
import
BudgetTahunan
from
'../container/BudgetTahunan'
;
import
RollingOutlook
from
'../container/RollingOutlook'
;
import
OperatingIndicator
from
'../container/OperatingIndicator/OperatingIndicator'
const
routes
=
[
...
...
@@ -34,6 +35,10 @@ const routes = [
path
:
"/home/master-budget"
,
main
:
BudgetTahunan
},
{
path
:
"/home/rolling-outlook"
,
main
:
RollingOutlook
},
{
path
:
"/home/profile"
,
main
:
Profile
...
...
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