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
4c00357c
Commit
4c00357c
authored
Jun 07, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev/riri' into 'ENV-DEV'
Fixing Alert Rate Currency MB See merge request
!1822
parents
5ca5dfd2
8d8eba06
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
295 additions
and
162 deletions
+295
-162
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+13
-9
BudgetTahunan.js
src/container/BudgetTahunan/BudgetTahunan.js
+31
-9
CashFlow.js
src/container/BudgetTahunan/CashFlow.js
+1
-1
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+10
-5
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+2
-2
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+13
-9
TaxPlanning.js
src/container/BudgetTahunan/TaxPlanning.js
+119
-106
ReportItems.js
src/container/MasterData/ReportItems/ReportItems.js
+1
-1
ProfitLossOLPA.js
src/container/OutlookPA/ProfitLossOLPA.js
+1
-0
ProfitLossRO.js
src/container/RollingOutlook/ProfitLossRO.js
+68
-20
RollingOutlook.js
src/container/RollingOutlook/RollingOutlook.js
+36
-0
No files found.
src/container/BudgetTahunan/BalanceSheet.js
View file @
4c00357c
...
@@ -288,7 +288,7 @@ export default class BalanceSheet extends Component {
...
@@ -288,7 +288,7 @@ export default class BalanceSheet extends Component {
}
else
{
}
else
{
this
.
props
.
saveToMasterBudget
(
payload
)
this
.
props
.
saveToMasterBudget
(
payload
)
}
}
this
.
props
.
onClickClose
()
//
this.props.onClickClose()
}
}
downloadTemplate
=
async
()
=>
{
downloadTemplate
=
async
()
=>
{
...
@@ -493,14 +493,18 @@ export default class BalanceSheet extends Component {
...
@@ -493,14 +493,18 @@ export default class BalanceSheet extends Component {
this
.
props
.
getReport
()
this
.
props
.
getReport
()
}
}
}
else
{
}
else
{
this
.
setState
({
visibleAlertSave
:
true
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
==
"Please Set Up Rate Currency First"
)
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
this
.
setState
({
visibleAlertSave
:
true
})
setTimeout
(()
=>
{
}
else
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
window
.
location
.
reload
();
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
},
1000
);
setTimeout
(()
=>
{
}
localStorage
.
removeItem
(
Constant
.
TOKEN
)
})
window
.
location
.
reload
();
},
1000
);
}
})
}
}
}
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
'Error saving data. Please try again'
,
tipeAlert
:
'error'
,
loading
:
false
})
this
.
setState
({
alert
:
true
,
messageAlert
:
'Error saving data. Please try again'
,
tipeAlert
:
'error'
,
loading
:
false
})
...
...
src/container/BudgetTahunan/BudgetTahunan.js
View file @
4c00357c
...
@@ -20,7 +20,7 @@ import CashFlow from './CashFlow';
...
@@ -20,7 +20,7 @@ import CashFlow from './CashFlow';
import
{
DatePicker
}
from
'@material-ui/pickers'
;
import
{
DatePicker
}
from
'@material-ui/pickers'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
*
as
R
from
'ramda'
import
*
as
R
from
'ramda'
import
{
PhotoSizeSelectLargeTwoTone
,
ThreeSixty
}
from
'@material-ui/icons'
;
import
{
PhotoSizeSelectLargeTwoTone
,
ThreeSixty
,
TripOriginSharp
}
from
'@material-ui/icons'
;
import
{
startTransition
}
from
'react'
;
import
{
startTransition
}
from
'react'
;
var
ct
=
require
(
"../../library/CustomTable"
);
var
ct
=
require
(
"../../library/CustomTable"
);
...
@@ -1298,13 +1298,18 @@ export default class BudgetTahunan extends Component {
...
@@ -1298,13 +1298,18 @@ export default class BudgetTahunan extends Component {
createCashFlow
(
payload
)
{
createCashFlow
(
payload
)
{
api
.
create
().
createReportCF
(
payload
).
then
((
res
)
=>
{
api
.
create
().
createReportCF
(
payload
).
then
((
res
)
=>
{
//
console.log(res)
console
.
log
(
res
)
// this.getSubmission()
// this.getSubmission()
if
(
res
.
data
)
{
if
(
res
.
data
)
{
if
(
res
.
data
.
status
===
"success"
)
{
if
(
res
.
data
.
status
===
"success"
)
{
this
.
setState
({
visibleCF
:
false
,
visibleBudgetTahunan
:
true
})
this
.
getSubmission
()
this
.
getSubmission
()
}
else
{
}
else
{
this
.
setState
({
visibleAlertSave
:
true
})
if
(
res
.
data
.
message
==
"Please Set Up Rate Currency First"
)
{
this
.
setState
({
visibleAlertSave
:
true
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
res
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
})
}
}
}
}
}
// if (response.data) {
// if (response.data) {
...
@@ -2319,19 +2324,36 @@ export default class BudgetTahunan extends Component {
...
@@ -2319,19 +2324,36 @@ export default class BudgetTahunan extends Component {
this
.
setState
({
loading
:
true
},
()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
document
.
body
.
style
.
overflow
=
'hidden'
;
document
.
body
.
style
.
overflow
=
'hidden'
;
})
})
console
.
log
(
data
);
console
.
log
(
type
);
// // console.log(JSON.stringify(data));
// // console.log(JSON.stringify(data));
api
.
create
(
'UPLOAD'
).
createSubmitReport
(
data
).
then
(
response
=>
{
api
.
create
(
'UPLOAD'
).
createSubmitReport
(
data
).
then
(
response
=>
{
console
.
log
(
response
);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
type
===
"PL"
||
"DraftPL"
)
{
this
.
setState
({
visiblePL
:
false
,
visibleBudgetTahunan
:
true
})
}
else
if
(
type
===
"TP"
)
{
this
.
setState
({
visibleTP
:
false
,
visibleBudgetTahunan
:
true
})
}
else
if
(
type
===
"BS"
)
{
this
.
setState
({
visibleBS
:
false
,
visibleBudgetTahunan
:
true
})
}
else
if
(
type
===
"FAM"
)
{
this
.
setState
({
visibleFAM
:
false
,
visibleBudgetTahunan
:
true
})
}
else
if
(
type
===
"CAT"
)
{
this
.
setState
({
visibleFAM
:
false
,
visibleBudgetTahunan
:
true
})
}
else
{
this
.
setState
({
visibleBudgetTahunan
:
true
,
loading
:
false
})
}
this
.
getSubmission
(
type
)
this
.
getSubmission
(
type
)
}
else
{
}
else
{
this
.
setState
({
visibleAlertSave
:
true
})
console
.
log
(
response
.
data
);
// this.setState({ loading: false }, () => {
if
(
response
.
data
.
message
==
"Please Set Up Rate Currency First"
)
{
this
.
getSubmission
()
this
.
setState
({
visibleAlertSave
:
true
})
document
.
body
.
style
.
overflow
=
'unset'
;
}
else
{
// this.setState({ loading: false }, () => {
this
.
getSubmission
()
document
.
body
.
style
.
overflow
=
'unset'
;
}
// })
// })
}
}
}
else
{
}
else
{
...
@@ -3772,7 +3794,7 @@ export default class BudgetTahunan extends Component {
...
@@ -3772,7 +3794,7 @@ export default class BudgetTahunan extends Component {
marginRight
:
20
,
marginRight
:
20
,
borderRadius
:
9
borderRadius
:
9
}}
}}
onClick
=
{()
=>
this
.
setState
({
visibleAlertSave
:
false
})}
onClick
=
{()
=>
this
.
setState
({
visibleAlertSave
:
false
,
loading
:
false
})}
>
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
30
,
borderRadius
:
9
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #3549609e'
}}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
30
,
borderRadius
:
9
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #3549609e'
}}
>
<
Typography
style
=
{{
fontSize
:
'15px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Close
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'15px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Close
<
/Typography
>
...
...
src/container/BudgetTahunan/CashFlow.js
View file @
4c00357c
...
@@ -389,7 +389,7 @@ export default class CashFlow extends Component {
...
@@ -389,7 +389,7 @@ export default class CashFlow extends Component {
console
.
log
(
dbcf
)
console
.
log
(
dbcf
)
console
.
log
(
JSON
.
stringify
(
payload
))
console
.
log
(
JSON
.
stringify
(
payload
))
this
.
props
.
createCashFlow
(
payload
)
this
.
props
.
createCashFlow
(
payload
)
this
.
props
.
onClickClose
()
//
this.props.onClickClose()
}
}
render
()
{
render
()
{
...
...
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
4c00357c
...
@@ -665,7 +665,7 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -665,7 +665,7 @@ export default class CorporateAnnualTarget extends Component {
this
.
props
.
onClickClose
()
this
.
props
.
onClickClose
()
this
.
props
.
getReport
()
this
.
props
.
getReport
()
}
else
{
}
else
{
this
.
setState
({
visibleAlertSave
:
true
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
localStorage
.
removeItem
(
Constant
.
TOKEN
)
...
@@ -886,10 +886,10 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -886,10 +886,10 @@ export default class CorporateAnnualTarget extends Component {
"cat"
:
data
"cat"
:
data
}
}
console
.
log
(
JSON
.
stringify
(
payload
));
console
.
log
(
JSON
.
stringify
(
payload
));
this
.
deleteReport
(
payload
)
this
.
deleteReport
(
payload
,
type
)
}
}
deleteReport
(
payloadBro
)
{
deleteReport
(
payloadBro
,
type
)
{
let
payload
=
{
"item_report_id"
:
this
.
state
.
dataDelete
}
let
payload
=
{
"item_report_id"
:
this
.
state
.
dataDelete
}
if
(
this
.
state
.
dataDelete
.
length
>
0
)
{
if
(
this
.
state
.
dataDelete
.
length
>
0
)
{
...
@@ -899,8 +899,13 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -899,8 +899,13 @@ export default class CorporateAnnualTarget extends Component {
// api.create().validateSubmitReport(payloadBro).then((response) => {
// api.create().validateSubmitReport(payloadBro).then((response) => {
// // // // // console.log(response)
// // // // // console.log(response)
// if (response.data.data.result) {
// if (response.data.data.result) {
this
.
props
.
saveToMasterBudget
(
payloadBro
)
if
(
type
==
'submitted'
)
{
this
.
props
.
onClickClose
()
this
.
props
.
saveToMasterBudget
(
payloadBro
,
'CAT'
)
}
else
{
this
.
props
.
saveToMasterBudget
(
payloadBro
)
}
// this.props.saveToMasterBudget(payloadBro)
// this.props.onClickClose()
// } else {
// } else {
// }
// }
...
...
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
4c00357c
...
@@ -271,7 +271,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -271,7 +271,7 @@ export default class FixedAssetsMovement extends Component {
}
else
{
}
else
{
this
.
props
.
saveToMasterBudget
(
payload
)
this
.
props
.
saveToMasterBudget
(
payload
)
}
}
this
.
props
.
onClickClose
()
//
this.props.onClickClose()
}
}
downloadTemplate
=
async
()
=>
{
downloadTemplate
=
async
()
=>
{
...
@@ -454,7 +454,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -454,7 +454,7 @@ export default class FixedAssetsMovement extends Component {
this
.
props
.
getReport
()
this
.
props
.
getReport
()
}
}
}
else
{
}
else
{
this
.
setState
({
visibleAlertSave
:
true
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
localStorage
.
removeItem
(
Constant
.
TOKEN
)
...
...
src/container/BudgetTahunan/ProfitLoss.js
View file @
4c00357c
...
@@ -291,7 +291,7 @@ export default class ProfitLoss extends Component {
...
@@ -291,7 +291,7 @@ export default class ProfitLoss extends Component {
}
else
{
}
else
{
this
.
props
.
saveToMasterBudget
(
payload
)
this
.
props
.
saveToMasterBudget
(
payload
)
}
}
this
.
props
.
onClickClose
()
//
this.props.onClickClose()
}
}
downloadTemplate
=
async
()
=>
{
downloadTemplate
=
async
()
=>
{
...
@@ -470,14 +470,18 @@ export default class ProfitLoss extends Component {
...
@@ -470,14 +470,18 @@ export default class ProfitLoss extends Component {
this
.
props
.
getReport
()
this
.
props
.
getReport
()
}
}
}
else
{
}
else
{
this
.
setState
({
visibleAlertSave
:
true
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
==
"Please Set Up Rate Currency First"
)
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
this
.
setState
({
visibleAlertSave
:
true
})
setTimeout
(()
=>
{
}
else
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
window
.
location
.
reload
();
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
},
1000
);
setTimeout
(()
=>
{
}
localStorage
.
removeItem
(
Constant
.
TOKEN
)
})
window
.
location
.
reload
();
},
1000
);
}
})
}
// alert(response.data.status)
// alert(response.data.status)
}
}
}
else
{
}
else
{
...
...
src/container/BudgetTahunan/TaxPlanning.js
View file @
4c00357c
This diff is collapsed.
Click to expand it.
src/container/MasterData/ReportItems/ReportItems.js
View file @
4c00357c
...
@@ -97,7 +97,7 @@ export default class ReportItems extends Component {
...
@@ -97,7 +97,7 @@ export default class ReportItems extends Component {
formula_ytd
:
item
[
13
]
===
undefined
?
""
:
item
[
13
],
formula_ytd
:
item
[
13
]
===
undefined
?
""
:
item
[
13
],
start_date
:
item
[
14
]
===
undefined
?
""
:
item
[
14
],
start_date
:
item
[
14
]
===
undefined
?
""
:
item
[
14
],
end_date
:
item
[
15
]
===
undefined
?
""
:
item
[
15
],
end_date
:
item
[
15
]
===
undefined
?
""
:
item
[
15
],
is_can_convert_value
:
item
[
16
]
===
undefined
?
""
:
item
[
16
]
===
"Yes"
||
item
[
16
]
===
"yes"
?
1
:
0
,
is_can_convert_value
:
item
[
16
]
===
undefined
?
""
:
item
[
16
]
===
"Yes"
||
item
[
16
]
===
"yes"
||
item
[
16
]
===
"YES"
?
1
:
0
,
})
})
}
}
})
})
...
...
src/container/OutlookPA/ProfitLossOLPA.js
View file @
4c00357c
...
@@ -127,6 +127,7 @@ export default class ProfitLossOLPA extends Component {
...
@@ -127,6 +127,7 @@ export default class ProfitLossOLPA extends Component {
"get_for"
:
this
.
state
.
get_for
,
"get_for"
:
this
.
state
.
get_for
,
"periode"
:
this
.
props
.
periode
,
"periode"
:
this
.
props
.
periode
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"outlook_pa_id"
:
this
.
props
.
outlook_pa_id
"outlook_pa_id"
:
this
.
props
.
outlook_pa_id
}
}
api
.
create
().
getLastestUpdateOLPA
(
payload
).
then
(
response
=>
{
api
.
create
().
getLastestUpdateOLPA
(
payload
).
then
(
response
=>
{
...
...
src/container/RollingOutlook/ProfitLossRO.js
View file @
4c00357c
...
@@ -85,7 +85,9 @@ export default class ProfitLossROO extends Component {
...
@@ -85,7 +85,9 @@ export default class ProfitLossROO extends Component {
saveDraft
:
true
,
saveDraft
:
true
,
buttonError
:
true
,
buttonError
:
true
,
viewOnly
:
true
,
viewOnly
:
true
,
get_for
:
'view'
get_for
:
'view'
,
defaultCurrencyUpload
:
this
.
props
.
defaultCurrency
,
visibleAlertSave
:
false
}
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
@@ -216,7 +218,8 @@ export default class ProfitLossROO extends Component {
...
@@ -216,7 +218,8 @@ export default class ProfitLossROO extends Component {
"periode"
:
this
.
props
.
periode
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"report_id"
:
this
.
props
.
report_id
,
"revision"
:
Number
(
this
.
props
.
revision
),
"revision"
:
Number
(
this
.
props
.
revision
),
"rolling_outlook_id"
:
this
.
props
.
rollingOutlookID
"rolling_outlook_id"
:
this
.
props
.
rollingOutlookID
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
}
}
console
.
log
(
"getItemHierarki payload"
,
payload
);
console
.
log
(
"getItemHierarki payload"
,
payload
);
api
.
create
().
getRollingOutlookPL
(
payload
).
then
(
response
=>
{
api
.
create
().
getRollingOutlookPL
(
payload
).
then
(
response
=>
{
...
@@ -388,6 +391,7 @@ export default class ProfitLossROO extends Component {
...
@@ -388,6 +391,7 @@ export default class ProfitLossROO 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
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"quartal"
:
this
.
props
.
quarter
,
"quartal"
:
this
.
props
.
quarter
,
"status"
:
type
,
"status"
:
type
,
"profit_loss"
:
data
"profit_loss"
:
data
...
@@ -405,7 +409,7 @@ export default class ProfitLossROO extends Component {
...
@@ -405,7 +409,7 @@ export default class ProfitLossROO extends Component {
}
}
this
.
props
.
onClickClose
()
this
.
props
.
onClickClose
()
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
this
.
setState
({
visibleAlertSave
:
true
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
document
.
body
.
style
.
overflow
=
'unset'
;
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -474,7 +478,11 @@ export default class ProfitLossROO extends Component {
...
@@ -474,7 +478,11 @@ export default class ProfitLossROO extends Component {
}
}
checkUpload
()
{
checkUpload
()
{
api
.
create
().
checkImportRollingOutlookPL
(
this
.
state
.
payload
).
then
(
response
=>
{
let
payload
=
{
...
this
.
state
.
payload
,
currency_id
:
this
.
state
.
defaultCurrencyUpload
?.
id
}
api
.
create
().
checkImportRollingOutlookPL
(
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
// console.log(JSON.stringify(this.state.payload));
console
.
log
(
"checkUpload Response"
,
response
)
console
.
log
(
"checkUpload Response"
,
response
)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
...
@@ -560,6 +568,7 @@ export default class ProfitLossROO extends Component {
...
@@ -560,6 +568,7 @@ export default class ProfitLossROO 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
,
currency_id
:
this
.
state
.
defaultCurrencyUpload
?.
id
,
"quartal"
:
this
.
props
.
quarter
,
"quartal"
:
this
.
props
.
quarter
,
"rolling_outlook_id"
:
this
.
props
.
rollingOutlookID
,
"rolling_outlook_id"
:
this
.
props
.
rollingOutlookID
,
"status"
:
type
,
"status"
:
type
,
...
@@ -580,7 +589,7 @@ export default class ProfitLossROO extends Component {
...
@@ -580,7 +589,7 @@ export default class ProfitLossROO extends Component {
// this.props.onClickClose()
// this.props.onClickClose()
// this.props.getReport()
// this.props.getReport()
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
this
.
setState
({
visibleAlertSave
:
true
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
localStorage
.
removeItem
(
Constant
.
TOKEN
)
...
@@ -2677,21 +2686,60 @@ export default class ProfitLossROO extends Component {
...
@@ -2677,21 +2686,60 @@ export default class ProfitLossROO extends Component {
<
/button
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
UploadFile
<
div
style
=
{{
padding
:
'25px 30px'
}}
>
type
=
{
this
.
state
.
uploadStatus
}
<
UploadFile
percentage
=
{
this
.
state
.
percentage
}
type
=
{
this
.
state
.
uploadStatus
}
result
=
{
this
.
state
.
result
}
percentage
=
{
this
.
state
.
percentage
}
acceptedFiles
=
{[
"xlsx"
]}
result
=
{
this
.
state
.
result
}
onHandle
=
{(
dt
)
=>
{
acceptedFiles
=
{[
"xlsx"
]}
this
.
fileHandler
(
dt
)
onHandle
=
{(
dt
)
=>
{
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
this
.
fileHandler
(
dt
)
}}
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
onUpload
=
{()
=>
{
}}
String
(
this
.
state
.
judulColumn
).
includes
(
"TEMPLATE"
)
&&
String
(
this
.
state
.
judulColumn
).
includes
(
"UPLOAD"
)
&&
String
(
this
.
state
.
judul
).
includes
(
"ROLLING"
)
&&
String
(
this
.
state
.
judul
).
includes
(
"OUTLOOK"
)
&&
String
(
this
.
state
.
judul
).
includes
(
"PROFIT"
)
&&
String
(
this
.
state
.
judul
).
includes
(
"LOSS"
)
?
onUpload
=
{()
=>
{
this
.
checkUpload
()
:
String
(
this
.
state
.
judulColumn
).
includes
(
"TEMPLATE"
)
&&
String
(
this
.
state
.
judulColumn
).
includes
(
"UPLOAD"
)
&&
String
(
this
.
state
.
judul
).
includes
(
"ROLLING"
)
&&
String
(
this
.
state
.
judul
).
includes
(
"OUTLOOK"
)
&&
String
(
this
.
state
.
judul
).
includes
(
"PROFIT"
)
&&
String
(
this
.
state
.
judul
).
includes
(
"LOSS"
)
?
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
this
.
checkUpload
()
:
}}
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
/
>
}}
/
>
<
/div
>
<
div
style
=
{{
padding
:
'0px 30px 29px'
,
fontSize
:
17
,
color
:
'red'
}}
><
b
>
Warning
:
<
/b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1
?
"IDR" : "USD"}</
b
><
/div
>
<
/div
>
<
/div
>
)}
{
this
.
state
.
visibleAlertSave
&&
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content border-radius"
style
=
{{
background
:
'#FFF27D'
,
borderRadius
:
10
,
width
:
715
,
height
:
238
}}
>
<
div
style
=
{{
margin
:
30
}}
>
<
div
style
=
{{
display
:
'flex'
,
marginTop
:
76
,
marginBottom
:
43
}}
>
<
div
style
=
{{
alignSelf
:
'center'
,
marginRight
:
25
}}
>
<
img
src
=
{
Images
.
warning
}
/
>
<
/div
>
<
div
style
=
{{
justifyContent
:
'center'
,
fontSize
:
20
,
color
:
'#1D2995'
,
marginTop
:
10
}}
>
<
b
>
Rate
Currency
USD
<
/b> pada periode yang dipilih <b>belum</
b
>
diatur
.
<
br
/>
Silahkan
menghubungi
Superadmin
<
/div
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
}}
>
<
button
className
=
"button"
type
=
"button"
style
=
{{
background
:
'#F6F7F9'
,
cursor
:
'pointer'
,
border
:
'1px solid #3549609e'
,
outline
:
'none'
,
marginRight
:
20
,
borderRadius
:
9
}}
onClick
=
{()
=>
this
.
setState
({
visibleAlertSave
:
false
})}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
30
,
borderRadius
:
9
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #3549609e'
}}
>
<
Typography
style
=
{{
fontSize
:
'15px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Close
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)}
)}
...
...
src/container/RollingOutlook/RollingOutlook.js
View file @
4c00357c
...
@@ -2721,6 +2721,42 @@ export default class RollingOutlook extends Component {
...
@@ -2721,6 +2721,42 @@ export default class RollingOutlook extends Component {
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)}
)}
{
this
.
state
.
visibleAlertSave
&&
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content border-radius"
style
=
{{
background
:
'#FFF27D'
,
borderRadius
:
10
,
width
:
715
,
height
:
238
}}
>
<
div
style
=
{{
margin
:
30
}}
>
<
div
style
=
{{
display
:
'flex'
,
marginTop
:
76
,
marginBottom
:
43
}}
>
<
div
style
=
{{
alignSelf
:
'center'
,
marginRight
:
25
}}
>
<
img
src
=
{
Images
.
warning
}
/
>
<
/div
>
<
div
style
=
{{
justifyContent
:
'center'
,
fontSize
:
20
,
color
:
'#1D2995'
,
marginTop
:
10
}}
>
<
b
>
Rate
Currency
USD
<
/b> pada periode yang dipilih <b>belum</
b
>
diatur
.
<
br
/>
Silahkan
menghubungi
Superadmin
<
/div
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
}}
>
<
button
className
=
"button"
type
=
"button"
style
=
{{
background
:
'#F6F7F9'
,
cursor
:
'pointer'
,
border
:
'1px solid #3549609e'
,
outline
:
'none'
,
marginRight
:
20
,
borderRadius
:
9
}}
onClick
=
{()
=>
this
.
setState
({
visibleAlertSave
:
false
})}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
30
,
borderRadius
:
9
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #3549609e'
}}
>
<
Typography
style
=
{{
fontSize
:
'15px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Close
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)}
<
/div
>
<
/div
>
);
);
}
}
...
...
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