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.
@@ -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
- // this.commercialService.createCOD(request).subscribe({
7742
- // next: (response: any) => {
7743
- // if (response.message.code === 1) {
7744
- // this.isLoading = false;
7745
- // this.loaderMessage = '';
7746
- // Swal.fire({
7747
- // title: 'Perfecto!',
7748
- // text: 'El COD ha sido creado exitosamente.',
7749
- // icon: 'success'
7750
- // })
7751
- // this.localStorageCodSelfManaged.clearData();
7752
- // this.okCreatedCOD.emit(true);
7753
- // }else{
7754
- // this.isLoading = false;
7755
- // this.loaderMessage = '';
7756
- // Swal.fire({
7757
- // title: 'Warning!',
7758
- // text: response.message.message,
7759
- // icon: 'error'
7760
- // })
7761
- // }
7762
- // },
7763
- // error: (err: any) => {
7764
- // this.isLoading = false;
7765
- // this.loaderMessage = '';
7766
- // Swal.fire({
7767
- // title: 'Error in cod creation',
7768
- // text: err.message,
7769
- // icon: 'error'
7770
- // })
7771
- // },
7772
- // complete: () => {
7773
- // this.codCreationSubscription = null;
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,