diff --git a/vendor/magento/module-negotiable-quote/view/frontend/web/js/view/shipping-address/address-renderer/default.js b/vendor/magento/module-negotiable-quote/view/frontend/web/js/view/shipping-address/address-renderer/default.js index 2a60e20aa6..8e52105860 100644 --- a/vendor/magento/module-negotiable-quote/view/frontend/web/js/view/shipping-address/address-renderer/default.js +++ b/vendor/magento/module-negotiable-quote/view/frontend/web/js/view/shipping-address/address-renderer/default.js @@ -4,10 +4,12 @@ */ define([ + 'jquery', 'ko', + 'underscore', 'Magento_Checkout/js/view/shipping-address/address-renderer/default', 'Magento_Checkout/js/model/quote' -], function (ko, AddressRendererView, quote) { +], function ($, ko, _, AddressRendererView, quote) { 'use strict'; return AddressRendererView.extend({ @@ -53,6 +55,32 @@ define([ }, this); return this; + }, + + /** + * Get customer attribute label + * + * @param {*} attribute + * @returns {*} + */ + getCustomAttributeLabel: function (attribute) { + var resultAttribute; + + if (typeof attribute === 'string') { + return attribute; + } + + if (attribute.label) { + return attribute.label; + } + + if (typeof this.source.get('customAttributes') !== 'undefined') { + resultAttribute = _.findWhere(this.source.get('customAttributes')[attribute['attribute_code']], { + value: attribute.value + }); + } + + return resultAttribute && resultAttribute.label || attribute.value; } }); }); diff --git a/vendor/magento/module-negotiable-quote/view/frontend/web/js/view/shipping-address/list.js b/vendor/magento/module-negotiable-quote/view/frontend/web/js/view/shipping-address/list.js index 6eb8c420b5..9d3b015f2f 100644 --- a/vendor/magento/module-negotiable-quote/view/frontend/web/js/view/shipping-address/list.js +++ b/vendor/magento/module-negotiable-quote/view/frontend/web/js/view/shipping-address/list.js @@ -17,7 +17,8 @@ define([ var defaultRendererTemplate = { parent: '${ $.$data.parentName }', name: '${ $.$data.name }', - component: 'Magento_NegotiableQuote/js/view/shipping-address/address-renderer/default' + component: 'Magento_NegotiableQuote/js/view/shipping-address/address-renderer/default', + provider: 'checkoutProvider' }; return ListView.extend({ diff --git a/vendor/magento/module-negotiable-quote/view/frontend/web/template/shipping-address/address-renderer/default.html b/vendor/magento/module-negotiable-quote/view/frontend/web/template/shipping-address/address-renderer/default.html index 02a5ce557e..61c0e15725 100644 --- a/vendor/magento/module-negotiable-quote/view/frontend/web/template/shipping-address/address-renderer/default.html +++ b/vendor/magento/module-negotiable-quote/view/frontend/web/template/shipping-address/address-renderer/default.html @@ -4,33 +4,26 @@ * See COPYING.txt for license details. */ --> -
diff --git a/vendor/magento/module-purchase-order/view/frontend/web/js/view/checkout/shipping-address/list.js b/vendor/magento/module-purchase-order/view/frontend/web/js/view/checkout/shipping-address/list.js index 1fe4acbf85..c98f97733e 100644 --- a/vendor/magento/module-purchase-order/view/frontend/web/js/view/checkout/shipping-address/list.js +++ b/vendor/magento/module-purchase-order/view/frontend/web/js/view/checkout/shipping-address/list.js @@ -18,7 +18,8 @@ define([ defaultRendererTemplate = { parent: '${ $.$data.parentName }', name: '${ $.$data.name }', - component: 'Magento_PurchaseOrder/js/view/checkout/shipping-address/address-renderer/default' + component: 'Magento_PurchaseOrder/js/view/checkout/shipping-address/address-renderer/default', + provider: 'checkoutProvider' }; return Component.extend({ diff --git a/vendor/magento/module-purchase-order/view/frontend/web/template/checkout/shipping-information/address-renderer/default.html b/vendor/magento/module-purchase-order/view/frontend/web/template/checkout/shipping-information/address-renderer/default.html index a91fc816f0..26dd7742d1 100644 --- a/vendor/magento/module-purchase-order/view/frontend/web/template/checkout/shipping-information/address-renderer/default.html +++ b/vendor/magento/module-purchase-order/view/frontend/web/template/checkout/shipping-information/address-renderer/default.html @@ -13,22 +13,7 @@