From 905fe1850dd58c738fde82337ab222a9398cf60c Mon Sep 17 00:00:00 2001 From: Jaisal Patel <70134418+GhostOf0days@users.noreply.github.com> Date: Sat, 16 Mar 2024 09:46:06 -0400 Subject: [PATCH] fixed admin search (#223) --- .eslintignore | 24 +++++++++----- .prettierrc | 31 +++++++++++++++---- .../admin/ParticipantTable/index.tsx | 8 ++--- 3 files changed, 45 insertions(+), 18 deletions(-) diff --git a/.eslintignore b/.eslintignore index 1d3bf94..21f7846 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,7 +1,17 @@ -# don't ever lint node_modules -node_modules -# don't lint build output (make sure it's set to your correct build folder name) -dist -# don't lint nyc coverage output -coverage -public +# .eslintignore +*.json +*.rc +*.config.ts +*.node.json +.eslint* +.prettier* +.vscode/* +.settings.json +.gitignore +.gitattributes +/coverage +/public +/node_modules +/build +/dist +/tests \ No newline at end of file diff --git a/.prettierrc b/.prettierrc index 8060c84..b5f10b7 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,8 +1,27 @@ { - "tabWidth": 2, - "semi": false, - "singleQuote": false, - "endOfLine": "lf", + "bracketSpacing": true, + "printWidth": 80, + "proseWrap": "preserve", + "semi": true, + "singleQuote": true, + "trailingComma": "all", + "tabWidth": 4, + "useTabs": true, "arrowParens": "always", - "trailingComma": "none" -} + "endOfLine": "lf", + "overrides": [ + { + "files": "*.json", + "options": { + "singleQuote": false + } + }, + { + "files": ".*rc", + "options": { + "singleQuote": false, + "parser": "json" + } + } + ] +} \ No newline at end of file diff --git a/src/components/admin/ParticipantTable/index.tsx b/src/components/admin/ParticipantTable/index.tsx index 4a34e2c..61affba 100644 --- a/src/components/admin/ParticipantTable/index.tsx +++ b/src/components/admin/ParticipantTable/index.tsx @@ -444,7 +444,7 @@ const ParticipantTable = (): ReactElement => { { .trim() .toLowerCase() .includes(searchString.trim().toLowerCase()) || - // Search for Applied status + // Search for applied status (row.original.status.includes("COMPLETED_PROFILE") && searchString.trim().toLowerCase() == "applied") || // Search for admins - (!row.original.status.includes( - searchString.trim().toLowerCase() - ) && + (row.original.admin && searchString.trim().toLowerCase() == "admin") ) .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)