From 64e8eb4c316cdf72536f26312ed4eb47f3f5f795 Mon Sep 17 00:00:00 2001 From: kotesh-arya Date: Sat, 1 Jul 2023 08:23:53 +0530 Subject: [PATCH] REFACTOR: pass assignee property --- next-env.d.ts | 1 + public/mockServiceWorker.js | 2 +- src/components/tasks/card/index.tsx | 4 ++-- tsconfig.json | 33 +++++++++++++++++++++++------ 4 files changed, 30 insertions(+), 10 deletions(-) diff --git a/next-env.d.ts b/next-env.d.ts index 4f11a03dc..fd36f9494 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,5 +1,6 @@ /// /// +/// // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/public/mockServiceWorker.js b/public/mockServiceWorker.js index 70f0a2b99..671ec2cbd 100644 --- a/public/mockServiceWorker.js +++ b/public/mockServiceWorker.js @@ -2,7 +2,7 @@ /* tslint:disable */ /** - * Mock Service Worker (0.49.2). + * Mock Service Worker (0.49.3). * @see https://github.com/mswjs/msw * - Please do NOT modify this file. * - Please do NOT serve this file on production. diff --git a/src/components/tasks/card/index.tsx b/src/components/tasks/card/index.tsx index 019ece98b..71d17eb2e 100644 --- a/src/components/tasks/card/index.tsx +++ b/src/components/tasks/card/index.tsx @@ -140,7 +140,7 @@ const Card: FC = ({ ) { if (event.key === 'Enter') { const toChange: any = cardDetails; - toChange[changedProperty] = stripHtml(assigneeName); + toChange[changedProperty] = stripHtml(event.target.innerHTML); if ( changedProperty === 'endsOn' || @@ -150,10 +150,10 @@ const Card: FC = ({ new Date(`${event.target.value}`).getTime() / 1000; toChange[changedProperty] = toTimeStamp; } - console.log(toChange); onContentChange(toChange.id, { [changedProperty]: toChange[changedProperty], + status: 'ASSIGNED', }); } } diff --git a/tsconfig.json b/tsconfig.json index 95f7795a1..29a2f8869 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,9 @@ { "compilerOptions": { - "lib": ["dom", "es2017"], + "lib": [ + "dom", + "es2017" + ], "jsx": "preserve", "strict": true, "target": "es5", @@ -17,9 +20,16 @@ "isolatedModules": true, "baseUrl": ".", "paths": { - "@/*": ["src/*"] + "@/*": [ + "src/*" + ] }, - "incremental": true + "incremental": true, + "plugins": [ + { + "name": "next" + } + ] }, "include": [ "next-env.d.ts", @@ -27,8 +37,17 @@ "**/*.tsx", "src/**/*.ts", "src/**/*.tsx", - "__tests__/**/*.tsx" -, "__mocks__/styleMock.ts", "server.ts" ], - "exclude": ["node_modules"], - "types": ["node", "jest", "@testing-library/jest-dom"] + "__tests__/**/*.tsx", + "__mocks__/styleMock.ts", + "server.ts", + ".next/types/**/*.ts" + ], + "exclude": [ + "node_modules" + ], + "types": [ + "node", + "jest", + "@testing-library/jest-dom" + ] }