Skip to content

Commit

Permalink
Merge pull request #1961 from ever-co/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
evereq authored Dec 6, 2023
2 parents 274e614 + 6146da1 commit feca696
Show file tree
Hide file tree
Showing 26 changed files with 922 additions and 620 deletions.
3 changes: 2 additions & 1 deletion Layerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ RUN apt-get update && \

RUN REPEATABLE docker pull everco/ever-teams-webapp

RUN REPEATABLE docker run -d -p 3000:3000 everco/ever-teams-webapp && sleep 5
RUN REPEATABLE (docker rm ever-teams --force || true) &&\
docker run --name ever-teams -d -p 3000:3000 everco/ever-teams-webapp && sleep 5

EXPOSE WEBSITE localhost:3000
3 changes: 2 additions & 1 deletion Layerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ COPY . .

RUN REPEATABLE docker build -t ever-teams .

RUN REPEATABLE docker run -d -p 3000:3000 ever-teams && sleep 5
RUN REPEATABLE (docker rm ever-teams --force || true) &&\
docker run --name ever-teams -d -p 3000:3000 ever-teams && sleep 5

EXPOSE WEBSITE localhost:3000
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ WIP

[![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;/)

### Northflank

[Deploy to Northflank](https://app.northflank.com/s/account/templates/new?data=656ed069216b5d387f5379c6)

## 📄 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
Expand Up @@ -148,6 +148,7 @@ const TaskMainInfo = observer(() => {
>
<TaskVersion
task={task}
canCreateVersion={true}
containerStyle={{
width: '70%',
borderRadius: 3
Expand Down Expand Up @@ -187,6 +188,7 @@ const TaskMainInfo = observer(() => {
>
<TaskStatus
task={task}
canCreateStatus={true}
containerStyle={{
width: '70%',
borderRadius: 3,
Expand Down Expand Up @@ -226,6 +228,7 @@ const TaskMainInfo = observer(() => {
>
<TaskSize
task={task}
canCreateSize={true}
containerStyle={{
width: '70%',
borderRadius: 3,
Expand All @@ -245,6 +248,7 @@ const TaskMainInfo = observer(() => {
>
<TaskPriority
task={task}
canCreatePriority={true}
containerStyle={{
width: '70%',
borderRadius: 3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,21 @@ const ManageAssignees: React.FC<IManageAssignees> = ({ memberList, task }) => {
const assignedToTaskMembers = useMemo(
() =>
memberList?.filter((member) =>
member.employee ? task?.members.map((item) => item.userId).includes(member.employee?.userId) : false
member.employee
? task?.members.map((item) => item.userId).includes(member.employee?.userId) &&
member.employee?.isActive
: false
),
[memberList, task?.members]
);

const unassignedMembers = useMemo(
() =>
memberList?.filter((member) =>
member.employee ? !task?.members.map((item) => item.userId).includes(member.employee.userId) : false
member.employee
? !task?.members.map((item) => item.userId).includes(member.employee.userId) &&
member.employee?.isActive
: false
),
[memberList, task?.members]
);
Expand Down
103 changes: 51 additions & 52 deletions apps/mobile/app/components/TaskPriority.tsx
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
/* eslint-disable react-native/no-color-literals */
/* eslint-disable react-native/no-inline-styles */
import React, { FC, useState } from "react"
import { TouchableOpacity, View, Text, StyleSheet, ViewStyle } from "react-native"
import { AntDesign, Entypo } from "@expo/vector-icons"
import { observer } from "mobx-react-lite"
import { ITeamTask } from "../services/interfaces/ITask"
import { useTeamTasks } from "../services/hooks/features/useTeamTasks"
import { typography, useAppTheme } from "../theme"
import TaskPriorityPopup from "./TaskPriorityPopup"
import { translate } from "../i18n"
import { useTaskPriorityValue } from "./StatusType"
import { limitTextCharaters } from "../helpers/sub-text"
import React, { FC, useState } from 'react';
import { TouchableOpacity, View, Text, StyleSheet, ViewStyle } from 'react-native';
import { AntDesign, Entypo } from '@expo/vector-icons';
import { observer } from 'mobx-react-lite';
import { ITeamTask } from '../services/interfaces/ITask';
import { useTeamTasks } from '../services/hooks/features/useTeamTasks';
import { typography, useAppTheme } from '../theme';
import TaskPriorityPopup from './TaskPriorityPopup';
import { translate } from '../i18n';
import { useTaskPriorityValue } from './StatusType';
import { limitTextCharaters } from '../helpers/sub-text';

interface TaskPriorityProps {
task?: ITeamTask
containerStyle?: ViewStyle
priority?: string
setPriority?: (priority: string) => unknown
task?: ITeamTask;
containerStyle?: ViewStyle;
priority?: string;
setPriority?: (priority: string) => unknown;
canCreatePriority?: boolean;
}

const TaskPriority: FC<TaskPriorityProps> = observer(
({ task, containerStyle, priority, setPriority }) => {
const { colors } = useAppTheme()
const { updateTask } = useTeamTasks()
const [openModal, setOpenModal] = useState(false)
({ task, containerStyle, priority, setPriority, canCreatePriority }) => {
const { colors } = useAppTheme();
const { updateTask } = useTeamTasks();
const [openModal, setOpenModal] = useState(false);

const allTaskPriorities = useTaskPriorityValue()
const allTaskPriorities = useTaskPriorityValue();

const sizeValue = (
task?.priority?.split("-").join(" ") ||
(priority && priority.split("-").join(" "))
)?.toLowerCase()
task?.priority?.split('-').join(' ') ||
(priority && priority.split('-').join(' '))
)?.toLowerCase();

const currentPriority =
allTaskPriorities &&
Object.values(allTaskPriorities).find((item) => item.name.toLowerCase() === sizeValue)
allTaskPriorities && Object.values(allTaskPriorities).find((item) => item.name.toLowerCase() === sizeValue);

const onChangePriority = async (text: string) => {
if (task) {
const taskEdit = {
...task,
priority: task?.priority === text ? null : text,
}
priority: task?.priority === text ? null : text
};

await updateTask(taskEdit, task.id)
await updateTask(taskEdit, task.id);
} else {
setPriority(text)
setPriority(text);
}
}
};

return (
<>
Expand All @@ -56,14 +56,15 @@ const TaskPriority: FC<TaskPriorityProps> = observer(
visible={openModal}
setSelectedPriority={(e) => onChangePriority(e.value)}
onDismiss={() => setOpenModal(false)}
canCreatePriority={canCreatePriority}
/>
<TouchableOpacity onPress={() => setOpenModal(true)}>
<View
style={{
...styles.container,
...containerStyle,
borderColor: colors.border,
backgroundColor: currentPriority?.bgColor,
backgroundColor: currentPriority?.bgColor
}}
>
{(task?.priority || priority) && currentPriority ? (
Expand All @@ -72,53 +73,51 @@ const TaskPriority: FC<TaskPriorityProps> = observer(
<Text style={{ ...styles.text, marginLeft: 10 }}>
{limitTextCharaters({
text: currentPriority.name,
numChars: 15,
numChars: 15
})}
</Text>
</View>
) : (
<View style={styles.wrapStatus}>
<Entypo name="circle" size={12} color={colors.primary} />
<Text
style={{ ...styles.text, color: colors.primary, marginLeft: 5 }}
>
{translate("settingScreen.priorityScreen.priorities")}
<Text style={{ ...styles.text, color: colors.primary, marginLeft: 5 }}>
{translate('settingScreen.priorityScreen.priorities')}
</Text>
</View>
)}
<AntDesign
name="down"
size={14}
color={task?.priority || priority ? "#000000" : colors.primary}
color={task?.priority || priority ? '#000000' : colors.primary}
/>
</View>
</TouchableOpacity>
</>
)
},
)
);
}
);

const styles = StyleSheet.create({
container: {
alignItems: "center",
borderColor: "rgba(0,0,0,0.16)",
alignItems: 'center',
borderColor: 'rgba(0,0,0,0.16)',
borderRadius: 10,
borderWidth: 1,
flexDirection: "row",
justifyContent: "space-between",
flexDirection: 'row',
justifyContent: 'space-between',
minHeight: 30,
minWidth: 100,
paddingHorizontal: 8,
paddingHorizontal: 8
},
text: {
fontFamily: typography.fonts.PlusJakartaSans.semiBold,
fontSize: 10,
fontSize: 10
},
wrapStatus: {
alignItems: "center",
flexDirection: "row",
width: "70%",
},
})
alignItems: 'center',
flexDirection: 'row',
width: '70%'
}
});

export default TaskPriority
export default TaskPriority;
Loading

0 comments on commit feca696

Please sign in to comment.