iptdevs-design-system 3.1.672 → 3.1.674
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.
- package/esm2020/lib/cod-self-managed/cod-form-self-managed/cod-self-managed.component.mjs +38 -37
- package/esm2020/lib/core/models/commercial/commercial.model.mjs +1 -1
- package/esm2020/lib/core/services/commercial-service/comercial.service.mjs +15 -1
- package/fesm2015/iptdevs-design-system.mjs +51 -36
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +51 -36
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/lib/core/models/commercial/commercial.model.d.ts +47 -0
- package/lib/core/services/commercial-service/comercial.service.d.ts +4 -1
- package/package.json +1 -1
|
@@ -3149,6 +3149,20 @@ class CommercialService extends IPTGeneralService {
|
|
|
3149
3149
|
this.generateRequestParams(params);
|
|
3150
3150
|
return this.http.post(serviceUrl, this.httpOptions);
|
|
3151
3151
|
}
|
|
3152
|
+
createCodSelfManaged(params) {
|
|
3153
|
+
let serviceUrl = this.SERVICE_URL + 'post/cod/self/managed';
|
|
3154
|
+
this.generateRequestParams(params);
|
|
3155
|
+
return this.http.post(serviceUrl, this.httpOptions);
|
|
3156
|
+
}
|
|
3157
|
+
prizesForDurationOdContest() {
|
|
3158
|
+
let serviceUrl = this.SERVICE_URL + 'prizes/for/duration/of/contest';
|
|
3159
|
+
return this.http.get(serviceUrl);
|
|
3160
|
+
}
|
|
3161
|
+
createTicketReferral(params) {
|
|
3162
|
+
let serviceUrl = this.SERVICE_URL + 'create/contest/registration/by/referrale';
|
|
3163
|
+
this.generateRequestParams(params);
|
|
3164
|
+
return this.http.post(serviceUrl, this.httpOptions);
|
|
3165
|
+
}
|
|
3152
3166
|
}
|
|
3153
3167
|
CommercialService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CommercialService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3154
3168
|
CommercialService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CommercialService, providedIn: 'root' });
|
|
@@ -7738,41 +7752,42 @@ class CodSelfManagedComponent {
|
|
|
7738
7752
|
this.loaderMessage = 'Creando COD, espere un momento';
|
|
7739
7753
|
let request = this.getCreateCOD(totalData);
|
|
7740
7754
|
console.log(request);
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7755
|
+
this.commercialService.createCodSelfManaged(request).subscribe({
|
|
7756
|
+
next: (response) => {
|
|
7757
|
+
if (response.message.code === 1) {
|
|
7758
|
+
this.isLoading = false;
|
|
7759
|
+
this.loaderMessage = '';
|
|
7760
|
+
Swal.fire({
|
|
7761
|
+
title: 'Perfecto!',
|
|
7762
|
+
text: 'El COD ha sido creado exitosamente.',
|
|
7763
|
+
icon: 'success'
|
|
7764
|
+
});
|
|
7765
|
+
this.localStorageCodSelfManaged.clearData();
|
|
7766
|
+
this.okCreatedCOD.emit(true);
|
|
7767
|
+
}
|
|
7768
|
+
else {
|
|
7769
|
+
this.isLoading = false;
|
|
7770
|
+
this.loaderMessage = '';
|
|
7771
|
+
Swal.fire({
|
|
7772
|
+
title: 'Warning!',
|
|
7773
|
+
text: response.message.message,
|
|
7774
|
+
icon: 'error'
|
|
7775
|
+
});
|
|
7776
|
+
}
|
|
7777
|
+
},
|
|
7778
|
+
error: (err) => {
|
|
7779
|
+
this.isLoading = false;
|
|
7780
|
+
this.loaderMessage = '';
|
|
7781
|
+
Swal.fire({
|
|
7782
|
+
title: 'Error in cod creation',
|
|
7783
|
+
text: err.message,
|
|
7784
|
+
icon: 'error'
|
|
7785
|
+
});
|
|
7786
|
+
},
|
|
7787
|
+
complete: () => {
|
|
7788
|
+
this.codCreationSubscription = null;
|
|
7789
|
+
}
|
|
7790
|
+
});
|
|
7776
7791
|
}
|
|
7777
7792
|
getCreateCOD(data) {
|
|
7778
7793
|
let request = {
|
|
@@ -7799,11 +7814,11 @@ class CodSelfManagedComponent {
|
|
|
7799
7814
|
course_modality: data.filter(data => data.control === 'course_modality')[0].value,
|
|
7800
7815
|
program_price: data.filter(data => data.control === 'program_price')[0].value,
|
|
7801
7816
|
payment_date: data.filter(data => data.control === 'payment_date')[0].value,
|
|
7817
|
+
payment_dates: this.financingData,
|
|
7802
7818
|
payment_method: data.filter(data => data.control === 'payment_method')[0].value,
|
|
7803
7819
|
quota_times: data.filter(data => data.control === 'quota_times')[0].value,
|
|
7804
7820
|
total_price: data.filter(data => data.control === 'total_price')[0].value,
|
|
7805
7821
|
paid_level: data.filter(data => data.control === 'paid_level')[0].value,
|
|
7806
|
-
payment_dates: this.financingData,
|
|
7807
7822
|
optionsPayments: data.filter(data => data.control === 'optionsPayments')[0].value,
|
|
7808
7823
|
invoicing_name: data.filter(data => data.control === 'invoicing_name')[0].value,
|
|
7809
7824
|
invoicing_Apellido: data.filter(data => data.control === 'invoicing_Apellido')[0].value,
|