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
1064de7e
Commit
1064de7e
authored
Dec 07, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
werwerwer
parent
34b01cd1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
10 deletions
+25
-10
MonthlyReport.js
src/container/MonthlyReport.js
+24
-9
CashFlowMR.js
src/container/MonthlyReport/CashFlowMR.js
+1
-1
No files found.
src/container/MonthlyReport.js
View file @
1064de7e
...
...
@@ -103,7 +103,7 @@ export default class MonthlyReport extends Component {
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
data
.
is_approver
===
true
)
{
this
.
setState
({
isApprover
:
true
,
checkApprover
:
true
},
()
=>
this
.
get
Periode
())
this
.
get
Month
())
}
else
{
this
.
setState
({
isApprover
:
false
,
checkApprover
:
false
},
()
=>
this
.
getCompanyActive
())
...
...
@@ -247,7 +247,11 @@ export default class MonthlyReport extends Component {
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
()
if
(
this
.
state
.
isApprover
===
true
)
{
this
.
getPeriode
()
}
else
{
this
.
getLastPeriod
()
}
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
...
...
@@ -302,7 +306,7 @@ export default class MonthlyReport extends Component {
options
:
periodeData
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
};
let
periode
=
(
this
.
state
.
lastPeriod
==
""
?
String
(
Number
(
currentYear
)
+
1
)
:
this
.
state
.
lastPeriod
)
let
periode
=
(
this
.
state
.
lastPeriod
==
""
?
String
(
Number
(
currentYear
)
+
1
)
:
this
.
state
.
lastPeriod
===
undefined
?
String
(
Number
(
currentYear
)
+
1
)
:
this
.
state
.
lastPeriod
)
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
===
periode
)
// console.log(data)
console
.
log
(
this
.
state
.
lastPeriod
)
...
...
@@ -333,10 +337,11 @@ export default class MonthlyReport extends Component {
getCompanySubmitted
()
{
let
body
=
{
"periode"
:
this
.
state
.
periode
.
periode
"periode"
:
this
.
state
.
periode
.
periode
,
"months"
:
this
.
state
.
month
.
month_id
,
}
api
.
create
().
getCompanySubmittedMonthly
(
body
).
then
(
response
=>
{
// //
console.log(response);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
data
.
length
>
0
)
{
...
...
@@ -358,7 +363,6 @@ export default class MonthlyReport extends Component {
}
this
.
setState
({
listCompany
:
defaultProps
,
company
:
indexID
==
null
?
companyData
[
0
]
:
companyData
[
indexID
]
},
()
=>
{
// // console.log(response.data.data);
if
(
response
.
data
.
data
.
length
>
0
)
{
this
.
getRevision
()
}
else
{
...
...
@@ -871,7 +875,12 @@ export default class MonthlyReport extends Component {
{...
this
.
state
.
listMonth
}
id
=
"month"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
month
:
newInputValue
,
loading
:
true
},
()
=>
{
this
.
getMonthlyReportID
()
if
(
this
.
state
.
isApprover
===
true
)
{
this
.
getCompanySubmitted
()
}
else
{
this
.
setState
({
visibleTableHistory
:
false
})
this
.
getRevision
()
}
})}
disableClearable
style
=
{{
width
:
250
,
marginRight
:
20
}}
...
...
@@ -883,7 +892,12 @@ export default class MonthlyReport extends Component {
{...
this
.
state
.
listPeriode
}
id
=
"periode"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
,
loading
:
true
},
()
=>
{
this
.
getMonthlyReportID
()
if
(
this
.
state
.
isApprover
===
true
)
{
this
.
getCompanySubmitted
()
}
else
{
this
.
setState
({
visibleTableHistory
:
false
})
this
.
getRevision
()
}
})}
disableClearable
style
=
{{
width
:
250
}}
...
...
@@ -895,7 +909,8 @@ export default class MonthlyReport extends Component {
<
Autocomplete
{...
this
.
state
.
listCompany
}
id
=
"company"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
,
loading
:
true
},
()
=>
{
disabled
=
{
this
.
state
.
listCompany
===
null
?
true
:
false
}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
},
()
=>
{
this
.
getMonthlyReportID
()
})}
disableClearable
...
...
src/container/MonthlyReport/CashFlowMR.js
View file @
1064de7e
...
...
@@ -164,7 +164,7 @@ export default class CashFlowMR extends Component {
let
tst
=
String
(
item
).
replace
(
'[M-1]'
,
'[M1]'
)
let
data
=
tableMeta
.
columnIndex
// console.log(tableMeta.columnIndex)
let
indexID
=
tableMeta
.
rowData
[
data
].
actual_
formula
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
tst
}
`
))
let
indexID
=
tableMeta
.
rowData
[
data
].
formula
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
tst
}
`
))
// console.log(indexID)
if
(
indexID
!==
-
1
)
{
let
valuezz
=
tableMeta
.
rowData
[
data
].
formula
[
indexID
].
value
...
...
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