form-aurora-stefanini 0.1.7 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -357,9 +357,6 @@
357
357
  }());
358
358
 
359
359
  var moment = moment_;
360
- // import { regexType } from "@app/_shared/_util/regex";
361
- // import { ExternalService } from '@app/_shared/_services/external.service';
362
- // import { AuroraService } from '@app/_shared/_services/aurora.service';
363
360
  /**
364
361
  * This Service handles how the date is represented in scripts i.e. ngModel.
365
362
  */
@@ -382,7 +379,6 @@
382
379
  return null;
383
380
  };
384
381
  CustomAdapter.prototype.toModel = function (date) {
385
- //return date ? date.day + this.DELIMITER + date.month + this.DELIMITER + date.year : null;
386
382
  return date ? (date.day < 10 ? 0 + date.day : date.day) + this.DELIMITER + (date.month < 10 ? 0 + date.month : date.month) + this.DELIMITER + date.year : '';
387
383
  };
388
384
  CustomAdapter = __decorate([
@@ -479,24 +475,15 @@
479
475
  this.summit = new core.EventEmitter();
480
476
  this.viewAuthData = new core.EventEmitter();
481
477
  this.tipodocNumDoc = false;
482
- this.onSubmitEvent = false;
483
478
  this.countSubmit = 0;
484
479
  this.watchValid = false;
485
480
  this.watchRequired = false;
486
481
  this.captchaValid = false;
487
- this.displayMonths = 2;
488
- this.navigation = 'select';
489
- this.showWeekNumbers = false;
490
- this.outsideDays = 'visible';
491
- this.respServiceSegmentation = null;
492
- this.base64CheckAuthData = undefined;
493
- //emailPattern = "^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$";
494
482
  this.today = moment(new Date());
495
483
  this.maxYear = this.today.year();
496
484
  this.minYear = this.today.year() - 82;
497
485
  this.minDate = this.minYear.toString() + '-' + this.today.month().toString().padStart(2, '0') + '-' + this.today.date().toString().padStart(2, '0'); // {year: this.minYear, month: this.today.month(), day: this.today.date()};
498
486
  this.maxDate = this.maxYear.toString() + '-' + (this.today.month() + 1).toString().padStart(2, '0') + '-' + this.today.date().toString().padStart(2, '0'); // {year: this.maxYear, month: this.today.month() + 1, day: this.today.date()};
499
- //Revisar variables
500
487
  this.recharge = false;
501
488
  this.indicativo = "57";
502
489
  this.defaultDocType = "Cédula de ciudadanía";
@@ -1056,9 +1043,6 @@
1056
1043
  __decorate([
1057
1044
  core.Input()
1058
1045
  ], FormAuroraComponent.prototype, "isSimpleFlow", void 0);
1059
- __decorate([
1060
- core.Input()
1061
- ], FormAuroraComponent.prototype, "company", void 0);
1062
1046
  __decorate([
1063
1047
  core.Input()
1064
1048
  ], FormAuroraComponent.prototype, "steps", void 0);
@@ -1074,13 +1058,10 @@
1074
1058
  __decorate([
1075
1059
  core.Output()
1076
1060
  ], FormAuroraComponent.prototype, "viewAuthData", void 0);
1077
- __decorate([
1078
- core.ViewChild("modalTurns", { static: false })
1079
- ], FormAuroraComponent.prototype, "myModal", void 0);
1080
1061
  FormAuroraComponent = __decorate([
1081
1062
  core.Component({
1082
1063
  selector: 'lib-FormAurora',
1083
- template: "<div class=\"card\">\r\n <span class=\"text-center mt-2 d-none d-sm-block\" *ngIf=\"!isSimpleFlow\">\r\n <img style=\"width: 115px; height:96px;\" [class]=\"dataClassCss.logo\" id=\"logo\">\r\n </span>\r\n <div class=\"text-center mt-2 d-none d-sm-block\" *ngIf=\"isSimpleFlow\" style=\"margin-top: 4%!important;\">\r\n </div>\r\n <div class=\"card-body pt-0\">\r\n <ng-container *ngIf=\"schedule\">\r\n <h4 class=\"card-title text-center mb-0\" [class]=\"dataClassCss.bienvenida2\" style=\"color: #EE7E0E;\">\r\n Horarios de atenci\u00F3n\r\n </h4>\r\n <small class=\"text-center d-block\">{{schedule}}</small>\r\n </ng-container>\r\n <form #formDynamic=\"ngForm\">\r\n <div *ngFor=\"let control of dataForm?.formQuestions; let index = index; trackBy: trackByIndex\">\r\n <div\r\n *ngIf=\"(index > 0 && (dataForm.formQuestions[index - 1].question.questionType.id == 3 && dataForm.formQuestions[index].question.questionType.id == 2)) || (index < dataForm.formQuestions.length && dataForm.formQuestions[index].question.questionType.id == 3 && dataForm.formQuestions[index + 1].question.questionType.id == 2); else switchTemp\">\r\n <div class=\"row\"\r\n *ngIf=\"(index > 0 && (dataForm.formQuestions[index - 1].question.questionType.id == 3 && dataForm.formQuestions[index].question.questionType.id == 2))\">\r\n <div class=\"col-lg-6 col-xs-12\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index - 1].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left;\">\r\n <span class=\"h6 small bg-white text-muted\">{{dataForm.formQuestions[index -\r\n 1].question.label}}</span>\r\n </label>\r\n <div class=\"selectContainer\">\r\n <select [name]=\"dataForm.formQuestions[index - 1].question.value\"\r\n [required]=\"dataForm.formQuestions[index - 1].question.required\"\r\n [class]=\"dataClassCss.formcontrol\"\r\n id=\"{{dataForm.formQuestions[index - 1].question.value}}\"\r\n style=\"margin-top: -1rem !important;\"\r\n [(ngModel)]=\"defaultDocType !== '' ? defaultDocType : dataForm.formQuestions[index - 1].question.registred\">\r\n <option value=\"\" selected disabled hidden>Selecciona</option>\r\n <ng-container\r\n *ngFor=\"let item of dataForm.formQuestions[index - 1].question.questionAnswers\">\r\n <option *ngIf=\"item.answer.state.id == 1\" [value]=\"item.answer.value\">\r\n {{ item.answer.field }}\r\n </option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n </div>\r\n <div style=\"margin-left: 15px;\"\r\n *ngIf=\"dataForm.formQuestions[index].question.questionType.id != 5 && dataForm.formQuestions[index].question.questionType.id != 6\">\r\n <span class=\"error\" [id]=\"'char'+dataForm.formQuestions[index-1].question.value\"\r\n hidden></span>\r\n </div>\r\n </div>\r\n <div class=\"col-lg-6 col-xs-12\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\"\r\n class=\"col-sm-12 p-sm-0 px-sm-1\" style=\"display: block; text-align: left;\">\r\n <span\r\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <input type=\"text\" pattern=\"\\d*\" inputmode=\"numeric\"\r\n id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n style=\"margin-top: -1rem !important;\"\r\n [name]=\"dataForm.formQuestions[index].question.value\" placeholder=\"Escribe\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (keyup)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n onkeypress=\"onkeypress($event)\"\r\n onkeyup=\"(this.value=(value.replace(/[.]*/g,'')))\"\r\n maxlength=\"dataForm.formQuestions[index].question.maxLength\"\r\n [minLength]=\"dataForm.formQuestions[index].question.minLength\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n [class]=\"dataClassCss.formcontrol\" />\r\n\r\n </div>\r\n\r\n <div style=\"margin-left: 15px;\"\r\n *ngIf=\"dataForm.formQuestions[index].question.questionType.id != 5 && dataForm.formQuestions[index].question.questionType.id != 6\">\r\n <span class=\"error\" [id]=\"'rq'+dataForm.formQuestions[index].question.value\"\r\n *ngIf=\"validRequired(formDynamic,dataForm.formQuestions[index].question) && watchValid\">\r\n Este campo es obligatorio</span>\r\n <span class=\"error\" [id]=\"'ml'+dataForm.formQuestions[index].question.value\" hidden>\r\n Debe ser m\u00EDnimo de\r\n {{ dataForm.formQuestions[index].question.minLength }} caracteres</span>\r\n <span class=\"error\" [id]=\"'mxl'+dataForm.formQuestions[index].question.value\" hidden>\r\n Debe ser maximo de\r\n {{ dataForm.formQuestions[index].question.maxLength }} caracteres</span>\r\n <span class=\"error\" [id]=\"'char'+dataForm.formQuestions[index].question.value\"\r\n hidden></span>\r\n <span *ngIf=\"patternNotValidDcto === true\" class=\"error\">Formato no valido</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-template #switchTemp>\r\n <div [ngSwitch]=\"dataForm.formQuestions[index].question.questionType.id\">\r\n <div *ngSwitchCase=\"1\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left; \">\r\n <span\r\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <input type=\"text\" id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n [class]=\"dataClassCss.formcontrol\" placeholder=\"Escribe\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [maxlength]=\"dataForm.formQuestions[index].question.maxLength\"\r\n [name]=\"dataForm.formQuestions[index].question.value\"\r\n (keydown)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n style=\"margin-top: -1rem !important;\" />\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"2\">\r\n\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left;\">\r\n <span\r\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <input type=\"text\" pattern=\"\\d*\" inputmode=\"numeric\"\r\n id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n style=\"margin-top: -1rem !important;\"\r\n [name]=\"dataForm.formQuestions[index].question.value\" placeholder=\"Escribe\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n (keydown)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n onkeypress=\"onkeypress($event)\"\r\n onkeyup=\"(this.value=(value.replace(/[.]*/g,'')))\"\r\n maxlength=\"dataForm.formQuestions[index].question.maxLength\"\r\n [minLength]=\"dataForm.formQuestions[index].question.minLength\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n [class]=\"dataClassCss.formcontrol\" />\r\n <span *ngIf=\"patternNotValidCel === true\" class=\"error\">Formato no valido</span>\r\n </div>\r\n \r\n </div>\r\n <div *ngSwitchCase=\"3\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left;\">\r\n <span\r\n class=\"h6 small bg-white text-muted\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <select [name]=\"dataForm.formQuestions[index].question.value\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [class]=\"dataClassCss.formcontrol\"\r\n id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n style=\"margin-top: -1rem !important;\"\r\n [(ngModel)]=\"defaultDocType !== '' ? defaultDocType : dataForm.formQuestions[index].question.registred\">\r\n <option value=\"\" selected disabled hidden>Selecciona</option>\r\n <ng-container\r\n *ngFor=\"let item of dataForm.formQuestions[index].question.questionAnswers\">\r\n <option *ngIf=\"item.answer.state.id == 1\" [value]=\"item.answer.value\">\r\n {{ item.answer.field }}\r\n </option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"4\">\r\n <select class=\"{{ dataClassCss.formcontrol }} select-checkbox\"\r\n style=\"overflow: hidden; border-style: hidden;\"\r\n [style.height.px]=\"dataForm.formQuestions[index].question.questionAnswers.length * 24\"\r\n [name]=\"dataForm.formQuestions[index].question.value\"\r\n [required]=\"dataForm.formQuestions[index].question.required\" ngModel multiple>\r\n <option \r\n (mousemove)=\"$event.preventDefault()\"\r\n *ngFor=\"let item of dataForm.formQuestions[index].question.questionAnswers\"\r\n [value]=\"item.answer.value\">\r\n {{ item.answer.field }}\r\n </option>\r\n </select>\r\n </div>\r\n <div *ngSwitchCase=\"5\">\r\n <a (click)=\"rediretoutside($event,dataForm.formQuestions[index].question)\" href=\"\">\r\n <span>{{ dataForm.formQuestions[index].question.label }}</span>\r\n </a>\r\n </div>\r\n <div *ngSwitchCase=\"6\">\r\n <div [class]=\"dataClassCss.cl12\" [id]=\"'reCaptcha'\">\r\n <div class=\"cnt-captcha\">\r\n <re-captcha (resolved)=\"resolvedCaptcha($event)\"\r\n siteKey=\"6LfQisEZAAAAAARuuKFEAgS-x4qJse5uBA_QCA7v\"></re-captcha>\r\n <input hidden type=\"text\" [name]=\"dataForm.formQuestions[index].question.value\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\">\r\n </div>\r\n <span class=\"error\" *ngIf=\"watchValid && !captchaValid\" style=\"margin-top: 0;\">\r\n Debe resolver la captcha para continuar\r\n </span>\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"7\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left; margin-bottom: 0 ;\">\r\n <span\r\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <input placeholder=\"dd/mm/aaaa\" style=\"margin-top: -0.4rem !important;\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [name]=\"dataForm.formQuestions[index].question.value\" type=\"date\" min=\"{{minDate}}\"\r\n max=\"{{maxDate}}\" [maxlength]=\"10\" (paste)=\"false\"\r\n id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n [class]=\"dataClassCss.txtCalendar\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n (keydown)=\"cancellKeypress()\"\r\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\">\r\n\r\n <button class=\"btn\" id=\"{{dataForm.formQuestions[index].question.value}}\" type=\"button\"\r\n style=\"width: 46px;\r\n top: 12px;\r\n color: white;\r\n right: 15px;\r\n position: absolute;\r\n background: #D25D42;\r\n pointer-events: none;\">\r\n <i class=\"fa fa-calendar\"></i>\r\n </button>\r\n\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"8\">\r\n <div [class]=\"dataClassCss.cl12\" style=\"text-align: left; margin-bottom: 10px;\">\r\n <input style=\"width: 4% !important; height: auto !important; display: inline !important;\" type=\"checkbox\"\r\n [name]=\"dataForm.formQuestions[index].question.value\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n [class]=\"dataClassCss.formcontrol\">\r\n <!-- (change)=\"checkTermsAndConditions(dataForm.formQuestions[index].question.registred)\" -->\r\n \r\n <!-- <a href=\"{{urlPdf}}\" target=\"_blank\" style=\"text-decoration: underline;\"\r\n id=\"txtPoliticas\" (click)=\"tycSelection()\">\r\n {{dataForm.formQuestions[index].question.label}}\r\n </a> -->\r\n <a target=\"_blank\" style=\"text-decoration: underline;color:blue;cursor: pointer;\"\r\n id=\"txtPoliticas\" (click)=\"tycSelection($event)\">\r\n {{dataForm.formQuestions[index].question.label}}\r\n </a>\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"9\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left; \">\r\n <span\r\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <input type=\"text\" id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n [class]=\"dataClassCss.formcontrol\" placeholder=\"Escribe\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [maxlength]=\"dataForm.formQuestions[index].question.maxLength\"\r\n [name]=\"dataForm.formQuestions[index].question.value\"\r\n (keydown)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (keypress)=\"validOnlyText($event)\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n style=\"margin-top: -1rem !important;\" />\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"10\">\r\n <div [class]=\"dataClassCss.cl12\" style=\"text-align: left; margin-bottom: 10px;\">\r\n <input style=\"width: 4% !important; height: auto !important; display: inline !important;\"\r\n type=\"checkbox\" [name]=\"dataForm.formQuestions[index].question.value\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\">\r\n <a target=\"_blank\" style=\"text-decoration: underline;color:blue;cursor: pointer;\"\r\n id=\"check{{dataForm.formQuestions[index].question.id}}\"\r\n (click)=\"openLabelUrl($event,dataForm.formQuestions[index].question)\">\r\n {{dataForm.formQuestions[index].question.label}}\r\n </a>\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"11\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left; \">\r\n <span\r\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <input type=\"text\" id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n [class]=\"dataClassCss.formcontrol\" placeholder=\"Escribe\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [maxlength]=\"dataForm.formQuestions[index].question.maxLength\"\r\n [name]=\"dataForm.formQuestions[index].question.value\"\r\n (keydown)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (keypress)=\"validateNotSpace($event)\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n style=\"margin-top: -1rem !important;\" />\r\n </div>\r\n </div>\r\n <div *ngSwitchDefault>Tipo de control no detectado</div>\r\n <div style=\"margin-left: 15px;\"\r\n *ngIf=\"dataForm.formQuestions[index].question.questionType.id != 5 && dataForm.formQuestions[index].question.questionType.id != 6\">\r\n <span class=\"error\" [id]=\"'rq'+dataForm.formQuestions[index].question.value\"\r\n *ngIf=\"validRequired(formDynamic,dataForm.formQuestions[index].question) && watchValid\">\r\n Este campo es obligatorio</span>\r\n <span class=\"error\" [id]=\"'ml'+dataForm.formQuestions[index].question.value\" hidden>\r\n Debe ser m\u00EDnimo de\r\n {{ dataForm.formQuestions[index].question.minLength }} caracteres</span>\r\n <span class=\"error\" [id]=\"'mxl'+dataForm.formQuestions[index].question.value\" hidden>\r\n Debe ser maximo de\r\n {{ dataForm.formQuestions[index].question.maxLength }} caracteres</span>\r\n <span class=\"error\" [id]=\"'char'+dataForm.formQuestions[index].question.value\"\r\n hidden></span>\r\n <span class=\"error\" [id]=\"dataForm.formQuestions[index].question.id\" hidden></span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <section *ngIf=\"isSimpleFlow\">\r\n <div *ngFor=\"let step of steps let index = index; trackBy: trackByIndex\">\r\n <div [class]=\"dataClassCss.cl12\" *ngIf=\"step.viewData\">\r\n <label for=\"{{step.id}}\" class=\"col-sm-12\" style=\"display: block; text-align: left;\">\r\n <span class=\"h6 small bg-white text-muted\">{{step.step}}</span>\r\n </label>\r\n <select [name]=\"step.step\" [required]=\"true\" [class]=\"dataClassCss.formcontrol\" id=\"{{step.step}}\"\r\n style=\"margin-top: -1rem !important;\" [(ngModel)]=\"step.value\"\r\n (ngModelChange)=\"onChangeStep(step,steps[index+1],$event)\">\r\n <option value=\"\" selected disabled hidden>Selecciona</option>\r\n <ng-container *ngFor=\"let subitem of step.viewData\">\r\n <option [value]=\"subitem.id\">\r\n {{ subitem.description }}\r\n </option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n </div>\r\n </section>\r\n <div class=\"mt-3 text-center\">\r\n <button type=\"button\" [class]=\"dataClassCss.btn\" (click)=\"onSubmit()\" [disabled]=\"!formDynamic.valid\"\r\n id=\"btnIng\">Ingresar</button>\r\n </div>\r\n </form>\r\n </div>\r\n</div>\r\n",
1064
+ template: "<div class=\"card\">\r\n <span class=\"text-center mt-2 d-none d-sm-block\" *ngIf=\"!isSimpleFlow\">\r\n <img style=\"width: 115px; height:96px;\" [class]=\"dataClassCss.logo\" id=\"logo\">\r\n </span>\r\n <div class=\"text-center mt-2 d-none d-sm-block\" *ngIf=\"isSimpleFlow\" style=\"margin-top: 4%!important;\">\r\n </div>\r\n <div class=\"card-body pt-0\">\r\n <ng-container *ngIf=\"schedule\">\r\n <h4 class=\"card-title text-center mb-0\" [class]=\"dataClassCss.bienvenida2\" style=\"color: #EE7E0E;\">\r\n Horarios de atenci\u00F3n\r\n </h4>\r\n <small class=\"text-center d-block\">{{schedule}}</small>\r\n </ng-container>\r\n <form #formDynamic=\"ngForm\">\r\n <div *ngFor=\"let control of dataForm?.formQuestions; let index = index; trackBy: trackByIndex\">\r\n <div\r\n *ngIf=\"(index > 0 && (dataForm.formQuestions[index - 1].question.questionType.id == 3 && dataForm.formQuestions[index].question.questionType.id == 2)) || (index < dataForm.formQuestions.length && dataForm.formQuestions[index].question.questionType.id == 3 && dataForm.formQuestions[index + 1].question.questionType.id == 2); else switchTemp\">\r\n <div class=\"row\"\r\n *ngIf=\"(index > 0 && (dataForm.formQuestions[index - 1].question.questionType.id == 3 && dataForm.formQuestions[index].question.questionType.id == 2))\">\r\n <div class=\"col-lg-6 col-xs-12\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index - 1].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left;\">\r\n <span class=\"h6 small bg-white text-muted\">{{dataForm.formQuestions[index -\r\n 1].question.label}}</span>\r\n </label>\r\n <div class=\"selectContainer\">\r\n <select [name]=\"dataForm.formQuestions[index - 1].question.value\"\r\n [required]=\"dataForm.formQuestions[index - 1].question.required\"\r\n [class]=\"dataClassCss.formcontrol\"\r\n id=\"{{dataForm.formQuestions[index - 1].question.value}}\"\r\n style=\"margin-top: -1rem !important;\"\r\n [(ngModel)]=\"defaultDocType !== '' ? defaultDocType : dataForm.formQuestions[index - 1].question.registred\">\r\n <option value=\"\" selected disabled hidden>Selecciona</option>\r\n <ng-container\r\n *ngFor=\"let item of dataForm.formQuestions[index - 1].question.questionAnswers\">\r\n <option *ngIf=\"item.answer.state.id == 1\" [value]=\"item.answer.value\">\r\n {{ item.answer.field }}\r\n </option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n </div>\r\n <div style=\"margin-left: 15px;\"\r\n *ngIf=\"dataForm.formQuestions[index].question.questionType.id != 5 && dataForm.formQuestions[index].question.questionType.id != 6\">\r\n <span class=\"error\" [id]=\"'char'+dataForm.formQuestions[index-1].question.value\"\r\n hidden></span>\r\n </div>\r\n </div>\r\n <div class=\"col-lg-6 col-xs-12\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\"\r\n class=\"col-sm-12 p-sm-0 px-sm-1\" style=\"display: block; text-align: left;\">\r\n <span\r\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <input type=\"text\" pattern=\"\\d*\" inputmode=\"numeric\"\r\n id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n style=\"margin-top: -1rem !important;\"\r\n [name]=\"dataForm.formQuestions[index].question.value\" placeholder=\"Escribe\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (keyup)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n onkeypress=\"onkeypress($event)\" onkeyup=\"(this.value=(value.replace(/[.]*/g,'')))\"\r\n maxlength=\"dataForm.formQuestions[index].question.maxLength\"\r\n [minLength]=\"dataForm.formQuestions[index].question.minLength\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n [class]=\"dataClassCss.formcontrol\" />\r\n\r\n </div>\r\n\r\n <div style=\"margin-left: 15px;\"\r\n *ngIf=\"dataForm.formQuestions[index].question.questionType.id != 5 && dataForm.formQuestions[index].question.questionType.id != 6\">\r\n <span class=\"error\" [id]=\"'rq'+dataForm.formQuestions[index].question.value\"\r\n *ngIf=\"validRequired(formDynamic,dataForm.formQuestions[index].question) && watchValid\">\r\n Este campo es obligatorio</span>\r\n <span class=\"error\" [id]=\"'ml'+dataForm.formQuestions[index].question.value\" hidden>\r\n Debe ser m\u00EDnimo de\r\n {{ dataForm.formQuestions[index].question.minLength }} caracteres</span>\r\n <span class=\"error\" [id]=\"'mxl'+dataForm.formQuestions[index].question.value\" hidden>\r\n Debe ser maximo de\r\n {{ dataForm.formQuestions[index].question.maxLength }} caracteres</span>\r\n <span class=\"error\" [id]=\"'char'+dataForm.formQuestions[index].question.value\"\r\n hidden></span>\r\n <span *ngIf=\"patternNotValidDcto === true\" class=\"error\">Formato no valido</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-template #switchTemp>\r\n <div [ngSwitch]=\"dataForm.formQuestions[index].question.questionType.id\">\r\n <div *ngSwitchCase=\"1\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left; \">\r\n <span\r\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <input type=\"text\" id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n [class]=\"dataClassCss.formcontrol\" placeholder=\"Escribe\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [maxlength]=\"dataForm.formQuestions[index].question.maxLength\"\r\n [name]=\"dataForm.formQuestions[index].question.value\"\r\n (keydown)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n style=\"margin-top: -1rem !important;\" />\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"2\">\r\n\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left;\">\r\n <span\r\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <input type=\"text\" pattern=\"\\d*\" inputmode=\"numeric\"\r\n id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n style=\"margin-top: -1rem !important;\"\r\n [name]=\"dataForm.formQuestions[index].question.value\" placeholder=\"Escribe\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n (keydown)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n onkeypress=\"onkeypress($event)\" onkeyup=\"(this.value=(value.replace(/[.]*/g,'')))\"\r\n maxlength=\"dataForm.formQuestions[index].question.maxLength\"\r\n [minLength]=\"dataForm.formQuestions[index].question.minLength\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n [class]=\"dataClassCss.formcontrol\" />\r\n <span *ngIf=\"patternNotValidCel === true\" class=\"error\">Formato no valido</span>\r\n </div>\r\n\r\n </div>\r\n <div *ngSwitchCase=\"3\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left;\">\r\n <span\r\n class=\"h6 small bg-white text-muted\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <select [name]=\"dataForm.formQuestions[index].question.value\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [class]=\"dataClassCss.formcontrol\"\r\n id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n style=\"margin-top: -1rem !important;\"\r\n [(ngModel)]=\"defaultDocType !== '' ? defaultDocType : dataForm.formQuestions[index].question.registred\">\r\n <option value=\"\" selected disabled hidden>Selecciona</option>\r\n <ng-container\r\n *ngFor=\"let item of dataForm.formQuestions[index].question.questionAnswers\">\r\n <option *ngIf=\"item.answer.state.id == 1\" [value]=\"item.answer.value\">\r\n {{ item.answer.field }}\r\n </option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"4\">\r\n <select class=\"{{ dataClassCss.formcontrol }} select-checkbox\"\r\n style=\"overflow: hidden; border-style: hidden;\"\r\n [style.height.px]=\"dataForm.formQuestions[index].question.questionAnswers.length * 24\"\r\n [name]=\"dataForm.formQuestions[index].question.value\"\r\n [required]=\"dataForm.formQuestions[index].question.required\" ngModel multiple>\r\n <option (mousemove)=\"$event.preventDefault()\"\r\n *ngFor=\"let item of dataForm.formQuestions[index].question.questionAnswers\"\r\n [value]=\"item.answer.value\">\r\n {{ item.answer.field }}\r\n </option>\r\n </select>\r\n </div>\r\n <div *ngSwitchCase=\"5\">\r\n <a (click)=\"rediretoutside($event,dataForm.formQuestions[index].question)\" href=\"\">\r\n <span>{{ dataForm.formQuestions[index].question.label }}</span>\r\n </a>\r\n </div>\r\n <div *ngSwitchCase=\"6\">\r\n <div [class]=\"dataClassCss.cl12\" [id]=\"'reCaptcha'\">\r\n <div class=\"cnt-captcha\">\r\n <re-captcha (resolved)=\"resolvedCaptcha($event)\"\r\n siteKey=\"6Lf9DcQfAAAAAI6HCNB5OyKUpOPpfl5ocoBJcigZ\"></re-captcha>\r\n <input hidden type=\"text\" [name]=\"dataForm.formQuestions[index].question.value\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\">\r\n </div>\r\n <span class=\"error\" *ngIf=\"watchValid && !captchaValid\" style=\"margin-top: 0;\">\r\n Debe resolver la captcha para continuar\r\n </span>\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"7\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left; margin-bottom: 0 ;\">\r\n <span\r\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <input placeholder=\"dd/mm/aaaa\" style=\"margin-top: -0.4rem !important;\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [name]=\"dataForm.formQuestions[index].question.value\" type=\"date\" min=\"{{minDate}}\"\r\n max=\"{{maxDate}}\" [maxlength]=\"10\" (paste)=\"false\"\r\n id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n [class]=\"dataClassCss.txtCalendar\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n (keydown)=\"cancellKeypress()\"\r\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\">\r\n\r\n <button class=\"btn\" id=\"{{dataForm.formQuestions[index].question.value}}\" type=\"button\"\r\n style=\"width: 46px;\r\n top: 12px;\r\n color: white;\r\n right: 15px;\r\n position: absolute;\r\n background: #D25D42;\r\n pointer-events: none;\">\r\n <i class=\"fa fa-calendar\"></i>\r\n </button>\r\n\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"8\">\r\n <div [class]=\"dataClassCss.cl12\" style=\"text-align: left; margin-bottom: 10px;\">\r\n <input\r\n style=\"width: 4% !important; height: auto !important; display: inline !important;\"\r\n type=\"checkbox\" [name]=\"dataForm.formQuestions[index].question.value\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n [class]=\"dataClassCss.formcontrol\">\r\n <a target=\"_blank\" style=\"text-decoration: underline;color:blue;cursor: pointer;\"\r\n id=\"txtPoliticas\" (click)=\"tycSelection($event)\">\r\n {{dataForm.formQuestions[index].question.label}}\r\n </a>\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"9\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left; \">\r\n <span\r\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <input type=\"text\" id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n [class]=\"dataClassCss.formcontrol\" placeholder=\"Escribe\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [maxlength]=\"dataForm.formQuestions[index].question.maxLength\"\r\n [name]=\"dataForm.formQuestions[index].question.value\"\r\n (keydown)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (keypress)=\"validOnlyText($event)\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n style=\"margin-top: -1rem !important;\" />\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"10\">\r\n <div [class]=\"dataClassCss.cl12\" style=\"text-align: left; margin-bottom: 10px;\">\r\n <input\r\n style=\"width: 4% !important; height: auto !important; display: inline !important;\"\r\n type=\"checkbox\" [name]=\"dataForm.formQuestions[index].question.value\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\">\r\n <a target=\"_blank\" style=\"text-decoration: underline;color:blue;cursor: pointer;\"\r\n id=\"check{{dataForm.formQuestions[index].question.id}}\"\r\n (click)=\"openLabelUrl($event,dataForm.formQuestions[index].question)\">\r\n {{dataForm.formQuestions[index].question.label}}\r\n </a>\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"11\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left; \">\r\n <span\r\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <input type=\"text\" id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n [class]=\"dataClassCss.formcontrol\" placeholder=\"Escribe\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [maxlength]=\"dataForm.formQuestions[index].question.maxLength\"\r\n [name]=\"dataForm.formQuestions[index].question.value\"\r\n (keydown)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (keypress)=\"validateNotSpace($event)\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n style=\"margin-top: -1rem !important;\" />\r\n </div>\r\n </div>\r\n <div *ngSwitchDefault>Tipo de control no detectado</div>\r\n <div style=\"margin-left: 15px;\"\r\n *ngIf=\"dataForm.formQuestions[index].question.questionType.id != 5 && dataForm.formQuestions[index].question.questionType.id != 6\">\r\n <span class=\"error\" [id]=\"'rq'+dataForm.formQuestions[index].question.value\"\r\n *ngIf=\"validRequired(formDynamic,dataForm.formQuestions[index].question) && watchValid\">\r\n Este campo es obligatorio</span>\r\n <span class=\"error\" [id]=\"'ml'+dataForm.formQuestions[index].question.value\" hidden>\r\n Debe ser m\u00EDnimo de\r\n {{ dataForm.formQuestions[index].question.minLength }} caracteres</span>\r\n <span class=\"error\" [id]=\"'mxl'+dataForm.formQuestions[index].question.value\" hidden>\r\n Debe ser maximo de\r\n {{ dataForm.formQuestions[index].question.maxLength }} caracteres</span>\r\n <span class=\"error\" [id]=\"'char'+dataForm.formQuestions[index].question.value\"\r\n hidden></span>\r\n <span class=\"error\" [id]=\"dataForm.formQuestions[index].question.id\" hidden></span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <section *ngIf=\"isSimpleFlow\">\r\n <div *ngFor=\"let step of steps let index = index;\">\r\n <div [class]=\"dataClassCss.cl12\" *ngIf=\"step.viewData\">\r\n <label for=\"{{step.id}}\" class=\"col-sm-12\" style=\"display: block; text-align: left;\">\r\n <span class=\"h6 small bg-white text-muted\">{{step.step}}</span>\r\n </label>\r\n <select [name]=\"step.step\" [required]=\"true\" [class]=\"dataClassCss.formcontrol\"\r\n id=\"{{step.step}}\" style=\"margin-top: -1rem !important;\" [(ngModel)]=\"step.value\"\r\n (ngModelChange)=\"onChangeStep(step,steps[index+1],$event)\">\r\n <option value=\"\" selected disabled hidden>Selecciona</option>\r\n <ng-container *ngFor=\"let subitem of step.viewData\">\r\n <option [value]=\"subitem.id\">\r\n {{ subitem.description }}\r\n </option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n </div>\r\n </section>\r\n <div class=\"mt-3 text-center\">\r\n <button type=\"button\" [class]=\"dataClassCss.btn\" (click)=\"onSubmit()\" [disabled]=\"!formDynamic.valid\"\r\n id=\"btnIng\">Ingresar</button>\r\n </div>\r\n </form>\r\n </div>\r\n</div>",
1084
1065
  providers: [
1085
1066
  { provide: ngBootstrap.NgbDateAdapter, useClass: CustomAdapter },
1086
1067
  { provide: ngBootstrap.NgbDateParserFormatter, useClass: CustomDateParserFormatter },