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
5340be35
Commit
5340be35
authored
Sep 22, 2020
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'riri' into 'master'
apdet pl See merge request
!352
parents
08dd1ab1
6d9b6edc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
76 deletions
+34
-76
index.js
src/api/index.js
+1
-1
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+33
-75
No files found.
src/api/index.js
View file @
5340be35
...
@@ -38,7 +38,7 @@ const create = (type = "") => {
...
@@ -38,7 +38,7 @@ const create = (type = "") => {
'Content-Type'
:
'application/json'
,
'Content-Type'
:
'application/json'
,
},
},
// 40 second timeout...
// 40 second timeout...
timeout
:
4
0000
timeout
:
5
0000
})
})
break
;
break
;
default
:
default
:
...
...
src/container/BudgetTahunan/ProfitLoss.js
View file @
5340be35
...
@@ -352,6 +352,7 @@ export default class ProfitLoss extends Component {
...
@@ -352,6 +352,7 @@ export default class ProfitLoss extends Component {
})
})
})
})
let
body
=
{
let
body
=
{
submission_id
:
this
.
props
.
submissionID
,
company_id
:
this
.
props
.
company
.
company_id
,
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
report_id
:
this
.
props
.
report_id
,
...
@@ -370,6 +371,9 @@ export default class ProfitLoss extends Component {
...
@@ -370,6 +371,9 @@ export default class ProfitLoss extends Component {
}
}
}
else
{
}
else
{
alert
(
response
.
problem
)
alert
(
response
.
problem
)
this
.
setState
({
loading
:
false
})
this
.
props
.
onClickClose
()
this
.
props
.
getReport
()
}
}
})
})
}
}
...
@@ -406,15 +410,20 @@ export default class ProfitLoss extends Component {
...
@@ -406,15 +410,20 @@ export default class ProfitLoss extends Component {
// } else {
// } else {
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
// }
// }
}
}
const
handleTotal
=
(
tableMeta
)
=>
{
let
total
=
0
let
total
=
0
dataTable2
[
tableMeta
.
rowIndex
].
map
((
item
,
index
)
=>
{
dataTable2
[
tableMeta
.
rowIndex
].
map
((
item
,
index
)
=>
{
if
(
index
>=
8
&&
index
<=
19
)
{
if
(
index
>=
7
&&
index
<=
18
)
{
let
valItem
=
item
==
undefined
||
item
==
""
?
0
:
item
let
valItem
=
item
==
undefined
||
item
==
""
?
0
:
item
total
+=
Number
(
valItem
)
total
+=
Number
(
valItem
)
}
}
})
})
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
total
dataTable2
[
tableMeta
.
rowIndex
][
19
]
=
total
}
return
total
// console.log(total);
}
}
const
handleNotes
=
(
value
,
tableMeta
)
=>
{
const
handleNotes
=
(
value
,
tableMeta
)
=>
{
console
.
log
(
value
)
console
.
log
(
value
)
...
@@ -557,14 +566,14 @@ export default class ProfitLoss extends Component {
...
@@ -557,14 +566,14 @@ export default class ProfitLoss extends Component {
{
tableMeta
.
rowData
[
4
]
===
0
?
null
:
tableMeta
.
rowData
[
4
]
===
1
?
null
:
{
tableMeta
.
rowData
[
4
]
===
0
?
null
:
tableMeta
.
rowData
[
4
]
===
1
?
null
:
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
value
=
{
value
}
//
value={value}
control
=
{
control
=
{
<
Input
<
Input
disableUnderline
=
{
true
}
disableUnderline
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'left'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'left'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
v
alue
=
{
value
}
defaultV
alue
=
{
value
}
onBlur
=
{(
event
)
=>
{
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
// updateValue(event.target.value)
handleNotes
(
event
.
target
.
value
,
tableMeta
)
handleNotes
(
event
.
target
.
value
,
tableMeta
)
...
@@ -1692,29 +1701,19 @@ export default class ProfitLoss extends Component {
...
@@ -1692,29 +1701,19 @@ export default class ProfitLoss extends Component {
setCellProps
:
()
=>
({
style2
}),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
width
:
96
,
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
3
?
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
4
?
<
div
style
=
{{
flex
:
1
}}
>
null
:
tableMeta
.
rowData
[
0
]
===
2
?
<
FormControlLabel
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
value
=
{
value
}
disabled
=
{
true
}
onBlur
=
{(
event
)
=>
{
value
=
{
handleValue
(
tableMeta
)}
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
}}
/
>
}
/
>
/
>
<
/div>
:
<
/span>
:
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -1722,50 +1721,9 @@ export default class ProfitLoss extends Component {
...
@@ -1722,50 +1721,9 @@ export default class ProfitLoss extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Total
(
tableMeta
)}
/
>
/
>
<
/span
>
<
/span>
}
:
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
6
?
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// value={handleFormula(value, tableMeta)}
// />
null
:
tableMeta
.
rowData
[
0
]
===
5
?
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// value={handleFormula(value, tableMeta)}
// />
null
:
tableMeta
.
rowData
[
0
]
===
1
?
// value === "" ?
// null :
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(value)}
// />
null
:
null
}
<
/div
>
<
/div
>
)
)
}
}
...
...
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