iptdevs-design-system 2.6.21 → 2.6.23

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.
Files changed (106) hide show
  1. package/README.md +24 -24
  2. package/esm2020/iptdevs-design-system.mjs +4 -4
  3. package/esm2020/lib/components/atoms/aside-button/aside-button.component.mjs +50 -50
  4. package/esm2020/lib/components/atoms/button/button.component.mjs +64 -64
  5. package/esm2020/lib/components/atoms/checkbox/checkbox.component.mjs +47 -47
  6. package/esm2020/lib/components/atoms/datalist/datalist.component.mjs +94 -94
  7. package/esm2020/lib/components/atoms/input/input.component.mjs +145 -145
  8. package/esm2020/lib/components/atoms/level-button/level-button.component.mjs +64 -64
  9. package/esm2020/lib/components/atoms/level-text/level-text.component.mjs +19 -19
  10. package/esm2020/lib/components/atoms/radio/radio.component.mjs +47 -47
  11. package/esm2020/lib/components/atoms/select/select.component.mjs +92 -92
  12. package/esm2020/lib/components/atoms/text-link/text-link.component.mjs +39 -39
  13. package/esm2020/lib/components/components.module.mjs +113 -113
  14. package/esm2020/lib/components/forms/create-user-form/create-user-form.component.mjs +228 -227
  15. package/esm2020/lib/components/forms/login-form/login-form.component.mjs +93 -93
  16. package/esm2020/lib/components/material.module.mjs +19 -19
  17. package/esm2020/lib/components/molecules/sidenav/sidenav.component.mjs +146 -146
  18. package/esm2020/lib/core/core.module.mjs +46 -46
  19. package/esm2020/lib/core/models/activities/activities.interface.mjs +2 -2
  20. package/esm2020/lib/core/models/attendance/attendance.interface.mjs +2 -2
  21. package/esm2020/lib/core/models/budget/budget.model.mjs +2 -2
  22. package/esm2020/lib/core/models/calendar/calendar-rq.models.mjs +2 -2
  23. package/esm2020/lib/core/models/cod/cod-rq.model.mjs +2 -2
  24. package/esm2020/lib/core/models/course/course-rq.model.mjs +2 -2
  25. package/esm2020/lib/core/models/cronogram/cronogram.models.mjs +2 -2
  26. package/esm2020/lib/core/models/marketing/marketing.model.mjs +2 -2
  27. package/esm2020/lib/core/models/notes/notes.interface.mjs +2 -2
  28. package/esm2020/lib/core/models/response/response.interface.mjs +2 -2
  29. package/esm2020/lib/core/models/session/session.model.mjs +3 -3
  30. package/esm2020/lib/core/models/student/student.interface.mjs +2 -2
  31. package/esm2020/lib/core/models/table/table-rs.model.mjs +2 -2
  32. package/esm2020/lib/core/models/test/test.model.mjs +2 -2
  33. package/esm2020/lib/core/models/url/url.model.mjs +2 -2
  34. package/esm2020/lib/core/models/user/user-rq.model.mjs +2 -2
  35. package/esm2020/lib/core/models/user/user-rs.model.mjs +5 -5
  36. package/esm2020/lib/core/services/attendance-service/attendance.service.mjs +17 -17
  37. package/esm2020/lib/core/services/budget-service/budget-service.mjs +41 -41
  38. package/esm2020/lib/core/services/calendar-service/calendar.service.mjs +34 -34
  39. package/esm2020/lib/core/services/course-service/course-service.model.mjs +75 -75
  40. package/esm2020/lib/core/services/marketing-service/marketing-service.mjs +57 -57
  41. package/esm2020/lib/core/services/notes-service/notes.service.mjs +50 -50
  42. package/esm2020/lib/core/services/parameters-service/parameters.service.mjs +114 -114
  43. package/esm2020/lib/core/services/storage-service/storage-service.mjs +50 -50
  44. package/esm2020/lib/core/services/student-service/student.service.mjs +30 -30
  45. package/esm2020/lib/core/services/switch-service/switch.service.mjs +16 -16
  46. package/esm2020/lib/core/services/test-service/test.service.mjs +136 -136
  47. package/esm2020/lib/core/services/user-service/user-service.mjs +84 -84
  48. package/esm2020/lib/core/utils/base-service/base.service.mjs +153 -153
  49. package/esm2020/lib/core/utils/route-service/route.service.mjs +18 -18
  50. package/esm2020/lib/design-system.module.mjs +36 -36
  51. package/esm2020/public-api.mjs +57 -57
  52. package/fesm2015/iptdevs-design-system.mjs +2014 -2013
  53. package/fesm2015/iptdevs-design-system.mjs.map +1 -1
  54. package/fesm2020/iptdevs-design-system.mjs +2011 -2010
  55. package/fesm2020/iptdevs-design-system.mjs.map +1 -1
  56. package/iptdevs-design-system.d.ts +5 -5
  57. package/lib/components/atoms/aside-button/aside-button.component.d.ts +11 -11
  58. package/lib/components/atoms/button/button.component.d.ts +13 -13
  59. package/lib/components/atoms/checkbox/checkbox.component.d.ts +11 -11
  60. package/lib/components/atoms/datalist/datalist.component.d.ts +20 -20
  61. package/lib/components/atoms/input/input.component.d.ts +26 -26
  62. package/lib/components/atoms/level-button/level-button.component.d.ts +11 -11
  63. package/lib/components/atoms/level-text/level-text.component.d.ts +7 -7
  64. package/lib/components/atoms/radio/radio.component.d.ts +11 -11
  65. package/lib/components/atoms/select/select.component.d.ts +24 -24
  66. package/lib/components/atoms/text-link/text-link.component.d.ts +12 -12
  67. package/lib/components/components.module.d.ts +23 -23
  68. package/lib/components/forms/create-user-form/create-user-form.component.d.ts +36 -36
  69. package/lib/components/forms/login-form/login-form.component.d.ts +13 -13
  70. package/lib/components/material.module.d.ts +11 -11
  71. package/lib/components/molecules/sidenav/sidenav.component.d.ts +22 -22
  72. package/lib/core/core.module.d.ts +6 -6
  73. package/lib/core/models/activities/activities.interface.d.ts +6 -6
  74. package/lib/core/models/attendance/attendance.interface.d.ts +45 -45
  75. package/lib/core/models/budget/budget.model.d.ts +69 -69
  76. package/lib/core/models/calendar/calendar-rq.models.d.ts +27 -27
  77. package/lib/core/models/cod/cod-rq.model.d.ts +51 -51
  78. package/lib/core/models/course/course-rq.model.d.ts +86 -86
  79. package/lib/core/models/cronogram/cronogram.models.d.ts +71 -71
  80. package/lib/core/models/marketing/marketing.model.d.ts +104 -104
  81. package/lib/core/models/notes/notes.interface.d.ts +73 -73
  82. package/lib/core/models/response/response.interface.d.ts +10 -10
  83. package/lib/core/models/session/session.model.d.ts +5 -5
  84. package/lib/core/models/student/student.interface.d.ts +4 -4
  85. package/lib/core/models/table/table-rs.model.d.ts +7 -7
  86. package/lib/core/models/test/test.model.d.ts +219 -219
  87. package/lib/core/models/url/url.model.d.ts +8 -8
  88. package/lib/core/models/user/user-rq.model.d.ts +91 -91
  89. package/lib/core/models/user/user-rs.model.d.ts +35 -35
  90. package/lib/core/services/attendance-service/attendance.service.d.ts +8 -8
  91. package/lib/core/services/budget-service/budget-service.d.ts +16 -16
  92. package/lib/core/services/calendar-service/calendar.service.d.ts +15 -15
  93. package/lib/core/services/course-service/course-service.model.d.ts +24 -24
  94. package/lib/core/services/marketing-service/marketing-service.d.ts +20 -20
  95. package/lib/core/services/notes-service/notes.service.d.ts +19 -19
  96. package/lib/core/services/parameters-service/parameters.service.d.ts +34 -34
  97. package/lib/core/services/storage-service/storage-service.d.ts +18 -18
  98. package/lib/core/services/student-service/student.service.d.ts +14 -14
  99. package/lib/core/services/switch-service/switch.service.d.ts +8 -8
  100. package/lib/core/services/test-service/test.service.d.ts +35 -35
  101. package/lib/core/services/user-service/user-service.d.ts +26 -26
  102. package/lib/core/utils/base-service/base.service.d.ts +18 -18
  103. package/lib/core/utils/route-service/route.service.d.ts +9 -9
  104. package/lib/design-system.module.d.ts +9 -9
  105. package/package.json +1 -1
  106. package/public-api.d.ts +48 -48
@@ -20,2087 +20,2088 @@ import { MatIconModule } from '@angular/material/icon';
20
20
  import { MatButtonModule } from '@angular/material/button';
21
21
  import * as i1$3 from '@angular/router';
22
22
 
