Subversion Repositories SmartDukaan

Rev

Rev 33974 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<style>

</style>


<section class="wrapper">
    <div class="row">
        <div class="col-lg-12">
            <h3 class="page-header"><i class="icon_document_alt"></i>PARTNER HEALTH</h3>
            <ol class="breadcrumb">
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
                <li><i class="icon_document_alt"></i>PARTNER HEALTH</li>
            </ol>
        </div>
    </div>


    <div class="row">
        <div class="col-lg-2 form-group" style="width: 12%;">
            <select id="authUserFilter" name="authUserFilter" placeholder="Auth User"
                    class="form-control input-sm">
                <option value="" disabled selected>Auth User</option>
                #foreach($authUser in $authUsers)

                    #if($selectedUser == $authUser)
                        <option value="$authUser.getEmailId()" selected>$authUser.getFullName()</option>
                    #else
                        <option value="$authUser.getEmailId()">$authUser.getFullName()</option>
                    #end

                #end

            </select>
        </div>

        <div class="col-lg-2">
            <button class="btn btn-primary show-partner-health" type="button">Submit</button>
        </div>
    </div>

    <div class="row">
        <div class="row col-lg-5">
            <canvas id="chart-area" width="50%"></canvas>
        </div>

        <div class="row col-lg-5">


            <table class="table table-border table-condensed table-bordered">
                <tr>
                    <th>Today Overall Call Count</th>
                    <td>$todayOverallCall</td>
                </tr>
                <tr>
                    <th>Today Total Target</th>
                    <td class="currency">$totalPartnerTargetCollection</td>
                </tr>

                <tr>
                    <th>Today Total Achievement</th>
                    <td class="currency">$totalPartnerAchievement</td>
                </tr>
            </table>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <button class="btn btn-primary" onclick="ExportToExcel(this, 'Partner Health')"
                    data-tableid="partner-health">Export
                table to excel
            </button>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <table class="table table-border table-condensed table-bordered"
                   id="partner-health">
                <thead>
                <tr>
                    <th>Partner Name</th>
                    <th>Code</th>
                    <th>Wallet Amount</th>
                    <th>Short Investment</th>
                    <th>Auth User</th>
                    <th>Remark</th>
                    #foreach( $partnerCollectionPlanModel in $partnerCollectionPlanMap.keySet() )
                        <th>$partnerCollectionPlanModel</th>
                    #end

                </tr>
                </thead>
                <tbody>
                    #foreach($customRetailersModel in  $customRetailers.entrySet() )
                    <tr>
                        <td>$customRetailersModel.getValue().getBusinessName()</td>
                        <td>$customRetailersModel.getValue().getCode()</td>
                        #if($partnerDailyInvestmentMap.get($customRetailersModel.getKey()).getWalletAmount())
                            <td class="currency">$partnerDailyInvestmentMap.get($customRetailersModel.getKey()).getWalletAmount()</td>
                        #else
                            <td> -</td>
                        #end
                        #if($partnerDailyInvestmentMap.get($customRetailersModel.getKey()).getShortInvestment())

                            <td class="currency">$partnerDailyInvestmentMap.get($customRetailersModel.getKey()).getShortInvestment()</td>
                        #else
                            <td> -</td>
                        #end


                        #if($todayPcpmMap.get($customRetailersModel.getKey()).getRemark())

                            <td>$authUserMap.get($todayPcpmMap.get($customRetailersModel.getKey()).getRemarkAuthId()).getFullName() </td>
                        #else
                            <td>-</td>
                        #end

                        #if($todayPcpmMap.get($customRetailersModel.getKey()).getRemark())
                            <td title="$todayPcpmMap.get($customRetailersModel.getKey()).getMessage()">$todayPcpmMap.get($customRetailersModel.getKey()).getRemark()
                                ($todayPcpmMap.get($customRetailersModel.getKey()).getRemarkTimestamp().format($dateMonthFormatter)
                                )
                            </td>
                        #else
                            <td>-</td>
                        #end
                        #foreach($ldate in $partnerCollectionPlanMap.entrySet())
                            #set($rank = $ldate.getValue().get($customRetailersModel.getKey()).getRank())
                            #if($ldate.getValue().get($customRetailersModel.getKey()).getTargetPlan())
                                <td style="background-color : $rankColorMap.get($rank)">$ldate.getValue().get($customRetailersModel.getKey()).getTargetPlan()

                                    #if($ldate.getValue().get($customRetailersModel.getKey()).getCommittedDate())
                                        ($ldate.getValue().get($customRetailersModel.getKey()).getCommittedDate().format($dateMonthFormatter)
                                        )
                                    #end</td>
                            #else
                                <td style="background-color : $rankColorMap.get($rank)"> 0
                                    #if($ldate.getValue().get($customRetailersModel.getKey()).getCommittedDate())
                                        ($ldate.getValue().get($customRetailersModel.getKey()).getCommittedDate().format($dateMonthFormatter)
                                        )
                                    #end
                                </td>
                            #end
                        #end
                    </tr>
                    #end

                </tbody>
            </table>
        </div>
    </div>


</section>

<script type="text/javascript">

    var config = $chartPartnerHealth;

    var ctx = document.getElementById('chart-area').getContext('2d');
    window.bar = new Chart1(ctx, config);


    $(document).ready(function () {
        var table = $('#partner-health').DataTable({
            "scrollX": true,
            "bPaginate": true,
            "bLengthChange": true,
            "bFilter": true,
            "bInfo": false,
            "bAutoWidth": false,
            "pageLength": 100
        });
    });
</script>