Skip to content

Commit

Permalink
Merge pull request #2922 from ever-co/2921-bug-daily-plan--user-shoul…
Browse files Browse the repository at this point in the history
…d-not-be-able-to-set-negative-values-for-planned-work-time

fix: user should not be able to set negative values for planned work time
  • Loading branch information
evereq authored Aug 17, 2024
2 parents f1ba859 + ae0615f commit df6a9ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/web/lib/features/user-profile-plans.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import { checkPastDate } from 'lib/utils';
import { DottedLanguageObjectStringPaths, useTranslations } from 'next-intl';
import { useLocalStorageState } from '@app/hooks/useLocalStorageState';


export type FilterTabs = 'Today Tasks' | 'Future Tasks' | 'Past Tasks' | 'All Tasks' | 'Outstanding';
type FilterOutstanding = 'ALL' | 'DATE';

Expand All @@ -47,7 +46,6 @@ export function UserProfilePlans() {
? (window.localStorage.getItem('daily-plan-tab') as FilterTabs) || null
: 'Today Tasks';


const profile = useUserProfilePage();
const { todayPlan, futurePlans, pastPlans, outstandingPlans, sortedPlans, profileDailyPlans } = useDailyPlan();
const fullWidth = useRecoilValue(fullWidthState);
Expand Down Expand Up @@ -97,7 +95,6 @@ export function UserProfilePlans() {
}
}, [currentTab, setCurrentDataDailyPlan, setDate, date]);


return (
<div className="">
<Container fullWidth={fullWidth} className="pb-8 mb-5">
Expand All @@ -119,7 +116,9 @@ export function UserProfilePlans() {
setCurrentTab(filter as FilterTabs);
}}
>
{t(`task.tabFilter.${filter.toUpperCase().replace(' ', '_')}` as DottedLanguageObjectStringPaths)}
{t(
`task.tabFilter.${filter.toUpperCase().replace(' ', '_')}` as DottedLanguageObjectStringPaths
)}
<span
className={clsxm(
'text-xs bg-gray-200 dark:bg-dark--theme-light text-dark--theme-light dark:text-gray-200 p-2 rounded py-1',
Expand Down Expand Up @@ -412,6 +411,7 @@ export function PlanHeader({ plan, planMode }: { plan: IDailyPlan; planMode: Fil
) : (
<div className="flex">
<input
min={0}
type="number"
className={clsxm(
'outline-none p-0 bg-transparent border-b text-center max-w-[54px] text-xs font-medium'
Expand Down

0 comments on commit df6a9ee

Please sign in to comment.