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/client/components/GenericTable/NoResults.tsx

45 lines
1.0 KiB

[IMPROVE] Canned responses (#22703) * [IMPROVE][Enterprise] Create and Update CannedResponse API endpoints (#22151) * [NEW] New components TextEditor and MarkdownTextEditor (#22173) * Include Insert_Placeholder key * change emojiPicker z-index * create TextEditor component * create MarkdownTextEditor component * update fuselage dev version * update fuselage and react-types version * finish MardownTextEditorComponent * update fuselage package * [NEW][ENTERPRISE] Canned responses Overview Page (#22623) * [IMPROVE] No results component for canned responses table with no data (#22190) * no results components to table with no data * [IMPROVE][Enterprise] Create and Update CannedResponse API endpoints (#22151) * createdBy query fix * fix the canned-responses filter (#22207) * [NEW] New components TextEditor and MarkdownTextEditor (#22173) * Include Insert_Placeholder key * change emojiPicker z-index * create TextEditor component * create MarkdownTextEditor component * update fuselage dev version * update fuselage and react-types version * finish MardownTextEditorComponent * update fuselage package * [NEW][ENTERPRISE] Canned responses Overview Page (#22623) * [NEW] Empty page for Canned Responses Table * FIX LGTM * stop showing the empty page on loading Co-authored-by: Rafael Ferreira <rafael.ferreira@rocket.chat> Co-authored-by: Tiago Evangelista Pinto <tiago.evangelista@rocket.chat> Co-authored-by: Martin <martin.schoeler@rocket.chat> * [NEW] NEW and EDIT pages for canned responses + Canned Responses Contextual Bar (#22715) * [IMPROVE][Enterprise] Create and Update CannedResponse API endpoints (#22151) * createdBy query fix * fix the canned-responses filter (#22207) * fix Thread tslint error * create .d.ts file to VerticalBar component * rewrite Canned Responses contextual-bar components * update fuselage version * types for room.js * create hooks for canned options and departments * adjustments in cannedResponse contextual-bar * adjustments in cannedResponse modal * adjust in endpoints types * adjust canned list * adjust omnichanel canned response type definition * add some new translations * remove old stuff of cannedResponses * [NEW] New components TextEditor and MarkdownTextEditor (#22173) * Include Insert_Placeholder key * change emojiPicker z-index * create TextEditor component * create MarkdownTextEditor component * update fuselage dev version * update fuselage and react-types version * finish MardownTextEditorComponent * update fuselage package * modal with MarkdownTextEditor component * reload component when edited * fix form handle error * add key prop * create preview for MarkdownTextEditor * remove canned-response contextual-bar from departments settings * Use permissions instead of roles to check for canned responses * Chore: added pagination to search msg endpoint (#22632) * added pagination to search endpoint * readded tests * change livechat_enabled default value to true (#22697) Co-authored-by: Leonardo Ostjen Couto <leonardoostjen@gmail.com> * Add New and Edit with Data * Use permissions instead of roles to check for canned responses * New and edit pages * Lint and removal of unused files * fix lint * FIX departments not working * remove duplicate i18n key * Misc improvements to canned responses endpoints * Ts fixes * more ts fixes * use permission instead role * Fix shortcut validation * Fix shortcut validation * Fix department & validation issues * fix Co-authored-by: Rafael Ferreira <rafaelblink@gmail.com> Co-authored-by: Rafael Ferreira <rafael.ferreira@rocket.chat> Co-authored-by: Tiago Evangelista Pinto <tiago.evangelista@rocket.chat> Co-authored-by: Kevin Aleman <kevin.aleman@rocket.chat> Co-authored-by: Leonardo Ostjen Couto <leonardoostjen@gmail.com> Co-authored-by: Rafael Ferreira <rafaelblink@gmail.com> Co-authored-by: Tiago Evangelista Pinto <tiago.evangelista@rocket.chat> Co-authored-by: Rafael Ferreira <rafael.ferreira@rocket.chat> Co-authored-by: Kevin Aleman <kevin.aleman@rocket.chat> Co-authored-by: Leonardo Ostjen Couto <leonardoostjen@gmail.com>
5 years ago
import { Box, Tile, Button, Icon } from '@rocket.chat/fuselage';
import React, { FC } from 'react';
type NoResultsProps = {
icon: string;
title: string;
description: string;
buttonTitle?: string;
buttonAction?: () => void;
};
const NoResults: FC<NoResultsProps> = ({ icon, title, description, buttonTitle, buttonAction }) => (
<Box textAlign='center'>
<Box
mbs='x60'
mbe='x20'
style={{
whiteSpace: 'nowrap',
textTransform: 'uppercase',
backgroundColor: 'var(--color-gray-lightest)',
borderRadius: '9999px',
display: 'inline-block',
padding: '1rem',
}}
>
<Icon name={icon} size='x30' />
</Box>
<Box is='h1' fontScale='h1' flexGrow={1}>
{title}
</Box>
<Tile paddingBlockStart='x5' fontScale='p1' elevation='0' color='info' textAlign='center'>
<Box margin='auto' maxWidth='400px'>
{description}
</Box>
</Tile>
{buttonTitle && buttonAction && (
<Button marginBlockStart='x20' primary onClick={buttonAction}>
{buttonTitle}
</Button>
)}
</Box>
);
export default NoResults;