Subversion Repositories SmartDukaan

Rev

Rev 31762 | Rev 35569 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
24417 govind 1
<script>
2
$('#myModal').on('hidden.bs.modal', function (e) {
24469 govind 3
  $(".activity-container .modal-body").empty();
24417 govind 4
});
24787 govind 5
 $(function(){
6
 	getPartnerAheadOptions($("#typeaheadpartnernameforassignee"),function(selectedPartner){
7
		$("#assignee-ticket-search-by-partner-name").data('id',selectedPartner.partnerId);
8
		$("#assignee-partner-name-input").val(selectedPartner.partnerId);
9
	});
10
});
31762 tejbeer 11
 
12
 
13
   $(document).ready(function () {	
14
 
15
       $('#ticket-table thead tr').clone(true).appendTo('#ticket-table thead');
16
        $('#ticket-table thead tr:eq(1) th').each(function (i) {
17
            var title = $(this).text();
18
            $(this).html('<input type="text" style = "width:60%;" placeholder="Search ' + title + '" />');
19
 
20
            $('input', this).on('keyup change', function () {
21
                if (table.column(i).search() !== this.value) {
22
                    table
23
                            .column(i)
24
                            .search(this.value)
25
                            .draw();
26
                }
27
            });
28
        })
29
 
30
       var table = $('#ticket-table').DataTable({
31
            orderCellsTop: true,
32
            fixedHeader: true
33
        })
34
 
35
  });
24417 govind 36
</script>
37
<style>
38
.incoming_msg_img {
39
	display: inline-block;
40
	width: 6%;
41
}
42
 
43
.incoming_msg_img img {
44
	width: 100%;
45
}
46
.sent_msg p {
47
	background:#b8d1f3;
48
	border-radius: 12px 15px 15px 0;
49
	font-size: 14px;
50
	margin: 0;
51
	color: black;
52
	padding: 5px 10px 5px 12px;
24569 govind 53
	word-break: break-all;
24417 govind 54
	width: 100%;
55
}
56
 
57
.outgoing_msg {
58
	overflow: hidden;
59
	margin: 26px 0 26px;
60
}
61
 
62
.sent_msg {
63
	float: right;
64
	width: 46%;
65
}
66
.received_msg {
67
	display: inline-block;
68
	padding: 0 0 0 10px;
69
	vertical-align: top;
70
	width: 50%;
71
}
72
 
73
.received_withd_msg p {
74
	background: #dae5f4 none repeat scroll 0 0;
75
	border-radius: 0 15px 15px 15px;
76
	color: #646464;
77
	font-size: 14px;
78
	margin: 0;
79
	padding: 5px 10px 5px 12px;
24569 govind 80
	word-break: break-all;
24417 govind 81
	width: 100%;
82
}
83
 
84
.time_date {
85
	color: black;
86
	display: block;
87
	font-size: 12px;
88
	margin: 8px 0 0;
89
}
90
.blue_box, .green_box,.white_box {
91
    display: block;
92
    clear:both;
93
}
94
.modal-dialog,
24530 amit.gupta 95
 {
24417 govind 96
    /* 80% of window height */
24530 amit.gupta 97
    max-height: 80%;
24417 govind 98
}
99
 
100
.modal-body {
101
    /* 100% = dialog height, 120px = header + footer */
24638 govind 102
    max-height:70vh;
24530 amit.gupta 103
    overflow-y: auto;
24417 govind 104
}
105
.outgoing_msg:after,.incoming_msg:after,.white_box:after {
106
  content: '\A';
107
    white-space: pre;
108
}
109
.incoming_msg:before,.white_box:before {
110
  content: '\A';
111
    white-space: pre;
112
}
113
.white_box span {
114
    background-color:#ebebeb;
115
     background-size: 5px 5px;
116
    word-break: break-all;
117
    color: black;
118
    display: block;
119
    padding:10px 10px;
120
    text-align: center
121
}
122
</style>
123
<section class="wrapper">
124
	<div class="row">
125
		<div class="col-lg-12">
126
			<h3 class="page-header"><i class="icon_document_alt"></i>TICKET</h3>
127
			<ol class="breadcrumb">
128
				<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
129
				<li><i class="icon_document_alt"></i>My Ticket</li>						  	
130
			</ol>
131
		</div>
132
	</div>
24699 govind 133
	<div class = "row">
134
				<div class="col-lg-2 form-group">
135
						<select class="form-control input-sm" id = "ticketStatus" name="ticketStatus" placeholder="Type">
136
						#foreach($ticketStatus in $ticketStatusValues)
24791 govind 137
							#if($ticketStatus=="RESOLVED")
138
									#if($roleType)
139
											#if($selectedticketStatus==$ticketStatus)
140
												<option value="$ticketStatus" selected>$ticketStatus</option>
141
											#else
142
												<option value="$ticketStatus">$ticketStatus</option>
143
											#end
144
									#end
145
							#else
