RocketChat/Rocket.Chat

View on GitHub
apps/meteor/app/livechat-enterprise/client/views/business-hours/Multiple.ts

Summary

Maintainability
A
0 mins
Test Coverage
import type { ILivechatBusinessHour } from '@rocket.chat/core-typings';
import { LivechatBusinessHourTypes } from '@rocket.chat/core-typings';

import type { IBusinessHourBehavior } from '../../../../livechat/client/views/app/business-hours/IBusinessHourBehavior';

export class MultipleBusinessHoursBehavior implements IBusinessHourBehavior {
    getView(): string {
        return 'livechatBusinessHours';
    }

    showCustomTemplate(businessHourData: ILivechatBusinessHour): boolean {
        return !businessHourData._id || businessHourData.type !== LivechatBusinessHourTypes.DEFAULT;
    }

    showBackButton(): boolean {
        return true;
    }
}