Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
0fe3fbe
fix: make dropdown menus scrollable
imdeaconu Sep 6, 2024
4ca1a44
fix: truncate overflowing table columns
imdeaconu Sep 6, 2024
921aa13
Merge branch 'commitglobal:main' into main
imdeaconu Sep 6, 2024
e5a2869
Merge branch 'commitglobal:main' into main
imdeaconu Sep 6, 2024
7866a67
Merge branch 'commitglobal:main' into main
imdeaconu Sep 9, 2024
9ea6c42
Merge branch 'commitglobal:main' into main
imdeaconu Sep 10, 2024
1bd449d
Merge branch 'commitglobal:main' into main
imdeaconu Sep 11, 2024
c9874d1
Squashed commit of the following:
imdeaconu Sep 11, 2024
b7715f3
Merge branch 'commitglobal:main' into main
imdeaconu Sep 12, 2024
0facf65
Squashed commit of the following:
imdeaconu Sep 13, 2024
67f681d
chore: remove unused import
imdeaconu Sep 13, 2024
8d73252
chore: delete duplicated / unused classes
imdeaconu Sep 16, 2024
63b21b9
Merge branch 'commitglobal:main' into main
imdeaconu Sep 17, 2024
1892e6e
Merge branch 'commitglobal:main' into main
imdeaconu Sep 18, 2024
abb7c01
feature: add searching to MonitoringObserversTagFilter
imdeaconu Sep 19, 2024
9d0b8ae
Merge branch 'commitglobal:main' into main
imdeaconu Sep 20, 2024
c9fcd3e
chore: update config files
imdeaconu Sep 20, 2024
333ba49
Revert "[NGO Admin] Rewrite the tag selector component (#675)"
imdeaconu Sep 23, 2024
580b68e
Merge branch 'main' of https://github.com/commitglobal/votemonitor
imdeaconu Sep 23, 2024
ba2dad9
Merge branch 'commitglobal:main' into main
imdeaconu Sep 25, 2024
eea4faa
Merge branch 'main' of https://github.com/commitglobal/votemonitor in…
imdeaconu Sep 26, 2024
29b8163
Merge branch 'main' of https://github.com/commitglobal/votemonitor in…
imdeaconu Sep 26, 2024
68a44ee
Merge branch 'commitglobal-main'
imdeaconu Sep 26, 2024
7cf3244
Merge branch 'main' of https://github.com/commitglobal/votemonitor in…
imdeaconu Oct 1, 2024
b6abee7
Merge branch 'commitglobal-main-s1'
imdeaconu Oct 1, 2024
cc71856
Merge branch 'commitglobal:main' into main
imdeaconu Oct 2, 2024
e45ea22
Merge branch 'commitglobal:main' into main
imdeaconu Oct 2, 2024
50d15b6
Merge branch 'commitglobal:main' into main
imdeaconu Oct 2, 2024
1ed8e99
Merge branch 'commitglobal:main' into main
imdeaconu Oct 3, 2024
c2f1395
Merge branch 'commitglobal:main' into main
imdeaconu Oct 7, 2024
2c6d5f0
Merge branch 'commitglobal:main' into main
imdeaconu Oct 9, 2024
8c8e18f
Merge branch 'commitglobal:main' into main
imdeaconu Oct 9, 2024
db46a6d
Merge branch 'commitglobal:main' into main
imdeaconu Oct 10, 2024
d4b0263
Merge branch 'commitglobal:main' into main
imdeaconu Oct 12, 2024
79864cd
Merge branch 'commitglobal:main' into main
imdeaconu Oct 14, 2024
5ae7edf
Merge branch 'commitglobal:main' into main
imdeaconu Oct 15, 2024
c0fe98a
Merge branch 'commitglobal:main' into main
imdeaconu Oct 17, 2024
b7b3c5c
Merge branch 'commitglobal:main' into main
imdeaconu Oct 18, 2024
a892349
Merge branch 'commitglobal:main' into main
imdeaconu Oct 19, 2024
2d98793
Merge branch 'commitglobal:main' into main
imdeaconu Oct 20, 2024
66ba8d0
Merge branch 'commitglobal:main' into main
imdeaconu Oct 21, 2024
a86608d
Merge branch 'commitglobal:main' into main
imdeaconu Oct 22, 2024
aa1745c
Merge branch 'commitglobal:main' into main
imdeaconu Oct 23, 2024
9942029
Merge branch 'commitglobal:main' into main
imdeaconu Oct 23, 2024
d855c24
Merge branch 'commitglobal:main' into main
imdeaconu Oct 25, 2024
75fbf32
fix font size and text aligment
imdeaconu Oct 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,33 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Separator } from '@/components/ui/separator';
import { cn } from '@/lib/utils';

