From 5377b03a3cb697c1c1e22ecae9b93944f62f2f22 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 8 Sep 2026 03:54:39 +0000 Subject: [PATCH] Fix v17.6.6 offer picker declaration --- public/core/ux-fixes-v1764.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/core/ux-fixes-v1764.js b/public/core/ux-fixes-v1764.js index 37a5169..20216e1 100644 --- a/public/core/ux-fixes-v1764.js +++ b/public/core/ux-fixes-v1764.js @@ -168,7 +168,7 @@ function pickerHtml(){ const current=activeTemplateId();return `
Оформление PDFШаблон закрепляется за этим предложением. Миниатюра повторяет структуру PDF.
${templateList().map(t=>``).join('')}
`; } - function ensureOfferPicker(){ function ensureOfferPicker(){ + function ensureOfferPicker(){ patchOfferTemplateApi();const modal=$('sunClientOfferModal'),dialog=modal?.querySelector('.dialog');if(!dialog||!activeOfferOrderId)return false; ensureOfferTemplateStored();let box=$('sunOfferTemplateV1764'); if(!box){box=document.createElement('section');box.id='sunOfferTemplateV1764';box.className='sun-v1764-offer-template';const head=dialog.querySelector('.sun-offer-modal-head');if(head)head.insertAdjacentElement('afterend',box);else dialog.prepend(box);box.addEventListener('click',e=>{const b=e.target.closest('[data-v1764-offer-template]');if(!b)return;const id=b.dataset.v1764OfferTemplate;if(!persistOfferTemplate(activeOfferOrderId,id))return;renderOfferPicker();toast(`Оформление «${templateList().find(x=>x.id===id)?.name||id}» сохранено для этого предложения.`,'success',3200)});}