mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 23:01:09 +03:00
UX Changes: Ability to set category (tags) to each chatflow; corresponding changes to table display and table search
This commit is contained in:
@@ -36,4 +36,7 @@ export class ChatFlow implements IChatFlow {
|
|||||||
|
|
||||||
@UpdateDateColumn()
|
@UpdateDateColumn()
|
||||||
updatedDate: Date
|
updatedDate: Date
|
||||||
|
|
||||||
|
@Column({ nullable: true, type: 'text' })
|
||||||
|
category?: string
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { MigrationInterface, QueryRunner } from 'typeorm'
|
||||||
|
|
||||||
|
export class AddCategoryToChatFlow1699900910291 implements MigrationInterface {
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
const columnExists = await queryRunner.hasColumn('chat_flow', 'category')
|
||||||
|
if (!columnExists) queryRunner.query(`ALTER TABLE \`chat_flow\` ADD COLUMN \`category\` TEXT;`)
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`chat_flow\` DROP COLUMN \`category\`;`)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,6 +8,7 @@ import { AddAnalytic1694432361423 } from './1694432361423-AddAnalytic'
|
|||||||
import { AddChatHistory1694658767766 } from './1694658767766-AddChatHistory'
|
import { AddChatHistory1694658767766 } from './1694658767766-AddChatHistory'
|
||||||
import { AddAssistantEntity1699325775451 } from './1699325775451-AddAssistantEntity'
|
import { AddAssistantEntity1699325775451 } from './1699325775451-AddAssistantEntity'
|
||||||
import { AddUsedToolsToChatMessage1699481607341 } from './1699481607341-AddUsedToolsToChatMessage'
|
import { AddUsedToolsToChatMessage1699481607341 } from './1699481607341-AddUsedToolsToChatMessage'
|
||||||
|
import { AddCategoryToChatFlow1699900910291 } from './1699900910291-AddCategoryToChatFlow'
|
||||||
|
|
||||||
export const mysqlMigrations = [
|
export const mysqlMigrations = [
|
||||||
Init1693840429259,
|
Init1693840429259,
|
||||||
@@ -19,5 +20,6 @@ export const mysqlMigrations = [
|
|||||||
AddAnalytic1694432361423,
|
AddAnalytic1694432361423,
|
||||||
AddChatHistory1694658767766,
|
AddChatHistory1694658767766,
|
||||||
AddAssistantEntity1699325775451,
|
AddAssistantEntity1699325775451,
|
||||||
AddUsedToolsToChatMessage1699481607341
|
AddUsedToolsToChatMessage1699481607341,
|
||||||
|
AddCategoryToChatFlow1699900910291
|
||||||
]
|
]
|
||||||
|
|||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
import { MigrationInterface, QueryRunner } from 'typeorm'
|
||||||
|
|
||||||
|
export class AddCategoryToChatFlow1699900910291 implements MigrationInterface {
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE "chat_flow" ADD COLUMN IF NOT EXISTS "category" TEXT;`)
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE "chat_flow" DROP COLUMN "category";`)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,6 +8,7 @@ import { AddAnalytic1694432361423 } from './1694432361423-AddAnalytic'
|
|||||||
import { AddChatHistory1694658756136 } from './1694658756136-AddChatHistory'
|
import { AddChatHistory1694658756136 } from './1694658756136-AddChatHistory'
|
||||||
import { AddAssistantEntity1699325775451 } from './1699325775451-AddAssistantEntity'
|
import { AddAssistantEntity1699325775451 } from './1699325775451-AddAssistantEntity'
|
||||||
import { AddUsedToolsToChatMessage1699481607341 } from './1699481607341-AddUsedToolsToChatMessage'
|
import { AddUsedToolsToChatMessage1699481607341 } from './1699481607341-AddUsedToolsToChatMessage'
|
||||||
|
import { AddCategoryToChatFlow1699900910291 } from './1699900910291-AddCategoryToChatFlow'
|
||||||
|
|
||||||
export const postgresMigrations = [
|
export const postgresMigrations = [
|
||||||
Init1693891895163,
|
Init1693891895163,
|
||||||
@@ -19,5 +20,6 @@ export const postgresMigrations = [
|
|||||||
AddAnalytic1694432361423,
|
AddAnalytic1694432361423,
|
||||||
AddChatHistory1694658756136,
|
AddChatHistory1694658756136,
|
||||||
AddAssistantEntity1699325775451,
|
AddAssistantEntity1699325775451,
|
||||||
AddUsedToolsToChatMessage1699481607341
|
AddUsedToolsToChatMessage1699481607341,
|
||||||
|
AddCategoryToChatFlow1699900910291
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { MigrationInterface, QueryRunner } from 'typeorm'
|
||||||
|
|
||||||
|
export class AddCategoryToChatFlow1699900910291 implements MigrationInterface {
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE "chat_flow" ADD COLUMN "category" TEXT;`)
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE "chat_flow" DROP COLUMN "category";`)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,6 +8,7 @@ import { AddAnalytic1694432361423 } from './1694432361423-AddAnalytic'
|
|||||||
import { AddChatHistory1694657778173 } from './1694657778173-AddChatHistory'
|
import { AddChatHistory1694657778173 } from './1694657778173-AddChatHistory'
|
||||||
import { AddAssistantEntity1699325775451 } from './1699325775451-AddAssistantEntity'
|
import { AddAssistantEntity1699325775451 } from './1699325775451-AddAssistantEntity'
|
||||||
import { AddUsedToolsToChatMessage1699481607341 } from './1699481607341-AddUsedToolsToChatMessage'
|
import { AddUsedToolsToChatMessage1699481607341 } from './1699481607341-AddUsedToolsToChatMessage'
|
||||||
|
import { AddCategoryToChatFlow1699900910291 } from './1699900910291-AddCategoryToChatFlow'
|
||||||
|
|
||||||
export const sqliteMigrations = [
|
export const sqliteMigrations = [
|
||||||
Init1693835579790,
|
Init1693835579790,
|
||||||
@@ -19,5 +20,6 @@ export const sqliteMigrations = [
|
|||||||
AddAnalytic1694432361423,
|
AddAnalytic1694432361423,
|
||||||
AddChatHistory1694657778173,
|
AddChatHistory1694657778173,
|
||||||
AddAssistantEntity1699325775451,
|
AddAssistantEntity1699325775451,
|
||||||
AddUsedToolsToChatMessage1699481607341
|
AddUsedToolsToChatMessage1699481607341,
|
||||||
|
AddCategoryToChatFlow1699900910291
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import Divider from '@mui/material/Divider'
|
|||||||
import FileCopyIcon from '@mui/icons-material/FileCopy'
|
import FileCopyIcon from '@mui/icons-material/FileCopy'
|
||||||
import FileDownloadIcon from '@mui/icons-material/Downloading'
|
import FileDownloadIcon from '@mui/icons-material/Downloading'
|
||||||
import FileDeleteIcon from '@mui/icons-material/Delete'
|
import FileDeleteIcon from '@mui/icons-material/Delete'
|
||||||
|
import FileCategoryIcon from '@mui/icons-material/Category'
|
||||||
import Button from '@mui/material/Button'
|
import Button from '@mui/material/Button'
|
||||||
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'
|
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
@@ -22,6 +23,7 @@ import ConfirmDialog from '../dialog/ConfirmDialog'
|
|||||||
import SaveChatflowDialog from '../dialog/SaveChatflowDialog'
|
import SaveChatflowDialog from '../dialog/SaveChatflowDialog'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import useApi from '../../hooks/useApi'
|
import useApi from '../../hooks/useApi'
|
||||||
|
import TagDialog from '../dialog/TagDialog'
|
||||||
|
|
||||||
const StyledMenu = styled((props) => (
|
const StyledMenu = styled((props) => (
|
||||||
<Menu
|
<Menu
|
||||||
@@ -64,13 +66,15 @@ export default function FlowListMenu({ chatflow, updateFlowsApi }) {
|
|||||||
const { confirm } = useConfirm()
|
const { confirm } = useConfirm()
|
||||||
const dispatch = useDispatch()
|
const dispatch = useDispatch()
|
||||||
const [flowDialogOpen, setFlowDialogOpen] = useState(false)
|
const [flowDialogOpen, setFlowDialogOpen] = useState(false)
|
||||||
|
const [categoryValues, setCategoryValues] = useState([])
|
||||||
|
|
||||||
|
const [categoryDialogOpen, setCategoryDialogOpen] = useState(false)
|
||||||
const updateChatflowApi = useApi(chatflowsApi.updateChatflow)
|
const updateChatflowApi = useApi(chatflowsApi.updateChatflow)
|
||||||
// ==============================|| Snackbar ||============================== //
|
// ==============================|| Snackbar ||============================== //
|
||||||
|
|
||||||
useNotifier()
|
useNotifier()
|
||||||
const enqueueSnackbar = (...args) => dispatch(enqueueSnackbarAction(...args))
|
const enqueueSnackbar = (...args) => dispatch(enqueueSnackbarAction(...args))
|
||||||
const closeSnackbar = (...args) => dispatch(closeSnackbarAction(...args))
|
const closeSnackbar = (...args) => dispatch(closeSnackbarAction(...args))
|
||||||
|
|
||||||
const [anchorEl, setAnchorEl] = React.useState(null)
|
const [anchorEl, setAnchorEl] = React.useState(null)
|
||||||
const open = Boolean(anchorEl)
|
const open = Boolean(anchorEl)
|
||||||
const handleClick = (event) => {
|
const handleClick = (event) => {
|
||||||
@@ -79,12 +83,10 @@ export default function FlowListMenu({ chatflow, updateFlowsApi }) {
|
|||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
setAnchorEl(null)
|
setAnchorEl(null)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleFlowRename = () => {
|
const handleFlowRename = () => {
|
||||||
setAnchorEl(null)
|
setAnchorEl(null)
|
||||||
setFlowDialogOpen(true)
|
setFlowDialogOpen(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
const saveFlowRename = async (chatflowName) => {
|
const saveFlowRename = async (chatflowName) => {
|
||||||
const updateBody = {
|
const updateBody = {
|
||||||
name: chatflowName,
|
name: chatflowName,
|
||||||
@@ -110,7 +112,39 @@ export default function FlowListMenu({ chatflow, updateFlowsApi }) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const handleFlowCategory = () => {
|
||||||
|
setAnchorEl(null)
|
||||||
|
if (chatflow.category) setCategoryValues(chatflow.category.split(';'))
|
||||||
|
else setCategoryValues([])
|
||||||
|
setCategoryDialogOpen(true)
|
||||||
|
}
|
||||||
|
const saveFlowCategory = async (categories) => {
|
||||||
|
// save categories as string
|
||||||
|
const categoryTags = categories.join(';')
|
||||||
|
const updateBody = {
|
||||||
|
category: categoryTags,
|
||||||
|
chatflow
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
await updateChatflowApi.request(chatflow.id, updateBody)
|
||||||
|
await updateFlowsApi.request()
|
||||||
|
} catch (error) {
|
||||||
|
const errorData = error.response.data || `${error.response.status}: ${error.response.statusText}`
|
||||||
|
enqueueSnackbar({
|
||||||
|
message: errorData,
|
||||||
|
options: {
|
||||||
|
key: new Date().getTime() + Math.random(),
|
||||||
|
variant: 'error',
|
||||||
|
persist: true,
|
||||||
|
action: (key) => (
|
||||||
|
<Button style={{ color: 'white' }} onClick={() => closeSnackbar(key)}>
|
||||||
|
<IconX />
|
||||||
|
</Button>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
const handleDelete = async () => {
|
const handleDelete = async () => {
|
||||||
setAnchorEl(null)
|
setAnchorEl(null)
|
||||||
const confirmPayload = {
|
const confirmPayload = {
|
||||||
@@ -143,7 +177,6 @@ export default function FlowListMenu({ chatflow, updateFlowsApi }) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleDuplicate = () => {
|
const handleDuplicate = () => {
|
||||||
setAnchorEl(null)
|
setAnchorEl(null)
|
||||||
try {
|
try {
|
||||||
@@ -206,6 +239,11 @@ export default function FlowListMenu({ chatflow, updateFlowsApi }) {
|
|||||||
Export
|
Export
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<Divider sx={{ my: 0.5 }} />
|
<Divider sx={{ my: 0.5 }} />
|
||||||
|
<MenuItem onClick={handleFlowCategory} disableRipple>
|
||||||
|
<FileCategoryIcon />
|
||||||
|
Update Category
|
||||||
|
</MenuItem>
|
||||||
|
<Divider sx={{ my: 0.5 }} />
|
||||||
<MenuItem onClick={handleDelete} disableRipple>
|
<MenuItem onClick={handleDelete} disableRipple>
|
||||||
<FileDeleteIcon />
|
<FileDeleteIcon />
|
||||||
Delete
|
Delete
|
||||||
@@ -222,6 +260,13 @@ export default function FlowListMenu({ chatflow, updateFlowsApi }) {
|
|||||||
onCancel={() => setFlowDialogOpen(false)}
|
onCancel={() => setFlowDialogOpen(false)}
|
||||||
onConfirm={saveFlowRename}
|
onConfirm={saveFlowRename}
|
||||||
/>
|
/>
|
||||||
|
<TagDialog
|
||||||
|
isOpen={categoryDialogOpen}
|
||||||
|
onClose={() => setCategoryDialogOpen(false)}
|
||||||
|
tags={categoryValues}
|
||||||
|
setTags={setCategoryValues}
|
||||||
|
onSubmit={saveFlowCategory}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,91 @@
|
|||||||
|
import { useState } from 'react'
|
||||||
|
import Dialog from '@mui/material/Dialog'
|
||||||
|
import Box from '@mui/material/Box'
|
||||||
|
import Button from '@mui/material/Button'
|
||||||
|
import TextField from '@mui/material/TextField'
|
||||||
|
import Chip from '@mui/material/Chip'
|
||||||
|
import PropTypes from 'prop-types'
|
||||||
|
import { DialogActions, DialogContent, DialogTitle } from '@mui/material'
|
||||||
|
|
||||||
|
const TagDialog = ({ isOpen, onClose, tags, setTags, onSubmit }) => {
|
||||||
|
const [inputValue, setInputValue] = useState('')
|
||||||
|
|
||||||
|
const handleInputChange = (event) => {
|
||||||
|
setInputValue(event.target.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleInputKeyDown = (event) => {
|
||||||
|
if (event.key === 'Enter' && inputValue.trim()) {
|
||||||
|
event.preventDefault()
|
||||||
|
if (!tags.includes(inputValue)) {
|
||||||
|
setTags([...tags, inputValue])
|
||||||
|
setInputValue('')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleDeleteTag = (tagToDelete) => {
|
||||||
|
setTags(tags.filter((tag) => tag !== tagToDelete))
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleSubmit = (event) => {
|
||||||
|
event.preventDefault()
|
||||||
|
onSubmit(tags)
|
||||||
|
onClose()
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Dialog
|
||||||
|
fullWidth
|
||||||
|
maxWidth='xs'
|
||||||
|
open={isOpen}
|
||||||
|
onClose={onClose}
|
||||||
|
aria-labelledby='tag-dialog-title'
|
||||||
|
aria-describedby='tag-dialog-description'
|
||||||
|
>
|
||||||
|
<DialogTitle sx={{ fontSize: '1rem' }} id='alert-dialog-title'>
|
||||||
|
Set Chatflow Category Tags
|
||||||
|
</DialogTitle>
|
||||||
|
<DialogContent>
|
||||||
|
<Box>
|
||||||
|
<form onSubmit={handleSubmit}>
|
||||||
|
<div style={{ marginBottom: 20 }}>
|
||||||
|
{tags.map((tag, index) => (
|
||||||
|
<Chip
|
||||||
|
key={index}
|
||||||
|
label={tag}
|
||||||
|
onDelete={() => handleDeleteTag(tag)}
|
||||||
|
style={{ marginRight: 5, marginBottom: 5 }}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
<TextField
|
||||||
|
fullWidth
|
||||||
|
value={inputValue}
|
||||||
|
onChange={handleInputChange}
|
||||||
|
onKeyDown={handleInputKeyDown}
|
||||||
|
label='Add a tag'
|
||||||
|
variant='outlined'
|
||||||
|
/>
|
||||||
|
</form>
|
||||||
|
</Box>
|
||||||
|
</DialogContent>
|
||||||
|
<DialogActions>
|
||||||
|
<Button onClick={onClose}>Cancel</Button>
|
||||||
|
<Button variant='contained' onClick={handleSubmit}>
|
||||||
|
Submit
|
||||||
|
</Button>
|
||||||
|
</DialogActions>
|
||||||
|
</Dialog>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
TagDialog.propTypes = {
|
||||||
|
isOpen: PropTypes.bool,
|
||||||
|
onClose: PropTypes.func,
|
||||||
|
tags: PropTypes.array,
|
||||||
|
setTags: PropTypes.func,
|
||||||
|
onSubmit: PropTypes.func
|
||||||
|
}
|
||||||
|
|
||||||
|
export default TagDialog
|
||||||
@@ -11,6 +11,7 @@ import TableRow from '@mui/material/TableRow'
|
|||||||
import Paper from '@mui/material/Paper'
|
import Paper from '@mui/material/Paper'
|
||||||
import { Button, Stack, Typography } from '@mui/material'
|
import { Button, Stack, Typography } from '@mui/material'
|
||||||
import FlowListMenu from '../button/FlowListMenu'
|
import FlowListMenu from '../button/FlowListMenu'
|
||||||
|
import Chip from '@mui/material/Chip'
|
||||||
|
|
||||||
const StyledTableCell = styled(TableCell)(({ theme }) => ({
|
const StyledTableCell = styled(TableCell)(({ theme }) => ({
|
||||||
[`&.${tableCellClasses.head}`]: {
|
[`&.${tableCellClasses.head}`]: {
|
||||||
@@ -47,13 +48,16 @@ export const FlowListTable = ({ data, images, filterFunction, updateFlowsApi })
|
|||||||
<StyledTableCell component='th' scope='row' style={{ width: '20%' }} key='0'>
|
<StyledTableCell component='th' scope='row' style={{ width: '20%' }} key='0'>
|
||||||
Name
|
Name
|
||||||
</StyledTableCell>
|
</StyledTableCell>
|
||||||
<StyledTableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} style={{ width: '35%' }} key='1'>
|
<StyledTableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} style={{ width: '25%' }} key='1'>
|
||||||
Nodes (Showing first 5)
|
Category
|
||||||
</StyledTableCell>
|
</StyledTableCell>
|
||||||
<StyledTableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} style={{ width: '30%' }} key='2'>
|
<StyledTableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} style={{ width: '30%' }} key='2'>
|
||||||
Last Modified Date
|
Nodes (Showing first 5)
|
||||||
</StyledTableCell>
|
</StyledTableCell>
|
||||||
<StyledTableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} style={{ width: '15%' }} key='3'>
|
<StyledTableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} style={{ width: '15%' }} key='3'>
|
||||||
|
Last Modified Date
|
||||||
|
</StyledTableCell>
|
||||||
|
<StyledTableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} style={{ width: '10%' }} key='4'>
|
||||||
Actions
|
Actions
|
||||||
</StyledTableCell>
|
</StyledTableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
@@ -68,8 +72,25 @@ export const FlowListTable = ({ data, images, filterFunction, updateFlowsApi })
|
|||||||
<Button onClick={() => goToCanvas(row)}>{row.templateName || row.name}</Button>
|
<Button onClick={() => goToCanvas(row)}>{row.templateName || row.name}</Button>
|
||||||
</Typography>
|
</Typography>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|
||||||
<TableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} key='1'>
|
<TableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} key='1'>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'row',
|
||||||
|
flexWrap: 'wrap',
|
||||||
|
marginTop: 5
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
|
||||||
|
{row.category &&
|
||||||
|
row.category
|
||||||
|
.split(';')
|
||||||
|
.map((tag, index) => (
|
||||||
|
<Chip key={index} label={tag} style={{ marginRight: 5, marginBottom: 5 }} />
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} key='2'>
|
||||||
{images[row.id] && (
|
{images[row.id] && (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
@@ -108,10 +129,10 @@ export const FlowListTable = ({ data, images, filterFunction, updateFlowsApi })
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} key='2'>
|
|
||||||
{moment(row.updatedDate).format('dddd, MMMM Do, YYYY h:mm:ss A')}
|
|
||||||
</TableCell>
|
|
||||||
<TableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} key='3'>
|
<TableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} key='3'>
|
||||||
|
{moment(row.updatedDate).format('MMMM Do, YYYY')}
|
||||||
|
</TableCell>
|
||||||
|
<TableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} key='4'>
|
||||||
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={1} justifyContent='center' alignItems='center'>
|
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={1} justifyContent='center' alignItems='center'>
|
||||||
{/*<Button sx={{ marginRight: '10px' }} onClick={() => goToCanvas(row)}>*/}
|
{/*<Button sx={{ marginRight: '10px' }} onClick={() => goToCanvas(row)}>*/}
|
||||||
{/* OPEN*/}
|
{/* OPEN*/}
|
||||||
|
|||||||
@@ -54,7 +54,10 @@ const Chatflows = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function filterFlows(data) {
|
function filterFlows(data) {
|
||||||
return data.name.toLowerCase().indexOf(search.toLowerCase()) > -1
|
return (
|
||||||
|
data.name.toLowerCase().indexOf(search.toLowerCase()) > -1 ||
|
||||||
|
(data.category && data.category.toLowerCase().indexOf(search.toLowerCase()) > -1)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const onLoginClick = (username, password) => {
|
const onLoginClick = (username, password) => {
|
||||||
@@ -137,7 +140,7 @@ const Chatflows = () => {
|
|||||||
size='small'
|
size='small'
|
||||||
sx={{ display: { xs: 'none', sm: 'block' }, marginLeft: 3 }}
|
sx={{ display: { xs: 'none', sm: 'block' }, marginLeft: 3 }}
|
||||||
variant='outlined'
|
variant='outlined'
|
||||||
placeholder='Search Chatflows'
|
placeholder='Search name or category'
|
||||||
onChange={onSearchChange}
|
onChange={onSearchChange}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
startAdornment: (
|
startAdornment: (
|
||||||
|
|||||||
Reference in New Issue
Block a user