diff --git a/.cspell.json b/.cspell.json index 9c47d01cc..b22d44a42 100644 --- a/.cspell.json +++ b/.cspell.json @@ -6,6 +6,7 @@ "words": [ " X", " X ", + "hookform", "accepte", "Accordian", "adipiscing", @@ -24,6 +25,7 @@ "apidemodt", "apidemodts", "apidev", + "apikey", "apisauce", "apistage", "apistagecivo", @@ -92,6 +94,7 @@ "creatoe", "dailyplan", "Darkmode", + "DATACENTER", "datas", "dataToDisplay", "daygrid", @@ -240,6 +243,7 @@ "longpress", "Lorem", "lucide", + "mailchimp", "mainconfig", "mappagination", "mathieudutour", @@ -355,7 +359,6 @@ "tailess", "Tailess", "tailwindcss", - "timesheet-viewMode", "tanstack", "taskid", "taskstatus", @@ -367,6 +370,7 @@ "testid", "timegrid", "Timesheet", + "timesheet-viewMode", "Timesheets", "Timeslot", "tinvitations", @@ -400,6 +404,7 @@ "VERSONS", "vertificalline", "vhidden", + "Waitlist", "WARNING️", "wasabisys", "webm", diff --git a/Dockerfile b/Dockerfile index 51fc2c4cb..4d1894984 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,10 +18,12 @@ ARG NEXT_PUBLIC_JITSU_BROWSER_URL ARG NEXT_PUBLIC_JITSU_BROWSER_WRITE_KEY ARG NEXT_PUBLIC_GITHUB_APP_NAME=ever-github ARG NEXT_PUBLIC_CHATWOOT_API_KEY +ARG NEXT_IGNORE_ESLINT_ERROR_ON_BUILD=true -FROM node:${NODE_VERSION}-slim as base +FROM node:${NODE_VERSION}-slim AS base # Output the environment variable value +ARG NEXT_PUBLIC_GAUZY_API_SERVER_URL RUN echo "NEXT_PUBLIC_GAUZY_API_SERVER_URL=${NEXT_PUBLIC_GAUZY_API_SERVER_URL}" LABEL maintainer="ever@ever.co" @@ -42,7 +44,7 @@ RUN mkdir /temp && cd /temp && \ RUN npm cache clean --force # Throw-away build stage to reduce size of final image -FROM base as build +FROM base AS build # We make env vars passed as build argument to be available in this build stage because we prebuild the NextJs app ARG NEXT_PUBLIC_GAUZY_API_SERVER_URL @@ -80,6 +82,7 @@ RUN cd apps/web && \ COPY . . ENV NODE_ENV=production +ENV NEXT_IGNORE_ESLINT_ERROR_ON_BUILD=true RUN echo $NEXT_PUBLIC_GAUZY_API_SERVER_URL @@ -96,8 +99,6 @@ RUN yarn cache clean # Final stage for app image FROM base -ENV NODE_ENV=production - # Copy built application COPY --from=build /app/apps/web/.next/standalone ./ COPY --from=build /app/apps/web/.next/static ./apps/web/.next/static diff --git a/apps/extensions/yarn.lock b/apps/extensions/yarn.lock index aab83a967..3e4478338 100644 --- a/apps/extensions/yarn.lock +++ b/apps/extensions/yarn.lock @@ -2684,9 +2684,9 @@ cosmiconfig@^7.0.1: yaml "^1.10.0" cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" diff --git a/apps/web/.env b/apps/web/.env index 9180c30c7..b6a667a29 100644 --- a/apps/web/.env +++ b/apps/web/.env @@ -137,3 +137,7 @@ NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com # Warning: IF TRUE This allows production builds to successfully complete even if # your project has ESLint errors. NEXT_IGNORE_ESLINT_ERROR_ON_BUILD=true + +# Mailchimp +MAILCHIMP_API_KEY= +MAILCHIMP_LIST_ID= diff --git a/apps/web/.env.sample b/apps/web/.env.sample index 62ae03258..1989758f4 100644 --- a/apps/web/.env.sample +++ b/apps/web/.env.sample @@ -87,3 +87,7 @@ MEET_JWT_APP_SECRET= # Warning: IF TRUE This allows production builds to successfully complete even if # your project has ESLint errors. NEXT_IGNORE_ESLINT_ERROR_ON_BUILD=true + +# Mailchimp +MAILCHIMP_API_KEY= +MAILCHIMP_LIST_ID= diff --git a/apps/web/app/[locale]/layout.tsx b/apps/web/app/[locale]/layout.tsx index 8dd5ce0ce..7353f53b4 100644 --- a/apps/web/app/[locale]/layout.tsx +++ b/apps/web/app/[locale]/layout.tsx @@ -1,7 +1,7 @@ /* eslint-disable no-mixed-spaces-and-tabs */ 'use client'; import 'react-loading-skeleton/dist/skeleton.css'; -import '../../styles/globals.css'; +import '@/styles/globals.css'; import clsx from 'clsx'; import { Provider } from 'jotai'; diff --git a/apps/web/app/[locale]/page-component.tsx b/apps/web/app/[locale]/page-component.tsx index 68f697eed..ddb2d6b58 100644 --- a/apps/web/app/[locale]/page-component.tsx +++ b/apps/web/app/[locale]/page-component.tsx @@ -66,9 +66,9 @@ function MainPage() { showTimer={headerSize <= 11.8 && isTrackingEnabled} className="h-full" mainHeaderSlot={ -
+
-
+
diff --git a/apps/web/app/[locale]/timesheet/[memberId]/components/EditTaskModal.tsx b/apps/web/app/[locale]/timesheet/[memberId]/components/EditTaskModal.tsx index 1828d9a9b..ae018d1b1 100644 --- a/apps/web/app/[locale]/timesheet/[memberId]/components/EditTaskModal.tsx +++ b/apps/web/app/[locale]/timesheet/[memberId]/components/EditTaskModal.tsx @@ -1,53 +1,69 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ -import { Button, Modal, statusColor } from '@/lib/components'; -import { IoMdArrowDropdown } from 'react-icons/io'; -import { FaRegClock } from 'react-icons/fa'; -import { DatePickerFilter } from './TimesheetFilterDate'; -import { useState } from 'react'; -import { useTranslations } from 'next-intl'; -import { clsxm } from '@/app/utils'; -import { Item, ManageOrMemberComponent, getNestedValue } from '@/lib/features/manual-time/manage-member-component'; -import { useTeamTasks } from '@/app/hooks'; -import { CustomSelect } from '@/lib/features'; -import { statusTable } from './TimesheetAction'; +import { Modal, statusColor } from "@/lib/components"; +import { IoMdArrowDropdown } from "react-icons/io"; +import { FaRegClock } from "react-icons/fa"; +import { DatePickerFilter } from "./TimesheetFilterDate"; +import { useState } from "react"; +import { useTranslations } from "next-intl"; +import { clsxm } from "@/app/utils"; +import { Item, ManageOrMemberComponent, getNestedValue } from "@/lib/features/manual-time/manage-member-component"; +import { useTeamTasks } from "@/app/hooks"; +import { CustomSelect, TaskNameInfoDisplay } from "@/lib/features"; +import { statusTable } from "./TimesheetAction"; +import { TimesheetLog } from "@/app/interfaces"; export interface IEditTaskModalProps { isOpen: boolean; closeModal: () => void; + dataTimesheet: TimesheetLog } -export function EditTaskModal({ isOpen, closeModal }: IEditTaskModalProps) { +export function EditTaskModal({ isOpen, closeModal, dataTimesheet }: IEditTaskModalProps) { const { activeTeam } = useTeamTasks(); const t = useTranslations(); + // const [dateRange, setDateRange] = useState<{ from: Date | null }>({ + // from: new Date(), + // }); + // const [endTime, setEndTime] = useState(''); + // const [startTime, setStartTime] = useState(''); + // const [isBillable, setIsBillable] = useState(dataTimesheet.isBillable); + // const [notes, setNotes] = useState(''); + const [dateRange, setDateRange] = useState<{ from: Date | null }>({ - from: new Date() + from: dataTimesheet.timesheet?.startedAt ? new Date(dataTimesheet.timesheet.startedAt) : new Date(), }); - const [endTime, setEndTime] = useState(''); - const [startTime, setStartTime] = useState(''); - const [isBillable, setIsBillable] = useState(false); - const [notes, setNotes] = useState(''); + const [endTime, setEndTime] = useState( + dataTimesheet.timesheet?.stoppedAt + ? new Date(dataTimesheet.timesheet.stoppedAt).toLocaleTimeString('en-US', { hour12: false }).slice(0, 5) + : '' + ); + const [startTime, setStartTime] = useState( + dataTimesheet.timesheet?.startedAt + ? new Date(dataTimesheet.timesheet.startedAt).toLocaleTimeString('en-US', { hour12: false }).slice(0, 5) + : '' + ); + const [isBillable, setIsBillable] = useState(dataTimesheet.isBillable); + const [notes, setNotes] = useState(''); const memberItemsLists = { - Project: activeTeam?.projects as [] + Project: activeTeam?.projects as [], }; const handleSelectedValuesChange = (values: { [key: string]: Item | null }) => { // Handle value changes }; const selectedValues = { - Teams: null + Teams: null, }; - const handleChange = (field: string, selectedItem: Item | null) => { // Handle field changes }; const fields = [ { - label: 'Project', + label: t('sidebar.PROJECTS'), placeholder: 'Select a project', isRequired: true, valueKey: 'id', displayKey: 'name', element: 'Project' - } + }, ]; const handleFromChange = (fromDate: Date | null) => { @@ -60,20 +76,26 @@ export function EditTaskModal({ isOpen, closeModal }: IEditTaskModalProps) { showCloseIcon title={'Edit Task'} className="bg-light--theme-light dark:bg-dark--theme-light p-5 rounded-xl w-full md:w-40 md:min-w-[30rem] justify-start h-[auto]" - titleClass="font-bold" - > + titleClass="font-bold flex justify-start w-full">
- #321 Spike for creating calendar views on mobile +
for - Savannah Nguyen + {dataTimesheet.employee?.fullName ?? ""}
- Task Time + Task Time
08:10h @@ -81,7 +103,7 @@ export function EditTaskModal({ isOpen, closeModal }: IEditTaskModalProps) {
-
-
+
- {t('manualTime.DATE')} - + {t("manualTime.DATE")} +
- +
setIsBillable(!isBillable)} + onClick={() => setIsBillable(true)} label={t('pages.timesheet.BILLABLE.YES')} /> setIsBillable(!isBillable)} + onClick={() => setIsBillable(false)} label={t('pages.timesheet.BILLABLE.NO')} />
- Notes + Notes