modal accept with notifications
This commit is contained in:
@ -31,6 +31,7 @@ import { Navigation } from "@components/Navigation/Navigation";
|
||||
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
||||
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
|
||||
import TrackerTaskComment from "@components/TrackerTaskComment/TrackerTaskComment";
|
||||
import AcceptModal from "@components/Modal/AcceptModal/AcceptModal";
|
||||
|
||||
import arrow from "assets/icons/arrows/arrowCalendar.png";
|
||||
import arrowStart from "assets/icons/arrows/arrowStart.png";
|
||||
@ -82,6 +83,7 @@ export const TicketFullScreen = () => {
|
||||
const [startDate, setStartDate] = useState(null);
|
||||
const [uploadedFile, setUploadedFile] = useState(null);
|
||||
const [taskFiles, setTaskFiles] = useState([]);
|
||||
const [acceptModalOpen, setAcceptModalOpen] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
apiRequest(`/task/get-task?task_id=${ticketId.id}`).then((taskInfo) => {
|
||||
@ -161,6 +163,10 @@ export const TicketFullScreen = () => {
|
||||
});
|
||||
}
|
||||
|
||||
function archiveTask () {
|
||||
setAcceptModalOpen(true)
|
||||
}
|
||||
|
||||
function editTask() {
|
||||
apiRequest("/task/update-task", {
|
||||
method: "PUT",
|
||||
@ -450,6 +456,10 @@ export const TicketFullScreen = () => {
|
||||
});
|
||||
}
|
||||
|
||||
function closeAcceptModal () {
|
||||
setAcceptModalOpen(false)
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="ticket-full-screen">
|
||||
<ProfileHeader />
|
||||
@ -976,7 +986,7 @@ export const TicketFullScreen = () => {
|
||||
<img src={link} alt="link"></img>
|
||||
<p onClick={copyTicketLink}>ссылка на задачу</p>
|
||||
</div>
|
||||
<div>
|
||||
<div onClick={archiveTask}>
|
||||
<img src={archive} alt="arch"></img>
|
||||
<p>в архив</p>
|
||||
</div>
|
||||
@ -990,6 +1000,12 @@ export const TicketFullScreen = () => {
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
{acceptModalOpen &&
|
||||
<AcceptModal
|
||||
closeModal={closeAcceptModal}
|
||||
agreeHandler={deleteTask}
|
||||
/>
|
||||
}
|
||||
<Footer />
|
||||
</section>
|
||||
);
|
||||
|
Reference in New Issue
Block a user