Skip to content

Merge main into dev#840

Merged
idormenco merged 21 commits intodevelopfrom
main
Nov 27, 2024
Merged

Merge main into dev#840
idormenco merged 21 commits intodevelopfrom
main

Conversation

@idormenco
Copy link
Copy Markdown
Contributor

No description provided.

idormenco and others added 21 commits November 4, 2024 16:47
* 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  (#675)"

This reverts commit 2ad0e90.

* Merge branch 'main' of https://github.com/commitglobal/votemonitor into commitglobal-main

* reset page numbr to 1 on filtering
* Add coalitions

* Fix form template name, fix get form by id and form submissions

* fix selects

* Add form access ui

* Remove unused columns

* Fix get filters

* Add data source filters for submissions

* Fix list submissions

* fix queries

* fixes and tests

* cleanup, fix list by observer endpoint add tests

* refactor fix tests

* fix tests and selects

* fix queries for get by id and get aggregated

* Fix quick reports

* implement coalition data

* add is own observer and filters on qr

* Fix failing tests

* fix ui build

* fix statistics

* fix issues

* fix tests
* Rework header

* Fix bug with invitations

* Fix stuff
* Cleanup and improvements

* move form submissions to /responses/form-submissions

* add before load for all auth routes

* Rework and cleanup observers import

* cleanup
@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
votemonitor ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 27, 2024 3:15pm

Comment on lines +46 to +51
foreach (var ngo in ngosToAddAsMonitoringNgos)
{
var monitoringNgo = electionRound.AddMonitoringNgo(ngo);
monitoringNgos.Add(monitoringNgo);
context.MonitoringNgos.Add(monitoringNgo);
}

Check notice

Code scanning / CodeQL

Missed opportunity to use Select

This foreach loop immediately [maps its iteration variable to another variable](1) - consider mapping the sequence explicitly using '.Select(...)'.
Comment on lines +44 to +49
foreach (var ngo in ngosToAddAsMonitoringNgos)
{
var monitoringNgo = coalition.ElectionRound.AddMonitoringNgo(ngo);
coalitionMembers.Add(monitoringNgo);
context.MonitoringNgos.Add(monitoringNgo);
}

Check notice

Code scanning / CodeQL

Missed opportunity to use Select

This foreach loop immediately [maps its iteration variable to another variable](1) - consider mapping the sequence explicitly using '.Select(...)'.
&& x.MonitoringNgo.NgoId == req.NgoId
&& x.Id == req.FormId)
.FromSqlInterpolated($"""
select f.* from "GetAvailableForms"({req.ElectionRoundId}, {req.NgoId}, {req.DataSource.ToString()}) af

Check notice

Code scanning / CodeQL

Redundant ToString() call

Redundant call to 'ToString' on a String object.
""";

var queryArgs = new { electionRoundId = req.ElectionRoundId, ngoId = req.NgoId };
IEnumerable<MonitoringObserverExportModel> monitoringObservers = [];

Check warning

Code scanning / CodeQL

Useless assignment to local variable

This assignment to [monitoringObservers](1) is useless, since its value is never read.
PresignedUrl = result!.Url,
MimeType = attachment.MimeType,
UrlValidityInSeconds = result.UrlValidityInSeconds,
UrlValidityInSeconds = result.UrlValidityInSeconds

Check warning

Code scanning / CodeQL

Dereferenced variable may be null

Variable [result](1) may be null at this access because of [this](2) assignment.

public CoalitionScenarioBuilder WithQuickReport(ScenarioObserver observer, ScenarioPollingStation pollingStation)
{
var observerClient = ParentBuilder.WithQuickReport(observer, pollingStation);

Check warning

Code scanning / CodeQL

Useless assignment to local variable

This assignment to [observerClient](1) is useless, since its value is never read.
@@ -24,6 +24,6 @@
new List<object[]>
{
new object[] { Guid.Empty },
new object[] { null as Guid? },
new object[] { null as Guid? }

Check warning

Code scanning / CodeQL

Useless upcast

There is no need to upcast from [null](1) to [Nullable<Guid>](2) - the conversion can be done implicitly.
@@ -5,25 +5,24 @@
import LocationsDashboard from '@/features/locations/components/Dashboard/Dashboard';
import PollingStationsDashboard from '@/features/polling-stations/components/Dashboard/Dashboard';
import { cn } from '@/lib/utils';
import { getRouteApi } from '@tanstack/react-router';
import { getRouteApi, useNavigate } from '@tanstack/react-router';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused import getRouteApi.
import { useSuspenseQuery } from '@tanstack/react-query';
import { Link, useRouter } from '@tanstack/react-router';
import { Link } from '@tanstack/react-router';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused import Link.

{isFiltering && (
{filtersExpanded && (

Check warning

Code scanning / CodeQL

Useless conditional

This use of variable 'filtersExpanded' always evaluates to true.
@idormenco idormenco merged commit d7910cd into develop Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants