Каталог файловtilda-members-store-main.js
601 house: '',602 aptoffice: '{{apt_office}}',603 entrance: '{{entrance}}',604 floor: '{{floor}}',605 entrancecode: '{{entrance_code}}',606 };607 608 const fullAddress = Object.entries(addressFields)609 .filter(([field]) => address[field])610 .map(([field, fieldText]) => `${fieldText} ${address[field]}`);611 612 if (country) {
История файла и сравнение версий
const countryCode = country.toUpperCase();
614 const countryName = countryCode === 'RU' ? 'Россия' : countryCode; 615 fullAddress.unshift(countryName); 618 if (pickupName && pickupAddress) { 619 fullAddress.push(`{{pickup_label}}: ${pickupAddress} (${pickupName})`); 624 if (fullAddress.length > 0) { 627 <div class="tmst-main__address-name" data-field="tlk-text">${name}</div> 628 <div class="tmst-main__address" data-field="tlk-text">${fullAddress.join(', ')}</div> 633 return tma__translate(html, 'store_dict'); 637 * Создает разметку для активного заказа 638 * @param {Order} order - данные заказа 639 * @param {string} [infoCustomText='{{last_order}}'] 642function tmst__main__createActiveOrderDescriptionHtml(order, infoCustomText = '{{last_order}}') { 643 const commentHtml = order.public_comment 644 ? ` <div class="tmst-main__order__comment"> 645 <h3 class="tmst-main__order__comment-title">${tma__translate('{{comment}}', 'store_dict')}</h3> 646 <div class="tmst-main__order__comment-text"> 647 ${tmst__linkifyText(order.public_comment)} 653 <div class="tmst-main__order__item"> 654 <div class="tmst-main__order__header"> 655 <div class="tmst-main__order__info" data-field="tlk-text"> 656 ${tma__translate(infoCustomText, 'store_dict')}: №${order.formsref} ${tmst__main__createOrderDateTimeHtml(order.created)} 658 <div class="tmst-main__order__statuses"> 659 ${tmst__createStatusHtml(order.status)} 660 ${tmst__createPaymentStatusHtml(order.paystatus, order.status)} 663 <div class="tmst-main__order__details"> 664 ${order.products_count > 1 ? tmst__createProductImagesHtml(order.products, order.products_count) : tmst__createProductDetailHtml(order.products[0])} 665 <div class="tmst-main__order__price" data-field="tlk-text"> 666 ${tmst__formatPrice(order.amount_total, order.currency)} 675 * Создаёт HTML-код для отображения даты и времени в строке 677 * @param {string} dateTimeString - Строка с датой 679function tmst__main__createOrderDateTimeHtml(dateTimeString) { 681 <time class="tmst-main__date"> 682 ${tmst__formatDate(dateTimeString, 'date')} 688 * Маскирует email, заменяя часть имени и домен второго уровня на `***`. 690 * @param {string} email 693function tmst__main__maskEmail(email) { 694 if (!email) return ''; 696 const [local, domain] = email.split('@'); 697 if (!domain || !local) return email; // Проверка на корректность email 699 // Маскируем локальную часть (до @)