23
- class AsideButtonComponent {
24
- constructor() {
25
- this.isClicked = new EventEmitter();
26
- }
27
- clickAction() {
28
- this.isClicked.emit(true);
29
- }
30
- }
31
- AsideButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: AsideButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
32
- AsideButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: AsideButtonComponent, selector: "ipt-aside-button", inputs: { icon: "icon", text: "text", buttonActive: "buttonActive" }, outputs: { isClicked: "isClicked" }, ngImport: i0, template: `
33
- <div [ngSwitch]="buttonActive">
34
- <a *ngSwitchCase="0" class="flex-item-menu__link" (click)="clickAction()">
35
- <img src="{{ icon }}" alt="icon_url" />
36
- <p>{{ text }}</p>
37
- </a>
38
-
39
- <a *ngSwitchCase="1" class="flex-item-menu__link flex-item-active" (click)="clickAction()">
40
- <img src="{{ icon }}" alt="icon_url" />
41
- <p>{{ text }}</p>
42
- </a>
43
- </div>
44
- `, isInline: true, styles: ["*{font-family:Poppins,sans-serif}@media (min-width: 320px){.flex-item-menu__link{cursor:pointer;width:-webkit-fill-available;width:-moz-available;text-decoration:none;display:flex;justify-items:center;padding:.4rem 1rem;transition:all .3s ease 0s;border-radius:30px;margin:15px}.flex-item-menu__link img{cursor:pointer;width:1.4rem;height:1.4rem}.flex-item-menu__link p{cursor:pointer;display:inline;font-weight:500;font-family:Poppins,sans-serif;font-size:.8rem;padding:0 .8rem;margin:auto 0;color:#fff}a:hover,a:focus,.flex-item-menu__link:hover,.flex-item-menu__link p:focus{color:#fff;background-color:#ffffff4f;-webkit-backdrop-filter:blur(100px);backdrop-filter:blur(100px);box-shadow:#0006 0 30px 90px;border-radius:50px}.flex-item-img{width:2.5rem;height:2.5rem;padding:.4rem}.flex-item-active{box-shadow:#0006 0 30px 90px;background:transparent;border:1px solid white}}@media (min-width: 1024px){.flex-item-menu__link{padding:.4rem 1rem}.flex-item-menu__link:focus{border:1px solid white}.flex-item-menu__link img{cursor:pointer;width:1.6rem;height:1.6rem}.flex-item-menu__link p{font-size:1rem;color:#fff}a:hover,a:focus,.flex-item-menu__link:hover,.flex-item-menu__link p:focus{color:#fff;background-color:#ffffff4f;-webkit-backdrop-filter:blur(100px);backdrop-filter:blur(100px);box-shadow:#0006 0 30px 90px}.flex-item-img{width:2.5rem;height:2.5rem;padding:.4rem}}\n"], directives: [{ type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
45
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: AsideButtonComponent, decorators: [{
46
- type: Component,
47
- args: [{ selector: 'ipt-aside-button', template: `
48
- <div [ngSwitch]="buttonActive">
49
- <a *ngSwitchCase="0" class="flex-item-menu__link" (click)="clickAction()">
50
- <img src="{{ icon }}" alt="icon_url" />
51
- <p>{{ text }}</p>
52
- </a>
53
-
54
- <a *ngSwitchCase="1" class="flex-item-menu__link flex-item-active" (click)="clickAction()">
55
- <img src="{{ icon }}" alt="icon_url" />
56
- <p>{{ text }}</p>
57
- </a>
58
- </div>
59
- `, styles: ["*{font-family:Poppins,sans-serif}@media (min-width: 320px){.flex-item-menu__link{cursor:pointer;width:-webkit-fill-available;width:-moz-available;text-decoration:none;display:flex;justify-items:center;padding:.4rem 1rem;transition:all .3s ease 0s;border-radius:30px;margin:15px}.flex-item-menu__link img{cursor:pointer;width:1.4rem;height:1.4rem}.flex-item-menu__link p{cursor:pointer;display:inline;font-weight:500;font-family:Poppins,sans-serif;font-size:.8rem;padding:0 .8rem;margin:auto 0;color:#fff}a:hover,a:focus,.flex-item-menu__link:hover,.flex-item-menu__link p:focus{color:#fff;background-color:#ffffff4f;-webkit-backdrop-filter:blur(100px);backdrop-filter:blur(100px);box-shadow:#0006 0 30px 90px;border-radius:50px}.flex-item-img{width:2.5rem;height:2.5rem;padding:.4rem}.flex-item-active{box-shadow:#0006 0 30px 90px;background:transparent;border:1px solid white}}@media (min-width: 1024px){.flex-item-menu__link{padding:.4rem 1rem}.flex-item-menu__link:focus{border:1px solid white}.flex-item-menu__link img{cursor:pointer;width:1.6rem;height:1.6rem}.flex-item-menu__link p{font-size:1rem;color:#fff}a:hover,a:focus,.flex-item-menu__link:hover,.flex-item-menu__link p:focus{color:#fff;background-color:#ffffff4f;-webkit-backdrop-filter:blur(100px);backdrop-filter:blur(100px);box-shadow:#0006 0 30px 90px}.flex-item-img{width:2.5rem;height:2.5rem;padding:.4rem}}\n"] }]
60
- }], propDecorators: { icon: [{
61
- type: Input
62
- }], text: [{
63
- type: Input
64
- }], buttonActive: [{
65
- type: Input
66
- }], isClicked: [{
67
- type: Output
23
+ class AsideButtonComponent {
24
+ constructor() {
25
+ this.isClicked = new EventEmitter();
26
+ }
27
+ clickAction() {
28
+ this.isClicked.emit(true);
29
+ }
30
+ }
31
+ AsideButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: AsideButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
32
+ AsideButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: AsideButtonComponent, selector: "ipt-aside-button", inputs: { icon: "icon", text: "text", buttonActive: "buttonActive" }, outputs: { isClicked: "isClicked" }, ngImport: i0, template: `
33
+ <div [ngSwitch]="buttonActive">
34
+ <a *ngSwitchCase="0" class="flex-item-menu__link" (click)="clickAction()">
35
+ <img src="{{ icon }}" alt="icon_url" />
36
+ <p>{{ text }}</p>
37
+ </a>
38
+
39
+ <a *ngSwitchCase="1" class="flex-item-menu__link flex-item-active" (click)="clickAction()">
40
+ <img src="{{ icon }}" alt="icon_url" />
41
+ <p>{{ text }}</p>
42
+ </a>
43
+ </div>
44
+ `, isInline: true, styles: ["*{font-family:Poppins,sans-serif}@media (min-width: 320px){.flex-item-menu__link{cursor:pointer;width:-webkit-fill-available;width:-moz-available;text-decoration:none;display:flex;justify-items:center;padding:.4rem 1rem;transition:all .3s ease 0s;border-radius:30px;margin:15px}.flex-item-menu__link img{cursor:pointer;width:1.4rem;height:1.4rem}.flex-item-menu__link p{cursor:pointer;display:inline;font-weight:500;font-family:Poppins,sans-serif;font-size:.8rem;padding:0 .8rem;margin:auto 0;color:#fff}a:hover,a:focus,.flex-item-menu__link:hover,.flex-item-menu__link p:focus{color:#fff;background-color:#ffffff4f;-webkit-backdrop-filter:blur(100px);backdrop-filter:blur(100px);box-shadow:#0006 0 30px 90px;border-radius:50px}.flex-item-img{width:2.5rem;height:2.5rem;padding:.4rem}.flex-item-active{box-shadow:#0006 0 30px 90px;background:transparent;border:1px solid white}}@media (min-width: 1024px){.flex-item-menu__link{padding:.4rem 1rem}.flex-item-menu__link:focus{border:1px solid white}.flex-item-menu__link img{cursor:pointer;width:1.6rem;height:1.6rem}.flex-item-menu__link p{font-size:1rem;color:#fff}a:hover,a:focus,.flex-item-menu__link:hover,.flex-item-menu__link p:focus{color:#fff;background-color:#ffffff4f;-webkit-backdrop-filter:blur(100px);backdrop-filter:blur(100px);box-shadow:#0006 0 30px 90px}.flex-item-img{width:2.5rem;height:2.5rem;padding:.4rem}}\n"], directives: [{ type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: AsideButtonComponent, decorators: [{
46
+ type: Component,
47
+ args: [{ selector: 'ipt-aside-button', template: `
48
+ <div [ngSwitch]="buttonActive">
49
+ <a *ngSwitchCase="0" class="flex-item-menu__link" (click)="clickAction()">
50
+ <img src="{{ icon }}" alt="icon_url" />
51
+ <p>{{ text }}</p>
52
+ </a>
53
+
54
+ <a *ngSwitchCase="1" class="flex-item-menu__link flex-item-active" (click)="clickAction()">
55
+ <img src="{{ icon }}" alt="icon_url" />
56
+ <p>{{ text }}</p>
57
+ </a>
58
+ </div>
59
+ `, styles: ["*{font-family:Poppins,sans-serif}@media (min-width: 320px){.flex-item-menu__link{cursor:pointer;width:-webkit-fill-available;width:-moz-available;text-decoration:none;display:flex;justify-items:center;padding:.4rem 1rem;transition:all .3s ease 0s;border-radius:30px;margin:15px}.flex-item-menu__link img{cursor:pointer;width:1.4rem;height:1.4rem}.flex-item-menu__link p{cursor:pointer;display:inline;font-weight:500;font-family:Poppins,sans-serif;font-size:.8rem;padding:0 .8rem;margin:auto 0;color:#fff}a:hover,a:focus,.flex-item-menu__link:hover,.flex-item-menu__link p:focus{color:#fff;background-color:#ffffff4f;-webkit-backdrop-filter:blur(100px);backdrop-filter:blur(100px);box-shadow:#0006 0 30px 90px;border-radius:50px}.flex-item-img{width:2.5rem;height:2.5rem;padding:.4rem}.flex-item-active{box-shadow:#0006 0 30px 90px;background:transparent;border:1px solid white}}@media (min-width: 1024px){.flex-item-menu__link{padding:.4rem 1rem}.flex-item-menu__link:focus{border:1px solid white}.flex-item-menu__link img{cursor:pointer;width:1.6rem;height:1.6rem}.flex-item-menu__link p{font-size:1rem;color:#fff}a:hover,a:focus,.flex-item-menu__link:hover,.flex-item-menu__link p:focus{color:#fff;background-color:#ffffff4f;-webkit-backdrop-filter:blur(100px);backdrop-filter:blur(100px);box-shadow:#0006 0 30px 90px}.flex-item-img{width:2.5rem;height:2.5rem;padding:.4rem}}\n"] }]
60
+ }], propDecorators: { icon: [{
61
+ type: Input
62
+ }], text: [{
63
+ type: Input
64
+ }], buttonActive: [{
65
+ type: Input
66
+ }], isClicked: [{
67
+ type: Output
68
68
  }] } });
69
69
 
70
- class ButtonComponent {
71
- constructor() {
72
- this.primary = false;
73
- this.size = 'medium';
74
- this.label = 'Button';
75
- this.isEnabled = true;
76
- this.onClick = new EventEmitter();
77
- }
78
- get classes() {
79
- const mode = this.primary && this.isEnabled === true
80
- ? 'ipt-button--primary'
81
- : this.isEnabled === false ? 'ipt-button--primary-disabled'
82
- : 'ipt-button--secondary';
83
- return ['ipt-button', `ipt-button--${this.size}`, mode];
84
- }
85
- }
86
- ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
87
- ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: ButtonComponent, selector: "ipt-button", inputs: { primary: "primary", size: "size", label: "label", buttonType: "buttonType", isEnabled: "isEnabled" }, outputs: { onClick: "onClick" }, ngImport: i0, template: `<button *ngIf="isEnabled"
88
- type="{{ buttonType }}"
89
- (click)="onClick.emit($event)"
90
- [ngClass]="classes"
91
- >
92
- {{ label }}
93
- </button>
94
-
95
- <button *ngIf="!isEnabled"
96
- type="{{ buttonType }}"
97
- [ngClass]="classes"
98
- >
99
- {{ label }}
100
- </button>`, isInline: true, styles: [".ipt-button{font-family:Poppins,sans-serif;font-weight:700;border:0;border-radius:12px;cursor:pointer;display:inline-block;line-height:1;transition:.4s;width:100%;box-shadow:#06182c66 0 0 0 2px,#06182ca6 0 4px 6px -1px,#ffffff14 0 1px inset}.ipt-button:hover{box-shadow:0 10px 20px #1b1b1b80;transform:translateY(-3px)}.ipt-button:active{transform:scale(.99)}.ipt-button--primary{color:#fff;background-color:#1c77f7}.ipt-button--primary-disabled{color:gray;background-color:#fff;border:1px solid gray;box-shadow:none;cursor:not-allowed}.ipt-button--primary-disabled:hover{box-shadow:none;transform:translateY(0)}.ipt-button--secondary{color:#1c77f7;background-color:#fff;box-shadow:#06182c66 0 0 0 2px,#06182ca6 0 4px 6px -1px,#ffffff14 0 1px inset}.ipt-button--small{font-size:12px;padding:10px 16px}.ipt-button--medium{font-size:14px;padding:11px 20px}.ipt-button--large{font-size:16px;padding:12px 24px}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ButtonComponent, decorators: [{
102
- type: Component,
103
- args: [{ selector: 'ipt-button', template: `<button *ngIf="isEnabled"
104
- type="{{ buttonType }}"
105
- (click)="onClick.emit($event)"
106
- [ngClass]="classes"
107
- >
108
- {{ label }}
109
- </button>
110
-
111
- <button *ngIf="!isEnabled"
112
- type="{{ buttonType }}"
113
- [ngClass]="classes"
114
- >
115
- {{ label }}
116
- </button>`, styles: [".ipt-button{font-family:Poppins,sans-serif;font-weight:700;border:0;border-radius:12px;cursor:pointer;display:inline-block;line-height:1;transition:.4s;width:100%;box-shadow:#06182c66 0 0 0 2px,#06182ca6 0 4px 6px -1px,#ffffff14 0 1px inset}.ipt-button:hover{box-shadow:0 10px 20px #1b1b1b80;transform:translateY(-3px)}.ipt-button:active{transform:scale(.99)}.ipt-button--primary{color:#fff;background-color:#1c77f7}.ipt-button--primary-disabled{color:gray;background-color:#fff;border:1px solid gray;box-shadow:none;cursor:not-allowed}.ipt-button--primary-disabled:hover{box-shadow:none;transform:translateY(0)}.ipt-button--secondary{color:#1c77f7;background-color:#fff;box-shadow:#06182c66 0 0 0 2px,#06182ca6 0 4px 6px -1px,#ffffff14 0 1px inset}.ipt-button--small{font-size:12px;padding:10px 16px}.ipt-button--medium{font-size:14px;padding:11px 20px}.ipt-button--large{font-size:16px;padding:12px 24px}\n"] }]
117
- }], propDecorators: { primary: [{
118
- type: Input
119
- }], size: [{
120
- type: Input
121
- }], label: [{
122
- type: Input
123
- }], buttonType: [{
124
- type: Input
125
- }], isEnabled: [{
126
- type: Input
127
- }], onClick: [{
128
- type: Output
70
+ class ButtonComponent {
71
+ constructor() {
72
+ this.primary = false;
73
+ this.size = 'medium';
74
+ this.label = 'Button';
75
+ this.isEnabled = true;
76
+ this.onClick = new EventEmitter();
77
+ }
78
+ get classes() {
79
+ const mode = this.primary && this.isEnabled === true
80
+ ? 'ipt-button--primary'
81
+ : this.isEnabled === false ? 'ipt-button--primary-disabled'
82
+ : 'ipt-button--secondary';
83
+ return ['ipt-button', `ipt-button--${this.size}`, mode];
84
+ }
85
+ }
86
+ ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
87
+ ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: ButtonComponent, selector: "ipt-button", inputs: { primary: "primary", size: "size", label: "label", buttonType: "buttonType", isEnabled: "isEnabled" }, outputs: { onClick: "onClick" }, ngImport: i0, template: `<button *ngIf="isEnabled"
88
+ type="{{ buttonType }}"
89
+ (click)="onClick.emit($event)"
90
+ [ngClass]="classes"
91
+ >
92
+ {{ label }}
93
+ </button>
94
+
95
+ <button *ngIf="!isEnabled"
96
+ type="{{ buttonType }}"
97
+ [ngClass]="classes"
98
+ >
99
+ {{ label }}
100
+ </button>`, isInline: true, styles: [".ipt-button{font-family:Poppins,sans-serif;font-weight:700;border:0;border-radius:12px;cursor:pointer;display:inline-block;line-height:1;transition:.4s;width:100%;box-shadow:#06182c66 0 0 0 2px,#06182ca6 0 4px 6px -1px,#ffffff14 0 1px inset}.ipt-button:hover{box-shadow:0 10px 20px #1b1b1b80;transform:translateY(-3px)}.ipt-button:active{transform:scale(.99)}.ipt-button--primary{color:#fff;background-color:#1c77f7}.ipt-button--primary-disabled{color:gray;background-color:#fff;border:1px solid gray;box-shadow:none;cursor:not-allowed}.ipt-button--primary-disabled:hover{box-shadow:none;transform:translateY(0)}.ipt-button--secondary{color:#1c77f7;background-color:#fff;box-shadow:#06182c66 0 0 0 2px,#06182ca6 0 4px 6px -1px,#ffffff14 0 1px inset}.ipt-button--small{font-size:12px;padding:10px 16px}.ipt-button--medium{font-size:14px;padding:11px 20px}.ipt-button--large{font-size:16px;padding:12px 24px}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ButtonComponent, decorators: [{
102
+ type: Component,
103
+ args: [{ selector: 'ipt-button', template: `<button *ngIf="isEnabled"
104
+ type="{{ buttonType }}"
105
+ (click)="onClick.emit($event)"
106
+ [ngClass]="classes"
107
+ >
108
+ {{ label }}
109
+ </button>
110
+
111
+ <button *ngIf="!isEnabled"
112
+ type="{{ buttonType }}"
113
+ [ngClass]="classes"
114
+ >
115
+ {{ label }}
116
+ </button>`, styles: [".ipt-button{font-family:Poppins,sans-serif;font-weight:700;border:0;border-radius:12px;cursor:pointer;display:inline-block;line-height:1;transition:.4s;width:100%;box-shadow:#06182c66 0 0 0 2px,#06182ca6 0 4px 6px -1px,#ffffff14 0 1px inset}.ipt-button:hover{box-shadow:0 10px 20px #1b1b1b80;transform:translateY(-3px)}.ipt-button:active{transform:scale(.99)}.ipt-button--primary{color:#fff;background-color:#1c77f7}.ipt-button--primary-disabled{color:gray;background-color:#fff;border:1px solid gray;box-shadow:none;cursor:not-allowed}.ipt-button--primary-disabled:hover{box-shadow:none;transform:translateY(0)}.ipt-button--secondary{color:#1c77f7;background-color:#fff;box-shadow:#06182c66 0 0 0 2px,#06182ca6 0 4px 6px -1px,#ffffff14 0 1px inset}.ipt-button--small{font-size:12px;padding:10px 16px}.ipt-button--medium{font-size:14px;padding:11px 20px}.ipt-button--large{font-size:16px;padding:12px 24px}\n"] }]
117
+ }], propDecorators: { primary: [{
118
+ type: Input
119
+ }], size: [{
120
+ type: Input
121
+ }], label: [{
122
+ type: Input
123
+ }], buttonType: [{
124
+ type: Input
125
+ }], isEnabled: [{
126
+ type: Input
127
+ }], onClick: [{
128
+ type: Output
129
129
  }] } });
130
130
 
131
- class CheckboxComponent {
132
- constructor() {
133
- this.checkboxOption = false;
134
- this.onChecked = new EventEmitter();
135
- }
136
- set control(value) {
137
- if (this.formControl !== value) {
138
- this.formControl = value;
139
- }
140
- }
141
- }
142
- CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
143
- CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: CheckboxComponent, selector: "ipt-checkbox", inputs: { checkboxOption: "checkboxOption", control: "control" }, outputs: { onChecked: "onChecked" }, ngImport: i0, template: `
144
- <label class="cont">
145
- <input
146
- class="checkbox"
147
- [formControl]="formControl"
148
- [checked]="checkboxOption"
149
- (click)="onChecked.emit($event)"
150
- type="checkbox">
151
- <span></span>
152
- </label>
153
- `, isInline: true, styles: [".cont{display:flex;align-items:center;transform:scale(1)}@media screen and (min-width: 320px){input[type=checkbox]{height:1rem;width:1.1rem;margin:5px;display:inline-block;-webkit-appearance:none;appearance:none;position:relative;background-color:#1c77f733;border-radius:15%;cursor:pointer;overflow:hidden}input[type=checkbox]:after{content:\"\";display:block;height:.4rem;width:.2rem;border-bottom:.21rem solid white;border-right:.21rem solid white;opacity:0;transform:rotate(45deg) translate(-50%,-50%);position:absolute;top:50%;left:20%;transition:.25s ease}input[type=checkbox]:before{content:\"\";display:block;height:0;width:0;background-color:#1c77f7;border-radius:50%;opacity:.5;transform:translate(-50%,-50%);position:absolute;top:50%;left:50%;transition:.3s ease}input[type=checkbox]:checked:before{height:130%;width:130%;opacity:100%}input[type=checkbox]:checked:after{opacity:100%}span{font-size:1rem}}@media screen and (min-width: 375px){input[type=checkbox]{height:1.2rem;width:1.3rem}input[type=checkbox]:after{height:.5rem;width:.2rem;border-bottom:.21rem solid white;border-right:.21rem solid white}}@media screen and (min-width: 1024px){input[type=checkbox]{height:1.3rem;width:1.4rem}input[type=checkbox]:after{height:.6rem;width:.3rem;border-bottom:.21rem solid white;border-right:.21rem solid white}}\n"], directives: [{ type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
154
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CheckboxComponent, decorators: [{
155
- type: Component,
156
- args: [{ selector: 'ipt-checkbox', template: `
157
- <label class="cont">
158
- <input
159
- class="checkbox"
160
- [formControl]="formControl"
161
- [checked]="checkboxOption"
162
- (click)="onChecked.emit($event)"
163
- type="checkbox">
164
- <span></span>
165
- </label>
166
- `, styles: [".cont{display:flex;align-items:center;transform:scale(1)}@media screen and (min-width: 320px){input[type=checkbox]{height:1rem;width:1.1rem;margin:5px;display:inline-block;-webkit-appearance:none;appearance:none;position:relative;background-color:#1c77f733;border-radius:15%;cursor:pointer;overflow:hidden}input[type=checkbox]:after{content:\"\";display:block;height:.4rem;width:.2rem;border-bottom:.21rem solid white;border-right:.21rem solid white;opacity:0;transform:rotate(45deg) translate(-50%,-50%);position:absolute;top:50%;left:20%;transition:.25s ease}input[type=checkbox]:before{content:\"\";display:block;height:0;width:0;background-color:#1c77f7;border-radius:50%;opacity:.5;transform:translate(-50%,-50%);position:absolute;top:50%;left:50%;transition:.3s ease}input[type=checkbox]:checked:before{height:130%;width:130%;opacity:100%}input[type=checkbox]:checked:after{opacity:100%}span{font-size:1rem}}@media screen and (min-width: 375px){input[type=checkbox]{height:1.2rem;width:1.3rem}input[type=checkbox]:after{height:.5rem;width:.2rem;border-bottom:.21rem solid white;border-right:.21rem solid white}}@media screen and (min-width: 1024px){input[type=checkbox]{height:1.3rem;width:1.4rem}input[type=checkbox]:after{height:.6rem;width:.3rem;border-bottom:.21rem solid white;border-right:.21rem solid white}}\n"] }]
167
- }], propDecorators: { checkboxOption: [{
168
- type: Input
169
- }], control: [{
170
- type: Input
171
- }], onChecked: [{
172
- type: Output
131
+ class CheckboxComponent {
132
+ constructor() {
133
+ this.checkboxOption = false;
134
+ this.onChecked = new EventEmitter();
135
+ }
136
+ set control(value) {
137
+ if (this.formControl !== value) {
138
+ this.formControl = value;
139
+ }
140
+ }
141
+ }
142
+ CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
143
+ CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: CheckboxComponent, selector: "ipt-checkbox", inputs: { checkboxOption: "checkboxOption", control: "control" }, outputs: { onChecked: "onChecked" }, ngImport: i0, template: `
144
+ <label class="cont">
145
+ <input
146
+ class="checkbox"
147
+ [formControl]="formControl"
148
+ [checked]="checkboxOption"
149
+ (click)="onChecked.emit($event)"
150
+ type="checkbox">
151
+ <span></span>
152
+ </label>
153
+ `, isInline: true, styles: [".cont{display:flex;align-items:center;transform:scale(1)}@media screen and (min-width: 320px){input[type=checkbox]{height:1rem;width:1.1rem;margin:5px;display:inline-block;-webkit-appearance:none;appearance:none;position:relative;background-color:#1c77f733;border-radius:15%;cursor:pointer;overflow:hidden}input[type=checkbox]:after{content:\"\";display:block;height:.4rem;width:.2rem;border-bottom:.21rem solid white;border-right:.21rem solid white;opacity:0;transform:rotate(45deg) translate(-50%,-50%);position:absolute;top:50%;left:20%;transition:.25s ease}input[type=checkbox]:before{content:\"\";display:block;height:0;width:0;background-color:#1c77f7;border-radius:50%;opacity:.5;transform:translate(-50%,-50%);position:absolute;top:50%;left:50%;transition:.3s ease}input[type=checkbox]:checked:before{height:130%;width:130%;opacity:100%}input[type=checkbox]:checked:after{opacity:100%}span{font-size:1rem}}@media screen and (min-width: 375px){input[type=checkbox]{height:1.2rem;width:1.3rem}input[type=checkbox]:after{height:.5rem;width:.2rem;border-bottom:.21rem solid white;border-right:.21rem solid white}}@media screen and (min-width: 1024px){input[type=checkbox]{height:1.3rem;width:1.4rem}input[type=checkbox]:after{height:.6rem;width:.3rem;border-bottom:.21rem solid white;border-right:.21rem solid white}}\n"], directives: [{ type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
154
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CheckboxComponent, decorators: [{
155
+ type: Component,
156
+ args: [{ selector: 'ipt-checkbox', template: `
157
+ <label class="cont">
158
+ <input
159
+ class="checkbox"
160
+ [formControl]="formControl"
161
+ [checked]="checkboxOption"
162
+ (click)="onChecked.emit($event)"
163
+ type="checkbox">
164
+ <span></span>
165
+ </label>
166
+ `, styles: [".cont{display:flex;align-items:center;transform:scale(1)}@media screen and (min-width: 320px){input[type=checkbox]{height:1rem;width:1.1rem;margin:5px;display:inline-block;-webkit-appearance:none;appearance:none;position:relative;background-color:#1c77f733;border-radius:15%;cursor:pointer;overflow:hidden}input[type=checkbox]:after{content:\"\";display:block;height:.4rem;width:.2rem;border-bottom:.21rem solid white;border-right:.21rem solid white;opacity:0;transform:rotate(45deg) translate(-50%,-50%);position:absolute;top:50%;left:20%;transition:.25s ease}input[type=checkbox]:before{content:\"\";display:block;height:0;width:0;background-color:#1c77f7;border-radius:50%;opacity:.5;transform:translate(-50%,-50%);position:absolute;top:50%;left:50%;transition:.3s ease}input[type=checkbox]:checked:before{height:130%;width:130%;opacity:100%}input[type=checkbox]:checked:after{opacity:100%}span{font-size:1rem}}@media screen and (min-width: 375px){input[type=checkbox]{height:1.2rem;width:1.3rem}input[type=checkbox]:after{height:.5rem;width:.2rem;border-bottom:.21rem solid white;border-right:.21rem solid white}}@media screen and (min-width: 1024px){input[type=checkbox]{height:1.3rem;width:1.4rem}input[type=checkbox]:after{height:.6rem;width:.3rem;border-bottom:.21rem solid white;border-right:.21rem solid white}}\n"] }]
167
+ }], propDecorators: { checkboxOption: [{
168
+ type: Input
169
+ }], control: [{
170
+ type: Input
171
+ }], onChecked: [{
172
+ type: Output
173
173
  }] } });
174
174
 
175
- class DatalistComponent {
176
- constructor(fb) {
177
- this.disabledSel = false;
178
- this.isChanged = new EventEmitter();
179
- this.clicked = false;
180
- }
181
- optionChanged(event) {
182
- let selectOption = this.datalistData.find(element => element.name == event.target.value);
183
- if (typeof (selectOption) != 'undefined') {
184
- this.isChanged.emit(selectOption.code);
185
- }
186
- else {
187
- this.isChanged.emit('-1');
188
- }
189
- }
190
- click(value) {
191
- this.clicked = value.isTrusted;
192
- }
193
- setDataListValue() {
194
- let selectOption = this.datalistData.find(element => element.code == this.initalData);
195
- if (typeof (selectOption) != 'undefined') {
196
- return selectOption.name;
197
- }
198
- else {
199
- return '';
200
- }
201
- }
202
- get labelClass() {
203
- return this.clicked === false ? 'label' : 'labelUp';
204
- }
205
- }
206
- DatalistComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: DatalistComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
207
- DatalistComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: DatalistComponent, selector: "ipt-datalist", inputs: { datalistId: "datalistId", datalistData: "datalistData", placeHolder: "placeHolder", validateText: "validateText", initalData: "initalData", disabledSel: "disabledSel" }, outputs: { isChanged: "isChanged" }, ngImport: i0, template: `
208
- <div class="input-container">
209
- <label [ngClass]="labelClass">{{ placeHolder }}</label>
210
- <input
211
- type="text"
212
- class="input"
213
- (click)="click($event)"
214
- [attr.list]="datalistId"
215
- (change)="optionChanged($event)"
216
- [disabled]="disabledSel"
217
- [value]="setDataListValue()"
218
- />
219
-
220
- <datalist id="{{ datalistId }}">
221
- <option *ngFor="let item of datalistData; index as i" [value]="item.name">
222
- {{item.id_card}} {{item.name}}
223
- </option>
224
- </datalist>
225
- </div>
226
- `, isInline: true, styles: ["*{font-family:Poppins,sans-serif}.input-container{position:relative;margin-top:30px}.input{box-shadow:#64646f33 0 7px 29px;border-radius:6px;border:none;outline:none;display:block;transition:.2s;font-weight:300;margin:10px 10px -30px;width:-webkit-fill-available;width:-moz-available;height:28px;padding-left:10px;background-color:#fff}.input:hover{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px}.input:focus{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px;transition:0s;border:1.5px solid #1c77f7}.label{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:7px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}.labelUp{color:#1c77f7;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:-20px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }] });
227
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: DatalistComponent, decorators: [{
228
- type: Component,
229
- args: [{ selector: 'ipt-datalist', template: `
230
- <div class="input-container">
231
- <label [ngClass]="labelClass">{{ placeHolder }}</label>
232
- <input
233
- type="text"
234
- class="input"
235
- (click)="click($event)"
236
- [attr.list]="datalistId"
237
- (change)="optionChanged($event)"
238
- [disabled]="disabledSel"
239
- [value]="setDataListValue()"
240
- />
241
-
242
- <datalist id="{{ datalistId }}">
243
- <option *ngFor="let item of datalistData; index as i" [value]="item.name">
244
- {{item.id_card}} {{item.name}}
245
- </option>
246
- </datalist>
247
- </div>
248
- `, styles: ["*{font-family:Poppins,sans-serif}.input-container{position:relative;margin-top:30px}.input{box-shadow:#64646f33 0 7px 29px;border-radius:6px;border:none;outline:none;display:block;transition:.2s;font-weight:300;margin:10px 10px -30px;width:-webkit-fill-available;width:-moz-available;height:28px;padding-left:10px;background-color:#fff}.input:hover{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px}.input:focus{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px;transition:0s;border:1.5px solid #1c77f7}.label{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:7px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}.labelUp{color:#1c77f7;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:-20px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}\n"] }]
249
- }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }]; }, propDecorators: { datalistId: [{
250
- type: Input
251
- }], datalistData: [{
252
- type: Input
253
- }], placeHolder: [{
254
- type: Input
255
- }], validateText: [{
256
- type: Input
257
- }], initalData: [{
258
- type: Input
259
- }], disabledSel: [{
260
- type: Input
261
- }], isChanged: [{
262
- type: Output
175
+ class DatalistComponent {
176
+ constructor(fb) {
177
+ this.disabledSel = false;
178
+ this.isChanged = new EventEmitter();
179
+ this.clicked = false;
180
+ }
181
+ optionChanged(event) {
182
+ let selectOption = this.datalistData.find(element => element.name == event.target.value);
183
+ if (typeof (selectOption) != 'undefined') {
184
+ this.isChanged.emit(selectOption.code);
185
+ }
186
+ else {
187
+ this.isChanged.emit('-1');
188
+ }
189
+ }
190
+ click(value) {
191
+ this.clicked = value.isTrusted;
192
+ }
193
+ setDataListValue() {
194
+ let selectOption = this.datalistData.find(element => element.code == this.initalData);
195
+ if (typeof (selectOption) != 'undefined') {
196
+ return selectOption.name;
197
+ }
198
+ else {
199
+ return '';
200
+ }
201
+ }
202
+ get labelClass() {
203
+ return this.clicked === false ? 'label' : 'labelUp';
204
+ }
205
+ }
206
+ DatalistComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: DatalistComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
207
+ DatalistComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: DatalistComponent, selector: "ipt-datalist", inputs: { datalistId: "datalistId", datalistData: "datalistData", placeHolder: "placeHolder", validateText: "validateText", initalData: "initalData", disabledSel: "disabledSel" }, outputs: { isChanged: "isChanged" }, ngImport: i0, template: `
208
+ <div class="input-container">
209
+ <label [ngClass]="labelClass">{{ placeHolder }}</label>
210
+ <input
211
+ type="text"
212
+ class="input"
213
+ (click)="click($event)"
214
+ [attr.list]="datalistId"
215
+ (change)="optionChanged($event)"
216
+ [disabled]="disabledSel"
217
+ [value]="setDataListValue()"
218
+ />
219
+
220
+ <datalist id="{{ datalistId }}">
221
+ <option *ngFor="let item of datalistData; index as i" [value]="item.name">
222
+ {{item.id_card}} {{item.name}}
223
+ </option>
224
+ </datalist>
225
+ </div>
226
+ `, isInline: true, styles: ["*{font-family:Poppins,sans-serif}.input-container{position:relative;margin-top:30px}.input{box-shadow:#64646f33 0 7px 29px;border-radius:6px;border:none;outline:none;display:block;transition:.2s;font-weight:300;margin:10px 10px -30px;width:-webkit-fill-available;width:-moz-available;height:28px;padding-left:10px;background-color:#fff}.input:hover{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px}.input:focus{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px;transition:0s;border:1.5px solid #1c77f7}.label{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:7px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}.labelUp{color:#1c77f7;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:-20px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }] });
227
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: DatalistComponent, decorators: [{
228
+ type: Component,
229
+ args: [{ selector: 'ipt-datalist', template: `
230
+ <div class="input-container">
231
+ <label [ngClass]="labelClass">{{ placeHolder }}</label>
232
+ <input
233
+ type="text"
234
+ class="input"
235
+ (click)="click($event)"
236
+ [attr.list]="datalistId"
237
+ (change)="optionChanged($event)"
238
+ [disabled]="disabledSel"
239
+ [value]="setDataListValue()"
240
+ />
241
+
242
+ <datalist id="{{ datalistId }}">
243
+ <option *ngFor="let item of datalistData; index as i" [value]="item.name">
244
+ {{item.id_card}} {{item.name}}
245
+ </option>
246
+ </datalist>
247
+ </div>
248
+ `, styles: ["*{font-family:Poppins,sans-serif}.input-container{position:relative;margin-top:30px}.input{box-shadow:#64646f33 0 7px 29px;border-radius:6px;border:none;outline:none;display:block;transition:.2s;font-weight:300;margin:10px 10px -30px;width:-webkit-fill-available;width:-moz-available;height:28px;padding-left:10px;background-color:#fff}.input:hover{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px}.input:focus{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px;transition:0s;border:1.5px solid #1c77f7}.label{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:7px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}.labelUp{color:#1c77f7;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:-20px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}\n"] }]
249
+ }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }]; }, propDecorators: { datalistId: [{
250
+ type: Input
251
+ }], datalistData: [{
252
+ type: Input
253
+ }], placeHolder: [{
254
+ type: Input
255
+ }], validateText: [{
256
+ type: Input
257
+ }], initalData: [{
258
+ type: Input
259
+ }], disabledSel: [{
260
+ type: Input
261
+ }], isChanged: [{
262
+ type: Output
263
263
  }] } });
264
264
 
265
- class InputComponent {
266
- constructor() {
267
- this.data = [];
268
- this.clicked = false;
269
- this.withPipe = false;
270
- this.prefix = '$';
271
- this.thousands = '.';
272
- this.decimal = ',';
273
- this.dateSelected = new EventEmitter();
274
- }
275
- set control(value) {
276
- if (this.formControl !== value) {
277
- this.formControl = value;
278
- }
279
- }
280
- ngOnInit() { }
281
- selectedDate(evt) {
282
- this.dateSelected.emit(evt);
283
- }
284
- click(value) {
285
- this.clicked = value.isTrusted;
286
- }
287
- }
288
- InputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
289
- InputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: InputComponent, selector: "ipt-input", inputs: { inputType: "inputType", placeHolder: "placeHolder", validateText: "validateText", withPipe: "withPipe", list: "list", iconUrl: "iconUrl", control: "control", prefix: "prefix", thousands: "thousands", decimal: "decimal" }, outputs: { dateSelected: "dateSelected" }, ngImport: i0, template: `
290
- <div class="input-container">
291
- <input *ngIf="inputType === 'date'"
292
- class="input"
293
- type="{{ inputType ? 'text' : 'date' }}"
294
- [formControl]="formControl"
295
- (ngModelChange)="selectedDate($event)"
296
- onfocus="this.type='date';"
297
- onblur="javascript: if( !this.value ) this.type='text';"
298
- uib-datepicker-popup="dd/MM/yyyy"
299
- ng-model="inputType"/>
300
-
301
- <input *ngIf="inputType !== 'date' && inputType !== 'time' && !withPipe"
302
- class="input"
303
- type="{{ inputType }}"
304
- [formControl]="formControl"
305
- [attr.list]="list"/>
306
-
307
- <input *ngIf="inputType === 'text' && withPipe"
308
- class="input"
309
- currencyMask
310
- [options]="{ prefix: prefix, thousands: thousands, decimal: decimal, allowNegative: false }"
311
- type="{{ inputType }}"
312
- [formControl]="formControl"
313
- [attr.list]="list"/>
314
-
315
- <input *ngIf="inputType === 'time'"
316
- class="input"
317
- type="time"
318
- [formControl]="formControl"
319
- [min]="'06:00:00'"
320
- max="22:00:00"
321
- step="900"
322
- autocomplete="on"
323
- value="08:00:00"
324
- (click)="click($event)"
325
- />
326
-
327
- <label [ngClass]="{'labelUp': formControl.value !== ''}">{{ placeHolder }}</label>
328
-
329
- <p *ngIf="(formControl.invalid && formControl.value !== '')">
330
- {{ validateText }}
331
- </p>
332
- </div>
333
- `, isInline: true, styles: ["*{font-family:Poppins,sans-serif}@media screen and (min-width: 320px){p{color:#c73a3a;font-size:12px;padding-left:15px}}@media screen and (min-width: 768px){p{color:#c73a3a;font-size:13px;padding-left:15px}}@media screen and (min-width: 1024px){p{color:#c73a3a;font-size:13px;padding-left:15px}}.input-container{position:relative;margin-top:30px}input{box-shadow:#64646f33 0 7px 29px;border-radius:6px;border:none;outline:none;display:block;transition:.2s;font-weight:300;width:-webkit-fill-available;width:-moz-available;height:28px;padding-left:10px;background-color:#fff;-webkit-appearance:none}input:hover{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px}input:focus{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px;transition:0s;border:1.5px solid #1c77f7}label{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:7px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}.input:focus~label,.input:invalid~label{top:-20px;font-size:15px;color:#1c77f7}.labelUp{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:-20px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.CurrencyMaskDirective, selector: "[currencyMask]", inputs: ["max", "min", "options"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
334
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InputComponent, decorators: [{
335
- type: Component,
336
- args: [{ selector: 'ipt-input', template: `
337
- <div class="input-container">
338
- <input *ngIf="inputType === 'date'"
339
- class="input"
340
- type="{{ inputType ? 'text' : 'date' }}"
341
- [formControl]="formControl"
342
- (ngModelChange)="selectedDate($event)"
343
- onfocus="this.type='date';"
344
- onblur="javascript: if( !this.value ) this.type='text';"
345
- uib-datepicker-popup="dd/MM/yyyy"
346
- ng-model="inputType"/>
347
-
348
- <input *ngIf="inputType !== 'date' && inputType !== 'time' && !withPipe"
349
- class="input"
350
- type="{{ inputType }}"
351
- [formControl]="formControl"
352
- [attr.list]="list"/>
353
-
354
- <input *ngIf="inputType === 'text' && withPipe"
355
- class="input"
356
- currencyMask
357
- [options]="{ prefix: prefix, thousands: thousands, decimal: decimal, allowNegative: false }"
358
- type="{{ inputType }}"
359
- [formControl]="formControl"
360
- [attr.list]="list"/>
361
-
362
- <input *ngIf="inputType === 'time'"
363
- class="input"
364
- type="time"
365
- [formControl]="formControl"
366
- [min]="'06:00:00'"
367
- max="22:00:00"
368
- step="900"
369
- autocomplete="on"
370
- value="08:00:00"
371
- (click)="click($event)"
372
- />
373
-
374
- <label [ngClass]="{'labelUp': formControl.value !== ''}">{{ placeHolder }}</label>
375
-
376
- <p *ngIf="(formControl.invalid && formControl.value !== '')">
377
- {{ validateText }}
378
- </p>
379
- </div>
380
- `, styles: ["*{font-family:Poppins,sans-serif}@media screen and (min-width: 320px){p{color:#c73a3a;font-size:12px;padding-left:15px}}@media screen and (min-width: 768px){p{color:#c73a3a;font-size:13px;padding-left:15px}}@media screen and (min-width: 1024px){p{color:#c73a3a;font-size:13px;padding-left:15px}}.input-container{position:relative;margin-top:30px}input{box-shadow:#64646f33 0 7px 29px;border-radius:6px;border:none;outline:none;display:block;transition:.2s;font-weight:300;width:-webkit-fill-available;width:-moz-available;height:28px;padding-left:10px;background-color:#fff;-webkit-appearance:none}input:hover{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px}input:focus{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px;transition:0s;border:1.5px solid #1c77f7}label{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:7px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}.input:focus~label,.input:invalid~label{top:-20px;font-size:15px;color:#1c77f7}.labelUp{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:-20px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}\n"] }]
381
- }], ctorParameters: function () { return []; }, propDecorators: { inputType: [{
382
- type: Input
383
- }], placeHolder: [{
384
- type: Input
385
- }], validateText: [{
386
- type: Input
387
- }], withPipe: [{
388
- type: Input
389
- }], list: [{
390
- type: Input
391
- }], iconUrl: [{
392
- type: Input
393
- }], control: [{
394
- type: Input
395
- }], prefix: [{
396
- type: Input
397
- }], thousands: [{
398
- type: Input
399
- }], decimal: [{
400
- type: Input
401
- }], dateSelected: [{
402
- type: Output
265
+ class InputComponent {
266
+ constructor() {
267
+ this.data = [];
268
+ this.clicked = false;
269
+ this.withPipe = false;
270
+ this.prefix = '$';
271
+ this.thousands = '.';
272
+ this.decimal = ',';
273
+ this.dateSelected = new EventEmitter();
274
+ }
275
+ set control(value) {
276
+ if (this.formControl !== value) {
277
+ this.formControl = value;
278
+ }
279
+ }
280
+ ngOnInit() { }
281
+ selectedDate(evt) {
282
+ this.dateSelected.emit(evt);
283
+ }
284
+ click(value) {
285
+ this.clicked = value.isTrusted;
286
+ }
287
+ }
288
+ InputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
289
+ InputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: InputComponent, selector: "ipt-input", inputs: { inputType: "inputType", placeHolder: "placeHolder", validateText: "validateText", withPipe: "withPipe", list: "list", iconUrl: "iconUrl", control: "control", prefix: "prefix", thousands: "thousands", decimal: "decimal" }, outputs: { dateSelected: "dateSelected" }, ngImport: i0, template: `
290
+ <div class="input-container">
291
+ <input *ngIf="inputType === 'date'"
292
+ class="input"
293
+ type="{{ inputType ? 'text' : 'date' }}"
294
+ [formControl]="formControl"
295
+ (ngModelChange)="selectedDate($event)"
296
+ onfocus="this.type='date';"
297
+ onblur="javascript: if( !this.value ) this.type='text';"
298
+ uib-datepicker-popup="dd/MM/yyyy"
299
+ ng-model="inputType"/>
300
+
301
+ <input *ngIf="inputType !== 'date' && inputType !== 'time' && !withPipe"
302
+ class="input"
303
+ type="{{ inputType }}"
304
+ [formControl]="formControl"
305
+ [attr.list]="list"/>
306
+
307
+ <input *ngIf="inputType === 'text' && withPipe"
308
+ class="input"
309
+ currencyMask
310
+ [options]="{ prefix: prefix, thousands: thousands, decimal: decimal, allowNegative: false }"
311
+ type="{{ inputType }}"
312
+ [formControl]="formControl"
313
+ [attr.list]="list"/>
314
+
315
+ <input *ngIf="inputType === 'time'"
316
+ class="input"
317
+ type="time"
318
+ [formControl]="formControl"
319
+ [min]="'06:00:00'"
320
+ max="22:00:00"
321
+ step="900"
322
+ autocomplete="on"
323
+ value="08:00:00"
324
+ (click)="click($event)"
325
+ />
326
+
327
+ <label [ngClass]="{'labelUp': formControl.value !== ''}">{{ placeHolder }}</label>
328
+
329
+ <p *ngIf="(formControl.invalid && formControl.value !== '')">
330
+ {{ validateText }}
331
+ </p>
332
+ </div>
333
+ `, isInline: true, styles: ["*{font-family:Poppins,sans-serif}@media screen and (min-width: 320px){p{color:#c73a3a;font-size:12px;padding-left:15px}}@media screen and (min-width: 768px){p{color:#c73a3a;font-size:13px;padding-left:15px}}@media screen and (min-width: 1024px){p{color:#c73a3a;font-size:13px;padding-left:15px}}.input-container{position:relative;margin-top:30px}input{box-shadow:#64646f33 0 7px 29px;border-radius:6px;border:none;outline:none;display:block;transition:.2s;font-weight:300;width:-webkit-fill-available;width:-moz-available;height:28px;padding-left:10px;background-color:#fff;-webkit-appearance:none}input:hover{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px}input:focus{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px;transition:0s;border:1.5px solid #1c77f7}label{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:7px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}.input:focus~label,.input:invalid~label{top:-20px;font-size:15px;color:#1c77f7}.labelUp{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:-20px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.CurrencyMaskDirective, selector: "[currencyMask]", inputs: ["max", "min", "options"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
334
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InputComponent, decorators: [{
335
+ type: Component,
336
+ args: [{ selector: 'ipt-input', template: `
337
+ <div class="input-container">
338
+ <input *ngIf="inputType === 'date'"
339
+ class="input"
340
+ type="{{ inputType ? 'text' : 'date' }}"
341
+ [formControl]="formControl"
342
+ (ngModelChange)="selectedDate($event)"
343
+ onfocus="this.type='date';"
344
+ onblur="javascript: if( !this.value ) this.type='text';"
345
+ uib-datepicker-popup="dd/MM/yyyy"
346
+ ng-model="inputType"/>
347
+
348
+ <input *ngIf="inputType !== 'date' && inputType !== 'time' && !withPipe"
349
+ class="input"
350
+ type="{{ inputType }}"
351
+ [formControl]="formControl"
352
+ [attr.list]="list"/>
353
+
354
+ <input *ngIf="inputType === 'text' && withPipe"
355
+ class="input"
356
+ currencyMask
357
+ [options]="{ prefix: prefix, thousands: thousands, decimal: decimal, allowNegative: false }"
358
+ type="{{ inputType }}"
359
+ [formControl]="formControl"
360
+ [attr.list]="list"/>
361
+
362
+ <input *ngIf="inputType === 'time'"
363
+ class="input"
364
+ type="time"
365
+ [formControl]="formControl"
366
+ [min]="'06:00:00'"
367
+ max="22:00:00"
368
+ step="900"
369
+ autocomplete="on"
370
+ value="08:00:00"
371
+ (click)="click($event)"
372
+ />
373
+
374
+ <label [ngClass]="{'labelUp': formControl.value !== ''}">{{ placeHolder }}</label>
375
+
376
+ <p *ngIf="(formControl.invalid && formControl.value !== '')">
377
+ {{ validateText }}
378
+ </p>
379
+ </div>
380
+ `, styles: ["*{font-family:Poppins,sans-serif}@media screen and (min-width: 320px){p{color:#c73a3a;font-size:12px;padding-left:15px}}@media screen and (min-width: 768px){p{color:#c73a3a;font-size:13px;padding-left:15px}}@media screen and (min-width: 1024px){p{color:#c73a3a;font-size:13px;padding-left:15px}}.input-container{position:relative;margin-top:30px}input{box-shadow:#64646f33 0 7px 29px;border-radius:6px;border:none;outline:none;display:block;transition:.2s;font-weight:300;width:-webkit-fill-available;width:-moz-available;height:28px;padding-left:10px;background-color:#fff;-webkit-appearance:none}input:hover{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px}input:focus{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px;transition:0s;border:1.5px solid #1c77f7}label{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:7px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}.input:focus~label,.input:invalid~label{top:-20px;font-size:15px;color:#1c77f7}.labelUp{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:-20px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}\n"] }]
381
+ }], ctorParameters: function () { return []; }, propDecorators: { inputType: [{
382
+ type: Input
383
+ }], placeHolder: [{
384
+ type: Input
385
+ }], validateText: [{
386
+ type: Input
387
+ }], withPipe: [{
388
+ type: Input
389
+ }], list: [{
390
+ type: Input
391
+ }], iconUrl: [{
392
+ type: Input
393
+ }], control: [{
394
+ type: Input
395
+ }], prefix: [{
396
+ type: Input
397
+ }], thousands: [{
398
+ type: Input
399
+ }], decimal: [{
400
+ type: Input
401
+ }], dateSelected: [{
402
+ type: Output
403
403
  }] } });
404
404
 
405
- class LevelButtonComponent {
406
- constructor() {
407
- this.isClicked = new EventEmitter();
408
- }
409
- clickAction() {
410
- this.isClicked.emit(true);
411
- }
412
- }
413
- LevelButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: LevelButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
414
- LevelButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: LevelButtonComponent, selector: "ipt-level-button", inputs: { level: "level", buttonActive: "buttonActive", idColor: "idColor" }, outputs: { isClicked: "isClicked" }, ngImport: i0, template: `
415
- <div [ngSwitch]="buttonActive">
416
- <button
417
- *ngSwitchCase="0"
418
- (click)="clickAction()"
419
- id="level"
420
- class="courses"
421
- >
422
- <p class="p-level">{{ level }}</p>
423
- </button>
424
-
425
- <button
426
- *ngSwitchCase="1"
427
- (click)="clickAction()"
428
- id="{{ idColor }}"
429
- class="courses">
430
- <p class="p-level p-level-active">{{ level }}</p>
431
- </button>
432
- </div>
433
- `, isInline: true, styles: ["*{font-family:Poppins,sans-serif}@media (min-width: 320px){.courses{cursor:pointer;text-decoration:none;display:flex;border-radius:6px;width:100%;height:30px;box-shadow:#06182c66 0 0 0 2px,#06182ca6 0 4px 6px -1px,#ffffff14 0 1px inset;border:none;outline:none;align-items:center;background-color:transparent;color:#1c77f7}.p-level{display:flex;align-items:center;justify-content:center;font-weight:600;font-size:16px}#level-1{background-color:#02eed8}#level-2{background-color:#61acff}#level-3{background-color:#f168f4}#level-4{background-color:#ff3737}#level-5{background-color:#004dfa}#level-6{background-color:#14c25a}#level-7{background-color:#a052da}#level-8{background-color:#f2583d}#level-9{background-color:#291d26}#level-10{background-color:#1c77f7}.p-level-active{color:#fff}}@media (min-width: 375px){.courses{height:40px}.p-level{font-size:18px}}@media (min-width: 425px){.courses{height:30px}}@media (min-width: 768px){.courses{height:40px}}@media (min-width: 1024px){.courses{transition:.6s}.courses:active{transform:scale(1.05);box-shadow:#06182c66 0 0 0 2px,#06182ca6 0 4px 6px -1px,#ffffff14 0 1px inset}.p-level{font-weight:700}}@media (min-width: 1440px){.p-level{font-weight:600}}\n"], directives: [{ type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
434
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: LevelButtonComponent, decorators: [{
435
- type: Component,
436
- args: [{ selector: 'ipt-level-button', template: `
437
- <div [ngSwitch]="buttonActive">
438
- <button
439
- *ngSwitchCase="0"
440
- (click)="clickAction()"
441
- id="level"
442
- class="courses"
443
- >
444
- <p class="p-level">{{ level }}</p>
445
- </button>
446
-
447
- <button
448
- *ngSwitchCase="1"
449
- (click)="clickAction()"
450
- id="{{ idColor }}"
451
- class="courses">
452
- <p class="p-level p-level-active">{{ level }}</p>
453
- </button>
454
- </div>
455
- `, styles: ["*{font-family:Poppins,sans-serif}@media (min-width: 320px){.courses{cursor:pointer;text-decoration:none;display:flex;border-radius:6px;width:100%;height:30px;box-shadow:#06182c66 0 0 0 2px,#06182ca6 0 4px 6px -1px,#ffffff14 0 1px inset;border:none;outline:none;align-items:center;background-color:transparent;color:#1c77f7}.p-level{display:flex;align-items:center;justify-content:center;font-weight:600;font-size:16px}#level-1{background-color:#02eed8}#level-2{background-color:#61acff}#level-3{background-color:#f168f4}#level-4{background-color:#ff3737}#level-5{background-color:#004dfa}#level-6{background-color:#14c25a}#level-7{background-color:#a052da}#level-8{background-color:#f2583d}#level-9{background-color:#291d26}#level-10{background-color:#1c77f7}.p-level-active{color:#fff}}@media (min-width: 375px){.courses{height:40px}.p-level{font-size:18px}}@media (min-width: 425px){.courses{height:30px}}@media (min-width: 768px){.courses{height:40px}}@media (min-width: 1024px){.courses{transition:.6s}.courses:active{transform:scale(1.05);box-shadow:#06182c66 0 0 0 2px,#06182ca6 0 4px 6px -1px,#ffffff14 0 1px inset}.p-level{font-weight:700}}@media (min-width: 1440px){.p-level{font-weight:600}}\n"] }]
456
- }], propDecorators: { level: [{
457
- type: Input
458
- }], buttonActive: [{
459
- type: Input
460
- }], idColor: [{
461
- type: Input
462
- }], isClicked: [{
463
- type: Output
405
+ class LevelButtonComponent {
406
+ constructor() {
407
+ this.isClicked = new EventEmitter();
408
+ }
409
+ clickAction() {
410
+ this.isClicked.emit(true);
411
+ }
412
+ }
413
+ LevelButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: LevelButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
414
+ LevelButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: LevelButtonComponent, selector: "ipt-level-button", inputs: { level: "level", buttonActive: "buttonActive", idColor: "idColor" }, outputs: { isClicked: "isClicked" }, ngImport: i0, template: `
415
+ <div [ngSwitch]="buttonActive">
416
+ <button
417
+ *ngSwitchCase="0"
418
+ (click)="clickAction()"
419
+ id="level"
420
+ class="courses"
421
+ >
422
+ <p class="p-level">{{ level }}</p>
423
+ </button>
424
+
425
+ <button
426
+ *ngSwitchCase="1"
427
+ (click)="clickAction()"
428
+ id="{{ idColor }}"
429
+ class="courses">
430
+ <p class="p-level p-level-active">{{ level }}</p>
431
+ </button>
432
+ </div>
433
+ `, isInline: true, styles: ["*{font-family:Poppins,sans-serif}@media (min-width: 320px){.courses{cursor:pointer;text-decoration:none;display:flex;border-radius:6px;width:100%;height:30px;box-shadow:#06182c66 0 0 0 2px,#06182ca6 0 4px 6px -1px,#ffffff14 0 1px inset;border:none;outline:none;align-items:center;background-color:transparent;color:#1c77f7}.p-level{display:flex;align-items:center;justify-content:center;font-weight:600;font-size:16px}#level-1{background-color:#02eed8}#level-2{background-color:#61acff}#level-3{background-color:#f168f4}#level-4{background-color:#ff3737}#level-5{background-color:#004dfa}#level-6{background-color:#14c25a}#level-7{background-color:#a052da}#level-8{background-color:#f2583d}#level-9{background-color:#291d26}#level-10{background-color:#1c77f7}.p-level-active{color:#fff}}@media (min-width: 375px){.courses{height:40px}.p-level{font-size:18px}}@media (min-width: 425px){.courses{height:30px}}@media (min-width: 768px){.courses{height:40px}}@media (min-width: 1024px){.courses{transition:.6s}.courses:active{transform:scale(1.05);box-shadow:#06182c66 0 0 0 2px,#06182ca6 0 4px 6px -1px,#ffffff14 0 1px inset}.p-level{font-weight:700}}@media (min-width: 1440px){.p-level{font-weight:600}}\n"], directives: [{ type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
434
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: LevelButtonComponent, decorators: [{
435
+ type: Component,
436
+ args: [{ selector: 'ipt-level-button', template: `
437
+ <div [ngSwitch]="buttonActive">
438
+ <button
439
+ *ngSwitchCase="0"
440
+ (click)="clickAction()"
441
+ id="level"
442
+ class="courses"
443
+ >
444
+ <p class="p-level">{{ level }}</p>
445
+ </button>
446
+
447
+ <button
448
+ *ngSwitchCase="1"
449
+ (click)="clickAction()"
450
+ id="{{ idColor }}"
451
+ class="courses">
452
+ <p class="p-level p-level-active">{{ level }}</p>
453
+ </button>
454
+ </div>
455
+ `, styles: ["*{font-family:Poppins,sans-serif}@media (min-width: 320px){.courses{cursor:pointer;text-decoration:none;display:flex;border-radius:6px;width:100%;height:30px;box-shadow:#06182c66 0 0 0 2px,#06182ca6 0 4px 6px -1px,#ffffff14 0 1px inset;border:none;outline:none;align-items:center;background-color:transparent;color:#1c77f7}.p-level{display:flex;align-items:center;justify-content:center;font-weight:600;font-size:16px}#level-1{background-color:#02eed8}#level-2{background-color:#61acff}#level-3{background-color:#f168f4}#level-4{background-color:#ff3737}#level-5{background-color:#004dfa}#level-6{background-color:#14c25a}#level-7{background-color:#a052da}#level-8{background-color:#f2583d}#level-9{background-color:#291d26}#level-10{background-color:#1c77f7}.p-level-active{color:#fff}}@media (min-width: 375px){.courses{height:40px}.p-level{font-size:18px}}@media (min-width: 425px){.courses{height:30px}}@media (min-width: 768px){.courses{height:40px}}@media (min-width: 1024px){.courses{transition:.6s}.courses:active{transform:scale(1.05);box-shadow:#06182c66 0 0 0 2px,#06182ca6 0 4px 6px -1px,#ffffff14 0 1px inset}.p-level{font-weight:700}}@media (min-width: 1440px){.p-level{font-weight:600}}\n"] }]
456
+ }], propDecorators: { level: [{
457
+ type: Input
458
+ }], buttonActive: [{
459
+ type: Input
460
+ }], idColor: [{
461
+ type: Input
462
+ }], isClicked: [{
463
+ type: Output
464
464
  }] } });
465
465
 
466
- class LevelTextComponent {
467
- }
468
- LevelTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: LevelTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
469
- LevelTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: LevelTextComponent, selector: "ipt-level-button", inputs: { level: "level", total: "total" }, ngImport: i0, template: `
470
- <p class="p-table-course">{{ level }}: {{ total }}</p>
471
- `, isInline: true, styles: ["@media (min-width: 320px){.p-table-course{background-color:#4b4a4a;color:#fff;font-size:14px;font-weight:700;padding:5px;width:100%;text-align:center}}@media (min-width: 375px){.p-table-course{background-color:#4b4a4a;color:#fff;font-size:14px;font-weight:700;padding:5px;width:100%;text-align:center}}@media (min-width: 425px){.p-table-course{font-size:18px}}@media (min-width: 1024px){.p-table-course{font-size:20px}}\n"] });
472
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: LevelTextComponent, decorators: [{
473
- type: Component,
474
- args: [{ selector: 'ipt-level-button', template: `
475
- <p class="p-table-course">{{ level }}: {{ total }}</p>
476
- `, styles: ["@media (min-width: 320px){.p-table-course{background-color:#4b4a4a;color:#fff;font-size:14px;font-weight:700;padding:5px;width:100%;text-align:center}}@media (min-width: 375px){.p-table-course{background-color:#4b4a4a;color:#fff;font-size:14px;font-weight:700;padding:5px;width:100%;text-align:center}}@media (min-width: 425px){.p-table-course{font-size:18px}}@media (min-width: 1024px){.p-table-course{font-size:20px}}\n"] }]
477
- }], propDecorators: { level: [{
478
- type: Input
479
- }], total: [{
480
- type: Input
466
+ class LevelTextComponent {
467
+ }
468
+ LevelTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: LevelTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
469
+ LevelTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: LevelTextComponent, selector: "ipt-level-button", inputs: { level: "level", total: "total" }, ngImport: i0, template: `
470
+ <p class="p-table-course">{{ level }}: {{ total }}</p>
471
+ `, isInline: true, styles: ["@media (min-width: 320px){.p-table-course{background-color:#4b4a4a;color:#fff;font-size:14px;font-weight:700;padding:5px;width:100%;text-align:center}}@media (min-width: 375px){.p-table-course{background-color:#4b4a4a;color:#fff;font-size:14px;font-weight:700;padding:5px;width:100%;text-align:center}}@media (min-width: 425px){.p-table-course{font-size:18px}}@media (min-width: 1024px){.p-table-course{font-size:20px}}\n"] });
472
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: LevelTextComponent, decorators: [{
473
+ type: Component,
474
+ args: [{ selector: 'ipt-level-button', template: `
475
+ <p class="p-table-course">{{ level }}: {{ total }}</p>
476
+ `, styles: ["@media (min-width: 320px){.p-table-course{background-color:#4b4a4a;color:#fff;font-size:14px;font-weight:700;padding:5px;width:100%;text-align:center}}@media (min-width: 375px){.p-table-course{background-color:#4b4a4a;color:#fff;font-size:14px;font-weight:700;padding:5px;width:100%;text-align:center}}@media (min-width: 425px){.p-table-course{font-size:18px}}@media (min-width: 1024px){.p-table-course{font-size:20px}}\n"] }]
477
+ }], propDecorators: { level: [{
478
+ type: Input
479
+ }], total: [{
480
+ type: Input
481
481
  }] } });
482
482
 
483
- class RadioComponent {
484
- constructor() {
485
- this.radioOption = false;
486
- this.onSelected = new EventEmitter();
487
- }
488
- set control(value) {
489
- if (this.formControl !== value) {
490
- this.formControl = value;
491
- }
492
- }
493
- }
494
- RadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
495
- RadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: RadioComponent, selector: "ipt-radio", inputs: { radioOption: "radioOption", control: "control" }, outputs: { onSelected: "onSelected" }, ngImport: i0, template: `
496
- <label class="cont">
497
- <input
498
- class="radio"
499
- [formControl]="formControl"
500
- [checked]="radioOption"
501
- (click)="onSelected.emit($event)"
502
- type="radio">
503
- <span></span>
504
- </label>
505
- `, isInline: true, styles: [""], directives: [{ type: i1$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
506
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RadioComponent, decorators: [{
507
- type: Component,
508
- args: [{ selector: 'ipt-radio', template: `
509
- <label class="cont">
510
- <input
511
- class="radio"
512
- [formControl]="formControl"
513
- [checked]="radioOption"
514
- (click)="onSelected.emit($event)"
515
- type="radio">
516
- <span></span>
517
- </label>
518
- `, styles: [""] }]
519
- }], propDecorators: { radioOption: [{
520
- type: Input
521
- }], control: [{
522
- type: Input
523
- }], onSelected: [{
524
- type: Output
483
+ class RadioComponent {
484
+ constructor() {
485
+ this.radioOption = false;
486
+ this.onSelected = new EventEmitter();
487
+ }
488
+ set control(value) {
489
+ if (this.formControl !== value) {
490
+ this.formControl = value;
491
+ }
492
+ }
493
+ }
494
+ RadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
495
+ RadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: RadioComponent, selector: "ipt-radio", inputs: { radioOption: "radioOption", control: "control" }, outputs: { onSelected: "onSelected" }, ngImport: i0, template: `
496
+ <label class="cont">
497
+ <input
498
+ class="radio"
499
+ [formControl]="formControl"
500
+ [checked]="radioOption"
501
+ (click)="onSelected.emit($event)"
502
+ type="radio">
503
+ <span></span>
504
+ </label>
505
+ `, isInline: true, styles: [""], directives: [{ type: i1$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
506
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RadioComponent, decorators: [{
507
+ type: Component,
508
+ args: [{ selector: 'ipt-radio', template: `
509
+ <label class="cont">
510
+ <input
511
+ class="radio"
512
+ [formControl]="formControl"
513
+ [checked]="radioOption"
514
+ (click)="onSelected.emit($event)"
515
+ type="radio">
516
+ <span></span>
517
+ </label>
518
+ `, styles: [""] }]
519
+ }], propDecorators: { radioOption: [{
520
+ type: Input
521
+ }], control: [{
522
+ type: Input
523
+ }], onSelected: [{
524
+ type: Output
525
525
  }] } });
526
526
 
527
- class SelectComponent {
528
- constructor() {
529
- this.boxShadow = 0;
530
- this.clicked = false;
531
- this.disabledSel = false;
532
- this.eventSelect = new EventEmitter();
533
- }
534
- // type viene de otro componente -> indica de que tipo es el arreglo si pregrade, posgrade o modo
535
- set control(value) {
536
- if (this.formControl !== value) {
537
- this.formControl = value;
538
- }
539
- }
540
- ngOnChanges(changes) {
541
- if (changes['data']) {
542
- this.binding = this.defaultText;
543
- }
544
- }
545
- seleccionar(evt) {
546
- if (this.eventSelect.emit(evt) !== this.defaultText) {
547
- this.boxShadow = 1;
548
- }
549
- else {
550
- this.boxShadow = 2;
551
- }
552
- }
553
- click(value) {
554
- this.clicked = value.isTrusted;
555
- }
556
- ngOnInit() {
557
- this.binding = this.defaultText;
558
- }
559
- get textClass() {
560
- return this.defaultText === '' ? 'selected' : 'select';
561
- }
562
- get labelClass() {
563
- return this.clicked === false ? 'label' : 'labelUp';
564
- }
565
- }
566
- SelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
567
- SelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: SelectComponent, selector: "ipt-select", inputs: { isRequired: "isRequired", data: "data", defaultText: "defaultText", selectCode: "selectCode", disabledSel: "disabledSel", control: "control" }, outputs: { eventSelect: "eventSelect" }, usesOnChanges: true, ngImport: i0, template: `
568
- <div class="select-container">
569
- <label [ngClass]="labelClass">{{ defaultText }}</label>
570
- <select
571
- [(ngModel)]="binding"
572
- (ngModelChange)="seleccionar($event)"
573
- (click)="click($event)"
574
- [ngClass]="textClass"
575
- [disabled]="disabledSel">
576
- <option *ngFor="let item of data; index as i" [value]="item.code">
577
- {{ item.name }} {{ item.prefix }}
578
- </option>
579
- </select>
580
- </div>
581
- `, isInline: true, styles: ["*{font-family:Poppins,sans-serif}.select-container{position:relative;margin-top:30px}.select{box-shadow:#64646f33 0 7px 29px;border-radius:6px;border:none;outline:none;display:block;transition:.2s;font-weight:300;width:-webkit-fill-available;width:-moz-available;height:28px;padding-left:10px;background-color:#fff;-webkit-appearance:none}.selected{box-shadow:#64646f33 0 7px 29px;border-radius:6px;border:none;outline:none;transition:.5s;font-weight:300;width:-webkit-fill-available;width:-moz-available;height:28px;background-color:#fff;padding-left:10px}select:hover{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px}.select:focus{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px;transition:0s;border:1.5px solid #1c77f7}.label{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:7px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}.labelUp{color:#1c77f7;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:-20px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }] });
582
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SelectComponent, decorators: [{
583
- type: Component,
584
- args: [{ selector: 'ipt-select', template: `
585
- <div class="select-container">
586
- <label [ngClass]="labelClass">{{ defaultText }}</label>
587
- <select
588
- [(ngModel)]="binding"
589
- (ngModelChange)="seleccionar($event)"
590
- (click)="click($event)"
591
- [ngClass]="textClass"
592
- [disabled]="disabledSel">
593
- <option *ngFor="let item of data; index as i" [value]="item.code">
594
- {{ item.name }} {{ item.prefix }}
595
- </option>
596
- </select>
597
- </div>
598
- `, styles: ["*{font-family:Poppins,sans-serif}.select-container{position:relative;margin-top:30px}.select{box-shadow:#64646f33 0 7px 29px;border-radius:6px;border:none;outline:none;display:block;transition:.2s;font-weight:300;width:-webkit-fill-available;width:-moz-available;height:28px;padding-left:10px;background-color:#fff;-webkit-appearance:none}.selected{box-shadow:#64646f33 0 7px 29px;border-radius:6px;border:none;outline:none;transition:.5s;font-weight:300;width:-webkit-fill-available;width:-moz-available;height:28px;background-color:#fff;padding-left:10px}select:hover{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px}.select:focus{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px;transition:0s;border:1.5px solid #1c77f7}.label{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:7px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}.labelUp{color:#1c77f7;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:-20px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}\n"] }]
599
- }], propDecorators: { isRequired: [{
600
- type: Input
601
- }], data: [{
602
- type: Input
603
- }], defaultText: [{
604
- type: Input
605
- }], selectCode: [{
606
- type: Input
607
- }], disabledSel: [{
608
- type: Input
609
- }], eventSelect: [{
610
- type: Output
611
- }], control: [{
612
- type: Input
527
+ class SelectComponent {
528
+ constructor() {
529
+ this.boxShadow = 0;
530
+ this.clicked = false;
531
+ this.disabledSel = false;
532
+ this.eventSelect = new EventEmitter();
533
+ }
534
+ // type viene de otro componente -> indica de que tipo es el arreglo si pregrade, posgrade o modo
535
+ set control(value) {
536
+ if (this.formControl !== value) {
537
+ this.formControl = value;
538
+ }
539
+ }
540
+ ngOnChanges(changes) {
541
+ if (changes['data']) {
542
+ this.binding = this.defaultText;
543
+ }
544
+ }
545
+ seleccionar(evt) {
546
+ if (this.eventSelect.emit(evt) !== this.defaultText) {
547
+ this.boxShadow = 1;
548
+ }
549
+ else {
550
+ this.boxShadow = 2;
551
+ }
552
+ }
553
+ click(value) {
554
+ this.clicked = value.isTrusted;
555
+ }
556
+ ngOnInit() {
557
+ this.binding = this.defaultText;
558
+ }
559
+ get textClass() {
560
+ return this.defaultText === '' ? 'selected' : 'select';
561
+ }
562
+ get labelClass() {
563
+ return this.clicked === false ? 'label' : 'labelUp';
564
+ }
565
+ }
566
+ SelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
567
+ SelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: SelectComponent, selector: "ipt-select", inputs: { isRequired: "isRequired", data: "data", defaultText: "defaultText", selectCode: "selectCode", disabledSel: "disabledSel", control: "control" }, outputs: { eventSelect: "eventSelect" }, usesOnChanges: true, ngImport: i0, template: `
568
+ <div class="select-container">
569
+ <label [ngClass]="labelClass">{{ defaultText }}</label>
570
+ <select
571
+ [(ngModel)]="binding"
572
+ (ngModelChange)="seleccionar($event)"
573
+ (click)="click($event)"
574
+ [ngClass]="textClass"
575
+ [disabled]="disabledSel">
576
+ <option *ngFor="let item of data; index as i" [value]="item.code">
577
+ {{ item.name }} {{ item.prefix }}
578
+ </option>
579
+ </select>
580
+ </div>
581
+ `, isInline: true, styles: ["*{font-family:Poppins,sans-serif}.select-container{position:relative;margin-top:30px}.select{box-shadow:#64646f33 0 7px 29px;border-radius:6px;border:none;outline:none;display:block;transition:.2s;font-weight:300;width:-webkit-fill-available;width:-moz-available;height:28px;padding-left:10px;background-color:#fff;-webkit-appearance:none}.selected{box-shadow:#64646f33 0 7px 29px;border-radius:6px;border:none;outline:none;transition:.5s;font-weight:300;width:-webkit-fill-available;width:-moz-available;height:28px;background-color:#fff;padding-left:10px}select:hover{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px}.select:focus{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px;transition:0s;border:1.5px solid #1c77f7}.label{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:7px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}.labelUp{color:#1c77f7;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:-20px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }] });
582
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SelectComponent, decorators: [{
583
+ type: Component,
584
+ args: [{ selector: 'ipt-select', template: `
585
+ <div class="select-container">
586
+ <label [ngClass]="labelClass">{{ defaultText }}</label>
587
+ <select
588
+ [(ngModel)]="binding"
589
+ (ngModelChange)="seleccionar($event)"
590
+ (click)="click($event)"
591
+ [ngClass]="textClass"
592
+ [disabled]="disabledSel">
593
+ <option *ngFor="let item of data; index as i" [value]="item.code">
594
+ {{ item.name }} {{ item.prefix }}
595
+ </option>
596
+ </select>
597
+ </div>
598
+ `, styles: ["*{font-family:Poppins,sans-serif}.select-container{position:relative;margin-top:30px}.select{box-shadow:#64646f33 0 7px 29px;border-radius:6px;border:none;outline:none;display:block;transition:.2s;font-weight:300;width:-webkit-fill-available;width:-moz-available;height:28px;padding-left:10px;background-color:#fff;-webkit-appearance:none}.selected{box-shadow:#64646f33 0 7px 29px;border-radius:6px;border:none;outline:none;transition:.5s;font-weight:300;width:-webkit-fill-available;width:-moz-available;height:28px;background-color:#fff;padding-left:10px}select:hover{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px}.select:focus{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px;transition:0s;border:1.5px solid #1c77f7}.label{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:7px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}.labelUp{color:#1c77f7;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:-20px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}\n"] }]
599
+ }], propDecorators: { isRequired: [{
600
+ type: Input
601
+ }], data: [{
602
+ type: Input
603
+ }], defaultText: [{
604
+ type: Input
605
+ }], selectCode: [{
606
+ type: Input
607
+ }], disabledSel: [{
608
+ type: Input
609
+ }], eventSelect: [{
610
+ type: Output
611
+ }], control: [{
612
+ type: Input
613
613
  }] } });
614
614
 
615
- class TextLinkComponent {
616
- constructor() {
617
- this.isClicked = new EventEmitter();
618
- }
619
- isLinkClicked() {
620
- this.isClicked.emit(true);
621
- }
622
- }
623
- TextLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TextLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
624
- TextLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: TextLinkComponent, selector: "ipt-text-link", inputs: { text: "text", blank: "blank", icon: "icon" }, outputs: { isClicked: "isClicked" }, ngImport: i0, template: `
625
- <a class="text-link" (click)='isLinkClicked()'>
626
- <p class="text-link__paragraph">
627
- <i class="{{icon}}" aria-hidden="true"></i>
628
- {{text}}
629
- </p>
630
- </a>
631
- `, isInline: true, styles: [".text-link{font-family:Poppins,sans-serif;font-size:1.1rem;color:gray;display:flex;flex-direction:row}.text-link__image{height:1rem;background-position:center;fill:#0ff;-webkit-print-color-adjust:aqua;color-adjust:aqua}.text-link__paragraph{margin:0;text-align:end}a:hover,a:focus,.text-link:hover,.text-link:focus{color:#1c77f7;cursor:pointer}@media (max-width: 1200px){.text-link{font-size:.9rem;width:160px}}@media (max-width: 450px){.text-link{font-size:.9rem;width:150px}}\n"] });
632
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TextLinkComponent, decorators: [{
633
- type: Component,
634
- args: [{ selector: 'ipt-text-link', template: `
635
- <a class="text-link" (click)='isLinkClicked()'>
636
- <p class="text-link__paragraph">
637
- <i class="{{icon}}" aria-hidden="true"></i>
638
- {{text}}
639
- </p>
640
- </a>
641
- `, styles: [".text-link{font-family:Poppins,sans-serif;font-size:1.1rem;color:gray;display:flex;flex-direction:row}.text-link__image{height:1rem;background-position:center;fill:#0ff;-webkit-print-color-adjust:aqua;color-adjust:aqua}.text-link__paragraph{margin:0;text-align:end}a:hover,a:focus,.text-link:hover,.text-link:focus{color:#1c77f7;cursor:pointer}@media (max-width: 1200px){.text-link{font-size:.9rem;width:160px}}@media (max-width: 450px){.text-link{font-size:.9rem;width:150px}}\n"] }]
642
- }], ctorParameters: function () { return []; }, propDecorators: { text: [{
643
- type: Input
644
- }], blank: [{
645
- type: Input
646
- }], icon: [{
647
- type: Input
648
- }], isClicked: [{
649
- type: Output
615
+ class TextLinkComponent {
616
+ constructor() {
617
+ this.isClicked = new EventEmitter();
618
+ }
619
+ isLinkClicked() {
620
+ this.isClicked.emit(true);
621
+ }
622
+ }
623
+ TextLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TextLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
624
+ TextLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: TextLinkComponent, selector: "ipt-text-link", inputs: { text: "text", blank: "blank", icon: "icon" }, outputs: { isClicked: "isClicked" }, ngImport: i0, template: `
625
+ <a class="text-link" (click)='isLinkClicked()'>
626
+ <p class="text-link__paragraph">
627
+ <i class="{{icon}}" aria-hidden="true"></i>
628
+ {{text}}
629
+ </p>
630
+ </a>
631
+ `, isInline: true, styles: [".text-link{font-family:Poppins,sans-serif;font-size:1.1rem;color:gray;display:flex;flex-direction:row}.text-link__image{height:1rem;background-position:center;fill:#0ff;-webkit-print-color-adjust:aqua;color-adjust:aqua}.text-link__paragraph{margin:0;text-align:end}a:hover,a:focus,.text-link:hover,.text-link:focus{color:#1c77f7;cursor:pointer}@media (max-width: 1200px){.text-link{font-size:.9rem;width:160px}}@media (max-width: 450px){.text-link{font-size:.9rem;width:150px}}\n"] });
632
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TextLinkComponent, decorators: [{
633
+ type: Component,
634
+ args: [{ selector: 'ipt-text-link', template: `
635
+ <a class="text-link" (click)='isLinkClicked()'>
636
+ <p class="text-link__paragraph">
637
+ <i class="{{icon}}" aria-hidden="true"></i>
638
+ {{text}}
639
+ </p>
640
+ </a>
641
+ `, styles: [".text-link{font-family:Poppins,sans-serif;font-size:1.1rem;color:gray;display:flex;flex-direction:row}.text-link__image{height:1rem;background-position:center;fill:#0ff;-webkit-print-color-adjust:aqua;color-adjust:aqua}.text-link__paragraph{margin:0;text-align:end}a:hover,a:focus,.text-link:hover,.text-link:focus{color:#1c77f7;cursor:pointer}@media (max-width: 1200px){.text-link{font-size:.9rem;width:160px}}@media (max-width: 450px){.text-link{font-size:.9rem;width:150px}}\n"] }]
642
+ }], ctorParameters: function () { return []; }, propDecorators: { text: [{
643
+ type: Input
644
+ }], blank: [{
645
+ type: Input
646
+ }], icon: [{
647
+ type: Input
648
+ }], isClicked: [{
649
+ type: Output
650
650
  }] } });
651
651
 
652
- class UserService {
653
- constructor(http) {
654
- this.http = http;
655
- this.SERVICE_URL = 'https://iptdev.com.co/lab/users/api/';
656
- }
657
- login(userLogin) {
658
- let serviceUrl = this.SERVICE_URL + 'post/login';
659
- this.generateRequestParams(userLogin);
660
- return this.http.post(serviceUrl, this.httpOptions);
661
- }
662
- resetPassword(resetPassword) {
663
- let serviceUrl = this.SERVICE_URL + 'reset/password';
664
- this.generateRequestParams(resetPassword);
665
- return this.http.post(serviceUrl, this.httpOptions);
666
- }
667
- register(user) {
668
- let serviceUrl = this.SERVICE_URL + 'post/create/web';
669
- this.generateRequestParams(user);
670
- return this.http.post(serviceUrl, this.httpOptions);
671
- }
672
- registerIndex(register) {
673
- let serviceUrl = this.SERVICE_URL + 'post/create/marketing';
674
- this.generateRequestParams(register);
675
- return this.http.post(serviceUrl, this.httpOptions);
676
- }
677
- registerDashboard(user) {
678
- let serviceUrl = this.SERVICE_URL + 'post/create/dashboard';
679
- this.generateRequestParams(user);
680
- return this.http.post(serviceUrl, this.httpOptions);
681
- }
682
- getAvailableTeachers(token) {
683
- let serviceUrl = this.SERVICE_URL + 'post/obtain/teachers';
684
- this.generateRequestParams(token);
685
- return this.http.post(serviceUrl, this.httpOptions);
686
- }
687
- getAllAdvisor(userToken) {
688
- let serviceUrl = this.SERVICE_URL + 'post/obtain/all/user/commercial';
689
- this.generateRequestParams(userToken);
690
- return this.http.post(serviceUrl, this.httpOptions);
691
- }
692
- getByRoleUser(codeRole) {
693
- let serviceUrl = this.SERVICE_URL + 'get/obtain/by/role/user/' + codeRole;
694
- return this.http.get(serviceUrl);
695
- }
696
- getUserStatistics(userToken) {
697
- let serviceUrl = this.SERVICE_URL + 'get/contact/strategy/statistics';
698
- this.generateRequestParams(userToken);
699
- return this.http.post(serviceUrl, this.httpOptions);
700
- }
701
- getRoutesForRole(token) {
702
- let serviceUrl = this.SERVICE_URL + 'post/routes/role';
703
- this.generateRequestParams(token);
704
- return this.http.post(serviceUrl, this.httpOptions);
705
- }
706
- getStudents(token) {
707
- let serviceUrl = this.SERVICE_URL + 'post/obtain/students';
708
- this.generateRequestParams(token);
709
- return this.http.post(serviceUrl, this.httpOptions);
710
- }
711
- getStudent(token) {
712
- let serviceUrl = this.SERVICE_URL + 'post/obtain/student';
713
- this.generateRequestParams(token);
714
- return this.http.post(serviceUrl, this.httpOptions);
715
- }
716
- generateRequestParams(param) {
717
- this.httpOptions = {
718
- header: new HttpHeaders(),
719
- params: param,
720
- };
721
- }
722
- }
723
- UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: UserService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
724
- UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: UserService, providedIn: 'root' });
725
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: UserService, decorators: [{
726
- type: Injectable,
727
- args: [{
728
- providedIn: 'root',
729
- }]
652
+ class UserService {
653
+ constructor(http) {
654
+ this.http = http;
655
+ this.SERVICE_URL = 'https://iptdev.com.co/lab/users/api/';
656
+ }
657
+ login(userLogin) {
658
+ let serviceUrl = this.SERVICE_URL + 'post/login';
659
+ this.generateRequestParams(userLogin);
660
+ return this.http.post(serviceUrl, this.httpOptions);
661
+ }
662
+ resetPassword(resetPassword) {
663
+ let serviceUrl = this.SERVICE_URL + 'reset/password';
664
+ this.generateRequestParams(resetPassword);
665
+ return this.http.post(serviceUrl, this.httpOptions);
666
+ }
667
+ register(user) {
668
+ let serviceUrl = this.SERVICE_URL + 'post/create/web';
669
+ this.generateRequestParams(user);
670
+ return this.http.post(serviceUrl, this.httpOptions);
671
+ }
672
+ registerIndex(register) {
673
+ let serviceUrl = this.SERVICE_URL + 'post/create/marketing';
674
+ this.generateRequestParams(register);
675
+ return this.http.post(serviceUrl, this.httpOptions);
676
+ }
677
+ registerDashboard(user) {
678
+ let serviceUrl = this.SERVICE_URL + 'post/create/dashboard';
679
+ this.generateRequestParams(user);
680
+ return this.http.post(serviceUrl, this.httpOptions);
681
+ }
682
+ getAvailableTeachers(token) {
683
+ let serviceUrl = this.SERVICE_URL + 'post/obtain/teachers';
684
+ this.generateRequestParams(token);
685
+ return this.http.post(serviceUrl, this.httpOptions);
686
+ }
687
+ getAllAdvisor(userToken) {
688
+ let serviceUrl = this.SERVICE_URL + 'post/obtain/all/user/commercial';
689
+ this.generateRequestParams(userToken);
690
+ return this.http.post(serviceUrl, this.httpOptions);
691
+ }
692
+ getByRoleUser(codeRole) {
693
+ let serviceUrl = this.SERVICE_URL + 'get/obtain/by/role/user/' + codeRole;
694
+ return this.http.get(serviceUrl);
695
+ }
696
+ getUserStatistics(userToken) {
697
+ let serviceUrl = this.SERVICE_URL + 'get/contact/strategy/statistics';
698
+ this.generateRequestParams(userToken);
699
+ return this.http.post(serviceUrl, this.httpOptions);
700
+ }
701
+ getRoutesForRole(token) {
702
+ let serviceUrl = this.SERVICE_URL + 'post/routes/role';
703
+ this.generateRequestParams(token);
704
+ return this.http.post(serviceUrl, this.httpOptions);
705
+ }
706
+ getStudents(token) {
707
+ let serviceUrl = this.SERVICE_URL + 'post/obtain/students';
708
+ this.generateRequestParams(token);
709
+ return this.http.post(serviceUrl, this.httpOptions);
710
+ }
711
+ getStudent(token) {
712
+ let serviceUrl = this.SERVICE_URL + 'post/obtain/student';
713
+ this.generateRequestParams(token);
714
+ return this.http.post(serviceUrl, this.httpOptions);
715
+ }
716
+ generateRequestParams(param) {
717
+ this.httpOptions = {
718
+ header: new HttpHeaders(),
719
+ params: param,
720
+ };
721
+ }
722
+ }
723
+ UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: UserService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
724
+ UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: UserService, providedIn: 'root' });
725
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: UserService, decorators: [{
726
+ type: Injectable,
727
+ args: [{
728
+ providedIn: 'root',
729
+ }]
730
730
  }], ctorParameters: function () { return [{ type: i1$2.HttpClient }]; } });
731
731
 
732
- class StorageService {
733
- constructor() {
734
- this.currentSession = null;
735
- this.localStorageService = localStorage;
736
- this.currentSession = this.loadSessionData();
737
- }
738
- setCurrentSession(session) {
739
- this.currentSession = session;
740
- this.localStorageService.setItem('606a7d4e73650b75ebb06972e77d6cc4', JSON.stringify(session));
741
- }
742
- loadSessionData() {
743
- var sessionStr = this.localStorageService.getItem('606a7d4e73650b75ebb06972e77d6cc4');
744
- return (sessionStr) ? JSON.parse(sessionStr) : null;
745
- }
746
- getCurrentSession() {
747
- return this.currentSession;
748
- }
749
- removeCurrentSession() {
750
- this.localStorageService.removeItem('606a7d4e73650b75ebb06972e77d6cc4');
751
- this.currentSession = null;
752
- }
753
- getCurrentUser() {
754
- var session = this.getCurrentSession();
755
- return (session && session.user) ? session.user : null;
756
- }
757
- ;
758
- isAuthenticated() {
759
- return (this.getCurrentToken() != null) ? true : false;
760
- }
761
- ;
762
- getCurrentToken() {
763
- var session = this.getCurrentSession();
764
- return (session && session.token) ? session.token : null;
765
- }
766
- ;
767
- logout() {
768
- this.removeCurrentSession();
769
- }
770
- }
771
- StorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: StorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
772
- StorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: StorageService, providedIn: 'root' });
773
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: StorageService, decorators: [{
774
- type: Injectable,
775
- args: [{
776
- providedIn: 'root',
777
- }]
732
+ class StorageService {
733
+ constructor() {
734
+ this.currentSession = null;
735
+ this.localStorageService = localStorage;
736
+ this.currentSession = this.loadSessionData();
737
+ }
738
+ setCurrentSession(session) {
739
+ this.currentSession = session;
740
+ this.localStorageService.setItem('606a7d4e73650b75ebb06972e77d6cc4', JSON.stringify(session));
741
+ }
742
+ loadSessionData() {
743
+ var sessionStr = this.localStorageService.getItem('606a7d4e73650b75ebb06972e77d6cc4');
744
+ return (sessionStr) ? JSON.parse(sessionStr) : null;
745
+ }
746
+ getCurrentSession() {
747
+ return this.currentSession;
748
+ }
749
+ removeCurrentSession() {
750
+ this.localStorageService.removeItem('606a7d4e73650b75ebb06972e77d6cc4');
751
+ this.currentSession = null;
752
+ }
753
+ getCurrentUser() {
754
+ var session = this.getCurrentSession();
755
+ return (session && session.user) ? session.user : null;
756
+ }
757
+ ;
758
+ isAuthenticated() {
759
+ return (this.getCurrentToken() != null) ? true : false;
760
+ }
761
+ ;
762
+ getCurrentToken() {
763
+ var session = this.getCurrentSession();
764
+ return (session && session.token) ? session.token : null;
765
+ }
766
+ ;
767
+ logout() {
768
+ this.removeCurrentSession();
769
+ }
770
+ }
771
+ StorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: StorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
772
+ StorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: StorageService, providedIn: 'root' });
773
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: StorageService, decorators: [{
774
+ type: Injectable,
775
+ args: [{
776
+ providedIn: 'root',
777
+ }]
778
778
  }], ctorParameters: function () { return []; } });
779
779
 
780
- class BaseService {
781
- constructor(userService, storageService) {
782
- this.userService = userService;
783
- this.storageService = storageService;
784
- }
785
- webLogin(user, password) {
786
- let request = {
787
- user: user,
788
- password: password
789
- };
790
- let service = this.userService;
791
- let storage = this.storageService;
792
- return new Promise(function (resolve, reject) {
793
- service.login(request).subscribe(response => {
794
- switch (response.message.code) {
795
- case 1:
796
- Swal.fire({
797
- 'title': '<p style="font-family: Poppins"">Perfect!</p>',
798
- 'html': '<p style="font-family: Poppins"">Succesfull login</p>',
799
- 'icon': 'success',
800
- });
801
- const loginRegisterUser = {
802
- token: response.data.token,
803
- user: response.data,
804
- };
805
- storage.setCurrentSession(loginRegisterUser);
806
- resolve(true);
807
- break;
808
- case 2:
809
- Swal.fire({
810
- 'title': '<p style="font-family: Poppins"">Warning!</p>',
811
- 'html': '<p style="font-family: Poppins"">The data does not correspond to a user registered in our system, please review them.</p>',
812
- 'icon': 'warning',
813
- });
814
- resolve(false);
815
- break;
816
- case 3:
817
- Swal.fire({
818
- 'title': '<p style="font-family: Poppins"">Error!</p>',
819
- 'html': '<p style="font-family: Poppins"">The input data does not meet the established parameters.</p>',
820
- 'icon': 'error',
821
- });
822
- resolve(false);
823
- break;
824
- default:
825
- Swal.fire({
826
- 'title': '<p style="font-family: Poppins"">Error!</p>',
827
- 'html': '<p style="font-family: Poppins"">An unexpected error has occurred</p>',
828
- 'icon': 'error',
829
- });
830
- resolve(false);
831
- break;
832
- }
833
- reject('Unhandled exception');
834
- });
835
- });
836
- }
837
- getUserRole() {
838
- var _a;
839
- let user = (_a = this.storageService.getCurrentUser()) === null || _a === void 0 ? void 0 : _a.role;
840
- return user === undefined ? -1 : user;
841
- }
842
- getUserToken() {
843
- var _a;
844
- let token = (_a = this.storageService.getCurrentUser()) === null || _a === void 0 ? void 0 : _a.token;
845
- return token === undefined ? '-1' : token;
846
- }
847
- getUserName() {
848
- let user = this.storageService.getCurrentUser();
849
- let response = user === null ? '' : user.name;
850
- return response;
851
- }
852
- registerUserFromDashboard(registerDashboardRq) {
853
- let request = registerDashboardRq;
854
- let service = this.userService;
855
- return new Promise(function (resolve, reject) {
856
- service.registerDashboard(request).subscribe((response) => {
857
- switch (response.message.code) {
858
- case 1:
859
- Swal.fire({
860
- 'title': '<p style="font-family: Poppins"">Perfect!</p>',
861
- 'html': '<p style="font-family: Poppins"">Sucesfull register!</p>',
862
- 'icon': 'success',
863
- });
864
- resolve(true);
865
- break;
866
- case 3:
867
- Swal.fire({
868
- 'title': '<p style="font-family: Poppins"">Error!</p>',
869
- 'html': '<p style="font-family: Poppins"">The input data does not meet the established parameters.</p>',
870
- 'icon': 'error',
871
- });
872
- resolve(false);
873
- break;
874
- case 4:
875
- Swal.fire({
876
- 'title': '<p style="font-family: Poppins">Ups!</p>',
877
- 'html': '<p style="font-family: Poppins">The input data has a high relation with a user that already exists!</p>',
878
- 'icon': 'warning',
879
- });
880
- resolve(false);
881
- break;
882
- default:
883
- Swal.fire({
884
- 'title': '<p style="font-family: Poppins"">Error!</p>',
885
- 'html': '<p style="font-family: Poppins"">An unexpected error has occurred</p>',
886
- 'icon': 'error',
887
- });
888
- resolve(false);
889
- break;
890
- }
891
- reject('Unhandled exception');
892
- });
893
- });
894
- }
895
- jsonToArray(data) {
896
- var response = [];
897
- data.forEach((element) => {
898
- var object = [];
899
- for (var clave in element) {
900
- if (element.hasOwnProperty(clave)) {
901
- if (typeof element[clave] == 'object') {
902
- element[clave] = this.subJsonToArray(element[clave]);
903
- }
904
- object.push(element[clave]);
905
- }
906
- }
907
- response.push(object);
908
- });
909
- return response;
910
- }
911
- subJsonToArray(data) {
912
- var object = '';
913
- for (var clave in data) {
914
- if (clave != 'code') {
915
- object += '\n' + data[clave];
916
- }
917
- }
918
- return object;
919
- }
920
- }
921
- BaseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: BaseService, deps: [{ token: UserService }, { token: StorageService }], target: i0.ɵɵFactoryTarget.Injectable });
922
- BaseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: BaseService, providedIn: 'root' });
923
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: BaseService, decorators: [{
924
- type: Injectable,
925
- args: [{
926
- providedIn: 'root',
927
- }]
780
+ class BaseService {
781
+ constructor(userService, storageService) {
782
+ this.userService = userService;
783
+ this.storageService = storageService;
784
+ }
785
+ webLogin(user, password) {
786
+ let request = {
787
+ user: user,
788
+ password: password
789
+ };
790
+ let service = this.userService;
791
+ let storage = this.storageService;
792
+ return new Promise(function (resolve, reject) {
793
+ service.login(request).subscribe(response => {
794
+ switch (response.message.code) {
795
+ case 1:
796
+ Swal.fire({
797
+ 'title': '<p style="font-family: Poppins"">Perfect!</p>',
798
+ 'html': '<p style="font-family: Poppins"">Succesfull login</p>',
799
+ 'icon': 'success',
800
+ });
801
+ const loginRegisterUser = {
802
+ token: response.data.token,
803
+ user: response.data,
804
+ };
805
+ storage.setCurrentSession(loginRegisterUser);
806
+ resolve(true);
807
+ break;
808
+ case 2:
809
+ Swal.fire({
810
+ 'title': '<p style="font-family: Poppins"">Warning!</p>',
811
+ 'html': '<p style="font-family: Poppins"">The data does not correspond to a user registered in our system, please review them.</p>',
812
+ 'icon': 'warning',
813
+ });
814
+ resolve(false);
815
+ break;
816
+ case 3:
817
+ Swal.fire({
818
+ 'title': '<p style="font-family: Poppins"">Error!</p>',
819
+ 'html': '<p style="font-family: Poppins"">The input data does not meet the established parameters.</p>',
820
+ 'icon': 'error',
821
+ });
822
+ resolve(false);
823
+ break;
824
+ default:
825
+ Swal.fire({
826
+ 'title': '<p style="font-family: Poppins"">Error!</p>',
827
+ 'html': '<p style="font-family: Poppins"">An unexpected error has occurred</p>',
828
+ 'icon': 'error',
829
+ });
830
+ resolve(false);
831
+ break;
832
+ }
833
+ reject('Unhandled exception');
834
+ });
835
+ });
836
+ }
837
+ getUserRole() {
838
+ var _a;
839
+ let user = (_a = this.storageService.getCurrentUser()) === null || _a === void 0 ? void 0 : _a.role;
840
+ return user === undefined ? -1 : user;
841
+ }
842
+ getUserToken() {
843
+ var _a;
844
+ let token = (_a = this.storageService.getCurrentUser()) === null || _a === void 0 ? void 0 : _a.token;
845
+ return token === undefined ? '-1' : token;
846
+ }
847
+ getUserName() {
848
+ let user = this.storageService.getCurrentUser();
849
+ let response = user === null ? '' : user.name;
850
+ return response;
851
+ }
852
+ registerUserFromDashboard(registerDashboardRq) {
853
+ let request = registerDashboardRq;
854
+ let service = this.userService;
855
+ return new Promise(function (resolve, reject) {
856
+ service.registerDashboard(request).subscribe((response) => {
857
+ switch (response.message.code) {
858
+ case 1:
859
+ Swal.fire({
860
+ 'title': '<p style="font-family: Poppins"">Perfect!</p>',
861
+ 'html': '<p style="font-family: Poppins"">Sucesfull register!</p>',
862
+ 'icon': 'success',
863
+ });
864
+ resolve(true);
865
+ break;
866
+ case 3:
867
+ Swal.fire({
868
+ 'title': '<p style="font-family: Poppins"">Error!</p>',
869
+ 'html': '<p style="font-family: Poppins"">The input data does not meet the established parameters.</p>',
870
+ 'icon': 'error',
871
+ });
872
+ resolve(false);
873
+ break;
874
+ case 4:
875
+ Swal.fire({
876
+ 'title': '<p style="font-family: Poppins">Ups!</p>',
877
+ 'html': '<p style="font-family: Poppins">The input data has a high relation with a user that already exists!</p>',
878
+ 'icon': 'warning',
879
+ });
880
+ resolve(false);
881
+ break;
882
+ default:
883
+ Swal.fire({
884
+ 'title': '<p style="font-family: Poppins"">Error!</p>',
885
+ 'html': '<p style="font-family: Poppins"">An unexpected error has occurred</p>',
886
+ 'icon': 'error',
887
+ });
888
+ resolve(false);
889
+ break;
890
+ }
891
+ reject('Unhandled exception');
892
+ });
893
+ });
894
+ }
895
+ jsonToArray(data) {
896
+ var response = [];
897
+ data.forEach((element) => {
898
+ var object = [];
899
+ for (var clave in element) {
900
+ if (element.hasOwnProperty(clave)) {
901
+ if (typeof element[clave] == 'object') {
902
+ element[clave] = this.subJsonToArray(element[clave]);
903
+ }
904
+ object.push(element[clave]);
905
+ }
906
+ }
907
+ response.push(object);
908
+ });
909
+ return response;
910
+ }
911
+ subJsonToArray(data) {
912
+ var object = '';
913
+ for (var clave in data) {
914
+ if (clave != 'code') {
915
+ object += '\n' + data[clave];
916
+ }
917
+ }
918
+ return object;
919
+ }
920
+ }
921
+ BaseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: BaseService, deps: [{ token: UserService }, { token: StorageService }], target: i0.ɵɵFactoryTarget.Injectable });
922
+ BaseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: BaseService, providedIn: 'root' });
923
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: BaseService, decorators: [{
924
+ type: Injectable,
925
+ args: [{
926
+ providedIn: 'root',
927
+ }]
928
928
  }], ctorParameters: function () { return [{ type: UserService }, { type: StorageService }]; } });
929
929
 
930
- class LoginFormComponent {
931
- constructor(fb, baseService) {
932
- this.baseService = baseService;
933
- this.isLogged = new EventEmitter();
934
- this.loginForm = fb.group({
935
- email: ['', [Validators.required]],
936
- password: ['', [Validators.required, Validators.minLength(3), Validators.maxLength(15)]],
937
- });
938
- }
939
- login(data) {
940
- this.baseService.webLogin(data.controls['email'].value, data.controls['password'].value).then((isLogged) => {
941
- this.isLogged.emit(isLogged);
942
- });
943
- }
944
- }
945
- LoginFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: LoginFormComponent, deps: [{ token: i1$1.FormBuilder }, { token: BaseService }], target: i0.ɵɵFactoryTarget.Component });
946
- LoginFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: LoginFormComponent, selector: "ipt-login-form", outputs: { isLogged: "isLogged" }, ngImport: i0, template: `
947
- <div class="form-container">
948
-
949
- <h2 style="text-align: center;">IPT PLATFORM</h2>
950
- <hr>
951
-
952
- <form (ngSubmit)="login(loginForm)" [formGroup]="loginForm">
953
- <ipt-input
954
- [inputType]="'text'"
955
- [placeHolder]="'Email'"
956
- [validateText]="'Debe ser @inglesparatodos.edu.co'"
957
- [control]="loginForm.controls['email']"
958
- ></ipt-input>
959
-
960
- <ipt-input
961
- [inputType]="'password'"
962
- [placeHolder]="'Password'"
963
- [control]="loginForm.controls['password']"
964
- ></ipt-input>
965
- </form>
966
-
967
- <div class="button-container">
968
- <ipt-button
969
- [label]="'Login'"
970
- [primary]="true"
971
- [isEnabled]="loginForm.valid"
972
- (onClick)="login(loginForm)"
973
- ></ipt-button>
974
- </div>
975
-
976
- </div>
977
- `, isInline: true, styles: [".form-container{display:grid;grid-template-columns:1fr;justify-items:center;width:350px}.with-background{background-color:#fff;border-radius:25px;box-shadow:#32325d40 0 50px 100px -20px,#0000004d 0 30px 60px -30px}h2{color:#1c77f7}hr{width:80%}form{margin-bottom:60px;display:grid;grid-template-columns:1fr;grid-gap:30px;gap:30px;width:100%}.button-container{margin-bottom:70px;align-items:center;display:flex;gap:50px}footer{background-color:#1c77f7;border-top-left-radius:25px;border-top-right-radius:25px;width:100%;height:100px;display:flex;align-items:center;justify-content:center}\n"], components: [{ type: InputComponent, selector: "ipt-input", inputs: ["inputType", "placeHolder", "validateText", "withPipe", "list", "iconUrl", "control", "prefix", "thousands", "decimal"], outputs: ["dateSelected"] }, { type: ButtonComponent, selector: "ipt-button", inputs: ["primary", "size", "label", "buttonType", "isEnabled"], outputs: ["onClick"] }], directives: [{ type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
978
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: LoginFormComponent, decorators: [{
979
- type: Component,
980
- args: [{ selector: 'ipt-login-form', template: `
981
- <div class="form-container">
982
-
983
- <h2 style="text-align: center;">IPT PLATFORM</h2>
984
- <hr>
985
-
986
- <form (ngSubmit)="login(loginForm)" [formGroup]="loginForm">
987
- <ipt-input
988
- [inputType]="'text'"
989
- [placeHolder]="'Email'"
990
- [validateText]="'Debe ser @inglesparatodos.edu.co'"
991
- [control]="loginForm.controls['email']"
992
- ></ipt-input>
993
-
994
- <ipt-input
995
- [inputType]="'password'"
996
- [placeHolder]="'Password'"
997
- [control]="loginForm.controls['password']"
998
- ></ipt-input>
999
- </form>
1000
-
1001
- <div class="button-container">
1002
- <ipt-button
1003
- [label]="'Login'"
1004
- [primary]="true"
1005
- [isEnabled]="loginForm.valid"
1006
- (onClick)="login(loginForm)"
1007
- ></ipt-button>
1008
- </div>
1009
-
1010
- </div>
1011
- `, styles: [".form-container{display:grid;grid-template-columns:1fr;justify-items:center;width:350px}.with-background{background-color:#fff;border-radius:25px;box-shadow:#32325d40 0 50px 100px -20px,#0000004d 0 30px 60px -30px}h2{color:#1c77f7}hr{width:80%}form{margin-bottom:60px;display:grid;grid-template-columns:1fr;grid-gap:30px;gap:30px;width:100%}.button-container{margin-bottom:70px;align-items:center;display:flex;gap:50px}footer{background-color:#1c77f7;border-top-left-radius:25px;border-top-right-radius:25px;width:100%;height:100px;display:flex;align-items:center;justify-content:center}\n"] }]
1012
- }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: BaseService }]; }, propDecorators: { isLogged: [{
1013
- type: Output
930
+ class LoginFormComponent {
931
+ constructor(fb, baseService) {
932
+ this.baseService = baseService;
933
+ this.isLogged = new EventEmitter();
934
+ this.loginForm = fb.group({
935
+ email: ['', [Validators.required]],
936
+ password: ['', [Validators.required, Validators.minLength(3), Validators.maxLength(15)]],
937
+ });
938
+ }
939
+ login(data) {
940
+ this.baseService.webLogin(data.controls['email'].value, data.controls['password'].value).then((isLogged) => {
941
+ this.isLogged.emit(isLogged);
942
+ });
943
+ }
944
+ }
945
+ LoginFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: LoginFormComponent, deps: [{ token: i1$1.FormBuilder }, { token: BaseService }], target: i0.ɵɵFactoryTarget.Component });
946
+ LoginFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: LoginFormComponent, selector: "ipt-login-form", outputs: { isLogged: "isLogged" }, ngImport: i0, template: `
947
+ <div class="form-container">
948
+
949
+ <h2 style="text-align: center;">IPT PLATFORM</h2>
950
+ <hr>
951
+
952
+ <form (ngSubmit)="login(loginForm)" [formGroup]="loginForm">
953
+ <ipt-input
954
+ [inputType]="'text'"
955
+ [placeHolder]="'Email'"
956
+ [validateText]="'Debe ser @inglesparatodos.edu.co'"
957
+ [control]="loginForm.controls['email']"
958
+ ></ipt-input>
959
+
960
+ <ipt-input
961
+ [inputType]="'password'"
962
+ [placeHolder]="'Password'"
963
+ [control]="loginForm.controls['password']"
964
+ ></ipt-input>
965
+ </form>
966
+
967
+ <div class="button-container">
968
+ <ipt-button
969
+ [label]="'Login'"
970
+ [primary]="true"
971
+ [isEnabled]="loginForm.valid"
972
+ (onClick)="login(loginForm)"
973
+ ></ipt-button>
974
+ </div>
975
+
976
+ </div>
977
+ `, isInline: true, styles: [".form-container{display:grid;grid-template-columns:1fr;justify-items:center;width:350px}.with-background{background-color:#fff;border-radius:25px;box-shadow:#32325d40 0 50px 100px -20px,#0000004d 0 30px 60px -30px}h2{color:#1c77f7}hr{width:80%}form{margin-bottom:60px;display:grid;grid-template-columns:1fr;grid-gap:30px;gap:30px;width:100%}.button-container{margin-bottom:70px;align-items:center;display:flex;gap:50px}footer{background-color:#1c77f7;border-top-left-radius:25px;border-top-right-radius:25px;width:100%;height:100px;display:flex;align-items:center;justify-content:center}\n"], components: [{ type: InputComponent, selector: "ipt-input", inputs: ["inputType", "placeHolder", "validateText", "withPipe", "list", "iconUrl", "control", "prefix", "thousands", "decimal"], outputs: ["dateSelected"] }, { type: ButtonComponent, selector: "ipt-button", inputs: ["primary", "size", "label", "buttonType", "isEnabled"], outputs: ["onClick"] }], directives: [{ type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
978
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: LoginFormComponent, decorators: [{
979
+ type: Component,
980
+ args: [{ selector: 'ipt-login-form', template: `
981
+ <div class="form-container">
982
+
983
+ <h2 style="text-align: center;">IPT PLATFORM</h2>
984
+ <hr>
985
+
986
+ <form (ngSubmit)="login(loginForm)" [formGroup]="loginForm">
987
+ <ipt-input
988
+ [inputType]="'text'"
989
+ [placeHolder]="'Email'"
990
+ [validateText]="'Debe ser @inglesparatodos.edu.co'"
991
+ [control]="loginForm.controls['email']"
992
+ ></ipt-input>
993
+
994
+ <ipt-input
995
+ [inputType]="'password'"
996
+ [placeHolder]="'Password'"
997
+ [control]="loginForm.controls['password']"
998
+ ></ipt-input>
999
+ </form>
1000
+
1001
+ <div class="button-container">
1002
+ <ipt-button
1003
+ [label]="'Login'"
1004
+ [primary]="true"
1005
+ [isEnabled]="loginForm.valid"
1006
+ (onClick)="login(loginForm)"
1007
+ ></ipt-button>
1008
+ </div>
1009
+
1010
+ </div>
1011
+ `, styles: [".form-container{display:grid;grid-template-columns:1fr;justify-items:center;width:350px}.with-background{background-color:#fff;border-radius:25px;box-shadow:#32325d40 0 50px 100px -20px,#0000004d 0 30px 60px -30px}h2{color:#1c77f7}hr{width:80%}form{margin-bottom:60px;display:grid;grid-template-columns:1fr;grid-gap:30px;gap:30px;width:100%}.button-container{margin-bottom:70px;align-items:center;display:flex;gap:50px}footer{background-color:#1c77f7;border-top-left-radius:25px;border-top-right-radius:25px;width:100%;height:100px;display:flex;align-items:center;justify-content:center}\n"] }]
1012
+ }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: BaseService }]; }, propDecorators: { isLogged: [{
1013
+ type: Output
1014
1014
  }] } });
