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
4cc07854
Commit
4cc07854
authored
Nov 26, 2020
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'riri' into 'master'
on upload See merge request
!701
parents
59120c2e
71684786
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
53 deletions
+57
-53
index.js
src/api/index.js
+2
-0
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+52
-50
BalanceSheetOLPA.js
src/container/OutlookPA/BalanceSheetOLPA.js
+1
-1
ProfitLossOLPA.js
src/container/OutlookPA/ProfitLossOLPA.js
+1
-1
TaxPlanningOLPA.js
src/container/OutlookPA/TaxPlanningOLPA.js
+1
-1
No files found.
src/api/index.js
View file @
4cc07854
...
@@ -276,6 +276,7 @@ const create = (type = "") => {
...
@@ -276,6 +276,7 @@ const create = (type = "") => {
// MonthlyPL
// MonthlyPL
const
getHierarkiMontlyReportPL
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_pl/get_report_hierarki'
,
body
)
const
getHierarkiMontlyReportPL
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_pl/get_report_hierarki'
,
body
)
const
createMonthlyReportPL
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_pl/create_monthly_report'
,
body
)
const
createMonthlyReportPL
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_pl/create_monthly_report'
,
body
)
const
checkUploadMonthlyReportPL
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_pl/check_import'
,
body
)
//Template
//Template
const
downloadTemplate
=
(
fileName
,
fileType
)
=>
api
.
get
(
`attachment/download_file?fileName=
${
fileName
}
&&fileType=
${
fileType
}
`
)
const
downloadTemplate
=
(
fileName
,
fileType
)
=>
api
.
get
(
`attachment/download_file?fileName=
${
fileName
}
&&fileType=
${
fileType
}
`
)
...
@@ -412,6 +413,7 @@ const create = (type = "") => {
...
@@ -412,6 +413,7 @@ const create = (type = "") => {
createMonthlyReportPL
,
createMonthlyReportPL
,
createMonthlyReportFAM
,
createMonthlyReportFAM
,
createMonthlyReportOI
,
createMonthlyReportOI
,
checkUploadMonthlyReportPL
,
getSubmission
,
getSubmission
,
checkUploadMB
,
checkUploadMB
,
getAllOperatingInd
,
getAllOperatingInd
,
...
...
src/container/MonthlyReport/ProfitLossMR.js
View file @
4cc07854
...
@@ -72,6 +72,7 @@ export default class ProfitLossMR extends Component {
...
@@ -72,6 +72,7 @@ export default class ProfitLossMR extends Component {
"monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"months"
:
this
.
props
.
month
.
month_id
"months"
:
this
.
props
.
month
.
month_id
}
}
api
.
create
().
getHierarkiMontlyReportPL
(
payload
).
then
(
response
=>
{
api
.
create
().
getHierarkiMontlyReportPL
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
console
.
log
(
response
);
let
dataTable
=
[]
let
dataTable
=
[]
...
@@ -238,6 +239,7 @@ export default class ProfitLossMR extends Component {
...
@@ -238,6 +239,7 @@ export default class ProfitLossMR extends Component {
}
}
fileHandler
=
(
event
)
=>
{
fileHandler
=
(
event
)
=>
{
console
.
log
(
event
);
let
fileObj
=
event
let
fileObj
=
event
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
console
.
log
(
resp
)
console
.
log
(
resp
)
...
@@ -252,12 +254,13 @@ export default class ProfitLossMR extends Component {
...
@@ -252,12 +254,13 @@ export default class ProfitLossMR extends Component {
isi
.
map
((
i
,
index
)
=>
{
isi
.
map
((
i
,
index
)
=>
{
if
(
i
.
length
>
0
)
{
if
(
i
.
length
>
0
)
{
payload
.
push
({
payload
.
push
({
item_report_id
:
i
[
0
]
===
undefined
?
""
:
String
(
i
[
0
]).
trim
(),
orders
:
i
[
0
]
===
undefined
?
""
:
String
(
i
[
0
]).
trim
(),
item_report
:
i
[
1
]
===
undefined
?
""
:
String
(
i
[
1
]).
trim
(),
item_report_id
:
i
[
1
]
===
undefined
?
""
:
String
(
i
[
1
]).
trim
(),
notes
:
i
[
2
]
===
undefined
?
""
:
String
(
i
[
2
]).
trim
(),
item_report
:
i
[
2
]
===
undefined
?
""
:
String
(
i
[
2
]).
trim
(),
actual
:
i
[
6
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
6
]))
===
false
?
"0"
:
String
(
i
[
6
]).
trim
(),
notes
:
i
[
3
]
===
undefined
?
""
:
String
(
i
[
3
]).
trim
(),
mtd_vs_mb
:
i
[
16
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
16
]))
===
false
?
"0"
:
String
(
i
[
16
]).
trim
(),
actual
:
i
[
4
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
4
]))
===
false
?
"0"
:
String
(
i
[
4
]).
trim
(),
mtd_vs_rb
:
i
[
17
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
17
]))
===
false
?
"0"
:
String
(
i
[
17
]).
trim
(),
mtd_vs_mb
:
i
[
5
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
5
]))
===
false
?
"0"
:
String
(
i
[
5
]).
trim
(),
mtd_vs_rb
:
i
[
6
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
6
]))
===
false
?
"0"
:
String
(
i
[
6
]).
trim
(),
})
})
}
}
})
})
...
@@ -265,6 +268,7 @@ export default class ProfitLossMR extends Component {
...
@@ -265,6 +268,7 @@ export default class ProfitLossMR extends Component {
company_id
:
this
.
props
.
company
.
company_id
,
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
report_id
:
this
.
props
.
report_id
,
months
:
this
.
props
.
month
.
month_id
,
profit_loss
:
payload
profit_loss
:
payload
}
}
console
.
log
(
body
)
console
.
log
(
body
)
...
@@ -274,52 +278,50 @@ export default class ProfitLossMR extends Component {
...
@@ -274,52 +278,50 @@ export default class ProfitLossMR extends Component {
}
}
checkUpload
()
{
checkUpload
()
{
api
.
create
().
checkUploadM
B
(
this
.
state
.
payload
).
then
(
response
=>
{
api
.
create
().
checkUploadM
onthlyReportPL
(
this
.
state
.
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
// console.log(JSON.stringify(this.state.payload));
console
.
log
(
response
)
console
.
log
(
response
)
if
(
response
.
data
)
{
// if (response.data) {
if
(
response
.
data
.
status
===
'success'
)
{
// if (response.data.status === 'success') {
this
.
setState
({
visibleUpload
:
false
,
visibleProfitLoss
:
false
,
loading
:
true
})
// this.setState({ visibleUpload: false, visibleProfitLoss: false, loading: true })
let
dataTable
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
// let dataTable = response.data.data.map((item, index) => {
return
[
// return [
item
.
type_report_id
,
// item.item_report_id,
item
.
item_report_id
,
// item.type_report_id,
item
.
parent
,
// item.item_report,
item
.
formula
,
// item.parent,
item
.
level
,
// item.formula,
item
.
item_report
,
// item.level,
item
.
notes
,
// item.notes,
item
.
total_actual_before
,
// item.rolling_outlook,
item
.
january
,
// item.master_budget,
item
.
february
,
// item.rolling_budget,
item
.
march
,
// item.actual,
item
.
april
,
// item.ytd_actual,
item
.
may
,
// item.actual_previous_month,
item
.
june
,
// item.amount_act_vs_previous_month,
item
.
july
,
// item.percent_act_vs_previous_month,
item
.
august
,
// item.amount_act_vs_mb,
item
.
september
,
// item.percent_act_vs_mb,
item
.
october
,
// item.amount_act_vs_rb,
item
.
november
,
// item.percent_act_vs_rb,
item
.
december
,
// item.mtd_vs_previous_month,
item
.
total_current_year
,
// item.mtd_vs_mb,
item
.
total_next_year
,
// item.mtd_vs_rb,
item
.
total_more_year
,
// item.orders
item
.
orders
,
// ]
item
.
error
// })
]
// this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => {
})
// this.state.dataTable.map(item => {
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
},
()
=>
{
// if (item[24].length > 0) {
this
.
state
.
dataTable
.
map
(
item
=>
{
// // console.log('masuk')
if
(
item
[
24
].
length
>
0
)
{
// this.setState({ buttonError: true, errorPreview: true, editable: true })
// console.log('masuk')
// }
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
})
// })
}
// // console.log(this.state.buttonError)
})
// })
// console.log(this.state.buttonError)
// }
})
// }
}
}
})
})
}
}
...
...
src/container/OutlookPA/BalanceSheetOLPA.js
View file @
4cc07854
...
@@ -3844,7 +3844,7 @@ export default class BalanceSheetOLPA extends Component {
...
@@ -3844,7 +3844,7 @@ export default class BalanceSheetOLPA extends Component {
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
}}
}}
onUpload
=
{()
=>
{
onUpload
=
{()
=>
{
this
.
state
.
judul
===
"OUTLOOK PA - BALANCE SHEET"
?
String
(
this
.
state
.
judul
).
includes
(
"OUTLOOK PA - BALANCE SHEET"
)
?
this
.
checkUpload
()
:
this
.
checkUpload
()
:
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
}}
}}
...
...
src/container/OutlookPA/ProfitLossOLPA.js
View file @
4cc07854
...
@@ -2951,7 +2951,7 @@ export default class ProfitLossOLPA extends Component {
...
@@ -2951,7 +2951,7 @@ export default class ProfitLossOLPA extends Component {
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
}}
}}
onUpload
=
{()
=>
{
onUpload
=
{()
=>
{
this
.
state
.
judul
===
"OUTLOOK PA - PROFIT LOSS"
?
String
(
this
.
state
.
judul
).
includes
(
"OUTLOOK PA - PROFIT LOSS"
)
?
this
.
checkUpload
()
:
this
.
checkUpload
()
:
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
}}
}}
...
...
src/container/OutlookPA/TaxPlanningOLPA.js
View file @
4cc07854
...
@@ -3898,7 +3898,7 @@ export default class TaxPlanningOLPA extends Component {
...
@@ -3898,7 +3898,7 @@ export default class TaxPlanningOLPA extends Component {
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
}}
}}
onUpload
=
{()
=>
{
onUpload
=
{()
=>
{
this
.
state
.
judul
===
"OUTLOOK PA - TAX PLANNING"
?
String
(
this
.
state
.
judul
).
includes
(
"OUTLOOK PA - TAX PLANNING"
)
?
this
.
checkUpload
()
:
this
.
checkUpload
()
:
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
}}
}}
...
...
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