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
af8b2c11
Commit
af8b2c11
authored
Jan 26, 2021
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
d6caf99e
e985683f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
29 deletions
+29
-29
.env_prod
.env_prod
+1
-1
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+28
-28
No files found.
.env_prod
View file @
af8b2c11
// contents of .env
REACT_APP_URL_MAIN_BE=https://dashboard.triputra-group.com/tia-reporting
REACT_APP_URL_MAIN_FE=/tia-web
\ No newline at end of file
REACT_APP_URL_MAIN_FE=/web
\ No newline at end of file
src/container/MonthlyReport/ProfitLossMR.js
View file @
af8b2c11
...
...
@@ -248,7 +248,7 @@ export default class ProfitLossMR extends Component {
item
.
formula
,
item
.
level
,
item
.
description
,
item
.
profit_loss
.
notes
==
=
""
?
null
:
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
notes
==
null
||
item
.
profit_loss
.
notes
==
"null"
?
""
:
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
rolling_outlook
===
null
?
"0.0"
:
item
.
profit_loss
.
rolling_outlook
===
""
?
"0.0"
:
item
.
profit_loss
.
rolling_outlook
===
"0"
?
"0.0"
:
item
.
profit_loss
.
rolling_outlook
,
item
.
profit_loss
.
master_budget
===
null
?
"0.0"
:
item
.
profit_loss
.
master_budget
===
""
?
"0.0"
:
item
.
profit_loss
.
master_budget
,
item
.
profit_loss
.
rolling_budget
===
null
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
===
""
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
,
...
...
@@ -289,7 +289,7 @@ export default class ProfitLossMR extends Component {
item
.
formula
,
item
.
level
,
item
.
description
,
item
.
profit_loss
.
notes
==
=
""
?
null
:
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
notes
==
null
||
item
.
profit_loss
.
notes
==
"null"
?
""
:
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
rolling_outlook
===
null
?
"0.0"
:
item
.
profit_loss
.
rolling_outlook
===
""
?
"0.0"
:
item
.
profit_loss
.
rolling_outlook
,
item
.
profit_loss
.
master_budget
===
null
?
"0.0"
:
item
.
profit_loss
.
master_budget
===
""
?
"0.0"
:
item
.
profit_loss
.
master_budget
,
item
.
profit_loss
.
rolling_budget
===
null
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
===
""
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
,
...
...
@@ -405,31 +405,31 @@ export default class ProfitLossMR extends Component {
}
console
.
log
(
payload
);
// console.log(JSON.stringify(payload));
//
api.create('UPLOAD').createMonthlyReportPL(payload).then(response => {
//
console.log(response);
//
if (response.data) {
//
if (response.data.status === "success") {
//
if (type == 'submitted') {
//
this.props.saveToMonthlyReport('PL')
//
} else {
//
this.props.saveToMonthlyReport()
//
}
//
} else {
//
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleTekTekTek: 0 }, () => {
//
document.body.style.overflow = 'unset';
//
if (response.data.message.includes("Someone Logged In")) {
//
setTimeout(() => {
//
localStorage.removeItem(Constant.TOKEN)
//
window.location.reload();
//
}, 1000);
//
}
//
this.props.saveToMonthlyReport()
//
})
//
}
//
} else {
//
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleTekTekTek: 0 })
//
}
//
})
api
.
create
(
'UPLOAD'
).
createMonthlyReportPL
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
type
==
'submitted'
)
{
this
.
props
.
saveToMonthlyReport
(
'PL'
)
}
else
{
this
.
props
.
saveToMonthlyReport
()
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleTekTekTek
:
0
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
this
.
props
.
saveToMonthlyReport
()
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleTekTekTek
:
0
})
}
})
}
fileHandler
=
(
event
)
=>
{
...
...
@@ -487,7 +487,7 @@ export default class ProfitLossMR extends Component {
item
.
formula
,
item
.
level
,
item
.
item_report
,
item
.
notes
,
item
.
notes
==
null
||
item
.
notes
==
"null"
?
""
:
item
.
notes
,
item
.
rolling_outlook
===
null
?
""
:
item
.
rolling_outlook
===
""
?
""
:
item
.
rolling_outlook
,
item
.
master_budget
===
""
?
""
:
item
.
master_budget
,
item
.
rolling_budget
===
""
?
""
:
item
.
rolling_budget
,
...
...
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