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
b5ac7491
Commit
b5ac7491
authored
Aug 31, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rifka' into 'master'
update validasi dan taxplan See merge request
!210
parents
64ef8ee2
75f870df
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
40 deletions
+51
-40
CreateApprovalMatrix.js
src/container/ApprovalMatrix/CreateApprovalMatrix.js
+14
-10
EditApprovalMatrix.js
src/container/ApprovalMatrix/EditApprovalMatrix.js
+17
-11
TaxPlanning.js
src/container/BudgetTahunan/TaxPlanning.js
+20
-19
No files found.
src/container/ApprovalMatrix/CreateApprovalMatrix.js
View file @
b5ac7491
...
...
@@ -54,7 +54,8 @@ export default class CreateApprovalMatrix extends Component {
getUserData
()
{
api
.
create
().
getApprovedByAM
().
then
((
response
)
=>
{
if
(
response
.
status
==
null
){
alert
(
response
.
problem
)
// alert(response.problem)
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
else
if
(
response
.
data
.
status
==
'success'
)
{
let
data
=
response
.
data
.
data
...
...
@@ -71,7 +72,8 @@ export default class CreateApprovalMatrix extends Component {
};
this
.
setState
({
approvedBy
:
defaultProps
,
userData
:
response
.
data
.
data
})
}
else
{
alert
(
'Approver Name: '
+
response
.
data
.
message
)
// alert('Approver Name: ' +response.data.message)
this
.
setState
({
alert
:
true
,
messageAlert
:
'Approver Name: '
+
response
.
problem
,
tipeAlert
:
'error'
})
}
})
}
...
...
@@ -92,7 +94,8 @@ export default class CreateApprovalMatrix extends Component {
};
this
.
setState
({
types
:
typeProps
,
typeData
:
response
.
data
.
data
})
}
else
{
alert
(
'Approval Type: '
+
response
.
data
.
message
)
// alert('Approval Type: ' +response.data.message)
this
.
setState
({
alert
:
true
,
messageAlert
:
'Approval Type: '
+
response
.
problem
,
tipeAlert
:
'error'
})
}
})
}
...
...
@@ -114,7 +117,8 @@ export default class CreateApprovalMatrix extends Component {
};
this
.
setState
({
operators
:
operatorProps
,
operatorData
:
response
.
data
.
data
})
}
else
{
alert
(
'Operator: '
+
response
.
data
.
message
)
// alert('Operator: ' +response.data.message)
this
.
setState
({
alert
:
true
,
messageAlert
:
'Operator: '
+
response
.
problem
,
tipeAlert
:
'error'
})
}
})
}
...
...
@@ -157,22 +161,22 @@ export default class CreateApprovalMatrix extends Component {
validasi
()
{
if
(
R
.
isNil
(
this
.
state
.
typeId
))
{
this
.
setState
({
errorType
:
true
,
msgErrType
:
'Approval Type Cannot be Empty'
})
this
.
setState
({
errorType
:
true
,
msgErrType
:
'Approval Type Cannot be Empty
.
'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
order
))
{
this
.
setState
({
errorOrder
:
true
,
msgErrOrder
:
'Order Cannot be Empty'
})
this
.
setState
({
errorOrder
:
true
,
msgErrOrder
:
'Order Cannot be Empty
.
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
userId
))
{
// return alert("Pemberi Persetujuan tidak boleh kosong");
this
.
setState
({
errorApproved
:
true
,
msgErrApproved
:
'Approver Name Cannot be Empty'
})
this
.
setState
({
errorApproved
:
true
,
msgErrApproved
:
'Approver Name Cannot be Empty
.
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
operatorId
))
{
this
.
setState
({
errorOperator
:
true
,
msgErrOperator
:
'Operator Cannot be Empty'
})
this
.
setState
({
errorOperator
:
true
,
msgErrOperator
:
'Operator Cannot be Empty
.
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Valid From Cannot be Empty'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Valid From Cannot be Empty
.
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty
.
'
})
}
else
{
console
.
log
(
'masuk'
);
let
payload
=
{
...
...
src/container/ApprovalMatrix/EditApprovalMatrix.js
View file @
b5ac7491
...
...
@@ -13,6 +13,7 @@ export default class EditApprovalMatrix extends Component {
this
.
state
=
{
id
:
''
,
order
:
''
,
status
:
""
,
startDate
:
null
,
endDate
:
null
,
date
:
new
Date
(),
...
...
@@ -86,9 +87,12 @@ export default class EditApprovalMatrix extends Component {
options
:
userData
,
getOptionLabel
:
(
option
)
=>
option
.
fullname
,
};
this
.
setState
({
approvedBy
:
defaultProps
,
userData
:
response
.
data
.
data
,
getApprovedBy
:
index
==
-
1
?
userData
[
0
]:
userData
[
index
]
})
// this.setState({ approvedBy: defaultProps, userData: response.data.data, getApprovedBy: index == -1 ? userData[0]: userData[index] })
this
.
setState
({
approvedBy
:
defaultProps
,
userData
:
response
.
data
.
data
,
getApprovedBy
:
index
==
-
1
?
this
.
setState
({
errorApproved
:
true
,
msgErrApproved
:
'Approver Name has been Inactive.'
}):
userData
[
index
]
})
}
else
{
alert
(
'Pemberi Persetujuan: '
+
response
.
data
.
message
)
// alert('Pemberi Persetujuan: ' +response.data.message)
this
.
setState
({
alert
:
true
,
messageAlert
:
'Pemberi Persetujuan: '
+
response
.
data
.
message
,
tipeAlert
:
'error'
})
}
})
}
...
...
@@ -110,7 +114,8 @@ export default class EditApprovalMatrix extends Component {
};
this
.
setState
({
operators
:
operatorProps
,
operatorData
:
response
.
data
.
data
,
getOperators
:
index
==
-
1
?
operatorData
[
0
]:
operatorData
[
index
]
})
}
else
{
alert
(
'Operator: '
+
response
.
data
.
message
)
// alert('Operator: ' +response.data.message)
this
.
setState
({
alert
:
true
,
messageAlert
:
'Operator: '
+
response
.
data
.
message
,
tipeAlert
:
'error'
})
}
})
}
...
...
@@ -132,7 +137,8 @@ export default class EditApprovalMatrix extends Component {
};
this
.
setState
({
types
:
typeProps
,
typeData
:
response
.
data
.
data
,
getTypes
:
index
==
-
1
?
typeData
[
0
]:
typeData
[
index
]
})
}
else
{
alert
(
'Approval Type: '
+
response
.
data
.
message
)
// alert('Approval Type: ' +response.data.message)
this
.
setState
({
alert
:
true
,
messageAlert
:
'Approval Type: '
+
response
.
data
.
message
,
tipeAlert
:
'error'
})
}
})
}
...
...
@@ -176,21 +182,21 @@ export default class EditApprovalMatrix extends Component {
validasi
()
{
if
(
R
.
isNil
(
this
.
state
.
getTypes
))
{
this
.
setState
({
errorType
:
true
,
msgErrType
:
'Approval Type Cannot be Empty'
})
this
.
setState
({
errorType
:
true
,
msgErrType
:
'Approval Type Cannot be Empty
.
'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
order
))
{
this
.
setState
({
errorOrder
:
true
,
msgErrOrder
:
'Order Cannot be Empty'
})
this
.
setState
({
errorOrder
:
true
,
msgErrOrder
:
'Order Cannot be Empty
.
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getApprovedBy
))
{
this
.
setState
({
errorApproved
:
true
,
msgErrApproved
:
'Approver Name Cannot be Empty'
})
this
.
setState
({
errorApproved
:
true
,
msgErrApproved
:
'Approver Name Cannot be Empty
.
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getOperators
))
{
this
.
setState
({
errorOperator
:
true
,
msgErrOperator
:
'Operator Cannot be Empty'
})
this
.
setState
({
errorOperator
:
true
,
msgErrOperator
:
'Operator Cannot be Empty
.
'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Valid From Cannot be Empty'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Valid From Cannot be Empty
.
'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty
.
'
})
}
else
{
console
.
log
(
'masuk'
);
if
(
this
.
props
.
type
==
'edit'
)
{
...
...
src/container/BudgetTahunan/TaxPlanning.js
View file @
b5ac7491
...
...
@@ -145,6 +145,7 @@ export default class TaxPlanning extends Component {
}
else
{
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
}
this
.
forceUpdate
()
// console.log(this.state.dataTable)
// this.setState({
// data: a,
...
...
@@ -195,23 +196,23 @@ export default class TaxPlanning extends Component {
)
}
}
},
{
name
:
"31 Dec 2020 Actual"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
key
=
{
columnMeta
.
index
}
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
102
,
backgroundColor
:
'#354960'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style
:
{
position
:
"sticky"
,
left
:
420
,
background
:
"white"
,
zIndex
:
101
}
})
}
//
}, {
//
name: "31 Dec 2020 Actual",
//
options: {
//
customHeadRender: (columnMeta) => (
//
<TableCell key={columnMeta.index} style={{ ...style2, top: 0, zIndex: 102, backgroundColor: '#354960', width: 96 }}>
//
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
//
</TableCell>
//
),
//
setCellProps: () => ({
//
style: {
//
position: "sticky",
//
left: 420,
//
background: "white",
//
zIndex: 101
//
}
//
})
//
}
},
{
name
:
"January 2021"
,
options
:
{
...
...
@@ -234,7 +235,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
}
onChange
=
{
event
=>
{
// console.log(event.target)
...
...
@@ -304,7 +305,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'center'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
'100%'
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
}
onChange
=
{
event
=>
{
// console.log(event.target)
...
...
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