Skip to content

Commit

Permalink
Merge pull request #1891 from ever-co/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
evereq authored Nov 28, 2023
2 parents 35fe1e3 + 2c693c4 commit 19da8cb
Show file tree
Hide file tree
Showing 11 changed files with 2,994 additions and 2,599 deletions.
13 changes: 13 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"words": [
"appdev",
"adipiscing",
"amet",
"aliqua",
"signin",
"APPSTORE",
"barcodes",
Expand All @@ -19,7 +22,12 @@
"clsxm",
"commitlint",
"compodoc",
"consectetur",
"dolor",
"dolore",
"dummyimage",
"eiusmod",
"elit",
"envalid",
"everco",
"everteamsdesktop",
Expand All @@ -31,11 +39,14 @@
"heroicons",
"Huhn",
"icnsutils",
"incididunt",
"isdragging",
"isdraggingfrom",
"isdropdisabled",
"ipsum",
"JITSU",
"kanban",
"Lorem",
"libappindicator",
"lucide",
"mathieudutour",
Expand All @@ -56,6 +67,7 @@
"testid",
"Timesheet",
"tanstack",
"tempor",
"vcpu",
"Vercel",
"HUBSTAFF",
Expand All @@ -78,6 +90,7 @@
"hyperscript",
"nocheck",
"locatio",
"labore",
"falsey",
"unhang",
"popperjs",
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ WIP

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)

### Koyeb

[![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?name=ever-teams&type=docker&builder=dockerfile&image=ghcr.io/ever-co/ever-teams-webapp:latest&env[PORT]=3000&ports=3000;http;/)

## 📄 Content

- `/web` - NextJs-based (React) Web App at <https://app.ever.team> (deployed from `main` branch)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,70 +1,66 @@
/* eslint-disable react-native/no-color-literals */
/* eslint-disable react-native/no-inline-styles */
import { StyleSheet, TouchableWithoutFeedback, View } from "react-native"
import React, { useCallback, useMemo, useState } from "react"
import Accordion from "../../../Accordion"
import { AntDesign, Entypo } from "@expo/vector-icons"
import { useStores } from "../../../../models"
import { useTeamTasks } from "../../../../services/hooks/features/useTeamTasks"
import { ITeamTask } from "../../../../services/interfaces/ITask"
import TaskLinkedIssue from "../components/TaskLinkedIssue"
import CreateLinkedIssueModal from "../components/CreateLinkedIssueModal"
import { StyleSheet, TouchableWithoutFeedback, View } from 'react-native';
import React, { useCallback, useMemo, useState } from 'react';
import Accordion from '../../../Accordion';
import { AntDesign, Entypo } from '@expo/vector-icons';
import { useStores } from '../../../../models';
import { useTeamTasks } from '../../../../services/hooks/features/useTeamTasks';
import { ITeamTask } from '../../../../services/interfaces/ITask';
import TaskLinkedIssue from '../components/TaskLinkedIssue';
import CreateLinkedIssueModal from '../components/CreateLinkedIssueModal';

const ChildIssues = () => {
const {
TaskStore: { detailedTask: task },
} = useStores()
const { teamTasks: tasks, updateTask } = useTeamTasks()
TaskStore: { detailedTask: task }
} = useStores();
const { teamTasks: tasks, updateTask } = useTeamTasks();

const [modalOpen, setModalOpen] = useState<boolean>(false)
const [isLoading, setIsLoading] = useState<boolean>(false)
const [modalOpen, setModalOpen] = useState<boolean>(false);
const [isLoading, setIsLoading] = useState<boolean>(false);

const childTasks = useMemo(() => {
const children = task?.children?.reduce((acc, item) => {
const $item = tasks.find((ts) => ts?.id === item?.id) || item
const $item = tasks.find((ts) => ts?.id === item?.id) || item;
if ($item) {
acc.push($item)
acc.push($item);
}
return acc
}, [] as ITeamTask[])
return acc;
}, [] as ITeamTask[]);

return children || []
}, [task, tasks])
return children || [];
}, [task, tasks]);

const onTaskSelect = useCallback(async (childTask: ITeamTask | undefined) => {
setIsLoading(true)
setIsLoading(true);
const updatedTask: ITeamTask = {
...childTask,
parentId: task?.id,
parent: task,
}
parent: task
};
await updateTask(updatedTask, childTask?.id).finally(() => {
setIsLoading(false)
setModalOpen(false)
})
}, [])
setIsLoading(false);
setModalOpen(false);
});
}, []);

const isTaskEpic = task?.issueType === "Epic"
const isTaskStory = task?.issueType === "Story"
const childrenTasks = task?.children?.map((t) => t?.id) || []
const isTaskEpic = task?.issueType === 'Epic';
const isTaskStory = task?.issueType === 'Story';
const childrenTasks = task?.children?.map((t) => t?.id) || [];

const unchildTasks = tasks.filter((childTask) => {
const hasChild = () => {
if (isTaskEpic) {
return childTask.issueType !== "Epic"
return childTask.issueType !== 'Epic';
} else if (isTaskStory) {
return childTask.issueType !== "Epic" && childTask.issueType !== "Story"
return childTask.issueType !== 'Epic' && childTask.issueType !== 'Story';
} else {
return (
childTask.issueType === "Bug" ||
childTask.issueType === "Task" ||
childTask.issueType === null
)
return childTask.issueType === 'Bug' || childTask.issueType === 'Task' || childTask.issueType === null;
}
}
};

return childTask?.id !== task?.id && !childrenTasks.includes(childTask?.id) && hasChild()
})
return childTask?.id !== task?.id && !childrenTasks.includes(childTask?.id) && hasChild();
});

return (
<Accordion
Expand Down Expand Up @@ -96,12 +92,12 @@ const ChildIssues = () => {
<TaskLinkedIssue key={task?.id} task={task} />
))}
</Accordion>
)
}
);
};

export default ChildIssues
export default ChildIssues;

const styles = StyleSheet.create({
headerElement: { alignItems: "center", flexDirection: "row", gap: 10 },
verticalSeparator: { borderRightColor: "#B1AEBC", borderRightWidth: 1, height: 20 },
})
headerElement: { alignItems: 'center', flexDirection: 'row', gap: 10 },
verticalSeparator: { borderRightColor: '#B1AEBC', borderRightWidth: 1, height: 20 }
});
Loading

0 comments on commit 19da8cb

Please sign in to comment.