Skip to content

Commit

Permalink
AE-1923: Add filter to käytönvalvonta listing to show only those that…
Browse files Browse the repository at this point in the history
… are in uhkasakkoprosessi
  • Loading branch information
Juholei committed Jan 5, 2024
1 parent b1d65f7 commit a754baf
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions etp-front/src/language/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1726,6 +1726,7 @@
"empty": "Ei valvontatoimenpiteitä",
"ei-valvojaa": "Ei valvojaa",
"include-closed": "Näytä myös päättyneet",
"only-uhkasakkoprosessi": "Näytä vain uhkasakkoprosessissa olevat valvonnat",
"diaarinumero": "Diaarinumero",
"last-toimenpide": "Edellinen tapahtuma",
"last-template": "Asiakirjapohja",
Expand Down
1 change: 1 addition & 0 deletions etp-front/src/language/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -1778,6 +1778,7 @@
"empty": "Inga kontrollåtgärder",
"ei-valvojaa": "Ingen övervakare",
"include-closed": "Visa även avslutade",
"only-uhkasakkoprosessi": "Näytä vain uhkasakkoprosessissa olevat valvonnat (sv)",
"diaarinumero": "Diarienummer",
"last-toimenpide": "Föregående händelse",
"last-template": "Dokumentmall",
Expand Down
19 changes: 18 additions & 1 deletion etp-front/src/pages/valvonta-kaytto/valvonnat.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
'valvoja-id': Maybe.None(),
'include-closed': Maybe.None(),
'has-valvoja': Maybe.None(),
'only-uhkasakkoprosessi': Maybe.None(),
keyword: Maybe.None(),
'toimenpidetype-id': Maybe.None(),
'asiakirjapohja-id': Maybe.None()
Expand All @@ -87,6 +88,10 @@
'valvoja-id': queryStringIntegerProp(parsedQs, 'valvoja-id'),
'include-closed': queryStringBooleanProp(parsedQs, 'include-closed'),
'has-valvoja': queryStringBooleanProp(parsedQs, 'has-valvoja'),
'only-uhkasakkoprosessi': queryStringBooleanProp(
parsedQs,
'only-uhkasakkoprosessi'
),
keyword: Maybe.fromEmpty(R.prop('keyword', parsedQs)),
'toimenpidetype-id': queryStringIntegerProp(parsedQs, 'toimenpidetype-id'),
'asiakirjapohja-id': queryStringIntegerProp(parsedQs, 'asiakirjapohja-id')
Expand All @@ -108,6 +113,7 @@
'toimenpidetype-id': R.prop('toimenpidetype-id', query),
'asiakirjapohja-id': R.prop('asiakirjapohja-id', query),
'include-closed': R.prop('include-closed', query),
'only-uhkasakkoprosessi': R.prop('only-uhkasakkoprosessi', query),
'has-valvoja': R.compose(R.filter(R.not), R.prop('has-valvoja'))(query)
});
Expand Down Expand Up @@ -214,7 +220,7 @@
text={i18n(i18nRoot + '.new-kohde')} />
</div>
</div>
{#each Maybe.toArray(resources) as { valvonnat, whoami, luokittelut, toimenpidetyypit, valvojat, postinumerot, templates }}
{#each Maybe.toArray(resources) as { valvonnat, whoami, toimenpidetyypit, valvojat, postinumerot, templates }}
<div class="flex flex-wrap items-end lg:space-y-0 space-y-4">
<div class="w-1/4 mr-4">
<Select
Expand All @@ -238,6 +244,17 @@
lens={R.lensProp('has-valvoja')}
format={R.compose(R.not, Maybe.orSome(false))}
parse={R.compose(Maybe.Some, R.not)} />

<div class="flex flex-grow md:justify-center">
<Checkbox
disabled={overlay}
label={i18n(`${i18nRoot}.only-uhkasakkoprosessi`)}
bind:model={query}
lens={R.lensProp('only-uhkasakkoprosessi')}
format={Maybe.orSome(false)}
parse={Maybe.Some} />
</div>

<div class="flex flex-grow md:justify-end">
<Checkbox
disabled={overlay}
Expand Down

0 comments on commit a754baf

Please sign in to comment.