Subversion Repositories SmartDukaan

Rev

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

Rev 32819 Rev 33761
Line 286... Line 286...
286
 
286
 
287
         return positions;
287
         return positions;
288
     }
288
     }
289
 
289
 
290
 
290
 
-
 
291
	function uuidv4() {
-
 
292
		return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, c =>
-
 
293
				(+c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> +c / 4).toString(16)
-
 
294
		);
-
 
295
	}
-
 
296
 
-
 
297
	let IdempotencyKey = uuidv4();
-
 
298
 
291
 
299
 
292
     function sendCsvDataToServer(data) {
300
     function sendCsvDataToServer(data) {
293
 
301
 
294
         $.ajax({
302
         $.ajax({
295
             type: "POST",
303
             type: "POST",
296
             url: "${rc.contextPath}/partner-position/update",
304
             url: "${rc.contextPath}/partner-position/update",
297
             data: JSON.stringify(data),
305
             data: JSON.stringify(data),
298
             contentType: "application/json; charset=utf-8",
306
             contentType: "application/json; charset=utf-8",
-
 
307
			 headers: {'IdempotencyKey': IdempotencyKey},
299
 
308
 
300
             success: function(response) {
309
             success: function(response) {
-
 
310
				 IdempotencyKey = uuidv4();
301
                 if (response) {
311
                 if (response) {
302
                     alert("Content updated successfully..");
312
                     alert("Content updated successfully..");
303
                 }
313
                 }
304
             }
314
             }
305
         });
315
         });