146
									#if($selectedticketStatus==$ticketStatus)
147
												<option value="$ticketStatus" selected>$ticketStatus</option>
148
									#else
149
												<option value="$ticketStatus">$ticketStatus</option>
150
									#end
151
							#end
24699 govind 152
						#end
153
		             	</select>
154
				</div>
155
				<div class="col-lg-2 form-group">
156
						<select class="form-control input-sm" id = "orderBy" name="orderBy" placeholder="Type">
157
						#foreach($orderby in $orderByValues)
24791 govind 158
							#if($orderby=="UNSORTED")
159
							#else
160
									#if($selectedorderby==$orderby)
161
											#if($orderby=="ASCENDING")
162
												<option value="$orderby" selected>OLD TO NEW</option>
163
											#else
164
												<option value="$orderby" selected>NEW TO OLD</option>
165
											#end
166
									#else
167
											#if($orderby=="ASCENDING")
168
												<option value="$orderby">OLD TO NEW</option>
169
											#else
170
												<option value="$orderby">NEW TO OLD</option>
171
											#end
172
									#end
173
							#end
24699 govind 174
						#end
175
		             	</select>
176
				</div>
24787 govind 177
				#if($roleType)
178
				<div class="col-lg-6 form-group pull-right">
179
					<div class="col-lg-6">
180
        		<select class="form-control" id = "assigneesearchType" name = "assigneesearchType" placeholder="Search Type">
181
					<option value="" disabled selected>Search Type</option>
182
					#foreach($searchType1 in $ticketSearchTypes)
183
					#if($ticketSearchType.getValue()==$searchType1.getValue())
184
						<option value="$searchType1" selected>$ticketSearchType.getValue()</option>
185
						#else
186
						<option value="$searchType1">$searchType1.getValue()</option>
187
						#end
188
					#end
189
             	</select>
190
        	</div>
191
 
192
 
193
        	<div class="col-lg-6">
194
        	<input type="hidden" id="assignee-partner-name-input" name="assignee-partner-name-input" value="">
195
        	<div class="assigneebyPartnerName" style="display: none;">
196
			  <div class="input-group">
197
		    	<input placeholder="Partner Name" type="text" class="typeahead form-control" id="typeaheadpartnernameforassignee" value="" name="Item" data-provide="typeahead" autocomplete="off">
198
	    		<span class="input-group-btn">
199
	      			<button class="btn btn-primary" id="assignee-ticket-search-by-partner-name" type="button" data-id="">Go!</button>
200
	    		</span>
201
	          </div>
202
	          </div>
203
	          <div class="assigneebyTicketId" style="display: none;">
204
			  <div class="input-group">
205
		    	<input placeholder="Ticket Id" type="text" class="form-control" id="assignee-search-by-ticketId" value="">
206
	    		<span class="input-group-btn">
207
	      			<button class="btn btn-primary" id="assignee-retailer-details-search-button-by-ticketId" type="button">Go!</button>
208
	    		</span>
209
	          </div>
210
	          </div>
211
			</div>
212
			#end
213
			</div>
24699 govind 214
				</div>
24417 govind 215
<div id="my-ticket-table">
216
		<div class="row">
217
	    	<div class="col-lg-12">
31762 tejbeer 218
	    		<table class="table table-border table-condensed table-bordered" id="ticket-table">
219
	    		<thead>
220
 
221
 
24417 govind 222
	    				<tr>
24569 govind 223
	    					<th>Ticket Id</th>
24417 govind 224
	    					#if($roleType)
225
	    					<th>Partner</th>
226
	    					#end
31762 tejbeer 227
	    					<th>Category</th>
24417 govind 228
	    					<th>SubCategory</th>
31762 tejbeer 229
	    				    <th>Message</th>
33864 ranu 230
							<th>Created By</th>
24417 govind 231
	    					<th>Created TimeStamp</th>
232
	    					#if($roleType)
233
	    					<th>Action</th>
234
	    					#else
24638 govind 235
	    					<th>Action</th>
24417 govind 236
	    					#end
237
	    				</tr>
31762 tejbeer 238
	    			</thead>	
239
	    				<tbody>
24569 govind 240
	    				#if($tickets.size()>0)
24417 govind 241
	 							#foreach($ticket in $tickets)
242
	 							<tr>
24569 govind 243
	 							<td>$ticket.getId()</td>
24417 govind 244
	 							#if($roleType)
245
	 							<td>$fofoIdsAndCustomRetailer.get($ticket.getFofoId()).getBusinessName()</td>
246
	    						#end
31762 tejbeer 247
	    					    <td>$subCategoryIdAndCategoryMap.get($ticket.getSubCategoryId()).getName()</td>
248
 
24824 govind 249
			    				<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>
33864 ranu 250
									<td>$activityMap.get($ticket.getId()).get(0).getMessage()</td>
251
									#if($activityMapWithActivityId.get($ticket.getFirstActivityId()).get(0).getCreatedBy() > 0)
