Skip to content

Commit

Permalink
Merge pull request #2353 from ever-co/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
evereq authored Apr 1, 2024
2 parents f3b4dac + 4e117fc commit 323fa30
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
1 change: 0 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
cd "apps/web"

yarn lint

8 changes: 6 additions & 2 deletions apps/web/app/[locale]/kanban/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ const Kanban = () => {
});
return (
<>
<MainLayout showTimer={isTrackingEnabled}>
<MainLayout
showTimer={isTrackingEnabled}
footerClassName="fixed bottom-0 z-50 bg-white dark:bg-dark--theme"
className="h-[calc(100vh-_22px)]"
>
<div className="h-[263.4px] z-10 bg-white dark:bg-dark--theme fixed w-full"></div>
<div className={'fixed top-20 flex flex-col z-10 mx-[0px] w-full bg-white dark:bg-dark--theme'}>
<Container fullWidth={fullWidth}>
Expand Down Expand Up @@ -225,7 +229,7 @@ const Kanban = () => {
{/* <div className="h-20 w-full bg-red-500/50"></div> */}
</Container>
</div>
<div className="mt-[256px]">
<div className="mt-[256px] mb-52">
{/** TODO:fetch teamtask based on days */}
{activeTab && ( // add filter for today, yesterday and tomorrow
<div>
Expand Down
3 changes: 1 addition & 2 deletions apps/web/lib/components/Kanban.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ export const KanbanDroppable = ({
title,
droppableId,
type,
isLoading,
content
}: {
title: string;
Expand Down Expand Up @@ -217,7 +216,7 @@ export const EmptyKanbanDroppable = ({
{...provided.draggableProps}
{...provided.dragHandleProps}
style={getItemStyle(snapshot.isDragging, provided.draggableProps.style)}
className="flex flex-row px-2 w-fit h-full"
className="flex flex-row px-2 w-fit h-40"
>
{title.length > 0 ? (
<>
Expand Down
3 changes: 1 addition & 2 deletions apps/web/lib/components/inputs/auth-code-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,13 @@ export const AuthCodeInputField = forwardRef<AuthCodeRef, AuthCodeProps>(
sendResult();
}
}));

useEffect(() => {
if (autoFocus) {
setTimeout(() => {
inputsRef.current[0].focus();
}, 100);
}
}, [autoFocus]);
}, [autoFocus, inputsRef]);

const sendResult = () => {
const res = inputsRef.current.map((input) => input.value).join('');
Expand Down
19 changes: 9 additions & 10 deletions apps/web/lib/features/team-members-kanban-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export const KanbanView = ({ kanbanBoardTasks, isLoading }: { kanbanBoardTasks:
reorderStatus,
addNewTask
} = useKanban();

const [columns, setColumn] = useState<any[]>(
Object.keys(kanbanBoardTasks).map((key) => {
const columnInfo = kanbanColumns.find((item) => item.name === key);
Expand Down Expand Up @@ -73,14 +72,14 @@ export const KanbanView = ({ kanbanBoardTasks, isLoading }: { kanbanBoardTasks:
currentTaskStatus.splice(sourceIndex, 1);

const taskstatus = destinationDroppableID as any;

const updateTaskStatusData = {
...targetStatus,
status: taskstatus,
taskStatusId: ts.find((v) => v.name?.toLowerCase() == taskstatus.toLowerCase())?.id
};

// update task status on the server
// update task status on the server
updateTaskStatus(updateTaskStatusData);

// insert into next
Expand All @@ -98,11 +97,11 @@ export const KanbanView = ({ kanbanBoardTasks, isLoading }: { kanbanBoardTasks:
};

const getHeaderBackground = (columns: ITaskStatusItemList[], column: string) => {
const selectState = columns.filter((item: ITaskStatusItemList) => {
const selectState = columns.find((item: ITaskStatusItemList) => {
return item.name === column;
});

return selectState[0].color;
return selectState?.color ?? 'white';
};

const reorderColumn = (column: any[], sourceIndex: number, destinationIndex: number) => {
Expand Down Expand Up @@ -160,7 +159,7 @@ export const KanbanView = ({ kanbanBoardTasks, isLoading }: { kanbanBoardTasks:
if (result.type === 'COLUMN') {
const reorderedItem = reorderColumn(columns, source.index, destination.index);

// Update column order on the server side
// Update column order on the server side
reorderedItem.map((item: string, index: number) => {
return reorderStatus(item, index);
});
Expand Down Expand Up @@ -193,12 +192,12 @@ export const KanbanView = ({ kanbanBoardTasks, isLoading }: { kanbanBoardTasks:
if (!enabled) return null; // ['open','close']

return (
<>
<>
<DragDropContext onDragEnd={onDragEnd}>
{columns.length > 0 && (
<Droppable droppableId="droppable" type="COLUMN" direction="horizontal">
{(provided: DroppableProvided, snapshot: DroppableStateSnapshot) => (
<div className="flex flex-col !h-[100vh-_300px] justify-between w-full">
<div className="flex flex-col h-[270px] justify-between w-full">
<div
className={clsxm(
'flex flex-row h-full p-[32px] bg-transparent dark:bg-[#181920]',
Expand All @@ -212,15 +211,15 @@ export const KanbanView = ({ kanbanBoardTasks, isLoading }: { kanbanBoardTasks:
{columns.map((column: any, index: number) => {
return (
<React.Fragment key={index}>
<div className="flex flex-col a" key={index}>
<div key={index}>
{isColumnCollapse(column.name) ? (
<EmptyKanbanDroppable
index={index}
title={column.name}
items={items[column.name]}
backgroundColor={getHeaderBackground(
kanbanColumns,
column
column.name
)}
/>
) : (
Expand Down

0 comments on commit 323fa30

Please sign in to comment.