From e61c994783ad362e8023fc1dde07f95d17eedbec Mon Sep 17 00:00:00 2001 From: ashrithapradeep <46500357+ashrithapradeep@users.noreply.github.com> Date: Tue, 6 Dec 2022 13:36:59 +0530 Subject: [PATCH] Showing Gift and Booking Cards only when the corresponding plugins are Active (#46) * Modified address details sent while country with no state is selected * Update StoreAddress.js * Update StoreAddress.js * Showing Gift and Booking Cards only when the corresponding plugins are Active * Update StoreAddress.scss * Update StoreAddress.scss Co-authored-by: Ashritha --- build/index.asset.php | 2 +- src/configs/ManageProducts.config.js | 6 +++--- src/sections/StoreAddress.scss | 7 ------- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/build/index.asset.php b/build/index.asset.php index d279e5c0..030f3121 100644 --- a/build/index.asset.php +++ b/build/index.asset.php @@ -1 +1 @@ - array('react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'e64a96a1c2453107b2bf'); + array('react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '0b6dd263ab6019cd56d0'); diff --git a/src/configs/ManageProducts.config.js b/src/configs/ManageProducts.config.js index 8c019330..013ec71a 100644 --- a/src/configs/ManageProducts.config.js +++ b/src/configs/ManageProducts.config.js @@ -80,7 +80,7 @@ const ManageProducts = (plugins) => [ { Card: StandardCard, shouldRender: (state) => - plugins?.status.yith_woocommerce_gift_cards_panel !== "Not Installed" && + plugins?.status.yith_woocommerce_gift_cards_panel === "Active" && state?.hasUsedPlugin === false, title: "create_gift_card", assets: (state) => ({ Icon: GiftCardIcon }), @@ -110,7 +110,7 @@ const ManageProducts = (plugins) => [ { Card: MultipleActionsCard, shouldRender: (state) => - plugins?.status.yith_woocommerce_gift_cards_panel !== "Not Installed" && + plugins?.status.yith_woocommerce_gift_cards_panel === "Active" && state?.hasAddedGiftCards === true, title: "manage_gift_card", assets: (state) => ({ Icon: GiftCardIcon }), @@ -147,7 +147,7 @@ const ManageProducts = (plugins) => [ { Card: StandardCard, shouldRender: () => - plugins?.status.nfd_slug_yith_woocommerce_booking !== "Not Installed", + plugins?.status.nfd_slug_yith_woocommerce_booking === "Active", title: "nfd_slug_yith_woocommerce_booking", assets: (state) => ({ Icon: BookingIcon }), text: (state) => ({ diff --git a/src/sections/StoreAddress.scss b/src/sections/StoreAddress.scss index fdb23e2e..79610869 100644 --- a/src/sections/StoreAddress.scss +++ b/src/sections/StoreAddress.scss @@ -47,13 +47,6 @@ div.nfd-ecommerce-store-address-form { } } - @media (max-width: 960px) { - input, - select { - width: 300px; - } - } - @media (max-width: 780px) { grid-template-columns: auto; padding: 0 24px 76px;