Repository navigation
Экран «Замеры» для замерщика на shadcn/ui (только просмотр) - #555
zufarataev-code wants to merge 1 commit into
Conversation
Первый React-экран рядом с legacy CRM: /field/measure и /field/measure/[orderId]. Только чтение; данные берутся через существующий state endpoint, телефон получает небольшой ответ вместо всего workspace. Tailwind v4 и компоненты shadcn/ui подключены только для /field. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AqBySj6sXiLuBQcms7dkFh
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Решение архитектора
|
|
Решение архитектора
|
|
Радар пересечений: этот PR правит те же файлы, что и другие открытые PR.
Что делать по |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 475b3a8e4f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const [scope, setScope] = useState("mine"); | ||
| const all = data?.projects ?? []; | ||
| const hasOthers = all.some((project) => !project.mine); | ||
| const projects = scope === "mine" && hasOthers ? all.filter((project) => project.mine) : all; |
There was a problem hiding this comment.
Default office users to the complete project list
For an owner or manager, every returned project normally has mine === false: mine compares measurerId with the viewer's legacy IDs, while the employee directory gives these roles owner/manager cards rather than measurer cards. Because scope initially equals "mine", this branch filters a populated response to an empty list and misleadingly shows «Замеров нет» until the user discovers and selects «Все». Default privileged office users to all projects, or only apply the initial “mine” filter when at least one project is actually mine.
Useful? React with 👍 / 👎.
Что сделано
Первый React-экран на shadcn/ui рядом с рабочей CRM — без правок legacy HTML, схемы и state endpoint.
/field/measure— проекты вокруг замера, назначенный визит первым./field/measure/[orderId]— клиент, адрес, маршрут, звонок, помещения и окна, площадь по услугам, окна без размеров; кнопка открывает проект в рабочей CRM.GET /api/v1/field/measure[/orderId]читает workspace через существующийGET /api/v1/legacy-crm/state(те же роли, назначения, скрытие денег) и отдаёт телефону небольшой ответ./field(app/field/field.css,important, переменные внутри.rp-field).Граница
Только чтение. Ввод размеров и «Сдать замер» остаются в legacy: панели, типы окон, привязка к услуге и
changeStatus()с уведомлениями переносятся следующим шагом с тестами.Проверка
view.test.ts3/3: площадь повторяетwindowActualAreaSqft(), деньги в ответ не попадают.next dev, ширина 390 px, подставные данные: нет ошибок консоли и горизонтальной прокрутки; страница входа не изменилась.@prisma/client did not initialize(движок Prisma недоступен в среде Claude). Typecheck и production build проверяет CI.Пересечения
package.json/package-lock.json— hot files. #554 и #553 их не трогают.Generated by Claude Code