Compare commits
2 Commits
d9cacab0a7
...
cf47b79052
Author | SHA1 | Date | |
---|---|---|---|
|
cf47b79052 | ||
|
2885cc09b6 |
@ -1,43 +1,40 @@
|
|||||||
import { EmailTemplate3Config } from './email-template-3';
|
/* import { EmailTemplate3Config } from './email-template-3';
|
||||||
import hostSettingsRadio from './host-settings-radio';
|
* import hostSettingsRadio from './host-settings-radio';
|
||||||
|
*
|
||||||
export default function ConsentProblems({
|
* export default function ConsentProblems({
|
||||||
settings,
|
* settings,
|
||||||
host_id,
|
* host_id,
|
||||||
setConfig,
|
* setConfig,
|
||||||
pronoun,
|
* pronoun,
|
||||||
}: {
|
* }: {
|
||||||
host_id: string;
|
* host_id: string;
|
||||||
setConfig: React.Dispatch<React.SetStateAction<EmailTemplate3Config>>;
|
* setConfig: React.Dispatch<React.SetStateAction<EmailTemplate3Config>>;
|
||||||
settings: EmailTemplate3Config['hosts_settings'][string];
|
* settings: EmailTemplate3Config['hosts_settings'][string];
|
||||||
pronoun: 0 | 1 | 2 | 3;
|
* pronoun: 0 | 1 | 2 | 3;
|
||||||
}) {
|
* }) {
|
||||||
if (settings.legal_basis_type !== 'consent') {
|
* if (settings.legal_basis_type !== 'consent') {
|
||||||
return '';
|
* return '';
|
||||||
}
|
* }
|
||||||
const p = pronoun;
|
* const p = pronoun;
|
||||||
return (
|
* return (
|
||||||
<div>
|
* <div>
|
||||||
{hostSettingsRadio({
|
* {hostSettingsRadio({
|
||||||
host_id,
|
* host_id,
|
||||||
setConfig,
|
* setConfig,
|
||||||
field: 'consent_problems' as const,
|
* field: 'consent_problems' as const,
|
||||||
value: settings.consent_problems,
|
* value: settings.consent_problems,
|
||||||
options: {
|
* options: {
|
||||||
claims_consent_but_sends_before_consent: /* HTML */ `Strona wysłała
|
* claims_consent_but_sends_before_consent: `Strona wysłała
|
||||||
${p == 3 ? 'nasze' : 'moje'} dane do ${host_id} zanim
|
* ${p == 3 ? 'nasze' : 'moje'} dane do ${host_id} zanim
|
||||||
${['wyraziłem', 'wyraziłam', 'wyraziłom', 'wyraziliśmy'][p]} na to zgodę.`,
|
* ${['wyraziłem', 'wyraziłam', 'wyraziłom', 'wyraziliśmy'][p]} na to zgodę.`,
|
||||||
claims_consent_but_there_was_no_easy_refuse: /* HTML */ `${[
|
* claims_consent_but_there_was_no_easy_refuse: `${
|
||||||
'Kliknąłem',
|
* ['Kliknąłem', 'Kliknęłam', 'Kliknęłom', 'Kliknęliśmy'][p]
|
||||||
'Kliknęłam',
|
* }
|
||||||
'Kliknęłom',
|
* przycisk od wyrażania zgody, ale w okienku o zgodę nie było natychmiastowo
|
||||||
'Kliknęliśmy',
|
* dostępnego przycisku do niewyrażenia zgody jednym kliknięciem.`,
|
||||||
][p]}
|
* none: 'Żadne z powyższych.',
|
||||||
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.',
|
* </div>
|
||||||
},
|
* );
|
||||||
})}
|
* } */
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { EmailTemplate3Config } from './email-template-3';
|
import { EmailTemplate3Config } from './email-template-3';
|
||||||
import hostSettingsDropdown from './host-setting-dropdown';
|
/* import hostSettingsDropdown from './host-setting-dropdown'; */
|
||||||
import ConsentProblems from './consent-problems';
|
/* import ConsentProblems from './consent-problems'; */
|
||||||
import LegitimateInteresProblems from './legitimate-interest-problems';
|
import LegitimateInteresProblems from './legitimate-interest-problems';
|
||||||
import { hostNeedsQuestions } from './host-needs-questions';
|
/* import { hostNeedsQuestions } from './host-needs-questions'; */
|
||||||
|
|
||||||
export function setHostSetting<
|
export function setHostSetting<
|
||||||
P1 extends keyof EmailTemplate3Config['hosts_settings'],
|
P1 extends keyof EmailTemplate3Config['hosts_settings'],
|
||||||
@ -48,47 +48,6 @@ export default function emailHostSettings(
|
|||||||
<aside>
|
<aside>
|
||||||
{Object.entries(config.hosts_settings).map(([host_id, settings]) => (
|
{Object.entries(config.hosts_settings).map(([host_id, settings]) => (
|
||||||
<div key={host_id}>
|
<div key={host_id}>
|
||||||
<h5>
|
|
||||||
{host_id}, {hostNeedsQuestions(settings).toString()}
|
|
||||||
</h5>
|
|
||||||
<p>
|
|
||||||
Cele przetwarzania danych przez właściciela domeny {host_id}{' '}
|
|
||||||
{hostSettingsDropdown({
|
|
||||||
host_id,
|
|
||||||
setConfig,
|
|
||||||
settings,
|
|
||||||
field: 'presence',
|
|
||||||
value: settings.presence,
|
|
||||||
options: {
|
|
||||||
not_mentioned: ['nie są nigdzie na stronie opisane'],
|
|
||||||
mentioned_in_policy: [
|
|
||||||
'są opisane w polityce prywatności',
|
|
||||||
config.policy_readable !== 'yes',
|
|
||||||
],
|
|
||||||
mentioned_in_popup: ['są opisane w okienku RODO'],
|
|
||||||
},
|
|
||||||
})}
|
|
||||||
</p>
|
|
||||||
{!['not_mentioned', 'null'].includes(settings.presence) ? (
|
|
||||||
<p>
|
|
||||||
Wskazana przez administratora podstawa prawna dla{' '}
|
|
||||||
<strong> tego konkretnego celu</strong>{' '}
|
|
||||||
{hostSettingsDropdown({
|
|
||||||
host_id,
|
|
||||||
setConfig,
|
|
||||||
settings,
|
|
||||||
field: 'legal_basis_type' as const,
|
|
||||||
value: settings.legal_basis_type,
|
|
||||||
options: {
|
|
||||||
consent: ['to zgoda.'],
|
|
||||||
legitimate_interest: ['to uzasadniony interes.'],
|
|
||||||
not_mentioned: ['nie jest wskazana nigdzie na stronie.'],
|
|
||||||
},
|
|
||||||
})}
|
|
||||||
</p>
|
|
||||||
) : (
|
|
||||||
''
|
|
||||||
)}
|
|
||||||
{!['not_mentioned', 'null'].includes(settings.legal_basis_type) ? (
|
{!['not_mentioned', 'null'].includes(settings.legal_basis_type) ? (
|
||||||
<div>
|
<div>
|
||||||
{ConsentProblems({ settings, host_id, pronoun: p, setConfig })}
|
{ConsentProblems({ settings, host_id, pronoun: p, setConfig })}
|
||||||
|
@ -3,76 +3,275 @@ import * as Survey from 'survey-react';
|
|||||||
import { toBase64 } from '../util';
|
import { toBase64 } from '../util';
|
||||||
import emailHostSettings from './email-host-settings';
|
import emailHostSettings from './email-host-settings';
|
||||||
import { EmailTemplate3Config } from './email-template-3';
|
import { EmailTemplate3Config } from './email-template-3';
|
||||||
|
import verbs from './verbs';
|
||||||
|
|
||||||
var json = {
|
function generateHostPage(
|
||||||
showQuestionNumbers: 'off',
|
host: string,
|
||||||
elements: [
|
index: number,
|
||||||
{
|
all_hosts: string[]
|
||||||
type: 'radiogroup',
|
): { title: string; elements: any[] } {
|
||||||
name: 'haveKids',
|
function f(name: string, h = host) {
|
||||||
title: 'Do you have a kid(s)?',
|
return `${h.replace(/\./g, '_')}|${name}`;
|
||||||
isRequired: true,
|
}
|
||||||
choices: ['Yes', 'No'],
|
const previous_host: string | null = index > 0 ? all_hosts[index - 1] : null;
|
||||||
colCount: 0,
|
function defaultValue(name: string) {
|
||||||
},
|
if (!previous_host) {
|
||||||
{
|
return {};
|
||||||
type: 'dropdown',
|
}
|
||||||
name: 'kids',
|
return { defaultValueExpression: `{${f(name, previous_host)}}` };
|
||||||
title: 'How many kids do you have',
|
}
|
||||||
visibleIf: "{haveKids}='Yes'",
|
return {
|
||||||
isRequired: true,
|
title: host,
|
||||||
choices: [1, 2, 3, 4, 5],
|
elements: [
|
||||||
},
|
{
|
||||||
{
|
type: 'dropdown',
|
||||||
type: 'dropdown',
|
name: f('present'),
|
||||||
name: 'kid1Age',
|
isRequired: true,
|
||||||
title: 'The first kid age:',
|
title: `Cel ujawnienia danych właścicielowi domeny ${host}`,
|
||||||
visibleIf: "{haveKids}='Yes' and {kids} >= 1",
|
...defaultValue('present'),
|
||||||
isRequired: true,
|
choices: [
|
||||||
choicesMax: 18,
|
{ value: 'not_mentioned', text: 'nie jest podany nigdzie na stronie' },
|
||||||
},
|
{
|
||||||
{
|
value: 'mentioned_in_policy',
|
||||||
type: 'dropdown',
|
text: 'jest podany w polityce prywatności',
|
||||||
name: 'kid2Age',
|
visibleIf: "{policy_readable} = 'yes' ",
|
||||||
title: 'The second kid age:',
|
},
|
||||||
visibleIf: "{haveKids}='Yes' and {kids} >= 2",
|
|
||||||
isRequired: true,
|
|
||||||
startWithNewLine: false,
|
|
||||||
choicesMax: 18,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'dropdown',
|
|
||||||
name: 'kid3Age',
|
|
||||||
title: 'The third kid age:',
|
|
||||||
visibleIf: "{haveKids}='Yes' and {kids} >= 3",
|
|
||||||
isRequired: true,
|
|
||||||
startWithNewLine: false,
|
|
||||||
choicesMax: 18,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'dropdown',
|
|
||||||
name: 'kid4Age',
|
|
||||||
title: 'The fourth kid age:',
|
|
||||||
visibleIf: "{haveKids}='Yes' and {kids} >= 4",
|
|
||||||
isRequired: true,
|
|
||||||
startWithNewLine: false,
|
|
||||||
choicesMax: 18,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'dropdown',
|
|
||||||
name: 'kid5Age',
|
|
||||||
title: 'The fifth kid age:',
|
|
||||||
visibleIf: "{haveKids}='Yes' and {kids} >= 5",
|
|
||||||
isRequired: true,
|
|
||||||
startWithNewLine: false,
|
|
||||||
choicesMax: 18,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
|
|
||||||
const survey = new Survey.Model(json);
|
{ value: 'mentioned_in_popup', text: 'jest podany w okienku RODO' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'dropdown',
|
||||||
|
name: f('legal_basis_type'),
|
||||||
|
...defaultValue('legal_basis_type'),
|
||||||
|
isRequired: true,
|
||||||
|
title: `Podstawa prawna dla tego konkretnego celu`,
|
||||||
|
visibleIf: `{${f('present')}} notempty and {${f('present')}} != "not_mentioned"`,
|
||||||
|
choices: [
|
||||||
|
{ value: 'consent', text: 'to zgoda.' },
|
||||||
|
{
|
||||||
|
value: 'legitimate_interest',
|
||||||
|
text: 'to uzasadniony interes.',
|
||||||
|
},
|
||||||
|
{ value: 'not_mentioned', text: 'nie jest wskazana nigdzie na stronie.' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'radiogroup',
|
||||||
|
name: f('consent_problems'),
|
||||||
|
...defaultValue('consent_problems'),
|
||||||
|
isRequired: true,
|
||||||
|
title: `Jak ma się ta podstawa prawna do stanu faktycznego?`,
|
||||||
|
visibleIf: `{${f('legal_basis_type')}} = "consent"`,
|
||||||
|
choices: [
|
||||||
|
{
|
||||||
|
value: 'claims_consent_but_sends_before_consent',
|
||||||
|
text: `Strona wysłała {moje} dane do ${host} zanim {wyraziłem} na to zgodę`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'claims_consent_but_there_was_no_easy_refuse',
|
||||||
|
text: '{Kliknąłem} przycisk od wyrażania zgody, ale w okienku o zgodę nie było natychmiastowo dostępnego przycisku do niewyrażenia zgody jednym kliknięciem',
|
||||||
|
},
|
||||||
|
{ value: 'none', text: 'żadne z powyższych.' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'dropdown',
|
||||||
|
name: f('legitimate_interest_activity_specified'),
|
||||||
|
...defaultValue('legitimate_interest_activity_specified'),
|
||||||
|
isRequired: true,
|
||||||
|
title: /* HTML */ `Czy administrator strony opisał szczegółowo, na czym polega
|
||||||
|
uzasadniony interes w kontekście tego celu?`,
|
||||||
|
visibleIf: `{${f('legal_basis_type')}} = "legitimate_interest"`,
|
||||||
|
choices: [
|
||||||
|
{
|
||||||
|
value: 'precise',
|
||||||
|
text: /* HTML */ `Tak, wskazuje jasno na bieżące działania lub korzyści
|
||||||
|
wynikające z takiego przetwarzania danych.`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'vague',
|
||||||
|
text: `Wskazuje tylko ogólnie, jak np. „marketing” czy „statystyki”.`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'no',
|
||||||
|
text: `Nie. Nie wiadomo, na czym ten uzasadniony interes polega.`,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'text',
|
||||||
|
title: `Jak administrator opisał to, na czym polega uzasadniony interes w kontekście ${host}?`,
|
||||||
|
name: f('legitimate_interest_description'),
|
||||||
|
visibleIf: `{${f('legitimate_interest_activity_specified')}} = 'vague'`,
|
||||||
|
defaultValueExpression:
|
||||||
|
index == 0
|
||||||
|
? 'marketing'
|
||||||
|
: `{${f('legitimate_interest_description', previous_host)}}`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'dropdown',
|
||||||
|
title: `Czy domena ${host} należy do podmiotu spoza Europy (np. Google, Facebook)?`,
|
||||||
|
name: f('outside_eu'),
|
||||||
|
...defaultValue('outside_eu'),
|
||||||
|
visibleIf: `{${f('legitimate_interest_activity_specified')}} = "precise" or {${f(
|
||||||
|
'consent_problems'
|
||||||
|
)}} = "none"`,
|
||||||
|
choices: [
|
||||||
|
{ value: 'yes', text: 'Tak' },
|
||||||
|
{ value: 'no', text: 'Nie' },
|
||||||
|
{ value: 'not_sure', text: 'Nie wiem' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function EmailTemplate3Controls({ hosts }: { hosts: string[] }) {
|
||||||
|
const [survey, setSurvey] = React.useState<Survey.Model>(null);
|
||||||
|
React.useEffect(() => {
|
||||||
|
var json = {
|
||||||
|
showQuestionNumbers: 'off',
|
||||||
|
showProgressBar: 'top',
|
||||||
|
pages: [
|
||||||
|
{
|
||||||
|
title: 'Zaimki',
|
||||||
|
elements: [
|
||||||
|
{
|
||||||
|
type: 'dropdown',
|
||||||
|
name: 'zaimek',
|
||||||
|
title: 'Forma czasownika:',
|
||||||
|
isRequired: true,
|
||||||
|
choices: [
|
||||||
|
{ value: 0, text: 'Wysłałem' },
|
||||||
|
{ value: 1, text: 'Wysłałam' },
|
||||||
|
{ value: 2, text: 'Wysłałom' },
|
||||||
|
{ value: 3, text: 'Wysłaliśmy' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Obowiązek informacyjny i machanizm pozyskiwania zgody',
|
||||||
|
elements: [
|
||||||
|
{
|
||||||
|
type: 'radiogroup',
|
||||||
|
title: 'Jaką formę informacji o przetwarzaniu danych osobowych stosuje ta strona?',
|
||||||
|
name: 'popup_type',
|
||||||
|
isRequired: true,
|
||||||
|
choices: [
|
||||||
|
{ value: 'none', text: 'Brak informacji' },
|
||||||
|
{
|
||||||
|
value: 'passive_popup',
|
||||||
|
text: /* HTML */ `Okienko o cookiesach, bez możliwości podjęcia
|
||||||
|
żadnego wyboru (np. tylko opcja „zamknij”)`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'some_choice',
|
||||||
|
text: 'Okienko o cookiesach, z możliwością podjęcia wyboru',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'checkbox',
|
||||||
|
title: /* HTML */ `Istnieje możliwość, że okienko z informacjami i
|
||||||
|
wyborami dotyczącymi przetwarzania {Twoich} danych osobowych ukazało się
|
||||||
|
dawno temu w trakcie {twojej} wcześniejszej wizyty i wtedy je
|
||||||
|
{odkliknąłeś}. {Otwórz} tę samą stronę w Trybie Prywatnym (Incognito).
|
||||||
|
Co {widzisz}?`,
|
||||||
|
visibleIf: "{popup_type} = 'none'",
|
||||||
|
name: 'is_incognito_different',
|
||||||
|
isRequired: true,
|
||||||
|
choices: [
|
||||||
|
{
|
||||||
|
value: 'incognito_is_the_same',
|
||||||
|
text: 'W Trybie prywatnym {widzę} to samo, co {widziałem} w normalnym trybie',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'html',
|
||||||
|
visibleIf: '{is_incognito_different} != "no" and {popup_type} = "none"',
|
||||||
|
html: /* HTML */ `Jeżeli w trybie incognito widzisz więcej okienek z
|
||||||
|
informacjami o przetwarzaniu danych osobowych, wykonaj analizę w
|
||||||
|
normalnym trybie ponownie - ale najpierw usuń pliki cookies tej
|
||||||
|
strony.
|
||||||
|
<a
|
||||||
|
href="https://support.mozilla.org/pl/kb/usuwanie-ciasteczek-i-danych-stron-firefox?redirectslug=usuwanie-ciasteczek&redirectlocale=pl"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
Zobacz, jak to zrobić
|
||||||
|
</a>`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'radiogroup',
|
||||||
|
name: 'mentions_passive_consent',
|
||||||
|
isRequired: true,
|
||||||
|
visibleIf: '{popup_type} = "passive_popup"',
|
||||||
|
title: 'Czy treść okienka wskazuje na zgodę wyrażoną pasywnie, np. „Korzystając z naszej strony wyrażasz zgodę” lub „Brak zmiany ustawień przeglądarki oznacza zgodę”?',
|
||||||
|
choices: [
|
||||||
|
{
|
||||||
|
value: 'yes',
|
||||||
|
text: 'Tak',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'no',
|
||||||
|
text: 'Nie',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Polityka prywatności',
|
||||||
|
elements: [
|
||||||
|
{
|
||||||
|
type: 'dropdown',
|
||||||
|
title: 'Czy polityka prywatności jest dostępna i czytelna?',
|
||||||
|
name: 'policy_readable',
|
||||||
|
isRequired: true,
|
||||||
|
choices: [
|
||||||
|
{ value: 'yes', text: 'dostępna i czytelna' },
|
||||||
|
{
|
||||||
|
value: 'entirely_obscured_by_popup',
|
||||||
|
text: 'dostępna, ale nieczytelna. Zasłania ją popup o RODO',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'cant_find',
|
||||||
|
text: `Niedostępna. {Szukałem}, ale nie {znalazłem} jej na stronie`,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
...hosts.map(generateHostPage),
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
console.log(json);
|
||||||
|
|
||||||
|
const survey = new Survey.Model(json);
|
||||||
|
survey.onProcessTextValue.add(function (
|
||||||
|
sender: Survey.SurveyModel,
|
||||||
|
options: { name: string; value?: string }
|
||||||
|
) {
|
||||||
|
if (verbs[options.name.toLowerCase()]) {
|
||||||
|
options.value = verbs[options.name.toLowerCase()][sender.valuesHash.zaimek];
|
||||||
|
if (options.name[0] == options.name[0].toUpperCase()) {
|
||||||
|
options.value = [
|
||||||
|
options.value[0].toUpperCase(),
|
||||||
|
...options.value.slice(1),
|
||||||
|
].join('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
setSurvey(survey);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
if (!survey) {
|
||||||
|
return <div>Wczytywanie...</div>;
|
||||||
|
}
|
||||||
|
|
||||||
export default function EmailTemplate3Controls() {
|
|
||||||
return <Survey.Survey model={survey} />;
|
return <Survey.Survey model={survey} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,57 +282,8 @@ export function _EmailTemplate3Controls({
|
|||||||
config: EmailTemplate3Config;
|
config: EmailTemplate3Config;
|
||||||
setConfig: React.Dispatch<React.SetStateAction<EmailTemplate3Config>>;
|
setConfig: React.Dispatch<React.SetStateAction<EmailTemplate3Config>>;
|
||||||
}): JSX.Element {
|
}): JSX.Element {
|
||||||
const p = config.pronoun;
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div>
|
|
||||||
<label htmlFor="pronoun">Forma czasownika:</label>
|
|
||||||
<select
|
|
||||||
id="pronoun"
|
|
||||||
value={config.pronoun}
|
|
||||||
onChange={(e) =>
|
|
||||||
setConfig((v) => ({
|
|
||||||
...v,
|
|
||||||
pronoun: parseInt(e.target.value) as EmailTemplate3Config['pronoun'],
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<option value="0">Wysłałem</option>
|
|
||||||
<option value="1">Wysłałam</option>
|
|
||||||
<option value="2">Wysłałom</option>
|
|
||||||
<option value="3">Wysłaliśmy</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<label htmlFor="policy_readable">
|
|
||||||
Czy polityka prywatności jest dostępna i czytelna?
|
|
||||||
</label>
|
|
||||||
<select
|
|
||||||
id="policy_readable"
|
|
||||||
value={config.policy_readable}
|
|
||||||
onChange={(e) =>
|
|
||||||
setConfig((v) => ({
|
|
||||||
...v,
|
|
||||||
policy_readable: e.target
|
|
||||||
.value as EmailTemplate3Config['policy_readable'],
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<option value="null" disabled>
|
|
||||||
wybierz opcję
|
|
||||||
</option>
|
|
||||||
<option value="yes">dostępna i czytelna</option>
|
|
||||||
<option value="entirely_obscured_by_popup">
|
|
||||||
dostępna, ale nieczytelna. Zasłania ją popup o RODO
|
|
||||||
</option>
|
|
||||||
<option value="cant_find">
|
|
||||||
Niedostępna. {['Szukałem', 'Szukałam', 'Szukałom', 'Szukaliśmy'][p]}, ale
|
|
||||||
nie {['znalazłem', 'znalazłam', 'znalazłom', 'znaleźliśmy'][p]} jej na
|
|
||||||
stronie
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
{emailHostSettings(config, setConfig)}
|
{emailHostSettings(config, setConfig)}
|
||||||
<div>
|
<div>
|
||||||
<label htmlFor="poup_type">Typ okienka o RODO: </label>
|
<label htmlFor="poup_type">Typ okienka o RODO: </label>
|
||||||
|
@ -77,7 +77,7 @@ export default function EmailTemplate3({
|
|||||||
return (
|
return (
|
||||||
<div className="mail-wrapper">
|
<div className="mail-wrapper">
|
||||||
<div className="mail-controls">
|
<div className="mail-controls">
|
||||||
<EmailTemplate3Controls {...{ config, setConfig }} />
|
<EmailTemplate3Controls {...{ config, setConfig, hosts: all_host_ids }} />
|
||||||
</div>
|
</div>
|
||||||
<div className="mail-content-wrapper">
|
<div className="mail-content-wrapper">
|
||||||
<article className="mail-content">
|
<article className="mail-content">
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
import { EmailTemplate3Config } from './email-template-3';
|
|
||||||
|
|
||||||
export function hostNeedsQuestions({
|
|
||||||
presence,
|
|
||||||
legal_basis_type,
|
|
||||||
consent_problems,
|
|
||||||
legitimate_interest_activity_description,
|
|
||||||
legitimate_interest_activity_specified,
|
|
||||||
}: EmailTemplate3Config['hosts_settings'][string]) {
|
|
||||||
if (presence == 'not_mentioned') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (legal_basis_type == 'not_mentioned') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (legal_basis_type == 'consent' && consent_problems !== 'null') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
legitimate_interest_activity_specified !== 'null' &&
|
|
||||||
legitimate_interest_activity_specified !== 'vague'
|
|
||||||
) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
legal_basis_type == 'legitimate_interest' &&
|
|
||||||
legitimate_interest_activity_description != ''
|
|
||||||
) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
import { setHostSetting } from './email-host-settings';
|
|
||||||
import { EmailTemplate3Config } from './email-template-3';
|
|
||||||
|
|
||||||
export default function hostSettingsDropdown<
|
|
||||||
Field extends keyof EmailTemplate3Config['hosts_settings'][string]
|
|
||||||
>({
|
|
||||||
host_id,
|
|
||||||
setConfig,
|
|
||||||
value,
|
|
||||||
field,
|
|
||||||
options,
|
|
||||||
}: {
|
|
||||||
host_id: string;
|
|
||||||
setConfig: React.Dispatch<React.SetStateAction<EmailTemplate3Config>>;
|
|
||||||
settings: EmailTemplate3Config['hosts_settings'][string];
|
|
||||||
field: Field;
|
|
||||||
value: string;
|
|
||||||
options: Record<
|
|
||||||
Exclude<EmailTemplate3Config['hosts_settings'][string][Field], 'null'>,
|
|
||||||
[string, boolean?]
|
|
||||||
>;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<select
|
|
||||||
value={value}
|
|
||||||
onChange={(e) =>
|
|
||||||
setHostSetting(
|
|
||||||
setConfig,
|
|
||||||
[host_id, field],
|
|
||||||
e.target.value as EmailTemplate3Config['hosts_settings'][string][typeof field]
|
|
||||||
)
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<option value="null" disabled>
|
|
||||||
wybierz opcję
|
|
||||||
</option>
|
|
||||||
{Object.entries(options).map(
|
|
||||||
([value, [display, disabled]]: [string, [string, boolean]]) => (
|
|
||||||
<option value={value} disabled={disabled}>
|
|
||||||
{display}
|
|
||||||
</option>
|
|
||||||
)
|
|
||||||
)}
|
|
||||||
</select>
|
|
||||||
);
|
|
||||||
}
|
|
@ -1,47 +0,0 @@
|
|||||||
import { normalizeForClassname } from '../util';
|
|
||||||
import { EmailTemplate3Config } from './email-template-3';
|
|
||||||
|
|
||||||
export default function hostSettingsRadio<
|
|
||||||
Field extends keyof EmailTemplate3Config['hosts_settings'][string]
|
|
||||||
>({
|
|
||||||
options,
|
|
||||||
host_id,
|
|
||||||
field,
|
|
||||||
setConfig,
|
|
||||||
value,
|
|
||||||
}: {
|
|
||||||
host_id: string;
|
|
||||||
setConfig: React.Dispatch<React.SetStateAction<EmailTemplate3Config>>;
|
|
||||||
field: Field;
|
|
||||||
options: Record<Exclude<EmailTemplate3Config['hosts_settings'][string][Field], 'null'>, string>;
|
|
||||||
value: EmailTemplate3Config['hosts_settings'][string][Field];
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
{Object.entries(options).map(([option_value, display]) => (
|
|
||||||
<div>
|
|
||||||
<input
|
|
||||||
type="radio"
|
|
||||||
name={normalizeForClassname(host_id + '_consent_problems')}
|
|
||||||
value={option_value}
|
|
||||||
checked={value == option_value}
|
|
||||||
id={normalizeForClassname(option_value + host_id)}
|
|
||||||
onChange={(e) => {
|
|
||||||
setConfig((v) => ({
|
|
||||||
...v,
|
|
||||||
hosts_settings: {
|
|
||||||
...v.hosts_settings,
|
|
||||||
[host_id]: {
|
|
||||||
...v.hosts_settings[host_id],
|
|
||||||
[field]: e.target.value,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}));
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<label htmlFor={normalizeForClassname(option_value + host_id)}>{display}</label>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
@ -1,7 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { setHostSetting } from './email-host-settings';
|
import { setHostSetting } from './email-host-settings';
|
||||||
import { EmailTemplate3Config } from './email-template-3';
|
import { EmailTemplate3Config } from './email-template-3';
|
||||||
import hostSettingsDropdown from './host-setting-dropdown';
|
|
||||||
|
|
||||||
export default function LegitimateInteresProblems({
|
export default function LegitimateInteresProblems({
|
||||||
settings,
|
settings,
|
||||||
@ -22,7 +21,7 @@ export default function LegitimateInteresProblems({
|
|||||||
<div>
|
<div>
|
||||||
Czy administrator strony opisał szczegółowo, na czym polega uzasadniony interes w
|
Czy administrator strony opisał szczegółowo, na czym polega uzasadniony interes w
|
||||||
kontekście tego celu?
|
kontekście tego celu?
|
||||||
{hostSettingsDropdown({
|
{/* {hostSettingsDropdown({
|
||||||
settings,
|
settings,
|
||||||
host_id,
|
host_id,
|
||||||
setConfig,
|
setConfig,
|
||||||
@ -35,7 +34,7 @@ export default function LegitimateInteresProblems({
|
|||||||
vague: ['Wskazuje tylko ogólnie, jak np. „marketing” czy „statystyki”.'],
|
vague: ['Wskazuje tylko ogólnie, jak np. „marketing” czy „statystyki”.'],
|
||||||
no: ['Nie. Nie wiadomo, na czym ten uzasadniony interes polega.'],
|
no: ['Nie. Nie wiadomo, na czym ten uzasadniony interes polega.'],
|
||||||
},
|
},
|
||||||
})}
|
})} */}
|
||||||
</div>
|
</div>
|
||||||
{settings.legitimate_interest_activity_specified === 'vague' ? (
|
{settings.legitimate_interest_activity_specified === 'vague' ? (
|
||||||
<div>
|
<div>
|
||||||
|
19
report-window/verbs.ts
Normal file
19
report-window/verbs.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
export default {
|
||||||
|
zrobiłem: ['zrobiłem', 'zrobiłam', 'zrobiłom', 'zrobiliśmy'],
|
||||||
|
szukałem: ['szukałem', 'szukałam', 'szukałom', 'szukaliśmy'],
|
||||||
|
znalazłem: ['znalazłem', 'znalazłam', 'znalazłom', 'znaleźliśmy'],
|
||||||
|
moje: ['moje', 'moje', 'moje', 'nasze'],
|
||||||
|
wyraziłem: ['wyraziłem', 'wyraziłam', 'wyraziłom', 'wyraziliśmy'],
|
||||||
|
kliknąłem: ['kliknąłem', 'kliknęłam', 'klinkęłom', 'kliknęliśmy'],
|
||||||
|
odwiedzałeś: ['odwiedzałeś', 'odwiedzałaś', 'odwiedzałoś', 'odwiedzaliście'],
|
||||||
|
wyraziłeś: ['wyraziłeś', 'wyraziłaś', 'wyraziłoś', 'wyraziliście'],
|
||||||
|
jesteś: ['jesteś', 'jesteś', 'jesteś', 'jesteście'],
|
||||||
|
twoich: ['twoich', 'twoich', 'twoich', 'waszych'],
|
||||||
|
tobie: ['tobie', 'tobie', 'tobie', 'wam'],
|
||||||
|
twojej: ['twojej', 'twojej', 'twojej', 'waszej'],
|
||||||
|
odkliknąłeś: ['odkliknąłeś', 'odkliknęłaś', 'odklikęłoś', 'odkliknęliście'],
|
||||||
|
otwórz: ['otwórz', 'otwórz', 'otwórz', 'otwórzcie'],
|
||||||
|
widzisz: ['widzisz', 'widzisz', 'widzisz', 'widzicie'],
|
||||||
|
widzę: ['widzę', 'widzę', 'widzę', 'widzimy'],
|
||||||
|
widziałem: ['widziałem', 'widziałam', 'widziałom', 'widzieliśmy'],
|
||||||
|
} as { [key: string]: string[] };
|
Loading…
x
Reference in New Issue
Block a user