Subversion Repositories SmartDukaan

Rev

Rev 32657 | Rev 32672 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
29966 amit.gupta 1
<html lang="en">
2
<head>
29983 amit.gupta 3
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
29976 amit.gupta 4
    <meta http-equiv="refresh" content="120">
29988 amit.gupta 5
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
6
          integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
29966 amit.gupta 7
    <style>
8
        html, body {
29983 amit.gupta 9
            margin-top: 10px;
29966 amit.gupta 10
            padding: 0;
11
        }
12
 
13
 
14
        td, th {
29981 amit.gupta 15
            font-size: 20px;
29966 amit.gupta 16
        }
17
 
29988 amit.gupta 18
 
19
        .table td, .table th {
20
            padding: 0.25rem;
21
        }
22
 
30771 amit.gupta 23
        /*tr:first-child td {
29981 amit.gupta 24
            font-weight: bold;
29982 amit.gupta 25
            background-color: #00d6b2;
30771 amit.gupta 26
        }*/
29982 amit.gupta 27
 
28
        td {
29983 amit.gupta 29
            font-size: 24px;
29982 amit.gupta 30
        }
29966 amit.gupta 31
    </style>
32
    <link href="../resources/css/brand-logo.css" rel="stylesheet"/>
33
</head>
34
<body>
29994 amit.gupta 35
<div class="container-fluid">
30771 amit.gupta 36
    <table class="table table-bordered table-striped">
37
        <thead>
38
        <tr>
39
            <th rowspan="2">RBM</th>
32657 ranu 40
            <th rowspan="2">Partner Count</th>
41
            <th rowspan="2">Call Count</th>
30771 amit.gupta 42
            <th colspan="2">Collection</th>
43
            <th colspan="2">Secondary</th>
31835 amit.gupta 44
            <th colspan="5">Active</th>
45
            <th colspan="5">Low Sale</th>
46
            <th colspan="5">Disputed</th>
30771 amit.gupta 47
        </tr>
48
        <tr>
49
            <th>Target</th>
30774 amit.gupta 50
            <th>Achieved</th>
30771 amit.gupta 51
            <th>Target</th>
30774 amit.gupta 52
            <th>Achieved</th>
31833 amit.gupta 53
            <th>Plan Today</th>
54
            <th>Carry Fwd</th>
55
            <th>Untouched</th>
56
            <th>Plan Fut</th>
57
            <th>Normal</th>
58
            <th>Plan Today</th>
59
            <th>Carry Fwd</th>
60
            <th>Untouched</th>
61
            <th>Plan Fut</th>
62
            <th>Normal</th>
63
            <th>Plan Today</th>
64
            <th>Carry Fwd</th>
65
            <th>Untouched</th>
66
            <th>Plan Fut</th>
67
            <th>Normal</th>
68
 
30771 amit.gupta 69
        </tr>
70
        </thead>
71
        <tbody>
72
            #foreach($summaryModel in $summaryModels)
29966 amit.gupta 73
            <tr>
30771 amit.gupta 74
                <td>$summaryModel.getAuthName()</td>
32657 ranu 75
                #set($partnerCount = 0)
76
                #foreach($entry in $summaryModel.getChartLeadModelMap().entrySet())
77
                    #set($datasets = $entry.getValue().getData().getDatasets().get(0))
78
                    #set($dataPoints=$datasets.getData())
79
                    #set($total=0)
80
                    #foreach($dataPoint in $dataPoints)
81
                        #if($dataPoint)
82
                            #set($partnerCount = $partnerCount + $dataPoint)
83
                        #end
84
                    #end
85
                #end
86
                <td>$partnerCount</td>
30771 amit.gupta 87
                <td>$summaryModel.getPartnersCommunicated()</td>
88
                <td class="currency">$summaryModel.getCollectionTarget()</td>
89
                <td class="currency">$summaryModel.getCollection()</td>
90
                <td class="currency">$summaryModel.getSecondaryTarget()</td>
91
                <td class="currency">$summaryModel.getSecondary()</td>
31836 amit.gupta 92
                #foreach($entry in $summaryModel.getChartLeadModelMap().entrySet())
31838 amit.gupta 93
                    #set($datasets = $entry.getValue().getData().getDatasets().get(0))
30771 amit.gupta 94
                    #set($dataPoints=$datasets.getData())
95
                    #set($bgColors=$datasets.getBackgroundColor())
31838 amit.gupta 96
                    #set($labels = $entry.getValue().getData().getLabels())
30778 amit.gupta 97
                    #set($total=0)
30771 amit.gupta 98
                    #foreach($dataPoint in $dataPoints)
99
                        #set($count = $velocityCount - 1)
31840 amit.gupta 100
                        <td style="background-color: $bgColors.get($count)">
31841 amit.gupta 101
                            #if(!$dataPoint) 0 #else $dataPoint #end
31833 amit.gupta 102
                        </td>
30771 amit.gupta 103
                    #end
31833 amit.gupta 104
                #end
29966 amit.gupta 105
            </tr>
30771 amit.gupta 106
            #end
107
        </tbody>
108
    </table>
29988 amit.gupta 109
</div>
29983 amit.gupta 110
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
111
        integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
112
        crossorigin="anonymous"></script>
113
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
114
        integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
115
        crossorigin="anonymous"></script>
116
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
117
        integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
118
        crossorigin="anonymous"></script>
30036 amit.gupta 119
<script type="text/javascript">
120
    function numberToComma(x) {
29966 amit.gupta 121
 
30036 amit.gupta 122
        x = x.toString();
123
        x = x.split('.');
124
        var x1 = x[0];
125
        var x2 = x.length > 1 && x[1] != '0' ? '.' + x[1] : '';
126
        var lastThree = x1.substring(x1.length - 3);
127
        var otherNumbers = x1.substring(0, x1.length - 3);
128
        if (x1.charAt(x1.length - 4) == ',' || x1.charAt(x1.length - 4) == '-') {
129
            console.log(lastThree)
130
        } else {
131
            if (otherNumbers != '')
132
                lastThree = ',' + lastThree;
133
        }
134
        return otherNumbers.replace(/\B(?=(\d{2})+(?!\d))/g, ",") + (lastThree)
135
                + x2;
136
 
137
    }
138
 
139
    $(document).ready(function () {
140
        $('.currency').each(function (index, ele) {
141
            if (!isNaN(parseInt($(ele).html()))) {
142
                $(ele).html(numberToComma($(ele).html()));
143
            }
144
        });
145
    })
146
</script>
29966 amit.gupta 147
</body>
148
</html>