1015
1015
 
1016
- class ParameterService {
1017
- constructor(http) {
1018
- this.http = http;
1019
- this.SERVICE_URL = 'https://iptdev.com.co/lab/parameters/api/';
1020
- }
1021
- getIndicatives() {
1022
- let serviceUrl = this.SERVICE_URL + 'get/indicatives';
1023
- return this.http.get(serviceUrl);
1024
- }
1025
- getCardTypes(country) {
1026
- let serviceUrl = this.SERVICE_URL + 'get/id/card/type/country/' + country;
1027
- return this.http.get(serviceUrl);
1028
- }
1029
- getCountries() {
1030
- let serviceUrl = this.SERVICE_URL + 'get/countries';
1031
- return this.http.get(serviceUrl);
1032
- }
1033
- getStatesByCountry(country) {
1034
- let serviceUrl = this.SERVICE_URL + 'get/state/country/iso/' + country;
1035
- return this.http.get(serviceUrl);
1036
- }
1037
- getCitiesByState(state) {
1038
- let serviceUrl = this.SERVICE_URL + 'get/cities/state/' + state;
1039
- return this.http.get(serviceUrl);
1040
- }
1041
- getAllPlans() {
1042
- let serviceUrl = this.SERVICE_URL + 'get/all/plans';
1043
- return this.http.get(serviceUrl);
1044
- }
1045
- getLevels() {
1046
- let serviceUrl = this.SERVICE_URL + 'get/english/levels';
1047
- return this.http.get(serviceUrl);
1048
- }
1049
- getAgreements() {
1050
- let serviceUrl = this.SERVICE_URL + 'get/all/agreement';
1051
- return this.http.get(serviceUrl);
1052
- }
1053
- getAgreementByCategory(typeCategory) {
1054
- let serviceUrl = this.SERVICE_URL + 'get/agreement/by/category/' + typeCategory;
1055
- return this.http.get(serviceUrl);
1056
- }
1057
- getAllClassrooms() {
1058
- let serviceUrl = this.SERVICE_URL + 'get/all/classroom';
1059
- return this.http.get(serviceUrl);
1060
- }
1061
- getCoursesTypes() {
1062
- let serviceUrl = this.SERVICE_URL + 'get/all/course/type';
1063
- return this.http.get(serviceUrl);
1064
- }
1065
- getCoursesTypesByPlan(typePlan) {
1066
- let serviceUrl = this.SERVICE_URL + 'get/course/by/plan/' + typePlan;
1067
- return this.http.get(serviceUrl);
1068
- }
1069
- getDegrees() {
1070
- let serviceUrl = this.SERVICE_URL + 'get/all/degrees';
1071
- return this.http.get(serviceUrl);
1072
- }
1073
- getProgramsByDegree(typeDegree) {
1074
- let serviceUrl = this.SERVICE_URL + 'get/programs/by/degree/' + typeDegree;
1075
- return this.http.get(serviceUrl);
1076
- }
1077
- getMarketingReasons() {
1078
- let serviceUrl = this.SERVICE_URL + 'get/all/mkt/reasons';
1079
- return this.http.get(serviceUrl);
1080
- }
1081
- getStudyReasons() {
1082
- let serviceUrl = this.SERVICE_URL + 'get/all/study/reasons';
1083
- return this.http.get(serviceUrl);
1084
- }
1085
- getAcademicUnits() {
1086
- let serviceUrl = this.SERVICE_URL + 'get/academic/units';
1087
- return this.http.get(serviceUrl);
1088
- }
1089
- getStatusContact() {
1090
- let serviceUrl = this.SERVICE_URL + 'get/contact/status/all';
1091
- return this.http.get(serviceUrl);
1092
- }
1093
- getTypePlan() {
1094
- let serviceUrl = this.SERVICE_URL + 'get/all/plans';
1095
- return this.http.get(serviceUrl);
1096
- }
1097
- getTypePlanDiscount() {
1098
- let serviceUrl = this.SERVICE_URL + 'get/discount/all/plans';
1099
- return this.http.get(serviceUrl);
1100
- }
1101
- getContactedType() {
1102
- let serviceUrl = this.SERVICE_URL + 'get/contact/contacted/all';
1103
- return this.http.get(serviceUrl);
1104
- }
1105
- getStatusByCode(codeStatus) {
1106
- let serviceUrl = this.SERVICE_URL + 'get/contact/status/bycode/' + codeStatus;
1107
- return this.http.get(serviceUrl);
1108
- }
1109
- getAllTypeDiscount() {
1110
- let serviceUrl = this.SERVICE_URL + 'get/commercial/typediscounts/all';
1111
- return this.http.get(serviceUrl);
1112
- }
1113
- getAllCourseModality() {
1114
- let serviceUrl = this.SERVICE_URL + 'get/all/course/modality';
1115
- return this.http.get(serviceUrl);
1116
- }
1117
- }
1118
- ParameterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ParameterService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1119
- ParameterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ParameterService, providedIn: 'root' });
1120
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ParameterService, decorators: [{
1121
- type: Injectable,
1122
- args: [{
1123
- providedIn: 'root',
1124
- }]
1016
+ class ParameterService {
1017
+ constructor(http) {
1018
+ this.http = http;
1019
+ this.SERVICE_URL = 'https://iptdev.com.co/lab/parameters/api/';
1020
+ }
1021
+ getIndicatives() {
1022
+ let serviceUrl = this.SERVICE_URL + 'get/indicatives';
1023
+ return this.http.get(serviceUrl);
1024
+ }
1025
+ getCardTypes(country) {
1026
+ let serviceUrl = this.SERVICE_URL + 'get/id/card/type/country/' + country;
1027
+ return this.http.get(serviceUrl);
1028
+ }
1029
+ getCountries() {
1030
+ let serviceUrl = this.SERVICE_URL + 'get/countries';
1031
+ return this.http.get(serviceUrl);
1032
+ }
1033
+ getStatesByCountry(country) {
1034
+ let serviceUrl = this.SERVICE_URL + 'get/state/country/iso/' + country;
1035
+ return this.http.get(serviceUrl);
1036
+ }
1037
+ getCitiesByState(state) {
1038
+ let serviceUrl = this.SERVICE_URL + 'get/cities/state/' + state;
1039
+ return this.http.get(serviceUrl);
1040
+ }
1041
+ getAllPlans() {
1042
+ let serviceUrl = this.SERVICE_URL + 'get/all/plans';
1043
+ return this.http.get(serviceUrl);
1044
+ }
1045
+ getLevels() {
1046
+ let serviceUrl = this.SERVICE_URL + 'get/english/levels';
1047
+ return this.http.get(serviceUrl);
1048
+ }
1049
+ getAgreements() {
1050
+ let serviceUrl = this.SERVICE_URL + 'get/all/agreement';
1051
+ return this.http.get(serviceUrl);
1052
+ }
1053
+ getAgreementByCategory(typeCategory) {
1054
+ let serviceUrl = this.SERVICE_URL + 'get/agreement/by/category/' + typeCategory;
1055
+ return this.http.get(serviceUrl);
1056
+ }
1057
+ getAllClassrooms() {
1058
+ let serviceUrl = this.SERVICE_URL + 'get/all/classroom';
1059
+ return this.http.get(serviceUrl);
1060
+ }
1061
+ getCoursesTypes() {
1062
+ let serviceUrl = this.SERVICE_URL + 'get/all/course/type';
1063
+ return this.http.get(serviceUrl);
1064
+ }
1065
+ getCoursesTypesByPlan(typePlan) {
1066
+ let serviceUrl = this.SERVICE_URL + 'get/course/by/plan/' + typePlan;
1067
+ return this.http.get(serviceUrl);
1068
+ }
1069
+ getDegrees() {
1070
+ let serviceUrl = this.SERVICE_URL + 'get/all/degrees';
1071
+ return this.http.get(serviceUrl);
1072
+ }
1073
+ getProgramsByDegree(typeDegree) {
1074
+ let serviceUrl = this.SERVICE_URL + 'get/programs/by/degree/' + typeDegree;
1075
+ return this.http.get(serviceUrl);
1076
+ }
1077
+ getMarketingReasons() {
1078
+ let serviceUrl = this.SERVICE_URL + 'get/all/mkt/reasons';
1079
+ return this.http.get(serviceUrl);
1080
+ }
1081
+ getStudyReasons() {
1082
+ let serviceUrl = this.SERVICE_URL + 'get/all/study/reasons';
1083
+ return this.http.get(serviceUrl);
1084
+ }
1085
+ getAcademicUnits() {
1086
+ let serviceUrl = this.SERVICE_URL + 'get/academic/units';
1087
+ return this.http.get(serviceUrl);
1088
+ }
1089
+ getStatusContact() {
1090
+ let serviceUrl = this.SERVICE_URL + 'get/contact/status/all';
1091
+ return this.http.get(serviceUrl);
1092
+ }
1093
+ getTypePlan() {
1094
+ let serviceUrl = this.SERVICE_URL + 'get/all/plans';
1095
+ return this.http.get(serviceUrl);
1096
+ }
1097
+ getTypePlanDiscount() {
1098
+ let serviceUrl = this.SERVICE_URL + 'get/discount/all/plans';
1099
+ return this.http.get(serviceUrl);
1100
+ }
1101
+ getContactedType() {
1102
+ let serviceUrl = this.SERVICE_URL + 'get/contact/contacted/all';
1103
+ return this.http.get(serviceUrl);
1104
+ }
1105
+ getStatusByCode(codeStatus) {
1106
+ let serviceUrl = this.SERVICE_URL + 'get/contact/status/bycode/' + codeStatus;
1107
+ return this.http.get(serviceUrl);
1108
+ }
1109
+ getAllTypeDiscount() {
1110
+ let serviceUrl = this.SERVICE_URL + 'get/commercial/typediscounts/all';
1111
+ return this.http.get(serviceUrl);
1112
+ }
1113
+ getAllCourseModality() {
1114
+ let serviceUrl = this.SERVICE_URL + 'get/all/course/modality';
1115
+ return this.http.get(serviceUrl);
1116
+ }
1117
+ }
1118
+ ParameterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ParameterService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1119
+ ParameterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ParameterService, providedIn: 'root' });
1120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ParameterService, decorators: [{
1121
+ type: Injectable,
1122
+ args: [{
1123
+ providedIn: 'root',
1124
+ }]
1125
1125
  }], ctorParameters: function () { return [{ type: i1$2.HttpClient }]; } });
