add dropdown monitoring
This commit is contained in:
@@ -24,10 +24,11 @@ import { FileInfoModalWindow } from '@/app/ui/modal-windows/file-info-modal-wind
|
||||
import { FileMonitoringModalWindow } from '@/app/ui/modal-windows/file-monitoring-modal-window';
|
||||
import { FileTypeIcon } from '@/app/components/FileTypeIcon';
|
||||
import { fetchReferralUserStats } from '@/app/actions/referralsActions';
|
||||
import { MonitoringDropDown } from '@/app/components/tanstak-table/MonitoringDropDown';
|
||||
|
||||
type FileType = 'image' | 'video' | 'audio';
|
||||
|
||||
type FileItem = {
|
||||
export type FileItem = {
|
||||
id: string;
|
||||
fileName: string;
|
||||
fileType: string;
|
||||
@@ -379,7 +380,7 @@ export default function TanstakFilesTable({ fileType }: { fileType: string }) {
|
||||
header: ({ column }) => (
|
||||
<div className="column">
|
||||
<span>
|
||||
{t('status')}
|
||||
{t('monitoring-status')}
|
||||
</span>
|
||||
<button
|
||||
onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
|
||||
@@ -404,47 +405,7 @@ export default function TanstakFilesTable({ fileType }: { fileType: string }) {
|
||||
cell: ({ row }) => {
|
||||
return (
|
||||
<div className="text-center font-semibold table-item">
|
||||
<span className="table-item-status">
|
||||
{row.original.status}
|
||||
</span>
|
||||
{/* <DropDownList
|
||||
value={typeFilter}
|
||||
translatedValue={
|
||||
(() => {
|
||||
switch (typeFilter) {
|
||||
case 'image':
|
||||
return t('images')
|
||||
case 'video':
|
||||
return t('videos')
|
||||
case 'audio':
|
||||
return t('audios')
|
||||
case 'document':
|
||||
return t('documents')
|
||||
default:
|
||||
return t('all-types')
|
||||
}
|
||||
})()
|
||||
}
|
||||
callBack={setTypeFilter}
|
||||
>
|
||||
<li value="all">
|
||||
{t('all-types')}
|
||||
</li>
|
||||
<li value="image">
|
||||
{t('images-few')}
|
||||
</li>
|
||||
<li value="video">
|
||||
{t('videos')}
|
||||
</li>
|
||||
<li value="audio">
|
||||
{t('audios')}
|
||||
</li>
|
||||
{!referralLink && (
|
||||
<li value="document">
|
||||
{t('documents')}
|
||||
</li>
|
||||
)}
|
||||
</DropDownList> */}
|
||||
<MonitoringDropDown file={row.original} />
|
||||
</div>
|
||||
)
|
||||
},
|
||||
@@ -461,13 +422,13 @@ export default function TanstakFilesTable({ fileType }: { fileType: string }) {
|
||||
cell: ({ row }) => (
|
||||
<div className="actions">
|
||||
<div className="actions-group">
|
||||
<button
|
||||
{/* <button
|
||||
onClick={() => handleMonitoring(row.original)}
|
||||
className="bg-violet-500 hover:bg-violet-600"
|
||||
title={t('monitoring')}
|
||||
>
|
||||
<IconEye />
|
||||
</button>
|
||||
</button> */}
|
||||
{/* <button
|
||||
onClick={() => handleOpenWindowForRemove(row.original)}
|
||||
className="table-action-delete"
|
||||
|
||||
Reference in New Issue
Block a user