2023-03-17 16:20:25 +05:30
|
|
|
import { AVAILABILITY_STATUS, NEVER_TIME_RANGE } from './constants';
|
2021-01-29 00:20:46 +05:30
|
|
|
|
2021-03-11 19:13:27 +05:30
|
|
|
export const isUserBusy = (status = '') =>
|
|
|
|
Boolean(status.length && status.toLowerCase().trim() === AVAILABILITY_STATUS.BUSY);
|
2023-03-17 16:20:25 +05:30
|
|
|
|
|
|
|
export const computedClearStatusAfterValue = (value) => {
|
|
|
|
if (value === null || value.name === NEVER_TIME_RANGE.name) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
return value.shortcut;
|
|
|
|
};
|