1126
1126
 
1127
- class CreateUserFormComponent {
1128
- constructor(fb, parameterService, userService) {
1129
- this.fb = fb;
1130
- this.parameterService = parameterService;
1131
- this.userService = userService;
1132
- this.visibility = false;
1133
- this.userCreated = new EventEmitter(false);
1134
- this.onHide = new EventEmitter(false);
1135
- this.loader = false;
1136
- this.photo = '';
1137
- }
1138
- ngOnInit() {
1139
- this.initForm();
1140
- this.getParameters();
1141
- }
1142
- closeModal() {
1143
- this.visibility = false;
1144
- this.onHide.emit(true);
1145
- }
1146
- createUser() {
1147
- this.loader = true;
1148
- let request = {
1149
- name: this.createUserForm.controls['name'].value,
1150
- last_name: this.createUserForm.controls['last_name'].value,
1151
- id_card_type: this.createUserForm.controls['id_card_type'].value,
1152
- id_card: this.createUserForm.controls['id_card'].value,
1153
- phone_indicative: this.createUserForm.controls['phone_indicative'].value,
1154
- phone_number: this.createUserForm.controls['phone_number'].value,
1155
- email: this.createUserForm.controls['email'].value,
1156
- city: this.createUserForm.controls['city'].value,
1157
- service_hour: this.createUserForm.controls['service_hour'].value,
1158
- role: this.createUserForm.controls['role'].value,
1159
- password: this.createUserForm.controls['password'].value,
1160
- };
1161
- this.userService.registerDashboard(request).subscribe((response) => {
1162
- console.log(response.message);
1163
- switch (response.message.code) {
1164
- case 1:
1165
- this.userCreated.emit(true);
1166
- break;
1167
- case 2:
1168
- throw new Error("Los datos ingresados no corresponden a un usuario registrado en nuestro sistema, por favor reviselos.");
1169
- case 3:
1170
- throw new Error("Los datos ingresados no cumplen los parámetros establecidos");
1171
- default:
1172
- break;
1173
- }
1174
- this.loader = false;
1175
- });
1176
- }
1177
- getParameters() {
1178
- this.parameterService.getIndicatives().subscribe((response) => {
1179
- this.phoneNumberIndicatives = response.data;
1180
- });
1181
- this.parameterService.getCardTypes('col').subscribe((response) => {
1182
- this.idTypes = response.data;
1183
- });
1184
- this.parameterService.getStatesByCountry('col').subscribe((response) => {
1185
- this.states = response.data;
1186
- });
1187
- }
1188
- getRolesOptions() {
1189
- // Estudiante
1190
- if (this.userType === 'student') {
1191
- this.setPhoto('student');
1192
- return [
1193
- { code: '13', name: 'Student' },
1194
- ];
1195
- }
1196
- // Académico
1197
- if (this.userType === 'academic') {
1198
- this.setPhoto('academic');
1199
- return [
1200
- { code: '11', name: 'Teacher PRO' },
1201
- { code: '12', name: 'Teacher' },
1202
- ];
1203
- }
1204
- // Administrativo
1205
- if (this.userType === 'administrative') {
1206
- this.setPhoto('administrative');
1207
- return [
1208
- { code: '31', name: 'Administrative Supervisor' },
1209
- { code: '32', name: 'Administrative Advisor' },
1210
- ];
1211
- }
1212
- // Marketing
1213
- if (this.userType === 'marketing') {
1214
- this.setPhoto('marketing');
1215
- return [
1216
- { code: '21', name: 'Marketing Supervisor' },
1217
- { code: '22', name: 'Marketing Advisor' },
1218
- ];
1219
- }
1220
- // Comercial
1221
- if (this.userType === 'commercial') {
1222
- this.setPhoto('commercial');
1223
- return [
1224
- { code: '41', name: 'Commercial Supervisor' },
1225
- { code: '42', name: 'Commercial Advisor' },
1226
- ];
1227
- }
1228
- // Cartera
1229
- if (this.userType === 'treasure') {
1230
- this.setPhoto('treasure');
1231
- return [
1232
- { code: '51', name: 'Treauser Supervisor' },
1233
- { code: '52', name: 'Treauser Advisor' },
1234
- ];
1235
- }
1236
- }
1237
- initForm() {
1238
- this.createUserForm = this.fb.group({
1239
- name: ['', [Validators.required, Validators.minLength(3), Validators.maxLength(32)],],
1240
- last_name: ['', [Validators.required, Validators.minLength(5), Validators.maxLength(32),],],
1241
- email: ['', [Validators.required, Validators.maxLength(300)]],
1242
- id_card_type: ['', [Validators.required]],
1243
- id_card: ['', [Validators.required, Validators.minLength(5), Validators.maxLength(20),]],
1244
- phone_indicative: ['', [Validators.required]],
1245
- city: ['', [Validators.required]],
1246
- role: ['', [Validators.required]],
1247
- service_hour: ['', [Validators.required]],
1248
- phone_number: ['', [Validators.required, Validators.minLength(10), Validators.maxLength(15)]],
1249
- password: ['', [Validators.required, Validators.minLength(7), Validators.maxLength(32)]],
1250
- re_password: ['', [Validators.required, Validators.minLength(7), Validators.maxLength(32)]],
1251
- state: [''],
1252
- });
1253
- }
1254
- setPhoto(type) {
1255
- if (type === 'student')
1256
- this.photo = '../../../assets/user-form-assets/estudiante.jpg';
1257
- if (type === 'academic')
1258
- this.photo = '../../../assets/user-form-assets/academico.png';
1259
- if (type === 'administrative')
1260
- this.photo = '../../../assets/user-form-assets/administrativo.jpg';
1261
- if (type === 'marketing')
1262
- this.photo = '../../../assets/user-form-assets/marketing.jpg';
1263
- if (type === 'commercial')
1264
- this.photo = '../../../assets/user-form-assets/comercial.jpg';
1265
- if (type === 'treasure')
1266
- this.photo = '../../../assets/user-form-assets/administrativo.jpg';
1267
- }
1268
- selectRol(role) {
1269
- if (role !== 'Seleccione el rol') {
1270
- this.createUserForm.controls['role'].setValue(role);
1271
- }
1272
- else {
1273
- this.createUserForm.controls['role'].setValue(null);
1274
- }
1275
- }
1276
- selectIndicatives(indicative) {
1277
- if (indicative !== 'Seleccione el indicativo') {
1278
- this.createUserForm.controls['phone_indicative'].setValue(indicative);
1279
- }
1280
- else {
1281
- this.createUserForm.controls['phone_indicative'].setValue(null);
1282
- }
1283
- }
1284
- selectIdType(idType) {
1285
- if (idType !== 'Ingrese el tipo de documento') {
1286
- this.createUserForm.controls['id_card_type'].setValue(idType);
1287
- }
1288
- else {
1289
- this.createUserForm.controls['id_card_type'].setValue(null);
1290
- }
1291
- }
1292
- selectState(state) {
1293
- if (state !== 'Seleccione el departamento') {
1294
- this.createUserForm.controls['state'].setValue(state);
1295
- this.parameterService.getCitiesByState(state).subscribe((response) => {
1296
- this.cities = response.data;
1297
- });
1298
- }
1299
- else {
1300
- this.createUserForm.controls['state'].setValue(null);
1301
- this.createUserForm.controls['city'].setValue(null);
1302
- this.cities = [];
1303
- }
1304
- }
1305
- selectCity(city) {
1306
- if (city !== 'Ciudad de residencia') {
1307
- this.createUserForm.controls['city'].setValue(city);
1308
- }
1309
- else {
1310
- this.createUserForm.controls['city'].setValue(null);
1311
- }
1312
- }
1313
- }
1314
- CreateUserFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CreateUserFormComponent, deps: [{ token: i1$1.FormBuilder }, { token: ParameterService }, { token: UserService }], target: i0.ɵɵFactoryTarget.Component });
1315
- CreateUserFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: CreateUserFormComponent, selector: "ipt-create-user-form", inputs: { userType: "userType", visibility: "visibility" }, outputs: { userCreated: "userCreated", onHide: "onHide" }, ngImport: i0, template: "<main *ngIf=\"visibility\">\n <div @fade class=\"modal_container\">\n <div class=\"header_modal\">\n <h1>Crear usuario de {{ userType | titlecase}}</h1>\n <button (click)=\"closeModal()\">x</button>\n </div>\n <div class=\"grid_container\">\n <div>\n <form autocomplete=\"off\" [formGroup]=\"createUserForm\">\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Nombre completo'\"\n [control]=\"createUserForm.controls['name']\"\n [validateText]=\"'Debe ingresar el nombre'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Apellidos'\"\n [control]=\"createUserForm.controls['last_name']\"\n [validateText]=\"'Debe ingresar los apellidos'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Correo electr\u00F3nico'\"\n [control]=\"createUserForm.controls['email']\"\n [validateText]=\"'Debe tener dominio @inglesparatodos.edu.co'\"\n ></ipt-input>\n <ipt-select\n [isRequired]=\"true\"\n [defaultText]=\"'Seleccione el rol'\"\n (eventSelect)=\"selectRol($event)\"\n [data]=\"getRolesOptions()\"\n ></ipt-select>\n <ipt-select\n [isRequired]=\"true\"\n [data]=\"phoneNumberIndicatives\"\n (eventSelect)=\"selectIndicatives($event)\"\n [defaultText]=\"'Seleccione el indicativo'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'N\u00FAmero de tel\u00E9fono'\"\n [control]=\"createUserForm.controls['phone_number']\"\n [validateText]=\"'Debe ingresar un n\u00FAmero de tel\u00E9fono v\u00E1lido'\"\n ></ipt-input>\n <ipt-select\n [isRequired]=\"true\"\n [data]=\"idTypes\"\n (eventSelect)=\"selectIdType($event)\"\n [defaultText]=\"'Ingrese el tipo de documento'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'Documento de identidad'\"\n [control]=\"createUserForm.controls['id_card']\"\n [validateText]=\"'Debe ingresar el n\u00FAmero de documento'\"\n ></ipt-input>\n <ipt-select\n [isRequired]=\"true\"\n (eventSelect)=\"selectState($event)\"\n [data]=\"states\"\n [defaultText]=\"'Seleccione el departamento'\"\n ></ipt-select>\n <ipt-select\n [isRequired]=\"true\"\n (eventSelect)=\"selectCity($event)\"\n [data]=\"cities\"\n [defaultText]=\"'Ciudad de residencia'\"\n ></ipt-select>\n <ipt-input *ngIf=\"!(userType === 'student')\"\n [inputType]=\"'number'\"\n [placeHolder]=\"'Ingrese las horas de servicio'\"\n [control]=\"createUserForm.controls['service_hour']\"\n [validateText]=\"'Debe ingresar las horas de servicio'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'password'\"\n [placeHolder]=\"'Contrase\u00F1a'\"\n [control]=\"createUserForm.controls['password']\"\n >\n </ipt-input>\n <ipt-input\n [inputType]=\"'password'\"\n [placeHolder]=\"'Repetir contrase\u00F1a'\"\n [control]=\"createUserForm.controls['re_password']\"\n >\n </ipt-input>\n </form>\n\n <div class=\"buttons-container\">\n <ipt-button\n [label]=\"'Crear usuario'\"\n [isEnabled]=\"\n !loader &&\n createUserForm.value['re_password'] ===\n createUserForm.value['password']\n \"\n (onClick)=\"createUser()\"\n [primary]=\"true\"\n >\n </ipt-button>\n </div>\n </div>\n <div [ngStyle]=\"{'background-image': 'url(' + photo + ')'}\" class=\"user_type_image\"></div>\n </div>\n </div>\n</main>\n", styles: ["@media screen and (min-width: 320px){main{background:rgba(0,0,0,.472);color:#fff;position:fixed;top:0;left:0;height:100vh;width:100vw;transition:all .5s}main .modal_container{width:60%;height:-moz-fit-content;height:fit-content;position:absolute;top:0;left:0;bottom:0;right:0;margin:auto;background-color:#fff;border-radius:6px}.header_modal{display:flex;padding:0 15px;gap:1rem;align-items:center}.header_modal h1{padding:.5rem;background-color:#1c77f7;color:#fff;width:100%;border-radius:10px;font-size:1.25rem;font-weight:700}.header_modal button{margin-left:auto;font-size:26px;padding:1.2rem;font-weight:200;color:#6c7f7d;display:flex;width:25px;height:25px;align-items:center;justify-content:center;transition:50ms;background-color:transparent;border:none}.header_modal button:hover{cursor:pointer;border-radius:50%;background-color:#d4d4d4}.grid_container{display:grid;grid-template-columns:1fr}form{display:grid;grid-template-columns:1fr;grid-gap:.25rem;gap:.25rem;justify-content:center;padding:0 1rem}.buttons-container{margin-top:2rem;margin-bottom:2rem;display:flex;justify-content:center;align-items:center;justify-items:center;align-content:center}.user_type_image{display:none}}@media screen and (min-width: 768px){form{display:grid;grid-template-columns:1fr 1fr;grid-gap:1rem;gap:1rem;justify-content:center}}@media screen and (min-width: 1366px){form{padding:0rem}.grid_container{display:grid;grid-template-columns:1fr 250px;grid-gap:1rem;gap:1rem;padding:1rem}.user_type_image{display:flex;background-size:cover;background-repeat:no-repeat;background-position:center;height:100%;border-radius:1rem;padding:1rem}}\n"], components: [{ type: InputComponent, selector: "ipt-input", inputs: ["inputType", "placeHolder", "validateText", "withPipe", "list", "iconUrl", "control", "prefix", "thousands", "decimal"], outputs: ["dateSelected"] }, { type: SelectComponent, selector: "ipt-select", inputs: ["isRequired", "data", "defaultText", "selectCode", "disabledSel", "control"], outputs: ["eventSelect"] }, { type: ButtonComponent, selector: "ipt-button", inputs: ["primary", "size", "label", "buttonType", "isEnabled"], outputs: ["onClick"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "titlecase": i1.TitleCasePipe }, animations: [
1316
- trigger('fade', [
1317
- transition('void => *', [
1318
- style({ opacity: 0 }),
1319
- animate(200, style({ opacity: 1 }))
1320
- ])
1321
- ])
1322
- ] });
1323
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CreateUserFormComponent, decorators: [{
1324
- type: Component,
1325
- args: [{ selector: 'ipt-create-user-form', animations: [
1326
- trigger('fade', [
1327
- transition('void => *', [
1328
- style({ opacity: 0 }),
1329
- animate(200, style({ opacity: 1 }))
1330
- ])
1331
- ])
1332
- ], template: "<main *ngIf=\"visibility\">\n <div @fade class=\"modal_container\">\n <div class=\"header_modal\">\n <h1>Crear usuario de {{ userType | titlecase}}</h1>\n <button (click)=\"closeModal()\">x</button>\n </div>\n <div class=\"grid_container\">\n <div>\n <form autocomplete=\"off\" [formGroup]=\"createUserForm\">\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Nombre completo'\"\n [control]=\"createUserForm.controls['name']\"\n [validateText]=\"'Debe ingresar el nombre'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Apellidos'\"\n [control]=\"createUserForm.controls['last_name']\"\n [validateText]=\"'Debe ingresar los apellidos'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Correo electr\u00F3nico'\"\n [control]=\"createUserForm.controls['email']\"\n [validateText]=\"'Debe tener dominio @inglesparatodos.edu.co'\"\n ></ipt-input>\n <ipt-select\n [isRequired]=\"true\"\n [defaultText]=\"'Seleccione el rol'\"\n (eventSelect)=\"selectRol($event)\"\n [data]=\"getRolesOptions()\"\n ></ipt-select>\n <ipt-select\n [isRequired]=\"true\"\n [data]=\"phoneNumberIndicatives\"\n (eventSelect)=\"selectIndicatives($event)\"\n [defaultText]=\"'Seleccione el indicativo'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'N\u00FAmero de tel\u00E9fono'\"\n [control]=\"createUserForm.controls['phone_number']\"\n [validateText]=\"'Debe ingresar un n\u00FAmero de tel\u00E9fono v\u00E1lido'\"\n ></ipt-input>\n <ipt-select\n [isRequired]=\"true\"\n [data]=\"idTypes\"\n (eventSelect)=\"selectIdType($event)\"\n [defaultText]=\"'Ingrese el tipo de documento'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'Documento de identidad'\"\n [control]=\"createUserForm.controls['id_card']\"\n [validateText]=\"'Debe ingresar el n\u00FAmero de documento'\"\n ></ipt-input>\n <ipt-select\n [isRequired]=\"true\"\n (eventSelect)=\"selectState($event)\"\n [data]=\"states\"\n [defaultText]=\"'Seleccione el departamento'\"\n ></ipt-select>\n <ipt-select\n [isRequired]=\"true\"\n (eventSelect)=\"selectCity($event)\"\n [data]=\"cities\"\n [defaultText]=\"'Ciudad de residencia'\"\n ></ipt-select>\n <ipt-input *ngIf=\"!(userType === 'student')\"\n [inputType]=\"'number'\"\n [placeHolder]=\"'Ingrese las horas de servicio'\"\n [control]=\"createUserForm.controls['service_hour']\"\n [validateText]=\"'Debe ingresar las horas de servicio'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'password'\"\n [placeHolder]=\"'Contrase\u00F1a'\"\n [control]=\"createUserForm.controls['password']\"\n >\n </ipt-input>\n <ipt-input\n [inputType]=\"'password'\"\n [placeHolder]=\"'Repetir contrase\u00F1a'\"\n [control]=\"createUserForm.controls['re_password']\"\n >\n </ipt-input>\n </form>\n\n <div class=\"buttons-container\">\n <ipt-button\n [label]=\"'Crear usuario'\"\n [isEnabled]=\"\n !loader &&\n createUserForm.value['re_password'] ===\n createUserForm.value['password']\n \"\n (onClick)=\"createUser()\"\n [primary]=\"true\"\n >\n </ipt-button>\n </div>\n </div>\n <div [ngStyle]=\"{'background-image': 'url(' + photo + ')'}\" class=\"user_type_image\"></div>\n </div>\n </div>\n</main>\n", styles: ["@media screen and (min-width: 320px){main{background:rgba(0,0,0,.472);color:#fff;position:fixed;top:0;left:0;height:100vh;width:100vw;transition:all .5s}main .modal_container{width:60%;height:-moz-fit-content;height:fit-content;position:absolute;top:0;left:0;bottom:0;right:0;margin:auto;background-color:#fff;border-radius:6px}.header_modal{display:flex;padding:0 15px;gap:1rem;align-items:center}.header_modal h1{padding:.5rem;background-color:#1c77f7;color:#fff;width:100%;border-radius:10px;font-size:1.25rem;font-weight:700}.header_modal button{margin-left:auto;font-size:26px;padding:1.2rem;font-weight:200;color:#6c7f7d;display:flex;width:25px;height:25px;align-items:center;justify-content:center;transition:50ms;background-color:transparent;border:none}.header_modal button:hover{cursor:pointer;border-radius:50%;background-color:#d4d4d4}.grid_container{display:grid;grid-template-columns:1fr}form{display:grid;grid-template-columns:1fr;grid-gap:.25rem;gap:.25rem;justify-content:center;padding:0 1rem}.buttons-container{margin-top:2rem;margin-bottom:2rem;display:flex;justify-content:center;align-items:center;justify-items:center;align-content:center}.user_type_image{display:none}}@media screen and (min-width: 768px){form{display:grid;grid-template-columns:1fr 1fr;grid-gap:1rem;gap:1rem;justify-content:center}}@media screen and (min-width: 1366px){form{padding:0rem}.grid_container{display:grid;grid-template-columns:1fr 250px;grid-gap:1rem;gap:1rem;padding:1rem}.user_type_image{display:flex;background-size:cover;background-repeat:no-repeat;background-position:center;height:100%;border-radius:1rem;padding:1rem}}\n"] }]
1333
- }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: ParameterService }, { type: UserService }]; }, propDecorators: { userType: [{
1334
- type: Input
1335
- }], visibility: [{
1336
- type: Input
1337
- }], userCreated: [{
1338
- type: Output
1339
- }], onHide: [{
1340
- type: Output
1127
+ class CreateUserFormComponent {
1128
+ constructor(fb, parameterService, userService) {
1129
+ this.fb = fb;
1130
+ this.parameterService = parameterService;
1131
+ this.userService = userService;
1132
+ this.visibility = false;
1133
+ this.userCreated = new EventEmitter(false);
1134
+ this.onHide = new EventEmitter(false);
1135
+ this.loader = false;
1136
+ this.photo = '';
1137
+ }
1138
+ ngOnInit() {
1139
+ this.initForm();
1140
+ this.getParameters();
1141
+ }
1142
+ closeModal() {
1143
+ this.visibility = false;
1144
+ this.onHide.emit(true);
1145
+ }
1146
+ createUser() {
1147
+ this.loader = true;
1148
+ let request = {
1149
+ name: this.createUserForm.controls['name'].value,
1150
+ last_name: this.createUserForm.controls['last_name'].value,
1151
+ id_card_type: this.createUserForm.controls['id_card_type'].value,
1152
+ id_card: this.createUserForm.controls['id_card'].value,
1153
+ phone_indicative: this.createUserForm.controls['phone_indicative'].value,
1154
+ phone_number: this.createUserForm.controls['phone_number'].value,
1155
+ email: this.createUserForm.controls['email'].value,
1156
+ city: this.createUserForm.controls['city'].value,
1157
+ service_hour: this.createUserForm.controls['service_hour'].value,
1158
+ role: this.createUserForm.controls['role'].value,
1159
+ password: this.createUserForm.controls['password'].value,
1160
+ };
1161
+ this.userService.registerDashboard(request).subscribe((response) => {
1162
+ console.log(response.message);
1163
+ switch (response.message.code) {
1164
+ case 1:
1165
+ this.userCreated.emit(true);
1166
+ this.initForm();
1167
+ break;
1168
+ case 2:
1169
+ throw new Error("Los datos ingresados no corresponden a un usuario registrado en nuestro sistema, por favor reviselos.");
1170
+ case 3:
1171
+ throw new Error("Los datos ingresados no cumplen los parámetros establecidos");
1172
+ default:
1173
+ break;
1174
+ }
1175
+ this.loader = false;
1176
+ });
1177
+ }
1178
+ getParameters() {
1179
+ this.parameterService.getIndicatives().subscribe((response) => {
1180
+ this.phoneNumberIndicatives = response.data;
1181
+ });
1182
+ this.parameterService.getCardTypes('col').subscribe((response) => {
1183
+ this.idTypes = response.data;
1184
+ });
1185
+ this.parameterService.getStatesByCountry('col').subscribe((response) => {
1186
+ this.states = response.data;
1187
+ });
1188
+ }
1189
+ getRolesOptions() {
1190
+ // Estudiante
1191
+ if (this.userType === 'student') {
1192
+ this.setPhoto('student');
1193
+ return [
1194
+ { code: '13', name: 'Student' },
1195
+ ];
1196
+ }
1197
+ // Académico
1198
+ if (this.userType === 'academic') {
1199
+ this.setPhoto('academic');
1200
+ return [
1201
+ { code: '11', name: 'Teacher PRO' },
1202
+ { code: '12', name: 'Teacher' },
1203
+ ];
1204
+ }
1205
+ // Administrativo
1206
+ if (this.userType === 'administrative') {
1207
+ this.setPhoto('administrative');
1208
+ return [
1209
+ { code: '31', name: 'Administrative Supervisor' },
1210
+ { code: '32', name: 'Administrative Advisor' },
1211
+ ];
1212
+ }
1213
+ // Marketing
1214
+ if (this.userType === 'marketing') {
1215
+ this.setPhoto('marketing');
1216
+ return [
1217
+ { code: '21', name: 'Marketing Supervisor' },
1218
+ { code: '22', name: 'Marketing Advisor' },
1219
+ ];
1220
+ }
1221
+ // Comercial
1222
+ if (this.userType === 'commercial') {
1223
+ this.setPhoto('commercial');
1224
+ return [
1225
+ { code: '41', name: 'Commercial Supervisor' },
1226
+ { code: '42', name: 'Commercial Advisor' },
1227
+ ];
1228
+ }
1229
+ // Cartera
1230
+ if (this.userType === 'treasure') {
1231
+ this.setPhoto('treasure');
1232
+ return [
1233
+ { code: '51', name: 'Treauser Supervisor' },
1234
+ { code: '52', name: 'Treauser Advisor' },
1235
+ ];
1236
+ }
1237
+ }
1238
+ initForm() {
1239
+ this.createUserForm = this.fb.group({
1240
+ name: ['', [Validators.required, Validators.minLength(3), Validators.maxLength(32)],],
1241
+ last_name: ['', [Validators.required, Validators.minLength(5), Validators.maxLength(32),],],
1242
+ email: ['', [Validators.required, Validators.maxLength(300)]],
1243
+ id_card_type: ['', [Validators.required]],
1244
+ id_card: ['', [Validators.required, Validators.minLength(5), Validators.maxLength(20),]],
1245
+ phone_indicative: ['', [Validators.required]],
1246
+ city: ['', [Validators.required]],
1247
+ role: ['', [Validators.required]],
1248
+ service_hour: ['', [Validators.required]],
1249
+ phone_number: ['', [Validators.required, Validators.minLength(10), Validators.maxLength(15)]],
1250
+ password: ['', [Validators.required, Validators.minLength(7), Validators.maxLength(32)]],
1251
+ re_password: ['', [Validators.required, Validators.minLength(7), Validators.maxLength(32)]],
1252
+ state: [''],
1253
+ });
1254
+ }
1255
+ setPhoto(type) {
1256
+ if (type === 'student')
1257
+ this.photo = '../../../assets/user-form-assets/estudiante.jpg';
1258
+ if (type === 'academic')
1259
+ this.photo = '../../../assets/user-form-assets/academico.png';
1260
+ if (type === 'administrative')
1261
+ this.photo = '../../../assets/user-form-assets/administrativo.jpg';
1262
+ if (type === 'marketing')
1263
+ this.photo = '../../../assets/user-form-assets/marketing.jpg';
1264
+ if (type === 'commercial')
1265
+ this.photo = '../../../assets/user-form-assets/comercial.jpg';
1266
+ if (type === 'treasure')
1267
+ this.photo = '../../../assets/user-form-assets/administrativo.jpg';
1268
+ }
1269
+ selectRol(role) {
1270
+ if (role !== 'Seleccione el rol') {
1271
+ this.createUserForm.controls['role'].setValue(role);
1272
+ }
1273
+ else {
1274
+ this.createUserForm.controls['role'].setValue(null);
1275
+ }
1276
+ }
1277
+ selectIndicatives(indicative) {
1278
+ if (indicative !== 'Seleccione el indicativo') {
1279
+ this.createUserForm.controls['phone_indicative'].setValue(indicative);
1280
+ }
1281
+ else {
1282
+ this.createUserForm.controls['phone_indicative'].setValue(null);
1283
+ }
1284
+ }
1285
+ selectIdType(idType) {
1286
+ if (idType !== 'Ingrese el tipo de documento') {
1287
+ this.createUserForm.controls['id_card_type'].setValue(idType);
1288
+ }
1289
+ else {
1290
+ this.createUserForm.controls['id_card_type'].setValue(null);
1291
+ }
1292
+ }
1293
+ selectState(state) {
1294
+ if (state !== 'Seleccione el departamento') {
1295
+ this.createUserForm.controls['state'].setValue(state);
1296
+ this.parameterService.getCitiesByState(state).subscribe((response) => {
1297
+ this.cities = response.data;
1298
+ });
1299
+ }
1300
+ else {
1301
+ this.createUserForm.controls['state'].setValue(null);
1302
+ this.createUserForm.controls['city'].setValue(null);
1303
+ this.cities = [];
1304
+ }
1305
+ }
1306
+ selectCity(city) {
1307
+ if (city !== 'Ciudad de residencia') {
1308
+ this.createUserForm.controls['city'].setValue(city);
1309
+ }
1310
+ else {
1311
+ this.createUserForm.controls['city'].setValue(null);
1312
+ }
1313
+ }
1314
+ }
1315
+ CreateUserFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CreateUserFormComponent, deps: [{ token: i1$1.FormBuilder }, { token: ParameterService }, { token: UserService }], target: i0.ɵɵFactoryTarget.Component });
1316
+ CreateUserFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: CreateUserFormComponent, selector: "ipt-create-user-form", inputs: { userType: "userType", visibility: "visibility" }, outputs: { userCreated: "userCreated", onHide: "onHide" }, ngImport: i0, template: "<main *ngIf=\"visibility\">\r\n <div @fade class=\"modal_container\">\r\n <div class=\"header_modal\">\r\n <h1>Crear usuario de {{ userType | titlecase}}</h1>\r\n <button (click)=\"closeModal()\">x</button>\r\n </div>\r\n <div class=\"grid_container\">\r\n <div>\r\n <form autocomplete=\"off\" [formGroup]=\"createUserForm\">\r\n <ipt-input\r\n [inputType]=\"'text'\"\r\n [placeHolder]=\"'Nombre completo'\"\r\n [control]=\"createUserForm.controls['name']\"\r\n [validateText]=\"'Debe ingresar el nombre'\"\r\n ></ipt-input>\r\n <ipt-input\r\n [inputType]=\"'text'\"\r\n [placeHolder]=\"'Apellidos'\"\r\n [control]=\"createUserForm.controls['last_name']\"\r\n [validateText]=\"'Debe ingresar los apellidos'\"\r\n ></ipt-input>\r\n <ipt-input\r\n [inputType]=\"'text'\"\r\n [placeHolder]=\"'Correo electr\u00F3nico'\"\r\n [control]=\"createUserForm.controls['email']\"\r\n [validateText]=\"'Debe tener dominio @inglesparatodos.edu.co'\"\r\n ></ipt-input>\r\n <ipt-select\r\n [isRequired]=\"true\"\r\n [defaultText]=\"'Seleccione el rol'\"\r\n (eventSelect)=\"selectRol($event)\"\r\n [data]=\"getRolesOptions()\"\r\n ></ipt-select>\r\n <ipt-select\r\n [isRequired]=\"true\"\r\n [data]=\"phoneNumberIndicatives\"\r\n (eventSelect)=\"selectIndicatives($event)\"\r\n [defaultText]=\"'Seleccione el indicativo'\"\r\n ></ipt-select>\r\n <ipt-input\r\n [inputType]=\"'number'\"\r\n [placeHolder]=\"'N\u00FAmero de tel\u00E9fono'\"\r\n [control]=\"createUserForm.controls['phone_number']\"\r\n [validateText]=\"'Debe ingresar un n\u00FAmero de tel\u00E9fono v\u00E1lido'\"\r\n ></ipt-input>\r\n <ipt-select\r\n [isRequired]=\"true\"\r\n [data]=\"idTypes\"\r\n (eventSelect)=\"selectIdType($event)\"\r\n [defaultText]=\"'Ingrese el tipo de documento'\"\r\n ></ipt-select>\r\n <ipt-input\r\n [inputType]=\"'number'\"\r\n [placeHolder]=\"'Documento de identidad'\"\r\n [control]=\"createUserForm.controls['id_card']\"\r\n [validateText]=\"'Debe ingresar el n\u00FAmero de documento'\"\r\n ></ipt-input>\r\n <ipt-select\r\n [isRequired]=\"true\"\r\n (eventSelect)=\"selectState($event)\"\r\n [data]=\"states\"\r\n [defaultText]=\"'Seleccione el departamento'\"\r\n ></ipt-select>\r\n <ipt-select\r\n [isRequired]=\"true\"\r\n (eventSelect)=\"selectCity($event)\"\r\n [data]=\"cities\"\r\n [defaultText]=\"'Ciudad de residencia'\"\r\n ></ipt-select>\r\n <ipt-input *ngIf=\"!(userType === 'student')\"\r\n [inputType]=\"'number'\"\r\n [placeHolder]=\"'Ingrese las horas de servicio'\"\r\n [control]=\"createUserForm.controls['service_hour']\"\r\n [validateText]=\"'Debe ingresar las horas de servicio'\"\r\n ></ipt-input>\r\n <ipt-input\r\n [inputType]=\"'password'\"\r\n [placeHolder]=\"'Contrase\u00F1a'\"\r\n [control]=\"createUserForm.controls['password']\"\r\n >\r\n </ipt-input>\r\n <ipt-input\r\n [inputType]=\"'password'\"\r\n [placeHolder]=\"'Repetir contrase\u00F1a'\"\r\n [control]=\"createUserForm.controls['re_password']\"\r\n >\r\n </ipt-input>\r\n </form>\r\n\r\n <div class=\"buttons-container\">\r\n <ipt-button\r\n [label]=\"'Crear usuario'\"\r\n [isEnabled]=\"\r\n !loader &&\r\n createUserForm.value['re_password'] ===\r\n createUserForm.value['password']\r\n \"\r\n (onClick)=\"createUser()\"\r\n [primary]=\"true\"\r\n >\r\n </ipt-button>\r\n </div>\r\n </div>\r\n <div [ngStyle]=\"{'background-image': 'url(' + photo + ')'}\" class=\"user_type_image\"></div>\r\n </div>\r\n </div>\r\n</main>\r\n", styles: ["@media screen and (min-width: 320px){main{background:rgba(0,0,0,.472);color:#fff;position:fixed;top:0;left:0;height:100vh;width:100vw;transition:all .5s}main .modal_container{width:60%;height:-moz-fit-content;height:fit-content;position:absolute;top:0;left:0;bottom:0;right:0;margin:auto;background-color:#fff;border-radius:6px}.header_modal{display:flex;padding:0 15px;gap:1rem;align-items:center}.header_modal h1{padding:.5rem;background-color:#1c77f7;color:#fff;width:100%;border-radius:10px;font-size:1.25rem;font-weight:700}.header_modal button{margin-left:auto;font-size:26px;padding:1.2rem;font-weight:200;color:#6c7f7d;display:flex;width:25px;height:25px;align-items:center;justify-content:center;transition:50ms;background-color:transparent;border:none}.header_modal button:hover{cursor:pointer;border-radius:50%;background-color:#d4d4d4}.grid_container{display:grid;grid-template-columns:1fr}form{display:grid;grid-template-columns:1fr;grid-gap:.25rem;gap:.25rem;justify-content:center;padding:0 1rem}.buttons-container{margin-top:2rem;margin-bottom:2rem;display:flex;justify-content:center;align-items:center;justify-items:center;align-content:center}.user_type_image{display:none}}@media screen and (min-width: 768px){form{display:grid;grid-template-columns:1fr 1fr;grid-gap:1rem;gap:1rem;justify-content:center}}@media screen and (min-width: 1366px){form{padding:0rem}.grid_container{display:grid;grid-template-columns:1fr 250px;grid-gap:1rem;gap:1rem;padding:1rem}.user_type_image{display:flex;background-size:cover;background-repeat:no-repeat;background-position:center;height:100%;border-radius:1rem;padding:1rem}}\n"], components: [{ type: InputComponent, selector: "ipt-input", inputs: ["inputType", "placeHolder", "validateText", "withPipe", "list", "iconUrl", "control", "prefix", "thousands", "decimal"], outputs: ["dateSelected"] }, { type: SelectComponent, selector: "ipt-select", inputs: ["isRequired", "data", "defaultText", "selectCode", "disabledSel", "control"], outputs: ["eventSelect"] }, { type: ButtonComponent, selector: "ipt-button", inputs: ["primary", "size", "label", "buttonType", "isEnabled"], outputs: ["onClick"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "titlecase": i1.TitleCasePipe }, animations: [
1317
+ trigger('fade', [
1318
+ transition('void => *', [
1319
+ style({ opacity: 0 }),
1320
+ animate(200, style({ opacity: 1 }))
1321
+ ])
1322
+ ])
1323
+ ] });
1324
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CreateUserFormComponent, decorators: [{
1325
+ type: Component,
1326
+ args: [{ selector: 'ipt-create-user-form', animations: [
1327
+ trigger('fade', [
1328
+ transition('void => *', [
1329
+ style({ opacity: 0 }),
1330
+ animate(200, style({ opacity: 1 }))
1331
+ ])
1332
+ ])
1333
+ ], template: "<main *ngIf=\"visibility\">\r\n <div @fade class=\"modal_container\">\r\n <div class=\"header_modal\">\r\n <h1>Crear usuario de {{ userType | titlecase}}</h1>\r\n <button (click)=\"closeModal()\">x</button>\r\n </div>\r\n <div class=\"grid_container\">\r\n <div>\r\n <form autocomplete=\"off\" [formGroup]=\"createUserForm\">\r\n <ipt-input\r\n [inputType]=\"'text'\"\r\n [placeHolder]=\"'Nombre completo'\"\r\n [control]=\"createUserForm.controls['name']\"\r\n [validateText]=\"'Debe ingresar el nombre'\"\r\n ></ipt-input>\r\n <ipt-input\r\n [inputType]=\"'text'\"\r\n [placeHolder]=\"'Apellidos'\"\r\n [control]=\"createUserForm.controls['last_name']\"\r\n [validateText]=\"'Debe ingresar los apellidos'\"\r\n ></ipt-input>\r\n <ipt-input\r\n [inputType]=\"'text'\"\r\n [placeHolder]=\"'Correo electr\u00F3nico'\"\r\n [control]=\"createUserForm.controls['email']\"\r\n [validateText]=\"'Debe tener dominio @inglesparatodos.edu.co'\"\r\n ></ipt-input>\r\n <ipt-select\r\n [isRequired]=\"true\"\r\n [defaultText]=\"'Seleccione el rol'\"\r\n (eventSelect)=\"selectRol($event)\"\r\n [data]=\"getRolesOptions()\"\r\n ></ipt-select>\r\n <ipt-select\r\n [isRequired]=\"true\"\r\n [data]=\"phoneNumberIndicatives\"\r\n (eventSelect)=\"selectIndicatives($event)\"\r\n [defaultText]=\"'Seleccione el indicativo'\"\r\n ></ipt-select>\r\n <ipt-input\r\n [inputType]=\"'number'\"\r\n [placeHolder]=\"'N\u00FAmero de tel\u00E9fono'\"\r\n [control]=\"createUserForm.controls['phone_number']\"\r\n [validateText]=\"'Debe ingresar un n\u00FAmero de tel\u00E9fono v\u00E1lido'\"\r\n ></ipt-input>\r\n <ipt-select\r\n [isRequired]=\"true\"\r\n [data]=\"idTypes\"\r\n (eventSelect)=\"selectIdType($event)\"\r\n [defaultText]=\"'Ingrese el tipo de documento'\"\r\n ></ipt-select>\r\n <ipt-input\r\n [inputType]=\"'number'\"\r\n [placeHolder]=\"'Documento de identidad'\"\r\n [control]=\"createUserForm.controls['id_card']\"\r\n [validateText]=\"'Debe ingresar el n\u00FAmero de documento'\"\r\n ></ipt-input>\r\n <ipt-select\r\n [isRequired]=\"true\"\r\n (eventSelect)=\"selectState($event)\"\r\n [data]=\"states\"\r\n [defaultText]=\"'Seleccione el departamento'\"\r\n ></ipt-select>\r\n <ipt-select\r\n [isRequired]=\"true\"\r\n (eventSelect)=\"selectCity($event)\"\r\n [data]=\"cities\"\r\n [defaultText]=\"'Ciudad de residencia'\"\r\n ></ipt-select>\r\n <ipt-input *ngIf=\"!(userType === 'student')\"\r\n [inputType]=\"'number'\"\r\n [placeHolder]=\"'Ingrese las horas de servicio'\"\r\n [control]=\"createUserForm.controls['service_hour']\"\r\n [validateText]=\"'Debe ingresar las horas de servicio'\"\r\n ></ipt-input>\r\n <ipt-input\r\n [inputType]=\"'password'\"\r\n [placeHolder]=\"'Contrase\u00F1a'\"\r\n [control]=\"createUserForm.controls['password']\"\r\n >\r\n </ipt-input>\r\n <ipt-input\r\n [inputType]=\"'password'\"\r\n [placeHolder]=\"'Repetir contrase\u00F1a'\"\r\n [control]=\"createUserForm.controls['re_password']\"\r\n >\r\n </ipt-input>\r\n </form>\r\n\r\n <div class=\"buttons-container\">\r\n <ipt-button\r\n [label]=\"'Crear usuario'\"\r\n [isEnabled]=\"\r\n !loader &&\r\n createUserForm.value['re_password'] ===\r\n createUserForm.value['password']\r\n \"\r\n (onClick)=\"createUser()\"\r\n [primary]=\"true\"\r\n >\r\n </ipt-button>\r\n </div>\r\n </div>\r\n <div [ngStyle]=\"{'background-image': 'url(' + photo + ')'}\" class=\"user_type_image\"></div>\r\n </div>\r\n </div>\r\n</main>\r\n", styles: ["@media screen and (min-width: 320px){main{background:rgba(0,0,0,.472);color:#fff;position:fixed;top:0;left:0;height:100vh;width:100vw;transition:all .5s}main .modal_container{width:60%;height:-moz-fit-content;height:fit-content;position:absolute;top:0;left:0;bottom:0;right:0;margin:auto;background-color:#fff;border-radius:6px}.header_modal{display:flex;padding:0 15px;gap:1rem;align-items:center}.header_modal h1{padding:.5rem;background-color:#1c77f7;color:#fff;width:100%;border-radius:10px;font-size:1.25rem;font-weight:700}.header_modal button{margin-left:auto;font-size:26px;padding:1.2rem;font-weight:200;color:#6c7f7d;display:flex;width:25px;height:25px;align-items:center;justify-content:center;transition:50ms;background-color:transparent;border:none}.header_modal button:hover{cursor:pointer;border-radius:50%;background-color:#d4d4d4}.grid_container{display:grid;grid-template-columns:1fr}form{display:grid;grid-template-columns:1fr;grid-gap:.25rem;gap:.25rem;justify-content:center;padding:0 1rem}.buttons-container{margin-top:2rem;margin-bottom:2rem;display:flex;justify-content:center;align-items:center;justify-items:center;align-content:center}.user_type_image{display:none}}@media screen and (min-width: 768px){form{display:grid;grid-template-columns:1fr 1fr;grid-gap:1rem;gap:1rem;justify-content:center}}@media screen and (min-width: 1366px){form{padding:0rem}.grid_container{display:grid;grid-template-columns:1fr 250px;grid-gap:1rem;gap:1rem;padding:1rem}.user_type_image{display:flex;background-size:cover;background-repeat:no-repeat;background-position:center;height:100%;border-radius:1rem;padding:1rem}}\n"] }]
1334
+ }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: ParameterService }, { type: UserService }]; }, propDecorators: { userType: [{
1335
+ type: Input
1336
+ }], visibility: [{
1337
+ type: Input
1338
+ }], userCreated: [{
1339
+ type: Output
1340
+ }], onHide: [{
1341
+ type: Output
1341
1342
  }] } });
