Test Setup Failed
Push — master ( 982d9a...a2862f )
by
unknown
03:40
created

AccountContactComponent   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
define(function(require) {
2
    'use strict';
3
4
    var AccountContactComponent;
5
    var MultipleEntityComponent = require('oroform/js/multiple-entity/component');
6
    var nameFormatter = require('orolocale/js/formatter/name');
7
8
    AccountContactComponent = MultipleEntityComponent.extend({
9
        /**
10
         * @inheritDoc
11
         */
12
        constructor: function AccountContactComponent() {
13
            AccountContactComponent.__super__.constructor.apply(this, arguments);
14
        },
15
16
        _getLabel: function(model) {
17
            return nameFormatter.format(model.toJSON());
18
        },
19
20
        _getExtraData: function(model) {
21
            return [
22
                {
23
                    label: 'Phone',
24
                    value: model.get('primaryPhone')
25
                },
26
                {
27
                    label: 'Email',
28
                    value: model.get('primaryEmail')
29
                }
30
            ];
31
        }
32
    });
33
34
    return AccountContactComponent;
35
});
36