Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| foreach (var iso in languages) | ||
| { | ||
| if (!Languages.Contains(iso)) | ||
| { | ||
| throw new ValidationException([ | ||
| new ValidationFailure(nameof(languages) + $".{iso}", "Language is not supported.") | ||
| ]); | ||
| } | ||
| } |
Check notice
Code scanning / CodeQL
Missed opportunity to use Where
| import { EditFormType } from '../EditForm/EditForm'; | ||
| import { useElectionRoundDetails } from '@/features/election-event/hooks/election-event-hooks'; | ||
| import { EditFormType } from '../FormEditor/FormEditor'; | ||
| import { FormFull } from '@/features/forms/models'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 year ago
To fix the problem, we need to remove the unused import statement for FormFull. This will clean up the code and improve readability and maintainability. The change should be made in the file web/src/components/FormTranslationEditor/FormDetailsTranslationEditor.tsx.
| @@ -13,3 +13,3 @@ | ||
| import { EditFormType } from '../FormEditor/FormEditor'; | ||
| import { FormFull } from '@/features/forms/models'; | ||
|
|
||
| import { FormTemplateFull } from '@/features/form-templates/models'; |
| import { useElectionRoundDetails } from '@/features/election-event/hooks/election-event-hooks'; | ||
| import { EditFormType } from '../FormEditor/FormEditor'; | ||
| import { FormFull } from '@/features/forms/models'; | ||
| import { FormTemplateFull } from '@/features/form-templates/models'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 year ago
To fix the problem, we need to remove the unused import statement for FormTemplateFull. This will clean up the code and eliminate any confusion or potential maintenance issues related to unused imports.
- Locate the import statement for
FormTemplateFullin the fileweb/src/components/FormTranslationEditor/FormDetailsTranslationEditor.tsx. - Remove the line containing the import statement.
- Ensure that the removal does not affect any other parts of the code.
| @@ -14,3 +14,3 @@ | ||
| import { FormFull } from '@/features/forms/models'; | ||
| import { FormTemplateFull } from '@/features/form-templates/models'; | ||
|
|
||
|
|
| @@ -0,0 +1,233 @@ | |||
| import Layout from '@/components/layout/Layout'; | |||
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 year ago
To fix the problem, we need to remove the unused import statement for Layout from the file web/src/components/PreviewFormPage/PreviewFormPage.tsx. This will clean up the code and eliminate any potential confusion caused by the presence of an unused import.
- Remove the import statement for
Layouton line 1. - Ensure that no other parts of the code rely on this import.
| @@ -1,2 +1 @@ | ||
| import Layout from '@/components/layout/Layout'; | ||
| import { Badge } from '@/components/ui/badge'; |
| @@ -0,0 +1,233 @@ | |||
| import Layout from '@/components/layout/Layout'; | |||
| import { Badge } from '@/components/ui/badge'; | |||
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 year ago
To fix the problem, we need to remove the unused import statement for Badge from the file web/src/components/PreviewFormPage/PreviewFormPage.tsx. This will improve code readability and maintainability without changing any existing functionality.
| @@ -1,3 +1,3 @@ | ||
| import Layout from '@/components/layout/Layout'; | ||
| import { Badge } from '@/components/ui/badge'; | ||
|
|
||
| import { Button } from '@/components/ui/button'; |
| @@ -0,0 +1,40 @@ | |||
| import { BaseQuestion, FormBase, FormType, LanguagesTranslationStatus, TranslatedString } from "@/common/types"; | |||
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 year ago
To fix the problem, we need to remove the unused import LanguagesTranslationStatus from the import statement. This will clean up the code and eliminate any confusion or potential performance issues related to unused imports.
- In general terms, the problem can be fixed by identifying and removing any unused imports.
- Specifically, we will remove
LanguagesTranslationStatusfrom the import statement on line 1. - The change will be made in the file
web/src/features/forms/models.ts.
| @@ -1,2 +1,2 @@ | ||
| import { BaseQuestion, FormBase, FormType, LanguagesTranslationStatus, TranslatedString } from "@/common/types"; | ||
| import { BaseQuestion, FormBase, FormType, TranslatedString } from "@/common/types"; | ||
|
|
| @@ -1,14 +1,12 @@ | |||
| import { FormBuilderScreenScratch } from '@/features/forms/components/FormBuilder/components/FormBuilderScreenScratch'; | |||
| import FormEdit from '@/features/forms/components/FormEdit/FormEdit'; | |||
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 year ago
To fix the problem, we need to remove the unused import statement for FormEdit. This will clean up the code and eliminate any potential confusion or minor performance issues associated with the unused import.
- Remove the import statement for
FormEditfrom the fileweb/src/routes/forms/new_.scratch.tsx. - Ensure that no other parts of the code are affected by this removal.
| @@ -1,2 +1 @@ | ||
| import FormEdit from '@/features/forms/components/FormEdit/FormEdit'; | ||
| import FormNew from '@/features/forms/components/FormNew/FormNew'; |
…rt, function or class Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…rt, function or class Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Fix guide access for observers (commitglobal#868) * Realease v0.2.48 (commitglobal#869) * [NGO Admin] Fix monitoring observers bugs (commitglobal#872) * fix: make dropdown menus scrollable * fix: truncate overflowing table columns * Squashed commit of the following: commit 742f250 Author: imdeaconu <imdeaconu@gmail.com> Date: Wed Sep 11 19:54:55 2024 +0300 add read notification checkmark commit ea11fa0 Author: imdeaconu <imdeaconu@gmail.com> Date: Wed Sep 11 19:54:30 2024 +0300 add read notification column * Squashed commit of the following: commit d8833dc Author: imdeaconu <imdeaconu@gmail.com> Date: Fri Sep 13 13:29:31 2024 +0300 WIP: add selector functionality commit 3608c0e Author: imdeaconu <imdeaconu@gmail.com> Date: Fri Sep 13 10:00:05 2024 +0300 WIP: create new tags input * chore: remove unused import * chore: delete duplicated / unused classes * feature: add searching to MonitoringObserversTagFilter * chore: update config files * Revert "[NGO Admin] Rewrite the tag selector component (commitglobal#675)" This reverts commit 2ad0e90. * Merge branch 'main' of https://github.com/commitglobal/votemonitor into commitglobal-main * WIP: rename prop for alternative filter key in Observer Tags and add it to the Push Message form * WIP: fix push messages receipients query not invalidating after edits * invalidate targeted observers query after a morning observer is added * Add crud for election rounds (commitglobal#857) * Add crud for election rounds * Update Validator.cs * Improve endpoints for election rounds * make phone number not mandatory * rework validation of phone number * Implement edit ps /location * undo delete * fix dashboard search * fix filtering * Refactor form builders * Rework form templates fix form builder * Refactor forms * Rebuild migrations * fix observers tab queries * more fixez and improvements * Update packages * Fix monitoring observers view/edit * Fix .net build, fix navigations * Fix new form * use navigate without void * fix file name casing * fix linting issues * Cleanup and fix add translations * Add election rounds filtering * Update form-submissions-queries.ts * Update ElectionRoundForm.tsx * Delete hooks.ts * Update queries.ts * Update PreviewDialogs.tsx * better errors * Update observer.ts * Cleanup * Potential fix for code scanning alert no. 1118: Unused variable, import, function or class Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 1098: Unused variable, import, function or class Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Release v0.2.49 (commitglobal#874) --------- Co-authored-by: Ion Dormenco <idormenco@gmail.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
No description provided.