1342
1343
 
1343
- class SidenavComponent {
1344
- constructor(userService, storageService) {
1345
- this.userService = userService;
1346
- this.storageService = storageService;
1347
- this.pageChangeEvent = new EventEmitter();
1348
- this.routes = [];
1349
- this.options = { weekday: 'long', month: 'long', day: 'numeric' };
1350
- this.currentDay = new Date().toLocaleDateString('en-EN', this.options);
1351
- this.hour = new Date().getHours();
1352
- }
1353
- ngOnInit() {
1354
- var _a;
1355
- let user = (_a = this.storageService.getCurrentUser()) === null || _a === void 0 ? void 0 : _a.token;
1356
- let token = user === undefined ? '' : user;
1357
- let request = {
1358
- token: token,
1359
- };
1360
- this.userService.getRoutesForRole(request).subscribe((response) => {
1361
- this.routes = response.data;
1362
- });
1363
- }
1364
- clickPage(event) {
1365
- this.pageChangeEvent.emit(event);
1366
- }
1367
- logout() {
1368
- this.storageService.logout();
1369
- this.pageChangeEvent.emit('logout');
1370
- }
1371
- }
1372
- SidenavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SidenavComponent, deps: [{ token: UserService }, { token: StorageService }], target: i0.ɵɵFactoryTarget.Component });
1373
- SidenavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: SidenavComponent, selector: "ipt-sidenav", inputs: { department: "department", setPage: "setPage", userName: "userName" }, outputs: { pageChangeEvent: "pageChangeEvent" }, ngImport: i0, template: `
1374
- <mat-sidenav #sidenav mode="push" >
1375
- <mat-toolbar color="primary" (click)="sidenav.toggle()">
1376
- <span style="font-size: 15px;">{{department}}</span>
1377
- <span class="menu-icon-close"></span>
1378
- </mat-toolbar>
1379
-
1380
- <mat-nav-list *ngFor="let route of routes">
1381
- <nav class="flex-container-menu">
1382
- <ipt-aside-button
1383
- [buttonActive]="this.setPage === route.page"
1384
- [icon]="route.icon"
1385
- [text]="route.text"
1386
- (isClicked)="clickPage(route.page)"
1387
- (click)="sidenav.toggle()"
1388
- >
1389
- </ipt-aside-button>
1390
- </nav>
1391
- </mat-nav-list>
1392
- </mat-sidenav>
1393
-
1394
- <mat-toolbar class="header">
1395
- <div class="menu-container" (click)="sidenav.toggle()">
1396
- <p>Menu</p>
1397
- <div class="menu-icon"></div>
1398
- </div>
1399
-
1400
- <img class="img-logo" src="http://qa.iptdev.com.co/assets/logos/IPT-logo.png" alt="" />
1401
-
1402
- <div class="text-container">
1403
- <span class="p1">{{ currentDay }}</span>
1404
- <span *ngIf="hour >= 0 && hour < 12" class="p2">
1405
- Hey {{ userName }}, Good moorning!
1406
- </span>
1407
- <p *ngIf="hour >= 12 && hour < 18" class="p2">
1408
- Hey {{ userName }}, Good afternoon!
1409
- </p>
1410
- <p *ngIf="hour >= 18 && hour < 24" class="p2">
1411
- Hey {{ userName }}, Good evening!
1412
- </p>
1413
- </div>
1414
-
1415
- <div class="logout-container" (click)="logout()">
1416
- <p class="logout-button">Cerrar sesión</p>
1417
- <div class="photo-logout"></div>
1418
- </div>
1419
- </mat-toolbar>
1420
- `, isInline: true, styles: ["*{font-family:Poppins,sans-serif}@media screen and (min-width: 320px){.header{background-color:#fff;display:flex;justify-content:space-between;filter:drop-shadow(0px -1px 7px #000)}mat-sidenav{width:-moz-fit-content!important;width:fit-content!important;background-color:#1c77f7!important}.img-logo,.text-container{display:none}.mat-toolbar.mat-primary{background-color:#fff!important;color:#003d99!important;filter:drop-shadow(0px -1px 7px #000)}.logout-container{box-shadow:#11111a1a 0 8px 24px,#11111a1a 0 16px 56px,#11111a1a 0 24px 80px;height:35px;width:auto;border-radius:30px;display:flex;margin-left:10px}.logout-button{display:flex;align-items:center;color:#1c77f7;font-weight:500;font-size:16px;margin-left:20px;text-align:center;width:150px}.photo-logout{background:url(http://qa.iptdev.com.co/assets/icons/exit.png);background-size:25px 25px;background-position:center;background-repeat:no-repeat}.menu-icon{background:url(http://qa.iptdev.com.co/assets/icons/icon-menu.png);background-size:25px 25px;background-position:center;background-repeat:no-repeat}.menu-icon-close{background:url(http://qa.iptdev.com.co/assets/icons/cruz.png);background-size:25px 25px;background-position:center;background-repeat:no-repeat;width:35px;height:35px}.menu-container{box-shadow:#11111a1a 0 8px 24px,#11111a1a 0 16px 56px,#11111a1a 0 24px 80px;height:35px;width:52.5px;width:auto;border-radius:30px;display:flex}.menu-container:hover{cursor:pointer}.menu-container p{width:85px;display:flex;align-items:center;color:#1c77f7;font-weight:500;font-size:16px;margin:0 0 0 15px;text-align:center}}@media screen and (min-width: 768px){.img-logo{display:flex;width:120px;height:60px}.text-container{border-radius:40px;height:45px;width:100%;display:flex;gap:-100px;justify-content:center;flex-direction:column;align-items:flex-start}}.p1{color:gray;margin-left:30px;font-size:13px;height:20px}.p2{margin-left:30px;font-size:14px;font-weight:600;color:#1c77f7}.flex-container-menu{font-size:18px;color:#fff!important}.mat-nav-list{padding:0}\n"], components: [{ type: i3$1.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { type: i4.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { type: i5.MatNavList, selector: "mat-nav-list", inputs: ["disableRipple", "disabled"], exportAs: ["matNavList"] }, { type: AsideButtonComponent, selector: "ipt-aside-button", inputs: ["icon", "text", "buttonActive"], outputs: ["isClicked"] }], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1421
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SidenavComponent, decorators: [{
1422
- type: Component,
1423
- args: [{ selector: 'ipt-sidenav', template: `
1424
- <mat-sidenav #sidenav mode="push" >
1425
- <mat-toolbar color="primary" (click)="sidenav.toggle()">
1426
- <span style="font-size: 15px;">{{department}}</span>
1427
- <span class="menu-icon-close"></span>
1428
- </mat-toolbar>
1429
-
1430
- <mat-nav-list *ngFor="let route of routes">
1431
- <nav class="flex-container-menu">
1432
- <ipt-aside-button
1433
- [buttonActive]="this.setPage === route.page"
1434
- [icon]="route.icon"
1435
- [text]="route.text"
1436
- (isClicked)="clickPage(route.page)"
1437
- (click)="sidenav.toggle()"
1438
- >
1439
- </ipt-aside-button>
1440
- </nav>
1441
- </mat-nav-list>
1442
- </mat-sidenav>
1443
-
1444
- <mat-toolbar class="header">
1445
- <div class="menu-container" (click)="sidenav.toggle()">
1446
- <p>Menu</p>
1447
- <div class="menu-icon"></div>
1448
- </div>
1449
-
1450
- <img class="img-logo" src="http://qa.iptdev.com.co/assets/logos/IPT-logo.png" alt="" />
1451
-
1452
- <div class="text-container">
1453
- <span class="p1">{{ currentDay }}</span>
1454
- <span *ngIf="hour >= 0 && hour < 12" class="p2">
1455
- Hey {{ userName }}, Good moorning!
1456
- </span>
1457
- <p *ngIf="hour >= 12 && hour < 18" class="p2">
1458
- Hey {{ userName }}, Good afternoon!
1459
- </p>
1460
- <p *ngIf="hour >= 18 && hour < 24" class="p2">
1461
- Hey {{ userName }}, Good evening!
1462
- </p>
1463
- </div>
1464
-
1465
- <div class="logout-container" (click)="logout()">
1466
- <p class="logout-button">Cerrar sesión</p>
1467
- <div class="photo-logout"></div>
1468
- </div>
1469
- </mat-toolbar>
1470
- `, styles: ["*{font-family:Poppins,sans-serif}@media screen and (min-width: 320px){.header{background-color:#fff;display:flex;justify-content:space-between;filter:drop-shadow(0px -1px 7px #000)}mat-sidenav{width:-moz-fit-content!important;width:fit-content!important;background-color:#1c77f7!important}.img-logo,.text-container{display:none}.mat-toolbar.mat-primary{background-color:#fff!important;color:#003d99!important;filter:drop-shadow(0px -1px 7px #000)}.logout-container{box-shadow:#11111a1a 0 8px 24px,#11111a1a 0 16px 56px,#11111a1a 0 24px 80px;height:35px;width:auto;border-radius:30px;display:flex;margin-left:10px}.logout-button{display:flex;align-items:center;color:#1c77f7;font-weight:500;font-size:16px;margin-left:20px;text-align:center;width:150px}.photo-logout{background:url(http://qa.iptdev.com.co/assets/icons/exit.png);background-size:25px 25px;background-position:center;background-repeat:no-repeat}.menu-icon{background:url(http://qa.iptdev.com.co/assets/icons/icon-menu.png);background-size:25px 25px;background-position:center;background-repeat:no-repeat}.menu-icon-close{background:url(http://qa.iptdev.com.co/assets/icons/cruz.png);background-size:25px 25px;background-position:center;background-repeat:no-repeat;width:35px;height:35px}.menu-container{box-shadow:#11111a1a 0 8px 24px,#11111a1a 0 16px 56px,#11111a1a 0 24px 80px;height:35px;width:52.5px;width:auto;border-radius:30px;display:flex}.menu-container:hover{cursor:pointer}.menu-container p{width:85px;display:flex;align-items:center;color:#1c77f7;font-weight:500;font-size:16px;margin:0 0 0 15px;text-align:center}}@media screen and (min-width: 768px){.img-logo{display:flex;width:120px;height:60px}.text-container{border-radius:40px;height:45px;width:100%;display:flex;gap:-100px;justify-content:center;flex-direction:column;align-items:flex-start}}.p1{color:gray;margin-left:30px;font-size:13px;height:20px}.p2{margin-left:30px;font-size:14px;font-weight:600;color:#1c77f7}.flex-container-menu{font-size:18px;color:#fff!important}.mat-nav-list{padding:0}\n"] }]
1471
- }], ctorParameters: function () { return [{ type: UserService }, { type: StorageService }]; }, propDecorators: { department: [{
1472
- type: Input
1473
- }], setPage: [{
1474
- type: Input
1475
- }], userName: [{
1476
- type: Input
1477
- }], pageChangeEvent: [{
1478
- type: Output
1344
+ class SidenavComponent {
1345
+ constructor(userService, storageService) {
1346
+ this.userService = userService;
1347
+ this.storageService = storageService;
1348
+ this.pageChangeEvent = new EventEmitter();
1349
+ this.routes = [];
1350
+ this.options = { weekday: 'long', month: 'long', day: 'numeric' };
1351
+ this.currentDay = new Date().toLocaleDateString('en-EN', this.options);
1352
+ this.hour = new Date().getHours();
1353
+ }
1354
+ ngOnInit() {
1355
+ var _a;
1356
+ let user = (_a = this.storageService.getCurrentUser()) === null || _a === void 0 ? void 0 : _a.token;
1357
+ let token = user === undefined ? '' : user;
1358
+ let request = {
1359
+ token: token,
1360
+ };
1361
+ this.userService.getRoutesForRole(request).subscribe((response) => {
1362
+ this.routes = response.data;
1363
+ });
1364
+ }
1365
+ clickPage(event) {
1366
+ this.pageChangeEvent.emit(event);
1367
+ }
1368
+ logout() {
1369
+ this.storageService.logout();
1370
+ this.pageChangeEvent.emit('logout');
1371
+ }
1372
+ }
1373
+ SidenavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SidenavComponent, deps: [{ token: UserService }, { token: StorageService }], target: i0.ɵɵFactoryTarget.Component });
1374
+ SidenavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: SidenavComponent, selector: "ipt-sidenav", inputs: { department: "department", setPage: "setPage", userName: "userName" }, outputs: { pageChangeEvent: "pageChangeEvent" }, ngImport: i0, template: `
1375
+ <mat-sidenav #sidenav mode="push" >
1376
+ <mat-toolbar color="primary" (click)="sidenav.toggle()">
1377
+ <span style="font-size: 15px;">{{department}}</span>
1378
+ <span class="menu-icon-close"></span>
1379
+ </mat-toolbar>
1380
+
1381
+ <mat-nav-list *ngFor="let route of routes">
1382
+ <nav class="flex-container-menu">
1383
+ <ipt-aside-button
1384
+ [buttonActive]="this.setPage === route.page"
1385
+ [icon]="route.icon"
1386
+ [text]="route.text"
1387
+ (isClicked)="clickPage(route.page)"
1388
+ (click)="sidenav.toggle()"
1389
+ >
1390
+ </ipt-aside-button>
1391
+ </nav>
1392
+ </mat-nav-list>
1393
+ </mat-sidenav>
1394
+
1395
+ <mat-toolbar class="header">
1396
+ <div class="menu-container" (click)="sidenav.toggle()">
1397
+ <p>Menu</p>
1398
+ <div class="menu-icon"></div>
1399
+ </div>
1400
+
1401
+ <img class="img-logo" src="http://qa.iptdev.com.co/assets/logos/IPT-logo.png" alt="" />
1402
+
1403
+ <div class="text-container">
1404
+ <span class="p1">{{ currentDay }}</span>
1405
+ <span *ngIf="hour >= 0 && hour < 12" class="p2">
1406
+ Hey {{ userName }}, Good moorning!
1407
+ </span>
1408
+ <p *ngIf="hour >= 12 && hour < 18" class="p2">
1409
+ Hey {{ userName }}, Good afternoon!
1410
+ </p>
1411
+ <p *ngIf="hour >= 18 && hour < 24" class="p2">
1412
+ Hey {{ userName }}, Good evening!
1413
+ </p>
1414
+ </div>
1415
+
1416
+ <div class="logout-container" (click)="logout()">
1417
+ <p class="logout-button">Cerrar sesión</p>
1418
+ <div class="photo-logout"></div>
1419
+ </div>
1420
+ </mat-toolbar>
1421
+ `, isInline: true, styles: ["*{font-family:Poppins,sans-serif}@media screen and (min-width: 320px){.header{background-color:#fff;display:flex;justify-content:space-between;filter:drop-shadow(0px -1px 7px #000)}mat-sidenav{width:-moz-fit-content!important;width:fit-content!important;background-color:#1c77f7!important}.img-logo,.text-container{display:none}.mat-toolbar.mat-primary{background-color:#fff!important;color:#003d99!important;filter:drop-shadow(0px -1px 7px #000)}.logout-container{box-shadow:#11111a1a 0 8px 24px,#11111a1a 0 16px 56px,#11111a1a 0 24px 80px;height:35px;width:auto;border-radius:30px;display:flex;margin-left:10px}.logout-button{display:flex;align-items:center;color:#1c77f7;font-weight:500;font-size:16px;margin-left:20px;text-align:center;width:150px}.photo-logout{background:url(http://qa.iptdev.com.co/assets/icons/exit.png);background-size:25px 25px;background-position:center;background-repeat:no-repeat}.menu-icon{background:url(http://qa.iptdev.com.co/assets/icons/icon-menu.png);background-size:25px 25px;background-position:center;background-repeat:no-repeat}.menu-icon-close{background:url(http://qa.iptdev.com.co/assets/icons/cruz.png);background-size:25px 25px;background-position:center;background-repeat:no-repeat;width:35px;height:35px}.menu-container{box-shadow:#11111a1a 0 8px 24px,#11111a1a 0 16px 56px,#11111a1a 0 24px 80px;height:35px;width:52.5px;width:auto;border-radius:30px;display:flex}.menu-container:hover{cursor:pointer}.menu-container p{width:85px;display:flex;align-items:center;color:#1c77f7;font-weight:500;font-size:16px;margin:0 0 0 15px;text-align:center}}@media screen and (min-width: 768px){.img-logo{display:flex;width:120px;height:60px}.text-container{border-radius:40px;height:45px;width:100%;display:flex;gap:-100px;justify-content:center;flex-direction:column;align-items:flex-start}}.p1{color:gray;margin-left:30px;font-size:13px;height:20px}.p2{margin-left:30px;font-size:14px;font-weight:600;color:#1c77f7}.flex-container-menu{font-size:18px;color:#fff!important}.mat-nav-list{padding:0}\n"], components: [{ type: i3$1.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { type: i4.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { type: i5.MatNavList, selector: "mat-nav-list", inputs: ["disableRipple", "disabled"], exportAs: ["matNavList"] }, { type: AsideButtonComponent, selector: "ipt-aside-button", inputs: ["icon", "text", "buttonActive"], outputs: ["isClicked"] }], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1422
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SidenavComponent, decorators: [{
1423
+ type: Component,
1424
+ args: [{ selector: 'ipt-sidenav', template: `
1425
+ <mat-sidenav #sidenav mode="push" >
1426
+ <mat-toolbar color="primary" (click)="sidenav.toggle()">
1427
+ <span style="font-size: 15px;">{{department}}</span>
1428
+ <span class="menu-icon-close"></span>
1429
+ </mat-toolbar>
1430
+
1431
+ <mat-nav-list *ngFor="let route of routes">
1432
+ <nav class="flex-container-menu">
1433
+ <ipt-aside-button
1434
+ [buttonActive]="this.setPage === route.page"
1435
+ [icon]="route.icon"
1436
+ [text]="route.text"
1437
+ (isClicked)="clickPage(route.page)"
1438
+ (click)="sidenav.toggle()"
1439
+ >
1440
+ </ipt-aside-button>
1441
+ </nav>
1442
+ </mat-nav-list>
1443
+ </mat-sidenav>
1444
+
1445
+ <mat-toolbar class="header">
1446
+ <div class="menu-container" (click)="sidenav.toggle()">
1447
+ <p>Menu</p>
1448
+ <div class="menu-icon"></div>
1449
+ </div>
1450
+
1451
+ <img class="img-logo" src="http://qa.iptdev.com.co/assets/logos/IPT-logo.png" alt="" />
1452
+
1453
+ <div class="text-container">
1454
+ <span class="p1">{{ currentDay }}</span>
1455
+ <span *ngIf="hour >= 0 && hour < 12" class="p2">
1456
+ Hey {{ userName }}, Good moorning!
1457
+ </span>
1458
+ <p *ngIf="hour >= 12 && hour < 18" class="p2">
1459
+ Hey {{ userName }}, Good afternoon!
1460
+ </p>
1461
+ <p *ngIf="hour >= 18 && hour < 24" class="p2">
1462
+ Hey {{ userName }}, Good evening!
1463
+ </p>
1464
+ </div>
1465
+
1466
+ <div class="logout-container" (click)="logout()">
1467
+ <p class="logout-button">Cerrar sesión</p>
1468
+ <div class="photo-logout"></div>
1469
+ </div>
1470
+ </mat-toolbar>
1471
+ `, styles: ["*{font-family:Poppins,sans-serif}@media screen and (min-width: 320px){.header{background-color:#fff;display:flex;justify-content:space-between;filter:drop-shadow(0px -1px 7px #000)}mat-sidenav{width:-moz-fit-content!important;width:fit-content!important;background-color:#1c77f7!important}.img-logo,.text-container{display:none}.mat-toolbar.mat-primary{background-color:#fff!important;color:#003d99!important;filter:drop-shadow(0px -1px 7px #000)}.logout-container{box-shadow:#11111a1a 0 8px 24px,#11111a1a 0 16px 56px,#11111a1a 0 24px 80px;height:35px;width:auto;border-radius:30px;display:flex;margin-left:10px}.logout-button{display:flex;align-items:center;color:#1c77f7;font-weight:500;font-size:16px;margin-left:20px;text-align:center;width:150px}.photo-logout{background:url(http://qa.iptdev.com.co/assets/icons/exit.png);background-size:25px 25px;background-position:center;background-repeat:no-repeat}.menu-icon{background:url(http://qa.iptdev.com.co/assets/icons/icon-menu.png);background-size:25px 25px;background-position:center;background-repeat:no-repeat}.menu-icon-close{background:url(http://qa.iptdev.com.co/assets/icons/cruz.png);background-size:25px 25px;background-position:center;background-repeat:no-repeat;width:35px;height:35px}.menu-container{box-shadow:#11111a1a 0 8px 24px,#11111a1a 0 16px 56px,#11111a1a 0 24px 80px;height:35px;width:52.5px;width:auto;border-radius:30px;display:flex}.menu-container:hover{cursor:pointer}.menu-container p{width:85px;display:flex;align-items:center;color:#1c77f7;font-weight:500;font-size:16px;margin:0 0 0 15px;text-align:center}}@media screen and (min-width: 768px){.img-logo{display:flex;width:120px;height:60px}.text-container{border-radius:40px;height:45px;width:100%;display:flex;gap:-100px;justify-content:center;flex-direction:column;align-items:flex-start}}.p1{color:gray;margin-left:30px;font-size:13px;height:20px}.p2{margin-left:30px;font-size:14px;font-weight:600;color:#1c77f7}.flex-container-menu{font-size:18px;color:#fff!important}.mat-nav-list{padding:0}\n"] }]
1472
+ }], ctorParameters: function () { return [{ type: UserService }, { type: StorageService }]; }, propDecorators: { department: [{
1473
+ type: Input
1474
+ }], setPage: [{
1475
+ type: Input
1476
+ }], userName: [{
1477
+ type: Input
1478
+ }], pageChangeEvent: [{
1479
+ type: Output
1479
1480
  }] } });
1480
1481
 
1481
- class MaterialModule {
1482
- }
1483
- MaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1484
- MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MaterialModule, exports: [MatSidenavModule, MatToolbarModule, MatIconModule, MatListModule, MatButtonModule] });
1485
- MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MaterialModule, imports: [MatSidenavModule, MatToolbarModule, MatIconModule, MatListModule, MatButtonModule] });
1486
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MaterialModule, decorators: [{
1487
- type: NgModule,
1488
- args: [{
1489
- exports: [MatSidenavModule, MatToolbarModule, MatIconModule, MatListModule, MatButtonModule],
1490
- }]
1482
+ class MaterialModule {
1483
+ }
1484
+ MaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1485
+ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MaterialModule, exports: [MatSidenavModule, MatToolbarModule, MatIconModule, MatListModule, MatButtonModule] });
1486
+ MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MaterialModule, imports: [MatSidenavModule, MatToolbarModule, MatIconModule, MatListModule, MatButtonModule] });
1487
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MaterialModule, decorators: [{
1488
+ type: NgModule,
1489
+ args: [{
1490
+ exports: [MatSidenavModule, MatToolbarModule, MatIconModule, MatListModule, MatButtonModule],
1491
+ }]
1491
1492
  }] });
