Organization_Management : Organization Hierarchy #443

Merged
pramod.mahajan merged 180 commits from Organization_Management into main 2025-09-30 09:07:31 +00:00
Showing only changes of commit d1c72291a3 - Show all commits

View File

@ -69,12 +69,15 @@ export const normalizeAllowedContentTypes = (allowedContentType) => {
return allowedContentType.split(",");
return [];
};
export function localToUtc(localDateString) {
if (!localDateString || localDateString.trim() === "") return null;
if (!localDateString || typeof localDateString !== "string") return null;
const [day, month, year] = localDateString.split("-");
const date = new Date(`${year}-${month}-${day}T00:00:00`);
const [year, month, day] = localDateString.trim().split("-");
if (!year || !month || !day) return null;
const date = new Date(Number(year), Number(month) - 1, Number(day), 0, 0, 0);
return isNaN(date.getTime()) ? null : date.toISOString();
}