Subversion Repositories SmartDukaan

Rev

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

<script>
$('#myModal').on('hidden.bs.modal', function (e) {
  $(".activity-container .modal-body").empty();
});
 $(function(){
        getPartnerAheadOptions($("#typeaheadpartnernameforassignee"),function(selectedPartner){
                $("#assignee-ticket-search-by-partner-name").data('id',selectedPartner.partnerId);
                $("#assignee-partner-name-input").val(selectedPartner.partnerId);
        });
});
</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 {
    /* 100% = dialog height, 120px = header + footer */
    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>My Ticket</li>                                                     
                        </ol>
                </div>
        </div>
        <div class = "row">
                                <div class="col-lg-2 form-group">
                                                <select class="form-control input-sm" id = "ticketStatus" name="ticketStatus" placeholder="Type">
                                                #foreach($ticketStatus in $ticketStatusValues)
                                                        #if($ticketStatus=="RESOLVED")
                                                                        #if($roleType)
                                                                                        #if($selectedticketStatus==$ticketStatus)
                                                                                                <option value="$ticketStatus" selected>$ticketStatus</option>
                                                                                        #else
                                                                                                <option value="$ticketStatus">$ticketStatus</option>
                                                                                        #end
                                                                        #end
                                                        #else
                                                                        #if($selectedticketStatus==$ticketStatus)
                                                                                                <option value="$ticketStatus" selected>$ticketStatus</option>
                                                                        #else
                                                                                                <option value="$ticketStatus">$ticketStatus</option>
                                                                        #end
                                                        #end
                                                #end
                                </select>
                                </div>
                                <div class="col-lg-2 form-group">
                                                <select class="form-control input-sm" id = "orderBy" name="orderBy" 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>
                                #if($roleType)
                                <div class="col-lg-6 form-group pull-right">
                                        <div class="col-lg-6">
                        <select class="form-control" id = "assigneesearchType" name = "assigneesearchType" 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="assignee-partner-name-input" name="assignee-partner-name-input" value="">
                <div class="assigneebyPartnerName" style="display: none;">
                          <div class="input-group">
                        <input placeholder="Partner Name" type="text" class="typeahead form-control" id="typeaheadpartnernameforassignee" value="" name="Item" data-provide="typeahead" autocomplete="off">
                        <span class="input-group-btn">
                                <button class="btn btn-primary" id="assignee-ticket-search-by-partner-name" type="button" data-id="">Go!</button>
                        </span>
                  </div>
                  </div>
                  <div class="assigneebyTicketId" style="display: none;">
                          <div class="input-group">
                        <input placeholder="Ticket Id" type="text" class="form-control" id="assignee-search-by-ticketId" value="">
                        <span class="input-group-btn">
                                <button class="btn btn-primary" id="assignee-retailer-details-search-button-by-ticketId" type="button">Go!</button>
                        </span>
                  </div>
                  </div>
                        </div>
                        #end
                        </div>
                                </div>
<div id="my-ticket-table">
                <div class="row">
                <div class="col-lg-12">
                        <table class="table table-bordered">
                                <tbody>
                                        <tr>
                                                <th>Ticket Id</th>
                                                #if($roleType)
                                                <th>Partner</th>
                                                #end
                                                <th>SubCategory</th>
                                                <th>Created TimeStamp</th>
                                                #if($roleType)
                                                <th>Action</th>
                                                #else
                                                <th>Action</th>
                                                #end
                                        </tr>
                                        #if($tickets.size()>0)
                                                                #foreach($ticket in $tickets)
                                                                <tr>
                                                                <td>$ticket.getId()</td>
                                                                #if($roleType)
                                                                <td>$fofoIdsAndCustomRetailer.get($ticket.getFofoId()).getBusinessName()</td>
                                                        #end
                                                        <td><a href="#" data-toggle="modal" data-target="#myModal" data-ticketid="$ticket.getId()" data-internal="true" data-role="$roleType" id="activities" data-assignee="$authUserIdAndAuthUserMap.get($ticket.getId()).getFirstName()">$subCategoryIdAndSubCategoryMap.get($ticket.getSubCategoryId()).getName()</a></td>
                                                                <td>$ticket.getFormattedCreateTimestamp()</td>
                                                                #if($roleType)
                                                                        #if($ticket.getCloseTimestamp())
                                                                                <td>$ticket.getFormattedCloseTimestamp()</td>
                                                                        #else
                                                                        #if($ticket.getLastActivity()=="RESOLVED")
                                                                                <td>Resolved</td>
                                                                                #else
                                                                                <td><button class="btn btn-primary" id="ticket-last-activity" data-ticketid="$ticket.getId()" data-activity="$resolved">Resolved</button></td>
                                                                                #end
                                                                        #end
                                                                #else
                                                                        #if($ticket.getCloseTimestamp())
                                                                                <td>Closed</td>
                                                                        #else
                                                                        #if($ticket.getLastActivity()=="RESOLVED")
                                                                                <td><button class="btn btn-primary" id="ticket-last-activity" data-ticketid="$ticket.getId()" data-activity="$resolved-accepted">Resolved</button>
                                                                                <button class="btn btn-danger" id="ticket-last-activity" data-ticketid="$ticket.getId()" data-activity="$resolved-rejected">Reopen</button></td>
                                                                                #else
                                                                                <td><button class="btn btn-primary" id="ticket-last-activity" data-ticketid="$ticket.getId()" data-activity="$resolved-accepted" disabled>Resolved</button>
                                                                                <button class="btn btn-danger" id="ticket-last-activity" data-ticketid="$ticket.getId()" data-activity="$resolved-rejected" disabled>Reopen</button></td>
                                                                                #end
                                                                                #end
                                                                        #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>
    #if(!$tickets.isEmpty())
        <div class="row" id="tickets-paginated">
                <div class="col-lg-9">
                        <p>Showing <span class="start">$start</span> to <span class="end">$end</span> of <span class="size">$size</span> items</p>
                </div>
                <div class="col-lg-3" style="text-align:right;">
                                <div class="btn-group" style="width:40%">
                                        <button class="btn btn-primary previous" disabled="disabled" style="width:100%">Previous</button>
                                </div>
                                <div class="btn-group" style="width:40%">
                                        #if($end >= $size)
                                                <button class="btn btn-primary next" style="width:100%" disabled="disabled">Next</button>
                                        #else
                                                <button class="btn btn-primary next" style="width:100%">Next</button>
                                        #end
                                </div>
                </div>
            </div>
    #end
    </section>
<div id="ticket-details-container" style="background:white;background-color:white;">
</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">
                   <ul class="fileList"></ul>       
                   </div>
         <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 class="col-lg-7 uploadData">
                                                                <button type="button" class="btn btn-default uploadFile" style="float:left;padding:0px;cursor:pointer">
                                                <i class="fa fa-paperclip" aria-hidden="true"></i></button> 
                                                <input type="file" id="file1"  name="file1" accept=".jpg,.png,.jpeg,.doc,.docx,.xls,.xlsx" style="display:none" multiple/>
                                                
                                                
                                                </div>
                                        </div>
                 </div>
                 
                        
               </div>
            </div>
         </div>
      </div>