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
ceb3ffc4
Commit
ceb3ffc4
authored
Sep 17, 2020
by
Rifka Kurnia Irfiana
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into rifka
parents
8323819d
5b90dbfc
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
171 additions
and
705 deletions
+171
-705
BudgetTahunan.js
src/container/BudgetTahunan.js
+1
-1
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+94
-631
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+71
-69
User.js
src/container/Otorisasi/User.js
+5
-4
No files found.
src/container/BudgetTahunan.js
View file @
ceb3ffc4
...
...
@@ -312,7 +312,7 @@ export default class BudgetTahunan extends Component {
saveToMasterBudget
(
data
)
{
this
.
setState
({
loading
:
true
})
// console.log(JSON.stringify(data));
api
.
create
().
createSubmitReport
(
data
).
then
(
response
=>
{
api
.
create
(
'UPLOAD'
).
createSubmitReport
(
data
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
...
src/container/BudgetTahunan/BalanceSheet.js
View file @
ceb3ffc4
...
...
@@ -31,18 +31,7 @@ export default class BalanceSheet extends Component {
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
dataTable
:
[
// ["TOTAL ASSETS", "11,247,249", "10,702,196"],
// ["TOTAL CURRENT ASSETS", "2,647,647", "2,058,898"],
// ["Cash & Cash Equivalent", "1,464,571", "729,743"],
// ["Cash & Bank Balance", "938,707", "265,584"],
// ["Time & Call Deposit", "525,864", "464,159"],
// ["BI Deposit", "", ""],
// ["Marketable Securities", "150,250", "154,500"],
// ["Notes Receivable", "", ""],
// ["Accounts Receivable", "172,031", "97,112"],
// ["Trade Receivables - Third Party", "142,668", "77,480"],
],
dataTable
:
[],
visibleBalanceSheet
:
true
,
disabledSave
:
true
}
...
...
@@ -66,12 +55,12 @@ export default class BalanceSheet extends Component {
}
api
.
create
().
getDetailReportMB
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
dataTable
=
[]
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
let
res
=
response
.
data
.
data
console
.
log
(
res
)
const
handlePushChild
=
(
item
)
=>
{
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
if
(
indexIDzz
===
-
1
)
{
dataTable
.
push
([
item
.
type_report_id
,
item
.
id
,
...
...
@@ -96,564 +85,16 @@ export default class BalanceSheet extends Component {
item
.
balance_sheet
.
total_next_year
,
item
.
balance_sheet
.
total_more_year
])
item
.
children
.
map
(
i
=>
{
if
(
i
.
children
)
{
if
(
i
.
children
.
length
>
0
)
{
dataTable
.
push
([
i
.
type_report_id
,
i
.
id
,
i
.
parent
,
i
.
formula
,
i
.
level
,
i
.
description
,
i
.
balance_sheet
.
total_actual_before
,
i
.
balance_sheet
.
january
,
i
.
balance_sheet
.
february
,
i
.
balance_sheet
.
march
,
i
.
balance_sheet
.
april
,
i
.
balance_sheet
.
may
,
i
.
balance_sheet
.
june
,
i
.
balance_sheet
.
july
,
i
.
balance_sheet
.
august
,
i
.
balance_sheet
.
september
,
i
.
balance_sheet
.
october
,
i
.
balance_sheet
.
november
,
i
.
balance_sheet
.
december
,
i
.
balance_sheet
.
total_current_year
,
i
.
balance_sheet
.
total_next_year
,
i
.
balance_sheet
.
total_more_year
])
i
.
children
.
map
(
val
=>
{
if
(
val
.
children
&&
val
.
children
.
length
>
0
)
{
dataTable
.
push
([
val
.
type_report_id
,
val
.
id
,
val
.
parent
,
val
.
formula
,
val
.
level
,
val
.
description
,
val
.
balance_sheet
.
total_actual_before
,
val
.
balance_sheet
.
january
,
val
.
balance_sheet
.
february
,
val
.
balance_sheet
.
march
,
val
.
balance_sheet
.
april
,
val
.
balance_sheet
.
may
,
val
.
balance_sheet
.
june
,
val
.
balance_sheet
.
july
,
val
.
balance_sheet
.
august
,
val
.
balance_sheet
.
september
,
val
.
balance_sheet
.
october
,
val
.
balance_sheet
.
november
,
val
.
balance_sheet
.
december
,
val
.
balance_sheet
.
total_current_year
,
val
.
balance_sheet
.
total_next_year
,
val
.
balance_sheet
.
total_more_year
])
val
.
children
.
map
(
items
=>
{
if
(
items
.
children
&&
items
.
children
.
length
>
0
)
{
dataTable
.
push
([
items
.
type_report_id
,
items
.
id
,
items
.
parent
,
items
.
formula
,
items
.
level
,
items
.
description
,
items
.
balance_sheet
.
total_actual_before
,
items
.
balance_sheet
.
january
,
items
.
balance_sheet
.
february
,
items
.
balance_sheet
.
march
,
items
.
balance_sheet
.
april
,
items
.
balance_sheet
.
may
,
items
.
balance_sheet
.
june
,
items
.
balance_sheet
.
july
,
items
.
balance_sheet
.
august
,
items
.
balance_sheet
.
september
,
items
.
balance_sheet
.
october
,
items
.
balance_sheet
.
november
,
items
.
balance_sheet
.
december
,
items
.
balance_sheet
.
total_current_year
,
items
.
balance_sheet
.
total_next_year
,
items
.
balance_sheet
.
total_more_year
])
items
.
children
.
map
(
itemss
=>
{
if
(
itemss
.
children
&&
itemss
.
children
.
length
>
0
)
{
dataTable
.
push
([
itemss
.
type_report_id
,
itemss
.
id
,
itemss
.
parent
,
itemss
.
formula
,
itemss
.
level
,
itemss
.
description
,
itemss
.
balance_sheet
.
total_actual_before
,
itemss
.
balance_sheet
.
january
,
itemss
.
balance_sheet
.
february
,
itemss
.
balance_sheet
.
march
,
itemss
.
balance_sheet
.
april
,
itemss
.
balance_sheet
.
may
,
itemss
.
balance_sheet
.
june
,
itemss
.
balance_sheet
.
july
,
itemss
.
balance_sheet
.
august
,
itemss
.
balance_sheet
.
september
,
itemss
.
balance_sheet
.
october
,
itemss
.
balance_sheet
.
november
,
itemss
.
balance_sheet
.
december
,
itemss
.
balance_sheet
.
total_current_year
,
itemss
.
balance_sheet
.
total_next_year
,
itemss
.
balance_sheet
.
total_more_year
])
itemss
.
children
.
map
(
item1
=>
{
if
(
item1
.
children
&&
item1
.
children
.
length
>
0
)
{
dataTable
.
push
([
item1
.
type_report_id
,
item1
.
id
,
item1
.
parent
,
item1
.
formula
,
item1
.
level
,
item1
.
description
,
item1
.
balance_sheet
.
total_actual_before
,
item1
.
balance_sheet
.
january
,
item1
.
balance_sheet
.
february
,
item1
.
balance_sheet
.
march
,
item1
.
balance_sheet
.
april
,
item1
.
balance_sheet
.
may
,
item1
.
balance_sheet
.
june
,
item1
.
balance_sheet
.
july
,
item1
.
balance_sheet
.
august
,
item1
.
balance_sheet
.
september
,
item1
.
balance_sheet
.
october
,
item1
.
balance_sheet
.
november
,
item1
.
balance_sheet
.
december
,
item1
.
balance_sheet
.
total_current_year
,
item1
.
balance_sheet
.
total_next_year
,
item1
.
balance_sheet
.
total_more_year
])
item1
.
children
.
map
(
item2
=>
{
if
(
item2
.
children
&&
item2
.
children
.
length
>
0
)
{
dataTable
.
push
([
item2
.
type_report_id
,
item2
.
id
,
item2
.
parent
,
item2
.
formula
,
item2
.
level
,
item2
.
description
,
item2
.
balance_sheet
.
total_actual_before
,
item2
.
balance_sheet
.
january
,
item2
.
balance_sheet
.
february
,
item2
.
balance_sheet
.
march
,
item2
.
balance_sheet
.
april
,
item2
.
balance_sheet
.
may
,
item2
.
balance_sheet
.
june
,
item2
.
balance_sheet
.
july
,
item2
.
balance_sheet
.
august
,
item2
.
balance_sheet
.
september
,
item2
.
balance_sheet
.
october
,
item2
.
balance_sheet
.
november
,
item2
.
balance_sheet
.
december
,
item2
.
balance_sheet
.
total_current_year
,
item2
.
balance_sheet
.
total_next_year
,
item2
.
balance_sheet
.
total_more_year
])
item2
.
children
.
map
(
item3
=>
{
if
(
item3
.
children
&&
item3
.
children
.
length
>
0
)
{
dataTable
.
push
([
item3
.
type_report_id
,
item3
.
id
,
item3
.
parent
,
item3
.
formula
,
item3
.
level
,
item3
.
description
,
item3
.
balance_sheet
.
total_actual_before
,
item3
.
balance_sheet
.
january
,
item3
.
balance_sheet
.
february
,
item3
.
balance_sheet
.
march
,
item3
.
balance_sheet
.
april
,
item3
.
balance_sheet
.
may
,
item3
.
balance_sheet
.
june
,
item3
.
balance_sheet
.
july
,
item3
.
balance_sheet
.
august
,
item3
.
balance_sheet
.
september
,
item3
.
balance_sheet
.
october
,
item3
.
balance_sheet
.
november
,
item3
.
balance_sheet
.
december
,
item3
.
balance_sheet
.
total_current_year
,
item3
.
balance_sheet
.
total_next_year
,
item3
.
balance_sheet
.
total_more_year
])
item3
.
children
.
map
(
item4
=>
{
if
(
item4
.
children
&&
item4
.
children
.
length
>
0
)
{
dataTable
.
push
([
item4
.
type_report_id
,
item4
.
id
,
item4
.
parent
,
item4
.
formula
,
item4
.
level
,
item4
.
description
,
item4
.
balance_sheet
.
total_actual_before
,
item4
.
balance_sheet
.
january
,
item4
.
balance_sheet
.
february
,
item4
.
balance_sheet
.
march
,
item4
.
balance_sheet
.
april
,
item4
.
balance_sheet
.
may
,
item4
.
balance_sheet
.
june
,
item4
.
balance_sheet
.
july
,
item4
.
balance_sheet
.
august
,
item4
.
balance_sheet
.
september
,
item4
.
balance_sheet
.
october
,
item4
.
balance_sheet
.
november
,
item4
.
balance_sheet
.
december
,
item4
.
balance_sheet
.
total_current_year
,
item4
.
balance_sheet
.
total_next_year
,
item4
.
balance_sheet
.
total_more_year
])
item4
.
children
.
map
(
item5
=>
{
if
(
item5
.
children
&&
item5
.
children
.
length
>
0
)
{
dataTable
.
push
([
item5
.
type_report_id
,
item5
.
id
,
item5
.
parent
,
item5
.
formula
,
item5
.
level
,
item5
.
description
,
item5
.
balance_sheet
.
total_actual_before
,
item5
.
balance_sheet
.
january
,
item5
.
balance_sheet
.
february
,
item5
.
balance_sheet
.
march
,
item5
.
balance_sheet
.
april
,
item5
.
balance_sheet
.
may
,
item5
.
balance_sheet
.
june
,
item5
.
balance_sheet
.
july
,
item5
.
balance_sheet
.
august
,
item5
.
balance_sheet
.
september
,
item5
.
balance_sheet
.
october
,
item5
.
balance_sheet
.
november
,
item5
.
balance_sheet
.
december
,
item5
.
balance_sheet
.
total_current_year
,
item5
.
balance_sheet
.
total_next_year
,
item5
.
balance_sheet
.
total_more_year
])
item5
.
children
.
map
(
item6
=>
{
if
(
item6
.
children
&&
item
.
children
.
length
>
0
)
{
dataTable
.
push
([
item6
.
type_report_id
,
item6
.
id
,
item6
.
parent
,
item6
.
formula
,
item6
.
level
,
item6
.
description
,
item6
.
balance_sheet
.
total_actual_before
,
item6
.
balance_sheet
.
january
,
item6
.
balance_sheet
.
february
,
item6
.
balance_sheet
.
march
,
item6
.
balance_sheet
.
april
,
item6
.
balance_sheet
.
may
,
item6
.
balance_sheet
.
june
,
item6
.
balance_sheet
.
july
,
item6
.
balance_sheet
.
august
,
item6
.
balance_sheet
.
september
,
item6
.
balance_sheet
.
october
,
item6
.
balance_sheet
.
november
,
item6
.
balance_sheet
.
december
,
item6
.
balance_sheet
.
total_current_year
,
item6
.
balance_sheet
.
total_next_year
,
item6
.
balance_sheet
.
total_more_year
])
}
else
{
dataTable
.
push
([
item6
.
type_report_id
,
item6
.
id
,
item6
.
parent
,
item6
.
formula
,
item6
.
level
,
item6
.
description
,
item6
.
balance_sheet
.
total_actual_before
,
item6
.
balance_sheet
.
january
,
item6
.
balance_sheet
.
february
,
item6
.
balance_sheet
.
march
,
item6
.
balance_sheet
.
april
,
item6
.
balance_sheet
.
may
,
item6
.
balance_sheet
.
june
,
item6
.
balance_sheet
.
july
,
item6
.
balance_sheet
.
august
,
item6
.
balance_sheet
.
september
,
item6
.
balance_sheet
.
october
,
item6
.
balance_sheet
.
november
,
item6
.
balance_sheet
.
december
,
item6
.
balance_sheet
.
total_current_year
,
item6
.
balance_sheet
.
total_next_year
,
item6
.
balance_sheet
.
total_more_year
])
}
})
}
else
{
dataTable
.
push
([
item5
.
type_report_id
,
item5
.
id
,
item5
.
parent
,
item5
.
formula
,
item5
.
level
,
item5
.
description
,
item5
.
balance_sheet
.
total_actual_before
,
item5
.
balance_sheet
.
january
,
item5
.
balance_sheet
.
february
,
item5
.
balance_sheet
.
march
,
item5
.
balance_sheet
.
april
,
item5
.
balance_sheet
.
may
,
item5
.
balance_sheet
.
june
,
item5
.
balance_sheet
.
july
,
item5
.
balance_sheet
.
august
,
item5
.
balance_sheet
.
september
,
item5
.
balance_sheet
.
october
,
item5
.
balance_sheet
.
november
,
item5
.
balance_sheet
.
december
,
item5
.
balance_sheet
.
total_current_year
,
item5
.
balance_sheet
.
total_next_year
,
item5
.
balance_sheet
.
total_more_year
])
}
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
handlePushChild
(
items
)
})
}
else
{
dataTable
.
push
([
item4
.
type_report_id
,
item4
.
id
,
item4
.
parent
,
item4
.
formula
,
item4
.
level
,
item4
.
description
,
item4
.
balance_sheet
.
total_actual_before
,
item4
.
balance_sheet
.
january
,
item4
.
balance_sheet
.
february
,
item4
.
balance_sheet
.
march
,
item4
.
balance_sheet
.
april
,
item4
.
balance_sheet
.
may
,
item4
.
balance_sheet
.
june
,
item4
.
balance_sheet
.
july
,
item4
.
balance_sheet
.
august
,
item4
.
balance_sheet
.
september
,
item4
.
balance_sheet
.
october
,
item4
.
balance_sheet
.
november
,
item4
.
balance_sheet
.
december
,
item4
.
balance_sheet
.
total_current_year
,
item4
.
balance_sheet
.
total_next_year
,
item4
.
balance_sheet
.
total_more_year
])
}
})
}
else
{
dataTable
.
push
([
item3
.
type_report_id
,
item3
.
id
,
item3
.
parent
,
item3
.
formula
,
item3
.
level
,
item3
.
description
,
item3
.
balance_sheet
.
total_actual_before
,
item3
.
balance_sheet
.
january
,
item3
.
balance_sheet
.
february
,
item3
.
balance_sheet
.
march
,
item3
.
balance_sheet
.
april
,
item3
.
balance_sheet
.
may
,
item3
.
balance_sheet
.
june
,
item3
.
balance_sheet
.
july
,
item3
.
balance_sheet
.
august
,
item3
.
balance_sheet
.
september
,
item3
.
balance_sheet
.
october
,
item3
.
balance_sheet
.
november
,
item3
.
balance_sheet
.
december
,
item3
.
balance_sheet
.
total_current_year
,
item3
.
balance_sheet
.
total_next_year
,
item3
.
balance_sheet
.
total_more_year
])
}
})
}
else
{
dataTable
.
push
([
item2
.
type_report_id
,
item2
.
id
,
item2
.
parent
,
item2
.
formula
,
item2
.
level
,
item2
.
description
,
item2
.
balance_sheet
.
total_actual_before
,
item2
.
balance_sheet
.
january
,
item2
.
balance_sheet
.
february
,
item2
.
balance_sheet
.
march
,
item2
.
balance_sheet
.
april
,
item2
.
balance_sheet
.
may
,
item2
.
balance_sheet
.
june
,
item2
.
balance_sheet
.
july
,
item2
.
balance_sheet
.
august
,
item2
.
balance_sheet
.
september
,
item2
.
balance_sheet
.
october
,
item2
.
balance_sheet
.
november
,
item2
.
balance_sheet
.
december
,
item2
.
balance_sheet
.
total_current_year
,
item2
.
balance_sheet
.
total_next_year
,
item2
.
balance_sheet
.
total_more_year
])
}
})
}
else
{
dataTable
.
push
([
item1
.
type_report_id
,
item1
.
id
,
item1
.
parent
,
item1
.
formula
,
item1
.
level
,
item1
.
description
,
item1
.
balance_sheet
.
total_actual_before
,
item1
.
balance_sheet
.
january
,
item1
.
balance_sheet
.
february
,
item1
.
balance_sheet
.
march
,
item1
.
balance_sheet
.
april
,
item1
.
balance_sheet
.
may
,
item1
.
balance_sheet
.
june
,
item1
.
balance_sheet
.
july
,
item1
.
balance_sheet
.
august
,
item1
.
balance_sheet
.
september
,
item1
.
balance_sheet
.
october
,
item1
.
balance_sheet
.
november
,
item1
.
balance_sheet
.
december
,
item1
.
balance_sheet
.
total_current_year
,
item1
.
balance_sheet
.
total_next_year
,
item1
.
balance_sheet
.
total_more_year
])
}
})
}
else
{
dataTable
.
push
([
itemss
.
type_report_id
,
itemss
.
id
,
itemss
.
parent
,
itemss
.
formula
,
itemss
.
level
,
itemss
.
description
,
itemss
.
balance_sheet
.
total_actual_before
,
itemss
.
balance_sheet
.
january
,
itemss
.
balance_sheet
.
february
,
itemss
.
balance_sheet
.
march
,
itemss
.
balance_sheet
.
april
,
itemss
.
balance_sheet
.
may
,
itemss
.
balance_sheet
.
june
,
itemss
.
balance_sheet
.
july
,
itemss
.
balance_sheet
.
august
,
itemss
.
balance_sheet
.
september
,
itemss
.
balance_sheet
.
october
,
itemss
.
balance_sheet
.
november
,
itemss
.
balance_sheet
.
december
,
itemss
.
balance_sheet
.
total_current_year
,
itemss
.
balance_sheet
.
total_next_year
,
itemss
.
balance_sheet
.
total_more_year
])
}
})
}
else
{
dataTable
.
push
([
items
.
type_report_id
,
items
.
id
,
items
.
parent
,
items
.
formula
,
items
.
level
,
items
.
description
,
items
.
balance_sheet
.
total_actual_before
,
items
.
balance_sheet
.
january
,
items
.
balance_sheet
.
february
,
items
.
balance_sheet
.
march
,
items
.
balance_sheet
.
april
,
items
.
balance_sheet
.
may
,
items
.
balance_sheet
.
june
,
items
.
balance_sheet
.
july
,
items
.
balance_sheet
.
august
,
items
.
balance_sheet
.
september
,
items
.
balance_sheet
.
october
,
items
.
balance_sheet
.
november
,
items
.
balance_sheet
.
december
,
items
.
balance_sheet
.
total_current_year
,
items
.
balance_sheet
.
total_next_year
,
items
.
balance_sheet
.
total_more_year
])
}
})
}
else
{
dataTable
.
push
([
val
.
type_report_id
,
val
.
id
,
val
.
parent
,
val
.
formula
,
val
.
level
,
val
.
description
,
val
.
balance_sheet
.
total_actual_before
,
val
.
balance_sheet
.
january
,
val
.
balance_sheet
.
february
,
val
.
balance_sheet
.
march
,
val
.
balance_sheet
.
april
,
val
.
balance_sheet
.
may
,
val
.
balance_sheet
.
june
,
val
.
balance_sheet
.
july
,
val
.
balance_sheet
.
august
,
val
.
balance_sheet
.
september
,
val
.
balance_sheet
.
october
,
val
.
balance_sheet
.
november
,
val
.
balance_sheet
.
december
,
val
.
balance_sheet
.
total_current_year
,
val
.
balance_sheet
.
total_next_year
,
val
.
balance_sheet
.
total_more_year
])
}
})
}
else
{
dataTable
.
push
([
i
.
type_report_id
,
i
.
id
,
i
.
parent
,
i
.
formula
,
i
.
level
,
i
.
description
,
i
.
balance_sheet
.
total_actual_before
,
i
.
balance_sheet
.
january
,
i
.
balance_sheet
.
february
,
i
.
balance_sheet
.
march
,
i
.
balance_sheet
.
april
,
i
.
balance_sheet
.
may
,
i
.
balance_sheet
.
june
,
i
.
balance_sheet
.
july
,
i
.
balance_sheet
.
august
,
i
.
balance_sheet
.
september
,
i
.
balance_sheet
.
october
,
i
.
balance_sheet
.
november
,
i
.
balance_sheet
.
december
,
i
.
balance_sheet
.
total_current_year
,
i
.
balance_sheet
.
total_next_year
,
i
.
balance_sheet
.
total_more_year
])
}
}
else
{
dataTable
.
push
([
i
.
type_report_id
,
i
.
id
,
i
.
parent
,
i
.
formula
,
i
.
level
,
i
.
description
,
i
.
balance_sheet
.
total_actual_before
,
i
.
balance_sheet
.
january
,
i
.
balance_sheet
.
february
,
i
.
balance_sheet
.
march
,
i
.
balance_sheet
.
april
,
i
.
balance_sheet
.
may
,
i
.
balance_sheet
.
june
,
i
.
balance_sheet
.
july
,
i
.
balance_sheet
.
august
,
i
.
balance_sheet
.
september
,
i
.
balance_sheet
.
october
,
i
.
balance_sheet
.
november
,
i
.
balance_sheet
.
december
,
i
.
balance_sheet
.
total_current_year
,
i
.
balance_sheet
.
total_next_year
,
i
.
balance_sheet
.
total_more_year
])
}
})
}
else
{
res
.
map
((
item
,
index
)
=>
{
dataTable
.
push
([
item
.
type_report_id
,
item
.
id
,
...
...
@@ -678,15 +119,17 @@ export default class BalanceSheet extends Component {
item
.
balance_sheet
.
total_next_year
,
item
.
balance_sheet
.
total_more_year
])
}
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
handlePushChild
(
items
)
})
console
.
log
(
dataTable
);
this
.
setState
({
dataTable
,
loading
:
false
})
}
}
else
{
this
.
setState
({
loading
:
false
})
}
})
this
.
setState
({
dataTable
,
loading
:
false
})
})
}
handleValue
(
data
)
{
...
...
@@ -908,6 +351,21 @@ export default class BalanceSheet extends Component {
})
}
async
downloadAllData
()
{
let
res
=
await
fetch
(
`https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=
${
this
.
props
.
submissionID
}
&&report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&revision=
${
this
.
props
.
revision
}
`
)
res
=
await
res
.
blob
()
this
.
setState
({
loading
:
false
})
if
(
res
.
size
>
0
)
{
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
'Balance Sheet.xlsx'
;
a
.
click
();
}
}
render
()
{
let
dataTable2
=
this
.
state
.
dataTable
const
handleChange
=
(
value
,
tableMeta
)
=>
{
...
...
@@ -2511,7 +1969,12 @@ export default class BalanceSheet extends Component {
borderColor
:
'transparent'
,
margin
:
5
}}
onClick
=
{()
=>
null
}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
downloadAllData
()
},
100
);
})}
>
<
img
src
=
{
Images
.
download
}
/
>
<
/button
>
...
...
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
ceb3ffc4
...
...
@@ -670,7 +670,7 @@ export default class FixedAssetsMovement extends Component {
])
}
})
//
console.log(dataTable);
console
.
log
(
dataTable
);
this
.
setState
({
dataTable
,
loading
:
false
})
}
}
else
{
...
...
@@ -853,6 +853,8 @@ export default class FixedAssetsMovement extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
width
:
300
}}
>
{
console
.
log
(
val
)}
{
console
.
log
(
tableMeta
)}
{
tableMeta
.
rowData
[
4
]
==
0
?
<
span
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
}}
>
{
String
(
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
).
toUpperCase
()}
<
/span
>
:
...
...
@@ -897,7 +899,7 @@ export default class FixedAssetsMovement extends Component {
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
@@ -944,7 +946,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
/
>
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
<
/div
>
)
...
...
@@ -983,7 +985,7 @@ export default class FixedAssetsMovement extends Component {
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
@@ -1005,7 +1007,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1015,7 +1017,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1030,7 +1032,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
/
>
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
<
/div
>
)
...
...
@@ -1069,7 +1071,7 @@ export default class FixedAssetsMovement extends Component {
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
@@ -1091,7 +1093,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1101,7 +1103,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1116,7 +1118,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
/
>
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
<
/div
>
)
...
...
@@ -1155,7 +1157,7 @@ export default class FixedAssetsMovement extends Component {
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
@@ -1177,7 +1179,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1187,7 +1189,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1202,7 +1204,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
/
>
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
<
/div
>
)
...
...
@@ -1241,7 +1243,7 @@ export default class FixedAssetsMovement extends Component {
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
@@ -1263,7 +1265,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1273,7 +1275,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1288,7 +1290,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
/
>
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
<
/div
>
)
...
...
@@ -1327,7 +1329,7 @@ export default class FixedAssetsMovement extends Component {
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
@@ -1349,7 +1351,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1359,7 +1361,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1374,7 +1376,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
/
>
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
<
/div
>
)
...
...
@@ -1413,7 +1415,7 @@ export default class FixedAssetsMovement extends Component {
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
@@ -1435,7 +1437,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1445,7 +1447,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1460,7 +1462,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
/
>
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
<
/div
>
)
...
...
@@ -1499,7 +1501,7 @@ export default class FixedAssetsMovement extends Component {
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
@@ -1521,7 +1523,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1531,7 +1533,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1546,7 +1548,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
/
>
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
<
/div
>
)
...
...
@@ -1585,7 +1587,7 @@ export default class FixedAssetsMovement extends Component {
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
@@ -1607,7 +1609,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1617,7 +1619,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1632,7 +1634,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
/
>
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
<
/div
>
)
...
...
@@ -1671,7 +1673,7 @@ export default class FixedAssetsMovement extends Component {
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
@@ -1693,7 +1695,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1703,7 +1705,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1718,7 +1720,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
/
>
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
<
/div
>
)
...
...
@@ -1757,7 +1759,7 @@ export default class FixedAssetsMovement extends Component {
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
@@ -1779,7 +1781,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1789,7 +1791,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1804,7 +1806,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
/
>
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
<
/div
>
)
...
...
@@ -1843,7 +1845,7 @@ export default class FixedAssetsMovement extends Component {
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
@@ -1865,7 +1867,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1875,7 +1877,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1890,7 +1892,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
/
>
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
<
/div
>
)
...
...
@@ -1929,7 +1931,7 @@ export default class FixedAssetsMovement extends Component {
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
@@ -1951,7 +1953,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1961,7 +1963,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1976,7 +1978,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
/
>
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
<
/div
>
)
...
...
@@ -2015,7 +2017,7 @@ export default class FixedAssetsMovement extends Component {
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
@@ -2037,7 +2039,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -2047,7 +2049,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -2062,7 +2064,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
/
>
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
<
/div
>
)
...
...
@@ -2072,8 +2074,8 @@ export default class FixedAssetsMovement extends Component {
name
:
"31 Dec 2022 Total"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#3
54960
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'
white
'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#3
7b5e6
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'
black
'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
...
...
@@ -2101,7 +2103,7 @@ export default class FixedAssetsMovement extends Component {
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
@@ -2123,7 +2125,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -2133,7 +2135,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -2148,7 +2150,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
/
>
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
<
/div
>
)
...
...
@@ -2158,8 +2160,8 @@ export default class FixedAssetsMovement extends Component {
name
:
"31 Dec 2023 Total"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#3
54960
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'
white
'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#3
7b5e6
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'
black
'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
...
...
@@ -2187,7 +2189,7 @@ export default class FixedAssetsMovement extends Component {
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
@@ -2209,7 +2211,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -2219,7 +2221,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -2234,7 +2236,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
/
>
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
<
/div
>
)
...
...
@@ -2319,7 +2321,7 @@ export default class FixedAssetsMovement extends Component {
<
/div
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
200
,
height
:
this
.
props
.
height
-
200
}}
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
),
height
:
this
.
props
.
height
-
200
}}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
data
=
{
dataTable2
}
...
...
src/container/Otorisasi/User.js
View file @
ceb3ffc4
...
...
@@ -524,16 +524,17 @@ export default class UserRole extends Component {
}
uploadUser
()
{
console
.
log
(
JSON
.
stringify
(
this
.
state
.
payload
))
api
.
create
().
uploadUser
(
this
.
state
.
payload
).
then
(
response
=>
{
this
.
setState
({
buttonError
:
false
})
console
.
log
(
response
)
console
.
log
(
JSON
.
stringify
(
response
)
)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
getUser
()
this
.
setState
({
visibleUser
:
true
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
,
payload
:
[],
rows
:
[],
judul
:
''
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
payload
:
[],
rows
:
[],
judul
:
''
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
...
...
@@ -543,10 +544,10 @@ export default class UserRole extends Component {
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
,
payload
:
[],
rows
:
[],
judul
:
''
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
payload
:
[],
rows
:
[],
judul
:
''
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
})
}
...
...
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