Total Complexity | 3 |
Complexity/F | 1 |
Lines of Code | 36 |
Function Count | 3 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import template from './sw-promotion-v2-wizard-discount-selection.html.twig'; |
||
2 | |||
3 | const { Component } = Shopware; |
||
|
|||
4 | |||
5 | Component.extend('sw-promotion-v2-wizard-discount-selection', 'sw-wizard-page', { |
||
6 | template, |
||
7 | |||
8 | data() { |
||
9 | return { |
||
10 | value: 'basic', |
||
11 | modalTitle: this.$tc('sw-promotion-v2.detail.discount-selection.modalTitle') |
||
12 | }; |
||
13 | }, |
||
14 | |||
15 | methods: { |
||
16 | getSelectionOptions() { |
||
17 | return [{ |
||
18 | value: 'basic', |
||
19 | name: this.$tc('sw-promotion-v2.detail.discount-selection.basic.name'), |
||
20 | description: this.$tc('sw-promotion-v2.detail.discount-selection.basic.description') |
||
21 | }, { |
||
22 | value: 'buy-x-get-y', |
||
23 | name: this.$tc('sw-promotion-v2.detail.discount-selection.buy-x-get-y.name'), |
||
24 | description: this.$tc('sw-promotion-v2.detail.discount-selection.buy-x-get-y.description') |
||
25 | }, { |
||
26 | value: 'shipping-discount', |
||
27 | name: this.$tc('sw-promotion-v2.detail.discount-selection.shipping-discount.name'), |
||
28 | description: this.$tc('sw-promotion-v2.detail.discount-selection.shipping-discount.description') |
||
29 | }]; |
||
30 | }, |
||
31 | |||
32 | onChangeSelection(value) { |
||
33 | this.$emit('change-selection', value); |
||
34 | } |
||
35 | } |
||
36 | }); |
||
37 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.