mirror of
https://github.com/wasrusgen/zov-tech.git
synced 2026-06-03 15:44:47 +00:00
fix: открывать карточку клиента вместо списка подборов
- Заголовок 'История подборов' → 'Карточка клиента' - Убрать инлайн-монтирование Proposals.mountManager в карточке клиента - Оставить только кнопку 'Открыть →' для перехода к подборам - Версия clients.js: 20260518a
This commit is contained in:
parent
20665d73f3
commit
a4124c6b50
@ -564,7 +564,7 @@ const Clients = (function () {
|
||||
|
||||
async function renderClientHistory(clientKey) {
|
||||
root.innerHTML = "";
|
||||
root.appendChild(headerEl("История подборов", "#/clients"));
|
||||
root.appendChild(headerEl("Карточка клиента", "#/clients"));
|
||||
|
||||
// Берём из кеша если есть
|
||||
let clients = clientsCache?.clients;
|
||||
@ -734,27 +734,17 @@ const Clients = (function () {
|
||||
// Детальные списки внизу (свёрнуты)
|
||||
detailsPlaceholder.replaceWith(renderClientDetails(client, myMeasurements));
|
||||
|
||||
// Подбор техники (Proposals) — секция для менеджера
|
||||
if (typeof Proposals !== "undefined") {
|
||||
const clientKey = (client.client_tg_id || client.client_name || "").toLowerCase();
|
||||
// Подбор техники — только ссылка, без инлайн-загрузки всего списка
|
||||
const clientKeyProp = encodeURIComponent((client.client_tg_id || client.client_name || "").toLowerCase());
|
||||
const propWrapper = el(`
|
||||
<div class="prop-section">
|
||||
<div class="prop-section-head">
|
||||
🛍 Подбор техники
|
||||
<a class="prop-section-open-link" href="#/clients/client/${encodeURIComponent(clientKey)}/proposals">Открыть →</a>
|
||||
<a class="prop-section-open-link" href="#/clients/client/${clientKeyProp}/proposals">Открыть →</a>
|
||||
</div>
|
||||
<div id="propInlineContainer"></div>
|
||||
</div>
|
||||
`);
|
||||
proposalPlaceholder.replaceWith(propWrapper);
|
||||
const propContainer = propWrapper.querySelector("#propInlineContainer");
|
||||
Proposals.mountManager(propContainer, clientKey, client.client_tg_id || "")
|
||||
.catch(() => {
|
||||
propContainer.innerHTML = `<div class="prop-muted" style="padding:10px 0;">Не удалось загрузить подборку.</div>`;
|
||||
});
|
||||
} else {
|
||||
proposalPlaceholder.remove();
|
||||
}
|
||||
|
||||
// (управление перенесено наверх — сразу под шапку)
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
<script src="assets/podbor.config.js?v=20260516h"></script>
|
||||
<script src="assets/podbor.picts.js?v=20260516h"></script>
|
||||
<script src="assets/podbor.js?v=20260517d"></script>
|
||||
<script src="assets/clients.js?v=20260517d"></script>
|
||||
<script src="assets/clients.js?v=20260518a"></script>
|
||||
<script src="assets/zamer-picts.js?v=20260516h"></script>
|
||||
<script src="assets/measurements.js?v=20260517d"></script>
|
||||
<script src="assets/request.js?v=20260517d"></script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user