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
1668795c
Commit
1668795c
authored
Mar 19, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ropl
parent
3e88701f
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
441 additions
and
171 deletions
+441
-171
index.js
src/api/index.js
+11
-1
OperatingIndicator.js
src/container/OprIndicator/OperatingIndicator.js
+33
-29
OperatingIndicatorRO.js
src/container/RollingOutlook/OperatingIndicatorRO.js
+397
-141
No files found.
src/api/index.js
View file @
1668795c
...
...
@@ -256,6 +256,11 @@ const create = (type = "") => {
const
getRollingOutlookPL
=
(
body
)
=>
api
.
post
(
'transaction/profit_loss/rolling_outlook/get_report_hierarki'
,
body
)
const
getRollingOutlookTP
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/tax_planning/get_report_hierarki'
,
body
)
const
createRollingOutlookTP
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/tax_planning/store_ro_tax_planning'
,
body
)
const
getRollingOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/get_operating_indicator_id'
,
body
)
const
getHierarkiRollingOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/get_report_hierarki'
,
body
)
const
createRollingOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/create_monthly_report'
,
body
)
const
getLastestUpdateROOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/get_latest_update'
,
body
)
//REPORT NEW
...
...
@@ -728,7 +733,12 @@ const create = (type = "") => {
getRollingOutlookRevision
,
getRollingOutlookIsApprover
,
checkImportRollingOutlookBS
,
importRollingOutlookBS
importRollingOutlookBS
,
getRollingOI
,
getHierarkiRollingOI
,
createRollingOI
,
getLastestUpdateROOI
}
}
...
...
src/container/OprIndicator/OperatingIndicator.js
View file @
1668795c
...
...
@@ -80,7 +80,7 @@ export default class OperatingIndicator extends Component {
}
getLastPeriod
()
{
api
.
create
().
getLastPeriodOI
(
this
.
state
.
company
.
company_id
).
then
(
response
=>
{
api
.
create
().
getLastPeriodOI
(
this
.
state
.
company
.
company_id
).
then
(
response
=>
{
// console.log(response);
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
lastPeriod
:
response
.
data
.
data
.
last_periode
,
latestPeriode
:
response
.
data
.
data
.
latest_periode
},
()
=>
{
...
...
@@ -190,7 +190,7 @@ export default class OperatingIndicator extends Component {
})
if
(
arrayBaru
.
length
>
0
)
{
arrayBaru
=
arrayBaru
.
sort
((
a
,
b
)
=>
a
.
company_name
.
localeCompare
(
b
.
company_name
))
arrayBaru
=
arrayBaru
.
sort
((
a
,
b
)
=>
a
.
company_name
.
localeCompare
(
b
.
company_name
))
}
let
defaultProps
=
{
...
...
@@ -315,22 +315,22 @@ export default class OperatingIndicator extends Component {
visibleDetailOpt
:
true
,
visibleDetailMonthly
:
false
,
visibleDetailRolling
:
false
})
}
else
if
(
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
"monthly report"
))
{
console
.
log
(
item
);
let
month
=
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'jan'
)
?
1
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'feb'
)
?
2
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'mar'
)
?
3
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'apr'
)
?
4
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'may'
)
?
5
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'jun'
)
?
6
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'jul'
)
?
7
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'aug'
)
?
8
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'sep'
)
?
9
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'oct'
)
?
10
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'nov'
)
?
11
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'dec'
)
?
12
:
null
let
month
=
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'jan'
)
?
1
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'feb'
)
?
2
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'mar'
)
?
3
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'apr'
)
?
4
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'may'
)
?
5
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'jun'
)
?
6
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'jul'
)
?
7
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'aug'
)
?
8
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'sep'
)
?
9
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'oct'
)
?
10
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'nov'
)
?
11
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'dec'
)
?
12
:
null
this
.
setState
({
statusDetail
:
String
(
item
[
2
]).
toLocaleLowerCase
(),
dataDetail
:
{
...
this
.
state
.
dataReport
[
index
],
periode
:
this
.
state
.
periode
.
periode
,
operatingIndID
:
this
.
state
.
operatingIndID
,
company
:
this
.
state
.
company
},
...
...
@@ -339,18 +339,22 @@ export default class OperatingIndicator extends Component {
visibleDetailMonthly
:
true
,
visibleDetailRolling
:
false
,
months
:
month
})
}
else
if
(
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
"rolling outlook"
))
{
let
quarter
=
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'q1'
)
?
"q1"
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'q2'
)
?
"q2"
:
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
'q3'
)
?
"q3"
:
null
this
.
setState
({
statusDetail
:
String
(
item
[
2
]).
toLocaleLowerCase
(),
dataDetail
:
{
...
this
.
state
.
dataReport
[
index
],
periode
:
this
.
state
.
periode
.
periode
,
operatingIndID
:
this
.
state
.
operatingIndID
,
company
:
this
.
state
.
company
},
visibleOperatingIndicator
:
false
,
visibleDetailOpt
:
false
,
visibleDetailMonthly
:
false
,
visibleDetailRolling
:
true
visibleDetailRolling
:
true
,
quartal
:
quarter
})
}
else
{
this
.
setState
({
...
...
@@ -360,7 +364,7 @@ export default class OperatingIndicator extends Component {
visibleDetailOpt
:
false
,
visibleDetailMonthly
:
false
,
visibleDetailRolling
:
true
})
}
...
...
@@ -421,7 +425,7 @@ export default class OperatingIndicator extends Component {
}
saveRollingOI
(
payload
)
{
api
.
create
().
create
MonthlyReport
OI
(
payload
).
then
((
response
)
=>
{
api
.
create
().
create
Rolling
OI
(
payload
).
then
((
response
)
=>
{
console
.
log
(
response
);
this
.
getReport
()
this
.
getOperatingID
()
...
...
@@ -504,10 +508,10 @@ export default class OperatingIndicator extends Component {
borderColor
:
'transparent'
}}
onClick
=
{()
=>
tableMeta
.
rowData
[
4
]
?
this
.
clickDetail
(
tableMeta
.
rowData
,
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
3
],
tableMeta
.
rowData
[
2
])
:
null
//
tableMeta.rowData[4] ?
this
.
clickDetail
(
tableMeta
.
rowData
,
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
3
],
tableMeta
.
rowData
[
2
])
//
:
//
null
}
>
<
Typography
style
=
{{
color
:
tableMeta
.
rowData
[
4
]
?
'#5198ea'
:
'GrayText'
,
fontSize
:
12
,
}}
>
Detail
<
/Typography
>
...
...
@@ -640,7 +644,7 @@ export default class OperatingIndicator extends Component {
})}
getReport
=
{()
=>
this
.
getOperatingID
()}
saveOperatingInd
=
{
this
.
saveOperatingInd
.
bind
(
this
)}
isSubmit
=
{
this
.
state
.
statusDetail
==
'closed'
?
false
:
this
.
state
.
isSubmit
}
isSubmit
=
{
this
.
state
.
statusDetail
==
'closed'
?
false
:
this
.
state
.
isSubmit
}
permission
=
{{
create
:
this
.
state
.
buttonCreate
,
edit
:
this
.
state
.
buttonEdit
,
delete
:
this
.
state
.
buttonDelete
}}
/
>
}
...
...
@@ -658,7 +662,7 @@ export default class OperatingIndicator extends Component {
})}
getReport
=
{()
=>
this
.
getOperatingID
()}
saveMonthlyOI
=
{
this
.
saveMonthlyOI
.
bind
(
this
)}
isSubmit
=
{
this
.
state
.
statusDetail
==
'closed'
?
false
:
this
.
state
.
isSubmit
}
isSubmit
=
{
this
.
state
.
statusDetail
==
'closed'
?
false
:
this
.
state
.
isSubmit
}
permission
=
{{
create
:
this
.
state
.
buttonCreate
,
edit
:
this
.
state
.
buttonEdit
,
delete
:
this
.
state
.
buttonDelete
}}
/
>
}
...
...
@@ -669,7 +673,7 @@ export default class OperatingIndicator extends Component {
data
=
{
this
.
state
.
dataDetail
}
height
=
{
this
.
props
.
height
}
width
=
{
this
.
props
.
width
}
months
=
{
this
.
state
.
months
}
quartal
=
{
this
.
state
.
quartal
}
company
=
{
this
.
state
.
company
}
onClickClose
=
{()
=>
this
.
setState
({
visibleDetailRolling
:
false
,
visibleOperatingIndicator
:
true
},
()
=>
{
this
.
getOperatingID
()
...
...
@@ -677,7 +681,7 @@ export default class OperatingIndicator extends Component {
})}
getReport
=
{()
=>
this
.
getOperatingID
()}
saveRollingOI
=
{
this
.
saveRollingOI
.
bind
(
this
)}
isSubmit
=
{
this
.
state
.
statusDetail
==
'closed'
?
false
:
this
.
state
.
isSubmit
}
isSubmit
=
{
this
.
state
.
statusDetail
==
'closed'
?
false
:
this
.
state
.
isSubmit
}
permission
=
{{
create
:
this
.
state
.
buttonCreate
,
edit
:
this
.
state
.
buttonEdit
,
delete
:
this
.
state
.
buttonDelete
}}
/
>
}
...
...
src/container/RollingOutlook/OperatingIndicatorRO.js
View file @
1668795c
This diff is collapsed.
Click to expand it.
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