From 2885cc09b69838f858f95861eb6ae8988fc65045 Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Sun, 6 Feb 2022 17:05:33 +0100 Subject: [PATCH] =?UTF-8?q?Wsparcie=20dla=20zaimk=C3=B3w?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- report-window/consent-problems.tsx | 83 +++++----- report-window/email-host-settings.tsx | 18 +-- report-window/email-template-3-controls.tsx | 153 ++++++------------ report-window/host-needs-questions.ts | 32 ---- report-window/host-setting-dropdown.tsx | 46 ------ report-window/host-settings-radio.tsx | 47 ------ .../legitimate-interest-problems.tsx | 5 +- report-window/verbs.ts | 5 + 8 files changed, 102 insertions(+), 287 deletions(-) delete mode 100644 report-window/host-needs-questions.ts delete mode 100644 report-window/host-setting-dropdown.tsx delete mode 100644 report-window/host-settings-radio.tsx create mode 100644 report-window/verbs.ts diff --git a/report-window/consent-problems.tsx b/report-window/consent-problems.tsx index 0b4687a..4bdf37c 100644 --- a/report-window/consent-problems.tsx +++ b/report-window/consent-problems.tsx @@ -1,43 +1,40 @@ -import { EmailTemplate3Config } from './email-template-3'; -import hostSettingsRadio from './host-settings-radio'; - -export default function ConsentProblems({ - settings, - host_id, - setConfig, - pronoun, -}: { - host_id: string; - setConfig: React.Dispatch>; - settings: EmailTemplate3Config['hosts_settings'][string]; - pronoun: 0 | 1 | 2 | 3; -}) { - if (settings.legal_basis_type !== 'consent') { - return ''; - } - const p = pronoun; - return ( -
- {hostSettingsRadio({ - host_id, - setConfig, - field: 'consent_problems' as const, - value: settings.consent_problems, - options: { - claims_consent_but_sends_before_consent: /* HTML */ `Strona wysłała - ${p == 3 ? 'nasze' : 'moje'} dane do ${host_id} zanim - ${['wyraziłem', 'wyraziłam', 'wyraziłom', 'wyraziliśmy'][p]} na to zgodę.`, - claims_consent_but_there_was_no_easy_refuse: /* HTML */ `${[ - 'Kliknąłem', - 'Kliknęłam', - 'Kliknęłom', - 'Kliknęliśmy', - ][p]} - przycisk od wyrażania zgody, ale w okienku o zgodę nie było natychmiastowo - dostępnego przycisku do niewyrażenia zgody jednym kliknięciem.`, - none: 'Żadne z powyższych.', - }, - })} -
- ); -} +/* import { EmailTemplate3Config } from './email-template-3'; + * import hostSettingsRadio from './host-settings-radio'; + * + * export default function ConsentProblems({ + * settings, + * host_id, + * setConfig, + * pronoun, + * }: { + * host_id: string; + * setConfig: React.Dispatch>; + * settings: EmailTemplate3Config['hosts_settings'][string]; + * pronoun: 0 | 1 | 2 | 3; + * }) { + * if (settings.legal_basis_type !== 'consent') { + * return ''; + * } + * const p = pronoun; + * return ( + *
+ * {hostSettingsRadio({ + * host_id, + * setConfig, + * field: 'consent_problems' as const, + * value: settings.consent_problems, + * options: { + * claims_consent_but_sends_before_consent: `Strona wysłała + * ${p == 3 ? 'nasze' : 'moje'} dane do ${host_id} zanim + * ${['wyraziłem', 'wyraziłam', 'wyraziłom', 'wyraziliśmy'][p]} na to zgodę.`, + * claims_consent_but_there_was_no_easy_refuse: `${ + * ['Kliknąłem', 'Kliknęłam', 'Kliknęłom', 'Kliknęliśmy'][p] + * } + * przycisk od wyrażania zgody, ale w okienku o zgodę nie było natychmiastowo + * dostępnego przycisku do niewyrażenia zgody jednym kliknięciem.`, + * none: 'Żadne z powyższych.', + * }, + * })} + *
+ * ); + * } */ diff --git a/report-window/email-host-settings.tsx b/report-window/email-host-settings.tsx index abfd8b1..7d8a5dd 100644 --- a/report-window/email-host-settings.tsx +++ b/report-window/email-host-settings.tsx @@ -1,8 +1,8 @@ import { EmailTemplate3Config } from './email-template-3'; -import hostSettingsDropdown from './host-setting-dropdown'; -import ConsentProblems from './consent-problems'; +/* import hostSettingsDropdown from './host-setting-dropdown'; */ +/* import ConsentProblems from './consent-problems'; */ import LegitimateInteresProblems from './legitimate-interest-problems'; -import { hostNeedsQuestions } from './host-needs-questions'; +/* import { hostNeedsQuestions } from './host-needs-questions'; */ export function setHostSetting< P1 extends keyof EmailTemplate3Config['hosts_settings'], @@ -48,12 +48,10 @@ export default function emailHostSettings(