From 56f0ca2e854e684b4ff4aa8ff9ae4a1f916a6b75 Mon Sep 17 00:00:00 2001 From: Josmar Soares Trigueiro Junior Date: Thu, 26 Sep 2024 12:43:25 -0300 Subject: [PATCH] doc: update change log file --- CHANGELOG.md | 3 + store/blocks/minicart.jsonc | 118 +++++++++++++++++++++++------------- 2 files changed, 78 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59a7c4f..9f043bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added + +- `vtex.storefront-permissions-ui` dependency and `check-organization-permission` block ## [3.0.1] - 2024-10-14 diff --git a/store/blocks/minicart.jsonc b/store/blocks/minicart.jsonc index f0b7fc7..ccff151 100644 --- a/store/blocks/minicart.jsonc +++ b/store/blocks/minicart.jsonc @@ -1,36 +1,43 @@ { "minicart.v2": { - "children": ["minicart-base-content"], + "children": [ + "minicart-base-content" + ], "props": { "customPixelEventId": "add-to-cart-button", "MinicartIcon": "icon-cart#minicart-icon" } }, - "icon-cart#minicart-icon": { "props": { "size": 27, "viewBox": "0 0 27 27" } }, - "minicart-base-content": { - "blocks": ["minicart-empty-state"], - "children": ["minicart-product-list", "flex-layout.row#minicart-footer"] + "blocks": [ + "minicart-empty-state" + ], + "children": [ + "minicart-product-list", + "flex-layout.row#minicart-footer" + ] }, - "minicart-product-list": { - "blocks": ["product-list#minicart"] + "blocks": [ + "product-list#minicart" + ] }, - "product-list#minicart": { - "blocks": ["product-list-content-mobile"] + "blocks": [ + "product-list-content-mobile" + ] }, - "product-list-content-mobile": { - "children": ["flex-layout.row#cartSummary"] + "children": [ + "flex-layout.row#cartSummary" + ] }, - "flex-layout.row#cartSummary": { "children": [ "flex-layout.col#minicart-product-image", @@ -48,20 +55,19 @@ "blockClass": "cartSummary" } }, - "flex-layout.col#minicart-product-image": { - "children": ["product-list-image#minicart"], + "children": [ + "product-list-image#minicart" + ], "props": { "marginRight": 5 } }, - "product-list-image#minicart": { "props": { "width": 48 } }, - "flex-layout.col#productInfo": { "children": [ "flex-layout.row#productInfo__name", @@ -72,19 +78,22 @@ "width": "grow" } }, - "flex-layout.row#productInfo__name": { - "children": ["vtex.product-list:product-name#minicart"] + "children": [ + "vtex.product-list:product-name#minicart" + ] }, - "vtex.product-list:product-name#minicart": { "props": { "blockClass": "minicart" } }, - "flex-layout.row#bottomInfo": { - "children": ["price#mobile", "quantity-selector", "remove-button"], + "children": [ + "price#mobile", + "quantity-selector", + "remove-button" + ], "props": { "verticalAlign": "middle", "colSizing": "auto", @@ -92,18 +101,35 @@ "preserveLayoutOnMobile": "true" } }, - "flex-layout.row#minicart-footer": { "props": { "blockClass": "minicart-footer" }, - "children": ["flex-layout.col#minicart-footer"] + "children": [ + "flex-layout.col#minicart-footer" + ] }, - "flex-layout.col#minicart-footer": { - "children": ["minicart-summary", "check-permission#minicart"] + "children": [ + "minicart-summary", + "check-permission#minicart" + ] + }, + "check-organization-permission#minicart": { + "props": { + "roles": [ + "createQuote" + ] + }, + "blocks": [ + "allowed-content#create-quote" + ] + }, + "allowed-content#create-quote": { + "children": [ + "link#quote" + ] }, - "check-permission#minicart": { "props": { "roles": [ @@ -123,49 +149,57 @@ "allowed-content#minicart": { "children": [ "minicart-checkout-button", - "link#quote" + "check-organization-permission#minicart" ] }, "disallowed-content#minicart": { "children": [ - "link#quote" + "check-organization-permission#minicart" ] }, "link#quote": { "props": { "label": "Create a Quote", "displayMode": "button", - "blockClass": ["vtex-button","order-quote"], + "blockClass": [ + "vtex-button", + "order-quote" + ], "href": "/b2b-quotes/create" } }, - "minicart-summary": { - "blocks": ["checkout-summary.compact#minicart"] + "blocks": [ + "checkout-summary.compact#minicart" + ] }, - "checkout-summary.compact#minicart": { - "children": ["summary-totalizers#minicart"], + "children": [ + "summary-totalizers#minicart" + ], "props": { - "totalizersToShow": ["Items", "Discounts"] + "totalizersToShow": [ + "Items", + "Discounts" + ] } }, - "summary-totalizers#minicart": { "props": { "showTotal": true, "showDeliveryTotal": false } }, - "minicart-empty-state": { - "children": ["flex-layout.row#empty-state"] + "children": [ + "flex-layout.row#empty-state" + ] }, - "flex-layout.row#empty-state": { - "children": ["flex-layout.col#empty-state"] + "children": [ + "flex-layout.col#empty-state" + ] }, - "flex-layout.col#empty-state": { "children": [ "icon-cart#minicart-empty-state", @@ -177,7 +211,6 @@ "rowGap": 5 } }, - "icon-cart#minicart-empty-state": { "props": { "size": 64, @@ -185,10 +218,9 @@ "blockClass": "minicart-empty-state" } }, - "rich-text#minicart-default-empty-state": { "props": { "text": "Your cart is empty." } } -} +} \ No newline at end of file