Subversion Repositories SmartDukaan

Rev

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

<section class="wrapper">
    <div class="row">
        <div class="col-lg-12">
            <h3 class="page-header"><i class="icon_document_alt"></i>#springMessage(
                "reportsofferpayoutdump.offerpayoutdumpreport")</h3>
            <ol class="breadcrumb">
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">#springMessage(
                    "reportsofferpayoutdump.home")</a></li>
                <li><i class="icon_document_alt"></i>#springMessage("reportsofferpayoutdump.offerpayoutdumpreport")</li>
            </ol>
        </div>
    </div>
    #if($isAdmin)
        #if($isRBM)
            <div style="padding: 5px 10px; margin-top: 2px"
                 class="col-lg-2 form-group">
                <select class="form-control input-sm" id="fofo-users" name="Item" placeholder="Partners">
                    <option value="" disabled selected>Partners</option>
                    #foreach($fofoId in $customRetailersMap.keySet())
                        <option value="$fofoId"
                                data-email="$customRetailersMap.get($fofoId).getEmail()">$customRetailersMap.get($fofoId).getBusinessName()</option>
                    #end
                </select>
            </div>
        #else
        <div class="row col-lg-12" style="float: right;">
            <div class="col-lg-2">
                <div class="input-group">
                    <input placeholder="Partner Name" type="text" class="typeahead form-control" id="typeaheadpartner"
                           name="Item" data-provide="typeahead" autocomplete="off"
                           style="margin-bottom:10px;margin-left:22px;"> <input id="partnerId" type="hidden">

                    <br>
                    <span class="input-group-btn">
                                                ##<button class="btn btn-primary submit" id="retailer-details-search-button"
                                                                ## type="button">Go!</button>
                                        </span>
                </div>
            </div>
        </div>
    #end
    #end
    <div class="row col-lg-12" style="float: right;">


        #springMessage("reportsofferpayoutdump.from") <input type="date" id="startDate-offer-payout-dump" placeholder=""
                                                             name="" value="$startDate">

        #springMessage("reportsofferpayoutdump.to") <input type="date" id="endDate-offer-payout-dump" placeholder=""
                                                           value="$endDate">
        <button type="submit" class="offer-payout-fetch-report">#springMessage(
            "reportsofferpayoutdump.fetchreport")</button>
        <button type="submit" class="download-offer-payout-dump-report">#springMessage(
            "reportsofferpayoutdump.downloadreport")</button>

    </div>

    <div class="col-lg-12">
        <table class="table table-border table-condensed table-bordered" id="offerPayoutDumpReportDtable"
               style="width:100%">

            <thead class="row htable" style="background:#F5F5F5;">
            <tr style="color:black;">
                <th>Offer Id</th>
                <th>Brand</th>
                <th>Model Name</th>
                <th>Model Number</th>
                <th>Color</th>
                ##<th>Name</th>
                <th>Type</th>
                <th>Serial Number</th>
                <th>Slab Amount</th>
                <th>Amount</th>
                <th>Description</th>
                <th>Created Timestamp</th>
                <th>Rejected Timestamp</th>
            </tr>
            </thead>
            <tbody>
                #foreach($offerPayoutDumpReport in $offerPayoutDumpReports )
                <tr>
                    <td>$offerPayoutDumpReport.getOfferId()</td>
                    <td>$offerPayoutDumpReport.getBrand()</td>
                    <td>$offerPayoutDumpReport.getModelName()</td>
                    <td>$offerPayoutDumpReport.getModelNumber()</td>
                    <td>$offerPayoutDumpReport.getColor()</td>
                    ##<td>$offerPayoutDumpReport.getName()</td>
                    <td>$offerPayoutDumpReport.getType()</td>
                    #if($offerPayoutDumpReport.getSerialNumber())
                        <td> $offerPayoutDumpReport.getSerialNumber()</td>
                    #else
                        <td>--</td>
                    #end
                    <td><span class="currency">$offerPayoutDumpReport.getSlabAmount()</span></td>
                    <td><span class="currency">$offerPayoutDumpReport.getAmount()</span></td>
                    #if($offerPayoutDumpReport.getDescription())
                        <td>$offerPayoutDumpReport.getDescription()</td>
                    #else
                        <td>--</td>
                    #end
                    <td>$offerPayoutDumpReport.getCreateTimestamp().format($datehiphenFormatter)</td>
                    #if($offerPayoutDumpReport.getRejectTimestamp())
                        <td>$offerPayoutDumpReport.getRejectTimestamp().format($datehiphenFormatter)</td>
                    #else
                        <td> --</td>
                    #end
                </tr>
                #end
            </tbody>
        </table>
    </div>
</section>


<script>


    var dtable = $('#offerPayoutDumpReportDtable').DataTable(
            {
                "scrollX": true,
                "bPaginate": true,
                "bLengthChange": true,
                "bFilter": true,
                "bInfo": false,
                "bAutoWidth": false,


            });


</script>
#if($isAdmin)
<script type="text/javascript">
    $(function () {
        getPartnerAheadOptions($("#typeaheadpartner"), function (selectedPartner) {
            partnerId = selectedPartner.partnerId;

            console.log(partnerId);
        });
    });
    $(function () {
        $('#fofo-users').on('change', function () {
            var selectedFofoId = $(this).val();
            if (selectedFofoId) {
                partnerId = selectedFofoId;
                console.log("Partner ID set to:", partnerId);
            } else {
                alert("Please select a valid Partner ID.");
            }
        });
    });
</script>
#end