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 {
fileHandler
=
(
event
)
=>
{
let
fileObj
=
event
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
//
console.log(resp)
console
.
log
(
resp
)
if
(
err
)
{
console
.
log
(
err
);
}
...
...
@@ -63,12 +63,14 @@ 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
,
approval_type_name
:
item
[
0
]
===
undefined
?
""
:
item
[
0
],
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
],
start_date
:
item
[
4
]
===
undefined
?
""
:
item
[
4
],
end_date
:
item
[
5
]
===
undefined
?
""
:
item
[
5
],
...
...
@@ -95,6 +97,7 @@ export default class ApprovalMatrix extends Component {
return
[
item
.
approval_type_name
,
item
.
orders
,
item
.
email
,
item
.
fullname
,
item
.
operator_type_name
,
item
.
start_date
,
...
...
@@ -108,16 +111,16 @@ export default class ApprovalMatrix extends Component {
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
if
(
tableMeta
.
rowData
[
6
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
6
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'approval_type_name'
))
if
(
tableMeta
.
rowData
[
7
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
7
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'approval_type_name'
))
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
}
}
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
6
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
6
][
check
].
message
}
data
-
for
=
"approvaltype"
>
{
tableMeta
.
rowData
[
7
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
data
-
for
=
"approvaltype"
>
<
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
>
...
...
@@ -133,16 +136,16 @@ export default class ApprovalMatrix extends Component {
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
if
(
tableMeta
.
rowData
[
6
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
6
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'orders'
))
if
(
tableMeta
.
rowData
[
7
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
7
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'orders'
))
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
}
}
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
6
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
6
][
check
].
message
}
data
-
for
=
"order"
>
{
tableMeta
.
rowData
[
7
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
data
-
for
=
"order"
>
<
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
>
...
...
@@ -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"
,
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
if
(
tableMeta
.
rowData
[
6
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
6
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'fullname'
))
if
(
tableMeta
.
rowData
[
7
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
7
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'fullname'
))
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
}
}
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
6
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
6
][
check
].
message
}
data
-
for
=
"fullname"
>
{
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
>
...
...
@@ -183,16 +211,16 @@ export default class ApprovalMatrix extends Component {
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
if
(
tableMeta
.
rowData
[
6
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
6
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'operator_type_name'
))
if
(
tableMeta
.
rowData
[
7
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
7
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'operator_type_name'
))
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
}
}
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
6
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
6
][
check
].
message
}
data
-
for
=
"operatorname"
>
{
tableMeta
.
rowData
[
7
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
data
-
for
=
"operatorname"
>
<
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
>
...
...
@@ -208,16 +236,16 @@ export default class ApprovalMatrix extends Component {
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
if
(
tableMeta
.
rowData
[
6
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
6
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'start_date'
))
if
(
tableMeta
.
rowData
[
7
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
7
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'start_date'
))
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
}
}
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
6
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
6
][
check
].
message
}
data
-
for
=
"startdate"
>
{
tableMeta
.
rowData
[
7
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
data
-
for
=
"startdate"
>
<
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
>
...
...
@@ -233,16 +261,16 @@ export default class ApprovalMatrix extends Component {
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
if
(
tableMeta
.
rowData
[
6
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
6
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'end_date'
))
if
(
tableMeta
.
rowData
[
7
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
7
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'end_date'
))
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
}
}
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
6
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
6
][
check
].
message
}
data
-
for
=
"enddate"
>
{
tableMeta
.
rowData
[
7
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
7
][
check
].
message
}
data
-
for
=
"enddate"
>
<
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
>
...
...
@@ -580,6 +608,7 @@ export default class ApprovalMatrix extends Component {
filter
:
false
,
sort
:
false
,
customBodyRender
:
(
val
,
tableMeta
)
=>
{
console
.
log
(
tableMeta
)
return
(
this
.
state
.
btnedit
&&
(
<
div
style
=
{{
display
:
'flex'
}}
>
...
...
src/container/BudgetTahunan.js
View file @
8d4d3d4e
...
...
@@ -612,7 +612,11 @@ export default class BudgetTahunan extends Component {
{
this
.
state
.
visibleTP
&&
(
<
TaxPlanning
report_id
=
{
this
.
state
.
report_id
}
height
=
{
this
.
props
.
height
}
width
=
{
this
.
props
.
width
}
company
=
{
this
.
state
.
company
}
revision
=
{
this
.
state
.
revisionTable
}
periode
=
{
this
.
state
.
periode
.
periode
}
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';
import
ReactTooltip
from
"react-tooltip"
;
import
PopUpFailedSave
from
"../../library/PopUpFailedSave"
;
import
Constant
from
"../../library/Constant"
;
import
PopUpDelete
from
"../ApprovalMatrix/PopUpDelete"
;
import
PopUpDelete
from
"../ApprovalMatrix/PopUpDelete
AM
"
;
var
ct
=
require
(
"../../library/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