loaders, outSelectClose, notifications
This commit is contained in:
parent
992afead80
commit
3a7929689d
@ -30,6 +30,7 @@ import { useNotification } from "@hooks/useNotification";
|
|||||||
|
|
||||||
import { getCorrectDate } from "@components/Calendar/calendarHelper";
|
import { getCorrectDate } from "@components/Calendar/calendarHelper";
|
||||||
import BaseButton from "@components/Common/BaseButton/BaseButton";
|
import BaseButton from "@components/Common/BaseButton/BaseButton";
|
||||||
|
import { Loader } from "@components/Common/Loader/Loader";
|
||||||
import ModalLayout from "@components/Common/ModalLayout/ModalLayout";
|
import ModalLayout from "@components/Common/ModalLayout/ModalLayout";
|
||||||
|
|
||||||
import arrowRight from "assets/icons/arrows/arrowRightCreateTask.svg";
|
import arrowRight from "assets/icons/arrows/arrowRightCreateTask.svg";
|
||||||
@ -40,7 +41,6 @@ import crossWhite from "assets/icons/crossWhite.svg";
|
|||||||
import avatarMok from "assets/images/avatarMok.png";
|
import avatarMok from "assets/images/avatarMok.png";
|
||||||
|
|
||||||
import "./trackerModal.scss";
|
import "./trackerModal.scss";
|
||||||
import { Loader } from "@components/Common/Loader/Loader";
|
|
||||||
|
|
||||||
registerLocale("ru", ru);
|
registerLocale("ru", ru);
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ export const TrackerModal = ({
|
|||||||
const [deadLineDate, setDeadLineDate] = useState("");
|
const [deadLineDate, setDeadLineDate] = useState("");
|
||||||
const [datePickerOpen, setDatePickerOpen] = useState(false);
|
const [datePickerOpen, setDatePickerOpen] = useState(false);
|
||||||
const [startDate, setStartDate] = useState(new Date());
|
const [startDate, setStartDate] = useState(new Date());
|
||||||
const [loader, setLoader] = useState(false)
|
const [loader, setLoader] = useState(false);
|
||||||
|
|
||||||
const priority = [
|
const priority = [
|
||||||
{
|
{
|
||||||
@ -140,7 +140,7 @@ export const TrackerModal = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
setLoader(true)
|
setLoader(true);
|
||||||
|
|
||||||
apiRequest("/task/create-task", {
|
apiRequest("/task/create-task", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
@ -162,7 +162,7 @@ export const TrackerModal = ({
|
|||||||
text: "Задача с таким именем уже существует",
|
text: "Задача с таким именем уже существует",
|
||||||
type: "error"
|
type: "error"
|
||||||
});
|
});
|
||||||
setLoader(false)
|
setLoader(false);
|
||||||
} else {
|
} else {
|
||||||
for (let i = 0; i < taskTags.length; i++) {
|
for (let i = 0; i < taskTags.length; i++) {
|
||||||
apiRequest("/mark/attach", {
|
apiRequest("/mark/attach", {
|
||||||
@ -190,11 +190,11 @@ export const TrackerModal = ({
|
|||||||
setDescriptionTicket("");
|
setDescriptionTicket("");
|
||||||
setSelectedExecutorTask("Выберите исполнителя");
|
setSelectedExecutorTask("Выберите исполнителя");
|
||||||
setSelectedPriority(null);
|
setSelectedPriority(null);
|
||||||
setLoader(false)
|
setLoader(false);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
setActive(false);
|
setActive(false);
|
||||||
setLoader(false)
|
setLoader(false);
|
||||||
setValueTicket("");
|
setValueTicket("");
|
||||||
setDescriptionTicket("");
|
setDescriptionTicket("");
|
||||||
dispatch(setProjectBoardFetch(projectBoard.id));
|
dispatch(setProjectBoardFetch(projectBoard.id));
|
||||||
@ -709,11 +709,13 @@ export const TrackerModal = ({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{loader ? <Loader style={'green'} /> :
|
{loader ? (
|
||||||
|
<Loader style={"green"} />
|
||||||
|
) : (
|
||||||
<BaseButton styles={"button-add"} onClick={createTicket}>
|
<BaseButton styles={"button-add"} onClick={createTicket}>
|
||||||
Создать
|
Создать
|
||||||
</BaseButton>
|
</BaseButton>
|
||||||
}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
@ -155,15 +155,15 @@ export const PartnerAddRequest = () => {
|
|||||||
(div) =>
|
(div) =>
|
||||||
div.classList &&
|
div.classList &&
|
||||||
(div.classList.contains("form__block__section__selects") ||
|
(div.classList.contains("form__block__section__selects") ||
|
||||||
div.classList.contains("form__block__dropDown")
|
div.classList.contains("form__block__dropDown") ||
|
||||||
|| div.classList.contains("form__block__skills") ||
|
div.classList.contains("form__block__skills") ||
|
||||||
div.classList.contains("form__block__section__select"))
|
div.classList.contains("form__block__section__select"))
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setOpenSkillsSelect(false)
|
setOpenSkillsSelect(false);
|
||||||
setOpenSpecializationListOpen(false)
|
setOpenSpecializationListOpen(false);
|
||||||
setOpenLevelList(false)
|
setOpenLevelList(false);
|
||||||
setOpenCountList(false)
|
setOpenCountList(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user