Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #2927

Merged
merged 22 commits into from
Aug 19, 2024
Merged

Release #2927

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ae5afd6
refactor: improve the workspaces list on login/workspace screen (#2899)
CREDO23 Aug 15, 2024
bd175a4
refactor: focus should be on the first input which has a digit when u…
CREDO23 Aug 15, 2024
39731f8
[Improvement]: Timer | Implement hide/show functionality across mult…
Innocent-Akim Aug 15, 2024
7a66d6e
Settings | Team - Create Issue Statuses (#2905)
GloireMutaliko21 Aug 15, 2024
bc19240
[Feat]: DataTableTimeSheet component for improved readability and re……
Innocent-Akim Aug 15, 2024
8d8e076
chore(deps): bump elliptic from 6.5.4 to 6.5.7
dependabot[bot] Aug 15, 2024
a853822
fix: permission issue for Stats tab visibility on profiles (#2906)
Innocent-Akim Aug 15, 2024
928720c
Merge pull request #2908 from ever-co/2810-bug-daily-plan--add-or-edi…
evereq Aug 15, 2024
ccccd47
improvement: use the same Task Estimate component on all pages / popu…
CREDO23 Aug 15, 2024
74d37d7
fix: remove planned task from 'Outstanding' tab
CREDO23 Aug 16, 2024
ae0615f
fix: user should not be able to set negative values for planned work …
CREDO23 Aug 16, 2024
148e8b4
fix: remove blank space after adding a task to tomorrow plan
CREDO23 Aug 16, 2024
f1ba859
Merge pull request #2924 from ever-co/2920-fix-actions-menu--remove-b…
evereq Aug 17, 2024
df6a9ee
Merge pull request #2922 from ever-co/2921-bug-daily-plan--user-shoul…
evereq Aug 17, 2024
6f8e4d0
Merge pull request #2918 from ever-co/2901-bug-planned--logic-remove-…
evereq Aug 17, 2024
3026f5a
Merge pull request #2915 from ever-co/2907-fix-task-estimate--edit-es…
evereq Aug 17, 2024
a4ee92c
Optimize Task Stats Data Loading
paradoxe35 Aug 18, 2024
e68eef4
Merge pull request #2926 from ever-co/fix-timesheet-statistics-tasks-…
evereq Aug 19, 2024
eef47b6
Merge pull request #2910 from ever-co/dependabot/npm_and_yarn/ellipti…
evereq Aug 19, 2024
83daaad
[Feat]: Dynamic Member Selection (#2923)
Innocent-Akim Aug 19, 2024
6b582e8
[Feat]: Add special config for Managers to enable/disable time tracki…
Innocent-Akim Aug 19, 2024
7ffcd36
[Feature]: Confirm Status Change With Time Sheet (#2916)
Innocent-Akim Aug 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"borde",
"Bowser",
"Btns",
"Konviser",
"Bugsnag",
"buildjet",
"cacheable",
Expand Down
4 changes: 3 additions & 1 deletion apps/web/app/[locale]/all-teams/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ import { HeaderTabs } from '@components/pages/all-teams/header-tabs';
import { allTeamsHeaderTabs } from '@app/stores/header-tabs';
import AllTeamsMembers from 'lib/features/all-teams-members';
import { MemberFilter } from 'lib/features/all-teams/all-team-members-filter';
import { useOrganizationTeams } from '@app/hooks';

function AllTeamsPage() {
const t = useTranslations();
const fullWidth = useRecoilValue(fullWidthState);
const view = useRecoilValue(allTeamsHeaderTabs);
const { filteredTeams, userManagedTeams } = useOrganizationAndTeamManagers();
const { isTrackingEnabled } = useOrganizationTeams();

const breadcrumb = [
{ title: JSON.parse(t('pages.home.BREADCRUMB')), href: '/' },
Expand All @@ -33,7 +35,7 @@ function AllTeamsPage() {
if (userManagedTeams.length < 2) return <RedirectUser />;

return (
<MainLayout className="items-start">
<MainLayout showTimer={isTrackingEnabled} className="items-start">
<MainHeader fullWidth={fullWidth} className={'pb-2 pt-10 sticky top-20 z-50'}>
{/* Breadcrumb */}
<div className="flex flex-row items-start justify-between mb-5">
Expand Down
38 changes: 32 additions & 6 deletions apps/web/app/[locale]/auth/passcode/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import { ScrollArea, ScrollBar } from '@components/ui/scroll-bar';
import SocialLogins from '../social-logins-buttons';
import { useSession } from 'next-auth/react';
import { LAST_WORSPACE_AND_TEAM, USER_SAW_OUTSTANDING_NOTIFICATION } from '@app/constants';
import { MdOutlineKeyboardArrowDown } from 'react-icons/md';
import { cn } from 'lib/utils';

function AuthPasscode() {
const form = useAuthenticationPasscode();
Expand Down Expand Up @@ -78,7 +80,8 @@ function AuthPasscode() {
{form.authScreen.screen === 'workspace' && (
<WorkSpaceScreen form={form} className={clsxm('w-full')} />
)}
</div>
</div>
{/* Social logins */}
<SocialLogins />
</div>
</AuthLayout>
Expand Down Expand Up @@ -412,6 +415,12 @@ type IWorkSpace = {
export function WorkSpaceComponent(props: IWorkSpace) {
const t = useTranslations();

const [expandedWorkspace, setExpandedWorkspace] = useState(props.selectedWorkspace);

useEffect(() => {
setExpandedWorkspace(props.selectedWorkspace);
}, [props.selectedWorkspace]);

return (
<form
className={clsxm(props.className, 'flex justify-center w-full')}
Expand All @@ -428,13 +437,28 @@ export function WorkSpaceComponent(props: IWorkSpace) {
{props.workspaces?.map((worksace, index) => (
<div
key={index}
className={`w-full flex flex-col border border-[#0000001A] dark:border-[#34353D] ${
props.selectedWorkspace === index ? 'bg-[#FCFCFC] dark:bg-[#1F2024]' : ''
} hover:bg-[#FCFCFC] dark:hover:bg-[#1F2024] rounded-xl`}
className={`w-full overflow-hidden h-16 ${expandedWorkspace === index && 'h-auto'} flex flex-col border border-[#0000001A] dark:border-[#34353D] ${
props.selectedWorkspace === index
? 'bg-[#FCFCFC] -order-1 dark:bg-[#1F2024]'
: ''
} hover:bg-[#FCFCFC] dark:hover:bg-[#1F2024] rounded-xl`}
>
<div className="text-base font-medium py-[1.25rem] px-4 flex flex-col gap-[1.0625rem]">
<div className="flex justify-between">
<span>{worksace.user.tenant.name}</span>
<div
onClick={() => setExpandedWorkspace(index)}
className="flex cursor-pointer items-center justify-center gap-1"
>
<span>{worksace.user.tenant.name}</span>
<span
className={cn(
'h-6 w-6 flex items-center justify-center transition-transform',
expandedWorkspace === index && 'rotate-180'
)}
>
<MdOutlineKeyboardArrowDown />
</span>
</div>
<span
className="hover:cursor-pointer"
onClick={() => {
Expand All @@ -456,7 +480,9 @@ export function WorkSpaceComponent(props: IWorkSpace) {
)}
</span>
</div>
<span className="bg-[#E5E5E5] w-full h-[1px]"></span>
<span
className={`bg-[#E5E5E5] w-full h-[1px] hidden ${expandedWorkspace === index && 'block'}`}
></span>
{/* <div className="w-full h-[1px] bg-[#E5E5E5] dark:bg-[#34353D]"></div> */}
<div className="flex flex-col gap-4 px-5 py-1.5">
{worksace.current_teams?.map((team) => (
Expand Down
133 changes: 126 additions & 7 deletions apps/web/app/[locale]/calendar/component.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,150 @@
import { clsxm } from "@app/utils";
import { DatePicker } from "@components/ui/DatePicker";
import { QueueListIcon } from "@heroicons/react/20/solid";
import { addDays, format } from "date-fns";
import { Button } from "lib/components";
import { TimeSheetFilter, timesheetCalendar } from "lib/features/integrations/calendar";
import {
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectTrigger,
SelectValue,
} from "@components/ui/select"
import { cn } from "lib/utils";
import { CalendarDays } from "lucide-react";
import React from "react";
import { DateRange } from "react-day-picker";
import { LuCalendarDays } from "react-icons/lu";

export function HeadCalendar({ openModal }: { openModal?: () => void }) {
export function HeadCalendar({
openModal,
timesheet,
setCalendarTimeSheet
}: {
openModal?: () => void,
timesheet: timesheetCalendar,
setCalendarTimeSheet: React.Dispatch<React.SetStateAction<timesheetCalendar>>
}) {

return (
<div className="flex justify-between items-center mt-10 bg-white dark:bg-dark-high py-2">
<h1 className="text-4xl font-semibold">CALENDAR</h1>
<h1 className="text-4xl font-semibold">{timesheet === 'Calendar' ? "Calendar" : "Timesheet"}</h1>
<div className='flex items-center space-x-3'>
<button
className='hover:bg-gray-100 text-xl h-10 w-10 rounded-lg flex items-center justify-center'
onClick={() => setCalendarTimeSheet('TimeSheet')}
className={clsxm('hover:bg-gray-200 dark:hover:bg-gray-700 text-xl h-10 w-10 rounded-lg flex items-center justify-center',
`${timesheet === 'TimeSheet' ? 'bg-gray-200 dark:bg-gray-700' : ''}`
)}
>
<QueueListIcon className={clsxm('w-5 h-5')} />
</button>
<button
className='bg-gray-100 text-xl h-10 w-10 rounded-lg flex items-center justify-center'
>
onClick={() => setCalendarTimeSheet('Calendar')}
className={clsxm('hover:bg-gray-200 dark:hover:bg-gray-700 text-xl h-10 w-10 rounded-lg flex items-center justify-center',
`${timesheet === 'Calendar' ? 'bg-gray-200 dark:bg-gray-700' : ''}`
)} >
<LuCalendarDays />
</button>
<Button
onClick={openModal}
variant='primary'
className='bg-primary dark:bg-primary-light'
>
className='bg-primary dark:bg-primary-light'>
Add Time
</Button>
</div>
</div>
);
}


export function HeadTimeSheet({ timesheet }: { timesheet?: timesheetCalendar }) {

const [date, setDate] = React.useState<DateRange | undefined>({
from: new Date(2022, 0, 20),
to: addDays(new Date(2022, 0, 20), 20)
});
console.log(timesheet);
return (
<div>
<div className='flex items-center justify-between w-full dark:!bg-dark--theme h-28'>
{timesheet === 'TimeSheet' && (
<div className='flex items-center space-x-5 dark:!bg-dark--theme '>
<div>
<CustomSelect />
</div>
<DatePicker
buttonVariant={'link'}
className="dark:bg-dark--theme-light rounded-lg"
buttonClassName={'decoration-transparent flex items-center w-full border-gray-300 justify-start text-left font-normal text-black h-10 border dark:border-slate-600 rounded-md"'}
customInput={
<>
<CalendarDays className="h-5 w-5 dark:text-gray-500" />
<Button
variant={"outline"}
className={cn(
"w-[230px] justify-start text-left font-normal text-black h-10 border border-transparent dark:border-transparent",
!date && "text-muted-foreground"
)}>
{date?.from ? (
date.to ? (
<>
{format(date.from, "LLL dd, y")} -{" "}
{format(date.to, "LLL dd, y")}
</>
) : (
format(date.from, "LLL dd, y")
)
) : (
<span>Pick a date</span>
)}
</Button>
</>
}
mode={'range'}
numberOfMonths={2}
initialFocus
defaultMonth={date?.from}
selected={date}
onSelect={(value) => {
value && setDate(value);
}}
/>
<div>
<TimeSheetFilter />
</div>
</div>
)}
</div>
</div>
)
}



export function CustomSelect() {
const [selectedValue, setSelectedValue] = React.useState<string | undefined>(undefined);

const handleSelectChange = (value: string) => {
setSelectedValue(value);
};

return (
<Select
value={selectedValue}
onValueChange={handleSelectChange}
>
<SelectTrigger className="w-[180px] border border-gray-200 dark:border-gray-700 bg-transparent">
<SelectValue placeholder="Select a daily" />
</SelectTrigger>
<SelectContent>
<SelectGroup>
<SelectItem value="daily">Daily</SelectItem>
<SelectItem value="weekly">Weekly</SelectItem>
<SelectItem value="monthly">Monthly</SelectItem>
</SelectGroup>
</SelectContent>
</Select>
);
}
39 changes: 31 additions & 8 deletions apps/web/app/[locale]/calendar/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { useModal, useOrganizationTeams } from '@app/hooks';
import { useLocalStorageState, useModal, useOrganizationTeams } from '@app/hooks';
import { fullWidthState } from '@app/stores/fullWidth';
import { clsxm } from '@app/utils';
import HeaderTabs from '@components/pages/main/header-tabs';
Expand All @@ -13,13 +13,15 @@ import { useTranslations } from 'next-intl';
import { useParams } from 'next/navigation';
import React, { useMemo } from 'react';
import { useRecoilValue } from 'recoil';
import { HeadCalendar } from './component';
import { HeadCalendar, HeadTimeSheet } from './component';
import { AddManualTimeModal } from 'lib/features/manual-time/add-manual-time-modal';
import { SetupTimeSheet, timesheetCalendar } from 'lib/features/integrations/calendar';

const CalendarPage = () => {
const t = useTranslations();
const fullWidth = useRecoilValue(fullWidthState);
const { activeTeam, isTrackingEnabled } = useOrganizationTeams();
const [calendarTimeSheet, setCalendarTimeSheet] = useLocalStorageState<timesheetCalendar>('calendar-timesheet', 'Calendar')
const {
isOpen: isManualTimeModalOpen,
openModal: openManualTimeModal,
Expand All @@ -37,23 +39,33 @@ const CalendarPage = () => {
[activeTeam?.name, currentLocale, t]
);

const renderComponent = () => {
switch (calendarTimeSheet) {
case 'Calendar':
return <SetupFullCalendar />;
case 'TimeSheet':
return <SetupTimeSheet />;
default:
return null;
}
};
return (
<>

<MainLayout
showTimer={isTrackingEnabled}
footerClassName="hidden"
className="h-[calc(100vh-22px)]"
className="h-[calc(100vh-22px)] shadow-xl"
>
<AddManualTimeModal
closeModal={closeManualTimeModal}
isOpen={isManualTimeModalOpen}
params='AddManuelTime'
/>

<div className="h-[263.4px] z-10 bg-white dark:bg-dark-high fixed w-full"></div>

<div
className='fixed top-20 flex flex-col border-b-[1px] dark:border-[#26272C] z-10 mx-0 w-full bg-white dark:bg-dark-high'
className='fixed top-20 flex flex-col border-b-[1px] dark:border-[#26272C] z-10 mx-0 w-full bg-white dark:bg-dark-high shadow-lg shadow-gray-100 dark:shadow-gray-700 '
>
<Container fullWidth={fullWidth}>
<div className="flex bg-white dark:bg-dark-high flex-row items-start justify-between mt-12">
Expand All @@ -65,11 +77,22 @@ const CalendarPage = () => {
<HeaderTabs kanban={true} linkAll={true} />
</div>
</div>
<HeadCalendar openModal={openManualTimeModal} />
<div className='flex flex-col w-full'>
<HeadCalendar
openModal={openManualTimeModal}
timesheet={calendarTimeSheet}
setCalendarTimeSheet={setCalendarTimeSheet} />
<div className='border border-gray-100 dark:border-gray-700 w-full'></div>
<HeadTimeSheet timesheet={calendarTimeSheet} />

</div>
</Container>
</div>
<div className='mt-[256px] mb-24'>
<SetupFullCalendar />

<div className='mt-[325px] mb-40'>
<Container fullWidth={fullWidth}>
{renderComponent()}
</Container>
</div>
</MainLayout>
<div className="bg-white dark:bg-[#1e2025] w-screen z-[5000] fixed bottom-0">
Expand Down
4 changes: 2 additions & 2 deletions apps/web/app/[locale]/kanban/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ const Kanban = () => {
key={tab.name}
onClick={() => setActiveTab(tab.value)}
className={`cursor-pointer pt-2.5 px-5 pb-[30px] text-base font-semibold ${activeTab === tab.value
? 'border-b-[#3826A6] text-[#3826A6] dark:text-white dark:border-b-white'
: 'border-b-white dark:border-b-[#191A20] dark:text-white text-[#282048]'
? 'border-b-[#3826A6] text-[#3826A6] dark:text-white dark:border-b-white'
: 'border-b-white dark:border-b-[#191A20] dark:text-white text-[#282048]'
}`}
style={{
borderBottomWidth: '3px',
Expand Down
6 changes: 5 additions & 1 deletion apps/web/app/[locale]/page-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ function MainPage() {
<>
<div className="flex flex-col h-screen justify-between">
{/* <div className="flex-grow "> */}
<MainLayout className="h-full" footerClassName={clsxm('')}>
<MainLayout
showTimer={headerSize <= 11.8 && isTrackingEnabled}
className="h-full"
footerClassName={clsxm('')}
>
<ChatwootWidget />
<div className=" h-full">
<ResizablePanelGroup direction="vertical">
Expand Down
Loading
Loading