Skip to content

Commit

Permalink
Merge pull request #1123 from culturecreates/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
sahalali authored May 23, 2024
2 parents 056f9e4 + dc8b021 commit b210037
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/locales/fr/transalationFr.json
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@
"email": "Courriel",
"memberOf": "Membre de",
"location": "Endroit",
"Edit": "Éditer",
"edit": "Éditer",
"socialMediaLinks": "Liens vers les réseaux sociaux"
},
"createNew": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function OrganizationsReadOnly() {
<div className="button-container">
<OutlinedButton
data-cy="button-edit-organization"
label={t('dashboard.organization.readOnly.Edit')}
label={t('dashboard.organization.readOnly.edit')}
size="middle"
style={{ height: '40px', width: '60px' }}
onClick={() =>
Expand Down
30 changes: 14 additions & 16 deletions src/pages/Dashboard/Settings/WidgetSettings/WidgetSettings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ const WidgetSettings = () => {
const { eventDetailsUrlTemplate = '', listEventsUrlTemplate = '' } = currentCalendarData?.widgetSettings || {};
const calendarSlug = currentCalendarData?.slug;
const calendarName = currentCalendarData?.name[user?.interfaceLanguage?.toLowerCase()];
const encodedCalendarLogoUri = encodeURIComponent(currentCalendarData?.image?.uri || '');
const encodedEventDetailsUrlTemplate = encodeURIComponent(eventDetailsUrlTemplate);
const encodedListEventsUrlTemplate = encodeURIComponent(listEventsUrlTemplate);
const calendarLogoUri = currentCalendarData?.image?.uri || '';

const [color, setColor] = useState('#607EFC');
const [locationOptions, setLocationOptions] = useState([]);
Expand Down Expand Up @@ -151,7 +149,7 @@ const WidgetSettings = () => {
arrayToQueryParam(allValues?.region ?? [], 'region') +
arrayToQueryParam([...(allValues?.person ?? []), ...(allValues?.organizer ?? [])], 'person-organization');

const searchEventsFilters = encodeURIComponent(filtersParam);
const searchEventsFilters = filtersParam;

const locale = onLanguageSelect(allValues?.language);
const urlCopy = new URL(widgetUrl);
Expand All @@ -163,9 +161,9 @@ const WidgetSettings = () => {
urlCopy.searchParams.append('limit', limit);
urlCopy.searchParams.append('calendar', calendarSlug);
urlCopy.searchParams.append('calendarName', calendarName);
urlCopy.searchParams.append('logo', encodedCalendarLogoUri);
urlCopy.searchParams.append('eventUrl', encodedEventDetailsUrlTemplate);
urlCopy.searchParams.append('searchEventsUrl', encodedListEventsUrlTemplate);
urlCopy.searchParams.append('logo', calendarLogoUri);
urlCopy.searchParams.append('eventUrl', eventDetailsUrlTemplate);
urlCopy.searchParams.append('searchEventsUrl', listEventsUrlTemplate);
urlCopy.searchParams.append('searchEventsFilters', searchEventsFilters);
urlCopy.searchParams.append('locale', locale?.key.toLowerCase());

Expand All @@ -177,9 +175,9 @@ const WidgetSettings = () => {
urlCopyMobile.searchParams.append('limit', limit);
urlCopyMobile.searchParams.append('calendar', calendarSlug);
urlCopyMobile.searchParams.append('calendarName', calendarName);
urlCopyMobile.searchParams.append('logo', encodedCalendarLogoUri);
urlCopyMobile.searchParams.append('eventUrl', encodedEventDetailsUrlTemplate);
urlCopyMobile.searchParams.append('searchEventsUrl', encodedListEventsUrlTemplate);
urlCopyMobile.searchParams.append('logo', calendarLogoUri);
urlCopyMobile.searchParams.append('eventUrl', eventDetailsUrlTemplate);
urlCopyMobile.searchParams.append('searchEventsUrl', listEventsUrlTemplate);
urlCopyMobile.searchParams.append('searchEventsFilters', searchEventsFilters);
urlCopyMobile.searchParams.append('locale', locale?.key.toLowerCase());
urlCopyMobile.searchParams.append('height', '600');
Expand Down Expand Up @@ -329,9 +327,9 @@ const WidgetSettings = () => {
const limit = form.getFieldValue('limit') ?? 9;
const locale = form.getFieldValue('locale') ?? languageOptions[0].value;

urlCopy.searchParams.append('eventUrl', encodedEventDetailsUrlTemplate);
urlCopy.searchParams.append('searchEventsUrl', encodedListEventsUrlTemplate);
urlCopy.searchParams.append('logo', encodedCalendarLogoUri);
urlCopy.searchParams.append('eventUrl', eventDetailsUrlTemplate);
urlCopy.searchParams.append('searchEventsUrl', listEventsUrlTemplate);
urlCopy.searchParams.append('logo', calendarLogoUri);
urlCopy.searchParams.append('locale', onLanguageSelect(locale)?.key.toLowerCase());
urlCopy.searchParams.append('limit', limit);
urlCopy.searchParams.append('color', color);
Expand All @@ -340,9 +338,9 @@ const WidgetSettings = () => {
urlCopy.searchParams.append('height', height);
setUrl(urlCopy);

urlCopyMobile.searchParams.append('eventUrl', encodedEventDetailsUrlTemplate);
urlCopyMobile.searchParams.append('searchEventsUrl', encodedListEventsUrlTemplate);
urlCopyMobile.searchParams.append('logo', encodedCalendarLogoUri);
urlCopyMobile.searchParams.append('eventUrl', eventDetailsUrlTemplate);
urlCopyMobile.searchParams.append('searchEventsUrl', listEventsUrlTemplate);
urlCopyMobile.searchParams.append('logo', calendarLogoUri);
urlCopyMobile.searchParams.append('locale', onLanguageSelect(locale)?.key.toLowerCase());
urlCopyMobile.searchParams.append('limit', limit);
urlCopyMobile.searchParams.append('color', color);
Expand Down

0 comments on commit b210037

Please sign in to comment.