form-aurora-stefanini 0.1.19 → 0.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -397,38 +397,21 @@
397
397
  }
398
398
  CommonDataService_1 = CommonDataService;
399
399
  CommonDataService.prototype.getData = function () {
400
- var offusqued = new Offusqued();
401
- var value = localStorage.getItem('data');
402
- if (localStorage.getItem('data') != null) {
403
- if (value.length < 10) {
404
- var data = new Map(JSON.parse(localStorage.getItem('data')));
405
- return data;
406
- }
407
- else {
408
- value = offusqued.decodeOfusquedData(value);
409
- console.log("RETORNA");
410
- console.log(value);
411
- var data = new Map(JSON.parse(value));
412
- return data;
413
- }
414
- }
415
- else {
416
- /** Error get cookie */
417
- console.log('ERROR');
400
+ if (localStorage.getItem("data") != null) {
401
+ var data = new Map(JSON.parse(localStorage.getItem("data")));
402
+ console.log('SALE');
403
+ console.log(JSON.stringify(data));
404
+ return data;
418
405
  }
419
406
  };
420
407
  CommonDataService.prototype.setData = function (data) {
421
- var offusqued = new Offusqued();
422
- console.log('ENTRO');
423
- var clientInfo = JSON.stringify(Array.from(data.entries()));
424
- if (clientInfo.length < 10) {
425
- localStorage.setItem('data', clientInfo);
426
- }
427
- else {
428
- console.log('#### LO QUE LLEGA ####');
429
- console.log(JSON.stringify(data));
430
- console.log('######################');
431
- localStorage.setItem('data', offusqued.ofusquedData(clientInfo));
408
+ localStorage.setItem('data', JSON.stringify(Array.from(data.entries())));
409
+ if (localStorage.getItem('data').length > 20) {
410
+ var offusqued = new Offusqued();
411
+ var info = localStorage.getItem('data').toString();
412
+ console.log('LLEGO');
413
+ console.log(info);
414
+ localStorage.setItem('data', offusqued.ofusquedData(info));
432
415
  }
433
416
  };
434
417
  CommonDataService.prototype.initData = function () {
@@ -463,34 +446,34 @@
463
446
  }
464
447
  };
465
448
  var CommonDataService_1;
466
- CommonDataService.COMPANY_KEY = "company";
467
- CommonDataService.DOC_NUMBER_KEY = "docNumber";
468
- CommonDataService.DOC_TYPE_KEY = "docType";
469
- CommonDataService.PHONE_KEY = "phone";
470
- CommonDataService.TYPE_ATTENTION_KEY = "typeAttention";
471
- CommonDataService.OFFICE_KEY = "office";
472
- CommonDataService.TYPE_TURN_KEY = "typeTurn";
473
- CommonDataService.SERVICE_KEY = "service";
474
- CommonDataService.TURN_KEY = "turn";
475
- CommonDataService.PROGRAMED_TURN_KEY = "programedTurn";
476
- CommonDataService.REQUEST_CALL = "requestCall";
477
- CommonDataService.FORM_DATA = "formdata";
478
- CommonDataService.TEMPLATE = "template";
479
- CommonDataService.TURN_RESCHEDULE = "turnReschedule";
480
- CommonDataService.USER_GENDER = "genderUser";
481
- CommonDataService.AUTO_REDIRECT = "autoRedirect";
482
- CommonDataService.SCHEDULE_GENERAL = "scheduleGeneral";
483
- CommonDataService.AGENDAMIENTO_TTP = "potencialCustomer";
484
- CommonDataService.SINGLE_PAGE_ONE = "singlePageOne";
485
- CommonDataService.AVAILABLE_SCHEDULE_GRAL = "availableScheduleGral";
486
- CommonDataService.PROFILE = "profile";
487
- CommonDataService.PAGE_NEXT = "pageNext";
488
- CommonDataService.STEPS = "steps";
489
- CommonDataService.TYPE_TURN_ID = "typeTurnId";
449
+ CommonDataService.COMPANY_KEY = 'company';
450
+ CommonDataService.DOC_NUMBER_KEY = 'docNumber';
451
+ CommonDataService.DOC_TYPE_KEY = 'docType';
452
+ CommonDataService.PHONE_KEY = 'phone';
453
+ CommonDataService.TYPE_ATTENTION_KEY = 'typeAttention';
454
+ CommonDataService.OFFICE_KEY = 'office';
455
+ CommonDataService.TYPE_TURN_KEY = 'typeTurn';
456
+ CommonDataService.SERVICE_KEY = 'service';
457
+ CommonDataService.TURN_KEY = 'turn';
458
+ CommonDataService.PROGRAMED_TURN_KEY = 'programedTurn';
459
+ CommonDataService.REQUEST_CALL = 'requestCall';
460
+ CommonDataService.FORM_DATA = 'formdata';
461
+ CommonDataService.TEMPLATE = 'template';
462
+ CommonDataService.TURN_RESCHEDULE = 'turnReschedule';
463
+ CommonDataService.USER_GENDER = 'genderUser';
464
+ CommonDataService.AUTO_REDIRECT = 'autoRedirect';
465
+ CommonDataService.SCHEDULE_GENERAL = 'scheduleGeneral';
466
+ CommonDataService.AGENDAMIENTO_TTP = 'potencialCustomer';
467
+ CommonDataService.SINGLE_PAGE_ONE = 'singlePageOne';
468
+ CommonDataService.AVAILABLE_SCHEDULE_GRAL = 'availableScheduleGral';
469
+ CommonDataService.PROFILE = 'profile';
470
+ CommonDataService.PAGE_NEXT = 'pageNext';
471
+ CommonDataService.STEPS = 'steps';
472
+ CommonDataService.TYPE_TURN_ID = 'typeTurnId';
490
473
  CommonDataService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function CommonDataService_Factory() { return new CommonDataService(); }, token: CommonDataService, providedIn: "root" });
491
474
  CommonDataService = CommonDataService_1 = __decorate([
492
475
  core.Injectable({
493
- providedIn: "root",
476
+ providedIn: 'root',
494
477
  })
495
478
  ], CommonDataService);
496
479
  return CommonDataService;