import { useElectionRoundDetails } from '../../hooks/election-event-hooks';
import { useCurrentElectionRoundStore } from '@/context/election-round.store';
import { useTranslation } from 'react-i18next';
import { useElectionRoundDetails } from '../../hooks/election-event-hooks';

export default function ElectionEventDetails() {
const { t } = useTranslation();
const currentElectionRoundId = useCurrentElectionRoundStore(s => s.currentElectionRoundId);
const currentElectionRoundId = useCurrentElectionRoundStore((s) => s.currentElectionRoundId);
const { data: electionEvent } = useElectionRoundDetails(currentElectionRoundId);

return (
<Card className='pt-0'>
<CardHeader className='flex gap-2 flex-column'>
<div className='flex flex-row items-center justify-between'>
<CardTitle className='text-xl'>{t('electionEvent.eventDetails.cardTitle')}</CardTitle>
<CardTitle className='text-2xl font-semibold leading-none tracking-tight'>
{t('electionEvent.eventDetails.cardTitle')}
</CardTitle>
</div>
<Separator />
</CardHeader>
<CardContent className='flex flex-col items-baseline gap-6'>
<div className='flex flex-col gap-1'>
<p className='font-bold text-gray-700'>{t('electionEvent.eventDetails.title')}</p>
<p className='font-normal text-gray-900'>
{electionEvent?.title}
</p>
<p className='font-normal text-gray-900'>{electionEvent?.title}</p>
</div>
<div className='flex flex-col gap-1'>
<p className='font-bold text-gray-700'>{t('electionEvent.eventDetails.englishTitle')}</p>
<p className='font-normal text-gray-900'>
{electionEvent?.englishTitle}
</p>
<p className='font-normal text-gray-900'>{electionEvent?.englishTitle}</p>
</div>
<div className='flex flex-col gap-1'>
<p className='font-bold text-gray-700'>{t('electionEvent.eventDetails.country')}</p>
Expand All @@ -48,7 +46,7 @@ export default function ElectionEventDetails() {
className={cn({
'text-slate-700 bg-slate-200': electionEvent?.status === 'NotStarted',
'text-green-700 bg-green-200': electionEvent?.status === 'Started',
'text-yellow-700 bg-yellow-200': electionEvent?.status === 'Archived'
'text-yellow-700 bg-yellow-200': electionEvent?.status === 'Archived',
})}>
{electionEvent?.status}
</Badge>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ export default function GuidesDashboard({ guidePageType }: GuidesDashboardProps)
return (
<Card className='w-full pt-0'>
<CardHeader className='flex gap-2 flex-column'>
<div className='flex flex-row items-center justify-between px-6'>
<CardTitle className='text-xl'>
<div className='flex flex-row items-center justify-between pr-6'>
<CardTitle className='text-2xl font-semibold leading-none tracking-tight'>
{guidePageType === GuidePageType.Observer
? i18n.t('electionEvent.guides.observerGuidesCardTitle')
: i18n.t('electionEvent.guides.citizenGuidesCardTitle')}
Expand Down
37 changes: 22 additions & 15 deletions web/src/features/forms/components/Dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ import i18n from '@/i18n';
import { cn, isNotNilOrWhitespace, mapFormType } from '@/lib/utils';
import { queryClient } from '@/main';
import { FormsSearchParams, Route } from '@/routes/election-event/$tab';
import { ChevronDownIcon, ChevronUpIcon, EllipsisVerticalIcon, FunnelIcon, PhotoIcon } from '@heroicons/react/24/outline';
import {
ChevronDownIcon,
ChevronUpIcon,
EllipsisVerticalIcon,
FunnelIcon,
PhotoIcon,
} from '@heroicons/react/24/outline';
import { useMutation } from '@tanstack/react-query';
import { useNavigate } from '@tanstack/react-router';
import { ColumnDef, createColumnHelper, Row } from '@tanstack/react-table';
Expand Down Expand Up @@ -317,18 +323,17 @@ export default function FormsDashboard(): ReactElement {
row.depth === 0 ? (
isNotNilOrWhitespace(row.original.icon) ? (
<TooltipProvider delayDuration={100}>
<Tooltip>
<TooltipTrigger asChild>
<span className='underline cursor-pointer decoration-dashed hover:decoration-solid'>
<PhotoIcon className='w-6 h-6'/>
</span>
</TooltipTrigger>
<TooltipContent>
<div dangerouslySetInnerHTML={{ __html: row.original.icon ?? '' }}></div>

</TooltipContent>
</Tooltip>
</TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<span className='underline cursor-pointer decoration-dashed hover:decoration-solid'>
<PhotoIcon className='w-6 h-6' />
</span>
</TooltipTrigger>
<TooltipContent>
<div dangerouslySetInnerHTML={{ __html: row.original.icon ?? '' }}></div>
</TooltipContent>
</Tooltip>
</TooltipProvider>
) : (
<></>
)
Expand Down Expand Up @@ -506,8 +511,10 @@ export default function FormsDashboard(): ReactElement {
return (
<Card className='w-full pt-0'>
<CardHeader className='flex gap-2 flex-column'>
<CardTitle className='flex flex-row items-center justify-between px-6'>
<div className='text-xl'>{i18n.t('electionEvent.observerForms.cardTitle')}</div>
<CardTitle className='flex flex-row items-center justify-between pr-6'>
<div className='text-2xl font-semibold leading-none tracking-tight'>
{i18n.t('electionEvent.observerForms.cardTitle')}
</div>
<div>
<CreateDialog title={i18n.t('electionEvent.observerForms.createDialogTitle')}>
<CreateForm />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,10 @@ function MonitoringObserversList() {
return (
<Card className='w-full pt-0'>
<CardHeader className='flex gap-2 flex-column'>
<div className='flex flex-row items-center justify-between px-6'>
<CardTitle className='text-xl'>Monitoring observers list</CardTitle>
<div className='flex flex-row items-center justify-between pr-6'>
<CardTitle className='text-2xl font-semibold leading-none tracking-tight'>
Monitoring observers list
</CardTitle>
<div className='flex flex-row-reverse gap-4 table-actions flex-row-'>
{!!importErrorsFileId && (
<ImportMonitoringObserversErrorsDialog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ function PushMessages(): FunctionComponent {
return (
<Card className='w-full pt-0'>
<CardHeader className='flex flex-column gap-2'>
<div className='flex flex-row justify-between items-center px-6'>
<CardTitle className='text-xl'>Push messages</CardTitle>
<div className='flex flex-row justify-between items-center pr-6'>
<CardTitle className='text-2xl font-semibold leading-none tracking-tight'>Push messages</CardTitle>
<div className='table-actions flex flex-row-reverse flex-row- gap-4'>
<Link to='/monitoring-observers/create-new-message' search={{ pageSize: 25 }}>
<Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export default function PollingStationsDashboard(): ReactElement {
return (
<Card className='pt-0'>
<CardHeader className='flex gap-2 flex-column'>
<div className='flex items-center justify-between px-6'>
<div className='flex items-center justify-between'>
<CardTitle>{i18n.t('electionEvent.pollingStations.cardTitle')}</CardTitle>

<div className='flex items-center gap-4'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ export default function FormSubmissionsTab(): FunctionComponent {
return (
<Card>
<CardHeader>
<div className='flex items-center justify-between px-6'>
<CardTitle>Form submissions</CardTitle>
<div className='flex items-center justify-between pr-6'>
<CardTitle className='text-2xl font-semibold leading-none tracking-tight'>Form submissions</CardTitle>

<div className='flex items-center gap-4'>
<ExportDataButton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ export default function IncidentReportsTab(): FunctionComponent {
return (
<Card>
<CardHeader>
<div className='flex items-center justify-between px-6'>
<CardTitle>Incident reports submissions</CardTitle>
<div className='flex items-center justify-between pr-6'>
<CardTitle className='text-2xl font-semibold leading-none tracking-tight'>
Incident reports submissions
</CardTitle>

<div className='flex items-center gap-4'>
<ExportDataButton exportedDataType={ExportedDataType.IncidentReports} filterParams={queryParams} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ export function QuickReportsTab(): FunctionComponent {
return (
<Card>
<CardHeader>
<div className='flex items-center justify-between px-6'>
<CardTitle>Quick reports</CardTitle>
<div className='flex items-center justify-between pr-6'>
<CardTitle className='text-2xl font-semibold leading-none tracking-tight'>Quick reports</CardTitle>

<ExportDataButton exportedDataType={ExportedDataType.QuickReports} filterParams={queryParams} />
</div>

<Separator />

<div className='flex justify-end gap-4 px-6'>
<div className='flex justify-end gap-4 px-6 h-9'>
<FunnelIcon
className='w-[20px] text-purple-900 cursor-pointer'
fill={isFiltering ? '#5F288D' : 'rgba(0,0,0,0)'}
Expand Down