Subversion Repositories SmartDukaan

Rev

Rev 32813 | Rev 33761 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 32813 Rev 32819
Line 134... Line 134...
134
 
134
 
135
 
135
 
136
   
136
   
137
<div id="position-table">
137
<div id="position-table">
138
		<div class="row">
138
		<div class="row">
139
	    	<div class="col-lg-12">
139
		    <div class="col-lg-12">
-
 
140
		      <div class="col-lg-3">
-
 
141
                <table width="100%" cellpadding="5px">
-
 
142
                    <tr>
-
 
143
                        <td>
-
 
144
                            <div class="input-group">
140
	    	<input type="file" class="btn btn-primary upload-button" type="button" value="Upload" id="positionupload"><br>
145
                                <input type="file"  class="form-control" value="Upload" id="positionupload">
141
 
-
 
-
 
146
                                <span class="input-group-btn">
142
            <input class="btn btn-primary upload-button positionfileupload" type="button" value="Upload">
147
                                     <input class="btn btn-default upload-button positionfileupload" type="button" value="Upload">
-
 
148
                                </span>
-
 
149
                            </div>
-
 
150
                        </td>
-
 
151
                        <td>
-
 
152
                            <button class="btn btn-default" type="button" onclick="downloadCSVTemplate()">Download Template</button>
-
 
153
                        </td>
-
 
154
                    </tr>
-
 
155
                </table>
143
 
156
 
-
 
157
		      </div>
-
 
158
		    </div>
-
 
159
	    <div class="col-lg-12">
144
            <table class="table table-border table-condensed table-bordered" id="createPosition" style="width:100%">
160
            <table class="table table-border table-condensed table-bordered" id="createPosition" style="width:100%">
145
	    	
-
 
146
	    		
-
 
147
	    			 <thead>
161
	    			 <thead>
148
	    				<tr>
162
	    				<tr>
149
	    					<th>User</th>
163
	    					<th>User</th>
150
	    					<th>Position Id</th>
164
	    					<th>Position Id</th>
151
	    					<th>Category</th>
165
	    					<th>Category</th>
Line 155... Line 169...
155
	    					<th>Partners</th>
169
	    					<th>Partners</th>
156
	    				    <th>Ticket Assignee </th>
170
	    				    <th>Ticket Assignee </th>
157
	    					<th>Action</th>
171
	    					<th>Action</th>
158
	    					
172
	    					
159
	    				</tr>
173
	    				</tr>
160
	    				 </thead>
174
	    			</thead>
161
	    				<tbody>
175
	    			<tbody>
162
	    				#if(!$positions.isEmpty())
176
	    				#if(!$positions.isEmpty())
163
	 							#foreach($position in $positions)
177
	 							#foreach($position in $positions)
164
	 							<tr>
178
	 							<tr>
165
	 							<td>$authUserIdAndAuthUserMap.get($position.getAuthUserId()).getFullName()</td>
179
	 							<td>$authUserIdAndAuthUserMap.get($position.getAuthUserId()).getFullName()</td>
166
	 							<td>$position.getId()</td>
180
	 							<td>$position.getId()</td>
Line 293... Line 307...
293
 
307
 
294
     }
308
     }
295
 
309
 
296
                 
310
                 
297
</script>
311
</script>
-
 
312
 
-
 
313
 
-
 
314
<script>
-
 
315
    function downloadCSVTemplate() {
-
 
316
      // Define the CSV template content
-
 
317
      const csvContent = 'Store code,Position Id From,Position Id To';
-
 
318
 
-
 
319
      // Convert the CSV content to a Blob
-
 
320
      const blob = new Blob([csvContent], { type: 'text/csv' });
-
 
321
 
-
 
322
      // Create a download link
-
 
323
      const downloadLink = document.createElement('a');
-
 
324
      downloadLink.href = window.URL.createObjectURL(blob);
-
 
325
      downloadLink.download = 'template.csv';
-
 
326
 
-
 
327
      // Append the link to the body and trigger the download
-
 
328
      document.body.appendChild(downloadLink);
-
 
329
      downloadLink.click();
-
 
330
 
-
 
331
      // Remove the link from the DOM
-
 
332
      document.body.removeChild(downloadLink);
-
 
333
    }
-
 
334
</script>
-
 
335