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

Hotfix changes to develop #793

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
18 changes: 17 additions & 1 deletion src/components/TreeSelectOption/treeSelectOption.settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,23 @@ export const treeDynamicTaxonomyOptions = (concepts, user, calendarContentLangua
}),
value: concept?.id,
...(concept?.children && {
children: handleMultilevelTreeSelect(concept?.children, user),
children: handleMultilevelTreeSelect(
concept?.children,
user,
calendarContentLanguage,
contentLanguageBilingual({
en: concept?.name?.en,
fr: concept?.name?.fr,
interfaceLanguage: user?.interfaceLanguage?.toLowerCase(),
calendarContentLanguage: calendarContentLanguage,
}),
),
}),
label: contentLanguageBilingual({
en: concept?.name?.en,
fr: concept?.name?.fr,
interfaceLanguage: user?.interfaceLanguage?.toLowerCase(),
calendarContentLanguage: calendarContentLanguage,
}),
};
});
Expand Down
9 changes: 5 additions & 4 deletions src/pages/Dashboard/AddEvent/AddEvent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,11 @@ function AddEvent() {
let dynamicAdminOnlyFields = requiredFields?.adminOnlyFields?.dynamicFields ?? [];
const calendarContentLanguage = currentCalendarData?.contentLanguage;
const dateTimeConverter = (date, time) => {
let dateSelected = moment.tz(date, eventData?.scheduleTimezone ?? 'Canada/Eastern').format('DD-MM-YYYY');
let timeSelected = moment.tz(time, eventData?.scheduleTimezone ?? 'Canada/Eastern').format('hh:mm:ss a');
let dateTime = moment(dateSelected + ' ' + timeSelected, 'DD-MM-YYYY HH:mm a');
return moment(dateTime).toISOString();
let dateSelected = date.format('DD-MM-YYYY');
let timeSelected = time.format('hh:mm:ss a');
// Combine date and time and explicitly set the timezone to 'Canada/Eastern'
let dateTime = moment.tz(dateSelected + ' ' + timeSelected, 'DD-MM-YYYY HH:mm a', 'Canada/Eastern');
return dateTime.toISOString();
};

const calendar = user?.roles.filter((calendar) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ function OrganizationsReadOnly() {
const navigate = useNavigate();
const [currentCalendarData] = useOutletContext();

const { currentData: allTaxonomyData, isLoading: taxonomyLoading } = useGetAllTaxonomyQuery({
calendarId,
search: '',
taxonomyClass: taxonomyClass.ORGANIZATION,
includeConcepts: true,
});

const {
data: organizationData,
isLoading: organizationLoading,
Expand All @@ -43,12 +50,6 @@ function OrganizationsReadOnly() {
{ id: organizationId, calendarId, sessionId: timestampRef },
{ skip: organizationId ? false : true },
);
const { currentData: allTaxonomyData, isLoading: taxonomyLoading } = useGetAllTaxonomyQuery({
calendarId,
search: '',
taxonomyClass: taxonomyClass.ORGANIZATION,
includeConcepts: true,
});

const [getPlace] = useLazyGetPlaceQuery();
const [getAllTaxonomy] = useLazyGetAllTaxonomyQuery();
Expand Down
Loading