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
8d4d3d4e
Commit
8d4d3d4e
authored
Sep 07, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rifka' into 'master'
add email column in upload preview apprv See merge request
!257
parents
4a5b3424
1d481be1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
27 deletions
+60
-27
ApprovalMatrix.js
src/container/ApprovalMatrix/ApprovalMatrix.js
+55
-26
BudgetTahunan.js
src/container/BudgetTahunan.js
+4
-0
User.js
src/container/Otorisasi/User.js
+1
-1
No files found.
src/container/ApprovalMatrix/ApprovalMatrix.js
View file @
8d4d3d4e
...
@@ -55,7 +55,7 @@ export default class ApprovalMatrix extends Component {
...
@@ -55,7 +55,7 @@ export default class ApprovalMatrix extends Component {
fileHandler
=
(
event
)
=>
{
fileHandler
=
(
event
)
=>
{
let
fileObj
=
event
let
fileObj
=
event
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
//
console.log(resp)
console
.
log
(
resp
)
if
(
err
)
{
if
(
err
)
{
console
.
log
(
err
);
console
.
log
(
err
);
}
}
...
@@ -63,12 +63,14 @@ export default class ApprovalMatrix extends Component {
...
@@ -63,12 +63,14 @@ export default class ApprovalMatrix extends Component {
let
isi
=
resp
.
rows
.
slice
(
3
)
let
isi
=
resp
.
rows
.
slice
(
3
)
let
payload
=
[]
let
payload
=
[]
isi
.
map
((
item
,
index
)
=>
{
isi
.
map
((
item
,
index
)
=>
{
console
.
log
(
item
)
if
(
item
.
length
>
0
)
{
if
(
item
.
length
>
0
)
{
payload
.
push
({
payload
.
push
({
id
:
index
+
1
,
id
:
index
+
1
,
approval_type_name
:
item
[
0
]
===
undefined
?
""
:
item
[
0
],
approval_type_name
:
item
[
0
]
===
undefined
?
""
:
item
[
0
],
orders
:
item
[
1
]
===
undefined
?
""
:
item
[
1
],
orders
:
item
[
1
]
===
undefined
?
""
:
item
[
1
],
fullname
:
item
[
2
]
===
undefined
?
""
:
item
[
2
],
email
:
item
[
2
]
===
undefined
?
""
:
item
[
2
],
// fullname: item[2] === undefined ? "" : item[2],
operator_type_name
:
item
[
3
]
===
undefined
?
""
:
item
[
3
],
operator_type_name
:
item
[
3
]
===
undefined
?
""
:
item
[
3
],
start_date
:
item
[
4
]
===
undefined
?
""
:
item
[
4
],
start_date
:
item
[
4
]
===
undefined
?
""
:
item
[
4
],
end_date
:
item
[
5
]
===
undefined
?
""
:
item
[
5
],
end_date
:
item
[
5
]
===
undefined
?
""
:
item
[
5
],
...
@@ -95,6 +97,7 @@ export default class ApprovalMatrix extends Component {
...
@@ -95,6 +97,7 @@ export default class ApprovalMatrix extends Component {
return
[
return
[
item
.
approval_type_name
,
item
.
approval_type_name
,
item
.
orders
,
item
.
orders
,
item
.
email
,
item
.
fullname
,
item
.
fullname
,
item
.
operator_type_name
,
item
.
operator_type_name
,
item
.
start_date
,
item
.
start_date
,
...
@@ -108,16 +111,16 @@ export default class ApprovalMatrix extends Component {
...
@@ -108,16 +111,16 @@ export default class ApprovalMatrix extends Component {
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
let
check
=
null
if
(
tableMeta
.
rowData
[
6
]
!=
null
)
{
if
(
tableMeta
.
rowData
[
7
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
6
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'approval_type_name'
))
check
=
tableMeta
.
rowData
[
7
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'approval_type_name'
))
if
(
check
>
-
1
)
{
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
this
.
setState
({
buttonError
:
true
})
}
}
}
}
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
6
]
!=
null
&&
check
>
-
1
?
{
tableMeta
.
rowData
[
7
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
6
][
check
].
message
}
data
-
for
=
"approvaltype"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
data
-
for
=
"approvaltype"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
/a>
:
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
...
@@ -133,16 +136,16 @@ export default class ApprovalMatrix extends Component {
...
@@ -133,16 +136,16 @@ export default class ApprovalMatrix extends Component {
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
let
check
=
null
if
(
tableMeta
.
rowData
[
6
]
!=
null
)
{
if
(
tableMeta
.
rowData
[
7
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
6
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'orders'
))
check
=
tableMeta
.
rowData
[
7
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'orders'
))
if
(
check
>
-
1
)
{
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
this
.
setState
({
buttonError
:
true
})
}
}
}
}
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
6
]
!=
null
&&
check
>
-
1
?
{
tableMeta
.
rowData
[
7
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
6
][
check
].
message
}
data
-
for
=
"order"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
data
-
for
=
"order"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
/a>
:
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
...
@@ -153,21 +156,46 @@ export default class ApprovalMatrix extends Component {
...
@@ -153,21 +156,46 @@ export default class ApprovalMatrix extends Component {
}
}
}
}
},
},
{
name
:
"Approver Email"
,
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
if
(
tableMeta
.
rowData
[
7
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
7
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'email'
))
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
}
}
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
7
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
data
-
for
=
"email"
>
<
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
>
}
<
ReactTooltip
border
=
{
true
}
id
=
"email"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
);
}
}
},
{
{
name
:
"Approver Name"
,
name
:
"Approver Name"
,
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
let
check
=
null
if
(
tableMeta
.
rowData
[
6
]
!=
null
)
{
if
(
tableMeta
.
rowData
[
7
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
6
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'fullname'
))
check
=
tableMeta
.
rowData
[
7
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'fullname'
))
if
(
check
>
-
1
)
{
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
this
.
setState
({
buttonError
:
true
})
}
}
}
}
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
6
]
!=
null
&&
check
>
-
1
?
{
tableMeta
.
rowData
[
7
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
6
][
check
].
message
}
data
-
for
=
"fullname"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
data
-
for
=
"fullname"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
/a>
:
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
...
@@ -183,16 +211,16 @@ export default class ApprovalMatrix extends Component {
...
@@ -183,16 +211,16 @@ export default class ApprovalMatrix extends Component {
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
let
check
=
null
if
(
tableMeta
.
rowData
[
6
]
!=
null
)
{
if
(
tableMeta
.
rowData
[
7
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
6
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'operator_type_name'
))
check
=
tableMeta
.
rowData
[
7
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'operator_type_name'
))
if
(
check
>
-
1
)
{
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
this
.
setState
({
buttonError
:
true
})
}
}
}
}
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
6
]
!=
null
&&
check
>
-
1
?
{
tableMeta
.
rowData
[
7
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
6
][
check
].
message
}
data
-
for
=
"operatorname"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
data
-
for
=
"operatorname"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
/a>
:
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
...
@@ -208,16 +236,16 @@ export default class ApprovalMatrix extends Component {
...
@@ -208,16 +236,16 @@ export default class ApprovalMatrix extends Component {
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
let
check
=
null
if
(
tableMeta
.
rowData
[
6
]
!=
null
)
{
if
(
tableMeta
.
rowData
[
7
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
6
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'start_date'
))
check
=
tableMeta
.
rowData
[
7
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'start_date'
))
if
(
check
>
-
1
)
{
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
this
.
setState
({
buttonError
:
true
})
}
}
}
}
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
6
]
!=
null
&&
check
>
-
1
?
{
tableMeta
.
rowData
[
7
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
6
][
check
].
message
}
data
-
for
=
"startdate"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
data
-
for
=
"startdate"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
/a>
:
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
...
@@ -233,16 +261,16 @@ export default class ApprovalMatrix extends Component {
...
@@ -233,16 +261,16 @@ export default class ApprovalMatrix extends Component {
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
let
check
=
null
if
(
tableMeta
.
rowData
[
6
]
!=
null
)
{
if
(
tableMeta
.
rowData
[
7
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
6
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'end_date'
))
check
=
tableMeta
.
rowData
[
7
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'end_date'
))
if
(
check
>
-
1
)
{
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
this
.
setState
({
buttonError
:
true
})
}
}
}
}
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
6
]
!=
null
&&
check
>
-
1
?
{
tableMeta
.
rowData
[
7
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
6
][
check
].
message
}
data
-
for
=
"enddate"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
data
-
for
=
"enddate"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
/a>
:
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"Empty"
:
val
}
<
/span
>
...
@@ -580,6 +608,7 @@ export default class ApprovalMatrix extends Component {
...
@@ -580,6 +608,7 @@ export default class ApprovalMatrix extends Component {
filter
:
false
,
filter
:
false
,
sort
:
false
,
sort
:
false
,
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
console
.
log
(
tableMeta
)
return
(
return
(
this
.
state
.
btnedit
&&
(
this
.
state
.
btnedit
&&
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
...
...
src/container/BudgetTahunan.js
View file @
8d4d3d4e
...
@@ -612,7 +612,11 @@ export default class BudgetTahunan extends Component {
...
@@ -612,7 +612,11 @@ export default class BudgetTahunan extends Component {
{
this
.
state
.
visibleTP
&&
(
{
this
.
state
.
visibleTP
&&
(
<
TaxPlanning
<
TaxPlanning
report_id
=
{
this
.
state
.
report_id
}
report_id
=
{
this
.
state
.
report_id
}
height
=
{
this
.
props
.
height
}
width
=
{
this
.
props
.
width
}
company
=
{
this
.
state
.
company
}
company
=
{
this
.
state
.
company
}
revision
=
{
this
.
state
.
revisionTable
}
periode
=
{
this
.
state
.
periode
.
periode
}
onClickClose
=
{()
=>
this
.
setState
({
visibleTP
:
false
,
visibleBudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleTP
:
false
,
visibleBudgetTahunan
:
true
})}
/
>
/
>
)}
)}
...
...
src/container/Otorisasi/User.js
View file @
8d4d3d4e
...
@@ -15,7 +15,7 @@ import { ExcelRenderer } from 'react-excel-renderer';
...
@@ -15,7 +15,7 @@ import { ExcelRenderer } from 'react-excel-renderer';
import
ReactTooltip
from
"react-tooltip"
;
import
ReactTooltip
from
"react-tooltip"
;
import
PopUpFailedSave
from
"../../library/PopUpFailedSave"
;
import
PopUpFailedSave
from
"../../library/PopUpFailedSave"
;
import
Constant
from
"../../library/Constant"
;
import
Constant
from
"../../library/Constant"
;
import
PopUpDelete
from
"../ApprovalMatrix/PopUpDelete"
;
import
PopUpDelete
from
"../ApprovalMatrix/PopUpDelete
AM
"
;
var
ct
=
require
(
"../../library/CustomTable"
);
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
...
...
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