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
9c87cb75
Commit
9c87cb75
authored
Mar 08, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rolling
parent
5a764859
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2265 additions
and
8 deletions
+2265
-8
OperatingIndicator.js
src/container/OprIndicator/OperatingIndicator.js
+41
-3
RollingOutlook.js
src/container/RollingOutlook.js
+1
-1
OperatingIndicatorRO.js
src/container/RollingOutlook/OperatingIndicatorRO.js
+2162
-0
ProfitLossRO.js
src/container/RollingOutlook/ProfitLossRO.js
+61
-4
No files found.
src/container/OprIndicator/OperatingIndicator.js
View file @
9c87cb75
...
...
@@ -12,6 +12,7 @@ import UploadFile from "../../library/Upload";
import
{
format
}
from
'date-fns'
;
import
Constant
from
'../../library/Constant'
;
import
OperatingIndicatorMR
from
'../MonthlyReport/OperatingIndicatorMR'
;
import
OperatingIndicatorRO
from
'../RollingOutlook/OperatingIndicatorRO'
;
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
...
...
@@ -341,6 +342,16 @@ export default class OperatingIndicator extends Component {
})
}
else
if
(
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
"rolling outlook"
))
{
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
})
}
else
{
this
.
setState
({
statusDetail
:
String
(
item
[
2
]).
toLocaleLowerCase
(),
...
...
@@ -409,6 +420,14 @@ export default class OperatingIndicator extends Component {
})
}
saveRollingOI
(
payload
)
{
api
.
create
().
createMonthlyReportOI
(
payload
).
then
((
response
)
=>
{
console
.
log
(
response
);
this
.
getReport
()
this
.
getOperatingID
()
})
}
render
()
{
const
columns
=
[
"#"
,
"Report Type"
,
// {
...
...
@@ -485,10 +504,10 @@ export default class OperatingIndicator extends Component {
borderColor
:
'transparent'
}}
onClick
=
{()
=>
tableMeta
.
rowData
[
4
]
?
//
tableMeta.rowData[4] ?
this
.
clickDetail
(
tableMeta
.
rowData
,
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
3
],
tableMeta
.
rowData
[
2
])
:
null
//
:
//
null
}
>
<
Typography
style
=
{{
color
:
tableMeta
.
rowData
[
4
]
?
'#5198ea'
:
'GrayText'
,
fontSize
:
12
,
}}
>
Detail
<
/Typography
>
...
...
@@ -644,6 +663,25 @@ export default class OperatingIndicator extends Component {
/
>
}
{
this
.
state
.
visibleDetailRolling
&&
<
OperatingIndicatorRO
open
=
{
this
.
props
.
open
}
data
=
{
this
.
state
.
dataDetail
}
height
=
{
this
.
props
.
height
}
width
=
{
this
.
props
.
width
}
months
=
{
this
.
state
.
months
}
company
=
{
this
.
state
.
company
}
onClickClose
=
{()
=>
this
.
setState
({
visibleDetailRolling
:
false
,
visibleOperatingIndicator
:
true
},
()
=>
{
this
.
getOperatingID
()
this
.
forceUpdate
()
})}
getReport
=
{()
=>
this
.
getOperatingID
()}
saveRollingOI
=
{
this
.
saveRollingOI
.
bind
(
this
)}
isSubmit
=
{
this
.
state
.
statusDetail
==
'closed'
?
false
:
this
.
state
.
isSubmit
}
permission
=
{{
create
:
this
.
state
.
buttonCreate
,
edit
:
this
.
state
.
buttonEdit
,
delete
:
this
.
state
.
buttonDelete
}}
/
>
}
{
this
.
state
.
visibleUpload
&&
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
}}
>
...
...
src/container/RollingOutlook.js
View file @
9c87cb75
...
...
@@ -559,7 +559,7 @@ export default class RollingOutlook extends Component {
this
.
setState
({
alert
:
false
})
}
saveTo
MasterBudget
(
data
)
{
saveTo
RollingOutlook
(
data
)
{
this
.
setState
({
loading
:
true
})
// console.log(JSON.stringify(data));
api
.
create
(
'UPLOAD'
).
createSubmitReport
(
data
).
then
(
response
=>
{
...
...
src/container/RollingOutlook/OperatingIndicatorRO.js
0 → 100644
View file @
9c87cb75
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/container/RollingOutlook/ProfitLossRO.js
View file @
9c87cb75
...
...
@@ -142,7 +142,7 @@ export default class ProfitLossRO extends Component {
item
.
formula
,
item
.
level
,
item
.
description
,
item
.
profit_loss
.
notes
===
undefined
?
""
:
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
last_year_total
===
""
?
"0"
:
item
.
profit_loss
.
last_year_total
,
item
.
profit_loss
.
january
===
""
?
"0"
:
item
.
profit_loss
.
january
,
item
.
profit_loss
.
february
===
""
?
"0"
:
item
.
profit_loss
.
february
,
...
...
@@ -179,7 +179,7 @@ export default class ProfitLossRO extends Component {
item
.
formula
,
item
.
level
,
item
.
description
,
item
.
profit_loss
.
notes
===
undefined
?
""
:
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
last_year_total
===
""
?
"0"
:
item
.
profit_loss
.
last_year_total
,
item
.
profit_loss
.
january
===
""
?
"0"
:
item
.
profit_loss
.
january
,
item
.
profit_loss
.
february
===
""
?
"0"
:
item
.
profit_loss
.
february
,
...
...
@@ -303,6 +303,63 @@ export default class ProfitLossRO extends Component {
// })
}
backToRollingOutlook
(
type
)
{
this
.
setState
({
loading
:
true
})
let
data
=
[]
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
"item_report_id"
:
i
[
1
],
"total_december_last_year"
:
String
(
Number
(
i
[
6
]).
toFixed
(
1
)),
"january"
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
)),
"february"
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
)),
"march"
:
String
(
Number
(
i
[
9
]).
toFixed
(
1
)),
"april"
:
String
(
Number
(
i
[
10
]).
toFixed
(
1
)),
"may"
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
)),
"june"
:
String
(
Number
(
i
[
12
]).
toFixed
(
1
)),
"july"
:
String
(
Number
(
i
[
13
]).
toFixed
(
1
)),
"august"
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
)),
"september"
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)),
"october"
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)),
"november"
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)),
"december"
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)),
"total_december_year"
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
))
})
})
let
payload
=
{
"rolling_outlook_id"
:
this
.
props
.
rollingOutlookID
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
// "months": this.props.month.month_id,
"months"
:
0
,
"status"
:
type
,
"balance_sheet"
:
data
}
api
.
create
(
'UPLOAD'
).
createRollingOutlookBS
(
payload
).
then
(
response
=>
{
console
.
log
(
payload
);
console
.
log
(
response
);
// console.log(JSON.stringify(payload))
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
type
==
'submitted'
)
{
// this.props.saveToMonthlyReport('BS')
this
.
props
.
onClickClose
()
}
else
{
// this.props.saveToMonthlyReport()
this
.
props
.
onClickClose
()
}
}
else
{
this
.
setState
({
loading
:
false
,
handleTekTekTek
:
0
},
()
=>
{
// this.props.saveToMonthlyReport()
this
.
props
.
onClickClose
()
})
}
}
else
{
this
.
setState
({
loading
:
false
,
handleTekTekTek
:
0
})
}
})
}
closeAlert
()
{
this
.
setState
({
alert
:
false
})
}
...
...
@@ -2121,7 +2178,7 @@ export default class ProfitLossRO extends Component {
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
this
.
backTo
MonthlyReport
(
'draft'
)
this
.
backTo
RollingOutlook
(
'draft'
)
})
}
>
...
...
@@ -2138,7 +2195,7 @@ export default class ProfitLossRO extends Component {
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
backTo
MonthlyReport
(
'submitted'
)
this
.
backTo
RollingOutlook
(
'submitted'
)
})}
style
=
{{
backgroundColor
:
'transparent'
,
...
...
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