import { OPERATOR_LABELS, REQUEST_UPDATE_EVENT_LABELS, TABLE_SERVER_CONFIG } from "../../shared/constants.js"; import { fmtDate, statusLabel } from "../../shared/utils.js"; function renderRequestUpdatesCell(row, role) { if (role === "LAWYER") { const has = Boolean(row.lawyer_has_unread_updates); const eventType = String(row.lawyer_unread_event_type || "").toUpperCase(); return has ? ( {REQUEST_UPDATE_EVENT_LABELS[eventType] || "обновление"} ) : ( нет ); } const clientHas = Boolean(row.client_has_unread_updates); const clientType = String(row.client_unread_event_type || "").toUpperCase(); const lawyerHas = Boolean(row.lawyer_has_unread_updates); const lawyerType = String(row.lawyer_unread_event_type || "").toUpperCase(); if (!clientHas && !lawyerHas) return нет; return ( {clientHas ? ( {"Клиент: " + (REQUEST_UPDATE_EVENT_LABELS[clientType] || "обновление")} ) : null} {lawyerHas ? ( {"Юрист: " + (REQUEST_UPDATE_EVENT_LABELS[lawyerType] || "обновление")} ) : null} ); } export function RequestsSection({ role, tables, status, getStatus, getFieldDef, getFilterValuePreview, resolveReferenceLabel, onRefresh, onCreate, onOpenFilter, onRemoveFilter, onEditFilter, onSort, onPrev, onNext, onLoadAll, onClaimRequest, onOpenReassign, onOpenRequest, onEditRecord, onDeleteRecord, FilterToolbarComponent, DataTableComponent, TablePagerComponent, StatusLineComponent, IconButtonComponent, }) { const tableState = tables?.requests || { rows: [], filters: [], sort: [] }; const FilterToolbar = FilterToolbarComponent; const DataTable = DataTableComponent; const TablePager = TablePagerComponent; const StatusLine = StatusLineComponent; const IconButton = IconButtonComponent; return ( <>
Серверная фильтрация и просмотр клиентских заявок.