mirror of
https://github.com/wasrusgen/zashita-brandbook.git
synced 2026-06-03 17:04:47 +00:00
Pay screen: dynamic contract type subtitle from detection
This commit is contained in:
parent
5911290f13
commit
a0fd25b879
@ -922,6 +922,7 @@ function detectCtype(text) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function showResults(ctypeKey) {
|
function showResults(ctypeKey) {
|
||||||
|
_curCtypeKey = ctypeKey || 'other';
|
||||||
// спрятать предыдущие шаги на случай прямого вызова
|
// спрятать предыдущие шаги на случай прямого вызова
|
||||||
['el-step-upload','el-step-scan','el-step1'].forEach(id => {
|
['el-step-upload','el-step-scan','el-step1'].forEach(id => {
|
||||||
const el = document.getElementById(id);
|
const el = document.getElementById(id);
|
||||||
@ -1082,6 +1083,10 @@ function selectDeliv(key) {
|
|||||||
document.getElementById('p3-name').textContent = d.p3[1];
|
document.getElementById('p3-name').textContent = d.p3[1];
|
||||||
document.getElementById('p3-desc').textContent = d.p3[2];
|
document.getElementById('p3-desc').textContent = d.p3[2];
|
||||||
document.getElementById('pay-pitch').innerHTML = d.pitch;
|
document.getElementById('pay-pitch').innerHTML = d.pitch;
|
||||||
|
// субтитр: тип договора из детекции
|
||||||
|
const ct = CTYPES[_curCtypeKey] || CTYPES.other;
|
||||||
|
const ctName = ct.name.charAt(0).toUpperCase() + ct.name.slice(1);
|
||||||
|
document.getElementById('pay-sub').textContent = ct.emoji + ' ' + ctName + ' · цена под ваш случай';
|
||||||
// сбросить выбор на средний план и показать инструкции
|
// сбросить выбор на средний план и показать инструкции
|
||||||
selectPlan(2);
|
selectPlan(2);
|
||||||
go('pay');
|
go('pay');
|
||||||
@ -1186,6 +1191,7 @@ function renderCustomStats() {
|
|||||||
/* ── ПОДРОБНЫЕ ИНСТРУКЦИИ ПО ПЛАНУ ── */
|
/* ── ПОДРОБНЫЕ ИНСТРУКЦИИ ПО ПЛАНУ ── */
|
||||||
let _selDeliv = 'protocol';
|
let _selDeliv = 'protocol';
|
||||||
let _selPlan = 2;
|
let _selPlan = 2;
|
||||||
|
let _curCtypeKey = 'other';
|
||||||
|
|
||||||
const PLAN_PITCH = {
|
const PLAN_PITCH = {
|
||||||
protocol: {
|
protocol: {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user