Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(regulations-admin): Update strings, fix impactname #17041

Merged
merged 3 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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 @@ -446,6 +446,7 @@ export const EditChange = (props: EditChangeProp) => {
} as Regulation
}
baseName={'' as RegName}
asBase={draft.type.value === 'base'}
/>
)}
<GridContainer>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { Box, Button, DatePicker, Checkbox } from '@island.is/island-ui/core'
import {
Box,
Button,
DatePicker,
Checkbox,
Text,
} from '@island.is/island-ui/core'
import { impactMsgs } from '../../lib/messages'
import { DraftImpactForm } from '../../state/types'
import { useLocale } from '@island.is/localization'
Expand Down Expand Up @@ -36,14 +42,20 @@ export const ImpactDate = (props: ImpactDateProps) => {

return (
<Box marginBottom={4} width={size}>
<Box marginBottom={3}>
<Box marginBottom={2}>
<Checkbox
label={t(impactMsgs.specificDateApply)}
labelVariant="default"
checked={hasCustomDate}
onChange={() => setHasCustomDate(!hasCustomDate)}
/>
</Box>

<Box marginBottom={3}>
<Text variant="small" color="dark400">
{t(impactMsgs.specificDateApplyTextDetails)}
</Text>
</Box>
{hasCustomDate ? (
<>
<DatePicker
Expand All @@ -65,7 +77,10 @@ export const ImpactDate = (props: ImpactDateProps) => {
size="small"
variant="text"
preTextIcon="close"
onClick={() => onChange(undefined)}
onClick={() => {
onChange(undefined)
setHasCustomDate(false)
}}
>
{t(impactMsgs.effectiveDate_default)}
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const t = getTexts({

effectiveDate: 'Tekur gildi þann',

referenceLegend: 'Texti áhrifareglugerðar {name}',
referenceBaseLegend: 'Texti grunnreglugerðarinnar {name}',
referenceLegend: 'Texti breytingareglugerðar {name}',
referenceBaseLegend: 'Texti stofnreglugerðarinnar {name}',
referenceMeta: 'Útgáfudagur: {published}',
referenceEditLink: 'Leiðrétta',

Expand Down
6 changes: 6 additions & 0 deletions libs/portals/admin/regulations-admin/src/lib/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,12 @@ export const impactMsgs = defineMessages({
defaultMessage: 'Breyting tekur gildi á ákveðinni dagsetningu',
},

specificDateApplyTextDetails: {
id: 'ap.regulations-admin:change-applied-on-specific-date-text-details',
defaultMessage:
'Sjálfgefið er að breytingar taki gildi þegar í stað, daginn eftir útgáfudag. Veljið dagsetningu úr dagatali ef gildistaka er á ákveðinni dagsetningu.',
},

// ---------------------------------------------------------------------------

regExplainer: {
Expand Down
Loading