1492
1493
 
1493
- class ComponentsModule {
1494
- }
1495
- ComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1496
- ComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ComponentsModule, declarations: [AsideButtonComponent,
1497
- ButtonComponent,
1498
- CheckboxComponent,
1499
- CreateUserFormComponent,
1500
- DatalistComponent,
1501
- InputComponent,
1502
- LevelButtonComponent,
1503
- LevelTextComponent,
1504
- LoginFormComponent,
1505
- RadioComponent,
1506
- SelectComponent,
1507
- SidenavComponent,
1508
- TextLinkComponent], imports: [CommonModule,
1509
- // BrowserModule, // Para evitar doble carga de BrowserModule
1510
- FormsModule,
1511
- ReactiveFormsModule,
1512
- MaterialModule,
1513
- CurrencyMaskModule], exports: [AsideButtonComponent,
1514
- ButtonComponent,
1515
- CheckboxComponent,
1516
- CreateUserFormComponent,
1517
- DatalistComponent,
1518
- InputComponent,
1519
- LevelButtonComponent,
1520
- LevelTextComponent,
1521
- RadioComponent,
1522
- SelectComponent,
1523
- TextLinkComponent,
1524
- LoginFormComponent,
1525
- SidenavComponent,
1526
- CurrencyMaskModule] });
1527
- ComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ComponentsModule, providers: [
1528
- CurrencyPipe,
1529
- TitleCasePipe
1530
- ], imports: [[
1531
- CommonModule,
1532
- // BrowserModule, // Para evitar doble carga de BrowserModule
1533
- FormsModule,
1534
- ReactiveFormsModule,
1535
- MaterialModule,
1536
- CurrencyMaskModule
1537
- ], CurrencyMaskModule] });
1538
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ComponentsModule, decorators: [{
1539
- type: NgModule,
1540
- args: [{
1541
- declarations: [
1542
- AsideButtonComponent,
1543
- ButtonComponent,
1544
- CheckboxComponent,
1545
- CreateUserFormComponent,
1546
- DatalistComponent,
1547
- InputComponent,
1548
- LevelButtonComponent,
1549
- LevelTextComponent,
1550
- LoginFormComponent,
1551
- RadioComponent,
1552
- SelectComponent,
1553
- SidenavComponent,
1554
- TextLinkComponent,
1555
- ],
1556
- imports: [
1557
- CommonModule,
1558
- // BrowserModule, // Para evitar doble carga de BrowserModule
1559
- FormsModule,
1560
- ReactiveFormsModule,
1561
- MaterialModule,
1562
- CurrencyMaskModule
1563
- ],
1564
- exports: [
1565
- AsideButtonComponent,
1566
- ButtonComponent,
1567
- CheckboxComponent,
1568
- CreateUserFormComponent,
1569
- DatalistComponent,
1570
- InputComponent,
1571
- LevelButtonComponent,
1572
- LevelTextComponent,
1573
- RadioComponent,
1574
- SelectComponent,
1575
- TextLinkComponent,
1576
- LoginFormComponent,
1577
- SidenavComponent,
1578
- CurrencyMaskModule
1579
- ],
1580
- providers: [
1581
- CurrencyPipe,
1582
- TitleCasePipe
1583
- ]
1584
- }]
1494
+ class ComponentsModule {
1495
+ }
1496
+ ComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1497
+ ComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ComponentsModule, declarations: [AsideButtonComponent,
1498
+ ButtonComponent,
1499
+ CheckboxComponent,
1500
+ CreateUserFormComponent,
1501
+ DatalistComponent,
1502
+ InputComponent,
1503
+ LevelButtonComponent,
1504
+ LevelTextComponent,
1505
+ LoginFormComponent,
1506
+ RadioComponent,
1507
+ SelectComponent,
1508
+ SidenavComponent,
1509
+ TextLinkComponent], imports: [CommonModule,
1510
+ // BrowserModule, // Para evitar doble carga de BrowserModule
1511
+ FormsModule,
1512
+ ReactiveFormsModule,
1513
+ MaterialModule,
1514
+ CurrencyMaskModule], exports: [AsideButtonComponent,
1515
+ ButtonComponent,
1516
+ CheckboxComponent,
1517
+ CreateUserFormComponent,
1518
+ DatalistComponent,
1519
+ InputComponent,
1520
+ LevelButtonComponent,
1521
+ LevelTextComponent,
1522
+ RadioComponent,
1523
+ SelectComponent,
1524
+ TextLinkComponent,
1525
+ LoginFormComponent,
1526
+ SidenavComponent,
1527
+ CurrencyMaskModule] });
1528
+ ComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ComponentsModule, providers: [
1529
+ CurrencyPipe,
1530
+ TitleCasePipe
1531
+ ], imports: [[
1532
+ CommonModule,
1533
+ // BrowserModule, // Para evitar doble carga de BrowserModule
1534
+ FormsModule,
1535
+ ReactiveFormsModule,
1536
+ MaterialModule,
1537
+ CurrencyMaskModule
1538
+ ], CurrencyMaskModule] });
1539
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ComponentsModule, decorators: [{
1540
+ type: NgModule,
1541
+ args: [{
1542
+ declarations: [
1543
+ AsideButtonComponent,
1544
+ ButtonComponent,
1545
+ CheckboxComponent,
1546
+ CreateUserFormComponent,
1547
+ DatalistComponent,
1548
+ InputComponent,
1549
+ LevelButtonComponent,
1550
+ LevelTextComponent,
1551
+ LoginFormComponent,
1552
+ RadioComponent,
1553
+ SelectComponent,
1554
+ SidenavComponent,
1555
+ TextLinkComponent,
1556
+ ],
1557
+ imports: [
1558
+ CommonModule,
1559
+ // BrowserModule, // Para evitar doble carga de BrowserModule
1560
+ FormsModule,
1561
+ ReactiveFormsModule,
1562
+ MaterialModule,
1563
+ CurrencyMaskModule
1564
+ ],
1565
+ exports: [
1566
+ AsideButtonComponent,
1567
+ ButtonComponent,
1568
+ CheckboxComponent,
1569
+ CreateUserFormComponent,
1570
+ DatalistComponent,
1571
+ InputComponent,
1572
+ LevelButtonComponent,
1573
+ LevelTextComponent,
1574
+ RadioComponent,
1575
+ SelectComponent,
1576
+ TextLinkComponent,
1577
+ LoginFormComponent,
1578
+ SidenavComponent,
1579
+ CurrencyMaskModule
1580
+ ],
1581
+ providers: [
1582
+ CurrencyPipe,
1583
+ TitleCasePipe
1584
+ ]
1585
+ }]
1585
1586
  }] });
