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
672e1044
Commit
672e1044
authored
Oct 02, 2020
by
Rifka Kurnia Irfiana
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into rifka
parents
14fabc65
05a0c2a1
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
100 additions
and
81 deletions
+100
-81
index.js
src/api/index.js
+3
-1
BudgetTahunan.js
src/container/BudgetTahunan.js
+22
-6
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+42
-41
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+14
-14
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+18
-18
OperatingIndicator.js
src/container/OprIndicator/OperatingIndicator.js
+1
-1
No files found.
src/api/index.js
View file @
672e1044
...
...
@@ -204,6 +204,7 @@ const create = (type = "") => {
const
checkApprover
=
()
=>
api
.
get
(
'transaction/master_budget/is_approver'
)
const
approvalSubmission
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/approval_submission'
,
body
)
const
getCompanySubmitted
=
(
body
)
=>
api
.
post
(
'transaction/get_company_submitted'
,
body
)
const
getLastPeriod
=
(
idCompany
)
=>
api
.
get
(
`transaction/get_last_periode/
${
idCompany
}
`
)
const
getIdDeleteFromExcel
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/delete_from_excel'
,
body
)
const
getOpetratingIndID
=
(
body
)
=>
api
.
post
(
'transaction/get_operating_indicator_id'
,
body
)
...
...
@@ -367,7 +368,8 @@ const create = (type = "") => {
historyApproval
,
checkApprover
,
approvalSubmission
,
getCompanySubmitted
getCompanySubmitted
,
getLastPeriod
}
}
...
...
src/container/BudgetTahunan.js
View file @
672e1044
...
...
@@ -70,7 +70,7 @@ export default class BudgetTahunan extends Component {
this
.
props
.
selectIndex
(
'Master Budget & CAT'
)
if
(
this
.
props
.
location
.
state
!==
undefined
)
{
console
.
log
(
this
.
props
);
this
.
setState
({
userType
:
this
.
props
.
location
.
state
.
userType
,
intent
:
'Home'
,
rawData
:
this
.
props
.
location
.
state
.
rawData
},
()
=>
{
this
.
setState
({
userType
:
this
.
props
.
location
.
state
.
userType
,
intent
:
'Home'
,
lastPeriod
:
this
.
props
.
location
.
state
.
rawData
},
()
=>
{
this
.
checkApprover
()
})
}
else
{
...
...
@@ -231,8 +231,8 @@ export default class BudgetTahunan extends Component {
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
company_name
),
};
let
index
=
arrayBaru
.
findIndex
((
val
)
=>
val
.
company_id
==
comID
)
this
.
setState
({
listCompany
:
defaultProps
,
company
:
index
==
-
1
?
arrayBaru
[
0
]
:
arrayBaru
[
index
]
},
()
=>
{
this
.
get
Periode
()
this
.
setState
({
listCompany
:
defaultProps
,
company
:
arrayBaru
.
length
<
1
?
companyData
[
0
]
:
(
index
==
-
1
?
arrayBaru
[
0
]
:
arrayBaru
[
index
])
},
()
=>
{
this
.
get
LastPeriod
()
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
...
...
@@ -250,10 +250,21 @@ export default class BudgetTahunan extends Component {
})
}
getLastPeriod
(){
api
.
create
().
getLastPeriod
(
this
.
state
.
company
.
company_id
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
lastPeriod
:
response
.
data
.
data
.
last_periode
},
()
=>
{
this
.
getPeriode
()
})
}
})
}
getPeriode
()
{
api
.
create
().
getPeriodeTransaction
().
then
(
response
=>
{
let
dateNow
=
new
Date
let
year
=
this
.
state
.
rawData
?
this
.
state
.
rawData
.
periode
:
format
(
dateNow
,
'yyyy'
)
//
let dateNow = new Date
//
let year = this.state.rawData ? this.state.rawData.periode : format(dateNow, 'yyyy')
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
data
=
response
.
data
.
data
...
...
@@ -266,7 +277,7 @@ export default class BudgetTahunan extends Component {
options
:
periodeData
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
};
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
===
year
)
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
===
this
.
state
.
lastPeriod
)
this
.
setState
({
listPeriode
:
defaultProps
,
periode
:
index
===
-
1
?
periodeData
[
0
]
:
periodeData
[
index
]
},
()
=>
{
if
(
this
.
state
.
isApprover
===
true
)
{
this
.
getCompanySubmitted
()
...
...
@@ -1162,6 +1173,7 @@ export default class BudgetTahunan extends Component {
status
=
{
this
.
state
.
status
}
isApprover
=
{
this
.
state
.
isApprover
}
lastStatus
=
{
this
.
state
.
lastStatus
}
prevRevision
=
{
this
.
state
.
prevRevision
}
/
>
)}
...
...
@@ -1181,6 +1193,7 @@ export default class BudgetTahunan extends Component {
status
=
{
this
.
state
.
status
}
isApprover
=
{
this
.
state
.
isApprover
}
lastStatus
=
{
this
.
state
.
lastStatus
}
prevRevision
=
{
this
.
state
.
prevRevision
}
/
>
)}
{
this
.
state
.
visibleFAM
&&
(
...
...
@@ -1199,6 +1212,7 @@ export default class BudgetTahunan extends Component {
status
=
{
this
.
state
.
status
}
isApprover
=
{
this
.
state
.
isApprover
}
lastStatus
=
{
this
.
state
.
lastStatus
}
prevRevision
=
{
this
.
state
.
prevRevision
}
/
>
)}
{
this
.
state
.
visibleCAT
&&
(
...
...
@@ -1216,6 +1230,7 @@ export default class BudgetTahunan extends Component {
getReport
=
{
this
.
getSubmission
.
bind
(
this
)}
isApprover
=
{
this
.
state
.
isApprover
}
lastStatus
=
{
this
.
state
.
lastStatus
}
prevRevision
=
{
this
.
state
.
prevRevision
}
/
>
)}
{
this
.
state
.
visibleCF
&&
(
...
...
@@ -1231,6 +1246,7 @@ export default class BudgetTahunan extends Component {
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleCF
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
getSubmission
.
bind
(
this
)}
prevRevision
=
{
this
.
state
.
prevRevision
}
/
>
)}
...
...
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
672e1044
This diff is collapsed.
Click to expand it.
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
672e1044
This diff is collapsed.
Click to expand it.
src/container/BudgetTahunan/ProfitLoss.js
View file @
672e1044
This diff is collapsed.
Click to expand it.
src/container/OprIndicator/OperatingIndicator.js
View file @
672e1044
...
...
@@ -128,7 +128,7 @@ export default class OperatingIndicator extends Component {
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
company_name
),
};
this
.
setState
({
listCompany
:
defaultProps
,
company
:
arrayBaru
[
0
]
},
()
=>
{
this
.
setState
({
listCompany
:
defaultProps
,
company
:
arrayBaru
.
length
<
1
?
companyData
[
0
]
:
arrayBaru
[
0
]
},
()
=>
{
this
.
getPeriode
()
})
}
else
{
...
...
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