Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit c46f43d

Browse files
author
Tomasz Kostuch
authored
Merge pull request #410 from gibkigonzo/bugfix/update-1.12
Apply changes from vuestorefront/vsf-default#4
2 parents 93f4455 + fc953a3 commit c46f43d

26 files changed

+89
-66
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,20 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [1.0.1] - UNRELEASED
8+
## [1.0.2] - UNRELEASED
99

1010
### Added
1111
### Changed / Improved
1212

1313
- Update sfui version to 0.7.11
1414
- Changed the banner links to correct path (#379)
1515
- Improved the background of MegaMenu (#401)
16+
- use product/findProducts instead of product/list
17+
use category-next/fetchMenuCategories instead of category/list
18+
fix problem with changing product color - should be changed product image
19+
fix close sidebar when push esc button
20+
add cacheTags to pages
21+
remove Home page mixin - (#410)
1622

1723
## [1.0.1] - 2020.06.02
1824

components/molecules/m-login.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export default {
7575
}),
7676
switchElem (to) {
7777
this.$v.$reset();
78-
this.openModal({name: ModalList.Auth, payload: to})
78+
this.openModal({ name: ModalList.Auth, payload: to })
7979
},
8080
login () {
8181
this.$v.$touch();
@@ -103,7 +103,7 @@ export default {
103103
this.onFailure(result);
104104
} else {
105105
this.onSuccess(i18n.t('You are logged in!'));
106-
this.closeModal({name: ModalList.Auth});
106+
this.closeModal({ name: ModalList.Auth });
107107
}
108108
})
109109
.catch(err => {

components/molecules/m-menu.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default {
6666
isWebpSupported: state => state.ui.isWebpSupported
6767
}),
6868
...mapGetters({
69-
getCategories: 'category/getCategories',
69+
getCategories: 'category-next/getMenuCategories',
7070
getCurrentCategory: 'category/getCurrentCategory',
7171
getPromotedOffers: 'promoted/getPromotedOffers'
7272
}),

components/molecules/m-product-gallery.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ export default {
5353
selectThis = false
5454
}
5555
}
56-
return selectThis || (image.id && image.id.color === this.configuration.color.id)
56+
return selectThis || (image.id && image.id.color && String(image.id.color) === String(this.configuration.color.id))
5757
})
5858
5959
if (!variantImage) {
6060
variantImage = this.gallery.find(image => {
6161
return typeof image.id.color !== 'undefined' &&
6262
typeof this.configuration.color !== 'undefined' &&
63-
image.id.color === this.configuration.color.id
63+
String(image.id.color) === String(this.configuration.color.id)
6464
})
6565
}
6666

components/molecules/m-register.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export default {
7878
}),
7979
switchElem (to) {
8080
this.$v.$reset();
81-
this.openModal({name: ModalList.Auth, payload: to})
81+
this.openModal({ name: ModalList.Auth, payload: to })
8282
},
8383
register () {
8484
this.$v.$touch();
@@ -111,7 +111,7 @@ export default {
111111
password: this.password
112112
});
113113
this.onSuccess(i18n.t('You are logged in!'));
114-
this.closeModal({name: ModalList.Auth});
114+
this.closeModal({ name: ModalList.Auth });
115115
}
116116
})
117117
.catch(err => {

components/molecules/m-related-products.vue

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,18 @@ export default {
6666
}
6767
let relatedProductsQuery = prepareRelatedQuery(key, sku);
6868
69-
const response = await this.$store.dispatch('product/list', {
69+
const { items } = await this.$store.dispatch('product/findProducts', {
7070
query: relatedProductsQuery,
7171
size: 8,
72-
prefetchGroupProducts: false,
73-
updateState: false
72+
options: {
73+
populateRequestCacheTags: false,
74+
prefetchGroupProducts: false
75+
}
7476
});
75-
if (response) {
77+
if (items.length) {
7678
this.$store.dispatch('product/related', {
7779
key: this.type,
78-
items: response.items
80+
items
7981
});
8082
this.$forceUpdate();
8183
}

components/molecules/m-reset-password.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default {
5757
}),
5858
switchElem (to) {
5959
this.$v.$reset();
60-
this.openModal({name: ModalList.Auth, payload: to})
60+
this.openModal({ name: ModalList.Auth, payload: to })
6161
},
6262
resetPassword () {
6363
this.$v.$touch();

components/organisms/o-bottom-navigation.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default {
4949
return (icon) => {
5050
switch (icon) {
5151
case 'home': {
52-
const isHomepage = this.$route.name === this.localizedRoute({name: 'home', path: '/'}).name
52+
const isHomepage = this.$route.name === this.localizedRoute({ name: 'home', path: '/' }).name
5353
return isHomepage && !this.isMobileMenu && !this.isSearchPanelVisible
5454
}
5555
case 'menu': {
@@ -93,7 +93,7 @@ export default {
9393
if (this.isLoggedIn) {
9494
this.$router.push(this.localizedRoute('/my-account'))
9595
} else {
96-
this.openModal({name: ModalList.Auth, payload: 'login'})
96+
this.openModal({ name: ModalList.Auth, payload: 'login' })
9797
}
9898
},
9999
goToCart () {

components/organisms/o-footer.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ export default {
108108
{
109109
name: 'My account',
110110
...this.isLoggedIn
111-
? {link: '/my-account'}
112-
: {clickHandler: () => this.openModal({name: ModalList.Auth, payload: 'login'})}
111+
? { link: '/my-account' }
112+
: { clickHandler: () => this.openModal({ name: ModalList.Auth, payload: 'login' }) }
113113
},
114114
{ name: 'Delivery', link: '/delivery' },
115115
{ name: 'Return policy', link: '/returns' }
@@ -145,7 +145,7 @@ export default {
145145
openModal: 'openModal'
146146
}),
147147
showLanguageSwitcher () {
148-
this.openModal({name: ModalList.LanguageSwitcher})
148+
this.openModal({ name: ModalList.LanguageSwitcher })
149149
}
150150
}
151151
};

components/organisms/o-header.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ export default {
9898
isSearchPanelVisible: state => state.ui.searchpanel
9999
}),
100100
...mapState('ui', ['isMobileMenu']),
101-
...mapGetters('category', ['getCategories', 'getCurrentCategory']),
101+
...mapGetters('category', ['getCurrentCategory']),
102+
...mapGetters({
103+
getCategories: 'category-next/getMenuCategories'
104+
}),
102105
...mapGetters('user', ['isLoggedIn']),
103106
activeIcon () {
104107
return this.isLoggedIn ? 'account' : '';

0 commit comments

Comments
 (0)