[WEB-1883] chore: moved workspace settings to respective folders for CE and EE (#5151)

* chore: moved workspace settings to respective folders for ce and ee

* chore: updated imports

* chore: updated imports for ee

* chore: resolved import error

* chore: resolved import error

* chore: ee imports in the issue sidebar

* chore: updated file structure

* chore: table UI

* chore: resolved build errors

* chore: added worklog on issue peekoverview
This commit is contained in:
guru_sainath 2024-07-18 14:45:30 +05:30 committed by GitHub
parent fff27c60e4
commit 482b363045
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
44 changed files with 440 additions and 285 deletions

View file

@ -299,3 +299,38 @@ export const getCurrentDateTimeInISO = () => {
const date = new Date();
return date.toISOString();
};
/**
* @description converts hours and minutes to minutes
* @param { number } hours
* @param { number } minutes
* @returns { number } minutes
* @example convertHoursMinutesToMinutes(2, 30) // Output: 150
*/
export const convertHoursMinutesToMinutes = (hours: number, minutes: number): number => hours * 60 + minutes;
/**
* @description converts minutes to hours and minutes
* @param { number } mins
* @returns { number, number } hours and minutes
* @example convertMinutesToHoursAndMinutes(150) // Output: { hours: 2, minutes: 30 }
*/
export const convertMinutesToHoursAndMinutes = (mins: number): { hours: number; minutes: number } => {
const hours = Math.floor(mins / 60);
const minutes = Math.floor(mins % 60);
return { hours: hours, minutes: minutes };
};
/**
* @description converts minutes to days, hours and minutes
* @param { number } totalMinutes
* @returns { string } days, hours and minutes
*/
export const convertMinutesToDaysHoursMinutes = (totalMinutes: number): string => {
const days = Math.floor(totalMinutes / (60 * 24));
const hours = Math.floor((totalMinutes % (60 * 24)) / 60);
const minutes = totalMinutes % 60;
return `${days ? `${days}d ` : ``}${hours ? `${hours}h ` : ``}${minutes ? `${minutes}m ` : ``} `;
};