Passed
Push — master ( 490cad...87aaa1 )
by Christian
12:06 queued 10s
created

app-action-fixtures.js ➔ createRouter   A

Complexity

Conditions 1

Size

Total Lines 38
Code Lines 26

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 26
dl 0
loc 38
rs 9.256
c 0
b 0
f 0
cc 1
1
import VueRouter from 'vue-router';
2
3
export function createRouter() {
4
    return new VueRouter({
5
        routes: [{
6
            name: 'sw.product.detail',
7
            path: '/sw/product/detail/:{id}',
8
            meta: {
9
                $module: {
10
                    entity: 'product'
11
                },
12
                appSystem: {
13
                    view: 'detail'
14
                }
15
            }
16
        }, {
17
            name: 'sw.product.list',
18
            path: '/sw/product/list',
19
            meta: {
20
                $module: {
21
                    entity: 'product'
22
                },
23
                appSystem: {
24
                    view: 'list'
25
                }
26
            }
27
        }, {
28
            name: 'sw.order.detail',
29
            path: '/sw/order/detail',
30
            meta: {
31
                $module: {
32
                    entity: 'order'
33
                },
34
                appSystem: {
35
                    view: 'list'
36
                }
37
            }
38
        }]
39
    });
40
}
41
42
export const actionButtonData = [{
43
    id: Shopware.Utils.createId(),
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...
44
    action: 'addProduct',
45
    app: 'TestApp',
46
    icon: 'someBase64Icon',
47
    label: {
48
        'de-DE': 'Product hinzufügen',
49
        'en-GB': 'Add product'
50
    },
51
    openNewTab: false,
52
    url: 'http://test-url/actions/product/add'
53
}, {
54
    id: Shopware.Utils.createId(),
55
    action: 'renameProduct',
56
    app: 'TestApp',
57
    icon: 'someBase64Icon',
58
    label: {
59
        'de-DE': 'Product umbenennen',
60
        'en-GB': 'Rename product'
61
    },
62
    openNewTab: false,
63
    url: 'http://test-url/actions/product/rename'
64
}];
65