Subversion Repositories SmartDukaan

Rev

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

<script type="text/javascript">

    $(document).ready(function () {

        $('#trial-users').DataTable({

                    "bPaginate": true,
                    "bLengthChange": true,
                    "bFilter": true,
                    "bInfo": false,
                    "bAutoWidth": false,
                    "scrollX": true,

                }
        );
    });
</script>

<style>


    img:target {
        border: 5px solid red;
    }

    .lightbox {
        /* Default to hidden */
        display: none;

        /* Overlay entire screen */
        position: fixed;
        z-index: 999;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;

        /* A bit of padding around image */
        padding: 1em;

        /* Translucent background */
        background: rgba(0, 0, 0, 0.8);
    }

    /* Unhide the lightbox when it's the target */
    .lightbox:target {
        display: block;
    }

    .lightbox span {
        /* Full width and height */
        display: block;
        width: 100%;
        height: 100%;

        /* Size and position background image */
        background-position: center;
        background-repeat: no-repeat;
        background-size: contain;
    }

    .mb-5 {
        margin-bottom: 5px;
    }


</style>
<section class="wrapper">
    <div class="row">
        <div class="col-lg-12">
            <h3 class="page-header"><i class="icon_document_alt"></i>Trial Partner</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>Verified Trial Partner</li>
            </ol>
        </div>
    </div>


    <div class="row">
        <div class="col-lg-12">
            <table class="table table-border table-condensed table-bordered" id="trial-users">
                <thead>
                <tr>
                    <th>Id</th>
                    <th>Outlet Name</th>
                    <th>Email</th>
                    <th>Mobile</th>
                    <th>Name</th>
                    <th>City</th>
                    <th>State</th>
                    <th>Address</th>
                    <th>Pin Code</th>
                    <th>Pan Document</th>
                    <th>Aadhaar Front</th>
                    <th>Aadhaar Back</th>
                    <th>Action</th>
                </tr>
                </thead>
                <tbody>
                    #if($trialForms.size() > 0)
                        #foreach( $trialForm in $trialForms )
                        <tr data-id="$trialForm.getId()">
                            <td>$trialForm.getId()</td>
                            <td>$trialForm.getBusinessName()</td>
                            <td>$trialForm.getEmail()</td>
                            <td>$trialForm.getMobile()</td>
                            <td>$trialForm.getFirstName() $trialForm.getLastName()</td>
                            <td>$trialForm.getCity()</td>
                            <td>$trialForm.getState()</td>
                            <td>$trialForm.getAddressLine1()   #if($trialForm.addressLine2)
                                <br/>$trialForm.addressLine2
                            #end</td>
                            <td>$trialForm.getPincode()</td>
                            <td>
                                <a href="#pan-id$trialForm.getId()">
                                    <img src="${rc.contextPath}/download-attachment?documentId=$trialForm.getPanDocumentId()"
                                         width="100">
                                </a>
                                <a href="#" class="lightbox" id="pan-id$trialForm.getId()">
                                    <span style="background-image:url('${rc.contextPath}/download-attachment?documentId=$trialForm.getPanDocumentId()')"></span>
                                </a>
                            </td>
                            <td>
                                <a href="#aadhaar-front-id$trialForm.getId()">
                                    <img src="${rc.contextPath}/download-attachment?documentId=$trialForm.getAadhaarFrontDocumentId()"
                                         width="100">
                                </a>
                                <a href="#" class="lightbox" id="aadhaar-front-id$trialForm.getId()">
                                    <span style="background-image:url('${rc.contextPath}/download-attachment?documentId=$trialForm.getAadhaarFrontDocumentId()')"></span>
                                </a>
                            </td>
                            <td>
                                <a href="#aadhaar-back-id$trialForm.getId()">
                                    <img src="${rc.contextPath}/download-attachment?documentId=$trialForm.getAadhaarBackDocumentId()"
                                         width="100">
                                </a>
                                <a href="#" class="lightbox" id="aadhaar-back-id$trialForm.getId()">
                                    <span style="background-image:url('${rc.contextPath}/download-attachment?documentId=$trialForm.getAadhaarBackDocumentId()')"></span>
                                </a>
                            </td>

                            <td class="text-center">
                                <button class="btn btn-success  approve-trial mb-5"
                                        data-id="$trialForm.getId()"
                                >
                                    <i class="fa fa-check-circle"></i> Mark Approved
                                </button>
                                <button class="btn btn-success openUserBrandPotential mb-5"
                                        data-id="$trialForm.getId()">
                                    <i class="fa fa-eye"></i> Show Potential
                                </button>
                                <button class="btn btn-success converted mb-5">
                                    <i class="fa fa-times-circle"></i> Upgrade OK
                                </button>
                                <button class="btn btn-danger  mk_cancel mk_trial_cancel">
                                    <i class="fa fa-times-circle"></i> Cancel Trial
                                </button>
                            </td>

                        </tr>
                        #end
                    #else
                    <tr>
                        <td colspan="13" style="text-align:center;">NO MATCHING DATA FOUND FOR CRITERIA</td>
                    </tr>
                    #end
                </tbody>
            </table>
        </div>
    </div>


    <div id="fetchLeadActivityData" class="modal" role="dialog">
        <div class="modal-dialog">
            <div class="modal-content"></div>
        </div>
    </div>
</section>

<div class="modal fade" id="brandPotentialModal" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">

            <div class="modal-header bg-dark text-white">
                <h5 class="modal-title">Brand Potential Details</h5>
                <button type="button" class="close text-white" data-dismiss="modal">
                    <span>&times;</span>
                </button>
            </div>

            <div class="modal-body">

                <table class="table table-bordered align-middle">
                    <thead class="table-light">
                    <tr>
                        <th>Trial ID</th>
                        <th>Brand</th>
                        <th>Potential</th>
                        <th>Created At</th>
                    </tr>
                    </thead>

                    <tbody id="brandPotentialRows"></tbody>
                </table>

            </div>

        </div>
    </div>
</div>

<div class="modal fade" id="cancelTrialModal" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-sm modal-dialog-centered" role="document">
        <div class="modal-content">

            <div class="modal-header">
                <h5 class="modal-title text-danger">Cancel Trial</h5>
                <button type="button" class="close" data-dismiss="modal">
                    <span>&times;</span>
                </button>
            </div>

            <div class="modal-body">
                <input type="hidden" id="cancelTrialFormId"/>

                <div class="form-group mb-0">
                    <label>
                        Remark <span class="text-danger">*</span>
                    </label>
                    <textarea
                            id="cancelTrialRemark"
                            class="form-control"
                            rows="3"
                            placeholder="Enter reason"
                    ></textarea>
                </div>
            </div>

            <div class="modal-footer">
                <button
                        class="btn btn-light btn-sm"
                        data-dismiss="modal"
                >
                    Close
                </button>

                <button
                        class="btn btn-danger btn-sm"
                        id="confirmCancelTrial"
                >
                    Confirm Cancel
                </button>
            </div>

        </div>
    </div>
</div>