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
8bb935da
Commit
8bb935da
authored
Oct 01, 2020
by
d.arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into didam
parents
71794974
7a400996
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
40 deletions
+19
-40
BudgetTahunan.js
src/container/BudgetTahunan.js
+13
-36
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+6
-4
No files found.
src/container/BudgetTahunan.js
View file @
8bb935da
...
@@ -272,8 +272,9 @@ export default class BudgetTahunan extends Component {
...
@@ -272,8 +272,9 @@ export default class BudgetTahunan extends Component {
lastStatus
:
response
.
data
.
data
.
last_status
===
null
?
'SUBMIT'
:
response
.
data
.
data
.
last_status
lastStatus
:
response
.
data
.
data
.
last_status
===
null
?
'SUBMIT'
:
response
.
data
.
data
.
last_status
},
()
=>
{
},
()
=>
{
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
this
.
checkIsSubmit
()
this
.
historyApproval
()
this
.
historyApproval
()
this
.
getReport
()
this
.
getReportAttachment
()
})
})
}
else
{
}
else
{
this
.
setState
({
submissionID
:
null
})
this
.
setState
({
submissionID
:
null
})
...
@@ -304,20 +305,6 @@ export default class BudgetTahunan extends Component {
...
@@ -304,20 +305,6 @@ export default class BudgetTahunan extends Component {
})
})
}
}
checkIsSubmit
()
{
// let body = {
// "submission_id": this.state.submissionID
// }
// api.create().checkIsSubmit(body).then(response => {
// console.log(response.data.data.result);
// if (response.data) {
// if (response.data.status === "Success") {
// this.setState({ isSubmit: response.data.data.result })
// }
// }
// })
}
approvalSubmission
(
type
)
{
approvalSubmission
(
type
)
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
let
body
=
{
let
body
=
{
...
@@ -463,20 +450,14 @@ export default class BudgetTahunan extends Component {
...
@@ -463,20 +450,14 @@ export default class BudgetTahunan extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
getSubmission
()
this
.
getSubmission
()
this
.
getReport
()
this
.
getReportAttachment
()
}
else
{
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
getSubmission
()
this
.
getSubmission
()
this
.
getReport
()
this
.
getReportAttachment
()
})
})
}
}
}
else
{
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
getSubmission
()
this
.
getSubmission
()
this
.
getReport
()
this
.
getReportAttachment
()
})
})
}
}
})
})
...
@@ -591,13 +572,13 @@ export default class BudgetTahunan extends Component {
...
@@ -591,13 +572,13 @@ export default class BudgetTahunan extends Component {
<
button
<
button
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
tableMeta
.
rowData
[
5
]
?
'pointer'
:
null
,
cursor
:
tableMeta
.
rowData
[
5
]
?
'pointer'
:
'default'
,
borderColor
:
'transparent'
borderColor
:
'transparent'
}}
}}
onClick
=
{()
=>
onClick
=
{()
=>
// tableMeta.rowData[5]
?
tableMeta
.
rowData
[
5
]
==
true
?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
//
: null
:
null
}
}
>
>
<
Typography
style
=
{{
color
:
tableMeta
.
rowData
[
5
]
?
'#5198ea'
:
'GrayText'
,
fontSize
:
12
,
}}
>
Detail
<
/Typography
>
<
Typography
style
=
{{
color
:
tableMeta
.
rowData
[
5
]
?
'#5198ea'
:
'GrayText'
,
fontSize
:
12
,
}}
>
Detail
<
/Typography
>
...
@@ -713,8 +694,7 @@ export default class BudgetTahunan extends Component {
...
@@ -713,8 +694,7 @@ export default class BudgetTahunan extends Component {
download
:
false
,
download
:
false
,
selectableRows
:
false
,
selectableRows
:
false
,
viewColumns
:
false
,
viewColumns
:
false
,
rowsPerPage
:
5
,
pagination
:
false
,
rowsPerPageOptions
:
[
5
,
25
,
100
],
search
:
false
search
:
false
}
}
const
optionsRevision
=
{
const
optionsRevision
=
{
...
@@ -764,8 +744,6 @@ export default class BudgetTahunan extends Component {
...
@@ -764,8 +744,6 @@ export default class BudgetTahunan extends Component {
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
},
()
=>
{
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
},
()
=>
{
this
.
setState
({
visibleTableHistory
:
false
,
loading
:
true
})
this
.
setState
({
visibleTableHistory
:
false
,
loading
:
true
})
this
.
getRevision
()
this
.
getRevision
()
this
.
getReport
()
this
.
getReportAttachment
()
this
.
getSubmission
()
this
.
getSubmission
()
})}
})}
disabled
=
{
this
.
state
.
intent
===
'Home'
?
true
:
false
}
disabled
=
{
this
.
state
.
intent
===
'Home'
?
true
:
false
}
...
@@ -785,8 +763,6 @@ export default class BudgetTahunan extends Component {
...
@@ -785,8 +763,6 @@ export default class BudgetTahunan extends Component {
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
},
()
=>
{
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
},
()
=>
{
this
.
setState
({
visibleTableHistory
:
false
,
loading
:
true
})
this
.
setState
({
visibleTableHistory
:
false
,
loading
:
true
})
this
.
getRevision
()
this
.
getRevision
()
this
.
getReport
()
this
.
getReportAttachment
()
this
.
getSubmission
()
this
.
getSubmission
()
})}
})}
disableClearable
disableClearable
...
@@ -803,6 +779,7 @@ export default class BudgetTahunan extends Component {
...
@@ -803,6 +779,7 @@ export default class BudgetTahunan extends Component {
this
.
getReport
()
this
.
getReport
()
this
.
getReportAttachment
()
this
.
getReportAttachment
()
})}
})}
disabled
=
{
true
}
disableClearable
disableClearable
style
=
{{
width
:
250
}}
style
=
{{
width
:
250
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Revision"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Revision"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
...
@@ -1045,7 +1022,7 @@ export default class BudgetTahunan extends Component {
...
@@ -1045,7 +1022,7 @@ export default class BudgetTahunan extends Component {
submissionID
=
{
this
.
state
.
submissionID
}
submissionID
=
{
this
.
state
.
submissionID
}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleBS
:
false
,
visibleBudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleBS
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
get
CompanyActive
.
bind
(
this
)}
getReport
=
{
this
.
get
Submission
.
bind
(
this
)}
isApprover
=
{
this
.
state
.
isApprover
}
isApprover
=
{
this
.
state
.
isApprover
}
/
>
/
>
)}
)}
...
@@ -1061,7 +1038,7 @@ export default class BudgetTahunan extends Component {
...
@@ -1061,7 +1038,7 @@ export default class BudgetTahunan extends Component {
submissionID
=
{
this
.
state
.
submissionID
}
submissionID
=
{
this
.
state
.
submissionID
}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visiblePL
:
false
,
visibleBudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visiblePL
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
get
Report
.
bind
(
this
)}
getReport
=
{
this
.
get
Submission
.
bind
(
this
)}
status
=
{
this
.
state
.
status
}
status
=
{
this
.
state
.
status
}
isApprover
=
{
this
.
state
.
isApprover
}
isApprover
=
{
this
.
state
.
isApprover
}
/
>
/
>
...
@@ -1079,7 +1056,7 @@ export default class BudgetTahunan extends Component {
...
@@ -1079,7 +1056,7 @@ export default class BudgetTahunan extends Component {
submissionID
=
{
this
.
state
.
submissionID
}
submissionID
=
{
this
.
state
.
submissionID
}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleTP
:
false
,
visibleBudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleTP
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
get
CompanyActive
.
bind
(
this
)}
getReport
=
{
this
.
get
Submission
.
bind
(
this
)}
status
=
{
this
.
state
.
status
}
status
=
{
this
.
state
.
status
}
isApprover
=
{
this
.
state
.
isApprover
}
isApprover
=
{
this
.
state
.
isApprover
}
/
>
/
>
...
@@ -1096,7 +1073,7 @@ export default class BudgetTahunan extends Component {
...
@@ -1096,7 +1073,7 @@ export default class BudgetTahunan extends Component {
submissionID
=
{
this
.
state
.
submissionID
}
submissionID
=
{
this
.
state
.
submissionID
}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleFAM
:
false
,
visibleBudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleFAM
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
get
CompanyActive
.
bind
(
this
)}
getReport
=
{
this
.
get
Submission
.
bind
(
this
)}
status
=
{
this
.
state
.
status
}
status
=
{
this
.
state
.
status
}
isApprover
=
{
this
.
state
.
isApprover
}
isApprover
=
{
this
.
state
.
isApprover
}
/
>
/
>
...
@@ -1113,7 +1090,7 @@ export default class BudgetTahunan extends Component {
...
@@ -1113,7 +1090,7 @@ export default class BudgetTahunan extends Component {
submissionID
=
{
this
.
state
.
submissionID
}
submissionID
=
{
this
.
state
.
submissionID
}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleCAT
:
false
,
visibleBudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleCAT
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
get
CompanyActive
.
bind
(
this
)}
getReport
=
{
this
.
get
Submission
.
bind
(
this
)}
isApprover
=
{
this
.
state
.
isApprover
}
isApprover
=
{
this
.
state
.
isApprover
}
/
>
/
>
)}
)}
...
@@ -1129,7 +1106,7 @@ export default class BudgetTahunan extends Component {
...
@@ -1129,7 +1106,7 @@ export default class BudgetTahunan extends Component {
submissionID
=
{
this
.
state
.
submissionID
}
submissionID
=
{
this
.
state
.
submissionID
}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleCF
:
false
,
visibleBudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleCF
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
get
CompanyActive
.
bind
(
this
)}
getReport
=
{
this
.
get
Submission
.
bind
(
this
)}
/
>
/
>
)}
)}
...
...
src/container/BudgetTahunan/ProfitLoss.js
View file @
8bb935da
...
@@ -91,6 +91,7 @@ export default class ProfitLoss extends Component {
...
@@ -91,6 +91,7 @@ export default class ProfitLoss extends Component {
api
.
create
().
getDetailReportMB
(
payload
).
then
(
response
=>
{
api
.
create
().
getDetailReportMB
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
console
.
log
(
response
);
let
dataTable
=
[]
let
dataTable
=
[]
this
.
setState
({
visibleProfitLoss
:
true
})
if
(
response
.
data
)
{
if
(
response
.
data
)
{
let
res
=
response
.
data
.
data
let
res
=
response
.
data
.
data
const
handlePushChild
=
(
item
)
=>
{
const
handlePushChild
=
(
item
)
=>
{
...
@@ -166,6 +167,7 @@ export default class ProfitLoss extends Component {
...
@@ -166,6 +167,7 @@ export default class ProfitLoss extends Component {
}
}
}
}
})
})
console
.
log
(
dataTable
)
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
}
else
{
}
else
{
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
...
@@ -497,9 +499,9 @@ export default class ProfitLoss extends Component {
...
@@ -497,9 +499,9 @@ export default class ProfitLoss extends Component {
}
}
})
})
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"sales price"
)
{
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"sales price"
)
{
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
20
])
/
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
1
][
20
])
let
value
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
20
])
/
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
1
][
20
])
let
value
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
20
])
/
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
1
][
20
])
return
value
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
R
.
equals
(
value
,
NaN
)
?
"0.0"
:
value
return
R
.
equals
(
value
,
NaN
)
?
"0.0"
:
value
}
else
{
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
total
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
total
...
@@ -2255,9 +2257,9 @@ export default class ProfitLoss extends Component {
...
@@ -2255,9 +2257,9 @@ export default class ProfitLoss extends Component {
<
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
type
=
"button"
type
=
"button"
onClick
=
{()
=>
this
.
setState
({
loading
:
true
,
visibleProfitLoss
:
true
},
()
=>
{
onClick
=
{()
=>
this
.
setState
({
loading
:
true
,
dataTable
:[]
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
getItemHierarki
()
this
.
getItemHierarki
()
},
100
);
},
100
);
...
...
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