1586
1587
 
1587
- class CourseService {
1588
- constructor(http) {
1589
- this.http = http;
1590
- this.SERVICE_URL = 'https://iptdev.com.co/lab/academic/api/';
1591
- }
1592
- createCourse(course) {
1593
- let serviceUrl = this.SERVICE_URL + 'post/course';
1594
- this.generateRequestParams(course);
1595
- return this.http.post(serviceUrl, this.httpOptions);
1596
- }
1597
- editCourse(course) {
1598
- let serviceUrl = this.SERVICE_URL + 'put/course';
1599
- this.generateRequestParams(course);
1600
- return this.http.put(serviceUrl, this.httpOptions);
1601
- }
1602
- getAllCourses(params) {
1603
- let serviceUrl = this.SERVICE_URL + 'post/all/courses';
1604
- this.generateRequestParams(params);
1605
- return this.http.post(serviceUrl, this.httpOptions);
1606
- }
1607
- getCoursesByLevel(params) {
1608
- let serviceUrl = this.SERVICE_URL + 'post/course/by/level';
1609
- this.generateRequestParams(params);
1610
- return this.http.post(serviceUrl, this.httpOptions);
1611
- }
1612
- getAvailibleCourses(availibleCourses) {
1613
- let serviceUrl = this.SERVICE_URL + 'post/course/for/cod';
1614
- this.generateRequestParams(availibleCourses);
1615
- return this.http.post(serviceUrl, this.httpOptions);
1616
- }
1617
- getCourseByCode(params) {
1618
- let serviceUrl = this.SERVICE_URL + 'post/course/by/code';
1619
- this.generateRequestParams(params);
1620
- return this.http.post(serviceUrl, this.httpOptions);
1621
- }
1622
- getCoursesByTeacher(params) {
1623
- let serviceUrl = this.SERVICE_URL + 'post/course/by/teacher';
1624
- this.generateRequestParams(params);
1625
- return this.http.post(serviceUrl, this.httpOptions);
1626
- }
1627
- getFilteredCoursesByTeacher(params) {
1628
- let serviceUrl = this.SERVICE_URL + 'post/course/filtered/by/teacher';
1629
- this.generateRequestParams(params);
1630
- return this.http.post(serviceUrl, this.httpOptions);
1631
- }
1632
- getCoursesByStartDate(params) {
1633
- let serviceUrl = this.SERVICE_URL + 'post/course/by/startdate';
1634
- this.generateRequestParams(params);
1635
- return this.http.post(serviceUrl, this.httpOptions);
1636
- }
1637
- numberClassByCode(idCode) {
1638
- let serviceUrl = this.SERVICE_URL + 'get/coursetype/numclass/by/code/' + idCode;
1639
- return this.http.get(serviceUrl);
1640
- }
1641
- // construye los headers y params
1642
- generateRequestParams(param) {
1643
- this.httpOptions = {
1644
- header: new HttpHeaders(),
1645
- params: param,
1646
- };
1647
- }
1648
- }
1649
- CourseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CourseService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1650
- CourseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CourseService, providedIn: 'root' });
1651
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CourseService, decorators: [{
1652
- type: Injectable,
1653
- args: [{
1654
- providedIn: 'root',
1655
- }]
1588
+ class CourseService {
1589
+ constructor(http) {
1590
+ this.http = http;
1591
+ this.SERVICE_URL = 'https://iptdev.com.co/lab/academic/api/';
1592
+ }
1593
+ createCourse(course) {
1594
+ let serviceUrl = this.SERVICE_URL + 'post/course';
1595
+ this.generateRequestParams(course);
1596
+ return this.http.post(serviceUrl, this.httpOptions);
1597
+ }
1598
+ editCourse(course) {
1599
+ let serviceUrl = this.SERVICE_URL + 'put/course';
1600
+ this.generateRequestParams(course);
1601
+ return this.http.put(serviceUrl, this.httpOptions);
1602
+ }
1603
+ getAllCourses(params) {
1604
+ let serviceUrl = this.SERVICE_URL + 'post/all/courses';
1605
+ this.generateRequestParams(params);
1606
+ return this.http.post(serviceUrl, this.httpOptions);
1607
+ }
1608
+ getCoursesByLevel(params) {
1609
+ let serviceUrl = this.SERVICE_URL + 'post/course/by/level';
1610
+ this.generateRequestParams(params);
1611
+ return this.http.post(serviceUrl, this.httpOptions);
1612
+ }
1613
+ getAvailibleCourses(availibleCourses) {
1614
+ let serviceUrl = this.SERVICE_URL + 'post/course/for/cod';
1615
+ this.generateRequestParams(availibleCourses);
1616
+ return this.http.post(serviceUrl, this.httpOptions);
1617
+ }
1618
+ getCourseByCode(params) {
1619
+ let serviceUrl = this.SERVICE_URL + 'post/course/by/code';
1620
+ this.generateRequestParams(params);
1621
+ return this.http.post(serviceUrl, this.httpOptions);
1622
+ }
1623
+ getCoursesByTeacher(params) {
1624
+ let serviceUrl = this.SERVICE_URL + 'post/course/by/teacher';
1625
+ this.generateRequestParams(params);
1626
+ return this.http.post(serviceUrl, this.httpOptions);
1627
+ }
1628
+ getFilteredCoursesByTeacher(params) {
1629
+ let serviceUrl = this.SERVICE_URL + 'post/course/filtered/by/teacher';
1630
+ this.generateRequestParams(params);
1631
+ return this.http.post(serviceUrl, this.httpOptions);
1632
+ }
1633
+ getCoursesByStartDate(params) {
1634
+ let serviceUrl = this.SERVICE_URL + 'post/course/by/startdate';
1635
+ this.generateRequestParams(params);
1636
+ return this.http.post(serviceUrl, this.httpOptions);
1637
+ }
1638
+ numberClassByCode(idCode) {
1639
+ let serviceUrl = this.SERVICE_URL + 'get/coursetype/numclass/by/code/' + idCode;
1640
+ return this.http.get(serviceUrl);
1641
+ }
1642
+ // construye los headers y params
1643
+ generateRequestParams(param) {
1644
+ this.httpOptions = {
1645
+ header: new HttpHeaders(),
1646
+ params: param,
1647
+ };
1648
+ }
1649
+ }
1650
+ CourseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CourseService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1651
+ CourseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CourseService, providedIn: 'root' });
1652
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CourseService, decorators: [{
1653
+ type: Injectable,
1654
+ args: [{
1655
+ providedIn: 'root',
1656
+ }]
1656
1657
  }], ctorParameters: function () { return [{ type: i1$2.HttpClient }]; } });
1657
1658
 
1658
- class RedirectGuard {
1659
- constructor(router) {
1660
- this.router = router;
1661
- }
1662
- canActivate(route, state) {
1663
- window.location.href = route.data['externalUrl'];
1664
- return true;
1665
- }
1666
- }
1667
- RedirectGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RedirectGuard, deps: [{ token: i1$3.Router }], target: i0.ɵɵFactoryTarget.Injectable });
1668
- RedirectGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RedirectGuard });
1669
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RedirectGuard, decorators: [{
1670
- type: Injectable
1659
+ class RedirectGuard {
1660
+ constructor(router) {
1661
+ this.router = router;
1662
+ }
1663
+ canActivate(route, state) {
1664
+ window.location.href = route.data['externalUrl'];
1665
+ return true;
1666
+ }
1667
+ }
1668
+ RedirectGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RedirectGuard, deps: [{ token: i1$3.Router }], target: i0.ɵɵFactoryTarget.Injectable });
1669
+ RedirectGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RedirectGuard });
1670
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RedirectGuard, decorators: [{
1671
+ type: Injectable
1671
1672
  }], ctorParameters: function () { return [{ type: i1$3.Router }]; } });
1672
1673
 
1673
- class SwitchService {
1674
- constructor() {
1675
- this.$modal = new EventEmitter();
1676
- }
1677
- }
1678
- SwitchService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SwitchService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1679
- SwitchService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SwitchService, providedIn: 'root' });
1680
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SwitchService, decorators: [{
1681
- type: Injectable,
1682
- args: [{
1683
- providedIn: 'root'
1684
- }]
1674
+ class SwitchService {
1675
+ constructor() {
1676
+ this.$modal = new EventEmitter();
1677
+ }
1678
+ }
1679
+ SwitchService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SwitchService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1680
+ SwitchService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SwitchService, providedIn: 'root' });
1681
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SwitchService, decorators: [{
1682
+ type: Injectable,
1683
+ args: [{
1684
+ providedIn: 'root'
1685
+ }]
1685
1686
  }], ctorParameters: function () { return []; } });
1686
1687
 
