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
91a9b6b9
Commit
91a9b6b9
authored
Mar 08, 2021
by
d.arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into GGMAC
parents
538db7ed
255f56f1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2262 additions
and
5 deletions
+2262
-5
OperatingIndicator.js
src/container/OprIndicator/OperatingIndicator.js
+38
-0
RollingOutlook.js
src/container/RollingOutlook.js
+1
-1
OperatingIndicatorRO.js
src/container/RollingOutlook/OperatingIndicatorRO.js
+2162
-0
ProfitLossRO.js
src/container/RollingOutlook/ProfitLossRO.js
+61
-4
No files found.
src/container/OprIndicator/OperatingIndicator.js
View file @
91a9b6b9
...
@@ -12,6 +12,7 @@ import UploadFile from "../../library/Upload";
...
@@ -12,6 +12,7 @@ import UploadFile from "../../library/Upload";
import
{
format
}
from
'date-fns'
;
import
{
format
}
from
'date-fns'
;
import
Constant
from
'../../library/Constant'
;
import
Constant
from
'../../library/Constant'
;
import
OperatingIndicatorMR
from
'../MonthlyReport/OperatingIndicatorMR'
;
import
OperatingIndicatorMR
from
'../MonthlyReport/OperatingIndicatorMR'
;
import
OperatingIndicatorRO
from
'../RollingOutlook/OperatingIndicatorRO'
;
var
ct
=
require
(
"../../library/CustomTable"
);
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
...
@@ -341,6 +342,16 @@ export default class OperatingIndicator extends Component {
...
@@ -341,6 +342,16 @@ export default class OperatingIndicator extends Component {
})
})
}
else
if
(
String
(
item
[
1
]).
toLocaleLowerCase
().
includes
(
"rolling outlook"
))
{
this
.
setState
({
statusDetail
:
String
(
item
[
2
]).
toLocaleLowerCase
(),
dataDetail
:
{
...
this
.
state
.
dataReport
[
index
],
periode
:
this
.
state
.
periode
.
periode
,
operatingIndID
:
this
.
state
.
operatingIndID
,
company
:
this
.
state
.
company
},
visibleOperatingIndicator
:
false
,
visibleDetailOpt
:
false
,
visibleDetailMonthly
:
false
,
visibleDetailRolling
:
true
})
}
else
{
}
else
{
this
.
setState
({
this
.
setState
({
statusDetail
:
String
(
item
[
2
]).
toLocaleLowerCase
(),
statusDetail
:
String
(
item
[
2
]).
toLocaleLowerCase
(),
...
@@ -409,6 +420,14 @@ export default class OperatingIndicator extends Component {
...
@@ -409,6 +420,14 @@ export default class OperatingIndicator extends Component {
})
})
}
}
saveRollingOI
(
payload
)
{
api
.
create
().
createMonthlyReportOI
(
payload
).
then
((
response
)
=>
{
console
.
log
(
response
);
this
.
getReport
()
this
.
getOperatingID
()
})
}
render
()
{
render
()
{
const
columns
=
[
"#"
,
"Report Type"
,
const
columns
=
[
"#"
,
"Report Type"
,
// {
// {
...
@@ -644,6 +663,25 @@ export default class OperatingIndicator extends Component {
...
@@ -644,6 +663,25 @@ export default class OperatingIndicator extends Component {
/
>
/
>
}
}
{
this
.
state
.
visibleDetailRolling
&&
<
OperatingIndicatorRO
open
=
{
this
.
props
.
open
}
data
=
{
this
.
state
.
dataDetail
}
height
=
{
this
.
props
.
height
}
width
=
{
this
.
props
.
width
}
months
=
{
this
.
state
.
months
}
company
=
{
this
.
state
.
company
}
onClickClose
=
{()
=>
this
.
setState
({
visibleDetailRolling
:
false
,
visibleOperatingIndicator
:
true
},
()
=>
{
this
.
getOperatingID
()
this
.
forceUpdate
()
})}
getReport
=
{()
=>
this
.
getOperatingID
()}
saveRollingOI
=
{
this
.
saveRollingOI
.
bind
(
this
)}
isSubmit
=
{
this
.
state
.
statusDetail
==
'closed'
?
false
:
this
.
state
.
isSubmit
}
permission
=
{{
create
:
this
.
state
.
buttonCreate
,
edit
:
this
.
state
.
buttonEdit
,
delete
:
this
.
state
.
buttonDelete
}}
/
>
}
{
this
.
state
.
visibleUpload
&&
(
{
this
.
state
.
visibleUpload
&&
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
}}
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
}}
>
...
...
src/container/RollingOutlook.js
View file @
91a9b6b9
...
@@ -559,7 +559,7 @@ export default class RollingOutlook extends Component {
...
@@ -559,7 +559,7 @@ export default class RollingOutlook extends Component {
this
.
setState
({
alert
:
false
})
this
.
setState
({
alert
:
false
})
}
}
saveTo
MasterBudget
(
data
)
{
saveTo
RollingOutlook
(
data
)
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
// console.log(JSON.stringify(data));
// console.log(JSON.stringify(data));
api
.
create
(
'UPLOAD'
).
createSubmitReport
(
data
).
then
(
response
=>
{
api
.
create
(
'UPLOAD'
).
createSubmitReport
(
data
).
then
(
response
=>
{
...
...
src/container/RollingOutlook/OperatingIndicatorRO.js
0 → 100644
View file @
91a9b6b9
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/container/RollingOutlook/ProfitLossRO.js
View file @
91a9b6b9
...
@@ -142,7 +142,7 @@ export default class ProfitLossRO extends Component {
...
@@ -142,7 +142,7 @@ export default class ProfitLossRO extends Component {
item
.
formula
,
item
.
formula
,
item
.
level
,
item
.
level
,
item
.
description
,
item
.
description
,
item
.
profit_loss
.
notes
===
undefined
?
""
:
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
last_year_total
===
""
?
"0"
:
item
.
profit_loss
.
last_year_total
,
item
.
profit_loss
.
last_year_total
===
""
?
"0"
:
item
.
profit_loss
.
last_year_total
,
item
.
profit_loss
.
january
===
""
?
"0"
:
item
.
profit_loss
.
january
,
item
.
profit_loss
.
january
===
""
?
"0"
:
item
.
profit_loss
.
january
,
item
.
profit_loss
.
february
===
""
?
"0"
:
item
.
profit_loss
.
february
,
item
.
profit_loss
.
february
===
""
?
"0"
:
item
.
profit_loss
.
february
,
...
@@ -179,7 +179,7 @@ export default class ProfitLossRO extends Component {
...
@@ -179,7 +179,7 @@ export default class ProfitLossRO extends Component {
item
.
formula
,
item
.
formula
,
item
.
level
,
item
.
level
,
item
.
description
,
item
.
description
,
item
.
profit_loss
.
notes
===
undefined
?
""
:
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
last_year_total
===
""
?
"0"
:
item
.
profit_loss
.
last_year_total
,
item
.
profit_loss
.
last_year_total
===
""
?
"0"
:
item
.
profit_loss
.
last_year_total
,
item
.
profit_loss
.
january
===
""
?
"0"
:
item
.
profit_loss
.
january
,
item
.
profit_loss
.
january
===
""
?
"0"
:
item
.
profit_loss
.
january
,
item
.
profit_loss
.
february
===
""
?
"0"
:
item
.
profit_loss
.
february
,
item
.
profit_loss
.
february
===
""
?
"0"
:
item
.
profit_loss
.
february
,
...
@@ -303,6 +303,63 @@ export default class ProfitLossRO extends Component {
...
@@ -303,6 +303,63 @@ export default class ProfitLossRO extends Component {
// })
// })
}
}
backToRollingOutlook
(
type
)
{
this
.
setState
({
loading
:
true
})
let
data
=
[]
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
"item_report_id"
:
i
[
1
],
"total_december_last_year"
:
String
(
Number
(
i
[
6
]).
toFixed
(
1
)),
"january"
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
)),
"february"
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
)),
"march"
:
String
(
Number
(
i
[
9
]).
toFixed
(
1
)),
"april"
:
String
(
Number
(
i
[
10
]).
toFixed
(
1
)),
"may"
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
)),
"june"
:
String
(
Number
(
i
[
12
]).
toFixed
(
1
)),
"july"
:
String
(
Number
(
i
[
13
]).
toFixed
(
1
)),
"august"
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
)),
"september"
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)),
"october"
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)),
"november"
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)),
"december"
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)),
"total_december_year"
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
))
})
})
let
payload
=
{
"rolling_outlook_id"
:
this
.
props
.
rollingOutlookID
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
// "months": this.props.month.month_id,
"months"
:
0
,
"status"
:
type
,
"balance_sheet"
:
data
}
api
.
create
(
'UPLOAD'
).
createRollingOutlookBS
(
payload
).
then
(
response
=>
{
console
.
log
(
payload
);
console
.
log
(
response
);
// console.log(JSON.stringify(payload))
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
type
==
'submitted'
)
{
// this.props.saveToMonthlyReport('BS')
this
.
props
.
onClickClose
()
}
else
{
// this.props.saveToMonthlyReport()
this
.
props
.
onClickClose
()
}
}
else
{
this
.
setState
({
loading
:
false
,
handleTekTekTek
:
0
},
()
=>
{
// this.props.saveToMonthlyReport()
this
.
props
.
onClickClose
()
})
}
}
else
{
this
.
setState
({
loading
:
false
,
handleTekTekTek
:
0
})
}
})
}
closeAlert
()
{
closeAlert
()
{
this
.
setState
({
alert
:
false
})
this
.
setState
({
alert
:
false
})
}
}
...
@@ -2121,7 +2178,7 @@ export default class ProfitLossRO extends Component {
...
@@ -2121,7 +2178,7 @@ export default class ProfitLossRO extends Component {
:
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
this
.
backTo
MonthlyReport
(
'draft'
)
this
.
backTo
RollingOutlook
(
'draft'
)
})
})
}
}
>
>
...
@@ -2138,7 +2195,7 @@ export default class ProfitLossRO extends Component {
...
@@ -2138,7 +2195,7 @@ export default class ProfitLossRO extends Component {
:
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
backTo
MonthlyReport
(
'submitted'
)
this
.
backTo
RollingOutlook
(
'submitted'
)
})}
})}
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
...
...
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