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
e1f45d92
Commit
e1f45d92
authored
Feb 10, 2021
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update some points
parent
29a8cad4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
22 deletions
+39
-22
BudgetTahunan.js
src/container/BudgetTahunan.js
+18
-16
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+21
-6
No files found.
src/container/BudgetTahunan.js
View file @
e1f45d92
...
...
@@ -313,7 +313,7 @@ export default class BudgetTahunan extends Component {
}
})
// // // console.log(dataTableRevision);
this
.
setState
({
dataTable
,
loading
:
false
,
dataTableRevision
:
dataTableRevision
.
sort
((
a
,
b
)
=>
a
.
number
-
b
.
number
),
dataForRevision
:
response
.
data
.
data
},
()
=>
{
this
.
setState
({
dataTable
,
dataTableRevision
:
dataTableRevision
.
sort
((
a
,
b
)
=>
a
.
number
-
b
.
number
),
dataForRevision
:
response
.
data
.
data
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
})
}
...
...
@@ -533,8 +533,10 @@ export default class BudgetTahunan extends Component {
// // console.log(this.state.btnApprove)
this
.
historyApproval
()
this
.
getLatestPeriodSubmit
()
this
.
getCashFlow
(
type
)
this
.
getPL
(
type
)
if
(
type
!=
undefined
)
{
this
.
getCashFlow
(
type
)
this
.
getPL
(
type
)
}
this
.
getFR
(
type
)
api
.
create
().
checkApprover
().
then
(
response
=>
{
// // console.log(this.state.btncreate);
...
...
@@ -667,7 +669,7 @@ export default class BudgetTahunan extends Component {
}
})
// console.log(dataTable)
this
.
setState
({
dbCF
:
dataTable
,
loading
:
false
},
()
=>
{
this
.
setState
({
dbCF
:
dataTable
},
()
=>
{
this
.
olahDataCashFlow
(
this
.
state
.
dbCF
,
type
)
})
}
...
...
@@ -1211,11 +1213,11 @@ export default class BudgetTahunan extends Component {
}
})
console
.
log
(
dataTable
)
this
.
setState
({
dbPL
:
dataTable
,
loading
:
false
},
()
=>
{
this
.
setState
({
dbPL
:
dataTable
},
()
=>
{
this
.
olahDataPL
(
this
.
state
.
dbPL
,
type
)
})
}
else
{
this
.
setState
({
d
ataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
this
.
setState
({
d
bPL
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
}
...
...
@@ -1470,7 +1472,7 @@ export default class BudgetTahunan extends Component {
payloadPL
(
type
)
{
let
listPL
=
[]
console
.
log
(
this
.
state
.
dbPL
)
//
console.log(this.state.dbPL)
this
.
state
.
dbPL
.
map
((
item
,
index
)
=>
{
if
(
item
[
0
]
==
5
||
item
[
0
]
==
6
||
item
[
0
]
==
7
)
{
// if (item[7].value == "" || item[7].value == 0 || item[7].value == "0.0") {
...
...
@@ -1555,7 +1557,7 @@ export default class BudgetTahunan extends Component {
})
console
.
log
(
listPL
)
//
console.log(listPL)
this
.
setState
({
dbPL
:
listPL
}
,
()
=>
{
// if (this.state.submissionID != null) {
// this.createDBPL()
...
...
@@ -1707,7 +1709,7 @@ export default class BudgetTahunan extends Component {
this
.
olahDataFR
(
this
.
state
.
dbFR
,
type
)
})
}
else
{
this
.
setState
({
d
ataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
this
.
setState
({
d
bFR
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
}
...
...
@@ -1732,9 +1734,9 @@ export default class BudgetTahunan extends Component {
total
=
total
/
month
}
let
hasil
=
Number
(
value
)
/
total
console
.
log
(
value
)
console
.
log
(
total
)
console
.
log
(
hasil
,
value
,
total
);
//
console.log(value)
//
console.log(total)
//
console.log(hasil, value, total);
return
Number
(
hasil
).
toFixed
(
2
)
}
...
...
@@ -1768,7 +1770,7 @@ export default class BudgetTahunan extends Component {
payloadFR
(
type
)
{
let
listFR
=
[]
console
.
log
(
this
.
state
.
dbFR
)
//
console.log(this.state.dbFR)
let
totalCY
=
0
this
.
state
.
dbFR
.
map
((
item
,
index
)
=>
{
if
(
item
[
0
]
!=
4
||
item
[
0
]
!=
1
)
{
...
...
@@ -1835,7 +1837,7 @@ export default class BudgetTahunan extends Component {
"months"
:
0
,
}
// console.log(this.state.dbCF)
console
.
log
(
JSON
.
stringify
(
payload
))
//
console.log(JSON.stringify(payload))
api
.
create
().
createReportFRMB
(
payload
).
then
((
res
)
=>
{
console
.
log
(
res
)
// if (response.data) {
...
...
@@ -2069,10 +2071,10 @@ export default class BudgetTahunan extends Component {
if
(
response
.
data
.
status
===
'success'
)
{
this
.
getSubmission
(
type
)
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
//
this.setState({ loading: false }, () => {
this
.
getSubmission
()
document
.
body
.
style
.
overflow
=
'unset'
;
})
//
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
,
loading
:
false
},
()
=>
{
...
...
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
e1f45d92
...
...
@@ -99,7 +99,7 @@ export default class FixedAssetsMovement extends Component {
"submission_id"
:
this
.
props
.
submissionID
}
api
.
create
().
getDetailReportMB
(
payload
).
then
(
response
=>
{
//
console.log(response);
console
.
log
(
response
);
let
dataTable
=
[]
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
...
...
@@ -180,6 +180,7 @@ export default class FixedAssetsMovement extends Component {
}
}
})
console
.
log
(
dataTable
)
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
...
...
@@ -671,12 +672,22 @@ export default class FixedAssetsMovement extends Component {
}
else
{
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
dataTable2
[
tableMeta
.
rowIndex
][
2
])
if
(
indexParent
>
0
)
{
let
a
=
0
// // console.log(indexParent)
let
a
=
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
'beginning balance'
)
{
a
=
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
value
=
Number
(
val
)
}
else
{
a
=
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
}
let
jagain
=
dataTable2
[
indexParent
][
tableMeta
.
columnIndex
]
a
=
dataTable2
[
indexParent
][
tableMeta
.
columnIndex
]
=
jagain
==
undefined
?
(
0
+
Number
(
val
))
:
(
jagain
+
Number
(
val
))
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
'beginning balance'
)
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
value
=
Number
(
val
)
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
}
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
}
}
}
...
...
@@ -1058,11 +1069,15 @@ export default class FixedAssetsMovement extends Component {
tableMeta
.
rowData
[
0
]
===
6
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
'beginning balance'
?
"#5198ea"
:
"black"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
===
'SUBMIT'
||
this
.
props
.
lastStatus
===
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
&&
(
this
.
props
.
status
===
'revision'
||
this
.
props
.
status
===
'not-yet'
||
this
.
props
.
status
===
'draft'
||
this
.
props
.
status
===
'submitted'
)
&&
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
'beginning balance'
?
false
:
true
)}
value
=
{
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
'beginning balance'
?
Number
(
value
.
value
).
toFixed
(
1
)
:
Number
(
handleValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
// // console.log(dataTable2)
}}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
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