Passed
Push — master ( ad4c2b...6c4379 )
by Christian
13:16 queued 11s
created

src/Administration/Resources/app/administration/src/module/sw-settings-search/component/sw-settings-search-example-modal/index.js   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 63
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 50
mnd 0
bc 0
fnc 2
dl 0
loc 63
rs 10
bpm 0
cpm 1
noi 1
c 0
b 0
f 0
1
import template from './sw-settings-search-example-modal.html.twig';
2
import './sw-settings-search-example-modal.scss';
3
4
const { Component } = Shopware;
0 ignored issues
show
Bug introduced by
The variable Shopware seems to be never declared. If this is a global, consider adding a /** global: Shopware */ comment.

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.

Loading history...
5
6
Component.register('sw-settings-search-example-modal', {
7
    template,
8
9
    data() {
10
        return {
11
            exampleResults: [
12
                {
13
                    textTitle: this.$tc('sw-settings-search.generalTab.modal.textTitle'),
14
                    textSuperProductName: this.$tc('sw-settings-search.generalTab.modal.textSuperJeans'),
15
                    scoreSuperProductName: 100,
16
                    textDescription: this.$tc('sw-settings-search.generalTab.modal.textDescription'),
17
                    textProductName: this.$tc('sw-settings-search.generalTab.modal.textFancyJeans'),
18
                    scoreProductName: 50,
19
                    textTag: this.$tc('sw-settings-search.generalTab.modal.textTag'),
20
                    textDetailName: this.$tc('sw-settings-search.generalTab.modal.textJeans'),
21
                    scoreDetail: 20,
22
                    textTotal: this.$tc('sw-settings-search.generalTab.modal.textTotal'),
23
                    scoreTotal: 170,
24
                    textProductRankedScore: this.$tc('sw-settings-search.generalTab.modal.textProductRankedFirstScore')
25
                },
26
                {
27
                    textTitle: this.$tc('sw-settings-search.generalTab.modal.textTitle'),
28
                    textSuperProductName: this.$tc('sw-settings-search.generalTab.modal.textSuperJeans'),
29
                    scoreSuperProductName: 100,
30
                    textDescription: this.$tc('sw-settings-search.generalTab.modal.textDescription'),
31
                    textProductName: this.$tc('sw-settings-search.generalTab.modal.textFancyPants'),
32
                    scoreProductName: 0,
33
                    textTag: this.$tc('sw-settings-search.generalTab.modal.textTag'),
34
                    textDetailName: this.$tc('sw-settings-search.generalTab.modal.textJeans'),
35
                    scoreDetail: 20,
36
                    textTotal: this.$tc('sw-settings-search.generalTab.modal.textTotal'),
37
                    scoreTotal: 120,
38
                    textProductRankedScore: this.$tc('sw-settings-search.generalTab.modal.textProductRankedSecondScore')
39
                },
40
                {
41
                    textTitle: this.$tc('sw-settings-search.generalTab.modal.textTitle'),
42
                    textSuperProductName: this.$tc('sw-settings-search.generalTab.modal.textSuperPants'),
43
                    scoreSuperProductName: 0,
44
                    textDescription: this.$tc('sw-settings-search.generalTab.modal.textDescription'),
45
                    textProductName: this.$tc('sw-settings-search.generalTab.modal.textFancyPants'),
46
                    scoreProductName: 0,
47
                    textTag: this.$tc('sw-settings-search.generalTab.modal.textTag'),
48
                    textDetailName: this.$tc('sw-settings-search.generalTab.modal.textJeans'),
49
                    scoreDetail: 20,
50
                    textTotal: this.$tc('sw-settings-search.generalTab.modal.textTotal'),
51
                    scoreTotal: 20,
52
                    textProductRankedScore: this.$tc('sw-settings-search.generalTab.modal.textProductRankedThirdScore')
53
                }
54
            ]
55
        };
56
    },
57
58
    methods: {
59
        closeModal() {
60
            this.$emit('modal-close');
61
        }
62
    }
63
});
64