Subversion Repositories SmartDukaan

Rev

Rev 33778 | Rev 35594 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<script type="text/javascript">
$('#myModal').on('hidden.bs.modal', function (e) {
  $(".activity-container .modal-body").empty();

});

 $(function(){
        getPartnerAheadOptions($("#typeaheadpartnername"),function(selectedPartner){
                $("#manager-ticket-search-by-partner-name").data('id',selectedPartner.partnerId);
                $("#partner-name-input").val(selectedPartner.partnerId);
        });
});

$(document).ready(function () { 
  
    $('#manager-ticket thead tr').clone(true).appendTo('#manager-ticket thead');
        $('#manager-ticket thead tr:eq(1) th').each(function (i) {
            var title = $(this).text();
            $(this).html('<input type="text" style = "width:60%;" placeholder="Search ' + title + '" />');

            $('input', this).on('keyup change', function () {
                if (table.column(i).search() !== this.value) {
                    table
                            .column(i)
                            .search(this.value)
                            .draw();
                }
            });
        })

       var table = $('#manager-ticket').DataTable({
            orderCellsTop: true,
            fixedHeader: true
        })
        
  });

</script>
<style>
.incoming_msg_img {
        display: inline-block;
        width: 6%;
}

.incoming_msg_img img {
        width: 100%;
}
.sent_msg p {
        background:#b8d1f3;
        border-radius: 12px 15px 15px 0;
        font-size: 14px;
        margin: 0;
        color: black;
        padding: 5px 10px 5px 12px;
        word-break: break-all;
        width: 100%;
}

.outgoing_msg {
        overflow: hidden;
        margin: 26px 0 26px;
}

.sent_msg {
        float: right;
        width: 46%;
}
.received_msg {
        display: inline-block;
        padding: 0 0 0 10px;
        vertical-align: top;
        width: 50%;
}

.received_withd_msg p {
        background: #dae5f4 none repeat scroll 0 0;
        border-radius: 0 15px 15px 15px;
        color: #646464;
        font-size: 14px;
        margin: 0;
        padding: 5px 10px 5px 12px;
        word-break: break-all;
        width: 100%;
}

.time_date {
        color: black;
        display: block;
        font-size: 12px;
        margin: 8px 0 0;
}
.blue_box, .green_box,.white_box {
    display: block;
    clear:both;
}
.modal-dialog {
    /* 80% of window height */
    max-height: 80%;
}

.modal-body {
        max-height:70vh;
    overflow-y: auto;
}
.outgoing_msg:after,.incoming_msg:after,.white_box:after {
  content: '\A';
    white-space: pre;
}
.incoming_msg:before,.white_box:before {
  content: '\A';
    white-space: pre;
}
.white_box span {
    background-color:#ebebeb;
     background-size: 5px 5px;
    word-break: break-all;
    color: black;
    display: block;
    padding:10px 10px;
    text-align: center
}
</style>
<section class="wrapper">
        <div class="row">
                <div class="col-lg-12">
                        <h3 class="page-header"><i class="icon_document_alt"></i>TICKET</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>Manager Ticket</li>                                                        
                        </ol>
                </div>
        </div>
        <div class = "row">
                                <div class="col-lg-2 form-group">
                                                <select class="form-control input-sm" id = "managerTicketStatus" name="managerTicketStatus" placeholder="Type">
                                                #foreach($ticketStatus in $ticketStatusValues)
                                                #if($selectedticketStatus==$ticketStatus)
                                                <option value="$ticketStatus" selected>$ticketStatus</option>
                                                #else
                                                <option value="$ticketStatus">$ticketStatus</option>
                                                #end
                                                #end
                                </select>
                                </div>
                                <div class="col-lg-2 form-group">
                                                <select class="form-control input-sm" id = "managerTicketorderBy" name="managerTicketorderBy" placeholder="Type">
                                                #foreach($orderby in $orderByValues)
                                                #if($orderby=="UNSORTED")
                                                #else
                                                #if($selectedorderby==$orderby)
                                                #if($orderby=="ASCENDING")
                                                <option value="$orderby" selected>OLD TO NEW</option>
                                                #else
                                                <option value="$orderby" selected>NEW TO OLD</option>
                                                #end
                                                #else
                                                #if($orderby=="ASCENDING")
                                                <option value="$orderby">OLD TO NEW</option>
                                                #else
                                                <option value="$orderby">NEW TO OLD</option>
                                                #end
                                                #end
                                                #end
                                                #end
                                </select>
                                </div>
                                        <div class="col-lg-6 form-group pull-right">
                                        <div class="col-lg-6">
                        <select class="form-control" id = "managersearchType" name = "managersearchType" placeholder="Search Type">
                                        <option value="" disabled selected>Search Type</option>
                                        #foreach($searchType1 in $ticketSearchTypes)
                                        #if($ticketSearchType.getValue()==$searchType1.getValue())
                                                <option value="$searchType1" selected>$ticketSearchType.getValue()</option>
                                                #else
                                                <option value="$searchType1">$searchType1.getValue()</option>
                                                #end
                                        #end
                </select>
                </div>
                
                <div class="col-lg-6">
                <input type="hidden" id="partner-name-input" name="partner-name-input" value="">
                <div class="byPartnerName" style="display: none;">
                          <div class="input-group">
                        <input placeholder="Partner Name" type="text" class="typeahead form-control" id="typeaheadpartnername" value="" name="Item" data-provide="typeahead" autocomplete="off">
                        <span class="input-group-btn">
                                <button class="btn btn-primary" id="manager-ticket-search-by-partner-name" type="button" data-id="">Go!</button>
                        </span>
                  </div>
                  </div>
                  <div class="byTicketId" style="display: none;">
                          <div class="input-group">
                        <input placeholder="Ticket Id" type="text" class="form-control" id="search-by-ticketId" value="">
                        <span class="input-group-btn">
                                <button class="btn btn-primary" id="retailer-details-search-button-by-ticketId" type="button">Go!</button>
                        </span>
                  </div>
                  </div>
                        </div>
                        </div>
