partner reg, fix employers bug, edit report

This commit is contained in:
Mikola committed 2024-02-09 17:58:52 +03:00
1 parent 2f61f7f130
commit b43a6a1fcf
11 files changed
+146 -27

No files matched your search

+4 -2
View File
@@ -6,11 +6,13 @@ export const useFormValidation = (
apiEndpoint,
fields,
showNotificationError,
showNotificationTrue
showNotificationTrue,
isPartner
) => {
// Состояние формы, содержащее значения полей
const [formData, setFormData] = useState(fields);
// Состояние ошибок валидации
const [validationErrors, setValidationErrors] = useState({});
@@ -84,7 +86,7 @@ export const useFormValidation = (
e.preventDefault();
// Проверка валидации формы
if (validateForm()) {
let newformData = { ...formData };
let newformData = { ...formData, is_partner: isPartner ? 1 : 0 };
delete newformData.secondPassword;
try {