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
e07f2c50
Commit
e07f2c50
authored
Dec 04, 2020
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into riri
parents
03bd514a
f5eef496
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
19 deletions
+24
-19
TaxPlanningMR.js
src/container/MonthlyReport/TaxPlanningMR.js
+24
-19
No files found.
src/container/MonthlyReport/TaxPlanningMR.js
View file @
e07f2c50
...
@@ -55,15 +55,33 @@ export default class TaxPlanningMR extends Component {
...
@@ -55,15 +55,33 @@ export default class TaxPlanningMR extends Component {
saveDraft
:
true
saveDraft
:
true
}
}
this
.
handleValue
=
this
.
handleValue
.
bind
(
this
)
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
}
componentDidMount
()
{
componentDidMount
()
{
this
.
getItemHierarki
()
this
.
getSettingControl
()
// this.getItemHierarki()
// this.getLatestUpdate()
// this.getLatestUpdate()
}
}
getSettingControl
()
{
let
body
=
{
group
:
'THRESHOLD_CONTROL'
,
company_id
:
this
.
props
.
company
.
company_id
,
type
:
'TAX_PLANNING'
}
api
.
create
().
getAllSettingByType
(
body
).
then
(
response
=>
{
// console.log(response);
this
.
setState
({
minValue
:
response
.
data
.
data
[
0
]
?
response
.
data
.
data
[
0
].
min_value
:
null
,
maxValue
:
response
.
data
.
data
[
0
]
?
response
.
data
.
data
[
0
].
max_value
:
null
,
},
()
=>
{
this
.
getItemHierarki
()
})
})
}
getLatestUpdate
()
{
getLatestUpdate
()
{
let
payload
=
{
let
payload
=
{
"report_id"
:
5
,
"report_id"
:
5
,
...
@@ -181,19 +199,6 @@ export default class TaxPlanningMR extends Component {
...
@@ -181,19 +199,6 @@ export default class TaxPlanningMR extends Component {
})
})
}
}
handleValue
(
data
)
{
let
total
=
0
this
.
state
.
dataTable
.
map
((
item
,
index
)
=>
{
if
(
data
.
rowData
[
4
]
==
item
[
5
])
{
total
=
item
[
data
.
columnIndex
]
==
undefined
?
(
Number
(
total
)
+
0
)
:
(
Number
(
total
)
+
Number
(
item
[
data
.
columnIndex
]))
}
})
let
indexParent
=
this
.
state
.
dataTable
.
findIndex
((
val
)
=>
val
[
4
]
===
this
.
state
.
dataTable
[
data
.
rowIndex
][
5
])
let
a
=
this
.
state
.
dataTable
[
data
.
rowIndex
][
data
.
columnIndex
]
=
total
// console.log(indexParent);
return
a
}
handleChange
(
value
,
tableMeta
)
{
handleChange
(
value
,
tableMeta
)
{
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
let
data
=
this
.
state
.
dataTable
let
data
=
this
.
state
.
dataTable
...
@@ -1584,9 +1589,9 @@ export default class TaxPlanningMR extends Component {
...
@@ -1584,9 +1589,9 @@ export default class TaxPlanningMR extends Component {
type
=
"button"
type
=
"button"
// disabled={this.state.buttonError}
// disabled={this.state.buttonError}
onClick
=
{()
=>
onClick
=
{()
=>
this
.
state
.
buttonError
?
//
this.state.buttonError ?
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
//
this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
:
//
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -1596,7 +1601,7 @@ export default class TaxPlanningMR extends Component {
...
@@ -1596,7 +1601,7 @@ export default class TaxPlanningMR extends Component {
}
}
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
cursor
:
this
.
state
.
saveDraft
===
true
?
'default'
:
'pointer'
,
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
outline
:
'none'
outline
:
'none'
}}
}}
...
...
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