pop-up notifications
This commit is contained in:
@ -6,6 +6,8 @@ import { getPartnerRequestInfo } from "@redux/outstaffingSlice";
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
|
||||
import { useNotification } from "@hooks/useNotification";
|
||||
|
||||
import { Footer } from "@components/Common/Footer/Footer";
|
||||
import { Navigation } from "@components/Navigation/Navigation";
|
||||
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
||||
@ -47,6 +49,7 @@ export const PartnerAddRequest = () => {
|
||||
"Выберите кол-во сотрудников"
|
||||
);
|
||||
const [inputs, setInputs] = useState({ title: "", description: "" });
|
||||
const { showNotification } = useNotification();
|
||||
|
||||
if (
|
||||
currentUrl[0] === "/profile/requests-edit" &&
|
||||
@ -120,6 +123,11 @@ export const PartnerAddRequest = () => {
|
||||
}
|
||||
}).then(() => {
|
||||
navigate("/profile/requests");
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Вакансия успешно изменена",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
} else {
|
||||
apiRequest("/request/create-request", {
|
||||
@ -138,6 +146,11 @@ export const PartnerAddRequest = () => {
|
||||
}
|
||||
}).then(() => {
|
||||
navigate("/profile/requests");
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Вакансия успешно создана",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -14,6 +14,8 @@ import { urlForLocal } from "@utils/helper";
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
|
||||
import { useNotification } from "@hooks/useNotification";
|
||||
|
||||
import { Footer } from "@components/Common/Footer/Footer";
|
||||
import { Loader } from "@components/Common/Loader/Loader";
|
||||
import ModalLayout from "@components/Common/ModalLayout/ModalLayout";
|
||||
@ -37,6 +39,7 @@ export const PartnerBid = () => {
|
||||
const requestId = useSelector(getPartnerRequestId);
|
||||
const partnerRequests = useSelector(getPartnerRequests);
|
||||
const navigate = useNavigate();
|
||||
const { showNotification } = useNotification();
|
||||
|
||||
if (!requestId) {
|
||||
return <Navigate to="/profile/requests" replace />;
|
||||
@ -61,6 +64,11 @@ export const PartnerBid = () => {
|
||||
}
|
||||
}).then(() => {
|
||||
navigate("/profile/requests");
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Вакансия удалена",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -256,7 +256,11 @@ export const ProjectTracker = () => {
|
||||
} else {
|
||||
dispatch(setProjectBoardFetch(projectBoard.id));
|
||||
}
|
||||
showNotification({ show: true, text: "Колонка удалена", type: "error" });
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Колонка удалена",
|
||||
type: "error"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -319,6 +323,11 @@ export const ProjectTracker = () => {
|
||||
...prevState,
|
||||
add: false
|
||||
}));
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Тег успешно создан",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -340,6 +349,11 @@ export const ProjectTracker = () => {
|
||||
}));
|
||||
setTagInfo({ description: "", name: "" });
|
||||
setColor("#aabbcc");
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Тег успешно изменён",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -353,6 +367,11 @@ export const ProjectTracker = () => {
|
||||
}
|
||||
}).then(() => {
|
||||
dispatch(deleteTagProject(tagId));
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Тег удален",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,8 @@ import { urlForLocal } from "@utils/helper";
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
|
||||
import { useNotification } from "@hooks/useNotification";
|
||||
|
||||
import { Footer } from "@components/Common/Footer/Footer";
|
||||
import { Navigation } from "@components/Navigation/Navigation";
|
||||
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
||||
@ -37,6 +39,7 @@ export const Summary = () => {
|
||||
const [selectedSkills, setSelectedSkills] = useState([]);
|
||||
const [selectSkillsOpen, setSelectSkillsOpen] = useState(false);
|
||||
const [skillsList, seSkillsList] = useState([]);
|
||||
const { showNotification } = useNotification();
|
||||
|
||||
useEffect(() => {
|
||||
apiRequest(
|
||||
@ -72,7 +75,13 @@ export const Summary = () => {
|
||||
data: {
|
||||
resume: summery
|
||||
}
|
||||
}).then(() => {});
|
||||
}).then(() => {
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Изменения успешно сохранены",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
}
|
||||
return (
|
||||
<div className="summary">
|
||||
|
@ -12,6 +12,8 @@ import {
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
|
||||
import { useNotification } from "@hooks/useNotification";
|
||||
|
||||
import { Footer } from "@components/Common/Footer/Footer";
|
||||
import { Loader } from "@components/Common/Loader/Loader";
|
||||
import { Navigation } from "@components/Navigation/Navigation";
|
||||
@ -38,6 +40,7 @@ export const ViewReport = () => {
|
||||
const [loader, setLoader] = useState(false);
|
||||
const [deleteLoader, setDeleteLoader] = useState(false);
|
||||
const [reportInfo, setReportInfo] = useState({});
|
||||
const { showNotification } = useNotification();
|
||||
|
||||
function getReportFromDate(day) {
|
||||
setLoader(true);
|
||||
@ -84,6 +87,11 @@ export const ViewReport = () => {
|
||||
if (res) {
|
||||
window.location.replace("/profile/calendar");
|
||||
}
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Отчет удален",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user