mirror of
https://github.com/wasrusgen/zov-tech.git
synced 2026-06-03 17:04:48 +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) {
|
async function renderClientHistory(clientKey) {
|
||||||
root.innerHTML = "";
|
root.innerHTML = "";
|
||||||
root.appendChild(headerEl("История подборов", "#/clients"));
|
root.appendChild(headerEl("Карточка клиента", "#/clients"));
|
||||||
|
|
||||||
// Берём из кеша если есть
|
// Берём из кеша если есть
|
||||||
let clients = clientsCache?.clients;
|
let clients = clientsCache?.clients;
|
||||||
@ -734,27 +734,17 @@ const Clients = (function () {
|
|||||||
// Детальные списки внизу (свёрнуты)
|
// Детальные списки внизу (свёрнуты)
|
||||||
detailsPlaceholder.replaceWith(renderClientDetails(client, myMeasurements));
|
detailsPlaceholder.replaceWith(renderClientDetails(client, myMeasurements));
|
||||||
|
|
||||||
// Подбор техники (Proposals) — секция для менеджера
|
// Подбор техники — только ссылка, без инлайн-загрузки всего списка
|
||||||
if (typeof Proposals !== "undefined") {
|
const clientKeyProp = encodeURIComponent((client.client_tg_id || client.client_name || "").toLowerCase());
|
||||||
const clientKey = (client.client_tg_id || client.client_name || "").toLowerCase();
|
|
||||||
const propWrapper = el(`
|
const propWrapper = el(`
|
||||||
<div class="prop-section">
|
<div class="prop-section">
|
||||||
<div class="prop-section-head">
|
<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>
|
||||||
<div id="propInlineContainer"></div>
|
|
||||||
</div>
|
</div>
|
||||||
`);
|
`);
|
||||||
proposalPlaceholder.replaceWith(propWrapper);
|
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.config.js?v=20260516h"></script>
|
||||||
<script src="assets/podbor.picts.js?v=20260516h"></script>
|
<script src="assets/podbor.picts.js?v=20260516h"></script>
|
||||||
<script src="assets/podbor.js?v=20260517d"></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/zamer-picts.js?v=20260516h"></script>
|
||||||
<script src="assets/measurements.js?v=20260517d"></script>
|
<script src="assets/measurements.js?v=20260517d"></script>
|
||||||
<script src="assets/request.js?v=20260517d"></script>
|
<script src="assets/request.js?v=20260517d"></script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user