fix: move payment colors into Оформление tab, unify reference-list cards

- Order payment colors settings now live under the Оформление
  (appearance) settings tab instead of Заказы, matching the request
  to group interface/appearance-related settings together.
- Client sources card is now full-width (wide) like the event types
  card, so both reference-list cards render with the same row width
  instead of one looking noticeably shorter than the other.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
pavlov346346-source 2026-09-22 18:48:20 +03:00
parent 3aa268907e
commit b25a2e0d0c
2 changed files with 6 additions and 6 deletions

View File

@ -4164,7 +4164,7 @@ window.SUN_LEGACY_CATALOG_V175=[];
.sun-crm-stats-table th{color:#817a94;font-size:10px;text-transform:uppercase;letter-spacing:.04em}
.sun-crm-stats-table td b{color:#241d45}
.sun-lead-settings-list{display:grid;gap:7px;margin:10px 0}
.sun-lead-settings-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px}
.sun-lead-settings-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:center}
@media(max-width:700px){.sun-crm-stats-table{font-size:10px}.sun-crm-stats-table th,.sun-crm-stats-table td{padding:7px 4px}.sun-crm-hide-mobile{display:none}}
`;document.head.appendChild(style);
@ -4197,7 +4197,7 @@ window.SUN_LEGACY_CATALOG_V175=[];
function ensureSettingsCard(){
const grid=document.querySelector('#enterprise-settings .enterprise-grid');if(!grid)return;
let card=$('sunLeadSourcesSettingsCard');
if(!card){card=document.createElement('section');card.id='sunLeadSourcesSettingsCard';card.className='enterprise-card';card.innerHTML=`<h2>Источники клиентов</h2><p class="hint">Список для поля «Узнали из» в деталях заказа. Эти данные используются в статистике.</p><div class="sun-lead-settings-list" id="sunLeadSourcesRows"></div><div class="actions"><button class="outline" id="sunLeadSourceAdd" type="button">Добавить источник</button><button class="primary" id="sunLeadSourcesSave" type="button">Сохранить список</button></div>`;
if(!card){card=document.createElement('section');card.id='sunLeadSourcesSettingsCard';card.className='enterprise-card wide';card.innerHTML=`<h2>Источники клиентов</h2><p class="hint">Список для поля «Узнали из» в деталях заказа. Эти данные используются в статистике.</p><div class="sun-lead-settings-list" id="sunLeadSourcesRows"></div><div class="actions"><button class="outline" id="sunLeadSourceAdd" type="button">Добавить источник</button><button class="primary" id="sunLeadSourcesSave" type="button">Сохранить список</button></div>`;
const eventCard=$('sunEventTypesSettingsCard');if(eventCard)eventCard.insertAdjacentElement('afterend',card);else grid.appendChild(card);
$('sunLeadSourceAdd').onclick=()=>addSourceSettingsRow('');$('sunLeadSourcesSave').onclick=()=>saveSources(qa('#sunLeadSourcesRows input').map(x=>x.value));
}
@ -5285,9 +5285,9 @@ window.SUN_LEGACY_CATALOG_V175=[];
const TAB_KEY='sunSettingsActiveTabV1';
const TABS=[
{id:'account',label:'Аккаунт',hint:'Профиль, компания, тариф, пользователи и история изменений.'},
{id:'appearance',label:'Оформление',hint:'Цвета интерфейса, боковой панели и готовые цветовые варианты.'},
{id:'appearance',label:'Оформление',hint:'Цвета интерфейса, боковой панели, готовые цветовые варианты и цвета оплаты заказов.'},
{id:'offer',label:'Предложение',hint:'Шаблон и содержимое предложения клиенту.'},
{id:'orders',label:'Заказы',hint:'Статусы заказов и цвета состояния оплаты.'},
{id:'orders',label:'Заказы',hint:'Статусы заказов.'},
{id:'references',label:'Справочники',hint:'Типы мероприятий, источники клиентов и вкладки каталога.'},
{id:'documents',label:'Документы',hint:'Реквизиты чека, QR-код и бланк заказа.'}
];
@ -5333,9 +5333,9 @@ window.SUN_LEGACY_CATALOG_V175=[];
return['account',order];
}
if(id==='sunBrandThemeSettingsCard'||/^(Цвета интерфейса|Настройки интерфейса|Оформление интерфейса)$/.test(h))return['appearance',10];
if(id==='sunOrderPaymentColorsCard'||h==='Цвета оплаты заказов')return['appearance',20];
if(id==='sunOfferTemplateSettingsCard'||h==='Шаблон предложения клиенту')return['offer',10];
if(id==='sunClientOfferSettingsCard'||h==='Настройки предложения клиенту')return['offer',20];
if(id==='sunOrderPaymentColorsCard'||h==='Цвета оплаты заказов')return['orders',10];
if(id==='sunOrderStatusFeatureCard'||h==='Статусы заказов')return['orders',20];
if(id==='sunEventTypesSettingsCard'||h==='Типы мероприятий')return['references',10];
if(id==='sunLeadSourcesSettingsCard'||h==='Источники клиентов')return['references',20];

View File

@ -8488,5 +8488,5 @@ body #sunBlankSettingsCardV3{display:none!important}
</script>
<script src="app-runtime.js?v=20260921-client-sync"></script>
<script src="app-runtime.js?v=20260922-settings-tabs-cleanup"></script>
<script src="core/single-item-pdf.js?v=20260922-single-item-pdf-v1"></script>