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
9c1bdffb
Commit
9c1bdffb
authored
Jan 28, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notes
parent
6ed80e3d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
35 deletions
+75
-35
SubHolding.js
src/container/Laporan/SubHolding.js
+4
-3
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+71
-32
No files found.
src/container/Laporan/SubHolding.js
View file @
9c1bdffb
...
@@ -37,7 +37,7 @@ export default class SubHolding extends Component {
...
@@ -37,7 +37,7 @@ export default class SubHolding extends Component {
{
value
:
6
,
label
:
'Cash Flow - Summary'
},
{
value
:
6
,
label
:
'Cash Flow - Summary'
},
{
value
:
7
,
label
:
'Balance Sheet - Summary'
},
{
value
:
7
,
label
:
'Balance Sheet - Summary'
},
{
value
:
8
,
label
:
'Profit Loss - Summary'
},
{
value
:
8
,
label
:
'Profit Loss - Summary'
},
{
value
:
9
,
label
:
'
f
inancial Ratio - Summary'
},
{
value
:
9
,
label
:
'
F
inancial Ratio - Summary'
},
],
],
report
:
null
,
report
:
null
,
loading
:
false
,
loading
:
false
,
...
@@ -622,7 +622,7 @@ export default class SubHolding extends Component {
...
@@ -622,7 +622,7 @@ export default class SubHolding extends Component {
})
})
}
else
if
(
this
.
state
.
report
.
value
===
3
)
{
}
else
if
(
this
.
state
.
report
.
value
===
3
)
{
api
.
create
().
getReportPLMB
(
payload
).
then
(
response
=>
{
api
.
create
().
getReportPLMB
(
payload
).
then
(
response
=>
{
//
console.log(response);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
let
dataTable
=
[]
let
dataTable
=
[]
console
.
log
(
response
)
console
.
log
(
response
)
...
@@ -1484,7 +1484,8 @@ export default class SubHolding extends Component {
...
@@ -1484,7 +1484,8 @@ export default class SubHolding extends Component {
isNaN
(
persenFyLY
)
||
persenFyLY
==
'Infinity'
||
persenFyLY
==
'-Infinity'
?
(
item
.
profit_loss
.
fy_last_year
==
''
||
item
.
profit_loss
.
fy_last_year
==
0
?
-
0
:
0
)
:
(
item
.
profit_loss
.
fy_last_year
==
''
||
item
.
profit_loss
.
fy_last_year
==
0
?
persenFyLY
*
-
100
:
persenFyLY
*
100
),
isNaN
(
persenFyLY
)
||
persenFyLY
==
'Infinity'
||
persenFyLY
==
'-Infinity'
?
(
item
.
profit_loss
.
fy_last_year
==
''
||
item
.
profit_loss
.
fy_last_year
==
0
?
-
0
:
0
)
:
(
item
.
profit_loss
.
fy_last_year
==
''
||
item
.
profit_loss
.
fy_last_year
==
0
?
persenFyLY
*
-
100
:
persenFyLY
*
100
),
isNaN
(
persenFyOLMB
)
||
persenFyOLMB
==
'Infinity'
||
persenFyOLMB
==
'-Infinity'
?
(
item
.
profit_loss
.
fy_percent_ach_ol_to_mb
==
''
||
item
.
profit_loss
.
fy_percent_ach_ol_to_mb
==
0
?
-
0
:
0
)
:
(
item
.
profit_loss
.
fy_percent_ach_ol_to_mb
==
''
||
item
.
profit_loss
.
fy_percent_ach_ol_to_mb
==
0
?
persenFyOLMB
*
-
100
:
persenFyOLMB
*
100
),
isNaN
(
persenFyOLMB
)
||
persenFyOLMB
==
'Infinity'
||
persenFyOLMB
==
'-Infinity'
?
(
item
.
profit_loss
.
fy_percent_ach_ol_to_mb
==
''
||
item
.
profit_loss
.
fy_percent_ach_ol_to_mb
==
0
?
-
0
:
0
)
:
(
item
.
profit_loss
.
fy_percent_ach_ol_to_mb
==
''
||
item
.
profit_loss
.
fy_percent_ach_ol_to_mb
==
0
?
persenFyOLMB
*
-
100
:
persenFyOLMB
*
100
),
item
.
profit_loss
.
forecast_next_year
,
item
.
profit_loss
.
forecast_next_year
,
item
.
profit_loss
.
forecast_more_year
item
.
profit_loss
.
forecast_more_year
,
item
.
profit_loss
.
notes
,
])
])
}
}
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
...
...
src/container/Laporan/TableSubHolding.js
View file @
9c1bdffb
...
@@ -153,7 +153,7 @@ export default class TableSubHolding extends Component {
...
@@ -153,7 +153,7 @@ export default class TableSubHolding extends Component {
return a
return a
}
}
const handleNotes
PLDetail
= (value, tableMeta) => {
const handleNotes = (value, tableMeta) => {
// console.log(value)
// console.log(value)
let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = value
let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = value
// console.log(dataTable2[tableMeta.rowIndex]);
// console.log(dataTable2[tableMeta.rowIndex]);
...
@@ -2506,10 +2506,10 @@ export default class TableSubHolding extends Component {
...
@@ -2506,10 +2506,10 @@ export default class TableSubHolding extends Component {
options: {
options: {
customHeadRender: (columnMeta) => (
customHeadRender: (columnMeta) => (
dataTable2.length > 0 ?
dataTable2.length > 0 ?
<TableCell style={{ ...stylenotes, top: 0, zIndex: 10
2
, backgroundColor: '#1c71b8', width: 96 }}>
<TableCell style={{ ...stylenotes, top: 0, zIndex: 10
3
, backgroundColor: '#1c71b8', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> :
</TableCell> :
<TableCell style={{ ...styleNotesEmpty, top: 0, zIndex: 10
2
, backgroundColor: '#1c71b8', width: 96 }}>
<TableCell style={{ ...styleNotesEmpty, top: 0, zIndex: 10
3
, backgroundColor: '#1c71b8', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
</TableCell>
),
),
...
@@ -2526,41 +2526,26 @@ export default class TableSubHolding extends Component {
...
@@ -2526,41 +2526,26 @@ export default class TableSubHolding extends Component {
<div style={{ textAlign: 'right' }}>
<div style={{ textAlign: 'right' }}>
<div style={{ flex: 1 }}>
<div style={{ flex: 1 }}>
{tableMeta.rowData[0] === 4 ? null : tableMeta.rowData[4] === 0 ? null : tableMeta.rowData[4] === 1 ? null :
{tableMeta.rowData[0] === 4 ? null : tableMeta.rowData[4] === 0 ? null : tableMeta.rowData[4] === 1 ? null :
// <FormControlLabel
// style={{ margin: 0 }}
// // value={tableMeta.rowData[6]}
// control={
// <Input
// disableUnderline={true}
// style={{ fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// // value={tableMeta.rowData[6]}
// defaultValue={tableMeta.rowData[6]}
// inputProps={{
// style: {
// color: "#5198ea"
// }
// }}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleText(event.target.value, tableMeta, 0)
// // console.log(dataTable2)
// }}
// />
// }
// />
<FormControlLabel
<FormControlLabel
style={{ margin: 0 }}
style={{ margin: 0 }}
value={value
}
// value={tableMeta.rowData[47]
}
control={
control={
<
NumberForma
t
<
Inpu
t
thousandSeparator
={true}
disableUnderline
={true}
style={{
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"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value={String(tableMeta.rowData[47])}
// value={tableMeta.rowData[47]}
defaultValue={tableMeta.rowData[47]}
inputProps={{
style: {
color: "#5198ea"
}
}}
// onBlur={(event) => {
// handleNotes(event.target.value, tableMeta, 0)
// }}
/>
/>
}
}
/>
/>
...
@@ -15458,6 +15443,60 @@ export default class TableSubHolding extends Component {
...
@@ -15458,6 +15443,60 @@ export default class TableSubHolding extends Component {
)
)
}
}
}
}
}, {
name: "Notes",
options: {
customHeadRender: (columnMeta) => (
dataTable2.length > 0 ?
<TableCell style={{ ...stylenotes, top: 0, zIndex: 102, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> :
<TableCell style={{ ...styleNotesEmpty, top: 0, zIndex: 102, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
setCellProps: () => ({
style: {
position: "sticky",
background: "white",
zIndex: 101,
left: 350
}
}),
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div style={{ textAlign: 'right' }}>
<div style={{ flex: 1 }}>
{tableMeta.rowData[0] === 4 ? null : tableMeta.rowData[4] === 0 ? null : tableMeta.rowData[4] === 1 ? null :
<FormControlLabel
style={{ margin: 0 }}
// value={tableMeta.rowData[30]}
control={
<Input
disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
// value={tableMeta.rowData[30]}
defaultValue={tableMeta.rowData[30]}
inputProps={{
style: {
color: "#5198ea"
}
}}
// onBlur={(event) => {
// handleNotes(event.target.value, tableMeta, 0)
// }}
/>
}
/>
}
</div>
</div>
)
}
}
}, {
}, {
name: `MTD ${this.props.periode}`,
name: `MTD ${this.props.periode}`,
options: {
options: {
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