Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/sale/checkout/view/property/src/ |
Upload File : |
import { BitrixVue } from 'ui.vue'; import { Type } from 'main.core'; import { Property as Const } from 'sale.checkout.const'; BitrixVue.component('sale-checkout-view-property-list_view', { props: ['items', 'number', 'propertyVariants'], computed: { localize() { return Object.freeze( BitrixVue.getFilteredPhrases('CHECKOUT_VIEW_PROPERTY_LIST_VIEW_')) }, getTitle() { let message = this.localize.CHECKOUT_VIEW_PROPERTY_LIST_VIEW_ORDER_TITLE; return message.replace('#ORDER_NUMBER#', this.number); }, getPropertiesShort() { const properties = []; for (let propertyId in this.items) { if (Type.isStringFilled(this.items[propertyId].value)) { properties.push(this.items[propertyId].value); } } return properties.join(', '); }, }, methods: { resolveValue(item) { if (item.type === Const.type.checkbox) { return item.value === 'Y' ? this.localize.CHECKOUT_VIEW_PROPERTY_LIST_VIEW_CHECKBOX_Y : this.localize.CHECKOUT_VIEW_PROPERTY_LIST_VIEW_CHECKBOX_N } else if (item.type === Const.type.enum) { return this.propertyVariants.find(variant => variant.value === item.value && variant.propertyId === item.id).name } return item.value; } }, template: ` <div class="checkout-basket-section"> <h2 class="checkout-basket-title">{{localize.CHECKOUT_VIEW_PROPERTY_LIST_VIEW_PROPERTIES}}</h2> <div class="checkout-item-personal-order-info"> <div class="checkout-item-personal-order-payment"> <div v-for="(item, index) in items" :key="index">{{item.name}}: <b>{{resolveValue(item)}}</b></div> <!-- <div>{{getPropertiesShort}}</div>--> </div> <!-- <div class="checkout-item-personal-order-shipping">--> <!-- <strong>{{localize.CHECKOUT_VIEW_PROPERTY_LIST_VIEW_SHIPPING_METHOD}}</strong>--> <!-- <div>{{localize.CHECKOUT_VIEW_PROPERTY_LIST_VIEW_SHIPPING_METHOD_DESCRIPTION}}</div>--> <!-- </div>--> </div> </div> ` });