Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
E
ESDP_froot.kz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
10
Issues
10
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
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
ESDP_froot.kz
ESDP_froot.kz
Commits
b744ffaa
Commit
b744ffaa
authored
May 05, 2021
by
kazba anuarbekov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#78
Убраны лишние строчки с контейнера AddRole
parent
9fc85f16
Pipeline
#277
failed with stages
in 3 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
19 deletions
+0
-19
AddRole.js
front/src/containers/AddRole/AddRole.js
+0
-19
No files found.
front/src/containers/AddRole/AddRole.js
View file @
b744ffaa
...
...
@@ -19,7 +19,6 @@ const AddRole = () => {
workEmail
:
""
,
phone
:
""
,
});
// const [checkDirector, setCheckDirector] = useState(false);
useEffect
(()
=>
{
dispatch
(
fetchUserByID
(
id
)).
then
(
stateData
=>
{
let
stateCopy
=
{};
...
...
@@ -30,9 +29,7 @@ const AddRole = () => {
});
},
[
dispatch
]);
const
checkStatus
=
(
name
)
=>
{
console
.
log
(
name
);
const
roleCopy
=
[...
state
.
role
];
if
((
name
===
'payPayment'
||
name
===
'initCancelPayedPayment'
||
name
===
'cancelPayedPayment'
)
&&
(
roleCopy
.
includes
(
'approvePayment'
)
||
roleCopy
.
includes
(
'initCancelApprovedPayment'
)
||
roleCopy
.
includes
(
'cancelApprovedPayment'
)))
{
return
true
...
...
@@ -46,20 +43,6 @@ const AddRole = () => {
console
.
log
(
event
.
target
);
const
role
=
event
.
target
.
value
const
roleCopy
=
[...
state
.
role
];
// const director = ['approvePayment', 'initCancelApprovedPayment', 'cancelApprovedPayment'];
// if (director.includes(role)) {
// console.log(1);
// const disabled = document.getElementById('payPayment');
// if (document.getElementById('approvePayment').checked) {
// console.log(2);
// disabled.setAttribute('disabled', true);
// }
// else {
// console.log(3);
// disabled.setAttribute('disabled', '')
// }
// }
if
(
roleCopy
.
includes
(
role
))
{
const
index
=
roleCopy
.
indexOf
(
role
);
...
...
@@ -77,8 +60,6 @@ const AddRole = () => {
return
{...
prevState
,
role
:
roleCopy
}
});
}
};
const
submitFormHandler
=
event
=>
{
...
...
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