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
8e7966d4
Commit
8e7966d4
authored
Sep 21, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into deni-dev(pc)
parents
473070f8
89571848
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
475 additions
and
126 deletions
+475
-126
index.js
src/api/index.js
+2
-1
ApprovalMatrix.js
src/container/ApprovalMatrix/ApprovalMatrix.js
+24
-20
BudgetTahunan.js
src/container/BudgetTahunan.js
+1
-2
TaxPlanning.js
src/container/BudgetTahunan/TaxPlanning.js
+76
-51
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 @
8e7966d4
...
...
@@ -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/ApprovalMatrix/ApprovalMatrix.js
View file @
8e7966d4
import
React
,
{
Component
}
from
'react'
;
import
{
Container
,
Row
,
Col
}
from
"react-bootstrap"
;
import
{
makeStyles
,
createMuiTheme
,
MuiThemeProvider
,
withStyles
}
from
'@material-ui/core/styles'
;
import
{
TextField
,
InputBase
,
Snackbar
}
from
"@material-ui/core"
;
import
{
makeStyles
,
createMuiTheme
,
MuiThemeProvider
}
from
'@material-ui/core/styles'
;
import
{
TextField
,
InputBase
,
Snackbar
,
withStyles
,
Tooltip
}
from
"@material-ui/core"
;
import
{
ExcelRenderer
}
from
'react-excel-renderer'
;
import
Images
from
'../../assets/Images'
;
import
MUIDataTable
from
"mui-datatables"
;
...
...
@@ -17,6 +17,16 @@ import api from "../../api";
import
Constant
from
'../../library/Constant'
;
import
{
css
}
from
"@emotion/core"
;
import
PropagateLoader
from
"react-spinners/PropagateLoader"
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
.
customTable
());
const
options
=
ct
.
customOptions
();
...
...
@@ -66,7 +76,6 @@ export default class ApprovalMatrix extends Component {
let
isi
=
resp
.
rows
.
slice
(
3
)
let
payload
=
[]
isi
.
map
((
item
,
index
)
=>
{
console
.
log
(
item
)
if
(
item
.
length
>
0
)
{
payload
.
push
({
id
:
index
+
1
,
...
...
@@ -173,12 +182,11 @@ export default class ApprovalMatrix extends Component {
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
7
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
data
-
for
=
"email"
>
<
LightTooltip
title
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
arrow
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
/
a
>
:
<
/
LightTooltip
>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
}
<
ReactTooltip
border
=
{
true
}
id
=
"email"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
);
}
...
...
@@ -198,12 +206,11 @@ export default class ApprovalMatrix extends Component {
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
7
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
data
-
for
=
"fullname"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
/
a
>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
LightTooltip
title
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
arrow
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
/
LightTooltip
>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
}
<
ReactTooltip
border
=
{
true
}
id
=
"fullname"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
);
}
...
...
@@ -223,12 +230,11 @@ export default class ApprovalMatrix extends Component {
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
7
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
data
-
for
=
"operatorname"
>
<
LightTooltip
title
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
arrow
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
/
a
>
:
<
/
LightTooltip
>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
}
<
ReactTooltip
border
=
{
true
}
id
=
"operatorname"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
);
}
...
...
@@ -248,12 +254,11 @@ export default class ApprovalMatrix extends Component {
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
7
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
data
-
for
=
"startdate"
>
<
LightTooltip
title
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
arrow
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
/
a
>
:
<
/
LightTooltip
>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
}
<
ReactTooltip
border
=
{
true
}
id
=
"startdate"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
);
}
...
...
@@ -273,12 +278,11 @@ export default class ApprovalMatrix extends Component {
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
7
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
data
-
for
=
"enddate"
>
<
LightTooltip
title
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
arrow
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
/
a
>
:
<
/
LightTooltip
>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
}
<
ReactTooltip
border
=
{
true
}
id
=
"enddate"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
);
}
...
...
src/container/BudgetTahunan.js
View file @
8e7966d4
...
...
@@ -646,8 +646,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 @
8e7966d4
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
()
{
...
...
@@ -138,7 +143,7 @@ export default class TaxPlanning extends Component {
}
}
})
this
.
setState
({
dataTable
,
loading
:
fals
e
})
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
tru
e
})
})
}
...
...
@@ -146,7 +151,7 @@ export default class TaxPlanning extends Component {
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
]))
}
})
...
...
@@ -227,6 +232,21 @@ export default class TaxPlanning 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
=
'Tax Planning.xlsx'
;
a
.
click
();
}
}
render
()
{
let
dataTable2
=
this
.
state
.
dataTable
const
handleChange
=
(
value
,
tableMeta
,
indexChilds
)
=>
{
...
...
@@ -3520,7 +3540,7 @@ export default class TaxPlanning extends Component {
{
/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> */
}
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
textAlign
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
,
padding
Bottom
:
8
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
textAlign
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
,
padding
Top
:
8
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
,
paddingBottom
:
20
}}
>
<
div
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
<
span
>
{
"Trial Balance (Fiscal)"
}
<
/span
>
...
...
@@ -4207,7 +4227,12 @@ export default class TaxPlanning extends Component {
borderColor
:
'transparent'
,
margin
:
5
}}
onClick
=
{()
=>
null
}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
downloadAllData
()
},
100
);
})}
>
<
img
src
=
{
Images
.
download
}
/
>
<
/button
>
...
...
@@ -4217,7 +4242,7 @@ export default class TaxPlanning extends Component {
<
/div
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
,
height
:
this
.
props
.
height
-
400
}}
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
{
!
this
.
state
.
loading
&&
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
data
=
{
dataTable2
}
...
...
src/container/DocumentManagement/AllDocument.js
0 → 100644
View file @
8e7966d4
This diff is collapsed.
Click to expand it.
src/container/DocumentManagement/DocumentManagement.js
View file @
8e7966d4
...
...
@@ -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
<
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 === 68545
?
// <ManualBookETMS
// 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}
// />
:
<
span
>
Coming
Soon
<
/span
>
// // :
// // 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