252
										<td>$authUserMap.get($activityMapWithActivityId.get($ticket.getFirstActivityId()).get(0).getCreatedBy()).getFirstName() $authUserMap.get($activityMapWithActivityId.get($ticket.getFirstActivityId()).get(0).getCreatedBy()).getLastName()</td>
253
									#else
254
										<td>Partner</td>
255
									#end
31762 tejbeer 256
 
24417 govind 257
			    					<td>$ticket.getFormattedCreateTimestamp()</td>
258
			    					#if($roleType)
259
			    						#if($ticket.getCloseTimestamp())
260
			    							<td>$ticket.getFormattedCloseTimestamp()</td>
261
			    						#else
24620 govind 262
			    						#if($ticket.getLastActivity()=="RESOLVED")
24791 govind 263
			    							<td>Resolved</td>
24620 govind 264
			    							#else
265
			    							<td><button class="btn btn-primary" id="ticket-last-activity" data-ticketid="$ticket.getId()" data-activity="$resolved">Resolved</button></td>
266
			    							#end
24417 govind 267
			    						#end
268
	    							#else
269
	    								#if($ticket.getCloseTimestamp())
270
	    									<td>Closed</td>
271
	    								#else
24620 govind 272
	    								#if($ticket.getLastActivity()=="RESOLVED")
24638 govind 273
			    							<td><button class="btn btn-primary" id="ticket-last-activity" data-ticketid="$ticket.getId()" data-activity="$resolved-accepted">Resolved</button>
274
			    							<button class="btn btn-danger" id="ticket-last-activity" data-ticketid="$ticket.getId()" data-activity="$resolved-rejected">Reopen</button></td>
24620 govind 275
			    							#else
24638 govind 276
			    							<td><button class="btn btn-primary" id="ticket-last-activity" data-ticketid="$ticket.getId()" data-activity="$resolved-accepted" disabled>Resolved</button>
277
			    							<button class="btn btn-danger" id="ticket-last-activity" data-ticketid="$ticket.getId()" data-activity="$resolved-rejected" disabled>Reopen</button></td>
24620 govind 278
			    							#end
279
			    							#end
280
			    						#end
24417 govind 281
			    				</tr>
282
			    				#end
283
			    				#else
284
			    				<tr>
285
		    					<td colspan="12" style="text-align:center;">NO MATCHING DATA FOUND FOR CRITERIA</td>
24569 govind 286
		    					</tr>
24417 govind 287
			    				#end
288
	    			</tbody>
289
	    		</table>
290
	    	</div>
291
	    </div>
292
    </div>
31762 tejbeer 293
 
24417 govind 294
    </section>
295
<div id="ticket-details-container" style="background:white;background-color:white;">
296
</div>
24469 govind 297
<div class="activity-container">
26318 tejbeer 298
         <div class="modal" id="myModal" role="dialog" >
24417 govind 299
            <div class="modal-dialog">
300
               <!-- Modal content-->
301
               <div class="modal-content">
302
                  <div class="modal-header">
303
                     <button type="button" class="close" data-dismiss="modal">&times;</button>
304
                     <h4 class="modal-title">Message History</h4>
305
                  </div>
306
                  <div class="modal-body">
307
                   </div><br><br>
308
                   <div class="modal-footer">
27270 tejbeer 309
                   <div class="col-lg-8 form-group">
310
                   <ul class="fileList"></ul>       
311
                   </div>
24824 govind 312
         <div class="col-lg-8 form-group">
313
         <input type="hidden" id="ticketIdforactivity">
314
          <input type="hidden" id="assigneeUser">
315
          <input type="hidden" id="role" value="">
316
 
24417 govind 317
		<textarea class="form-control rounded-0" id="activityMessage" rows="2"></textarea>
318
			</div>
24824 govind 319
			<div class="col-lg-4">
320
					<div class="col-lg-7 internalCheckBox">
321
						<input type="checkbox" name="internalCommunication" id="internalCommunication">&nbsp;&nbsp;<span style="font-size:12px;font-weight:bold">INTERNAL</b>
322
						</div>
323
						<div class="col-lg-5">
324
						<input class="btn btn-primary submit-message-button" type="button" value="Submit">
325
						</div>	
27270 tejbeer 326
						<div class="col-lg-7 uploadData">
327
								<button type="button" class="btn btn-default uploadFile" style="float:left;padding:0px;cursor:pointer">
328
						<i class="fa fa-paperclip" aria-hidden="true"></i></button> 
27285 tejbeer 329
						<input type="file" id="file1"  name="file1" accept=".jpg,.png,.jpeg,.doc,.docx,.xls,.xlsx" style="display:none" multiple/>
27270 tejbeer 330
 
331
 
332
						</div>
24417 govind 333
					</div>
334
     		 </div>
27270 tejbeer 335
 
336
 
24417 govind 337
               </div>
338
            </div>
339
         </div>
340
      </div>
341