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
0dd4add5
Commit
0dd4add5
authored
Dec 08, 2020
by
faisalhamdi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into faisal
parents
27a5c44f
1b1a7da4
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
618 additions
and
227 deletions
+618
-227
index.js
src/api/index.js
+3
-1
BalanceSheetMR.js
src/container/MonthlyReport/BalanceSheetMR.js
+61
-6
ListOfCreditFacilities.js
src/container/MonthlyReport/ListOfCreditFacilities.js
+452
-58
OperatingIndicatorMR.js
src/container/MonthlyReport/OperatingIndicatorMR.js
+5
-4
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+95
-156
OperatingIndicator.js
src/container/OprIndicator/OperatingIndicator.js
+2
-2
No files found.
src/api/index.js
View file @
0dd4add5
...
...
@@ -283,6 +283,7 @@ const create = (type = "") => {
const
uploadMonthlyReportFAM
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/fam/import_monthly_report'
,
body
)
const
uploadMonthlyReportTP
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_tp/import_monthly_report'
,
body
)
const
uploadMonthlyReportOI
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_oi/import_monthly_report'
,
body
)
const
validateSubmitReportMR
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/validate_save'
,
body
)
// MonthlyPL
const
getHierarkiMontlyReportPL
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_pl/get_report_hierarki'
,
body
)
...
...
@@ -508,7 +509,8 @@ const create = (type = "") => {
uploadMonthlyReportFAM
,
uploadMonthlyReportTP
,
uploadMonthlyReportOI
,
getHierarkiMontlyReportCF
getHierarkiMontlyReportCF
,
validateSubmitReportMR
}
}
...
...
src/container/MonthlyReport/BalanceSheetMR.js
View file @
0dd4add5
...
...
@@ -439,6 +439,63 @@ export default class BalanceSheetMR extends Component {
})
}
handleValidate
()
{
let
data
=
[]
// console.log(this.state.dataTable)
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
"item_report_id"
:
i
[
1
],
"rolling_outlook"
:
i
[
6
],
"master_budget"
:
i
[
7
],
"rolling_budget"
:
i
[
8
],
"actual"
:
i
[
9
],
"actual_previous_month"
:
i
[
10
],
"amount_act_vs_previous_month"
:
i
[
11
],
"percent_act_vs_previous_month"
:
i
[
12
],
"amount_act_vs_mb"
:
i
[
13
],
"percent_act_vs_mb"
:
i
[
14
],
"amount_act_vs_rb"
:
i
[
15
],
"percent_act_vs_rb"
:
i
[
16
],
"mtd_vs_previous_month"
:
i
[
17
],
"mtd_vs_mb"
:
i
[
18
],
"mtd_vs_rb"
:
i
[
19
]
})
})
// console.log(JSON.stringify(data))
let
payload
=
{
"monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"status"
:
"submitted"
,
"months"
:
this
.
props
.
month
.
month_id
,
"balance_sheet"
:
data
}
api
.
create
().
validateSubmitReportMR
(
payload
).
then
((
response
)
=>
{
// console.log(response)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
data
.
result
)
{
this
.
setState
({
loading
:
false
,
buttonError
:
false
,
editable
:
false
,
saveDraft
:
false
})
}
else
{
this
.
setState
({
loading
:
false
,
buttonError
:
true
,
editable
:
true
,
saveDraft
:
false
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
}
})
}
render
()
{
let
dataTable2
=
this
.
state
.
dataTable
const
handleChange
=
(
value
,
tableMeta
,
type
)
=>
{
...
...
@@ -1811,8 +1868,7 @@ export default class BalanceSheetMR extends Component {
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
loading
:
false
})
// this.handleValidate()
this
.
handleValidate
()
},
100
);
})
}}
...
...
@@ -1846,7 +1902,7 @@ export default class BalanceSheetMR extends Component {
<
/button
>
<
button
type
=
"button"
//
disabled={this.state.buttonError}
disabled
=
{
this
.
state
.
buttonError
}
onClick
=
{()
=>
this
.
state
.
buttonError
?
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
...
...
@@ -1928,8 +1984,7 @@ export default class BalanceSheetMR extends Component {
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
loading
:
false
})
// this.handleValidate()
this
.
handleValidate
()
},
100
);
})
}}
...
...
@@ -1963,7 +2018,7 @@ export default class BalanceSheetMR extends Component {
<
/button
>
<
button
type
=
"button"
//
disabled={this.state.buttonError}
disabled
=
{
this
.
state
.
buttonError
}
onClick
=
{()
=>
this
.
state
.
buttonError
?
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
...
...
src/container/MonthlyReport/ListOfCreditFacilities.js
View file @
0dd4add5
This diff is collapsed.
Click to expand it.
src/container/MonthlyReport/OperatingIndicatorMR.js
View file @
0dd4add5
...
...
@@ -74,6 +74,7 @@ export default class OperatingIndicatorMR extends Component {
// this.getItemHierarki()
this
.
getSettingControl
()
this
.
getLatestUpdate
()
console
.
log
(
this
.
props
.
permission
.
create
);
}
getSettingControl
()
{
...
...
@@ -852,7 +853,7 @@ export default class OperatingIndicatorMR extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
false
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
value
=
{
Number
(
tableMeta
.
rowData
[
10
]).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1119,7 +1120,7 @@ export default class OperatingIndicatorMR extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
false
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
value
=
{
Number
(
tableMeta
.
rowData
[
15
]).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1175,7 +1176,7 @@ export default class OperatingIndicatorMR extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
false
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
value
=
{
Number
(
tableMeta
.
rowData
[
16
]).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1573,7 +1574,7 @@ export default class OperatingIndicatorMR extends Component {
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
}}
onUpload
=
{()
=>
{
this
.
state
.
judul
===
"MONTHLY REPORT - MONTHLY REPORT"
?
String
(
this
.
state
.
judul
).
includes
(
"MONTHLY"
)
&&
String
(
this
.
state
.
judul
).
includes
(
"REPORT"
)
&&
String
(
this
.
state
.
judul
).
includes
(
"OPERATING"
)
&&
String
(
this
.
state
.
judul
).
includes
(
"INDICATOR"
)
?
this
.
checkUpload
()
:
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
}}
...
...
src/container/MonthlyReport/ProfitLossMR.js
View file @
0dd4add5
This diff is collapsed.
Click to expand it.
src/container/OprIndicator/OperatingIndicator.js
View file @
0dd4add5
...
...
@@ -62,7 +62,7 @@ export default class OperatingIndicator extends Component {
menu
:
"operating indicator"
}
api
.
create
().
getPermission
(
payload
).
then
(
response
=>
{
//
console.log(response)
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
...
...
@@ -321,7 +321,7 @@ export default class OperatingIndicator extends Component {
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
)
)
})
}
else
{
this
.
setState
({
...
...
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