The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/ee/client/omnichannel/additionalForms/DepartmentBusinessHours.js

22 lines
826 B

import React, { useMemo } from 'react';
import { Field, TextInput } from '@rocket.chat/fuselage';
// import { useMutableCallback } from '@rocket.chat/fuselage-hooks';
import { useTranslation } from '../../../../client/contexts/TranslationContext';
import { useEndpointDataExperimental } from '../../../../client/hooks/useEndpointDataExperimental';
export const DepartmentBusinessHours = ({ bhId }) => {
const t = useTranslation();
const { data } = useEndpointDataExperimental('livechat/business-hour', useMemo(() => ({ _id: bhId, type: 'custom' }), [bhId]));
const name = data && data.businessHour && data.businessHour.name;
return <Field>
<Field.Label>{t('Business_Hour')}</Field.Label>
<Field.Row>
<TextInput disabled value={name || ''}/>
</Field.Row>
</Field>;
};
export default DepartmentBusinessHours;