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

Hide personal data processing message #922

Merged
merged 5 commits into from
Jul 22, 2024
Merged
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
54 changes: 29 additions & 25 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,31 +157,35 @@ const TaxFormSection = ({ nextRoute, isDebug, isLive }) => {
)
}

const PostponeSection = ({ nextPostponeRoute, now, isPostponeLive, isDebug }) => (
<>
<h2 className="govuk-heading-m govuk-!-margin-top-3">
{`Odklad daňového priznania za rok ${TAX_YEAR}`}
</h2>
<PostponeText now={now} />
<ul className="govuk-list govuk-list--bullet">
<li>{`do 30.6.${TAX_YEAR + 1} ak ste mali príjmy len zo Slovenska, alebo`}</li>
<li>{`do 30.9.${TAX_YEAR + 1} ak ste mali príjmy aj zo zahraničia`}</li>
</ul>

{
(isPostponeLive || isDebug) && (
<>
<p className="govuk-body-xs">
Používaním tejto služby súhlasíte so spracovaním osobných údajov v rozsahu
nevyhnutnom na vygenerovanie odkladu daňového priznania. Vaše údaje
neukladáme, sú použité výlučne na spracovanie odkladu daňového priznania.
</p>
<PostponeButton now={now} nextPostponeRoute={nextPostponeRoute} />
</>
)
}
</>
)
const PostponeSection = ({ nextPostponeRoute, now, isPostponeLive, isDebug }) => {
const isPostponeExtensionTime = now.getMonth() < 11;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

odklad je mozne spravit iba do konca marca.

asi by som to upravil tak ze by som z PostponeButton vybral isPostponeTime do komponentu PostponeSection

potom mozes pouzit v PostponeSection isPostponeTime a do PostponeButton uz posielat isPostponeTime namiesto now

takto ta logika bude iba na jednom mieste a iba vysledok sa bude posielat dalej dole

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updatenute.

Tiez som si vsimol ze ten text ohladom spracovania osobnych udajov je tam dva krat, tak som to dal do novehom componentu.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

len pozor tam ten text nie je rovnaky

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, tak som revertol ten commit s textom o osobnych udajoch


return (
<>
<h2 className="govuk-heading-m govuk-!-margin-top-3">
{`Odklad daňového priznania za rok ${TAX_YEAR}`}
</h2>
<PostponeText now={now} />
<ul className="govuk-list govuk-list--bullet">
<li>{`do 30.6.${TAX_YEAR + 1} ak ste mali príjmy len zo Slovenska, alebo`}</li>
<li>{`do 30.9.${TAX_YEAR + 1} ak ste mali príjmy aj zo zahraničia`}</li>
</ul>

{
((isPostponeExtensionTime && isPostponeLive) || isDebug) && (
<>
<p className="govuk-body-xs">
Používaním tejto služby súhlasíte so spracovaním osobných údajov v rozsahu
nevyhnutnom na vygenerovanie odkladu daňového priznania. Vaše údaje
neukladáme, sú použité výlučne na spracovanie odkladu daňového priznania.
</p>
<PostponeButton now={now} nextPostponeRoute={nextPostponeRoute} />
</>
)
}
</>
)
}

const PostponeText = ({ now }: { now: Date }) => (
<>
Expand Down
Loading