@riosst100/pwa-marketplace 3.0.0 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/i18n/en_US.json +1 -1
- package/i18n/id_ID.json +1 -1
- package/package.json +1 -1
- package/src/componentOverrideMapping.js +2 -0
- package/src/components/CheckoutHeader/checkoutHeader.js +162 -0
- package/src/components/CheckoutHeader/checkoutHeader.module.css +171 -0
- package/src/components/CheckoutHeader/index.js +1 -0
- package/src/components/FavoriteSeller/AddToListButton/addToListButton.module.css +2 -2
- package/src/components/FilterTop/FilterBlockList/filterTopItem.module.css +2 -0
- package/src/components/OrderDetail/components/itemsOrdered.js +6 -1
- package/src/components/RMAPage/components/productItem.css +15 -0
- package/src/components/RMAPage/components/productItem.js +43 -13
- package/src/components/RMAPage/components/productItem.module.css +15 -0
- package/src/components/SellerCoupon/index.js +1 -0
- package/src/components/SellerCoupon/sellerCoupon.js +84 -0
- package/src/components/SellerCoupon/sellerCoupon.module.css +110 -0
- package/src/components/SellerCoupon/sellerCouponCheckout.js +147 -0
- package/src/components/SellerCoupon/sellerCouponCheckout.module.css +85 -0
- package/src/components/SellerDetail/sellerDetail.js +10 -2
- package/src/components/SellerProducts/sellerProducts.js +4 -2
- package/src/overwrites/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.js +10 -1
- package/src/overwrites/peregrine/lib/talons/CartPage/useCartPage.js +121 -0
- package/src/overwrites/peregrine/lib/talons/CheckoutPage/checkoutPage.extended.gql.js +17 -1
- package/src/overwrites/peregrine/lib/talons/Header/useCartTrigger.js +82 -0
- package/src/overwrites/peregrine/lib/talons/ProductFullDetail/useProductFullDetail.js +17 -1
- package/src/overwrites/venia-ui/lib/components/Breadcrumbs/breadcrumbs.js +11 -11
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceSummary/priceSummary.js +24 -6
- package/src/overwrites/venia-ui/lib/components/CartPage/ProductListing/productListing.js +6 -2
- package/src/overwrites/venia-ui/lib/components/CartPage/ProductListingBySeller/productListingBySeller.js +3 -1
- package/src/overwrites/venia-ui/lib/components/CartPage/cartPage.js +20 -4
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/OrderSummary/orderSummary.js +1 -1
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/paymentInformation.js +1 -1
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/paymentMethods.js +1 -1
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PriceAdjustments/priceAdjustments.js +74 -6
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingInformation/shippingInformation.js +3 -3
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/checkoutPage.js +53 -2
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/checkoutPage.module.css +1 -1
- package/src/overwrites/venia-ui/lib/components/FilterModal/FilterList/filterItemRadio.js +1 -2
- package/src/overwrites/venia-ui/lib/components/FilterModal/FilterList/filterItemRadioGroup.js +10 -27
- package/src/overwrites/venia-ui/lib/components/FilterModal/FilterList/subFilterItemRadioGroup.js +1 -1
- package/src/overwrites/venia-ui/lib/components/Footer/footer.js +14 -4
- package/src/overwrites/venia-ui/lib/components/Footer/footer.module.css +16 -4
- package/src/overwrites/venia-ui/lib/components/Gallery/item.js +9 -8
- package/src/overwrites/venia-ui/lib/components/Header/accountTrigger.js +3 -3
- package/src/overwrites/venia-ui/lib/components/Header/cartTrigger.js +9 -6
- package/src/overwrites/venia-ui/lib/components/Header/cartTrigger.module.css +1 -1
- package/src/overwrites/venia-ui/lib/components/Header/header.js +2 -0
- package/src/overwrites/venia-ui/lib/components/Header/wishlistTrigger.js +4 -4
- package/src/overwrites/venia-ui/lib/components/Main/main.js +9 -4
- package/src/overwrites/venia-ui/lib/components/Main/main.module.css +2 -2
- package/src/overwrites/venia-ui/lib/components/ProductFullDetail/productFullDetail.js +100 -72
- package/src/overwrites/venia-ui/lib/components/ToastContainer/toast.module.css +3 -3
- package/src/talons/Header/useCartTrigger.js +82 -0
- package/src/talons/Seller/seller.gql.js +42 -1
- package/src/talons/Seller/useSeller.js +25 -2
|
@@ -162,7 +162,48 @@ export const GET_SELLER_DETAIL_QUERY = gql`
|
|
|
162
162
|
}
|
|
163
163
|
`;
|
|
164
164
|
|
|
165
|
+
export const GET_COUPON_CODE_QUERY = gql`
|
|
166
|
+
query getSellerCoupons(
|
|
167
|
+
$sellerUrl: String!
|
|
168
|
+
$pageSize: Int
|
|
169
|
+
$currentPage: Int
|
|
170
|
+
$filters: CouponCodeFilterInput
|
|
171
|
+
) {
|
|
172
|
+
sellerCoupons(
|
|
173
|
+
sellerUrl: $sellerUrl
|
|
174
|
+
pageSize: $pageSize
|
|
175
|
+
currentPage: $currentPage
|
|
176
|
+
filters: $filters
|
|
177
|
+
) {
|
|
178
|
+
items {
|
|
179
|
+
code
|
|
180
|
+
coupon_id
|
|
181
|
+
couponcode_id
|
|
182
|
+
created_at
|
|
183
|
+
description
|
|
184
|
+
discount_amount
|
|
185
|
+
expiration_date
|
|
186
|
+
from_date
|
|
187
|
+
is_active
|
|
188
|
+
name
|
|
189
|
+
seller_id
|
|
190
|
+
times_used
|
|
191
|
+
to_date
|
|
192
|
+
type
|
|
193
|
+
uses_per_customer
|
|
194
|
+
}
|
|
195
|
+
page_info {
|
|
196
|
+
current_page
|
|
197
|
+
page_size
|
|
198
|
+
total_pages
|
|
199
|
+
}
|
|
200
|
+
total_count
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
`;
|
|
204
|
+
|
|
165
205
|
export default {
|
|
166
206
|
getStoreConfigData: GET_STORE_CONFIG_DATA,
|
|
167
|
-
getSellerDetailQuery: GET_SELLER_DETAIL_QUERY
|
|
207
|
+
getSellerDetailQuery: GET_SELLER_DETAIL_QUERY,
|
|
208
|
+
getCouponCodeQuery: GET_COUPON_CODE_QUERY,
|
|
168
209
|
};
|
|
@@ -13,7 +13,7 @@ export const useSeller = props => {
|
|
|
13
13
|
const { formatMessage } = useIntl();
|
|
14
14
|
|
|
15
15
|
const operations = mergeOperations(DEFAULT_OPERATIONS, props.operations);
|
|
16
|
-
const { getStoreConfigData, getSellerDetailQuery } = operations;
|
|
16
|
+
const { getStoreConfigData, getSellerDetailQuery, getCouponCodeQuery } = operations;
|
|
17
17
|
const { pathname } = useLocation();
|
|
18
18
|
const [
|
|
19
19
|
,
|
|
@@ -45,6 +45,26 @@ export const useSeller = props => {
|
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
|
|
48
|
+
const {
|
|
49
|
+
data: couponData,
|
|
50
|
+
error: couponError,
|
|
51
|
+
loading: couponLoading
|
|
52
|
+
} = useQuery(getCouponCodeQuery, {
|
|
53
|
+
fetchPolicy: 'cache-and-network',
|
|
54
|
+
nextFetchPolicy: 'cache-first',
|
|
55
|
+
variables: {
|
|
56
|
+
sellerUrl: urlKey,
|
|
57
|
+
pageSize: 20,
|
|
58
|
+
currentPage: 1,
|
|
59
|
+
filters: {
|
|
60
|
+
is_public: {
|
|
61
|
+
eq: '1'
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
skip: !urlKey
|
|
66
|
+
});
|
|
67
|
+
|
|
48
68
|
const isBackgroundLoading = !!data && loading;
|
|
49
69
|
|
|
50
70
|
const seller = useMemo(() => {
|
|
@@ -84,6 +104,9 @@ export const useSeller = props => {
|
|
|
84
104
|
error,
|
|
85
105
|
loading,
|
|
86
106
|
seller,
|
|
87
|
-
favoriteSellerButtonProps
|
|
107
|
+
favoriteSellerButtonProps,
|
|
108
|
+
couponData,
|
|
109
|
+
couponError,
|
|
110
|
+
couponLoading
|
|
88
111
|
};
|
|
89
112
|
};
|