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

[Fix]:bug #3344

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@
"tinvitations",
"tnode",
"Togger",
"tomorow",
"tomorrow",
"Tongatapu",
"tota",
"TRANSFERT",
Expand Down
8 changes: 4 additions & 4 deletions apps/web/app/interfaces/IDailyPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ export interface ICreateDailyPlan extends IDailyPlanBase, IRelationnalEmployee,

export interface IUpdateDailyPlan
extends Partial<IDailyPlanBase>,
Pick<ICreateDailyPlan, 'employeeId'>,
Partial<Pick<IRelationalOrganizationTeam, 'organizationTeamId'>> {}
Pick<ICreateDailyPlan, 'employeeId'>,
Partial<Pick<IRelationalOrganizationTeam, 'organizationTeamId'>> { }

export interface IDailyPlanTasksUpdate
extends Pick<ICreateDailyPlan, 'taskId' | 'employeeId'>,
IBasePerTenantAndOrganizationEntity {}
IBasePerTenantAndOrganizationEntity { }

export enum DailyPlanStatusEnum {
OPEN = 'open',
IN_PROGRESS = 'in-progress',
COMPLETED = 'completed'
}

export type IDailyPlanMode = 'today' | 'tomorow' | 'custom';
export type IDailyPlanMode = 'today' | 'tomorrow' | 'custom';
5 changes: 2 additions & 3 deletions apps/web/components/pages/kanban/menu-kanban-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export default function MenuKanbanCard({ item: task, member }: { item: ITeamTask
<PlanTask planMode="today" taskId={task.id} chooseMember={true} />
</li>
<li className="font-normal flex justify-between capitalize hover:bg-secondary-foreground/20 w-full text-left whitespace-nowrap text-sm hover:font-semibold hover:transition-all py-1 px-2">
<PlanTask planMode="tomorow" taskId={task.id} chooseMember={true} />
<PlanTask planMode="tomorrow" taskId={task.id} chooseMember={true} />
</li>
<li className="font-normal flex justify-between capitalize hover:bg-secondary-foreground/20 w-full text-left whitespace-nowrap text-sm hover:font-semibold hover:transition-all py-1 px-2">
<PlanTask planMode="custom" taskId={task.id} chooseMember={true} />
Expand Down Expand Up @@ -227,8 +227,7 @@ function TeamMembersSelect(props: ITeamMemberSelectProps): JSX.Element {
<Combobox.Option
key={member.id}
className={({ active }) =>
`relative cursor-default select-none py-2 pl-10 pr-4 ${
active ? 'bg-primary/5' : 'text-gray-900'
`relative cursor-default select-none py-2 pl-10 pr-4 ${active ? 'bg-primary/5' : 'text-gray-900'
}`
}
value={member}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function CreateDailyPlanFormModal({
date:
planMode == 'today'
? toDay
: planMode == 'tomorow'
: planMode == 'tomorrow'
? tomorrowDate
: new Date(moment(date).format('YYYY-MM-DD')),
status: DailyPlanStatusEnum.OPEN,
Expand Down Expand Up @@ -302,12 +302,12 @@ function MembersList({
{(member?.employee?.user?.image?.thumbUrl ||
member?.employee?.user?.image?.fullUrl ||
member?.employee?.user?.imageUrl) &&
isValidUrl(
member?.employee?.user?.image?.thumbUrl ||
isValidUrl(
member?.employee?.user?.image?.thumbUrl ||
member?.employee?.user?.image?.fullUrl ||
member?.employee?.user?.imageUrl ||
''
) ? (
) ? (
<Avatar
size={36}
className="relative cursor-pointer dark:border-[0.25rem] dark:border-[#26272C]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ export function DataTableTimeSheet({ data }: { data?: GroupedTimesheet[] }) {
<AlertDialogConfirmation
title="Are you sure you want to delete this?"
description={`This action is irreversible. All related data will be lost. (${selectTimesheet.length})`}
confirmText="Yes, delete"
cancelText="No, cancel"
confirmText={t('common.DELETE')}
cancelText={t('common.CANCEL')}
isOpen={isDialogOpen}
onOpenChange={setIsDialogOpen}
onConfirm={handleConfirm}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/lib/features/task/task-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ export function PlanTask({
)}
</span>
)}
{planMode === 'tomorow' && !taskPlannedForTomorrow && (
{planMode === 'tomorrow' && !taskPlannedForTomorrow && (
<span>
{isPending || createDailyPlanLoading ? (
<ReloadIcon className="w-4 h-4 mr-2 animate-spin" />
Expand Down
Loading