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
19e73c89
Commit
19e73c89
authored
Sep 10, 2020
by
EKSAD
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
profit loss
parent
8dac516a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
219 additions
and
26 deletions
+219
-26
BudgetTahunan.js
src/container/BudgetTahunan.js
+3
-0
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+216
-26
No files found.
src/container/BudgetTahunan.js
View file @
19e73c89
...
@@ -656,12 +656,15 @@ export default class BudgetTahunan extends Component {
...
@@ -656,12 +656,15 @@ export default class BudgetTahunan extends Component {
)}
)}
{
this
.
state
.
visiblePL
&&
(
{
this
.
state
.
visiblePL
&&
(
<
ProfitLoss
<
ProfitLoss
open
=
{
this
.
props
.
open
}
report_id
=
{
this
.
state
.
report_id
}
report_id
=
{
this
.
state
.
report_id
}
height
=
{
this
.
props
.
height
}
height
=
{
this
.
props
.
height
}
width
=
{
this
.
props
.
width
}
width
=
{
this
.
props
.
width
}
company
=
{
this
.
state
.
company
}
company
=
{
this
.
state
.
company
}
revision
=
{
this
.
state
.
revisionTable
}
revision
=
{
this
.
state
.
revisionTable
}
periode
=
{
this
.
state
.
periode
.
periode
}
periode
=
{
this
.
state
.
periode
.
periode
}
submissionID
=
{
this
.
state
.
submissionID
}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visiblePL
:
false
,
visibleBudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visiblePL
:
false
,
visibleBudgetTahunan
:
true
})}
/
>
/
>
...
...
src/container/BudgetTahunan/ProfitLoss.js
View file @
19e73c89
...
@@ -5,6 +5,9 @@ import NumberFormat from 'react-number-format';
...
@@ -5,6 +5,9 @@ import NumberFormat from 'react-number-format';
import
api
from
'../../api'
;
import
api
from
'../../api'
;
import
AddIcon
from
'@material-ui/icons/Add'
;
import
AddIcon
from
'@material-ui/icons/Add'
;
import
{
values
}
from
'ramda'
;
import
{
values
}
from
'ramda'
;
import
PropagateLoader
from
"react-spinners/PropagateLoader"
import
Images
from
'../../assets/Images'
;
import
ReactTooltip
from
'react-tooltip'
;
var
ct
=
require
(
"../../library/CustomTable"
);
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable3
());
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable3
());
...
@@ -48,11 +51,13 @@ export default class ProfitLoss extends Component {
...
@@ -48,11 +51,13 @@ export default class ProfitLoss extends Component {
}
}
getItemHierarki
()
{
getItemHierarki
()
{
this
.
setState
({
loading
:
true
})
let
payload
=
{
let
payload
=
{
"report_id"
:
this
.
props
.
report_id
,
"report_id"
:
this
.
props
.
report_id
,
"revision"
:
Number
(
this
.
props
.
revision
),
"revision"
:
Number
(
this
.
props
.
revision
),
"periode"
:
this
.
props
.
periode
,
"periode"
:
this
.
props
.
periode
,
"company_id"
:
this
.
props
.
company
.
company_id
"company_id"
:
this
.
props
.
company
.
company_id
,
"submission_id"
:
this
.
props
.
submissionID
}
}
api
.
create
().
getDetailReportMB
(
payload
).
then
(
response
=>
{
api
.
create
().
getDetailReportMB
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
console
.
log
(
response
);
...
@@ -68,6 +73,7 @@ export default class ProfitLoss extends Component {
...
@@ -68,6 +73,7 @@ export default class ProfitLoss extends Component {
item
.
formula
,
item
.
formula
,
item
.
level
,
item
.
level
,
item
.
description
,
item
.
description
,
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
total_actual_before
,
item
.
profit_loss
.
total_actual_before
,
item
.
profit_loss
.
january
,
item
.
profit_loss
.
january
,
item
.
profit_loss
.
february
,
item
.
profit_loss
.
february
,
...
@@ -95,6 +101,7 @@ export default class ProfitLoss extends Component {
...
@@ -95,6 +101,7 @@ export default class ProfitLoss extends Component {
i
.
formula
,
i
.
formula
,
i
.
level
,
i
.
level
,
i
.
description
,
i
.
description
,
i
.
profit_loss
.
notes
,
i
.
profit_loss
.
total_actual_before
,
i
.
profit_loss
.
total_actual_before
,
i
.
profit_loss
.
january
,
i
.
profit_loss
.
january
,
i
.
profit_loss
.
february
,
i
.
profit_loss
.
february
,
...
@@ -121,6 +128,7 @@ export default class ProfitLoss extends Component {
...
@@ -121,6 +128,7 @@ export default class ProfitLoss extends Component {
val
.
formula
,
val
.
formula
,
val
.
level
,
val
.
level
,
val
.
description
,
val
.
description
,
val
.
profit_loss
.
notes
,
val
.
profit_loss
.
total_actual_before
,
val
.
profit_loss
.
total_actual_before
,
val
.
profit_loss
.
january
,
val
.
profit_loss
.
january
,
val
.
profit_loss
.
february
,
val
.
profit_loss
.
february
,
...
@@ -147,6 +155,7 @@ export default class ProfitLoss extends Component {
...
@@ -147,6 +155,7 @@ export default class ProfitLoss extends Component {
items
.
formula
,
items
.
formula
,
items
.
level
,
items
.
level
,
items
.
description
,
items
.
description
,
items
.
profit_loss
.
notes
,
items
.
profit_loss
.
total_actual_before
,
items
.
profit_loss
.
total_actual_before
,
items
.
profit_loss
.
january
,
items
.
profit_loss
.
january
,
items
.
profit_loss
.
february
,
items
.
profit_loss
.
february
,
...
@@ -173,6 +182,7 @@ export default class ProfitLoss extends Component {
...
@@ -173,6 +182,7 @@ export default class ProfitLoss extends Component {
itemss
.
formula
,
itemss
.
formula
,
itemss
.
level
,
itemss
.
level
,
itemss
.
description
,
itemss
.
description
,
itemss
.
profit_loss
.
notes
,
itemss
.
profit_loss
.
total_actual_before
,
itemss
.
profit_loss
.
total_actual_before
,
itemss
.
profit_loss
.
january
,
itemss
.
profit_loss
.
january
,
itemss
.
profit_loss
.
february
,
itemss
.
profit_loss
.
february
,
...
@@ -199,6 +209,7 @@ export default class ProfitLoss extends Component {
...
@@ -199,6 +209,7 @@ export default class ProfitLoss extends Component {
item1
.
formula
,
item1
.
formula
,
item1
.
level
,
item1
.
level
,
item1
.
description
,
item1
.
description
,
item1
.
profit_loss
.
notes
,
item1
.
profit_loss
.
total_actual_before
,
item1
.
profit_loss
.
total_actual_before
,
item1
.
profit_loss
.
january
,
item1
.
profit_loss
.
january
,
item1
.
profit_loss
.
february
,
item1
.
profit_loss
.
february
,
...
@@ -225,6 +236,7 @@ export default class ProfitLoss extends Component {
...
@@ -225,6 +236,7 @@ export default class ProfitLoss extends Component {
item2
.
formula
,
item2
.
formula
,
item2
.
level
,
item2
.
level
,
item2
.
description
,
item2
.
description
,
item2
.
profit_loss
.
notes
,
item2
.
profit_loss
.
total_actual_before
,
item2
.
profit_loss
.
total_actual_before
,
item2
.
profit_loss
.
january
,
item2
.
profit_loss
.
january
,
item2
.
profit_loss
.
february
,
item2
.
profit_loss
.
february
,
...
@@ -251,6 +263,7 @@ export default class ProfitLoss extends Component {
...
@@ -251,6 +263,7 @@ export default class ProfitLoss extends Component {
item3
.
formula
,
item3
.
formula
,
item3
.
level
,
item3
.
level
,
item3
.
description
,
item3
.
description
,
item3
.
profit_loss
.
notes
,
item3
.
profit_loss
.
total_actual_before
,
item3
.
profit_loss
.
total_actual_before
,
item3
.
profit_loss
.
january
,
item3
.
profit_loss
.
january
,
item3
.
profit_loss
.
february
,
item3
.
profit_loss
.
february
,
...
@@ -277,6 +290,7 @@ export default class ProfitLoss extends Component {
...
@@ -277,6 +290,7 @@ export default class ProfitLoss extends Component {
item4
.
formula
,
item4
.
formula
,
item4
.
level
,
item4
.
level
,
item4
.
description
,
item4
.
description
,
item4
.
profit_loss
.
notes
,
item4
.
profit_loss
.
total_actual_before
,
item4
.
profit_loss
.
total_actual_before
,
item4
.
profit_loss
.
january
,
item4
.
profit_loss
.
january
,
item4
.
profit_loss
.
february
,
item4
.
profit_loss
.
february
,
...
@@ -303,6 +317,7 @@ export default class ProfitLoss extends Component {
...
@@ -303,6 +317,7 @@ export default class ProfitLoss extends Component {
item5
.
formula
,
item5
.
formula
,
item5
.
level
,
item5
.
level
,
item5
.
description
,
item5
.
description
,
item5
.
profit_loss
.
notes
,
item5
.
profit_loss
.
total_actual_before
,
item5
.
profit_loss
.
total_actual_before
,
item5
.
profit_loss
.
january
,
item5
.
profit_loss
.
january
,
item5
.
profit_loss
.
february
,
item5
.
profit_loss
.
february
,
...
@@ -329,6 +344,7 @@ export default class ProfitLoss extends Component {
...
@@ -329,6 +344,7 @@ export default class ProfitLoss extends Component {
item6
.
formula
,
item6
.
formula
,
item6
.
level
,
item6
.
level
,
item6
.
description
,
item6
.
description
,
item6
.
profit_loss
.
notes
,
item6
.
profit_loss
.
total_actual_before
,
item6
.
profit_loss
.
total_actual_before
,
item6
.
profit_loss
.
january
,
item6
.
profit_loss
.
january
,
item6
.
profit_loss
.
february
,
item6
.
profit_loss
.
february
,
...
@@ -354,6 +370,7 @@ export default class ProfitLoss extends Component {
...
@@ -354,6 +370,7 @@ export default class ProfitLoss extends Component {
item6
.
formula
,
item6
.
formula
,
item6
.
level
,
item6
.
level
,
item6
.
description
,
item6
.
description
,
item6
.
profit_loss
.
notes
,
item6
.
profit_loss
.
total_actual_before
,
item6
.
profit_loss
.
total_actual_before
,
item6
.
profit_loss
.
january
,
item6
.
profit_loss
.
january
,
item6
.
profit_loss
.
february
,
item6
.
profit_loss
.
february
,
...
@@ -381,6 +398,7 @@ export default class ProfitLoss extends Component {
...
@@ -381,6 +398,7 @@ export default class ProfitLoss extends Component {
item5
.
formula
,
item5
.
formula
,
item5
.
level
,
item5
.
level
,
item5
.
description
,
item5
.
description
,
item5
.
profit_loss
.
notes
,
item5
.
profit_loss
.
total_actual_before
,
item5
.
profit_loss
.
total_actual_before
,
item5
.
profit_loss
.
january
,
item5
.
profit_loss
.
january
,
item5
.
profit_loss
.
february
,
item5
.
profit_loss
.
february
,
...
@@ -408,6 +426,7 @@ export default class ProfitLoss extends Component {
...
@@ -408,6 +426,7 @@ export default class ProfitLoss extends Component {
item4
.
formula
,
item4
.
formula
,
item4
.
level
,
item4
.
level
,
item4
.
description
,
item4
.
description
,
item4
.
profit_loss
.
notes
,
item4
.
profit_loss
.
total_actual_before
,
item4
.
profit_loss
.
total_actual_before
,
item4
.
profit_loss
.
january
,
item4
.
profit_loss
.
january
,
item4
.
profit_loss
.
february
,
item4
.
profit_loss
.
february
,
...
@@ -435,6 +454,7 @@ export default class ProfitLoss extends Component {
...
@@ -435,6 +454,7 @@ export default class ProfitLoss extends Component {
item3
.
formula
,
item3
.
formula
,
item3
.
level
,
item3
.
level
,
item3
.
description
,
item3
.
description
,
item3
.
profit_loss
.
notes
,
item3
.
profit_loss
.
total_actual_before
,
item3
.
profit_loss
.
total_actual_before
,
item3
.
profit_loss
.
january
,
item3
.
profit_loss
.
january
,
item3
.
profit_loss
.
february
,
item3
.
profit_loss
.
february
,
...
@@ -462,6 +482,7 @@ export default class ProfitLoss extends Component {
...
@@ -462,6 +482,7 @@ export default class ProfitLoss extends Component {
item2
.
formula
,
item2
.
formula
,
item2
.
level
,
item2
.
level
,
item2
.
description
,
item2
.
description
,
item2
.
profit_loss
.
notes
,
item2
.
profit_loss
.
total_actual_before
,
item2
.
profit_loss
.
total_actual_before
,
item2
.
profit_loss
.
january
,
item2
.
profit_loss
.
january
,
item2
.
profit_loss
.
february
,
item2
.
profit_loss
.
february
,
...
@@ -489,6 +510,7 @@ export default class ProfitLoss extends Component {
...
@@ -489,6 +510,7 @@ export default class ProfitLoss extends Component {
item1
.
formula
,
item1
.
formula
,
item1
.
level
,
item1
.
level
,
item1
.
description
,
item1
.
description
,
item1
.
profit_loss
.
notes
,
item1
.
profit_loss
.
total_actual_before
,
item1
.
profit_loss
.
total_actual_before
,
item1
.
profit_loss
.
january
,
item1
.
profit_loss
.
january
,
item1
.
profit_loss
.
february
,
item1
.
profit_loss
.
february
,
...
@@ -516,6 +538,7 @@ export default class ProfitLoss extends Component {
...
@@ -516,6 +538,7 @@ export default class ProfitLoss extends Component {
itemss
.
formula
,
itemss
.
formula
,
itemss
.
level
,
itemss
.
level
,
itemss
.
description
,
itemss
.
description
,
itemss
.
profit_loss
.
notes
,
itemss
.
profit_loss
.
total_actual_before
,
itemss
.
profit_loss
.
total_actual_before
,
itemss
.
profit_loss
.
january
,
itemss
.
profit_loss
.
january
,
itemss
.
profit_loss
.
february
,
itemss
.
profit_loss
.
february
,
...
@@ -543,6 +566,7 @@ export default class ProfitLoss extends Component {
...
@@ -543,6 +566,7 @@ export default class ProfitLoss extends Component {
items
.
formula
,
items
.
formula
,
items
.
level
,
items
.
level
,
items
.
description
,
items
.
description
,
items
.
profit_loss
.
notes
,
items
.
profit_loss
.
total_actual_before
,
items
.
profit_loss
.
total_actual_before
,
items
.
profit_loss
.
january
,
items
.
profit_loss
.
january
,
items
.
profit_loss
.
february
,
items
.
profit_loss
.
february
,
...
@@ -570,6 +594,7 @@ export default class ProfitLoss extends Component {
...
@@ -570,6 +594,7 @@ export default class ProfitLoss extends Component {
val
.
formula
,
val
.
formula
,
val
.
level
,
val
.
level
,
val
.
description
,
val
.
description
,
val
.
profit_loss
.
notes
,
val
.
profit_loss
.
total_actual_before
,
val
.
profit_loss
.
total_actual_before
,
val
.
profit_loss
.
january
,
val
.
profit_loss
.
january
,
val
.
profit_loss
.
february
,
val
.
profit_loss
.
february
,
...
@@ -597,6 +622,7 @@ export default class ProfitLoss extends Component {
...
@@ -597,6 +622,7 @@ export default class ProfitLoss extends Component {
i
.
formula
,
i
.
formula
,
i
.
level
,
i
.
level
,
i
.
description
,
i
.
description
,
i
.
profit_loss
.
notes
,
i
.
profit_loss
.
total_actual_before
,
i
.
profit_loss
.
total_actual_before
,
i
.
profit_loss
.
january
,
i
.
profit_loss
.
january
,
i
.
profit_loss
.
february
,
i
.
profit_loss
.
february
,
...
@@ -623,6 +649,7 @@ export default class ProfitLoss extends Component {
...
@@ -623,6 +649,7 @@ export default class ProfitLoss extends Component {
i
.
formula
,
i
.
formula
,
i
.
level
,
i
.
level
,
i
.
description
,
i
.
description
,
i
.
profit_loss
.
notes
,
i
.
profit_loss
.
total_actual_before
,
i
.
profit_loss
.
total_actual_before
,
i
.
profit_loss
.
january
,
i
.
profit_loss
.
january
,
i
.
profit_loss
.
february
,
i
.
profit_loss
.
february
,
...
@@ -650,6 +677,7 @@ export default class ProfitLoss extends Component {
...
@@ -650,6 +677,7 @@ export default class ProfitLoss extends Component {
item
.
formula
,
item
.
formula
,
item
.
level
,
item
.
level
,
item
.
description
,
item
.
description
,
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
total_actual_before
,
item
.
profit_loss
.
total_actual_before
,
item
.
profit_loss
.
january
,
item
.
profit_loss
.
january
,
item
.
profit_loss
.
february
,
item
.
profit_loss
.
february
,
...
@@ -670,8 +698,10 @@ export default class ProfitLoss extends Component {
...
@@ -670,8 +698,10 @@ export default class ProfitLoss extends Component {
}
}
})
})
console
.
log
(
dataTable
);
console
.
log
(
dataTable
);
this
.
setState
({
dataTable
})
this
.
setState
({
dataTable
,
loading
:
false
})
}
}
}
else
{
this
.
setState
({
loading
:
false
})
}
}
})
})
}
}
...
@@ -708,6 +738,45 @@ export default class ProfitLoss extends Component {
...
@@ -708,6 +738,45 @@ export default class ProfitLoss extends Component {
// }, () => console.log(this.state.dataTable))
// }, () => console.log(this.state.dataTable))
}
}
backToMasterBudget
(
type
)
{
let
data
=
[]
console
.
log
(
this
.
state
.
dataTable
)
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
item_report_id
:
i
[
1
],
notes
:
String
(
i
[
6
]),
total_actual_before
:
String
(
i
[
7
]),
january
:
String
(
i
[
8
]),
february
:
String
(
i
[
9
]),
march
:
String
(
i
[
10
]),
april
:
String
(
i
[
11
]),
may
:
String
(
i
[
12
]),
june
:
String
(
i
[
13
]),
july
:
String
(
i
[
14
]),
august
:
String
(
i
[
15
]),
september
:
String
(
i
[
16
]),
october
:
String
(
i
[
17
]),
november
:
String
(
i
[
18
]),
december
:
String
(
i
[
19
]),
total_current_year
:
String
(
i
[
20
]),
total_next_year
:
String
(
i
[
21
]),
total_more_year
:
String
(
i
[
22
])
})
})
let
payload
=
{
"submission_id"
:
this
.
props
.
submissionID
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"status"
:
type
,
"profit_loss"
:
data
}
console
.
log
(
data
);
this
.
props
.
saveToMasterBudget
(
payload
)
this
.
props
.
onClickClose
()
}
render
()
{
render
()
{
let
dataTable2
=
this
.
state
.
dataTable
let
dataTable2
=
this
.
state
.
dataTable
const
handleChange
=
(
value
,
tableMeta
)
=>
{
const
handleChange
=
(
value
,
tableMeta
)
=>
{
...
@@ -771,7 +840,7 @@ export default class ProfitLoss extends Component {
...
@@ -771,7 +840,7 @@ export default class ProfitLoss extends Component {
setCellProps
:
()
=>
({
style
}),
setCellProps
:
()
=>
({
style
}),
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
width
:
300
}}
>
<
div
style
=
{{
width
:
300
}}
>
{
tableMeta
.
rowData
[
4
]
==
0
?
{
tableMeta
.
rowData
[
4
]
==
0
?
<
span
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
}}
>
{
String
(
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
).
toUpperCase
()}
<
/span
>
<
span
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
}}
>
{
String
(
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
).
toUpperCase
()}
<
/span
>
:
:
...
@@ -784,7 +853,43 @@ export default class ProfitLoss extends Component {
...
@@ -784,7 +853,43 @@ export default class ProfitLoss extends Component {
}
}
}
}
},
{
},
{
name
:
"31-Dec-2020 OL PA"
,
name
:
"Notes"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#1c71b8'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
Input
disableUnderline
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'left'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
}}
/
>
}
/
>
<
/div>
<
/div
>
)
}
}
},
{
name
:
"31 Dec 2020 Actual"
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
}}
>
...
@@ -1720,11 +1825,11 @@ export default class ProfitLoss extends Component {
...
@@ -1720,11 +1825,11 @@ export default class ProfitLoss extends Component {
}
}
}
}
},
{
},
{
name
:
"
31-Dec-21 MB
"
,
name
:
"
Current Total
"
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
1c71b8
'
,
width
:
96
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
37b5e6
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'
white
'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
Typography
style
=
{{
color
:
'
black
'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
<
/TableCell
>
),
),
setCellProps
:
()
=>
({
style2
}),
setCellProps
:
()
=>
({
style2
}),
...
@@ -1792,7 +1897,7 @@ export default class ProfitLoss extends Component {
...
@@ -1792,7 +1897,7 @@ export default class ProfitLoss extends Component {
}
}
}
}
},
{
},
{
name
:
"31
-Dec-22 Forcast
"
,
name
:
"31
Dec 2022 Total
"
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
}}
>
...
@@ -1864,7 +1969,7 @@ export default class ProfitLoss extends Component {
...
@@ -1864,7 +1969,7 @@ export default class ProfitLoss extends Component {
}
}
}
}
},
{
},
{
name
:
"31
-Dec-23 Forcast
"
,
name
:
"31
Dec 2023 Total
"
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
}}
>
...
@@ -1937,27 +2042,84 @@ export default class ProfitLoss extends Component {
...
@@ -1937,27 +2042,84 @@ export default class ProfitLoss extends Component {
}
}
}
}
]
]
const
loadingComponent
=
(
console
.
log
(
this
.
props
.
width
);
<
div
style
=
{{
position
:
'absolute'
,
zIndex
:
110
,
top
:
0
,
left
:
0
,
width
:
'100%'
,
height
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
background
:
'rgba(255,255,255,0.8)'
}}
>
<
PropagateLoader
// css={override}
size
=
{
20
}
color
=
{
"#274B80"
}
loading
=
{
this
.
state
.
loading
}
/
>
<
/div
>
);
return
(
return
(
<
div
style
=
{{
height
:
this
.
props
.
height
,
backgroundColor
:
'#f8f8f8'
,
marginBottom
:
100
,
minHeight
:
1000
}}
>
<
div
style
=
{{
height
:
this
.
props
.
height
,
backgroundColor
:
'#f8f8f8'
,
marginBottom
:
100
,
minHeight
:
1000
}}
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
flex
:
1
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
flex
:
1
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Pengajuan
Budget
Tahunan
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Pengajuan
Budget
Tahunan
<
/Typography
>
<
/div
>
<
/div
>
{
this
.
state
.
loading
&&
loadingComponent
}
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
20
}}
>
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
20
}}
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Budget
Tahunan
-
Profit
&
Loss
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Budget
Tahunan
-
Profit
&
Loss
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
}}
>
<
div
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Periode
:
{
this
.
props
.
periode
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Periode
:
{
this
.
props
.
periode
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
}}
onClick
=
{()
=>
null
}
>
<
img
src
=
{
Images
.
template
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"template"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
a
data
-
tip
=
{
'Upload'
}
data
-
for
=
"upload"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
}}
onClick
=
{()
=>
null
}
>
<
img
src
=
{
Images
.
upload
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"upload"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
}}
onClick
=
{()
=>
null
}
>
<
img
src
=
{
Images
.
download
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"download"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
<
/div
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
,
height
:
this
.
props
.
height
-
400
}}
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
),
height
:
this
.
props
.
height
-
400
}}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
<
MUIDataTable
data
=
{
dataTable2
}
data
=
{
dataTable2
}
...
@@ -1967,17 +2129,17 @@ export default class ProfitLoss extends Component {
...
@@ -1967,17 +2129,17 @@ export default class ProfitLoss extends Component {
<
/MuiThemeProvider
>
<
/MuiThemeProvider
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
20
}}
>
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
20
}}
>
<
div
className
=
"col-1"
>
<
div
className
=
"col-1"
>
<
button
<
button
className
=
"button"
type
=
"button"
type
=
"button"
onClick
=
{()
=>
this
.
backToMasterBudget
(
'draft'
)}
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
outline
:
'none'
}}
}}
onClick
=
{()
=>
this
.
props
.
onClickClose
()}
>
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
...
@@ -1985,12 +2147,37 @@ export default class ProfitLoss extends Component {
...
@@ -1985,12 +2147,37 @@ export default class ProfitLoss extends Component {
<
/button
>
<
/button
>
<
/div
>
<
/div
>
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
button
className
=
"button"
type
=
"button"
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
}}
onClick
=
{()
=>
{
this
.
props
.
onClickClose
()
}}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960'
,
marginRight
:
20
}}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960'
,
marginRight
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
/div
>
<
/div
>
<
/button
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
backToMasterBudget
(
'submitted'
)}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
marginRight
:
20
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
marginRight
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
<
/Typography
>
<
/div
>
<
/div
>
<
/button
>
<
button
<
button
className
=
"button"
className
=
"button"
type
=
"button"
type
=
"button"
...
@@ -1998,8 +2185,11 @@ export default class ProfitLoss extends Component {
...
@@ -1998,8 +2185,11 @@ export default class ProfitLoss extends Component {
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
outline
:
'none'
}}
onClick
=
{()
=>
{
this
.
forceUpdate
()
}}
}}
onClick
=
{()
=>
this
.
forceUpdate
()}
>
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Calculate
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Calculate
<
/Typography
>
...
...
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