diff --git a/app/api/public/requests.py b/app/api/public/requests.py index f0f8830..8c12bd8 100644 --- a/app/api/public/requests.py +++ b/app/api/public/requests.py @@ -157,6 +157,7 @@ def _serialize_public_service_request(row: RequestServiceRequest) -> PublicServi id=row.id, request_id=row.request_id, client_id=row.client_id, + assigned_lawyer_id=row.assigned_lawyer_id, type=str(row.type or ""), status=str(row.status or "NEW"), body=str(row.body or ""), diff --git a/app/schemas/public.py b/app/schemas/public.py index d50be20..3d06892 100644 --- a/app/schemas/public.py +++ b/app/schemas/public.py @@ -76,6 +76,7 @@ class PublicServiceRequestRead(BaseModel): id: UUID request_id: UUID client_id: Optional[UUID] = None + assigned_lawyer_id: Optional[UUID] = None type: str status: str body: str diff --git a/app/web/admin/features/requests/RequestWorkspace.jsx b/app/web/admin/features/requests/RequestWorkspace.jsx index 232a131..fa17df6 100644 --- a/app/web/admin/features/requests/RequestWorkspace.jsx +++ b/app/web/admin/features/requests/RequestWorkspace.jsx @@ -173,6 +173,7 @@ export function RequestWorkspace({ const canRequestData = viewerRoleCode === "LAWYER" || viewerRoleCode === "ADMIN"; const canFillRequestData = viewerRoleCode === "CLIENT"; const canSeeRate = viewerRoleCode !== "CLIENT"; + const canSeeCreatedUpdatedInCard = viewerRoleCode !== "CLIENT"; const safeMessages = Array.isArray(messages) ? messages : []; const safeAttachments = Array.isArray(attachments) ? attachments : []; const safeStatusHistory = Array.isArray(statusHistory) ? statusHistory : []; @@ -424,6 +425,20 @@ export function RequestWorkspace({ openPreview(item); }; + const downloadAttachment = (item) => { + const url = String(item?.download_url || "").trim(); + if (!url) return; + const link = document.createElement("a"); + link.href = url; + link.target = "_blank"; + link.rel = "noreferrer"; + const fileName = String(item?.file_name || "").trim(); + if (fileName) link.download = fileName; + document.body.appendChild(link); + link.click(); + link.remove(); + }; + useEffect(() => { liveCursorRef.current = localActivityCursor || ""; }, [localActivityCursor, row?.id]); @@ -1287,14 +1302,18 @@ export function RequestWorkspace({ {lawyerLabel} -
- Создана - {fmtShortDateTime(row.created_at)} -
-
- Изменена - {fmtShortDateTime(row.updated_at)} -
+ {canSeeCreatedUpdatedInCard ? ( + <> +
+ Создана + {fmtShortDateTime(row.created_at)} +
+
+ Изменена + {fmtShortDateTime(row.updated_at)} +
+ + ) : null}

Маршрут статусов

@@ -2372,7 +2391,7 @@ export function RequestWorkspace({ {isFile ? ( value && typeof value === "object" ? (
- diff --git a/app/web/client.css b/app/web/client.css index 6bb4c23..da30cb0 100644 --- a/app/web/client.css +++ b/app/web/client.css @@ -37,27 +37,28 @@ grid-template-columns: repeat(4, minmax(0, 1fr)); } -.client-summary-actions { - margin-top: 0.75rem; - display: flex; - flex-wrap: wrap; - gap: 0.45rem; +.client-help-modal { + width: min(760px, 100%); } -.client-service-requests { - margin-top: 0.85rem; +.client-help-stack { + display: grid; + gap: 0.75rem; } -.client-service-requests h3 { - margin: 0 0 0.65rem; +.client-help-block { + border: 1px solid var(--line); + border-radius: 12px; + background: rgba(255, 255, 255, 0.02); + padding: 0.7rem; + display: grid; + gap: 0.6rem; } -.service-request-modal { - width: min(720px, 100%); -} - -.service-request-form textarea { - min-height: 150px; +.client-help-description { + margin: 0; + color: #dbe6f4; + line-height: 1.45; } #client-page-status { diff --git a/app/web/client.jsx b/app/web/client.jsx index 9ac16d8..5332336 100644 --- a/app/web/client.jsx +++ b/app/web/client.jsx @@ -5,17 +5,6 @@ import { detectAttachmentPreviewKind, fmtShortDateTime } from "./admin/shared/ut (function () { const { useCallback, useEffect, useMemo, useRef, useState } = React; - const SERVICE_REQUEST_TYPE_LABELS = { - CURATOR_CONTACT: "Запрос к куратору", - LAWYER_CHANGE_REQUEST: "Смена юриста", - }; - const SERVICE_REQUEST_STATUS_LABELS = { - NEW: "Новый", - IN_PROGRESS: "В работе", - RESOLVED: "Решен", - REJECTED: "Отклонен", - }; - function StatusLine({ status }) { return

{status?.message || ""}

; } @@ -270,82 +259,93 @@ import { detectAttachmentPreviewKind, fmtShortDateTime } from "./admin/shared/ut ); } - function ServiceRequestModal({ open, type, body, status, loading, onBodyChange, onClose, onSubmit }) { - const title = type === "LAWYER_CHANGE_REQUEST" ? "Запрос на смену юриста" : "Обращение к куратору"; + function ClientHelpModal({ + open, + status, + loadingType, + lawyerChangeReason, + curatorBlocked, + lawyerChangeBlocked, + onClose, + onReasonChange, + onSubmitCurator, + onSubmitLawyerChange, + }) { return ( -
event.target.id === "service-request-overlay" && onClose()}> -
event.stopPropagation()}> +
event.target.id === "client-help-overlay" && onClose()}> +
event.stopPropagation()}>
-

{title}

+

Помощь по заявке

-
-
-
- -