Skip to content

Commit 37c2849

Browse files
authored
Merge pull request #34 from vuestorefront-community/dev
Release v1.5.1
2 parents 7849dc8 + 39c8136 commit 37c2849

13 files changed

+119
-120
lines changed

components/CartSidebar.vue

+12-12
Original file line numberDiff line numberDiff line change
@@ -143,20 +143,20 @@ import {
143143
SfProperty,
144144
SfPrice,
145145
SfCollectedProduct,
146-
SfImage,
147-
} from "@storefront-ui/vue";
148-
import { computed } from "@nuxtjs/composition-api";
146+
SfImage
147+
} from '@storefront-ui/vue';
148+
import { computed } from '@nuxtjs/composition-api';
149149
import {
150150
useCart,
151151
useUser,
152152
cartGetters,
153-
useWishlist,
154-
} from "@vue-storefront/odoo";
155-
import { useUiState } from "~/composables";
156-
import { onSSR } from "@vue-storefront/core";
153+
useWishlist
154+
} from '@vue-storefront/odoo';
155+
import { useUiState } from '~/composables';
156+
import { onSSR } from '@vue-storefront/core';
157157
158158
export default {
159-
name: "Cart",
159+
name: 'Cart',
160160
components: {
161161
SfSidebar,
162162
SfButton,
@@ -165,7 +165,7 @@ export default {
165165
SfProperty,
166166
SfPrice,
167167
SfCollectedProduct,
168-
SfImage,
168+
SfImage
169169
},
170170
setup() {
171171
const { isCartSidebarOpen, toggleCartSidebar } = useUiState();
@@ -181,7 +181,7 @@ export default {
181181
182182
const addProductToWishList = (product) => {
183183
addItemToWishlist({
184-
product: { ...product.product, firstVariant: product.product.id },
184+
product: { ...product.product, firstVariant: product.product.id }
185185
});
186186
};
187187
@@ -195,9 +195,9 @@ export default {
195195
totals,
196196
totalItems,
197197
cartGetters,
198-
addProductToWishList,
198+
addProductToWishList
199199
};
200-
},
200+
}
201201
};
202202
</script>
203203

components/Checkout/AdyenDirectPaymentProvider.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,21 @@ export default {
3838
const router = useRouter();
3939
const dropinDivElement = ref(null);
4040
const loading = ref(false);
41-
const loadingMakePayment = ref(false);
4241
const { send } = useUiNotification();
4342
const { getPaymentConfirmation } = usePayment('');
4443
4544
const {
4645
openAdyenTransaction,
4746
getAdyenAcquirerInfo,
4847
getAdyenPaymentMethods,
49-
getAdyenPaymentDetails,
5048
paymentMethods,
5149
acquirerInfo,
5250
adyenMakeDirectPayment,
5351
transaction
5452
} = useAdyenDirectPayment(props.provider.id, props.cart?.order?.id);
5553
5654
onMounted(async () => {
55+
// eslint-disable-next-line global-require
5756
const AdyenCheckout = require('@adyen/adyen-web');
5857
5958
loading.value = true;

components/Core/Atoms/OdooButton.vue

+13-13
Original file line numberDiff line numberDiff line change
@@ -16,47 +16,47 @@ import {
1616
defineComponent,
1717
PropType,
1818
ComputedRef,
19-
computed,
19+
computed
2020
} from '@nuxtjs/composition-api';
2121
import {
2222
ButtonColor,
2323
ButtonShape,
2424
ButtonSize,
25-
ButtonType,
25+
ButtonType
2626
} from '@vue-storefront/odoo-api';
2727
export default defineComponent({
2828
components: {
29-
SfButton,
29+
SfButton
3030
},
3131
props: {
3232
disabled: {
3333
type: Boolean,
34-
default: false,
34+
default: false
3535
},
3636
loading: {
3737
type: Boolean,
38-
default: false,
38+
default: false
3939
},
4040
link: {
4141
type: [String, Object],
42-
default: null,
42+
default: null
4343
},
4444
styleType: {
4545
type: String as PropType<ButtonType>,
46-
default: ButtonType.Primary,
46+
default: ButtonType.Primary
4747
},
4848
shape: {
4949
type: String as PropType<ButtonShape>,
50-
default: ButtonShape.Round,
50+
default: ButtonShape.Round
5151
},
5252
size: {
5353
type: String as PropType<ButtonSize>,
54-
default: ButtonSize.Small,
54+
default: ButtonSize.Small
5555
},
5656
color: {
5757
type: String as PropType<ButtonColor>,
58-
default: ButtonColor.Green,
59-
},
58+
default: ButtonColor.Green
59+
}
6060
},
6161
emits: ['click'],
6262
setup(props) {
@@ -107,9 +107,9 @@ export default defineComponent({
107107
);
108108
109109
return {
110-
classes,
110+
classes
111111
};
112-
},
112+
}
113113
});
114114
</script>
115115

components/LoginModal.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ import {
284284
SfAlert,
285285
SfBar
286286
} from '@storefront-ui/vue';
287-
import { ValidationProvider, ValidationObserver, extend } from 'vee-validate';
287+
import { ValidationProvider, ValidationObserver } from 'vee-validate';
288288
import { useUser, usePassword } from '@vue-storefront/odoo';
289289
import { useUiState } from '~/composables';
290290
@@ -365,13 +365,13 @@ export default {
365365
366366
const handleRegister = async () => handleForm(register, form.value)();
367367
368-
const handleLogin = async () => {
368+
const handleLogin = async () => {
369369
await handleForm(login, {
370370
username: form.value.email,
371371
password: form.value.password
372372
})();
373373
374-
if(!error.value.login) {
374+
if (!error.value.login) {
375375
send({
376376
message: 'You are logged in. Welcome!',
377377
type: 'success'

components/MyAccount/ProfileUpdateForm.vue

+7-7
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default defineComponent({
7777
SfInput,
7878
SfModal,
7979
ValidationProvider,
80-
ValidationObserver,
80+
ValidationObserver
8181
},
8282
emits: ['submit'],
8383
setup(_, { root }) {
@@ -90,7 +90,7 @@ export default defineComponent({
9090
9191
const resetForm = () => ({
9292
name: userGetters.getFirstName(user.value) || '',
93-
email: userGetters.getEmailAddress(user.value) || '',
93+
email: userGetters.getEmailAddress(user.value) || ''
9494
});
9595
const form = ref(resetForm());
9696
@@ -101,16 +101,16 @@ export default defineComponent({
101101
user: {
102102
...user,
103103
name: form.value.name,
104-
email: form.value.email,
105-
},
104+
email: form.value.email
105+
}
106106
});
107107
108108
form.value = resetForm();
109109
requirePassword.value = false;
110110
currentPassword.value = '';
111111
send({
112112
message: root.$t('Successfull update!'),
113-
type: 'success',
113+
type: 'success'
114114
});
115115
} catch (e) {
116116
form.value = resetForm();
@@ -129,9 +129,9 @@ export default defineComponent({
129129
user,
130130
requirePassword,
131131
currentPassword,
132-
form,
132+
form
133133
};
134-
},
134+
}
135135
});
136136
</script>
137137
<style lang="scss" scoped>

components/MyAccount/ShippingAddressForm.vue

+1-3
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,13 @@
172172
<script>
173173
import { SfInput, SfButton, SfSelect, SfCheckbox } from '@storefront-ui/vue';
174174
import { useCountrySearch, useShipping } from '@vue-storefront/odoo';
175-
import { Address } from '@vue-storefront/odoo-api';
176175
import { useUiNotification } from '~/composables';
177176
import { ValidationProvider, ValidationObserver } from 'vee-validate';
178177
import {
179178
reactive,
180179
watch,
181180
defineComponent,
182-
onMounted,
183-
PropType
181+
onMounted
184182
} from '@nuxtjs/composition-api';
185183
export default defineComponent({
186184
name: 'AddressForm',

components/MyAccount/ShippingList.vue

+7-7
Original file line numberDiff line numberDiff line change
@@ -57,26 +57,26 @@ import { useUiNotification } from '~/composables';
5757
export default defineComponent({
5858
components: {
5959
SfIcon,
60-
SfLoader,
60+
SfLoader
6161
},
6262
props: {
6363
addresses: {
6464
type: Array as PropType<Address[]>,
65-
default: [],
66-
},
65+
default: []
66+
}
6767
},
6868
setup({}, { emit }) {
6969
const { deleteAddress, loading } = useUserShipping();
7070
const { send } = useUiNotification();
7171
7272
const handleDeleteAddress = async (shipping: Address) => {
7373
await deleteAddress({
74-
address: { id: shipping.id },
74+
address: { id: shipping.id }
7575
});
7676
7777
send({
7878
message: 'Successfully deleted!',
79-
type: 'info',
79+
type: 'info'
8080
});
8181
};
8282
@@ -87,9 +87,9 @@ export default defineComponent({
8787
return {
8888
handleChangeAddress,
8989
handleDeleteAddress,
90-
loading,
90+
loading
9191
};
92-
},
92+
}
9393
});
9494
</script>
9595
<style scoped lang="scss">

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@vue-storefront/middleware": "2.7.5",
4343
"@vue-storefront/nuxt": "2.7.5",
4444
"@vue-storefront/nuxt-theme": "2.7.5",
45-
"@vue-storefront/odoo": "1.5.0",
45+
"@vue-storefront/odoo": "1.5.1",
4646
"@vue-storefront/redis-cache": "^1.0.1",
4747
"cookie-universal-nuxt": "^2.1.3",
4848
"core-js": "^2.6.5",

pages/Cart.vue

+25-25
Original file line numberDiff line numberDiff line change
@@ -211,29 +211,29 @@ import {
211211
SfProperty,
212212
SfHeading,
213213
SfBreadcrumbs,
214-
SfOrderSummary,
215-
} from "@storefront-ui/vue";
216-
import { ref } from "@nuxtjs/composition-api";
217-
import { computed } from "@nuxtjs/composition-api";
214+
SfOrderSummary
215+
} from '@storefront-ui/vue';
216+
import { ref } from '@nuxtjs/composition-api';
217+
import { computed } from '@nuxtjs/composition-api';
218218
import {
219219
useCart,
220220
useUser,
221221
cartGetters,
222-
useWishlist,
223-
} from "@vue-storefront/odoo";
224-
import { useUiState } from "~/composables";
225-
import { onSSR } from "@vue-storefront/core";
222+
useWishlist
223+
} from '@vue-storefront/odoo';
224+
import { useUiState } from '~/composables';
225+
import { onSSR } from '@vue-storefront/core';
226226
227227
export default {
228-
name: "DetailedCart",
228+
name: 'DetailedCart',
229229
components: {
230230
SfCollectedProduct,
231231
SfBreadcrumbs,
232232
SfImage,
233233
SfButton,
234234
SfHeading,
235235
SfProperty,
236-
SfOrderSummary,
236+
SfOrderSummary
237237
},
238238
setup(_, { root }) {
239239
// simple test submodule 3
@@ -248,7 +248,7 @@ export default {
248248
249249
const addProductToWishList = (product) => {
250250
addItemToWishlist({
251-
product: { ...product.product, firstVariant: product.product.id },
251+
product: { ...product.product, firstVariant: product.product.id }
252252
});
253253
};
254254
@@ -257,27 +257,27 @@ export default {
257257
});
258258
const summary = ref([
259259
{
260-
name: "Products",
261-
value: totalItems,
260+
name: 'Products',
261+
value: totalItems
262262
},
263263
{
264-
name: "Sub Total",
265-
value: totals,
264+
name: 'Sub Total',
265+
value: totals
266266
},
267267
{
268-
name: "Shipping",
269-
value: "Free",
270-
},
268+
name: 'Shipping',
269+
value: 'Free'
270+
}
271271
]);
272272
const breadcrumbs = [
273273
{
274-
text: root.$t("Home"),
275-
link: "/",
274+
text: root.$t('Home'),
275+
link: '/'
276276
},
277277
{
278-
text: root.$t("Cart"),
279-
link: "#",
280-
},
278+
text: root.$t('Cart'),
279+
link: '#'
280+
}
281281
];
282282
283283
return {
@@ -292,9 +292,9 @@ export default {
292292
totalItems,
293293
summary,
294294
cartGetters,
295-
addProductToWishList,
295+
addProductToWishList
296296
};
297-
},
297+
}
298298
};
299299
</script>
300300
<style lang="scss" scoped>

0 commit comments

Comments
 (0)