Subversion Repositories SmartDukaan

Rev

Rev 30038 | Rev 30774 | 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>
40
            <th rowspan="2">Count</th>
41
            <th colspan="2">Collection</th>
42
            <th colspan="2">Secondary</th>
43
            <th rowspan="2" style="width: 60%">Partner Status</th>
44
        </tr>
45
        <tr>
46
            <th>Target</th>
47
            <th>Acieved</th>
48
            <th>Target</th>
49
            <th>Acieved</th>
50
        </tr>
51
        </thead>
52
        <tbody>
53
            #foreach($summaryModel in $summaryModels)
29966 amit.gupta 54
            <tr>
30771 amit.gupta 55
                <td>$summaryModel.getAuthName()</td>
56
                <td>$summaryModel.getPartnersCommunicated()</td>
57
                <td class="currency">$summaryModel.getCollectionTarget()</td>
58
                <td class="currency">$summaryModel.getCollection()</td>
59
                <td class="currency">$summaryModel.getSecondaryTarget()</td>
60
                <td class="currency">$summaryModel.getSecondary()</td>
61
                <td>
62
                    #set($datasets = $summaryModel.getChartLeadModel().getData().getDatasets().get(0))
63
                    #set($dataPoints=$datasets.getData())
64
                    #set($bgColors=$datasets.getBackgroundColor())
65
                    #set($labels = $summaryModel.getChartLeadModel().getData().getLabels())
66
                    #foreach($dataPoint in $dataPoints)
67
                        #set($count = $velocityCount - 1)
68
                        <span style="background-color: $bgColors.get($count)">$labels.get($count)
69
                            - #if($dataPoint) $dataPoint #else 0#end</span>
70
                    #end
71
                </td>
29966 amit.gupta 72
            </tr>
30771 amit.gupta 73
            #end
74
        </tbody>
75
    </table>
29988 amit.gupta 76
</div>
29983 amit.gupta 77
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
78
        integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
79
        crossorigin="anonymous"></script>
80
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
81
        integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
82
        crossorigin="anonymous"></script>
83
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
84
        integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
85
        crossorigin="anonymous"></script>
30036 amit.gupta 86
<script type="text/javascript">
87
    function numberToComma(x) {
29966 amit.gupta 88
 
30036 amit.gupta 89
        x = x.toString();
90
        x = x.split('.');
91
        var x1 = x[0];
92
        var x2 = x.length > 1 && x[1] != '0' ? '.' + x[1] : '';
93
        var lastThree = x1.substring(x1.length - 3);
94
        var otherNumbers = x1.substring(0, x1.length - 3);
95
        if (x1.charAt(x1.length - 4) == ',' || x1.charAt(x1.length - 4) == '-') {
96
            console.log(lastThree)
97
        } else {
98
            if (otherNumbers != '')
99
                lastThree = ',' + lastThree;
100
        }
101
        return otherNumbers.replace(/\B(?=(\d{2})+(?!\d))/g, ",") + (lastThree)
102
                + x2;
103
 
104
    }
105
 
106
    $(document).ready(function () {
107
        $('.currency').each(function (index, ele) {
108
            if (!isNaN(parseInt($(ele).html()))) {
109
                $(ele).html(numberToComma($(ele).html()));
110
            }
111
        });
112
    })
113
</script>
29966 amit.gupta 114
</body>
115
</html>