Commit b744ffaa authored by kazba anuarbekov's avatar kazba anuarbekov

#78 Убраны лишние строчки с контейнера AddRole

parent 9fc85f16
Pipeline #277 failed with stages
in 3 seconds
......@@ -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
......@@ -47,20 +44,6 @@ const AddRole = () => {
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);
if (index > -1) {
......@@ -77,8 +60,6 @@ const AddRole = () => {
return {...prevState, role: roleCopy}
});
}
};
const submitFormHandler = event => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment