From ee99041b147efda965139b4c3cf6101954119469 Mon Sep 17 00:00:00 2001 From: TronoSfera <119615520+TronoSfera@users.noreply.github.com> Date: Mon, 2 Mar 2026 21:32:11 +0300 Subject: [PATCH] fix user UI --- app/web/admin.css | 10 ++- .../admin/features/config/ConfigSection.jsx | 10 +-- .../features/requests/RequestWorkspace.jsx | 21 +++--- app/web/client.css | 64 ++++++++++++++++--- app/web/client.jsx | 34 +++++----- 5 files changed, 99 insertions(+), 40 deletions(-) diff --git a/app/web/admin.css b/app/web/admin.css index 7637b29..09e24ed 100644 --- a/app/web/admin.css +++ b/app/web/admin.css @@ -2354,8 +2354,14 @@ gap: 0.5rem; } + .request-chat-block { + --request-chat-pane-height: clamp(280px, 54vh, 470px); + } + .request-chat-block .request-modal-list { - max-height: 480px; + max-height: var(--request-chat-pane-height); + min-height: var(--request-chat-pane-height); + height: var(--request-chat-pane-height); } .request-chat-head { @@ -2424,7 +2430,6 @@ } .request-chat-list { - max-height: 470px; overflow: auto; display: flex; flex-direction: column; @@ -2732,7 +2737,6 @@ } .request-files-tab .request-modal-list { - max-height: 520px; overflow: auto; } diff --git a/app/web/admin/features/config/ConfigSection.jsx b/app/web/admin/features/config/ConfigSection.jsx index 015d6f0..e385b75 100644 --- a/app/web/admin/features/config/ConfigSection.jsx +++ b/app/web/admin/features/config/ConfigSection.jsx @@ -1,6 +1,6 @@ import { KNOWN_CONFIG_TABLE_KEYS, OPERATOR_LABELS, PAGE_SIZE, TABLE_SERVER_CONFIG } from "../../shared/constants.js"; import { AddIcon, DownloadIcon, FilterIcon, NextIcon, PrevIcon, RefreshIcon } from "../../shared/icons.jsx"; -import { boolLabel, fmtDate, listPreview, normalizeReferenceMeta, roleLabel, statusKindLabel, statusLabel } from "../../shared/utils.js"; +import { boolLabel, fmtDate, listPreview, normalizeReferenceMeta, roleLabel, statusKindLabel } from "../../shared/utils.js"; function fmtBalance(value) { const number = Number(value); @@ -68,6 +68,8 @@ export function ConfigSection(props) { const StatusLine = StatusLineComponent; const IconButton = IconButtonComponent; const UserAvatar = UserAvatarComponent; + const statusRouteLabel = (code) => + resolveReferenceLabel({ table: "statuses", value_field: "code", label_field: "name" }, code); const canRefresh = Boolean(configActiveKey); const canCreateRecord = Boolean(canCreateInConfig && configActiveKey); const canLoadAllRows = Boolean( @@ -422,7 +424,7 @@ export function ConfigSection(props) { type="button" onClick={() => openEditRecordModal("statusTransitions", link)} > - {statusLabel(link.to_status) + " (" + String(link.to_status || "-") + ")"} + {statusRouteLabel(link.to_status)} {"SLA: " + (link.sla_hours == null ? "-" : String(link.sla_hours) + " ч") + @@ -466,8 +468,8 @@ export function ConfigSection(props) { renderRow={(row) => ( {row.topic_code || "-"} - {statusLabel(row.from_status)} - {statusLabel(row.to_status)} + {statusRouteLabel(row.from_status)} + {statusRouteLabel(row.to_status)} {row.sla_hours == null ? "-" : String(row.sla_hours)} {listPreview(row.required_data_keys, "-")} {listPreview(row.required_mime_types, "-")} diff --git a/app/web/admin/features/requests/RequestWorkspace.jsx b/app/web/admin/features/requests/RequestWorkspace.jsx index 1f82e95..8eded81 100644 --- a/app/web/admin/features/requests/RequestWorkspace.jsx +++ b/app/web/admin/features/requests/RequestWorkspace.jsx @@ -174,6 +174,7 @@ export function RequestWorkspace({ const canFillRequestData = viewerRoleCode === "CLIENT"; const canSeeRate = viewerRoleCode !== "CLIENT"; const canSeeCreatedUpdatedInCard = viewerRoleCode !== "CLIENT"; + const showTopicStatusInCard = viewerRoleCode !== "CLIENT"; const safeMessages = Array.isArray(messages) ? messages : []; const safeAttachments = Array.isArray(attachments) ? attachments : []; const safeStatusHistory = Array.isArray(statusHistory) ? statusHistory : []; @@ -1254,14 +1255,18 @@ export function RequestWorkspace({ ) : row ? ( <>
-
- Тема - {String(row.topic_name || row.topic_code || "-")} -
-
- Статус - {statusLabel(row.status_code)} -
+ {showTopicStatusInCard ? ( + <> +
+ Тема + {String(row.topic_name || row.topic_code || "-")} +
+
+ Статус + {statusLabel(row.status_code)} +
+ + ) : null}
Описание проблемы diff --git a/app/web/client.css b/app/web/client.css index 4e964e0..177e30a 100644 --- a/app/web/client.css +++ b/app/web/client.css @@ -46,10 +46,57 @@ margin-bottom: 0.85rem; } -.client-summary-grid { - display: grid; - gap: 0.65rem; - grid-template-columns: repeat(4, minmax(0, 1fr)); +.client-summary-row { + display: flex; + align-items: center; + justify-content: space-between; + gap: 0.75rem 1.1rem; + flex-wrap: wrap; + padding: 0.2rem 0; +} + +.client-summary-chips { + display: inline-flex; + align-items: center; + gap: 0.42rem; + flex-wrap: wrap; +} + +.client-summary-chip { + display: inline-flex; + align-items: center; + gap: 0.24rem; + border-radius: 999px; + border: 1px solid rgba(121, 152, 197, 0.3); + background: rgba(74, 106, 157, 0.14); + color: #deebff; + padding: 0.2rem 0.58rem; + font-size: 0.78rem; + font-weight: 700; + line-height: 1.25; +} + +.client-summary-chip span { + color: #f0f6ff; +} + +.client-summary-chip-topic { + border-color: rgba(143, 168, 208, 0.32); + background: rgba(96, 126, 171, 0.15); +} + +.client-summary-dates { + display: inline-flex; + align-items: center; + flex-wrap: wrap; + gap: 0.4rem 0.85rem; + color: #9fb3cc; + font-size: 0.79rem; +} + +.client-summary-dates b { + color: #dce8f8; + font-weight: 700; } .client-help-modal { @@ -81,8 +128,8 @@ } @media (max-width: 1120px) { - .client-summary-grid { - grid-template-columns: repeat(2, minmax(0, 1fr)); + .client-summary-row { + align-items: flex-start; } } @@ -96,7 +143,8 @@ align-items: stretch; } - .client-summary-grid { - grid-template-columns: 1fr; + .client-summary-dates { + display: grid; + gap: 0.3rem; } } diff --git a/app/web/client.jsx b/app/web/client.jsx index 0947839..2a8fdd8 100644 --- a/app/web/client.jsx +++ b/app/web/client.jsx @@ -1,6 +1,6 @@ import { RequestWorkspace } from "./admin/features/requests/RequestWorkspace.jsx"; import { createRequestModalState } from "./admin/shared/state.js"; -import { detectAttachmentPreviewKind, fmtShortDateTime } from "./admin/shared/utils.js"; +import { detectAttachmentPreviewKind, fmtShortDateTime, statusLabel } from "./admin/shared/utils.js"; (function () { const { useCallback, useEffect, useMemo, useRef, useState } = React; @@ -849,23 +849,23 @@ import { detectAttachmentPreviewKind, fmtShortDateTime } from "./admin/shared/ut
-