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
e59b686a
Commit
e59b686a
authored
Dec 04, 2020
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'riri' into 'master'
oiii See merge request
!747
parents
f19e40c0
f9ca39fb
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
465 additions
and
253 deletions
+465
-253
OperatingIndicatorMR.js
src/container/MonthlyReport/OperatingIndicatorMR.js
+453
-181
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+1
-1
OperatingIndicator.js
src/container/OprIndicator/OperatingIndicator.js
+11
-71
No files found.
src/container/MonthlyReport/OperatingIndicatorMR.js
View file @
e59b686a
This diff is collapsed.
Click to expand it.
src/container/MonthlyReport/ProfitLossMR.js
View file @
e59b686a
...
...
@@ -698,7 +698,7 @@ export default class ProfitLossMR extends Component {
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
tableMeta
.
rowData
[
9
]}
value
=
{
tableMeta
.
rowData
[
7
]}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
src/container/OprIndicator/OperatingIndicator.js
View file @
e59b686a
...
...
@@ -89,46 +89,6 @@ export default class OperatingIndicator extends Component {
})
}
// getMonth() {
// api.create().getMonthTransaction().then(response => {
// console.log(response);
// let dateNow = new Date
// let month = format(dateNow, 'MMMM')
// if (response.data) {
// if (response.data.status === "success") {
// console.log(response);
// let data = response.data.data
// let monthData = data.map((item) => {
// return {
// month_id: item.id,
// month_value: String(item.month_name).substr(0, 3)
// }
// })
// let defaultProps = {
// options: monthData,
// getOptionLabel: (option) => option.month_value,
// };
// let index = data.sort((a, b) => a - b).findIndex((val) => val.month_name == month)
// console.log(index);
// this.setState({ listMonth: defaultProps, month: index == -1 ? monthData[0] : monthData[index] }, () => {
// this.getLastPeriod()
// })
// } else {
// this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
// if (response.data.message.includes("Someone Logged In")) {
// setTimeout(() => {
// localStorage.removeItem(Constant.TOKEN)
// window.location.reload();
// }, 1000);
// }
// })
// }
// } else {
// this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
// }
// })
// }
getReportAttachment
()
{
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
...
...
@@ -295,34 +255,6 @@ export default class OperatingIndicator extends Component {
})
}
getRevision
()
{
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
}
api
.
create
().
getRevision
(
payload
).
then
(
response
=>
{
// console.log(response);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
data
=
response
.
data
.
data
let
revisionData
=
data
.
map
((
item
)
=>
{
return
{
revision
:
item
,
}
})
let
defaultProps
=
{
options
:
revisionData
,
getOptionLabel
:
(
option
)
=>
option
.
revision
,
};
this
.
setState
({
listRevision
:
defaultProps
,
revision
:
revisionData
[
0
]
},
()
=>
{
this
.
getReport
()
this
.
getReportAttachment
()
})
}
}
})
}
getOperatingID
()
{
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
...
...
@@ -386,7 +318,8 @@ export default class OperatingIndicator extends Component {
visibleOperatingIndicator
:
false
,
visibleDetailOpt
:
false
,
visibleDetailMonthly
:
true
,
visibleDetailRolling
:
false
visibleDetailRolling
:
false
,
months
:
id
===
22
?
1
:
23
?
2
:
24
?
3
:
25
?
4
:
27
?
5
:
28
?
6
:
29
?
7
:
31
?
8
:
32
?
9
:
33
?
10
:
35
?
11
:
36
?
12
:
0
},
()
=>
console
.
log
(
this
.
state
.
dataDetail
))
...
...
@@ -449,6 +382,13 @@ export default class OperatingIndicator extends Component {
})
}
saveMonthlyOI
(
payload
)
{
api
.
create
().
createMonthlyReportOI
(
payload
).
then
((
response
)
=>
{
this
.
getReport
()
this
.
getOperatingID
()
})
}
render
()
{
const
columns
=
[
"#"
,
"Report Type"
,
// {
...
...
@@ -671,14 +611,14 @@ export default class OperatingIndicator extends Component {
data
=
{
this
.
state
.
dataDetail
}
height
=
{
this
.
props
.
height
}
width
=
{
this
.
props
.
width
}
// month={this.state.month
}
months
=
{
this
.
state
.
months
}
company
=
{
this
.
state
.
company
}
onClickClose
=
{()
=>
this
.
setState
({
visibleDetailMonthly
:
false
,
visibleOperatingIndicator
:
true
},
()
=>
{
this
.
getOperatingID
()
this
.
forceUpdate
()
})}
getReport
=
{()
=>
this
.
getOperatingID
()}
save
OperatingInd
=
{
this
.
saveOperatingInd
.
bind
(
this
)}
save
MonthlyOI
=
{
this
.
saveMonthlyOI
.
bind
(
this
)}
isSubmit
=
{
this
.
state
.
statusDetail
==
'closed'
?
false
:
this
.
state
.
isSubmit
}
permission
=
{{
create
:
this
.
state
.
buttonCreate
,
edit
:
this
.
state
.
buttonEdit
,
delete
:
this
.
state
.
buttonDelete
}}
/
>
...
...
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