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
2d443edd
Commit
2d443edd
authored
Sep 20, 2020
by
Rifka Kurnia Irfiana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update managdoc taxplan
parent
df24f678
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
428 additions
and
103 deletions
+428
-103
index.js
src/api/index.js
+2
-1
BudgetTahunan.js
src/container/BudgetTahunan.js
+1
-2
TaxPlanning.js
src/container/BudgetTahunan/TaxPlanning.js
+53
-48
AllDocument.js
src/container/DocumentManagement/AllDocument.js
+310
-0
DocumentManagement.js
src/container/DocumentManagement/DocumentManagement.js
+62
-52
No files found.
src/api/index.js
View file @
2d443edd
...
...
@@ -206,7 +206,8 @@ const create = (type = "") => {
const
uploadFoto
=
(
body
)
=>
api
.
post
(
'attachment/upload_foto'
,
body
)
// MANAGEMENT DOCUMENT
const
getDocumentCategory
=
(
body
)
=>
api
.
post
(
'setting/get_all_setting_document_category'
,
body
)
// const getDocumentCategory = (body) => api.post('setting/get_all_setting_document_category', body)
const
getDocumentCategory
=
()
=>
api
.
get
(
'setting/get_all_setting_document_category'
)
const
getAllDocument
=
(
body
)
=>
api
.
post
(
'document/get_all_document'
,
body
)
const
uploadDocument
=
(
body
)
=>
api
.
post
(
'document/upload_document'
,
body
)
const
updateDocument
=
(
body
)
=>
api
.
post
(
'document/update_document'
,
body
)
...
...
src/container/BudgetTahunan.js
View file @
2d443edd
...
...
@@ -683,8 +683,7 @@ export default class BudgetTahunan extends Component {
submissionID
=
{
this
.
state
.
submissionID
}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleTP
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
getReport
.
bind
(
this
)}
getReportAttachment
=
{
this
.
getReportAttachment
.
bind
(
this
)}
getReport
=
{
this
.
getCompanyActive
.
bind
(
this
)}
/
>
)}
{
this
.
state
.
visibleFAM
&&
(
...
...
src/container/BudgetTahunan/TaxPlanning.js
View file @
2d443edd
import
React
,
{
Component
}
from
'react'
;
import
{
Typography
,
Paper
,
createMuiTheme
,
MuiThemeProvider
,
TableCell
,
FormControlLabel
,
TextField
,
Input
}
from
'@material-ui/core'
;
import
{
Typography
,
Paper
,
createMuiTheme
,
MuiThemeProvider
,
TableCell
,
FormControlLabel
,
TextField
,
Input
,
Tooltip
,
withStyles
}
from
'@material-ui/core'
;
import
MUIDataTable
from
'mui-datatables'
;
import
NumberFormat
from
'react-number-format'
;
import
api
from
'../../api'
;
...
...
@@ -8,6 +8,17 @@ import { values } from 'ramda';
import
PropagateLoader
from
"react-spinners/PropagateLoader"
import
Images
from
'../../assets/Images'
;
import
ReactTooltip
from
'react-tooltip'
;
import
UploadFile
from
"../../library/Upload"
;
import
{
ExcelRenderer
}
from
'react-excel-renderer'
;
const
LightTooltip
=
withStyles
((
theme
)
=>
({
tooltip
:
{
backgroundColor
:
theme
.
palette
.
common
.
white
,
color
:
'rgba(0, 0, 0, 0.87)'
,
boxShadow
:
theme
.
shadows
[
1
],
fontSize
:
11
,
},
}))(
Tooltip
);
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable3
());
...
...
@@ -30,20 +41,14 @@ export default class TaxPlanning 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
,
editable
:
false
,
buttonError
:
false
}
this
.
handleValue
=
this
.
handleValue
.
bind
(
this
)
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
componentDidMount
()
{
...
...
@@ -106,47 +111,47 @@ export default class TaxPlanning extends Component {
res
.
map
((
item
,
index
)
=>
{
dataTable
.
push
([
item
.
type_report_id
,
item
.
type_report_tax
.
value_tbc
.
type_report_id
,
item
.
type_report_tax
.
value_fc
.
type_report_id
,
item
.
type_report_tax
.
value_tbf
.
type_report_id
,
item
.
id
,
item
.
parent
,
item
.
formula
,
item
.
level
,
item
.
description
,
{
tbc
:
item
.
tax_planning
.
january
.
tbc
,
fcp
:
item
.
tax_planning
.
january
.
fcp
,
tbf
:
item
.
tax_planning
.
january
.
tbf
},
{
tbc
:
item
.
tax_planning
.
february
.
tbc
,
fcp
:
item
.
tax_planning
.
february
.
fcp
,
tbf
:
item
.
tax_planning
.
february
.
tbf
},
{
tbc
:
item
.
tax_planning
.
march
.
tbc
,
fcp
:
item
.
tax_planning
.
march
.
fcp
,
tbf
:
item
.
tax_planning
.
march
.
tbf
},
{
tbc
:
item
.
tax_planning
.
april
.
tbc
,
fcp
:
item
.
tax_planning
.
april
.
fcp
,
tbf
:
item
.
tax_planning
.
april
.
tbf
},
{
tbc
:
item
.
tax_planning
.
may
.
tbc
,
fcp
:
item
.
tax_planning
.
may
.
fcp
,
tbf
:
item
.
tax_planning
.
may
.
tbf
},
{
tbc
:
item
.
tax_planning
.
june
.
tbc
,
fcp
:
item
.
tax_planning
.
june
.
fcp
,
tbf
:
item
.
tax_planning
.
june
.
tbf
},
{
tbc
:
item
.
tax_planning
.
july
.
tbc
,
fcp
:
item
.
tax_planning
.
july
.
fcp
,
tbf
:
item
.
tax_planning
.
july
.
tbf
},
{
tbc
:
item
.
tax_planning
.
august
.
tbc
,
fcp
:
item
.
tax_planning
.
august
.
fcp
,
tbf
:
item
.
tax_planning
.
august
.
tbf
},
{
tbc
:
item
.
tax_planning
.
september
.
tbc
,
fcp
:
item
.
tax_planning
.
september
.
fcp
,
tbf
:
item
.
tax_planning
.
september
.
tbf
},
{
tbc
:
item
.
tax_planning
.
october
.
tbc
,
fcp
:
item
.
tax_planning
.
october
.
fcp
,
tbf
:
item
.
tax_planning
.
october
.
tbf
},
{
tbc
:
item
.
tax_planning
.
november
.
tbc
,
fcp
:
item
.
tax_planning
.
november
.
fcp
,
tbf
:
item
.
tax_planning
.
november
.
tbf
},
{
tbc
:
item
.
tax_planning
.
december
.
tbc
,
fcp
:
item
.
tax_planning
.
december
.
fcp
,
tbf
:
item
.
tax_planning
.
december
.
tbf
},
item
.
tax_planning
.
total_current_year
,
{
tbc
:
item
.
tax_planning
.
total_next_year
.
tbc
,
fcp
:
item
.
tax_planning
.
total_next_year
.
fcp
,
tbf
:
item
.
tax_planning
.
total_next_year
.
tbf
},
{
tbc
:
item
.
tax_planning
.
total_more_year
.
tbc
,
fcp
:
item
.
tax_planning
.
total_more_year
.
fcp
,
tbf
:
item
.
tax_planning
.
total_more_year
.
tbf
}
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
handlePushChild
(
items
)
})
}
item
.
type_report_tax
.
value_tbc
.
type_report_id
,
item
.
type_report_tax
.
value_fc
.
type_report_id
,
item
.
type_report_tax
.
value_tbf
.
type_report_id
,
item
.
id
,
item
.
parent
,
item
.
formula
,
item
.
level
,
item
.
description
,
{
tbc
:
item
.
tax_planning
.
january
.
tbc
,
fcp
:
item
.
tax_planning
.
january
.
fcp
,
tbf
:
item
.
tax_planning
.
january
.
tbf
},
{
tbc
:
item
.
tax_planning
.
february
.
tbc
,
fcp
:
item
.
tax_planning
.
february
.
fcp
,
tbf
:
item
.
tax_planning
.
february
.
tbf
},
{
tbc
:
item
.
tax_planning
.
march
.
tbc
,
fcp
:
item
.
tax_planning
.
march
.
fcp
,
tbf
:
item
.
tax_planning
.
march
.
tbf
},
{
tbc
:
item
.
tax_planning
.
april
.
tbc
,
fcp
:
item
.
tax_planning
.
april
.
fcp
,
tbf
:
item
.
tax_planning
.
april
.
tbf
},
{
tbc
:
item
.
tax_planning
.
may
.
tbc
,
fcp
:
item
.
tax_planning
.
may
.
fcp
,
tbf
:
item
.
tax_planning
.
may
.
tbf
},
{
tbc
:
item
.
tax_planning
.
june
.
tbc
,
fcp
:
item
.
tax_planning
.
june
.
fcp
,
tbf
:
item
.
tax_planning
.
june
.
tbf
},
{
tbc
:
item
.
tax_planning
.
july
.
tbc
,
fcp
:
item
.
tax_planning
.
july
.
fcp
,
tbf
:
item
.
tax_planning
.
july
.
tbf
},
{
tbc
:
item
.
tax_planning
.
august
.
tbc
,
fcp
:
item
.
tax_planning
.
august
.
fcp
,
tbf
:
item
.
tax_planning
.
august
.
tbf
},
{
tbc
:
item
.
tax_planning
.
september
.
tbc
,
fcp
:
item
.
tax_planning
.
september
.
fcp
,
tbf
:
item
.
tax_planning
.
september
.
tbf
},
{
tbc
:
item
.
tax_planning
.
october
.
tbc
,
fcp
:
item
.
tax_planning
.
october
.
fcp
,
tbf
:
item
.
tax_planning
.
october
.
tbf
},
{
tbc
:
item
.
tax_planning
.
november
.
tbc
,
fcp
:
item
.
tax_planning
.
november
.
fcp
,
tbf
:
item
.
tax_planning
.
november
.
tbf
},
{
tbc
:
item
.
tax_planning
.
december
.
tbc
,
fcp
:
item
.
tax_planning
.
december
.
fcp
,
tbf
:
item
.
tax_planning
.
december
.
tbf
},
item
.
tax_planning
.
total_current_year
,
{
tbc
:
item
.
tax_planning
.
total_next_year
.
tbc
,
fcp
:
item
.
tax_planning
.
total_next_year
.
fcp
,
tbf
:
item
.
tax_planning
.
total_next_year
.
tbf
},
{
tbc
:
item
.
tax_planning
.
total_more_year
.
tbc
,
fcp
:
item
.
tax_planning
.
total_more_year
.
fcp
,
tbf
:
item
.
tax_planning
.
total_more_year
.
tbf
}
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
handlePushChild
(
items
)
})
}
})
this
.
setState
({
dataTable
,
loading
:
false
})
}
})
}
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
})
})
}
handleValue
(
data
)
{
let
total
=
0
this
.
state
.
dataTable
.
map
((
item
,
index
)
=>
{
if
(
data
.
rowData
[
1
]
==
item
[
2
])
{
if
(
data
.
rowData
[
4
]
==
item
[
5
])
{
total
=
item
[
data
.
columnIndex
]
==
undefined
?
(
Number
(
total
)
+
0
)
:
(
Number
(
total
)
+
Number
(
item
[
data
.
columnIndex
]))
}
})
...
...
src/container/DocumentManagement/AllDocument.js
0 → 100644
View file @
2d443edd
This diff is collapsed.
Click to expand it.
src/container/DocumentManagement/DocumentManagement.js
View file @
2d443edd
...
...
@@ -6,6 +6,7 @@ import ManualBookTia from './ManualBookTia'
import
api
from
'../../api'
import
AuditTahunan
from
'./AuditTahunan'
import
CreateManagementDoc
from
'./CreateManagementDoc'
import
AllDocument
from
'./AllDocument'
import
QReview
from
'./QReview'
import
BOD
from
'./BOD'
import
ManualBookETMS
from
'./ManualBookETMS'
...
...
@@ -57,7 +58,7 @@ export default class DocumentManagement extends Component {
selectTab
=
(
event
,
newEvent
)
=>
{
this
.
setState
({
tab
:
newEvent
})
console
.
log
(
this
.
state
.
tab
)
//
console.log(this.state.tab)
}
componentDidMount
()
{
...
...
@@ -66,13 +67,13 @@ export default class DocumentManagement extends Component {
}
getDataDocument
(
id
)
{
let
payload
=
{
"setting_group_id"
:
7
,
"setting_type_id"
:
167
,
"company_id"
:
0
//
let payload = {
//
"setting_group_id": 7,
//
"setting_type_id": 167,
//
"company_id": 0
}
api
.
create
().
getDocumentCategory
(
payload
).
then
(
response
=>
{
//
}
api
.
create
().
getDocumentCategory
().
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
...
@@ -82,7 +83,7 @@ export default class DocumentManagement extends Component {
loadTable
:
true
,
refresh
:
id
===
undefined
?
''
:
'create'
})
console
.
log
(
this
.
state
.
listData
)
//
console.log(this.state.listData)
}
else
{
}
...
...
@@ -176,6 +177,7 @@ export default class DocumentManagement extends Component {
render
()
{
return
(
<
div
style
=
{{
height
:
this
.
props
.
height
,
backgroundColor
:
'#f8f8f8'
}}
>
{
/* {this.props.load && ()} */
}
<
Snackbar
open
=
{
this
.
state
.
alert
}
autoHideDuration
=
{
6000
}
onClose
=
{()
=>
this
.
closeAlert
()}
>
<
Alert
onClose
=
{()
=>
this
.
closeAlert
()}
severity
=
{
this
.
state
.
tipeAlert
}
>
{
this
.
state
.
messageAlert
}
...
...
@@ -214,56 +216,64 @@ export default class DocumentManagement extends Component {
{
this
.
state
.
listData
.
map
((
item
,
index
)
=>
{
return
(
<
Tab
onClick
=
{()
=>
this
.
setState
({
id
:
item
.
setting_id
})}
onClick
=
{()
=>
this
.
setState
({
id
:
item
.
setting_id
,
refresh
:
''
})}
label
=
{
item
.
value
}
/
>
)
})}
<
/Tabs
>
{
this
.
state
.
loadTable
&&
(
this
.
state
.
id
===
68542
?
<
AuditTahunan
data
=
{
this
.
state
.
listData
[
this
.
state
.
tab
]}
refresh
=
{
this
.
state
.
refresh
}
btnedit
=
{
this
.
state
.
btnedit
}
btndelete
=
{
this
.
state
.
btndelete
}
load
=
{
this
.
state
.
load
}
/
>
:
this
.
state
.
id
===
68541
?
<
ManualBookTia
data
=
{
this
.
state
.
listData
[
this
.
state
.
tab
]}
refresh
=
{
this
.
state
.
refresh
}
btnedit
=
{
this
.
state
.
btnedit
}
btndelete
=
{
this
.
state
.
btndelete
}
load
=
{
this
.
state
.
load
}
/
>
:
this
.
state
.
id
===
68544
?
<
QReview
data
=
{
this
.
state
.
listData
[
this
.
state
.
tab
]}
refresh
=
{
this
.
state
.
refresh
}
btnedit
=
{
this
.
state
.
btnedit
}
btndelete
=
{
this
.
state
.
btndelete
}
load
=
{
this
.
state
.
load
}
/
>
:
this
.
state
.
id
===
68543
?
<
BOD
data
=
{
this
.
state
.
listData
[
this
.
state
.
tab
]}
refresh
=
{
this
.
state
.
refresh
}
btnedit
=
{
this
.
state
.
btnedit
}
btndelete
=
{
this
.
state
.
btndelete
}
load
=
{
this
.
state
.
load
}
/
>
// :
// this.state.id === 68545 ?
// <ManualBookETMS
// data={this.state.listData[this.state.tab]}
// refresh={this.state.refresh}
// />
:
<
span
>
Coming
Soon
<
/span
>
<
AllDocument
data
=
{
this
.
state
.
listData
[
this
.
state
.
tab
]}
refresh
=
{
this
.
state
.
refresh
}
btnedit
=
{
this
.
state
.
btnedit
}
btndelete
=
{
this
.
state
.
btndelete
}
load
=
{
this
.
state
.
load
}
setId
=
{
this
.
state
.
id
}
/
>
// this.state.id === 68542 ?
// <AuditTahunan
// data={this.state.listData[this.state.tab]}
// refresh={this.state.refresh}
// btnedit={this.state.btnedit}
// btndelete={this.state.btndelete}
// load={this.state.load}
// />
// :
// this.state.id === 68541 ?
// <ManualBookTia
// data={this.state.listData[this.state.tab]}
// refresh={this.state.refresh}
// btnedit={this.state.btnedit}
// btndelete={this.state.btndelete}
// load={this.state.load}
// />
// :
// this.state.id === 68544 ?
// <QReview
// data={this.state.listData[this.state.tab]}
// refresh={this.state.refresh}
// btnedit={this.state.btnedit}
// btndelete={this.state.btndelete}
// load={this.state.load}
// />
// :
// this.state.id === 68543 ?
// <BOD
// data={this.state.listData[this.state.tab]}
// refresh={this.state.refresh}
// btnedit={this.state.btnedit}
// btndelete={this.state.btndelete}
// load={this.state.load}
// />
// // :
// // this.state.id === 68545 ?
// // <ManualBookETMS
// // data={this.state.listData[this.state.tab]}
// // refresh={this.state.refresh}
// // />
// :
// <span>Coming Soon</span>
)}
<
/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