From b15105a54a415603839b118ba314caa404c366c4 Mon Sep 17 00:00:00 2001 From: Serge Muhundu Date: Thu, 1 Feb 2024 14:23:24 +0100 Subject: [PATCH 1/5] add ts-node --- apps/mobile/package.json | 1 + apps/mobile/yarn.lock | 93 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 92 insertions(+), 2 deletions(-) diff --git a/apps/mobile/package.json b/apps/mobile/package.json index 3da62b796..fc1c4f70e 100644 --- a/apps/mobile/package.json +++ b/apps/mobile/package.json @@ -112,6 +112,7 @@ "reanimated-bottom-sheet": "^1.0.0-alpha.22", "reanimated-color-picker": "^2.3.4", "sentry-expo": "~6.2.0", + "ts-node": "^10.9.2", "validator": "^13.11.0" }, "devDependencies": { diff --git a/apps/mobile/yarn.lock b/apps/mobile/yarn.lock index 6f91bc310..64bcc9ff4 100644 --- a/apps/mobile/yarn.lock +++ b/apps/mobile/yarn.lock @@ -1206,6 +1206,13 @@ deepmerge "^3.2.0" hoist-non-react-statics "^3.3.0" +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + "@egjs/hammerjs@^2.0.17": version "2.0.17" resolved "https://registry.yarnpkg.com/@egjs/hammerjs/-/hammerjs-2.0.17.tgz#5dc02af75a6a06e4c2db0202cae38c9263895124" @@ -2018,7 +2025,7 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/resolve-uri@^3.1.0": +"@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": version "3.1.1" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== @@ -2041,6 +2048,14 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.9": version "0.3.20" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz#72e45707cf240fa6b081d0366f8265b0cd10197f" @@ -2664,6 +2679,26 @@ resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad" integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA== +"@tsconfig/node10@^1.0.7": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" + integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== + "@types/babel__core@^7.1.14": version "7.20.5" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" @@ -3477,11 +3512,21 @@ acorn-walk@^8.0.2: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.0.tgz#2097665af50fd0cf7a2dfccd2b9368964e66540f" integrity sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA== +acorn-walk@^8.1.1: + version "8.3.2" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa" + integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== + acorn@^8.1.0, acorn@^8.7.1, acorn@^8.8.1, acorn@^8.8.2, acorn@^8.9.0: version "8.11.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== +acorn@^8.4.1: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== + agent-base@4, agent-base@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" @@ -3740,6 +3785,11 @@ arg@4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.0.tgz#583c518199419e0037abb74062c37f8519e575f0" integrity sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg== +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -5155,6 +5205,11 @@ create-react-class@^15.7.0: loose-envify "^1.3.1" object-assign "^4.1.1" +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + cross-fetch@^3.1.5: version "3.1.8" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82" @@ -5722,6 +5777,11 @@ diff@5.0.0: resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -9621,7 +9681,7 @@ make-dir@^4.0.0: dependencies: semver "^7.5.3" -make-error@1.x: +make-error@1.x, make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== @@ -14472,6 +14532,25 @@ ts-jest@^29.1.0: semver "^7.5.3" yargs-parser "^21.0.1" +ts-node@^10.9.2: + version "10.9.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + ts-object-utils@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/ts-object-utils/-/ts-object-utils-0.0.5.tgz#95361cdecd7e52167cfc5e634c76345e90a26077" @@ -14868,6 +14947,11 @@ uuid@^8.0.0, uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + v8-to-istanbul@^9.0.1: version "9.2.0" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz#2ed7644a245cddd83d4e087b9b33b3e62dfd10ad" @@ -15525,6 +15609,11 @@ yargs@^17.0.0, yargs@^17.3.1, yargs@^17.5.1: y18n "^5.0.5" yargs-parser "^21.1.1" +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" From 07c9afd9b767704b8986944c616e43b48f5cb10c Mon Sep 17 00:00:00 2001 From: Serge Muhundu Date: Thu, 1 Feb 2024 17:51:55 +0100 Subject: [PATCH 2/5] remove app.json from .gitignore --- apps/mobile/.gitignore | 2 +- apps/mobile/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/mobile/.gitignore b/apps/mobile/.gitignore index 3e8c41db6..8ff85617d 100644 --- a/apps/mobile/.gitignore +++ b/apps/mobile/.gitignore @@ -148,5 +148,5 @@ yarn-error.log .expo/ web-build/ dist/ -/app.json +# /app.json # @end expo-cli diff --git a/apps/mobile/package.json b/apps/mobile/package.json index fc1c4f70e..cc83b9cd6 100644 --- a/apps/mobile/package.json +++ b/apps/mobile/package.json @@ -37,7 +37,7 @@ "expo:web": "yarn config:mobile && yarn expo start --web", "expo:build:detox": "yarn config:mobile && yarn detox build -c ios.sim.expo", "expo:test:detox": "yarn config:mobile && ./bin/downloadExpoApp.sh && yarn detox test --configuration ios.sim.expo", - "eas:build": "yarn yarn config:mobile && eas build", + "eas:build": "yarn config:mobile && eas build", "config:mobile": "yarn ts-node ../../.scripts/configure.mobile.ts" }, "overrides": { From 874d2623640b9c9c8007f33b1ecf54a42ac946f2 Mon Sep 17 00:00:00 2001 From: Ruslan K Date: Thu, 1 Feb 2024 18:00:09 +0100 Subject: [PATCH 3/5] Update .gitignore --- apps/mobile/.gitignore | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/apps/mobile/.gitignore b/apps/mobile/.gitignore index 8ff85617d..f5c245009 100644 --- a/apps/mobile/.gitignore +++ b/apps/mobile/.gitignore @@ -1,9 +1,7 @@ # OSX -# .DS_Store # Xcode -# build/ *.pbxuser !default.pbxuser @@ -23,7 +21,6 @@ DerivedData ios/.xcode.env.local # Android/IntelliJ -# build/ .idea .gradle @@ -32,7 +29,6 @@ local.properties *.hprof # node.js -# node_modules/ npm-debug.log yarn-error.log @@ -44,7 +40,6 @@ buck-out/ !debug.keystore # fastlane -# # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the # screenshots whenever they are needed. # For more information about the recommended setup visit: @@ -90,15 +85,10 @@ web-build/ dist/ -# @generated expo-cli sync-647791c5bd841d5c91864afb91c302553d300921 -# The following patterns were generated by expo-cli - # OSX -# .DS_Store # Xcode -# build/ *.pbxuser !default.pbxuser @@ -118,7 +108,6 @@ DerivedData project.xcworkspace # Android/IntelliJ -# build/ .idea .gradle @@ -130,7 +119,6 @@ local.properties !debug.keystore # node.js -# node_modules/ npm-debug.log yarn-error.log @@ -148,5 +136,3 @@ yarn-error.log .expo/ web-build/ dist/ -# /app.json -# @end expo-cli From 5b8b6a0686fad105701f94b976a2d38212be3d49 Mon Sep 17 00:00:00 2001 From: Anish Date: Fri, 2 Feb 2024 22:32:39 +0500 Subject: [PATCH 4/5] feat/#1662-kanban-board (#2138) * fix(Kanban): ui fixes and kanban drag and drop smoothness * fix(Kanban): ui fixes and kanban drag and drop smoothness * fix(DeepScan): fix the condition that is used for testing purpose * fix: translations added + console remove + static data removed * fix the consoles and static code * fix the consoles and static code * Update team-members-kanban-view.tsx * Update page.tsx * fix the scro unused word in class * fix the overlapper unused word in class * fix the overlapper unused word in class --------- Co-authored-by: Ruslan K --- .cspell.json | 1 + apps/web/app/[locale]/kanban/page.tsx | 213 ++++++++++-------- apps/web/app/hooks/features/useKanban.ts | 16 +- apps/web/app/interfaces/IKanban.ts | 6 +- apps/web/app/stores/kanban.ts | 6 +- apps/web/lib/components/Kanban.tsx | 67 +++--- apps/web/lib/components/image-overlapper.tsx | 124 +++++----- apps/web/lib/components/kanban-card.tsx | 19 +- .../lib/features/team-members-kanban-view.tsx | 70 +++--- apps/web/lib/i18n/en.ts | 4 +- apps/web/messages/ar.json | 7 +- apps/web/messages/bg.json | 6 +- apps/web/messages/de.json | 7 +- apps/web/messages/en.json | 5 + apps/web/messages/es.json | 5 + apps/web/messages/fr.json | 5 + apps/web/messages/he.json | 6 +- apps/web/messages/it.json | 6 +- apps/web/messages/nl.json | 6 +- apps/web/messages/pl.json | 6 +- apps/web/messages/pt.json | 6 +- apps/web/messages/ru.json | 6 +- apps/web/messages/zh.json | 6 +- apps/web/public/locales/en/common.json | 4 +- 24 files changed, 344 insertions(+), 263 deletions(-) diff --git a/.cspell.json b/.cspell.json index 140cce74b..c0f95884a 100644 --- a/.cspell.json +++ b/.cspell.json @@ -46,6 +46,7 @@ "gtag", "headlessui", "heroicons", + "overlapper", "Huhn", "icnsutils", "incididunt", diff --git a/apps/web/app/[locale]/kanban/page.tsx b/apps/web/app/[locale]/kanban/page.tsx index 624732bd9..63812a41b 100644 --- a/apps/web/app/[locale]/kanban/page.tsx +++ b/apps/web/app/[locale]/kanban/page.tsx @@ -4,148 +4,167 @@ import { KanbanTabs } from '@app/constants'; import { useOrganizationTeams } from '@app/hooks'; import { useKanban } from '@app/hooks/features/useKanban'; import KanbanBoardSkeleton from '@components/shared/skeleton/KanbanBoardSkeleton'; -import VerticalLine from '@components/ui/svgs/vertificalline'; import { withAuthentication } from 'lib/app/authenticator'; -import { Breadcrumb } from 'lib/components'; -import { AddIcon } from 'lib/components/svgs'; +import { Breadcrumb, Button, Dropdown, InputField } from 'lib/components'; +import { AddIcon, SearchNormalIcon, Settings4Icon } from 'lib/components/svgs'; import { KanbanView } from 'lib/features/team-members-kanban-view'; import { MainLayout } from 'lib/layout'; import { useState } from 'react'; import { useTranslations } from 'next-intl'; import { useParams } from 'next/navigation'; -import Skeleton from 'react-loading-skeleton'; -import ImageOverlapper, { IImageOverlapper } from 'lib/components/image-overlapper'; +import ImageComponent, { ImageOverlapperProps } from 'lib/components/image-overlapper'; +import Separator from '@components/ui/separator'; +import { clsxm } from '@app/utils'; const Kanban = () => { const { data } = useKanban(); const { activeTeam } = useOrganizationTeams(); const t = useTranslations(); const params = useParams<{ locale: string }>(); - const currentLocale = params ? params.locale : null; - const [activeTab, setActiveTab] = useState(KanbanTabs.TODAY); - const breadcrumbPath = [ { title: JSON.parse(t('pages.home.BREADCRUMB')), href: '/' }, { title: activeTeam?.name || '', href: '/' }, - { title: 'Kanban Board', href: `/${currentLocale}/kanban` } + { title: t('pages.kanban.KANBAN_BOARD'), href: `/${currentLocale}/kanban` } ]; const activeTeamMembers = activeTeam?.members ? activeTeam.members : []; - const teamMembers: IImageOverlapper[] = []; + const teamMembers: ImageOverlapperProps[] = []; - activeTeamMembers.map((member: any)=> { + activeTeamMembers.map((member: any) => { teamMembers.push({ id: member.employee.user.id, url: member.employee.user.imageUrl, alt: member.employee.user.firstName - }) + }); }); + const tabs = [ + { name: t('common.TODAY'), value: KanbanTabs.TODAY }, + { name: t('common.YESTERDAY'), value: KanbanTabs.YESTERDAY }, + { name: t('common.TOMORROW'), value: KanbanTabs.TOMORROW } + ]; + // eslint-disable-next-line react/no-unstable-nested-components + const Label = ({ active, selected }: { active: string; selected: string }) => ( +
+ {active} +
+ ); + const sampleDropdownItem = (key: string) => { + const data = { + key: '1', + Label: Label, + selectedLabel: {key}, + itemTitle: key + // other properties can be added as needed + }; + return data; + }; return ( <> - -
+ +
-
- {activeTeamMembers.length > 0 ? -

08:00 ( UTC +04:30 )

- : - - } - - - +
+
+

{t('pages.kanban.KANBAN_BOARD')}

+
+ 08:00 ( UTC +04:30 ) +
+ +
+ +
+ +
-
+
-
{ - setActiveTab(KanbanTabs.TODAY); - }} - className={`cursor-pointer pt-2.5 px-5 pb-[30px] text-base font-semibold ${ - activeTab === KanbanTabs.TODAY - ? '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', - borderBottomStyle: 'solid' - }} - > - Today -
-
{ - setActiveTab(KanbanTabs.YESTERDAY); - }} - className={`cursor-pointer pt-2.5 px-5 pb-[30px] text-base font-semibold ${ - activeTab === KanbanTabs.YESTERDAY - ? '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', - borderBottomStyle: 'solid' - }} + {tabs.map((tab) => ( +
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]' + }`} + style={{ + borderBottomWidth: '3px', + borderBottomStyle: 'solid' + }} + > + {tab.name} +
+ ))} +
+
+ + + +
+
-
{ - setActiveTab(KanbanTabs.TOMORROW); - }} - className={`cursor-pointer pt-2.5 px-5 pb-[30px] text-base font-semibold ${ - activeTab === KanbanTabs.TOMORROW - ? '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', - borderBottomStyle: 'solid' - }} - > - Tomorrow +
+ + + + } + />
-
-
+
{/** TODO:fetch teamtask based on days */} - {/** Kanbanboard for today tasks */} - {activeTab === KanbanTabs.TODAY && ( - <> - {Object.keys(data).length > 0 ? ( - - ) : ( - - )} - - )} - - {/** Kanbanboard for yesterday tasks */} - {activeTab === KanbanTabs.YESTERDAY && ( - <> - {Object.keys(data).length > 0 ? ( - - ) : ( - - )} - - )} - - {/** Kanbanboard for tomorrow tasks */} - {activeTab === KanbanTabs.TOMORROW && ( + {activeTab && ( // add filter for today, yesterday and tomorrow <> {Object.keys(data).length > 0 ? ( diff --git a/apps/web/app/hooks/features/useKanban.ts b/apps/web/app/hooks/features/useKanban.ts index c9ea813f1..66fb8e285 100644 --- a/apps/web/app/hooks/features/useKanban.ts +++ b/apps/web/app/hooks/features/useKanban.ts @@ -4,14 +4,12 @@ import { useRecoilState } from 'recoil'; import { useEffect, useState } from 'react'; import { ITaskStatusItemList, ITeamTask } from '@app/interfaces'; import { useTeamTasks } from './useTeamTasks'; +import { IKanban } from '@app/interfaces/IKanban'; export function useKanban() { const [loading, setLoading] = useState(true); - const [kanbanBoard, setKanbanBoard] = useRecoilState(kanbanBoardState); - const taskStatusHook = useTaskStatus(); - const { tasks, tasksFetching, updateTask } = useTeamTasks(); /** @@ -73,14 +71,22 @@ export function useKanban() { }); }; + const addNewTask = (task: ITeamTask, status: string) => { + const updatedBoard = { + ...kanbanBoard, + [status]: [...kanbanBoard[status], task] + }; + setKanbanBoard(() => updatedBoard); + }; return { - data: kanbanBoard, + data: kanbanBoard as IKanban, isLoading: loading, columns: taskStatusHook.taskStatus, updateKanbanBoard: setKanbanBoard, updateTaskStatus: updateTask, toggleColumn, isColumnCollapse, - reorderStatus + reorderStatus, + addNewTask }; } diff --git a/apps/web/app/interfaces/IKanban.ts b/apps/web/app/interfaces/IKanban.ts index 2d17b3da5..509d3dcc1 100644 --- a/apps/web/app/interfaces/IKanban.ts +++ b/apps/web/app/interfaces/IKanban.ts @@ -1,5 +1,5 @@ -import { ITeamTask } from "./ITask"; +import { ITeamTask } from './ITask'; export interface IKanban { - [key: string]: ITeamTask[] -} \ No newline at end of file + [key: string]: ITeamTask[]; +} diff --git a/apps/web/app/stores/kanban.ts b/apps/web/app/stores/kanban.ts index 0badd4c91..9940f0465 100644 --- a/apps/web/app/stores/kanban.ts +++ b/apps/web/app/stores/kanban.ts @@ -3,5 +3,7 @@ import { atom } from "recoil"; export const kanbanBoardState = atom({ key: 'kanbanBoardState', - default: {} -}) \ No newline at end of file + default: { + + } +}) diff --git a/apps/web/lib/components/Kanban.tsx b/apps/web/lib/components/Kanban.tsx index e4c597a58..b29a93197 100644 --- a/apps/web/lib/components/Kanban.tsx +++ b/apps/web/lib/components/Kanban.tsx @@ -10,11 +10,15 @@ import { DroppableProvided, DroppableStateSnapshot } from 'react-beautiful-dnd'; + import Item from './kanban-card'; import { ITeamTask } from '@app/interfaces'; import { TaskStatus } from '@app/constants'; import { useKanban } from '@app/hooks/features/useKanban'; import { AddIcon } from './svgs'; +import { Popover, PopoverContent, PopoverTrigger } from '@components/ui/popover'; +import { Button } from '@components/ui/button'; +import { useTranslations } from 'next-intl'; const grid = 8; @@ -55,23 +59,11 @@ function headerStyleChanger(snapshot: DraggableStateSnapshot, bgColor: any) { * @param param0 * @returns */ -function InnerItemList({ - items, - title, - dropSnapshot -}: { - title: string; - items: ITeamTask[]; - dropSnapshot: DroppableStateSnapshot; -}) { +function InnerItemList({ items, title }: { title: string; items: ITeamTask[]; dropSnapshot: DroppableStateSnapshot }) { return ( <>
0 ? '20px' : '0px' - }} - className="flex flex-col gap-2.5 overflow-x-hidden" + className="flex flex-col pb-2 overflow-x-hidden" > {items.map((item: ITeamTask, index: number) => ( @@ -137,19 +129,6 @@ export const KanbanDroppable = ({ type: string; content: ITeamTask[]; }) => { - const [enabled, setEnabled] = useState(false); - - useEffect(() => { - const animation = requestAnimationFrame(() => setEnabled(true)); - - return () => { - cancelAnimationFrame(animation); - setEnabled(false); - }; - }, []); - - if (!enabled) return null; - return ( <> @@ -216,7 +195,7 @@ export const EmptyKanbanDroppable = ({ {...provided.draggableProps} {...provided.dragHandleProps} style={getItemStyle(snapshot.isDragging, provided.draggableProps.style)} - className="flex flex-row w-fit h-full" + className="flex flex-row px-2 w-fit h-full" > {title.length > 0 ? ( <> @@ -279,7 +258,6 @@ const KanbanDraggableHeader = ({ provided: DraggableProvided; }) => { const { toggleColumn } = useKanban(); - return ( <> {title && ( @@ -306,7 +284,23 @@ const KanbanDraggableHeader = ({
- + + + + + + {['Delete', 'Archive', 'Copy'].map((v) => ( +

+ {v} +

+ ))} +
+
@@ -332,7 +326,10 @@ const KanbanDraggable = ({ title: string; backgroundColor: any; items: ITeamTask[]; + addNewTask: (value: ITeamTask, status: string) => void; }) => { + const t = useTranslations(); + return ( <> {title && ( @@ -343,7 +340,7 @@ const KanbanDraggable = ({ {...provided.draggableProps} {...provided.dragHandleProps} style={getItemStyle(snapshot.isDragging, provided.draggableProps.style)} - className="relative flex flex-col w-[325px]" + className="relative flex flex-col px-2 w-[355px]" > {title ? ( <> @@ -356,17 +353,17 @@ const KanbanDraggable = ({ backgroundColor={backgroundColor} />
-
+
-
+
+

{t('common.CREATE_TASK')}

+
) : null} diff --git a/apps/web/lib/components/image-overlapper.tsx b/apps/web/lib/components/image-overlapper.tsx index 33e1d49f7..f30f66874 100644 --- a/apps/web/lib/components/image-overlapper.tsx +++ b/apps/web/lib/components/image-overlapper.tsx @@ -1,74 +1,74 @@ -import Link from "next/link"; -import Image from "next/image"; +import Link from 'next/link'; +import Image from 'next/image'; import { Tooltip } from 'lib/components'; -import Skeleton from "react-loading-skeleton"; +import Skeleton from 'react-loading-skeleton'; -export interface IImageOverlapper { - id: string; - url: string; - alt: string; +export interface ImageOverlapperProps { + id: string; + url: string; + alt: string; } export default function ImageOverlapper({ - images, - radius=20, - displayImageCount=4 + images, + radius = 20, + displayImageCount = 4 }: { - images: IImageOverlapper[], - radius?: number, - displayImageCount?: number + images: ImageOverlapperProps[]; + radius?: number; + displayImageCount?: number; }) { - - const imageRadius = radius; - const imageLength = images.length; + const imageRadius = radius; + const imageLength = images.length; const numberOfImagesDisplayed = displayImageCount; const totalLength = (imageLength + 1) * imageRadius; - const stackImages = (index: number, length: number) => { - const total_length = (length + 1) * imageRadius; - return { - zIndex: (index + 1).toString(), - right: `calc(${total_length - imageRadius * (index + 2)}px)` - }; - }; + const stackImages = (index: number, length: number) => { + const total_length = (length + 1) * imageRadius; + return { + zIndex: (index + 1).toString(), + right: `calc(${total_length - imageRadius * (index + 2)}px)` + }; + }; - return ( -
- {imageLength > 0 ? -
- {images.map((image: IImageOverlapper, index: number) => { - if (index < numberOfImagesDisplayed) { - return ( - - - {`${image.alt} - - - ); - } - })} - {images.length > numberOfImagesDisplayed && ( -
- {(imageLength - numberOfImagesDisplayed) < 100 ? (imageLength - numberOfImagesDisplayed) : 99}+ -
- )} -
- : - - } + return ( +
+ {imageLength > 0 ? ( +
+ {images.map((image: ImageOverlapperProps, index: number) => { + if (index < numberOfImagesDisplayed) { + return ( + + + {`${image.alt} + + + ); + } + })} + {images.length > numberOfImagesDisplayed && ( +
+ {imageLength - numberOfImagesDisplayed < 100 ? imageLength - numberOfImagesDisplayed : 99}+ +
+ )} +
+ ) : ( + + )}
- ) -} \ No newline at end of file + ); +} diff --git a/apps/web/lib/components/kanban-card.tsx b/apps/web/lib/components/kanban-card.tsx index c9a8fc9f5..f97d6cc83 100644 --- a/apps/web/lib/components/kanban-card.tsx +++ b/apps/web/lib/components/kanban-card.tsx @@ -8,7 +8,7 @@ import { pad } from '@app/helpers'; import { TaskStatus } from '@app/constants'; import { TaskIssueStatus } from 'lib/features'; import Link from 'next/link'; -import ImageOverlapper, { IImageOverlapper } from './image-overlapper'; +import ImageComponent, { ImageOverlapperProps } from './image-overlapper'; function getStyle(provided: DraggableProvided, style: any) { if (!style) { @@ -73,7 +73,6 @@ function TagList({ tags }: { tags: Tag[] }) { ); } - function Priority({ level }: { level: number }) { const numberArray = Array.from({ length: level }, (_, index) => index + 1); @@ -98,14 +97,14 @@ export default function Item(props: any) { const { hours, minutes, seconds } = useTimerView(); - const taskAssignee: IImageOverlapper[] = []; + const taskAssignee: ImageOverlapperProps[] = []; - item.members.map((member: any)=> { + item.members.map((member: any) => { taskAssignee.push({ id: member.user.id, url: member.user.imageUrl, alt: member.user.firstName - }) + }); }); // const handleTime = () => { @@ -130,7 +129,7 @@ export default function Item(props: any) { {...provided.draggableProps} {...provided.dragHandleProps} style={getStyle(provided, style)} - className="flex flex-col rounded-2xl bg-white dark:bg-dark--theme-light p-4 relative" + className="flex flex-col my-2.5 rounded-2xl bg-white dark:bg-dark--theme-light p-4 relative" data-is-dragging={isDragging} data-testid={item.id} data-index={index} @@ -152,7 +151,10 @@ export default function Item(props: any) { /> #{item.number} - + {item.title} @@ -180,8 +182,7 @@ export default function Item(props: any) {

)} - - +
{item.hasComment && (
diff --git a/apps/web/lib/features/team-members-kanban-view.tsx b/apps/web/lib/features/team-members-kanban-view.tsx index 2d08ffdb9..52c8c829f 100644 --- a/apps/web/lib/features/team-members-kanban-view.tsx +++ b/apps/web/lib/features/team-members-kanban-view.tsx @@ -16,31 +16,21 @@ import { export const KanbanView = ({ kanbanBoardTasks }: { kanbanBoardTasks: IKanban }) => { const { + data: items, columns: kanbanColumns, updateKanbanBoard, updateTaskStatus, isColumnCollapse, - reorderStatus + reorderStatus, + addNewTask } = useKanban(); - - const [items, setItems] = useState(kanbanBoardTasks); - const [columns, setColumn] = useState(Object.keys(kanbanBoardTasks)); - const reorderTask = (list: ITeamTask[], startIndex: number, endIndex: number) => { const tasks = Array.from(list); const [removedTask] = tasks.splice(startIndex, 1); tasks.splice(endIndex, 0, removedTask); return tasks; }; - - const reorderColumn = (list: IKanban, startIndex: number, endIndex: number) => { - const columns = Object.keys(list); - const [removedColumn] = columns.splice(startIndex, 1); - columns.splice(endIndex, 0, removedColumn); - return columns; - }; - const reorderKanbanTasks = ({ kanbanTasks, source, @@ -102,9 +92,17 @@ export const KanbanView = ({ kanbanBoardTasks }: { kanbanBoardTasks: IKanban }) return selectState[0].color; }; + const reorderColumn = (column: any[], sourceIndex: number, destinationIndex: number) => { + const result = Array.from(column); + const [removed] = result.splice(sourceIndex, 1); + result.splice(destinationIndex, 0, removed); + + return result; + }; + /** - * This function handles all drag and drop logic - * on the kanban board. + * This function handles all drag & drop logic + * on the Kanban board. * @param result * @returns */ @@ -126,7 +124,7 @@ export const KanbanView = ({ kanbanBoardTasks }: { kanbanBoardTasks: IKanban }) ...items, [result.source.droppableId]: withItemRemoved }; - setItems(orderedItems); + updateKanbanBoard(orderedItems); return; } @@ -145,8 +143,7 @@ export const KanbanView = ({ kanbanBoardTasks }: { kanbanBoardTasks: IKanban }) } if (result.type === 'COLUMN') { - const reorderedItem = reorderColumn(items, source.index, destination.index); - + const reorderedItem = reorderColumn(columns, source.index, destination.index); //update column order in server side reorderedItem.map((item: string, index: number) => { return reorderStatus(item, index); @@ -163,7 +160,6 @@ export const KanbanView = ({ kanbanBoardTasks }: { kanbanBoardTasks: IKanban }) destination }); - setItems(data.kanbanBoard); updateKanbanBoard(() => data.kanbanBoard); }; @@ -179,7 +175,6 @@ export const KanbanView = ({ kanbanBoardTasks }: { kanbanBoardTasks: IKanban }) }, []); if (!enabled) return null; - return ( <> @@ -188,7 +183,7 @@ export const KanbanView = ({ kanbanBoardTasks }: { kanbanBoardTasks: IKanban }) {(provided: DroppableProvided, snapshot: DroppableStateSnapshot) => (
{ return ( -
- {isColumnCollapse(column) ? ( +
+ {isColumnCollapse(column) ? ( - ) : ( - <> - - - )} + ) : ( + <> + + + )}
); diff --git a/apps/web/lib/i18n/en.ts b/apps/web/lib/i18n/en.ts index 9add5ed10..a7b8ed578 100644 --- a/apps/web/lib/i18n/en.ts +++ b/apps/web/lib/i18n/en.ts @@ -120,7 +120,9 @@ export const en = { CONFIRM_ACCEPT_INVITATION: 'Are you sure you want to accept the invitation?', CONFIRM_REJECT_INVITATION: 'Are you sure you want to reject the invitation?' }, - + kanban: { + KANBAN_BOARD: 'Kanban Board' + }, profile: { BREADCRUMB: ['Member Tasks'] }, diff --git a/apps/web/messages/ar.json b/apps/web/messages/ar.json index 73adf78a1..9f1a622de 100644 --- a/apps/web/messages/ar.json +++ b/apps/web/messages/ar.json @@ -6,7 +6,8 @@ "REJECT": "رفض", "REJECTED": "مرفوض", "VERIFY": "تحقق", - + "TOMORROW" : "غدا", + "YESTERDAY" : "أمس", "INVITE": "دعوة", "INVITED": "مدعو", "EXPIRE": "انتهاء الصلاحية", @@ -191,7 +192,9 @@ "CONFIRM_ACCEPT_INVITATION": "هل أنت متأكد من رغبتك في قبول الدعوة؟", "CONFIRM_REJECT_INVITATION": "هل أنت متأكد من رغبتك في رفض الدعوة؟" }, - + "kanban":{ + "KANBAN_BOARD":"لوحة كانبان" + }, "profile": { "BREADCRUMB": "[\"مهام العضو\"]" }, diff --git a/apps/web/messages/bg.json b/apps/web/messages/bg.json index 45f9162bb..58728c2af 100644 --- a/apps/web/messages/bg.json +++ b/apps/web/messages/bg.json @@ -4,6 +4,8 @@ "ACCEPT": "Приемам", "ACCEPTED": "Приет", "REJECT": "Отхвърлям", + "TOMORROW" : "Утре", + "YESTERDAY" : "Вчера", "REJECTED": "Отхвърлен", "VERIFY": "провери", "INVITE": "Покани", @@ -189,7 +191,9 @@ "CONFIRM_ACCEPT_INVITATION": "Сигурни ли сте, че искате да приемете поканата?", "CONFIRM_REJECT_INVITATION": "Сигурни ли сте, че искате да отхвърлите поканата?" }, - + "kanban":{ + "KANBAN_BOARD":"Канбан дъска" + }, "profile": { "BREADCRUMB": "[\"Задачи за член\"]" }, diff --git a/apps/web/messages/de.json b/apps/web/messages/de.json index 57ce15e08..ad091edca 100644 --- a/apps/web/messages/de.json +++ b/apps/web/messages/de.json @@ -4,6 +4,8 @@ "ACCEPT": "Akzeptieren", "ACCEPTED": "Akzeptiert", "REJECT": "Ablehnen", + "TOMORROW" : "Morgen", + "YESTERDAY" : "Gestern", "REJECTED": "Abgelehnt", "VERIFY": "Verifizieren", "INVITE": "Einladen", @@ -191,11 +193,14 @@ "CONFIRM_ACCEPT_INVITATION": "Möchten Sie die Einladung wirklich annehmen?", "CONFIRM_REJECT_INVITATION": "Möchten Sie die Einladung wirklich ablehnen?" }, - + "kanban":{ + "KANBAN_BOARD":"Kanban-Board" + }, "profile": { "BREADCRUMB": "[\"Aufgaben des Mitglieds\"]" }, + "taskDetails": { "BREADCRUMB": "[\"Aufgabendetails\"]", "DESCRIPTION": "Beschreibungen", diff --git a/apps/web/messages/en.json b/apps/web/messages/en.json index 399ed42a2..5b4a794b7 100644 --- a/apps/web/messages/en.json +++ b/apps/web/messages/en.json @@ -4,6 +4,8 @@ "ACCEPT": "Accept", "ACCEPTED": "Accepted", "REJECT": "Reject", + "TOMORROW": "Tomorrow", + "YESTERDAY": "Yesterday", "REJECTED": "Rejected", "VERIFY": "verify", "INVITE": "Invite", @@ -199,6 +201,9 @@ "profile": { "BREADCRUMB": "[\"Member Tasks\"]" }, + "kanban":{ + "KANBAN_BOARD":"Kanban Board" + }, "taskDetails": { "BREADCRUMB": "[\"Task Details\"]", diff --git a/apps/web/messages/es.json b/apps/web/messages/es.json index c5948e717..643405ac8 100644 --- a/apps/web/messages/es.json +++ b/apps/web/messages/es.json @@ -4,6 +4,8 @@ "ACCEPT": "Aceptar", "ACCEPTED": "Aceptado", "REJECT": "Rechazar", + "TOMORROW" : "Mañana", + "YESTERDAY" : "Ayer", "REJECTED": "Rechazado", "VERIFY": "verificar", "INVITE": "Invitar", @@ -187,6 +189,9 @@ "CONFIRM_ACCEPT_INVITATION": "¿Estás seguro de que deseas aceptar la invitación?", "CONFIRM_REJECT_INVITATION": "¿Estás seguro de que deseas rechazar la invitación?" }, + "kanban":{ + "KANBAN_BOARD":"tablero kanban" + }, "profile": { "BREADCRUMB": "[\"Tareas de miembro\"]" }, diff --git a/apps/web/messages/fr.json b/apps/web/messages/fr.json index 72e08f8e4..500c32fd6 100644 --- a/apps/web/messages/fr.json +++ b/apps/web/messages/fr.json @@ -4,6 +4,8 @@ "ACCEPT": "Accepter", "ACCEPTED": "Accepté", "REJECT": "Rejeter", + "TOMORROW" : "Demain", + "YESTERDAY" : "Hier", "REJECTED": "Rejeté", "VERIFY": "Vérifier", "INVITE": "Inviter", @@ -189,6 +191,9 @@ "CONFIRM_ACCEPT_INVITATION": "Êtes-vous sûr de vouloir accepter l'invitation ?", "CONFIRM_REJECT_INVITATION": "Êtes-vous sûr de vouloir refuser l'invitation ?" }, + "kanban":{ + "KANBAN_BOARD":"Tableau Kanban" + }, "profile": { "BREADCRUMB": "[\"Tâches du membre\"]" }, diff --git a/apps/web/messages/he.json b/apps/web/messages/he.json index 35497a8cf..d377fba80 100644 --- a/apps/web/messages/he.json +++ b/apps/web/messages/he.json @@ -4,6 +4,8 @@ "ACCEPT": "קבל", "ACCEPTED": "התקבל", "REJECT": "דחה", + "TOMORROW" : "מחר", + "YESTERDAY" : "אתמול", "REJECTED": "נדחה", "VERIFY": "אמת", "INVITE": "הזמן", @@ -191,7 +193,9 @@ "CONFIRM_ACCEPT_INVITATION": "האם אתה בטוח שברצונך לקבל את ההזמנה?", "CONFIRM_REJECT_INVITATION": "האם אתה בטוח שברצונך לדחות את ההזמנה?" }, - + "kanban":{ + "KANBAN_BOARD":"לוח Kanban" + }, "profile": { "BREADCRUMB": "[\"משימות חבר\"]" }, diff --git a/apps/web/messages/it.json b/apps/web/messages/it.json index e8c0a64cb..c8ab43cee 100644 --- a/apps/web/messages/it.json +++ b/apps/web/messages/it.json @@ -4,6 +4,8 @@ "ACCEPT": "Accept", "ACCEPTED": "Accepted", "REJECT": "Reject", + "TOMORROW" :"Domani", + "YESTERDAY" :"Ieri", "REJECTED": "Rejected", "VERIFY": "verify", "INVITE": "Invite", @@ -193,7 +195,9 @@ "CONFIRM_ACCEPT_INVITATION": "Are you sure you want to accept the invitation?", "CONFIRM_REJECT_INVITATION": "Are you sure you want to reject the invitation?" }, - + "kanban":{ + "KANBAN_BOARD":"Tabellone Kanban" + }, "profile": { "BREADCRUMB": "[\"Member Tasks\"]" }, diff --git a/apps/web/messages/nl.json b/apps/web/messages/nl.json index 04684b954..dbf0c920b 100644 --- a/apps/web/messages/nl.json +++ b/apps/web/messages/nl.json @@ -4,6 +4,8 @@ "ACCEPT": "Accepteren", "ACCEPTED": "Geaccepteerd", "REJECT": "Afwijzen", + "TOMORROW" : "Morgen", + "YESTERDAY" : "Gisteren", "REJECTED": "Afgewezen", "VERIFY": "verifiëren", "INVITE": "Uitnodigen", @@ -191,7 +193,9 @@ "CONFIRM_ACCEPT_INVITATION": "Weet u zeker dat u de uitnodiging wilt accepteren?", "CONFIRM_REJECT_INVITATION": "Weet u zeker dat u de uitnodiging wilt afwijzen?" }, - + "kanban":{ + "KANBAN_BOARD":"Kanban-bord" + }, "profile": { "BREADCRUMB": "[\"Taken teamlid\"]" }, diff --git a/apps/web/messages/pl.json b/apps/web/messages/pl.json index 30d961ea4..212d104d7 100644 --- a/apps/web/messages/pl.json +++ b/apps/web/messages/pl.json @@ -4,6 +4,8 @@ "ACCEPT": "Accept", "ACCEPTED": "Accepted", "REJECT": "Reject", + "TOMORROW": "Jutro", + "YESTERDAY": "Wczoraj", "REJECTED": "Rejected", "VERIFY": "verify", "INVITE": "Invite", @@ -193,7 +195,9 @@ "CONFIRM_ACCEPT_INVITATION": "Are you sure you want to accept the invitation?", "CONFIRM_REJECT_INVITATION": "Are you sure you want to reject the invitation?" }, - + "kanban":{ + "KANBAN_BOARD":"Tablica Kanbana" + }, "profile": { "BREADCRUMB": "[\"Member Tasks\"]" }, diff --git a/apps/web/messages/pt.json b/apps/web/messages/pt.json index 5e2a5ddd8..893f14a54 100644 --- a/apps/web/messages/pt.json +++ b/apps/web/messages/pt.json @@ -4,6 +4,8 @@ "ACCEPT": "Accept", "ACCEPTED": "Accepted", "REJECT": "Reject", + "YESTERDAY": "Ontem", + "TOMORROW": "Amanhã", "REJECTED": "Rejected", "VERIFY": "verify", "INVITE": "Invite", @@ -193,7 +195,9 @@ "CONFIRM_ACCEPT_INVITATION": "Are you sure you want to accept the invitation?", "CONFIRM_REJECT_INVITATION": "Are you sure you want to reject the invitation?" }, - + "kanban":{ + "KANBAN_BOARD":"Quadro Kanban" + }, "profile": { "BREADCRUMB": "[\"Member Tasks\"]" }, diff --git a/apps/web/messages/ru.json b/apps/web/messages/ru.json index ea18ec5d1..0f987f70b 100644 --- a/apps/web/messages/ru.json +++ b/apps/web/messages/ru.json @@ -4,6 +4,8 @@ "ACCEPT": "Accept", "ACCEPTED": "Accepted", "REJECT": "Reject", + "TOMORROW": "Завтра", + "YESTERDAY": "Вчера", "REJECTED": "Rejected", "VERIFY": "verify", "INVITE": "Invite", @@ -193,7 +195,9 @@ "CONFIRM_ACCEPT_INVITATION": "Are you sure you want to accept the invitation?", "CONFIRM_REJECT_INVITATION": "Are you sure you want to reject the invitation?" }, - + "kanban":{ + "KANBAN_BOARD":"Канбан-доска" + }, "profile": { "BREADCRUMB": "[\"Member Tasks\"]" }, diff --git a/apps/web/messages/zh.json b/apps/web/messages/zh.json index e123c980d..3b5ef2542 100644 --- a/apps/web/messages/zh.json +++ b/apps/web/messages/zh.json @@ -4,6 +4,8 @@ "ACCEPT": "接受", "ACCEPTED": "已接受", "REJECT": "拒绝", + "TOMORROW": "明天", + "YESTERDAY": "昨天", "REJECTED": "已拒绝", "VERIFY": "验证", "INVITE": "邀请", @@ -191,7 +193,9 @@ "CONFIRM_ACCEPT_INVITATION": "您确定要接受邀请吗?", "CONFIRM_REJECT_INVITATION": "您确定要拒绝邀请吗?" }, - + "kanban":{ + "KANBAN_BOARD":"看板" + }, "profile": { "BREADCRUMB": "[\"成员任务\"]" }, diff --git a/apps/web/public/locales/en/common.json b/apps/web/public/locales/en/common.json index 7ae8476eb..08d88365f 100644 --- a/apps/web/public/locales/en/common.json +++ b/apps/web/public/locales/en/common.json @@ -195,7 +195,9 @@ "CONFIRM_ACCEPT_INVITATION": "Are you sure you want to accept the invitation?", "CONFIRM_REJECT_INVITATION": "Are you sure you want to reject the invitation?" }, - + "kanban": { + "KANBAN_BOARD": ["Kanban Board"] + }, "profile": { "BREADCRUMB": ["Member Tasks"] }, From 660f782841ca67517f0154cd2869f4d245f1874f Mon Sep 17 00:00:00 2001 From: Ruslan K Date: Fri, 2 Feb 2024 20:40:14 +0100 Subject: [PATCH 5/5] fix: make it work if current_teams not exists for some reason in response --- apps/web/app/[locale]/auth/passcode/page.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/web/app/[locale]/auth/passcode/page.tsx b/apps/web/app/[locale]/auth/passcode/page.tsx index 51b2a314b..a5d31bd7c 100644 --- a/apps/web/app/[locale]/auth/passcode/page.tsx +++ b/apps/web/app/[locale]/auth/passcode/page.tsx @@ -267,15 +267,18 @@ function WorkSpaceScreen({ if (form.workspaces.length === 1) { setSelectedWorkspace(0); } + + const currentTeams = form.workspaces[0]?.current_teams; + if ( form.workspaces.length === 1 && - form.workspaces[0].current_teams.length === 1 + currentTeams?.length === 1 ) { - setSelectedTeam(form.workspaces[0].current_teams[0].team_id); + setSelectedTeam(currentTeams[0].team_id); } if ( form.workspaces.length === 1 && - form.workspaces[0].current_teams.length <= 1 + (currentTeams?.length || 0) <= 1 ) { setTimeout(() => { document.getElementById('continue-to-workspace')?.click();