Subversion Repositories SmartDukaan

Rev

Rev 33761 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 33761 Rev 33762
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
 
-
 
299
 
-
 
300
     function sendCsvDataToServer(data) {
291
     function sendCsvDataToServer(data) {
301
 
292
 
302
         $.ajax({
293
         $.ajax({
303
             type: "POST",
294
             type: "POST",
304
             url: "${rc.contextPath}/partner-position/update",
295
             url: "${rc.contextPath}/partner-position/update",
305
             data: JSON.stringify(data),
296
             data: JSON.stringify(data),
306
             contentType: "application/json; charset=utf-8",
297
             contentType: "application/json; charset=utf-8",
307
			 headers: {'IdempotencyKey': IdempotencyKey},
-
 
308
 
298
 
309
             success: function(response) {
299
             success: function(response) {
310
				 IdempotencyKey = uuidv4();
300
				 IdempotencyKey = uuidv4();
311
                 if (response) {
301
                 if (response) {
312
                     alert("Content updated successfully..");
302
                     alert("Content updated successfully..");