iptdevs-design-system 2.7.124 → 2.7.125

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.
@@ -4024,48 +4024,27 @@ class CodFormComponent {
4024
4024
  this.loaderMessage = 'Creando COD, espere un momento';
4025
4025
  let request = this.getCreateCOD(totalData);
4026
4026
  console.log(request);
4027
- // this.commercialService.createCOD(request).subscribe({
4028
- // next: (response: any) => {
4029
- // console.log(response);
4030
- // if (response.message.code === 1) {
4031
- // this.isLoading = false;
4032
- // this.loaderMessage = '';
4033
- // Swal.fire({
4034
- // title: 'Perfecto!',
4035
- // text: 'El COD ha sido creado exitosamente.',
4036
- // icon: 'success'
4037
- // })
4038
- // this.cleanStorage();
4039
- // }
4040
- // },
4041
- // error: (err: any) => {
4042
- // console.log(err);
4043
- // this.isLoading = false;
4044
- // this.loaderMessage = '';
4045
- // Swal.fire({
4046
- // title: 'Error in cod creation',
4047
- // text: err.message,
4048
- // icon: 'error'
4049
- // })
4050
- // }
4051
- // })
4052
- this.commercialService.createCOD(request).subscribe((response) => {
4053
- if (response.message.code === 1) {
4054
- this.isLoading = false;
4055
- this.loaderMessage = '';
4056
- Swal.fire({
4057
- title: 'Perfecto!',
4058
- text: 'El COD ha sido creado exitosamente.',
4059
- icon: 'success'
4060
- });
4061
- this.cleanStorage();
4062
- }
4063
- else {
4027
+ this.commercialService.createCOD(request).subscribe({
4028
+ next: (response) => {
4029
+ console.log(response);
4030
+ if (response.message.code === 1) {
4031
+ this.isLoading = false;
4032
+ this.loaderMessage = '';
4033
+ Swal.fire({
4034
+ title: 'Perfecto!',
4035
+ text: 'El COD ha sido creado exitosamente.',
4036
+ icon: 'success'
4037
+ });
4038
+ this.cleanStorage();
4039
+ }
4040
+ },
4041
+ error: (err) => {
4042
+ console.log(err);
4064
4043
  this.isLoading = false;
4065
4044
  this.loaderMessage = '';
4066
4045
  Swal.fire({
4067
4046
  title: 'Error in cod creation',
4068
- text: 'Ops Algo salio mal',
4047
+ text: err.message,
4069
4048
  icon: 'error'
4070
4049
  });
4071
4050
  }