</div>
<div id="manager-ticket-table">
                <div class="row">
                <div class="col-lg-12">
                <table class="table table-border table-condensed table-bordered" id="manager-ticket">
                        <thead> 
                                        <tr>
                                                <th>Ticket Id</th>
                                                <th>Partner</th>
                                                <th>Category</th>
                                                <th>SubCategory</th>
                                                        <th>Message</th>
                                                        <th>Created By</th>
                                            <th>Assigned To</th>
                                                <th>Created TimeStamp</th>
                                                <th>Status</th>
                                                <th>Action</th>
                                        </tr>
                                        </thead>
                                        
                                        <tbody>
                                        #if($tickets.size()>0)
                                                                #foreach($ticket in $tickets)
                                                                <tr>
                                                                <td>$ticket.getId()</td>
                                                                <td>$fofoIdsAndCustomRetailer.get($ticket.getFofoId()).getBusinessName()</td>
                                                                <td>$subCategoryIdAndCategoryMap.get($ticket.getSubCategoryId()).getName()</td>
                                
                                
                                                                <td><a href="#" data-toggle="modal" data-target="#myModal" data-ticketid="$ticket.getId()" data-internal="true" data-role="true" id="activities" data-assignee="$authUserListMap.get($ticket.getId()).get(0).getFirstName()">$subCategoryIdAndSubCategoryMap.get($ticket.getSubCategoryId()).getName()</a></td>
                                                                        <td>$activityMap.get($ticket.getId()).get(0).getMessage()</td>
                                                                        #if($activityMapWithActivityId.get($ticket.getFirstActivityId()).get(0).getCreatedBy() > 0)
                                                                                <td>$authUserMap.get($activityMapWithActivityId.get($ticket.getFirstActivityId()).get(0).getCreatedBy()).getFirstName() $authUserMap.get($activityMapWithActivityId.get($ticket.getFirstActivityId()).get(0).getCreatedBy()).getLastName()</td>
                                                                        #else
                                                                                <td>Partner</td>
                                                                        #end
                                                                <td>#foreach($authUser in $authUserListMap.get($ticket.getId()))
                                                                <span>$authUser.getFirstName() $authUser.getLastName() ($authUser.getEmployeeCode())
                                                                <span><br/>
                                                                #end
                                                                </td>
                                                        <td>$ticket.getFormattedCreateTimestamp()</td>
                                                        #if($ticket.getCloseTimestamp())
                                                        <td>Closed</td>
                                                        <td><button class="btn btn-primary" id="edit-ticket" data-ticketid1="$ticket.getId()" data-target="#theModal" data-toggle="modal" data-backdrop="false" disabled>Edit</button></td>
                                                        #else
                                                        #if($ticket.getLastActivity()=="RESOLVED")
                                                        <td>Resolved</td>
                                                        #else
                                                        <td>Opened</td>
                                                        #end
                                                        <td><button class="btn btn-primary" id="edit-ticket" data-ticketid1="$ticket.getId()" data-target="#theModal" data-toggle="modal" data-backdrop="false">Edit</button></td>
                                                        #end
                                                        </tr>
                                                        #end
                                                        #else
                                                        <tr>
                                                        <td colspan="12" style="text-align:center;">NO MATCHING DATA FOUND FOR CRITERIA</td>
                                                </tr>
                                                        #end
                                </tbody>
                        </table>
                        
                </div>
            </div>
    </div>
 
    </section>
<div id="manager-ticket-details-container" style="background:white;background-color:white;">
</div>
<div class="edit-container">
<div class="modal fade text-center" id="theModal">
  <div class="modal-dialog">
    <div class="modal-content">
    </div>
  </div>
</div>
</div>

                <div class="activity-container">
         <div class="modal" id="myModal" role="dialog" >
            <div class="modal-dialog">
               <!-- Modal content-->
               <div class="modal-content">
                  <div class="modal-header">
                     <button type="button" class="close" data-dismiss="modal">&times;</button>
                     <h4 class="modal-title">Message History</h4>
                  </div>
                  <div class="modal-body">
                   </div><br><br>
                   <div class="modal-footer">
         <div class="col-lg-8 form-group">
         <input type="hidden" id="ticketIdforactivity">
          <input type="hidden" id="assigneeUser">
          <input type="hidden" id="role" value="">
          
                <textarea class="form-control rounded-0" id="activityMessage" rows="2"></textarea>
                        </div>
                        <div class="col-lg-4">
                                        <div class="col-lg-7 internalCheckBox">
                                                <input type="checkbox" name="internalCommunication" id="internalCommunication">&nbsp;&nbsp;<span style="font-size:12px;font-weight:bold">INTERNAL</b>
                                                </div>
                                                <div class="col-lg-5">
                                                <input class="btn btn-primary submit-message-button" type="button" value="Submit">
                                                </div>  
                                        </div>
                 </div>
               </div>
            </div>
         </div>
      </div>