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
f298b89b
Commit
f298b89b
authored
Oct 30, 2020
by
EKSAD
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into riri
parents
84381cfe
cc1081a4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
307 additions
and
280 deletions
+307
-280
BudgetTahunan.js
src/container/BudgetTahunan.js
+305
-278
TaxPlanning.js
src/container/BudgetTahunan/TaxPlanning.js
+2
-2
No files found.
src/container/BudgetTahunan.js
View file @
f298b89b
...
@@ -108,6 +108,7 @@ export default class BudgetTahunan extends Component {
...
@@ -108,6 +108,7 @@ export default class BudgetTahunan extends Component {
// console.log(response);
// console.log(response);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
data
.
length
>
0
)
{
let
data
=
response
.
data
.
data
let
data
=
response
.
data
.
data
let
companyData
=
data
.
map
((
item
)
=>
{
let
companyData
=
data
.
map
((
item
)
=>
{
return
{
return
{
...
@@ -129,6 +130,9 @@ export default class BudgetTahunan extends Component {
...
@@ -129,6 +130,9 @@ export default class BudgetTahunan extends Component {
}
}
//
//
})
})
}
else
{
this
.
setState
({
listRevision
:
null
,
revision
:
null
,
dataTable
:
[],
checkApprover
:
false
,
lastRevision
:
""
,
visibleTableHistory
:
false
,
loading
:
false
})
}
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
...
@@ -169,13 +173,13 @@ export default class BudgetTahunan extends Component {
...
@@ -169,13 +173,13 @@ export default class BudgetTahunan extends Component {
"report_type"
:
"Master Budget"
,
"report_type"
:
"Master Budget"
,
}
}
api
.
create
().
getReportTypeBody
(
payload
).
then
(
response
=>
{
api
.
create
().
getReportTypeBody
(
payload
).
then
(
response
=>
{
//
console.log(response);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
dataTable
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
let
dataTable
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
return
[
return
[
item
.
number
,
item
.
number
,
item
.
report_name
,
item
.
report_name
===
'CAT'
?
'Corporate Annual Target'
:
item
.
report_name
,
item
.
revision
,
item
.
revision
,
this
.
state
.
lastStatus
===
'APPROVED'
?
'CLOSED'
:
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
item
.
current_status
,
this
.
state
.
lastStatus
===
'APPROVED'
?
'CLOSED'
:
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
item
.
current_status
,
item
.
report_id
,
item
.
report_id
,
...
@@ -186,7 +190,7 @@ export default class BudgetTahunan extends Component {
...
@@ -186,7 +190,7 @@ export default class BudgetTahunan extends Component {
let
dataTableRevision
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
let
dataTableRevision
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
return
[
return
[
item
.
report_id
,
item
.
report_id
,
item
.
report_name
,
item
.
report_name
===
'CAT'
?
'Corporate Annual Target'
:
item
.
report_name
,
""
""
]
]
})
})
...
@@ -450,9 +454,15 @@ export default class BudgetTahunan extends Component {
...
@@ -450,9 +454,15 @@ export default class BudgetTahunan extends Component {
}
}
clickDetail
(
item
,
id
,
revision
,
status
)
{
clickDetail
(
item
,
id
,
revision
,
status
)
{
let
items
=
''
if
(
item
===
'Corporate Annual Target'
)
{
items
=
'CAT'
}
else
{
items
=
item
}
// console.log(this.state.dataForRevision);
// console.log(this.state.dataForRevision);
this
.
state
.
dataForRevision
.
map
(
i
=>
{
this
.
state
.
dataForRevision
.
map
(
i
=>
{
if
(
i
.
report_name
===
item
)
{
if
(
i
.
report_name
===
item
s
)
{
if
(
i
.
revision
!==
revision
)
{
if
(
i
.
revision
!==
revision
)
{
this
.
setState
({
prevRevision
:
true
})
this
.
setState
({
prevRevision
:
true
})
}
else
{
}
else
{
...
@@ -505,7 +515,7 @@ export default class BudgetTahunan extends Component {
...
@@ -505,7 +515,7 @@ export default class BudgetTahunan extends Component {
visibleTP
:
false
,
visibleTP
:
false
,
visibleCF
:
false
,
visibleCF
:
false
,
})
})
}
else
if
(
item
===
'C
AT
'
)
{
}
else
if
(
item
===
'C
orporate Annual Target
'
)
{
this
.
setState
({
this
.
setState
({
visibleBudgetTahunan
:
false
,
visibleBudgetTahunan
:
false
,
visibleBS
:
false
,
visibleBS
:
false
,
...
@@ -959,7 +969,7 @@ export default class BudgetTahunan extends Component {
...
@@ -959,7 +969,7 @@ export default class BudgetTahunan extends Component {
<
Autocomplete
<
Autocomplete
{...
this
.
state
.
listCompany
}
{...
this
.
state
.
listCompany
}
id
=
"company"
id
=
"company"
disabled
=
{
this
.
state
.
intent
===
'Home'
?
true
:
false
}
disabled
=
{
this
.
state
.
listCompany
===
null
?
true
:
this
.
state
.
intent
===
'Home'
?
true
:
false
}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
},
()
=>
{
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
},
()
=>
{
this
.
setState
({
visibleTableHistory
:
false
})
this
.
setState
({
visibleTableHistory
:
false
})
this
.
getRevision
()
this
.
getRevision
()
...
@@ -1135,13 +1145,15 @@ export default class BudgetTahunan extends Component {
...
@@ -1135,13 +1145,15 @@ export default class BudgetTahunan extends Component {
<
/button
>
<
/button
>
<
/div> :
(
this.state.lastStatus === 'WAITING FOR YOUR APPROVAL' && this.state.btnApprove
)
?
<
/div> :
(
this.state.lastStatus === 'WAITING FOR YOUR APPROVAL' && this.state.btnApprove
)
?
<
div
className
=
"grid grid-2x"
style
=
{{
borderTop
:
'solid 1px #c4c4c4'
,
padding
:
10
,
backgroundColor
:
'#f5f5f5'
,
width
:
'100%'
,
}}
>
<
div
className
=
"grid grid-2x"
style
=
{{
borderTop
:
'solid 1px #c4c4c4'
,
padding
:
10
,
backgroundColor
:
'#f5f5f5'
,
width
:
'100%'
,
}}
>
<
div
className
=
"col-1"
>
<
div
className
=
"col-1"
/>
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
button
<
button
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
outline
:
'none'
,
marginRight
:
20
}}
}}
onClick
=
{()
=>
this
.
setState
({
visibleRevision
:
true
})}
onClick
=
{()
=>
this
.
setState
({
visibleRevision
:
true
})}
>
>
...
@@ -1149,8 +1161,6 @@ export default class BudgetTahunan extends Component {
...
@@ -1149,8 +1161,6 @@ export default class BudgetTahunan extends Component {
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Revision
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Revision
<
/Typography
>
<
/div
>
<
/div
>
<
/button
>
<
/button
>
<
/div
>
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
button
<
button
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
...
@@ -1204,9 +1214,11 @@ export default class BudgetTahunan extends Component {
...
@@ -1204,9 +1214,11 @@ export default class BudgetTahunan extends Component {
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)}
)
}
{
this
.
state
.
visibleUpload
&&
(
{
this
.
state
.
visibleUpload
&&
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
}}
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
}}
>
<
div
className
=
"popup-panel grid grid-2x main-color"
style
=
{{
height
:
64
,
borderTopRightRadius
:
8
,
borderTopLeftRadius
:
8
}}
>
<
div
className
=
"popup-panel grid grid-2x main-color"
style
=
{{
height
:
64
,
borderTopRightRadius
:
8
,
borderTopLeftRadius
:
8
}}
>
...
@@ -1238,9 +1250,11 @@ export default class BudgetTahunan extends Component {
...
@@ -1238,9 +1250,11 @@ export default class BudgetTahunan extends Component {
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)}
)
}
{
this
.
state
.
visibleBS
&&
(
{
this
.
state
.
visibleBS
&&
(
<
BalanceSheet
<
BalanceSheet
open
=
{
this
.
props
.
open
}
open
=
{
this
.
props
.
open
}
report_id
=
{
this
.
state
.
report_id
}
report_id
=
{
this
.
state
.
report_id
}
...
@@ -1258,8 +1272,10 @@ export default class BudgetTahunan extends Component {
...
@@ -1258,8 +1272,10 @@ export default class BudgetTahunan extends Component {
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
status
=
{
this
.
state
.
status
}
status
=
{
this
.
state
.
status
}
/
>
/
>
)}
)
{
this
.
state
.
visiblePL
&&
(
}
{
this
.
state
.
visiblePL
&&
(
<
ProfitLoss
<
ProfitLoss
open
=
{
this
.
props
.
open
}
open
=
{
this
.
props
.
open
}
report_id
=
{
this
.
state
.
report_id
}
report_id
=
{
this
.
state
.
report_id
}
...
@@ -1277,8 +1293,10 @@ export default class BudgetTahunan extends Component {
...
@@ -1277,8 +1293,10 @@ export default class BudgetTahunan extends Component {
lastStatus
=
{
this
.
state
.
lastStatus
}
lastStatus
=
{
this
.
state
.
lastStatus
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
/
>
/
>
)}
)
{
this
.
state
.
visibleTP
&&
(
}
{
this
.
state
.
visibleTP
&&
(
<
TaxPlanning
<
TaxPlanning
open
=
{
this
.
props
.
open
}
open
=
{
this
.
props
.
open
}
report_id
=
{
this
.
state
.
report_id
}
report_id
=
{
this
.
state
.
report_id
}
...
@@ -1296,8 +1314,10 @@ export default class BudgetTahunan extends Component {
...
@@ -1296,8 +1314,10 @@ export default class BudgetTahunan extends Component {
lastStatus
=
{
this
.
state
.
lastStatus
}
lastStatus
=
{
this
.
state
.
lastStatus
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
/
>
/
>
)}
)
{
this
.
state
.
visibleFAM
&&
(
}
{
this
.
state
.
visibleFAM
&&
(
<
FixedAssetsMovement
<
FixedAssetsMovement
open
=
{
this
.
props
.
open
}
open
=
{
this
.
props
.
open
}
report_id
=
{
this
.
state
.
report_id
}
report_id
=
{
this
.
state
.
report_id
}
...
@@ -1315,8 +1335,10 @@ export default class BudgetTahunan extends Component {
...
@@ -1315,8 +1335,10 @@ export default class BudgetTahunan extends Component {
lastStatus
=
{
this
.
state
.
lastStatus
}
lastStatus
=
{
this
.
state
.
lastStatus
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
/
>
/
>
)}
)
{
this
.
state
.
visibleCAT
&&
(
}
{
this
.
state
.
visibleCAT
&&
(
<
CorporateAnnualTarget
<
CorporateAnnualTarget
open
=
{
this
.
props
.
open
}
open
=
{
this
.
props
.
open
}
report_id
=
{
this
.
state
.
report_id
}
report_id
=
{
this
.
state
.
report_id
}
...
@@ -1334,8 +1356,10 @@ export default class BudgetTahunan extends Component {
...
@@ -1334,8 +1356,10 @@ export default class BudgetTahunan extends Component {
lastStatus
=
{
this
.
state
.
lastStatus
}
lastStatus
=
{
this
.
state
.
lastStatus
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
/
>
/
>
)}
)
{
this
.
state
.
visibleCF
&&
(
}
{
this
.
state
.
visibleCF
&&
(
<
CashFlow
<
CashFlow
open
=
{
this
.
props
.
open
}
open
=
{
this
.
props
.
open
}
report_id
=
{
this
.
state
.
report_id
}
report_id
=
{
this
.
state
.
report_id
}
...
@@ -1353,9 +1377,11 @@ export default class BudgetTahunan extends Component {
...
@@ -1353,9 +1377,11 @@ export default class BudgetTahunan extends Component {
lastStatus
=
{
this
.
state
.
lastStatus
}
lastStatus
=
{
this
.
state
.
lastStatus
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
/
>
/
>
)}
)
}
{
this
.
state
.
visibleRevision
&&
(
{
this
.
state
.
visibleRevision
&&
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
}}
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
}}
>
<
div
className
=
"popup-panel grid grid-2x main-color"
style
=
{{
height
:
64
,
borderTopRightRadius
:
8
,
borderTopLeftRadius
:
8
}}
>
<
div
className
=
"popup-panel grid grid-2x main-color"
style
=
{{
height
:
64
,
borderTopRightRadius
:
8
,
borderTopLeftRadius
:
8
}}
>
...
@@ -1469,7 +1495,8 @@ export default class BudgetTahunan extends Component {
...
@@ -1469,7 +1495,8 @@ export default class BudgetTahunan extends Component {
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)}
)
}
<
/div
>
<
/div
>
);
);
}
}
...
...
src/container/BudgetTahunan/TaxPlanning.js
View file @
f298b89b
...
@@ -74,7 +74,7 @@ export default class TaxPlanning extends Component {
...
@@ -74,7 +74,7 @@ export default class TaxPlanning extends Component {
}
}
api
.
create
().
getAllSettingByType
(
body
).
then
(
response
=>
{
api
.
create
().
getAllSettingByType
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
//
console.log(response);
this
.
setState
({
this
.
setState
({
minValue
:
response
.
data
.
data
[
0
]
?
response
.
data
.
data
[
0
].
min_value
:
null
,
minValue
:
response
.
data
.
data
[
0
]
?
response
.
data
.
data
[
0
].
min_value
:
null
,
maxValue
:
response
.
data
.
data
[
0
]
?
response
.
data
.
data
[
0
].
max_value
:
null
,
maxValue
:
response
.
data
.
data
[
0
]
?
response
.
data
.
data
[
0
].
max_value
:
null
,
...
@@ -204,7 +204,7 @@ export default class TaxPlanning extends Component {
...
@@ -204,7 +204,7 @@ export default class TaxPlanning extends Component {
}
}
}
}
})
})
console
.
log
(
dataTable
)
//
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
})
...
...
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