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

OpportunityCardView   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 OpportunityCardView;
5
    var CardView = require('orodatagrid/js/app/views/board/card-view');
6
    var multiCurrencyFormatter = require('orocurrency/js/formatter/multi-currency');
7
8
    OpportunityCardView = CardView.extend({
9
        className: 'opportunity-card-view card-view',
10
        template: require('tpl!../../../../templates/board/opportunity-card-view.html'),
11
12
        /**
13
         * @inheritDoc
14
         */
15
        constructor: function OpportunityCardView() {
16
            OpportunityCardView.__super__.constructor.apply(this, arguments);
17
        },
18
19
        getTemplateData: function() {
20
            var data = OpportunityCardView.__super__.getTemplateData.call(this, arguments);
21
            var budgetAmount = multiCurrencyFormatter.unformatMultiCurrency(data.budgetAmount);
22
            data.budgetAmount = budgetAmount.amount;
23
            data.budgetCurrency = budgetAmount.currency;
24
            return data;
25
        }
26
    });
27
28
    return OpportunityCardView;
29
});
30