Subversion Repositories SmartDukaan

Rev

Rev 31841 | Rev 32663 | 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())
31833 amit.gupta 93
 
31838 amit.gupta 94
                    #set($datasets = $entry.getValue().getData().getDatasets().get(0))
30771 amit.gupta 95
                    #set($dataPoints=$datasets.getData())
96
                    #set($bgColors=$datasets.getBackgroundColor())
31838 amit.gupta 97
                    #set($labels = $entry.getValue().getData().getLabels())
30778 amit.gupta 98
                    #set($total=0)
30771 amit.gupta 99
                    #foreach($dataPoint in $dataPoints)
100
                        #set($count = $velocityCount - 1)
31840 amit.gupta 101
                        <td style="background-color: $bgColors.get($count)">
31841 amit.gupta 102
                            #if(!$dataPoint) 0 #else $dataPoint #end
31833 amit.gupta 103
                        </td>
30771 amit.gupta 104
                    #end
31833 amit.gupta 105
                #end
29966 amit.gupta 106
            </tr>
30771 amit.gupta 107
            #end
108
        </tbody>
109
    </table>
29988 amit.gupta 110
</div>
29983 amit.gupta 111
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
112
        integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
113
        crossorigin="anonymous"></script>
114
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
115
        integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
116
        crossorigin="anonymous"></script>
117
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
118
        integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
119
        crossorigin="anonymous"></script>
30036 amit.gupta 120
<script type="text/javascript">
121
    function numberToComma(x) {
29966 amit.gupta 122
 
30036 amit.gupta 123
        x = x.toString();
124
        x = x.split('.');
125
        var x1 = x[0];
126
        var x2 = x.length > 1 && x[1] != '0' ? '.' + x[1] : '';
127
        var lastThree = x1.substring(x1.length - 3);
128
        var otherNumbers = x1.substring(0, x1.length - 3);
129
        if (x1.charAt(x1.length - 4) == ',' || x1.charAt(x1.length - 4) == '-') {
130
            console.log(lastThree)
131
        } else {
132
            if (otherNumbers != '')
133
                lastThree = ',' + lastThree;
134
        }
135
        return otherNumbers.replace(/\B(?=(\d{2})+(?!\d))/g, ",") + (lastThree)
136
                + x2;
137
 
138
    }
139
 
140
    $(document).ready(function () {
141
        $('.currency').each(function (index, ele) {
142
            if (!isNaN(parseInt($(ele).html()))) {
143
                $(ele).html(numberToComma($(ele).html()));
144
            }
145
        });
146
    })
147
</script>
29966 amit.gupta 148
</body>
149
</html>