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
3aa796cb
Commit
3aa796cb
authored
Sep 17, 2020
by
EKSAD
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into riri
parents
bbbad0b4
e1084a51
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
357 additions
and
720 deletions
+357
-720
BudgetTahunan.js
src/container/BudgetTahunan.js
+4
-1
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+94
-631
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+71
-69
AuditTahunan.js
src/container/DocumentManagement/AuditTahunan.js
+43
-2
BOD.js
src/container/DocumentManagement/BOD.js
+43
-1
DocumentManagement.js
src/container/DocumentManagement/DocumentManagement.js
+15
-9
EditManagementDoc.js
src/container/DocumentManagement/EditManagementDoc.js
+16
-5
ManualBookTia.js
src/container/DocumentManagement/ManualBookTia.js
+28
-1
QReview.js
src/container/DocumentManagement/QReview.js
+43
-1
No files found.
src/container/BudgetTahunan.js
View file @
3aa796cb
...
@@ -312,7 +312,7 @@ export default class BudgetTahunan extends Component {
...
@@ -312,7 +312,7 @@ export default class BudgetTahunan extends Component {
saveToMasterBudget
(
data
)
{
saveToMasterBudget
(
data
)
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
// console.log(JSON.stringify(data));
// console.log(JSON.stringify(data));
api
.
create
().
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
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
@@ -674,6 +674,7 @@ export default class BudgetTahunan extends Component {
...
@@ -674,6 +674,7 @@ export default class BudgetTahunan extends Component {
)}
)}
{
this
.
state
.
visibleTP
&&
(
{
this
.
state
.
visibleTP
&&
(
<
TaxPlanning
<
TaxPlanning
open
=
{
this
.
props
.
open
}
report_id
=
{
this
.
state
.
report_id
}
report_id
=
{
this
.
state
.
report_id
}
height
=
{
this
.
props
.
height
}
height
=
{
this
.
props
.
height
}
width
=
{
this
.
props
.
width
}
width
=
{
this
.
props
.
width
}
...
@@ -683,6 +684,8 @@ export default class BudgetTahunan extends Component {
...
@@ -683,6 +684,8 @@ export default class BudgetTahunan extends Component {
submissionID
=
{
this
.
state
.
submissionID
}
submissionID
=
{
this
.
state
.
submissionID
}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleTP
:
false
,
visibleBudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleTP
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
getReport
.
bind
(
this
)}
getReportAttachment
=
{
this
.
getReportAttachment
.
bind
(
this
)}
/
>
/
>
)}
)}
{
this
.
state
.
visibleFAM
&&
(
{
this
.
state
.
visibleFAM
&&
(
...
...
src/container/BudgetTahunan/BalanceSheet.js
View file @
3aa796cb
...
@@ -31,18 +31,7 @@ export default class BalanceSheet extends Component {
...
@@ -31,18 +31,7 @@ export default class BalanceSheet extends Component {
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
super
(
props
)
this
.
state
=
{
this
.
state
=
{
dataTable
:
[
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"],
],
visibleBalanceSheet
:
true
,
visibleBalanceSheet
:
true
,
disabledSave
:
true
disabledSave
:
true
}
}
...
@@ -66,12 +55,12 @@ export default class BalanceSheet extends Component {
...
@@ -66,12 +55,12 @@ export default class BalanceSheet extends Component {
}
}
api
.
create
().
getDetailReportMB
(
payload
).
then
(
response
=>
{
api
.
create
().
getDetailReportMB
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
dataTable
=
[]
let
dataTable
=
[]
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
let
res
=
response
.
data
.
data
console
.
log
(
res
)
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
const
handlePushChild
=
(
item
)
=>
{
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
if
(
indexIDzz
===
-
1
)
{
dataTable
.
push
([
dataTable
.
push
([
item
.
type_report_id
,
item
.
type_report_id
,
item
.
id
,
item
.
id
,
...
@@ -96,564 +85,16 @@ export default class BalanceSheet extends Component {
...
@@ -96,564 +85,16 @@ export default class BalanceSheet extends Component {
item
.
balance_sheet
.
total_next_year
,
item
.
balance_sheet
.
total_next_year
,
item
.
balance_sheet
.
total_more_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
])
}
}
})
res
.
map
((
item
,
index
)
=>
{
}
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
{
dataTable
.
push
([
dataTable
.
push
([
item
.
type_report_id
,
item
.
type_report_id
,
item
.
id
,
item
.
id
,
...
@@ -678,15 +119,17 @@ export default class BalanceSheet extends Component {
...
@@ -678,15 +119,17 @@ export default class BalanceSheet extends Component {
item
.
balance_sheet
.
total_next_year
,
item
.
balance_sheet
.
total_next_year
,
item
.
balance_sheet
.
total_more_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
)
{
handleValue
(
data
)
{
...
@@ -908,6 +351,21 @@ export default class BalanceSheet extends Component {
...
@@ -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
()
{
render
()
{
let
dataTable2
=
this
.
state
.
dataTable
let
dataTable2
=
this
.
state
.
dataTable
const
handleChange
=
(
value
,
tableMeta
)
=>
{
const
handleChange
=
(
value
,
tableMeta
)
=>
{
...
@@ -2511,7 +1969,12 @@ export default class BalanceSheet extends Component {
...
@@ -2511,7 +1969,12 @@ export default class BalanceSheet extends Component {
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
margin
:
5
margin
:
5
}}
}}
onClick
=
{()
=>
null
}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
downloadAllData
()
},
100
);
})}
>
>
<
img
src
=
{
Images
.
download
}
/
>
<
img
src
=
{
Images
.
download
}
/
>
<
/button
>
<
/button
>
...
...
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
3aa796cb
...
@@ -670,7 +670,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -670,7 +670,7 @@ export default class FixedAssetsMovement extends Component {
])
])
}
}
})
})
//
console.log(dataTable);
console
.
log
(
dataTable
);
this
.
setState
({
dataTable
,
loading
:
false
})
this
.
setState
({
dataTable
,
loading
:
false
})
}
}
}
else
{
}
else
{
...
@@ -853,6 +853,8 @@ export default class FixedAssetsMovement extends Component {
...
@@ -853,6 +853,8 @@ export default class FixedAssetsMovement extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
width
:
300
}}
>
<
div
style
=
{{
width
:
300
}}
>
{
console
.
log
(
val
)}
{
console
.
log
(
tableMeta
)}
{
tableMeta
.
rowData
[
4
]
==
0
?
{
tableMeta
.
rowData
[
4
]
==
0
?
<
span
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
}}
>
{
String
(
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
).
toUpperCase
()}
<
/span
>
<
span
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
}}
>
{
String
(
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
).
toUpperCase
()}
<
/span
>
:
:
...
@@ -897,7 +899,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -897,7 +899,7 @@ export default class FixedAssetsMovement extends Component {
}
}
/
>
/
>
<
/div>
:
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -944,7 +946,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -944,7 +946,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
value
=
{
Number
(
value
)}
/
>
/
>
:
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -983,7 +985,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -983,7 +985,7 @@ export default class FixedAssetsMovement extends Component {
}
}
/
>
/
>
<
/div>
:
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -1005,7 +1007,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1005,7 +1007,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1015,7 +1017,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1015,7 +1017,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
1
?
tableMeta
.
rowData
[
0
]
===
1
?
...
@@ -1030,7 +1032,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1030,7 +1032,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
value
=
{
Number
(
value
)}
/
>
/
>
:
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -1069,7 +1071,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1069,7 +1071,7 @@ export default class FixedAssetsMovement extends Component {
}
}
/
>
/
>
<
/div>
:
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -1091,7 +1093,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1091,7 +1093,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1101,7 +1103,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1101,7 +1103,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
1
?
tableMeta
.
rowData
[
0
]
===
1
?
...
@@ -1116,7 +1118,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1116,7 +1118,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
value
=
{
Number
(
value
)}
/
>
/
>
:
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -1155,7 +1157,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1155,7 +1157,7 @@ export default class FixedAssetsMovement extends Component {
}
}
/
>
/
>
<
/div>
:
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -1177,7 +1179,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1177,7 +1179,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1187,7 +1189,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1187,7 +1189,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
1
?
tableMeta
.
rowData
[
0
]
===
1
?
...
@@ -1202,7 +1204,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1202,7 +1204,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
value
=
{
Number
(
value
)}
/
>
/
>
:
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -1241,7 +1243,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1241,7 +1243,7 @@ export default class FixedAssetsMovement extends Component {
}
}
/
>
/
>
<
/div>
:
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -1263,7 +1265,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1263,7 +1265,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1273,7 +1275,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1273,7 +1275,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
1
?
tableMeta
.
rowData
[
0
]
===
1
?
...
@@ -1288,7 +1290,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1288,7 +1290,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
value
=
{
Number
(
value
)}
/
>
/
>
:
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -1327,7 +1329,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1327,7 +1329,7 @@ export default class FixedAssetsMovement extends Component {
}
}
/
>
/
>
<
/div>
:
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -1349,7 +1351,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1349,7 +1351,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1359,7 +1361,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1359,7 +1361,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
1
?
tableMeta
.
rowData
[
0
]
===
1
?
...
@@ -1374,7 +1376,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1374,7 +1376,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
value
=
{
Number
(
value
)}
/
>
/
>
:
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -1413,7 +1415,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1413,7 +1415,7 @@ export default class FixedAssetsMovement extends Component {
}
}
/
>
/
>
<
/div>
:
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -1435,7 +1437,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1435,7 +1437,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1445,7 +1447,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1445,7 +1447,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
1
?
tableMeta
.
rowData
[
0
]
===
1
?
...
@@ -1460,7 +1462,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1460,7 +1462,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
value
=
{
Number
(
value
)}
/
>
/
>
:
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -1499,7 +1501,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1499,7 +1501,7 @@ export default class FixedAssetsMovement extends Component {
}
}
/
>
/
>
<
/div>
:
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -1521,7 +1523,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1521,7 +1523,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1531,7 +1533,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1531,7 +1533,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
1
?
tableMeta
.
rowData
[
0
]
===
1
?
...
@@ -1546,7 +1548,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1546,7 +1548,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
value
=
{
Number
(
value
)}
/
>
/
>
:
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -1585,7 +1587,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1585,7 +1587,7 @@ export default class FixedAssetsMovement extends Component {
}
}
/
>
/
>
<
/div>
:
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -1607,7 +1609,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1607,7 +1609,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1617,7 +1619,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1617,7 +1619,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
1
?
tableMeta
.
rowData
[
0
]
===
1
?
...
@@ -1632,7 +1634,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1632,7 +1634,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
value
=
{
Number
(
value
)}
/
>
/
>
:
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -1671,7 +1673,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1671,7 +1673,7 @@ export default class FixedAssetsMovement extends Component {
}
}
/
>
/
>
<
/div>
:
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -1693,7 +1695,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1693,7 +1695,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1703,7 +1705,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1703,7 +1705,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
1
?
tableMeta
.
rowData
[
0
]
===
1
?
...
@@ -1718,7 +1720,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1718,7 +1720,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
value
=
{
Number
(
value
)}
/
>
/
>
:
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -1757,7 +1759,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1757,7 +1759,7 @@ export default class FixedAssetsMovement extends Component {
}
}
/
>
/
>
<
/div>
:
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -1779,7 +1781,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1779,7 +1781,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1789,7 +1791,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1789,7 +1791,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
1
?
tableMeta
.
rowData
[
0
]
===
1
?
...
@@ -1804,7 +1806,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1804,7 +1806,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
value
=
{
Number
(
value
)}
/
>
/
>
:
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -1843,7 +1845,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1843,7 +1845,7 @@ export default class FixedAssetsMovement extends Component {
}
}
/
>
/
>
<
/div>
:
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -1865,7 +1867,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1865,7 +1867,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1875,7 +1877,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1875,7 +1877,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
1
?
tableMeta
.
rowData
[
0
]
===
1
?
...
@@ -1890,7 +1892,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1890,7 +1892,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
value
=
{
Number
(
value
)}
/
>
/
>
:
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -1929,7 +1931,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1929,7 +1931,7 @@ export default class FixedAssetsMovement extends Component {
}
}
/
>
/
>
<
/div>
:
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -1951,7 +1953,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1951,7 +1953,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1961,7 +1963,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1961,7 +1963,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
1
?
tableMeta
.
rowData
[
0
]
===
1
?
...
@@ -1976,7 +1978,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1976,7 +1978,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
value
=
{
Number
(
value
)}
/
>
/
>
:
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -2015,7 +2017,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -2015,7 +2017,7 @@ export default class FixedAssetsMovement extends Component {
}
}
/
>
/
>
<
/div>
:
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -2037,7 +2039,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -2037,7 +2039,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -2047,7 +2049,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -2047,7 +2049,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
1
?
tableMeta
.
rowData
[
0
]
===
1
?
...
@@ -2062,7 +2064,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -2062,7 +2064,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
value
=
{
Number
(
value
)}
/
>
/
>
:
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -2072,8 +2074,8 @@ export default class FixedAssetsMovement extends Component {
...
@@ -2072,8 +2074,8 @@ export default class FixedAssetsMovement extends Component {
name
:
"31 Dec 2022 Total"
,
name
:
"31 Dec 2022 Total"
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#3
54960
'
,
width
:
96
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#3
7b5e6
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'
white
'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
Typography
style
=
{{
color
:
'
black
'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
<
/TableCell
>
),
),
setCellProps
:
()
=>
({
style2
}),
setCellProps
:
()
=>
({
style2
}),
...
@@ -2101,7 +2103,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -2101,7 +2103,7 @@ export default class FixedAssetsMovement extends Component {
}
}
/
>
/
>
<
/div>
:
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -2123,7 +2125,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -2123,7 +2125,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -2133,7 +2135,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -2133,7 +2135,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
1
?
tableMeta
.
rowData
[
0
]
===
1
?
...
@@ -2148,7 +2150,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -2148,7 +2150,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
value
=
{
Number
(
value
)}
/
>
/
>
:
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -2158,8 +2160,8 @@ export default class FixedAssetsMovement extends Component {
...
@@ -2158,8 +2160,8 @@ export default class FixedAssetsMovement extends Component {
name
:
"31 Dec 2023 Total"
,
name
:
"31 Dec 2023 Total"
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#3
54960
'
,
width
:
96
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#3
7b5e6
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'
white
'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
Typography
style
=
{{
color
:
'
black
'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
<
/TableCell
>
),
),
setCellProps
:
()
=>
({
style2
}),
setCellProps
:
()
=>
({
style2
}),
...
@@ -2187,7 +2189,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -2187,7 +2189,7 @@ export default class FixedAssetsMovement extends Component {
}
}
/
>
/
>
<
/div>
:
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -2209,7 +2211,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -2209,7 +2211,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -2219,7 +2221,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -2219,7 +2221,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handle
Value
(
tableMeta
)}
value
=
{
handle
Formula
(
value
,
tableMeta
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
1
?
tableMeta
.
rowData
[
0
]
===
1
?
...
@@ -2234,7 +2236,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -2234,7 +2236,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
)}
value
=
{
Number
(
value
)}
/
>
/
>
:
:
<
span
>
validasi
<
/span
>
<
span
>
-
<
/span
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -2319,7 +2321,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -2319,7 +2321,7 @@ export default class FixedAssetsMovement extends Component {
<
/div
>
<
/div
>
<
/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
()}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
<
MUIDataTable
data
=
{
dataTable2
}
data
=
{
dataTable2
}
...
...
src/container/DocumentManagement/AuditTahunan.js
View file @
3aa796cb
...
@@ -9,6 +9,7 @@ import ReactTooltip from 'react-tooltip';
...
@@ -9,6 +9,7 @@ import ReactTooltip from 'react-tooltip';
import
PopUpDelete
from
"./PopUpDelete"
;
import
PopUpDelete
from
"./PopUpDelete"
;
import
api
from
'../../api'
;
import
api
from
'../../api'
;
import
CreateManagementDoc
from
'./CreateManagementDoc'
;
import
CreateManagementDoc
from
'./CreateManagementDoc'
;
import
EditManagementDoc
from
'./EditManagementDoc'
;
var
ct
=
require
(
"../../library/CustomTable"
);
var
ct
=
require
(
"../../library/CustomTable"
);
...
@@ -24,6 +25,7 @@ export default class AuditTahunan extends Component {
...
@@ -24,6 +25,7 @@ export default class AuditTahunan extends Component {
this
.
state
=
{
this
.
state
=
{
dataTable
:
[],
dataTable
:
[],
visibleCreate
:
false
,
visibleCreate
:
false
,
visibleEdit
:
false
,
refresh
:
''
,
refresh
:
''
,
alert
:
false
,
alert
:
false
,
popupDel
:
false
,
popupDel
:
false
,
...
@@ -122,7 +124,11 @@ export default class AuditTahunan extends Component {
...
@@ -122,7 +124,11 @@ export default class AuditTahunan extends Component {
})
})
}
}
if
(
type
===
'edit'
)
{
if
(
type
===
'edit'
)
{
alert
(
"edit"
)
this
.
setState
({
id
:
this
.
state
.
docId
[
val
],
rowData
:
index
,
visibleEdit
:
true
})
}
}
}
}
...
@@ -154,6 +160,32 @@ export default class AuditTahunan extends Component {
...
@@ -154,6 +160,32 @@ export default class AuditTahunan extends Component {
})
})
}
}
updateDocument
(
payload
)
{
api
.
create
().
updateDocument
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
getData
()
this
.
setState
({
konfirmasi
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
,
visibleEdit
:
false
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
})
}
closeAlert
()
{
closeAlert
()
{
this
.
setState
({
alert
:
false
})
this
.
setState
({
alert
:
false
})
...
@@ -252,6 +284,15 @@ export default class AuditTahunan extends Component {
...
@@ -252,6 +284,15 @@ export default class AuditTahunan extends Component {
deleteDoc
=
{
this
.
deleteDoc
.
bind
(
this
)}
deleteDoc
=
{
this
.
deleteDoc
.
bind
(
this
)}
/
>
/
>
)}
)}
{
this
.
state
.
visibleEdit
&&
(
<
EditManagementDoc
type
=
{
"edit"
}
onClickClose
=
{()
=>
this
.
setState
({
visibleEdit
:
false
})}
data
=
{
this
.
state
.
rowData
}
idoc
=
{
this
.
state
.
id
}
updateDocument
=
{
this
.
updateDocument
.
bind
(
this
)}
/
>
)}
<
/div
>
<
/div
>
)
)
}
}
...
...
src/container/DocumentManagement/BOD.js
View file @
3aa796cb
...
@@ -9,6 +9,7 @@ import Images from '../../assets/Images';
...
@@ -9,6 +9,7 @@ import Images from '../../assets/Images';
import
ReactTooltip
from
'react-tooltip'
;
import
ReactTooltip
from
'react-tooltip'
;
import
PopUpDelete
from
"./PopUpDelete"
;
import
PopUpDelete
from
"./PopUpDelete"
;
import
CreateManagementDoc
from
'./CreateManagementDoc'
;
import
CreateManagementDoc
from
'./CreateManagementDoc'
;
import
EditManagementDoc
from
'./EditManagementDoc'
;
var
ct
=
require
(
"../../library/CustomTable"
);
var
ct
=
require
(
"../../library/CustomTable"
);
...
@@ -24,6 +25,7 @@ export default class BOD extends Component {
...
@@ -24,6 +25,7 @@ export default class BOD extends Component {
this
.
state
=
{
this
.
state
=
{
dataTable
:
[],
dataTable
:
[],
visibleCreate
:
false
,
visibleCreate
:
false
,
visibleEdit
:
false
,
refresh
:
''
,
refresh
:
''
,
alert
:
false
,
alert
:
false
,
popupDel
:
false
,
popupDel
:
false
,
...
@@ -125,10 +127,41 @@ export default class BOD extends Component {
...
@@ -125,10 +127,41 @@ export default class BOD extends Component {
})
})
}
}
if
(
type
===
'edit'
)
{
if
(
type
===
'edit'
)
{
alert
(
"edit"
)
this
.
setState
({
id
:
this
.
state
.
docId
[
val
],
rowData
:
index
,
visibleEdit
:
true
})
}
}
}
}
updateDocument
(
payload
)
{
api
.
create
().
updateDocument
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
getData
()
this
.
setState
({
konfirmasi
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
,
visibleEdit
:
false
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
})
}
closeAlert
()
{
closeAlert
()
{
this
.
setState
({
alert
:
false
})
this
.
setState
({
alert
:
false
})
}
}
...
@@ -255,6 +288,15 @@ export default class BOD extends Component {
...
@@ -255,6 +288,15 @@ export default class BOD extends Component {
deleteDoc
=
{
this
.
deleteDoc
.
bind
(
this
)}
deleteDoc
=
{
this
.
deleteDoc
.
bind
(
this
)}
/
>
/
>
)}
)}
{
this
.
state
.
visibleEdit
&&
(
<
EditManagementDoc
type
=
{
"edit"
}
onClickClose
=
{()
=>
this
.
setState
({
visibleEdit
:
false
})}
data
=
{
this
.
state
.
rowData
}
idoc
=
{
this
.
state
.
id
}
updateDocument
=
{
this
.
updateDocument
.
bind
(
this
)}
/
>
)}
<
/div
>
<
/div
>
)
)
}
}
...
...
src/container/DocumentManagement/DocumentManagement.js
View file @
3aa796cb
...
@@ -186,6 +186,9 @@ export default class DocumentManagement extends Component {
...
@@ -186,6 +186,9 @@ export default class DocumentManagement extends Component {
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
padding
:
20
}}
>
<
Paper
style
=
{{
padding
:
20
}}
>
<
Paper
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
}}
>
{
this
.
state
.
btncreate
&&
<
span
>
<
a
data
-
tip
=
{
'Add'
}
data
-
for
=
"add"
>
<
div
style
=
{{
display
:
'grid'
,
justifyContent
:
'flex-end'
}}
>
<
div
style
=
{{
display
:
'grid'
,
justifyContent
:
'flex-end'
}}
>
<
button
<
button
type
=
"button"
type
=
"button"
...
@@ -195,6 +198,10 @@ export default class DocumentManagement extends Component {
...
@@ -195,6 +198,10 @@ export default class DocumentManagement extends Component {
<
img
src
=
{
Images
.
add
}
/
>
<
img
src
=
{
Images
.
add
}
/
>
<
/button
>
<
/button
>
<
/div
>
<
/div
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"add"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/span>
}
<
/div
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Tabs
<
Tabs
orientation
=
"vertical"
orientation
=
"vertical"
...
@@ -275,7 +282,6 @@ export default class DocumentManagement extends Component {
...
@@ -275,7 +282,6 @@ export default class DocumentManagement extends Component {
// getDataDocument={this.getDataDocument.bind(this)}
// getDataDocument={this.getDataDocument.bind(this)}
createDocument
=
{
this
.
createDocument
.
bind
(
this
)}
createDocument
=
{
this
.
createDocument
.
bind
(
this
)}
setting_id
=
{
this
.
state
.
id
}
setting_id
=
{
this
.
state
.
id
}
btncreate
=
{
this
.
state
.
btncreate
}
/
>
/
>
)}
)}
<
/div
>
<
/div
>
...
...
src/container/DocumentManagement/EditManagementDoc.js
View file @
3aa796cb
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
Images
from
'../../assets/Images'
import
Images
from
'../../assets/Images'
import
{
TextField
,
withStyles
,
Snackbar
}
from
'@material-ui/core'
import
{
TextField
,
withStyles
,
Snackbar
,
Typography
}
from
'@material-ui/core'
import
MuiAlert
from
'@material-ui/lab/Alert'
;
import
MuiAlert
from
'@material-ui/lab/Alert'
;
import
api
from
'../../api'
import
api
from
'../../api'
import
Autocomplete
from
'@material-ui/lab/Autocomplete'
import
Autocomplete
from
'@material-ui/lab/Autocomplete'
...
@@ -61,11 +61,11 @@ export default class EditManagementDoc extends Component {
...
@@ -61,11 +61,11 @@ export default class EditManagementDoc extends Component {
categoryId
:
data
.
setting_id
,
categoryId
:
data
.
setting_id
,
categoryName
:
data
.
values
,
categoryName
:
data
.
values
,
period
:
data
.
document_periode
,
period
:
data
.
document_periode
,
description
:
data
.
description
description
:
data
.
description
,
// id: data.approval_matrix_id,
// id: data.approval_matrix_id,
// status: data.status,
// status: data.status,
//
created: data.created,
created
:
data
.
created
,
//
updated: data.updated === null ? "" : data.updated
updated
:
data
.
updated
===
null
?
""
:
data
.
updated
},
()
=>
{
},
()
=>
{
this
.
getDataCompany
()
this
.
getDataCompany
()
this
.
getDataDocument
()
this
.
getDataDocument
()
...
@@ -225,8 +225,9 @@ export default class EditManagementDoc extends Component {
...
@@ -225,8 +225,9 @@ export default class EditManagementDoc extends Component {
formData
.
append
(
"documentPeriode"
,
this
.
state
.
periode
.
periode
);
formData
.
append
(
"documentPeriode"
,
this
.
state
.
periode
.
periode
);
formData
.
append
(
"description"
,
this
.
state
.
description
);
formData
.
append
(
"description"
,
this
.
state
.
description
);
formData
.
append
(
"extension"
,
this
.
state
.
fileType
);
formData
.
append
(
"extension"
,
this
.
state
.
fileType
);
formData
.
append
(
"documentId"
,
this
.
props
.
idoc
);
this
.
setState
({
formData
},
()
=>
{
this
.
setState
({
formData
},
()
=>
{
this
.
props
.
createDocument
(
this
.
state
.
formData
,
this
.
props
.
setting_id
)
this
.
props
.
updateDocument
(
this
.
state
.
formData
)
})
})
}
}
}
}
...
@@ -368,6 +369,16 @@ export default class EditManagementDoc extends Component {
...
@@ -368,6 +369,16 @@ export default class EditManagementDoc extends Component {
>
>
<
/TextField
>
<
/TextField
>
<
/div
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
paddingLeft
:
30
,
paddingRight
:
30
,
borderRadius
:
5
,
paddingBottom
:
20
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'12%'
}}
>
Created
By
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
:
{
this
.
state
.
created
}
<
/Typography
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'12%'
}}
>
Updated
By
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
:
{
this
.
state
.
updated
==
-
null
?
""
:
this
.
state
.
updated
}
<
/Typography
>
<
/div
>
<
/div
>
<
div
className
=
"border-top grid grid-2x"
style
=
{{
height
:
56
,
backgroundColor
:
'#f5f5f5'
,
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"border-top grid grid-2x"
style
=
{{
height
:
56
,
backgroundColor
:
'#f5f5f5'
,
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
style
=
{{
alignSelf
:
'center'
}}
>
<
div
className
=
"column-1"
style
=
{{
alignSelf
:
'center'
}}
>
<
button
<
button
...
...
src/container/DocumentManagement/ManualBookTia.js
View file @
3aa796cb
...
@@ -161,6 +161,33 @@ export default class ManualBookTia extends Component {
...
@@ -161,6 +161,33 @@ export default class ManualBookTia extends Component {
})
})
}
}
updateDocument
(
payload
)
{
api
.
create
().
updateDocument
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
getData
()
this
.
setState
({
konfirmasi
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
,
visibleEdit
:
false
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
})
}
render
()
{
render
()
{
let
columns
=
[{
let
columns
=
[{
name
:
"Action"
,
name
:
"Action"
,
...
@@ -260,7 +287,7 @@ export default class ManualBookTia extends Component {
...
@@ -260,7 +287,7 @@ export default class ManualBookTia extends Component {
onClickClose
=
{()
=>
this
.
setState
({
visibleEdit
:
false
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleEdit
:
false
})}
data
=
{
this
.
state
.
rowData
}
data
=
{
this
.
state
.
rowData
}
idoc
=
{
this
.
state
.
id
}
idoc
=
{
this
.
state
.
id
}
// updateAM={this.updateAM
.bind(this)}
updateDocument
=
{
this
.
updateDocument
.
bind
(
this
)}
/
>
/
>
)}
)}
<
/div
>
<
/div
>
...
...
src/container/DocumentManagement/QReview.js
View file @
3aa796cb
...
@@ -9,6 +9,7 @@ import ReactTooltip from 'react-tooltip';
...
@@ -9,6 +9,7 @@ import ReactTooltip from 'react-tooltip';
import
api
from
'../../api'
;
import
api
from
'../../api'
;
import
PopUpDelete
from
"./PopUpDelete"
;
import
PopUpDelete
from
"./PopUpDelete"
;
import
CreateManagementDoc
from
'./CreateManagementDoc'
;
import
CreateManagementDoc
from
'./CreateManagementDoc'
;
import
EditManagementDoc
from
'./EditManagementDoc'
;
var
ct
=
require
(
"../../library/CustomTable"
);
var
ct
=
require
(
"../../library/CustomTable"
);
...
@@ -24,6 +25,7 @@ export default class QReview extends Component {
...
@@ -24,6 +25,7 @@ export default class QReview extends Component {
this
.
state
=
{
this
.
state
=
{
dataTable
:
[],
dataTable
:
[],
visibleCreate
:
false
,
visibleCreate
:
false
,
visibleEdit
:
false
,
refresh
:
''
,
refresh
:
''
,
alert
:
false
,
alert
:
false
,
popupDel
:
false
,
popupDel
:
false
,
...
@@ -121,7 +123,11 @@ export default class QReview extends Component {
...
@@ -121,7 +123,11 @@ export default class QReview extends Component {
})
})
}
}
if
(
type
===
'edit'
)
{
if
(
type
===
'edit'
)
{
alert
(
"edit"
)
this
.
setState
({
id
:
this
.
state
.
docId
[
val
],
rowData
:
index
,
visibleEdit
:
true
})
}
}
}
}
...
@@ -157,6 +163,33 @@ export default class QReview extends Component {
...
@@ -157,6 +163,33 @@ export default class QReview extends Component {
})
})
}
}
updateDocument
(
payload
)
{
api
.
create
().
updateDocument
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
getData
()
this
.
setState
({
konfirmasi
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
,
visibleEdit
:
false
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
})
}
render
()
{
render
()
{
let
columns
=
[{
let
columns
=
[{
name
:
"Action"
,
name
:
"Action"
,
...
@@ -247,6 +280,15 @@ export default class QReview extends Component {
...
@@ -247,6 +280,15 @@ export default class QReview extends Component {
deleteDoc
=
{
this
.
deleteDoc
.
bind
(
this
)}
deleteDoc
=
{
this
.
deleteDoc
.
bind
(
this
)}
/
>
/
>
)}
)}
{
this
.
state
.
visibleEdit
&&
(
<
EditManagementDoc
type
=
{
"edit"
}
onClickClose
=
{()
=>
this
.
setState
({
visibleEdit
:
false
})}
data
=
{
this
.
state
.
rowData
}
idoc
=
{
this
.
state
.
id
}
updateDocument
=
{
this
.
updateDocument
.
bind
(
this
)}
/
>
)}
<
/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