1687
- class TestService {
1688
- constructor(http) {
1689
- this.http = http;
1690
- this.SERVICE_URL = 'https://iptdev.com.co/lab/test/api/';
1691
- }
1692
- // ---------------------- EXÁMENES ---------------------- //
1693
- createExam(exam) {
1694
- let serviceUrl = this.SERVICE_URL + 'post/exam';
1695
- this.generateRequestParams(exam);
1696
- return this.http.post(serviceUrl, this.httpOptions);
1697
- }
1698
- getAllExams(params) {
1699
- let serviceUrl = this.SERVICE_URL + 'post/all/exam';
1700
- this.generateRequestParams(params);
1701
- return this.http.post(serviceUrl, this.httpOptions);
1702
- }
1703
- updateExam(params) {
1704
- let serviceUrl = this.SERVICE_URL + 'update/exam';
1705
- this.generateRequestParams(params);
1706
- return this.http.put(serviceUrl, this.httpOptions);
1707
- }
1708
- updateExamStatus(params) {
1709
- let serviceUrl = this.SERVICE_URL + 'update/exam/status';
1710
- this.generateRequestParams(params);
1711
- return this.http.put(serviceUrl, this.httpOptions);
1712
- }
1713
- copyExam(params) {
1714
- let serviceUrl = this.SERVICE_URL + 'copy/exam';
1715
- this.generateRequestParams(params);
1716
- return this.http.put(serviceUrl, this.httpOptions);
1717
- }
1718
- getExamByCode(code) {
1719
- let serviceUrl = this.SERVICE_URL + 'get/exam/by/code/' + code;
1720
- return this.http.get(serviceUrl);
1721
- }
1722
- getExamByAuthor(code) {
1723
- let serviceUrl = this.SERVICE_URL + 'get/exams/by/author/' + code;
1724
- return this.http.get(serviceUrl);
1725
- }
1726
- // ---------------------- SECCIONES ---------------------- //
1727
- createSectionWithAll(params) {
1728
- let serviceUrl = this.SERVICE_URL + 'post/section/with/all';
1729
- this.generateRequestParams(params);
1730
- return this.http.post(serviceUrl, this.httpOptions);
1731
- }
1732
- createSection(params) {
1733
- let serviceUrl = this.SERVICE_URL + 'post/section';
1734
- this.generateRequestParams(params);
1735
- return this.http.post(serviceUrl, this.httpOptions);
1736
- }
1737
- getAllSections(params) {
1738
- let serviceUrl = this.SERVICE_URL + 'post/all/sections';
1739
- this.generateRequestParams(params);
1740
- return this.http.post(serviceUrl, this.httpOptions);
1741
- }
1742
- updateSection(params) {
1743
- let serviceUrl = this.SERVICE_URL + 'update/section';
1744
- this.generateRequestParams(params);
1745
- return this.http.put(serviceUrl, this.httpOptions);
1746
- }
1747
- updateSectionMedia(params) {
1748
- let serviceUrl = this.SERVICE_URL + 'post/section/media';
1749
- this.generateRequestParams(params);
1750
- return this.http.post(serviceUrl, this.httpOptions);
1751
- }
1752
- updateSectionState(params) {
1753
- let serviceUrl = this.SERVICE_URL + 'update/section/state';
1754
- this.generateRequestParams(params);
1755
- return this.http.put(serviceUrl, this.httpOptions);
1756
- }
1757
- getSectionsByExam(code) {
1758
- let serviceUrl = this.SERVICE_URL + 'get/sections/by/exam/' + code;
1759
- return this.http.get(serviceUrl);
1760
- }
1761
- // ---------------------- PREGUNTAS ---------------------- //
1762
- createQuestion(params) {
1763
- let serviceUrl = this.SERVICE_URL + 'post/question';
1764
- this.generateRequestParams(params);
1765
- return this.http.post(serviceUrl, this.httpOptions);
1766
- }
1767
- updateQuestion(params) {
1768
- let serviceUrl = this.SERVICE_URL + 'update/question';
1769
- this.generateRequestParams(params);
1770
- return this.http.put(serviceUrl, this.httpOptions);
1771
- }
1772
- getQuestionsBySections(params) {
1773
- let serviceUrl = this.SERVICE_URL + 'get/questions/by/sections';
1774
- this.generateRequestParams(params);
1775
- return this.http.post(serviceUrl, this.httpOptions);
1776
- }
1777
- getQuestionsBySection(params) {
1778
- let serviceUrl = this.SERVICE_URL + 'get/questions/by/section';
1779
- this.generateRequestParams(params);
1780
- return this.http.post(serviceUrl, this.httpOptions);
1781
- }
1782
- // ---------------------- RESPUESTAS ---------------------- //
1783
- createAnswer(params) {
1784
- let serviceUrl = this.SERVICE_URL + 'post/answer';
1785
- this.generateRequestParams(params);
1786
- return this.http.post(serviceUrl, this.httpOptions);
1787
- }
1788
- updateAnswer(params) {
1789
- let serviceUrl = this.SERVICE_URL + 'update/answer';
1790
- this.generateRequestParams(params);
1791
- return this.http.put(serviceUrl, this.httpOptions);
1792
- }
1793
- getAnswersByQuestion(code) {
1794
- let serviceUrl = this.SERVICE_URL + 'get/answers/by/question/' + code;
1795
- return this.http.get(serviceUrl, this.httpOptions);
1796
- }
1797
- updateQuestionState(params) {
1798
- let serviceUrl = this.SERVICE_URL + 'update/question/state';
1799
- this.generateRequestParams(params);
1800
- return this.http.put(serviceUrl, this.httpOptions);
1801
- }
1802
- // construye los headers y params
1803
- generateRequestParams(param) {
1804
- this.httpOptions = {
1805
- header: new HttpHeaders(),
1806
- params: param,
1807
- };
1808
- }
1809
- }
1810
- TestService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TestService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1811
- TestService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TestService, providedIn: 'root' });
1812
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TestService, decorators: [{
1813
- type: Injectable,
1814
- args: [{
1815
- providedIn: 'root',
1816
- }]
1688
+ class TestService {
1689
+ constructor(http) {
1690
+ this.http = http;
1691
+ this.SERVICE_URL = 'https://iptdev.com.co/lab/test/api/';
1692
+ }
1693
+ // ---------------------- EXÁMENES ---------------------- //
1694
+ createExam(exam) {
1695
+ let serviceUrl = this.SERVICE_URL + 'post/exam';
1696
+ this.generateRequestParams(exam);
1697
+ return this.http.post(serviceUrl, this.httpOptions);
1698
+ }
1699
+ getAllExams(params) {
1700
+ let serviceUrl = this.SERVICE_URL + 'post/all/exam';
1701
+ this.generateRequestParams(params);
1702
+ return this.http.post(serviceUrl, this.httpOptions);
1703
+ }
1704
+ updateExam(params) {
1705
+ let serviceUrl = this.SERVICE_URL + 'update/exam';
1706
+ this.generateRequestParams(params);
1707
+ return this.http.put(serviceUrl, this.httpOptions);
1708
+ }
1709
+ updateExamStatus(params) {
1710
+ let serviceUrl = this.SERVICE_URL + 'update/exam/status';
1711
+ this.generateRequestParams(params);
1712
+ return this.http.put(serviceUrl, this.httpOptions);
1713
+ }
1714
+ copyExam(params) {
1715
+ let serviceUrl = this.SERVICE_URL + 'copy/exam';
1716
+ this.generateRequestParams(params);
1717
+ return this.http.put(serviceUrl, this.httpOptions);
1718
+ }
1719
+ getExamByCode(code) {
1720
+ let serviceUrl = this.SERVICE_URL + 'get/exam/by/code/' + code;
1721
+ return this.http.get(serviceUrl);
1722
+ }
1723
+ getExamByAuthor(code) {
1724
+ let serviceUrl = this.SERVICE_URL + 'get/exams/by/author/' + code;
1725
+ return this.http.get(serviceUrl);
1726
+ }
1727
+ // ---------------------- SECCIONES ---------------------- //
1728
+ createSectionWithAll(params) {
1729
+ let serviceUrl = this.SERVICE_URL + 'post/section/with/all';
1730
+ this.generateRequestParams(params);
1731
+ return this.http.post(serviceUrl, this.httpOptions);
1732
+ }
1733
+ createSection(params) {
1734
+ let serviceUrl = this.SERVICE_URL + 'post/section';
1735
+ this.generateRequestParams(params);
1736
+ return this.http.post(serviceUrl, this.httpOptions);
1737
+ }
1738
+ getAllSections(params) {
1739
+ let serviceUrl = this.SERVICE_URL + 'post/all/sections';
1740
+ this.generateRequestParams(params);
1741
+ return this.http.post(serviceUrl, this.httpOptions);
1742
+ }
1743
+ updateSection(params) {
1744
+ let serviceUrl = this.SERVICE_URL + 'update/section';
1745
+ this.generateRequestParams(params);
1746
+ return this.http.put(serviceUrl, this.httpOptions);
1747
+ }
1748
+ updateSectionMedia(params) {
1749
+ let serviceUrl = this.SERVICE_URL + 'post/section/media';
1750
+ this.generateRequestParams(params);
1751
+ return this.http.post(serviceUrl, this.httpOptions);
1752
+ }
1753
+ updateSectionState(params) {
1754
+ let serviceUrl = this.SERVICE_URL + 'update/section/state';
1755
+ this.generateRequestParams(params);
1756
+ return this.http.put(serviceUrl, this.httpOptions);
1757
+ }
1758
+ getSectionsByExam(code) {
1759
+ let serviceUrl = this.SERVICE_URL + 'get/sections/by/exam/' + code;
1760
+ return this.http.get(serviceUrl);
1761
+ }
1762
+ // ---------------------- PREGUNTAS ---------------------- //
1763
+ createQuestion(params) {
1764
+ let serviceUrl = this.SERVICE_URL + 'post/question';
1765
+ this.generateRequestParams(params);
1766
+ return this.http.post(serviceUrl, this.httpOptions);
1767
+ }
1768
+ updateQuestion(params) {
1769
+ let serviceUrl = this.SERVICE_URL + 'update/question';
1770
+ this.generateRequestParams(params);
1771
+ return this.http.put(serviceUrl, this.httpOptions);
1772
+ }
1773
+ getQuestionsBySections(params) {
1774
+ let serviceUrl = this.SERVICE_URL + 'get/questions/by/sections';
1775
+ this.generateRequestParams(params);
1776
+ return this.http.post(serviceUrl, this.httpOptions);
1777
+ }
1778
+ getQuestionsBySection(params) {
1779
+ let serviceUrl = this.SERVICE_URL + 'get/questions/by/section';
1780
+ this.generateRequestParams(params);
1781
+ return this.http.post(serviceUrl, this.httpOptions);
1782
+ }
1783
+ // ---------------------- RESPUESTAS ---------------------- //
1784
+ createAnswer(params) {
1785
+ let serviceUrl = this.SERVICE_URL + 'post/answer';
1786
+ this.generateRequestParams(params);
1787
+ return this.http.post(serviceUrl, this.httpOptions);
1788
+ }
1789
+ updateAnswer(params) {
1790
+ let serviceUrl = this.SERVICE_URL + 'update/answer';
1791
+ this.generateRequestParams(params);
1792
+ return this.http.put(serviceUrl, this.httpOptions);
1793
+ }
1794
+ getAnswersByQuestion(code) {
1795
+ let serviceUrl = this.SERVICE_URL + 'get/answers/by/question/' + code;
1796
+ return this.http.get(serviceUrl, this.httpOptions);
1797
+ }
1798
+ updateQuestionState(params) {
1799
+ let serviceUrl = this.SERVICE_URL + 'update/question/state';
1800
+ this.generateRequestParams(params);
1801
+ return this.http.put(serviceUrl, this.httpOptions);
1802
+ }
1803
+ // construye los headers y params
1804
+ generateRequestParams(param) {
1805
+ this.httpOptions = {
1806
+ header: new HttpHeaders(),
1807
+ params: param,
1808
+ };
1809
+ }
1810
+ }
1811
+ TestService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TestService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1812
+ TestService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TestService, providedIn: 'root' });
1813
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TestService, decorators: [{
1814
+ type: Injectable,
1815
+ args: [{
1816
+ providedIn: 'root',
1817
+ }]
1817
1818
  }], ctorParameters: function () { return [{ type: i1$2.HttpClient }]; } });
1818
1819
 
1819
- class MarketingService {
1820
- constructor(http) {
1821
- this.http = http;
1822
- this.SERVICE_URL = 'https://iptdev.com.co/lab/commercial/api/';
1823
- }
1824
- getStrategyByUserCommercial(user) {
1825
- let serviceUrl = this.SERVICE_URL + 'post/contact/strategy/byaviser';
1826
- this.generateRequestParams(user);
1827
- return this.http.post(serviceUrl, this.httpOptions);
1828
- }
1829
- getObservationsContact(codeContact) {
1830
- let serviceUrl = this.SERVICE_URL + 'get/contact/observation/strategy/bycode/' + codeContact;
1831
- return this.http.get(serviceUrl);
1832
- }
1833
- createObservations(params) {
1834
- let serviceUrl = this.SERVICE_URL + 'post/contact/observation/create';
1835
- this.generateRequestParams(params);
1836
- return this.http.post(serviceUrl, this.httpOptions);
1837
- }
1838
- getUserStatistics(userToken) {
1839
- let serviceUrl = this.SERVICE_URL + 'get/contact/strategy/statistics';
1840
- this.generateRequestParams(userToken);
1841
- return this.http.post(serviceUrl, this.httpOptions);
1842
- }
1843
- getTopAdviser() {
1844
- let serviceUrl = this.SERVICE_URL + 'get/contact/strategy/topadviser';
1845
- return this.http.get(serviceUrl, this.httpOptions);
1846
- }
1847
- getMovementStatus() {
1848
- let serviceUrl = this.SERVICE_URL + 'get/contact/strategy/movements/status';
1849
- return this.http.get(serviceUrl, this.httpOptions);
1850
- }
1851
- getgroupSignupStatus() {
1852
- let serviceUrl = this.SERVICE_URL + 'get/contact/strategy/group/signup';
1853
- return this.http.get(serviceUrl, this.httpOptions);
1854
- }
1855
- //Construye los headers y paramns
1856
- generateRequestParams(param) {
1857
- this.httpOptions = {
1858
- header: new HttpHeaders(),
1859
- params: param,
1860
- };
1861
- }
1862
- }
1863
- MarketingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MarketingService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1864
- MarketingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MarketingService, providedIn: 'root' });
1865
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MarketingService, decorators: [{
1866
- type: Injectable,
1867
- args: [{
1868
- providedIn: 'root'
1869
- }]
1820
+ class MarketingService {
1821
+ constructor(http) {
1822
+ this.http = http;
1823
+ this.SERVICE_URL = 'https://iptdev.com.co/lab/commercial/api/';
1824
+ }
1825
+ getStrategyByUserCommercial(user) {
1826
+ let serviceUrl = this.SERVICE_URL + 'post/contact/strategy/byaviser';
1827
+ this.generateRequestParams(user);
1828
+ return this.http.post(serviceUrl, this.httpOptions);
1829
+ }
1830
+ getObservationsContact(codeContact) {
1831
+ let serviceUrl = this.SERVICE_URL + 'get/contact/observation/strategy/bycode/' + codeContact;
1832
+ return this.http.get(serviceUrl);
1833
+ }
1834
+ createObservations(params) {
1835
+ let serviceUrl = this.SERVICE_URL + 'post/contact/observation/create';
1836
+ this.generateRequestParams(params);
1837
+ return this.http.post(serviceUrl, this.httpOptions);
1838
+ }
1839
+ getUserStatistics(userToken) {
1840
+ let serviceUrl = this.SERVICE_URL + 'get/contact/strategy/statistics';
1841
+ this.generateRequestParams(userToken);
1842
+ return this.http.post(serviceUrl, this.httpOptions);
1843
+ }
1844
+ getTopAdviser() {
1845
+ let serviceUrl = this.SERVICE_URL + 'get/contact/strategy/topadviser';
1846
+ return this.http.get(serviceUrl, this.httpOptions);
1847
+ }
1848
+ getMovementStatus() {
1849
+ let serviceUrl = this.SERVICE_URL + 'get/contact/strategy/movements/status';
1850
+ return this.http.get(serviceUrl, this.httpOptions);
1851
+ }
1852
+ getgroupSignupStatus() {
1853
+ let serviceUrl = this.SERVICE_URL + 'get/contact/strategy/group/signup';
1854
+ return this.http.get(serviceUrl, this.httpOptions);
1855
+ }
1856
+ //Construye los headers y paramns
1857
+ generateRequestParams(param) {
1858
+ this.httpOptions = {
1859
+ header: new HttpHeaders(),
1860
+ params: param,
1861
+ };
1862
+ }
1863
+ }
1864
+ MarketingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MarketingService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1865
+ MarketingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MarketingService, providedIn: 'root' });
1866
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MarketingService, decorators: [{
1867
+ type: Injectable,
1868
+ args: [{
1869
+ providedIn: 'root'
1870
+ }]
1870
1871
  }], ctorParameters: function () { return [{ type: i1$2.HttpClient }]; } });
1871
1872
 
1872
- class BudgetService {
1873
- constructor(http) {
1874
- this.http = http;
1875
- this.SERVICE_URL = 'https://iptdev.com.co/lab/budget/api/';
1876
- }
1877
- getAllDiscount(user) {
1878
- let serviceUrl = this.SERVICE_URL + 'post/discounts/coupon/all';
1879
- this.generateRequestParams(user);
1880
- return this.http.post(serviceUrl, this.httpOptions);
1881
- }
1882
- createDiscount(params) {
1883
- let serviceUrl = this.SERVICE_URL + 'post/discount/coupon/create';
1884
- this.generateRequestParams(params);
1885
- return this.http.post(serviceUrl, this.httpOptions);
1886
- }
1887
- updateDiscount(params) {
1888
- let serviceUrl = this.SERVICE_URL + 'post/discount/coupon/update';
1889
- this.generateRequestParams(params);
1890
- return this.http.post(serviceUrl, this.httpOptions);
1891
- }
1892
- //Construye los headers y paramns
1893
- generateRequestParams(param) {
1894
- this.httpOptions = {
1895
- header: new HttpHeaders(),
1896
- params: param,
1897
- };
1898
- }
1899
- }
1900
- BudgetService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: BudgetService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1901
- BudgetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: BudgetService, providedIn: 'root' });
1902
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: BudgetService, decorators: [{
1903
- type: Injectable,
1904
- args: [{
1905
- providedIn: 'root'
1906
- }]
1873
+ class BudgetService {
1874
+ constructor(http) {
1875
+ this.http = http;
1876
+ this.SERVICE_URL = 'https://iptdev.com.co/lab/budget/api/';
1877
+ }
1878
+ getAllDiscount(user) {
1879
+ let serviceUrl = this.SERVICE_URL + 'post/discounts/coupon/all';
1880
+ this.generateRequestParams(user);
1881
+ return this.http.post(serviceUrl, this.httpOptions);
1882
+ }
1883
+ createDiscount(params) {
1884
+ let serviceUrl = this.SERVICE_URL + 'post/discount/coupon/create';
1885
+ this.generateRequestParams(params);
1886
+ return this.http.post(serviceUrl, this.httpOptions);
1887
+ }
1888
+ updateDiscount(params) {
1889
+ let serviceUrl = this.SERVICE_URL + 'post/discount/coupon/update';
1890
+ this.generateRequestParams(params);
1891
+ return this.http.post(serviceUrl, this.httpOptions);
1892
+ }
1893
+ //Construye los headers y paramns
1894
+ generateRequestParams(param) {
1895
+ this.httpOptions = {
1896
+ header: new HttpHeaders(),
1897
+ params: param,
1898
+ };
1899
+ }
1900
+ }
1901
+ BudgetService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: BudgetService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1902
+ BudgetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: BudgetService, providedIn: 'root' });
1903
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: BudgetService, decorators: [{
1904
+ type: Injectable,
1905
+ args: [{
1906
+ providedIn: 'root'
1907
+ }]
1907
1908
  }], ctorParameters: function () { return [{ type: i1$2.HttpClient }]; } });
1908
1909
 
1909
- class CoreModule {
1910
- }
1911
- CoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1912
- CoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CoreModule });
1913
- CoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CoreModule, providers: [
1914
- ParameterService,
1915
- CourseService,
1916
- StorageService,
1917
- UserService,
1918
- SwitchService,
1919
- RedirectGuard,
1920
- BaseService,
1921
- TestService,
1922
- MarketingService,
1923
- BudgetService
1924
- ] });
1925
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CoreModule, decorators: [{
1926
- type: NgModule,
1927
- args: [{
1928
- providers: [
1929
- ParameterService,
1930
- CourseService,
1931
- StorageService,
1932
- UserService,
1933
- SwitchService,
1934
- RedirectGuard,
1935
- BaseService,
1936
- TestService,
1937
- MarketingService,
1938
- BudgetService
1939
- ]
1940
- }]
1910
+ class CoreModule {
1911
+ }
1912
+ CoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1913
+ CoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CoreModule });
1914
+ CoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CoreModule, providers: [
1915
+ ParameterService,
1916
+ CourseService,
1917
+ StorageService,
1918
+ UserService,
1919
+ SwitchService,
1920
+ RedirectGuard,
1921
+ BaseService,
1922
+ TestService,
1923
+ MarketingService,
1924
+ BudgetService
1925
+ ] });
1926
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CoreModule, decorators: [{
1927
+ type: NgModule,
1928
+ args: [{
1929
+ providers: [
1930
+ ParameterService,
1931
+ CourseService,
1932
+ StorageService,
1933
+ UserService,
1934
+ SwitchService,
1935
+ RedirectGuard,
1936
+ BaseService,
1937
+ TestService,
1938
+ MarketingService,
1939
+ BudgetService
1940
+ ]
1941
+ }]
1941
1942
  }] });
1942
1943
 
1943
- class DesignSystemModule {
1944
- }
1945
- DesignSystemModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: DesignSystemModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1946
- DesignSystemModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: DesignSystemModule, imports: [ComponentsModule,
1947
- CoreModule,
1948
- CurrencyMaskModule], exports: [ComponentsModule,
1949
- CoreModule,
1950
- CurrencyMaskModule] });
1951
- DesignSystemModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: DesignSystemModule, imports: [[
1952
- ComponentsModule,
1953
- CoreModule,
1954
- CurrencyMaskModule
1955
- ], ComponentsModule,
1956
- CoreModule,
1957
- CurrencyMaskModule] });
1958
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: DesignSystemModule, decorators: [{
1959
- type: NgModule,
1960
- args: [{
1961
- imports: [
1962
- ComponentsModule,
1963
- CoreModule,
1964
- CurrencyMaskModule
1965
- ],
1966
- exports: [
1967
- ComponentsModule,
1968
- CoreModule,
1969
- CurrencyMaskModule
1970
- ],
1971
- }]
1944
+ class DesignSystemModule {
1945
+ }
1946
+ DesignSystemModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: DesignSystemModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1947
+ DesignSystemModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: DesignSystemModule, imports: [ComponentsModule,
1948
+ CoreModule,
1949
+ CurrencyMaskModule], exports: [ComponentsModule,
1950
+ CoreModule,
1951
+ CurrencyMaskModule] });
1952
+ DesignSystemModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: DesignSystemModule, imports: [[
1953
+ ComponentsModule,
1954
+ CoreModule,
1955
+ CurrencyMaskModule
1956
+ ], ComponentsModule,
1957
+ CoreModule,
1958
+ CurrencyMaskModule] });
1959
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: DesignSystemModule, decorators: [{
1960
+ type: NgModule,
1961
+ args: [{
1962
+ imports: [
1963
+ ComponentsModule,
1964
+ CoreModule,
1965
+ CurrencyMaskModule
1966
+ ],
1967
+ exports: [
1968
+ ComponentsModule,
1969
+ CoreModule,
1970
+ CurrencyMaskModule
1971
+ ],
1972
+ }]
1972
1973
  }] });
1973
1974
 
1974
- class AttendanceService {
1975
- constructor(http) {
1976
- this.http = http;
1977
- }
1978
- }
1979
- AttendanceService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: AttendanceService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1980
- AttendanceService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: AttendanceService, providedIn: 'root' });
1981
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: AttendanceService, decorators: [{
1982
- type: Injectable,
1983
- args: [{
1984
- providedIn: 'root'
1985
- }]
1975
+ class AttendanceService {
1976
+ constructor(http) {
1977
+ this.http = http;
1978
+ }
1979
+ }
1980
+ AttendanceService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: AttendanceService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1981
+ AttendanceService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: AttendanceService, providedIn: 'root' });
1982
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: AttendanceService, decorators: [{
1983
+ type: Injectable,
1984
+ args: [{
1985
+ providedIn: 'root'
1986
+ }]
1986
1987
  }], ctorParameters: function () { return [{ type: i1$2.HttpClient }]; } });
1987
1988
 
1988
- class CalendarService {
1989
- constructor(http) {
1990
- this.http = http;
1991
- this.SERVICE_URL = 'https://iptdev.com.co/lab/calendar/api/';
1992
- }
1993
- getEventByIdCalendar(idCalendar) {
1994
- let serviceUrl = this.SERVICE_URL + 'get/event/calendar/idcalendar/all/' + idCalendar;
1995
- return this.http.get(serviceUrl);
1996
- }
1997
- postEventByDayTime(params) {
1998
- let serviceUrl = this.SERVICE_URL + 'post/event/calendar/idcalendar/by/datetime';
1999
- this.generateRequestParams(params);
2000
- return this.http.post(serviceUrl, this.httpOptions);
2001
- }
2002
- generateRequestParams(param) {
2003
- this.httpOptions = {
2004
- header: new HttpHeaders(),
2005
- params: param,
2006
- };
2007
- }
2008
- }
2009
- CalendarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CalendarService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2010
- CalendarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CalendarService, providedIn: 'root' });
2011
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CalendarService, decorators: [{
2012
- type: Injectable,
2013
- args: [{
2014
- providedIn: 'root',
2015
- }]
1989
+ class CalendarService {
1990
+ constructor(http) {
1991
+ this.http = http;
1992
+ this.SERVICE_URL = 'https://iptdev.com.co/lab/calendar/api/';
1993
+ }
1994
+ getEventByIdCalendar(idCalendar) {
1995
+ let serviceUrl = this.SERVICE_URL + 'get/event/calendar/idcalendar/all/' + idCalendar;
1996
+ return this.http.get(serviceUrl);
1997
+ }
1998
+ postEventByDayTime(params) {
1999
+ let serviceUrl = this.SERVICE_URL + 'post/event/calendar/idcalendar/by/datetime';
2000
+ this.generateRequestParams(params);
2001
+ return this.http.post(serviceUrl, this.httpOptions);
2002
+ }
2003
+ generateRequestParams(param) {
2004
+ this.httpOptions = {
2005
+ header: new HttpHeaders(),
2006
+ params: param,
2007
+ };
2008
+ }
2009
+ }
2010
+ CalendarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CalendarService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2011
+ CalendarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CalendarService, providedIn: 'root' });
2012
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CalendarService, decorators: [{
2013
+ type: Injectable,
2014
+ args: [{
2015
+ providedIn: 'root',
2016
+ }]
2016
2017
  }], ctorParameters: function () { return [{ type: i1$2.HttpClient }]; } });
2017
2018
 
2018
- class NotesService {
2019
- constructor(http) {
2020
- this.http = http;
2021
- this.SERVICE_URL = 'https://iptdev.com.co/lab/academic/api/';
2022
- }
2023
- getNotesByGroup(params) {
2024
- let serviceUrl = this.SERVICE_URL + 'post/obtain/notes/by/course';
2025
- this.generateRequestParams(params);
2026
- return this.http.post(serviceUrl, this.httpOptions);
2027
- }
2028
- getNotesByStudent(params) {
2029
- let serviceUrl = this.SERVICE_URL + 'post/obtain/notes/by/student';
2030
- this.generateRequestParams(params);
2031
- return this.http.post(serviceUrl, this.httpOptions);
2032
- }
2033
- createNewNote(params) {
2034
- let serviceUrl = this.SERVICE_URL + 'post/create/note';
2035
- this.generateRequestParams(params);
2036
- return this.http.post(serviceUrl, this.httpOptions);
2037
- }
2038
- updateStudentNote(params) {
2039
- let serviceUrl = this.SERVICE_URL + 'update/note';
2040
- this.generateRequestParams(params);
2041
- return this.http.put(serviceUrl, this.httpOptions);
2042
- }
2043
- calculateFinalNote(params) {
2044
- let serviceUrl = this.SERVICE_URL + 'post/calculate/final/note';
2045
- this.generateRequestParams(params);
2046
- return this.http.post(serviceUrl, this.httpOptions);
2047
- }
2048
- generateRequestParams(param) {
2049
- this.httpOptions = {
2050
- header: new HttpHeaders(),
2051
- params: param,
2052
- };
2053
- }
2054
- }
2055
- NotesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NotesService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2056
- NotesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NotesService, providedIn: 'root' });
2057
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NotesService, decorators: [{
2058
- type: Injectable,
2059
- args: [{
2060
- providedIn: 'root'
2061
- }]
2019
+ class NotesService {
2020
+ constructor(http) {
2021
+ this.http = http;
2022
+ this.SERVICE_URL = 'https://iptdev.com.co/lab/academic/api/';
2023
+ }
2024
+ getNotesByGroup(params) {
2025
+ let serviceUrl = this.SERVICE_URL + 'post/obtain/notes/by/course';
2026
+ this.generateRequestParams(params);
2027
+ return this.http.post(serviceUrl, this.httpOptions);
2028
+ }
2029
+ getNotesByStudent(params) {
2030
+ let serviceUrl = this.SERVICE_URL + 'post/obtain/notes/by/student';
2031
+ this.generateRequestParams(params);
2032
+ return this.http.post(serviceUrl, this.httpOptions);
2033
+ }
2034
+ createNewNote(params) {
2035
+ let serviceUrl = this.SERVICE_URL + 'post/create/note';
2036
+ this.generateRequestParams(params);
2037
+ return this.http.post(serviceUrl, this.httpOptions);
2038
+ }
2039
+ updateStudentNote(params) {
2040
+ let serviceUrl = this.SERVICE_URL + 'update/note';
2041
+ this.generateRequestParams(params);
2042
+ return this.http.put(serviceUrl, this.httpOptions);
2043
+ }
2044
+ calculateFinalNote(params) {
2045
+ let serviceUrl = this.SERVICE_URL + 'post/calculate/final/note';
2046
+ this.generateRequestParams(params);
2047
+ return this.http.post(serviceUrl, this.httpOptions);
2048
+ }
2049
+ generateRequestParams(param) {
2050
+ this.httpOptions = {
2051
+ header: new HttpHeaders(),
2052
+ params: param,
2053
+ };
2054
+ }
2055
+ }
2056
+ NotesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NotesService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2057
+ NotesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NotesService, providedIn: 'root' });
2058
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NotesService, decorators: [{
2059
+ type: Injectable,
2060
+ args: [{
2061
+ providedIn: 'root'
2062
+ }]
2062
2063
  }], ctorParameters: function () { return [{ type: i1$2.HttpClient }]; } });
2063
2064
 
2064
- class StudentService {
2065
- constructor(http) {
2066
- this.http = http;
2067
- this.SERVICE_URL = 'https://iptdev.com.co/lab/academic/api/';
2068
- }
2069
- getStudentsByCourse(params) {
2070
- let serviceUrl = this.SERVICE_URL + 'post/obtain/students/by/course';
2071
- this.generateRequestParams(params);
2072
- return this.http.post(serviceUrl, this.httpOptions);
2073
- }
2074
- generateRequestParams(param) {
2075
- this.httpOptions = {
2076
- header: new HttpHeaders(),
2077
- params: param,
2078
- };
2079
- }
2080
- }
2081
- StudentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: StudentService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2082
- StudentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: StudentService, providedIn: 'root' });
2083
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: StudentService, decorators: [{
2084
- type: Injectable,
2085
- args: [{
2086
- providedIn: 'root'
2087
- }]
2065
+ class StudentService {
2066
+ constructor(http) {
2067
+ this.http = http;
2068
+ this.SERVICE_URL = 'https://iptdev.com.co/lab/academic/api/';
2069
+ }
2070
+ getStudentsByCourse(params) {
2071
+ let serviceUrl = this.SERVICE_URL + 'post/obtain/students/by/course';
2072
+ this.generateRequestParams(params);
2073
+ return this.http.post(serviceUrl, this.httpOptions);
2074
+ }
2075
+ generateRequestParams(param) {
2076
+ this.httpOptions = {
2077
+ header: new HttpHeaders(),
2078
+ params: param,
2079
+ };
2080
+ }
2081
+ }
2082
+ StudentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: StudentService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2083
+ StudentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: StudentService, providedIn: 'root' });
2084
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: StudentService, decorators: [{
2085
+ type: Injectable,
2086
+ args: [{
2087
+ providedIn: 'root'
2088
+ }]
2088
2089
  }], ctorParameters: function () { return [{ type: i1$2.HttpClient }]; } });
2089
2090
 
2090
- class Session {
2091
+ class Session {
2091
2092
  }
2092
2093
 
2093
- class UserRs {
2094
- }
2095
- class UserLoginRs {
2094
+ class UserRs {
2095
+ }
2096
+ class UserLoginRs {
2096
2097
  }
2097
2098
 
2098
- /*
2099
- * Public API Surface of design-system
2099
+ /*
2100
+ * Public API Surface of design-system
2100
2101
  */
2101
2102
 
2102
- /**
2103
- * Generated bundle index. Do not edit.
2103
+ /**
2104
+ * Generated bundle index. Do not edit.
2104
2105
  */
2105
2106
 
2106
2107
  export { AsideButtonComponent, AttendanceService, BaseService, BudgetService, ButtonComponent, CalendarService, CheckboxComponent, ComponentsModule, CoreModule, CourseService, CreateUserFormComponent, DatalistComponent, DesignSystemModule, InputComponent, LevelButtonComponent, LevelTextComponent, LoginFormComponent, MarketingService, NotesService, ParameterService, RadioComponent, RedirectGuard, SelectComponent, Session, SidenavComponent, StorageService, StudentService, SwitchService, TestService, TextLinkComponent, UserLoginRs, UserRs, UserService };