diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ba290c41..f6cb7c872 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,40 @@ # Changelog -[Unreleased changes](https://github.com/rapidez/core/compare/2.8.0...2.8.0) +[Unreleased changes](https://github.com/rapidez/core/compare/2.9.2...2.9.2) +## [2.9.2](https://github.com/rapidez/core/releases/tag/2.9.2) - 2024-09-03 + +### Fixed + +- Sliderover header button fix (#554) +- Checkout progressbar steps correct fallback (#555) + +## [2.9.1](https://github.com/rapidez/core/releases/tag/2.9.1) - 2024-08-27 + +### Fixed + +- Allow UUID's in Elasticsearch (#545) +- Don't always assume api calls return json (#544) +- Correct slideover class merging (#548) +- Correct ReCaptcha header in the GraphQL mutation component (#549) +- Correct data for the order id for the checkout-payment-saved event (#550) +- Correctly use parseInt (#551) + +## [2.9.0](https://github.com/rapidez/core/releases/tag/2.9.0) - 2024-08-16 + +### Added + +- Health check for super attributes (#535) +- Category index scopes Eventy filter (#537) + +### Changed + +- Removed the NoAttributesToSelectSpecifiedException (#543) + +### Fixed + +- Prevent price addition errors in sliders (#536) +- Always attempt to decode attribute values (#520) + ## [2.8.0](https://github.com/rapidez/core/releases/tag/2.8.0) - 2024-07-24 ### Added diff --git a/resources/css/app.css b/resources/css/app.css index 1a591add5..4bcf8b5cc 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -1,6 +1,7 @@ @import 'components/vue-slider'; @import 'components/price-slider'; @import './theme-variables.css'; +@import './components/pagination.css'; @tailwind base; @tailwind components; diff --git a/resources/css/components/pagination.css b/resources/css/components/pagination.css new file mode 100644 index 000000000..3a3803a46 --- /dev/null +++ b/resources/css/components/pagination.css @@ -0,0 +1,37 @@ +.pagination .pagination-button:first-child:nth-last-child(3), +.pagination .pagination-button:first-child:nth-last-child(3) ~ .pagination-button { + @apply hidden; +} + +.pagination { + @apply flex flex-wrap justify-center gap-x-2 !m-0 !my-6 max-md:gap-y-4; +} + +.pagination-button { + @apply !font-semibold !font-sans !border !border-border !rounded !bg-white !text-neutral !shadow; +} + +.pagination-button.active { + @apply !border !border-none !bg-primary !text-white !shadow-none; +} + +.pagination-button:first-child { + @apply !mr-auto max-md:w-full max-md:order-last; +} + +.pagination-button:last-child { + @apply !ml-auto max-md:w-full max-md:-order-1; +} + +.pagination-button:not(:first-child):not(:last-child) { + @apply !m-0 !size-14 max-md:flex-1 max-md:w-auto; +} + +.pagination-button:first-child, +.pagination-button:last-child { + @apply h-14 px-6 max-md:!m-0; +} + +.pagination-button[disabled] { + @apply opacity-60; +} diff --git a/resources/js/components/Checkout/Checkout.vue b/resources/js/components/Checkout/Checkout.vue index 88db533f5..fa2d368f8 100644 --- a/resources/js/components/Checkout/Checkout.vue +++ b/resources/js/components/Checkout/Checkout.vue @@ -231,11 +231,11 @@ export default { }, }) } - // response.data = orderId + // response = orderId this.$root.$emit('checkout-payment-saved', { order: { - id: response?.data, + id: response, payment_method_code: this.checkout.payment_method, }, }) diff --git a/resources/js/components/GraphqlMutation.vue b/resources/js/components/GraphqlMutation.vue index 3ec939426..ee3e51c11 100644 --- a/resources/js/components/GraphqlMutation.vue +++ b/resources/js/components/GraphqlMutation.vue @@ -108,7 +108,7 @@ export default { let options = { headers: {} } if (this.recaptcha) { - options['headers']['Authorization'] = await this.getReCaptchaToken() + options['headers']['X-ReCaptcha'] = await this.getReCaptchaToken() } if (this.store) { diff --git a/resources/js/components/Listing/Listing.vue b/resources/js/components/Listing/Listing.vue index 09ccdc30f..7b3b5be91 100644 --- a/resources/js/components/Listing/Listing.vue +++ b/resources/js/components/Listing/Listing.vue @@ -108,7 +108,7 @@ export default { function_score: { script_score: { script: { - source: Integer.parseInt( + source: parseInt( doc['positions.' + window.config.category.entity_id].empty ? '0' : doc['positions.' + window.config.category.entity_id + ''].value, diff --git a/resources/js/fetch.js b/resources/js/fetch.js index 3e6ba89a7..29baa11ee 100644 --- a/resources/js/fetch.js +++ b/resources/js/fetch.js @@ -59,7 +59,13 @@ export const rapidezAPI = (window.rapidezAPI = async (method, endpoint, data = { throw new FetchError(window.config.translations.errors.wrong, response) } - return await response.json() + let responseData = await response.text() + + try { + return JSON.parse(responseData) + } catch (e) { + return responseData + } }) export const magentoGraphQL = (window.magentoGraphQL = async ( diff --git a/resources/views/checkout/partials/progressbar.blade.php b/resources/views/checkout/partials/progressbar.blade.php index e86aa2325..cd9cac7ba 100644 --- a/resources/views/checkout/partials/progressbar.blade.php +++ b/resources/views/checkout/partials/progressbar.blade.php @@ -1,5 +1,5 @@