visorus-erp-core 9.0.0 → 10.0.0

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 (209) hide show
  1. package/bundles/visorus-erp-core.umd.js +2771 -2223
  2. package/bundles/visorus-erp-core.umd.js.map +1 -1
  3. package/bundles/visorus-erp-core.umd.min.js +1 -15
  4. package/bundles/visorus-erp-core.umd.min.js.map +1 -1
  5. package/esm2015/lib/app.module.js +1 -1
  6. package/esm2015/lib/components/acreedor/select/select-acreedor.component.js +33 -45
  7. package/esm2015/lib/components/acreedor/services/acreedor.service.js +1 -1
  8. package/esm2015/lib/components/acreedor/services/acreedorCuentaContable.js +1 -1
  9. package/esm2015/lib/components/agente/models/Agente.js +1 -1
  10. package/esm2015/lib/components/agente/services/agente.service.js +1 -1
  11. package/esm2015/lib/components/almacen/models/Almacen.js +1 -1
  12. package/esm2015/lib/components/almacen/services/almacen.service.js +1 -1
  13. package/esm2015/lib/components/banco/models/Banco.js +1 -1
  14. package/esm2015/lib/components/banco/services/banco.service.js +1 -1
  15. package/esm2015/lib/components/caja/session-create/session-create.component.js +61 -68
  16. package/esm2015/lib/components/caja/sessionCaja.service.js +1 -1
  17. package/esm2015/lib/components/catalogoTipo/models/CatalogoTipo.js +1 -1
  18. package/esm2015/lib/components/catalogoTipo/services/catalogoTipo.service.js +1 -1
  19. package/esm2015/lib/components/clasificadorTipo/models/ClasificadorTipo.js +1 -1
  20. package/esm2015/lib/components/clasificadorTipo/services/clasificadorTipo.service.js +1 -1
  21. package/esm2015/lib/components/claveAumentoDisminucion/services/clave-aumento-disminucion.service.js +1 -1
  22. package/esm2015/lib/components/claveMovimiento/models/ClaveMovimiento.js +1 -1
  23. package/esm2015/lib/components/claveMovimiento/services/claveMovimiento.service.js +1 -1
  24. package/esm2015/lib/components/cliente/models/Cliente.js +1 -1
  25. package/esm2015/lib/components/cliente/models/ClienteCuentaBanco.js +1 -1
  26. package/esm2015/lib/components/cliente/models/ClienteFlete.js +1 -1
  27. package/esm2015/lib/components/cliente/select/select-cliente.component.js +31 -40
  28. package/esm2015/lib/components/cliente/services/cliente.service.js +1 -1
  29. package/esm2015/lib/components/cliente/services/clienteCuentaBanco.service.js +1 -1
  30. package/esm2015/lib/components/cliente/services/clienteFlete.service.js +1 -1
  31. package/esm2015/lib/components/contacto/models/DatoContacto.js +1 -1
  32. package/esm2015/lib/components/contacto/services/datoContacto.service.js +1 -1
  33. package/esm2015/lib/components/dato-direccion/models/DatoDireccion.js +1 -1
  34. package/esm2015/lib/components/dato-direccion/services/datoDireccion.service.js +1 -1
  35. package/esm2015/lib/components/departamento/models/Departamento.js +1 -1
  36. package/esm2015/lib/components/departamento/services/departamento.service.js +1 -1
  37. package/esm2015/lib/components/empresa/models/ConfiguracionEmpresaAdministrativa.js +1 -1
  38. package/esm2015/lib/components/empresa/models/Empresa.js +1 -1
  39. package/esm2015/lib/components/empresa/services/empresa.service.js +1 -1
  40. package/esm2015/lib/components/error404/error404.component.js +1 -1
  41. package/esm2015/lib/components/flete/models/Flete.js +1 -1
  42. package/esm2015/lib/components/flete/services/flete.service.js +1 -1
  43. package/esm2015/lib/components/formaPago/models/FormaPago.js +1 -1
  44. package/esm2015/lib/components/formaPago/services/FormaPago.service.js +1 -1
  45. package/esm2015/lib/components/loading/loading.component.js +2 -2
  46. package/esm2015/lib/components/loading/loading.service.js +1 -1
  47. package/esm2015/lib/components/loading-screen/loading-screen.component.js +2 -2
  48. package/esm2015/lib/components/loading-screen/loading-screen.service.js +1 -1
  49. package/esm2015/lib/components/login-modal/login-modal.component.js +1 -1
  50. package/esm2015/lib/components/login-modal/login-modal.service.js +1 -1
  51. package/esm2015/lib/components/moneda/models/Moneda.js +1 -1
  52. package/esm2015/lib/components/moneda/services/moneda.service.js +1 -1
  53. package/esm2015/lib/components/pdfModal/pdf-modal.component.js +1 -1
  54. package/esm2015/lib/components/pdfModal/pdf-modal.service.js +1 -1
  55. package/esm2015/lib/components/persona-fisica/models/EstadoCivil.js +1 -1
  56. package/esm2015/lib/components/persona-fisica/models/Genero.js +1 -1
  57. package/esm2015/lib/components/persona-fisica/models/Persona.js +1 -1
  58. package/esm2015/lib/components/persona-fisica/models/PersonaFisica.js +1 -1
  59. package/esm2015/lib/components/persona-fisica/services/personaFisica.service.js +1 -1
  60. package/esm2015/lib/components/proveedor/models/Proveedor.js +1 -1
  61. package/esm2015/lib/components/proveedor/models/ProveedorCuentaBanco.js +1 -1
  62. package/esm2015/lib/components/proveedor/models/ProveedorFlete.js +1 -1
  63. package/esm2015/lib/components/proveedor/select/select-proveedor.component.js +25 -37
  64. package/esm2015/lib/components/proveedor/services/proveedor.service.js +1 -1
  65. package/esm2015/lib/components/proveedor/services/proveedorCuentaBanco.service.js +1 -1
  66. package/esm2015/lib/components/proveedor/services/proveedorFlete.service.js +1 -1
  67. package/esm2015/lib/components/seleccion-articulo-informacion/seleccion-articulo-informacion.component.js +18 -20
  68. package/esm2015/lib/components/seleccion-articulo-informacion/services/articulo-informacion.service.js +1 -1
  69. package/esm2015/lib/components/selecciona-articulo/selecciona-articulo.component.js +140 -145
  70. package/esm2015/lib/components/selecciona-articulo/stock.service.js +1 -1
  71. package/esm2015/lib/components/serieDocumento/models/SerieDocumento.js +1 -1
  72. package/esm2015/lib/components/serieDocumento/services/serieDocumento.service.js +1 -1
  73. package/esm2015/lib/components/tipo-contacto/models/TipoContacto.js +1 -1
  74. package/esm2015/lib/components/tipo-contacto/services/tipoContacto.service.js +1 -1
  75. package/esm2015/lib/components/ubicacion/models/Ubicacion.js +1 -1
  76. package/esm2015/lib/components/ubicacion/services/ubicacion.service.js +1 -1
  77. package/esm2015/lib/contabilidad/componentes/cclista/cclista.component.js +30 -37
  78. package/esm2015/lib/contabilidad/componentes/ccseleccion-dialog/ccseleccion-dialog.component.js +1 -1
  79. package/esm2015/lib/contabilidad/modelos/cuentaContable.model.js +1 -1
  80. package/esm2015/lib/contabilidad/modelos/normaInfoFinanciera.model.js +1 -1
  81. package/esm2015/lib/contabilidad/servicios/cuentacontable.service.js +1 -1
  82. package/esm2015/lib/globalPrimeNg.js +1 -1
  83. package/esm2015/lib/httpInterceptor/httpInterceptor.js +1 -1
  84. package/esm2015/lib/importComponents.js +1 -1
  85. package/esm2015/lib/importComponetsConta.js +1 -1
  86. package/esm2015/lib/models/PersonaMoral.js +1 -1
  87. package/esm2015/lib/models/Usuario.js +1 -1
  88. package/esm2015/lib/models/auth.js +1 -1
  89. package/esm2015/lib/services/auth.service.js +1 -1
  90. package/esm2015/lib/services/authenticated.service.js +1 -1
  91. package/esm2015/lib/services/canActivateGuard.service.ts.js +1 -1
  92. package/esm2015/lib/services/catalogo-adicional.service.js +1 -1
  93. package/esm2015/lib/services/controlAcceso.service.js +1 -1
  94. package/esm2015/lib/services/crud.service.js +1 -1
  95. package/esm2015/lib/services/file.service.js +1 -1
  96. package/esm2015/lib/services/global.service.js +1 -1
  97. package/esm2015/lib/services/init.service.js +1 -1
  98. package/esm2015/lib/services/message.service.js +1 -1
  99. package/esm2015/lib/services/paginate.service.js +1 -1
  100. package/esm2015/lib/services/personaMoral.service.js +1 -1
  101. package/esm2015/lib/services/versionCheck.service.js +1 -1
  102. package/esm2015/lib/utils/tipo_catalogo.ts.js +1 -1
  103. package/esm2015/public_api.js +1 -1
  104. package/esm2015/visorus-erp-core.js +1 -1
  105. package/fesm2015/visorus-erp-core.js +308 -371
  106. package/fesm2015/visorus-erp-core.js.map +1 -1
  107. package/package.json +12 -13
  108. package/esm5/lib/app.module.js +0 -117
  109. package/esm5/lib/components/acreedor/select/select-acreedor.component.js +0 -232
  110. package/esm5/lib/components/acreedor/services/acreedor.service.js +0 -25
  111. package/esm5/lib/components/acreedor/services/acreedorCuentaContable.js +0 -29
  112. package/esm5/lib/components/agente/models/Agente.js +0 -10
  113. package/esm5/lib/components/agente/services/agente.service.js +0 -37
  114. package/esm5/lib/components/almacen/models/Almacen.js +0 -7
  115. package/esm5/lib/components/almacen/services/almacen.service.js +0 -29
  116. package/esm5/lib/components/banco/models/Banco.js +0 -9
  117. package/esm5/lib/components/banco/services/banco.service.js +0 -23
  118. package/esm5/lib/components/caja/session-create/session-create.component.js +0 -223
  119. package/esm5/lib/components/caja/sessionCaja.service.js +0 -25
  120. package/esm5/lib/components/catalogoTipo/models/CatalogoTipo.js +0 -7
  121. package/esm5/lib/components/catalogoTipo/services/catalogoTipo.service.js +0 -23
  122. package/esm5/lib/components/clasificadorTipo/models/ClasificadorTipo.js +0 -7
  123. package/esm5/lib/components/clasificadorTipo/services/clasificadorTipo.service.js +0 -23
  124. package/esm5/lib/components/claveAumentoDisminucion/services/clave-aumento-disminucion.service.js +0 -23
  125. package/esm5/lib/components/claveMovimiento/models/ClaveMovimiento.js +0 -7
  126. package/esm5/lib/components/claveMovimiento/services/claveMovimiento.service.js +0 -23
  127. package/esm5/lib/components/cliente/models/Cliente.js +0 -14
  128. package/esm5/lib/components/cliente/models/ClienteCuentaBanco.js +0 -10
  129. package/esm5/lib/components/cliente/models/ClienteFlete.js +0 -12
  130. package/esm5/lib/components/cliente/select/select-cliente.component.js +0 -240
  131. package/esm5/lib/components/cliente/services/cliente.service.js +0 -26
  132. package/esm5/lib/components/cliente/services/clienteCuentaBanco.service.js +0 -29
  133. package/esm5/lib/components/cliente/services/clienteFlete.service.js +0 -29
  134. package/esm5/lib/components/contacto/models/DatoContacto.js +0 -9
  135. package/esm5/lib/components/contacto/services/datoContacto.service.js +0 -23
  136. package/esm5/lib/components/dato-direccion/models/DatoDireccion.js +0 -7
  137. package/esm5/lib/components/dato-direccion/services/datoDireccion.service.js +0 -23
  138. package/esm5/lib/components/departamento/models/Departamento.js +0 -7
  139. package/esm5/lib/components/departamento/services/departamento.service.js +0 -23
  140. package/esm5/lib/components/empresa/models/ConfiguracionEmpresaAdministrativa.js +0 -9
  141. package/esm5/lib/components/empresa/models/Empresa.js +0 -13
  142. package/esm5/lib/components/empresa/services/empresa.service.js +0 -29
  143. package/esm5/lib/components/error404/error404.component.js +0 -38
  144. package/esm5/lib/components/flete/models/Flete.js +0 -7
  145. package/esm5/lib/components/flete/services/flete.service.js +0 -25
  146. package/esm5/lib/components/formaPago/models/FormaPago.js +0 -7
  147. package/esm5/lib/components/formaPago/services/FormaPago.service.js +0 -23
  148. package/esm5/lib/components/loading/loading.component.js +0 -69
  149. package/esm5/lib/components/loading/loading.service.js +0 -32
  150. package/esm5/lib/components/loading-screen/loading-screen.component.js +0 -62
  151. package/esm5/lib/components/loading-screen/loading-screen.service.js +0 -37
  152. package/esm5/lib/components/login-modal/login-modal.component.js +0 -184
  153. package/esm5/lib/components/login-modal/login-modal.service.js +0 -23
  154. package/esm5/lib/components/moneda/models/Moneda.js +0 -7
  155. package/esm5/lib/components/moneda/services/moneda.service.js +0 -25
  156. package/esm5/lib/components/pdfModal/pdf-modal.component.js +0 -85
  157. package/esm5/lib/components/pdfModal/pdf-modal.service.js +0 -31
  158. package/esm5/lib/components/persona-fisica/models/EstadoCivil.js +0 -7
  159. package/esm5/lib/components/persona-fisica/models/Genero.js +0 -7
  160. package/esm5/lib/components/persona-fisica/models/Persona.js +0 -9
  161. package/esm5/lib/components/persona-fisica/models/PersonaFisica.js +0 -11
  162. package/esm5/lib/components/persona-fisica/services/personaFisica.service.js +0 -31
  163. package/esm5/lib/components/proveedor/models/Proveedor.js +0 -14
  164. package/esm5/lib/components/proveedor/models/ProveedorCuentaBanco.js +0 -10
  165. package/esm5/lib/components/proveedor/models/ProveedorFlete.js +0 -12
  166. package/esm5/lib/components/proveedor/select/select-proveedor.component.js +0 -163
  167. package/esm5/lib/components/proveedor/services/proveedor.service.js +0 -25
  168. package/esm5/lib/components/proveedor/services/proveedorCuentaBanco.service.js +0 -29
  169. package/esm5/lib/components/proveedor/services/proveedorFlete.service.js +0 -29
  170. package/esm5/lib/components/seleccion-articulo-informacion/seleccion-articulo-informacion.component.js +0 -159
  171. package/esm5/lib/components/seleccion-articulo-informacion/services/articulo-informacion.service.js +0 -29
  172. package/esm5/lib/components/selecciona-articulo/selecciona-articulo.component.js +0 -531
  173. package/esm5/lib/components/selecciona-articulo/stock.service.js +0 -37
  174. package/esm5/lib/components/serieDocumento/models/SerieDocumento.js +0 -7
  175. package/esm5/lib/components/serieDocumento/services/serieDocumento.service.js +0 -31
  176. package/esm5/lib/components/tipo-contacto/models/TipoContacto.js +0 -8
  177. package/esm5/lib/components/tipo-contacto/services/tipoContacto.service.js +0 -23
  178. package/esm5/lib/components/ubicacion/models/Ubicacion.js +0 -7
  179. package/esm5/lib/components/ubicacion/services/ubicacion.service.js +0 -23
  180. package/esm5/lib/contabilidad/componentes/cclista/cclista.component.js +0 -329
  181. package/esm5/lib/contabilidad/componentes/ccseleccion-dialog/ccseleccion-dialog.component.js +0 -72
  182. package/esm5/lib/contabilidad/modelos/cuentaContable.model.js +0 -8
  183. package/esm5/lib/contabilidad/modelos/normaInfoFinanciera.model.js +0 -8
  184. package/esm5/lib/contabilidad/servicios/cuentacontable.service.js +0 -28
  185. package/esm5/lib/globalPrimeNg.js +0 -66
  186. package/esm5/lib/httpInterceptor/httpInterceptor.js +0 -94
  187. package/esm5/lib/importComponents.js +0 -24
  188. package/esm5/lib/importComponetsConta.js +0 -7
  189. package/esm5/lib/models/PersonaMoral.js +0 -11
  190. package/esm5/lib/models/Usuario.js +0 -7
  191. package/esm5/lib/models/auth.js +0 -7
  192. package/esm5/lib/services/auth.service.js +0 -209
  193. package/esm5/lib/services/authenticated.service.js +0 -80
  194. package/esm5/lib/services/canActivateGuard.service.ts.js +0 -28
  195. package/esm5/lib/services/catalogo-adicional.service.js +0 -25
  196. package/esm5/lib/services/controlAcceso.service.js +0 -50
  197. package/esm5/lib/services/crud.service.js +0 -51
  198. package/esm5/lib/services/file.service.js +0 -72
  199. package/esm5/lib/services/global.service.js +0 -56
  200. package/esm5/lib/services/init.service.js +0 -54
  201. package/esm5/lib/services/message.service.js +0 -82
  202. package/esm5/lib/services/paginate.service.js +0 -60
  203. package/esm5/lib/services/personaMoral.service.js +0 -23
  204. package/esm5/lib/services/versionCheck.service.js +0 -56
  205. package/esm5/lib/utils/tipo_catalogo.ts.js +0 -9
  206. package/esm5/public_api.js +0 -96
  207. package/esm5/visorus-erp-core.js +0 -5
  208. package/fesm5/visorus-erp-core.js +0 -4203
  209. package/fesm5/visorus-erp-core.js.map +0 -1
@@ -1,4203 +0,0 @@
1
- import { __extends, __values, __awaiter, __generator } from 'tslib';
2
- import { ɵɵinject, ɵɵdefineInjectable, ɵsetClassMetadata, Injectable, ɵɵelementStart, ɵɵtext, ɵɵelementEnd, ɵɵgetCurrentView, ɵɵlistener, ɵɵrestoreView, ɵɵnextContext, ɵɵelement, ɵɵtemplate, ɵɵadvance, ɵɵproperty, ɵɵtextInterpolate1, EventEmitter, ɵɵdirectiveInject, ɵɵdefineComponent, ɵɵstyleMap, ɵɵpureFunction0, Component, Input, Output, ɵɵstaticViewQuery, ɵɵqueryRefresh, ɵɵloadQuery, ɵɵpureFunction1, ViewChild, ɵɵpipe, ɵɵpropertyInterpolate, ɵɵsanitizeUrl, ɵɵpipeBind1, ElementRef, ChangeDetectorRef, ɵɵsanitizeResourceUrl, ɵɵtextInterpolate, ɵɵreference, ɵɵpropertyInterpolate1, ɵɵstyleProp, ɵɵresolveWindow, ɵɵpipeBind2, ɵɵattribute, ɵɵdefineNgModule, ɵɵdefineInjector, ɵɵsetNgModuleScope, NgModule } from '@angular/core';
3
- import { HttpHeaders, HttpClient, HTTP_INTERCEPTORS } from '@angular/common/http';
4
- import { DefaultValueAccessor, NgControlStatus, NgModel, ɵangular_packages_forms_forms_y, NgControlStatusGroup, NgForm, RequiredValidator, NumberValueAccessor, MinLengthValidator, MaxLengthValidator, SelectControlValueAccessor, NgSelectOption, ɵangular_packages_forms_forms_x, FormsModule } from '@angular/forms';
5
- import { InputText, InputTextModule } from 'primeng/inputtext';
6
- import { TreeTable, TreeTableToggler, TreeTableModule } from 'primeng/treetable';
7
- import { PrimeTemplate, Header, Footer, ConfirmationService } from 'primeng/api';
8
- import { NgIf, NgStyle, NgForOf, CurrencyPipe, DecimalPipe, DatePipe, CommonModule } from '@angular/common';
9
- import { ButtonDirective, ButtonModule } from 'primeng/button';
10
- import { Dialog, DialogModule } from 'primeng/dialog';
11
- import { Subject, throwError, of } from 'rxjs';
12
- import { catchError, tap } from 'rxjs/internal/operators';
13
- import { ToastrService, ToastrModule } from 'ngx-toastr';
14
- import { TranslatePipe, TranslateService, TranslateDirective, TranslateModule, TranslateLoader } from '@ngx-translate/core';
15
- import { debounceTime } from 'rxjs/operators';
16
- import { DomSanitizer } from '@angular/platform-browser';
17
- import { Table, SelectableRow, ResizableColumn, TableModule } from 'primeng/table';
18
- import { Paginator, PaginatorModule } from 'primeng/paginator';
19
- import { DropdownModule } from 'primeng/dropdown';
20
- import { InputMaskModule } from 'primeng/inputmask';
21
- import { MessagesModule } from 'primeng/messages';
22
- import { MessageModule } from 'primeng/message';
23
- import { ConfirmDialogModule } from 'primeng/confirmdialog';
24
- import { ProgressBarModule } from 'primeng/progressbar';
25
- import { TriStateCheckboxModule } from 'primeng/tristatecheckbox';
26
- import { KeyFilterModule } from 'primeng/keyfilter';
27
- import { InputSwitchModule } from 'primeng/inputswitch';
28
- import { TabViewModule } from 'primeng/tabview';
29
- import { CalendarModule } from 'primeng/calendar';
30
- import { PanelModule } from 'primeng/panel';
31
- import { AutoCompleteModule } from 'primeng/autocomplete';
32
- import { FieldsetModule } from 'primeng/fieldset';
33
- import { CheckboxModule } from 'primeng/checkbox';
34
- import { TreeModule } from 'primeng/tree';
35
- import { RadioButtonModule } from 'primeng/radiobutton';
36
- import { TabMenuModule } from 'primeng/tabmenu';
37
- import { OverlayPanelModule } from 'primeng/overlaypanel';
38
- import { TooltipModule } from 'primeng/tooltip';
39
- import { CardModule } from 'primeng/card';
40
- import { MenubarModule } from 'primeng/menubar';
41
- import { SplitButtonModule } from 'primeng/splitbutton';
42
- import { ToolbarModule } from 'primeng/toolbar';
43
- import { TranslateHttpLoader } from '@ngx-translate/http-loader';
44
- import { Router } from '@angular/router';
45
-
46
- var GlobalService = /** @class */ (function () {
47
- function GlobalService(http) {
48
- this.http = http;
49
- }
50
- GlobalService.prototype.setConfiguracion = function () {
51
- this.http.get('assets/config.json').subscribe(function (data) {
52
- localStorage.setItem('config', JSON.stringify(data));
53
- });
54
- };
55
- GlobalService.prototype.obtieneConfiguracion = function () {
56
- return JSON.parse(localStorage.getItem('config'));
57
- };
58
- GlobalService.prototype.getUrl = function (urlComponente) {
59
- return this.obtieneConfiguracion().url + (urlComponente ? '/' + urlComponente : '');
60
- };
61
- GlobalService.prototype.auth = function (params) {
62
- return this.http.post(this.getUrl() + '/login', params);
63
- };
64
- GlobalService.prototype.getUsuarioActual = function () {
65
- return this.http.get(this.getUrl() + '/usuario/obtieneUsuarioActual', this.buildAuth());
66
- };
67
- GlobalService.prototype.buildAuth = function () {
68
- var data = this.getUsuario();
69
- return {
70
- headers: new HttpHeaders({
71
- 'Authorization': data.token_type + ' ' + data.access_token,
72
- 'Content-Type': 'application/json',
73
- 'Accept': 'application/json'
74
- })
75
- };
76
- };
77
- GlobalService.prototype.validateEndPoint = function () {
78
- return this.http.get(this.getUrl() + '/validate', this.buildAuth());
79
- };
80
- GlobalService.prototype.closeEndPoint = function () {
81
- localStorage.removeItem('usuario');
82
- this.setUsuarioInstance(null);
83
- };
84
- GlobalService.prototype.getUsuario = function () {
85
- return JSON.parse(localStorage.getItem('usuario'));
86
- };
87
- GlobalService.prototype.setUsuarioInstance = function (usuarioInstance) {
88
- this.usuarioInstance = usuarioInstance;
89
- };
90
- GlobalService.prototype.getLang = function () {
91
- var lang = localStorage.getItem('lang');
92
- return lang ? lang : 'es';
93
- };
94
- GlobalService.prototype.setModulo = function (modulo) {
95
- return this.http.post(this.getUrl() + '/usuario/setModulo', modulo, this.buildAuth());
96
- };
97
- return GlobalService;
98
- }());
99
-
100
- var CrudService = /** @class */ (function (_super) {
101
- __extends(CrudService, _super);
102
- function CrudService(httpCliente, url) {
103
- var _this = _super.call(this, httpCliente) || this;
104
- _this.httpCliente = httpCliente;
105
- _this.url = url;
106
- _this.urlComponente = _this.url;
107
- return _this;
108
- }
109
- //Functions for ResourcesCrud [{ param: "max", value: 10}]
110
- CrudService.prototype.serializeParams = function (params) {
111
- var serializeString = '';
112
- params.map(function (e, index) {
113
- if (e.value !== undefined)
114
- serializeString += ((index == 0) ? '?' : '&') + e.param + '=' + e.value;
115
- });
116
- return serializeString;
117
- };
118
- CrudService.prototype.getHttp = function () {
119
- return this.httpCliente;
120
- };
121
- CrudService.prototype.geturl = function () {
122
- return this.getUrl(this.urlComponente);
123
- };
124
- CrudService.prototype.getBaseUrl = function () {
125
- return this.getUrl('');
126
- };
127
- CrudService.prototype.getByUrl = function (url, params) {
128
- return this.httpCliente.get(this.getUrl(url) + this.serializeParams(params), this.buildAuth());
129
- };
130
- CrudService.prototype.getAll = function (params) {
131
- return this.httpCliente.get(this.getUrl(this.urlComponente) + (params ? (this.serializeParams(params)) : ('')), this.buildAuth());
132
- };
133
- CrudService.prototype.get = function (id) {
134
- return this.httpCliente.get(this.getUrl(this.urlComponente) + '/' + id, this.buildAuth());
135
- };
136
- CrudService.prototype.save = function (obj) {
137
- return this.httpCliente.post(this.getUrl(this.urlComponente), obj, this.buildAuth());
138
- };
139
- CrudService.prototype.update = function (obj) {
140
- return this.httpCliente.put(this.getUrl(this.urlComponente) + '/' + obj.id, obj, this.buildAuth());
141
- };
142
- CrudService.prototype.delete = function (id) {
143
- return this.httpCliente.delete(this.getUrl(this.urlComponente) + '/' + id, this.buildAuth());
144
- };
145
- return CrudService;
146
- }(GlobalService));
147
-
148
- var CuentaContableService = /** @class */ (function (_super) {
149
- __extends(CuentaContableService, _super);
150
- function CuentaContableService(httpClient) {
151
- var _this = _super.call(this, httpClient, 'cuentaContable') || this;
152
- _this.httpClient = httpClient;
153
- return _this;
154
- }
155
- CuentaContableService.prototype.obtieneCuentasContablesRecursivo = function () {
156
- return this.httpClient.get(this.getUrl('cuentaContable') + '/obtieneCuentasContablesRecursivo', this.buildAuth());
157
- };
158
- /** @nocollapse */ CuentaContableService.ɵfac = function CuentaContableService_Factory(t) { return new (t || CuentaContableService)(ɵɵinject(HttpClient)); };
159
- /** @nocollapse */ CuentaContableService.ɵprov = ɵɵdefineInjectable({ token: CuentaContableService, factory: CuentaContableService.ɵfac, providedIn: 'root' });
160
- return CuentaContableService;
161
- }(CrudService));
162
- /*@__PURE__*/ (function () { ɵsetClassMetadata(CuentaContableService, [{
163
- type: Injectable,
164
- args: [{
165
- providedIn: 'root'
166
- }]
167
- }], function () { return [{ type: HttpClient }]; }, null); })();
168
-
169
- function CclistaComponent_ng_template_6_Template(rf, ctx) { if (rf & 1) {
170
- ɵɵelementStart(0, "tr");
171
- ɵɵelementStart(1, "th", 8);
172
- ɵɵtext(2, "Cuenta contable");
173
- ɵɵelementEnd();
174
- ɵɵelementStart(3, "th", 8);
175
- ɵɵtext(4, "Descripci\u00F3n");
176
- ɵɵelementEnd();
177
- ɵɵelementStart(5, "th", 9);
178
- ɵɵtext(6, "Naturaleza");
179
- ɵɵelementEnd();
180
- ɵɵelementStart(7, "th", 10);
181
- ɵɵtext(8, "Tipo");
182
- ɵɵelementEnd();
183
- ɵɵelementStart(9, "th", 11);
184
- ɵɵtext(10, "Acciones");
185
- ɵɵelementEnd();
186
- ɵɵelementEnd();
187
- } }
188
- function CclistaComponent_ng_template_7_button_12_Template(rf, ctx) { if (rf & 1) {
189
- var _r8 = ɵɵgetCurrentView();
190
- ɵɵelementStart(0, "button", 19);
191
- ɵɵlistener("click", function CclistaComponent_ng_template_7_button_12_Template_button_click_0_listener() { ɵɵrestoreView(_r8); var rowData_r3 = ɵɵnextContext().rowData; var ctx_r6 = ɵɵnextContext(); return ctx_r6.selectCuentaContable(rowData_r3); });
192
- ɵɵelementEnd();
193
- } }
194
- function CclistaComponent_ng_template_7_button_13_Template(rf, ctx) { if (rf & 1) {
195
- var _r11 = ɵɵgetCurrentView();
196
- ɵɵelementStart(0, "button", 19);
197
- ɵɵlistener("click", function CclistaComponent_ng_template_7_button_13_Template_button_click_0_listener() { ɵɵrestoreView(_r11); var rowData_r3 = ɵɵnextContext().rowData; var ctx_r9 = ɵɵnextContext(); return ctx_r9.selectCuentaContable(rowData_r3); });
198
- ɵɵelementEnd();
199
- } }
200
- function CclistaComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
201
- ɵɵelementStart(0, "tr");
202
- ɵɵelementStart(1, "td", 12);
203
- ɵɵelement(2, "p-treeTableToggler", 13);
204
- ɵɵtext(3);
205
- ɵɵelementEnd();
206
- ɵɵelementStart(4, "td", 12);
207
- ɵɵtext(5);
208
- ɵɵelementEnd();
209
- ɵɵelementStart(6, "td", 14);
210
- ɵɵtext(7);
211
- ɵɵelementEnd();
212
- ɵɵelementStart(8, "td", 15);
213
- ɵɵtext(9);
214
- ɵɵelementEnd();
215
- ɵɵelementStart(10, "td", 16);
216
- ɵɵelementStart(11, "div", 17);
217
- ɵɵtemplate(12, CclistaComponent_ng_template_7_button_12_Template, 1, 0, "button", 18);
218
- ɵɵtemplate(13, CclistaComponent_ng_template_7_button_13_Template, 1, 0, "button", 18);
219
- ɵɵelementEnd();
220
- ɵɵelementEnd();
221
- ɵɵelementEnd();
222
- } if (rf & 2) {
223
- var rowNode_r2 = ctx.$implicit;
224
- var rowData_r3 = ctx.rowData;
225
- var ctx_r1 = ɵɵnextContext();
226
- ɵɵadvance(2);
227
- ɵɵproperty("rowNode", rowNode_r2);
228
- ɵɵadvance(1);
229
- ɵɵtextInterpolate1(" ", rowData_r3.cuentaContable, " ");
230
- ɵɵadvance(2);
231
- ɵɵtextInterpolate1(" ", rowData_r3.descripcion, " ");
232
- ɵɵadvance(2);
233
- ɵɵtextInterpolate1(" ", rowData_r3.naturaleza, " ");
234
- ɵɵadvance(2);
235
- ɵɵtextInterpolate1(" ", rowData_r3.tipo, " ");
236
- ɵɵadvance(3);
237
- ɵɵproperty("ngIf", ctx_r1.typeAccount == 1 && rowData_r3.cuentaRegistro);
238
- ɵɵadvance(1);
239
- ɵɵproperty("ngIf", ctx_r1.typeAccount == 2 && !rowData_r3.cuentaRegistro);
240
- } }
241
- var _c0 = function () { return { width: "100%" }; };
242
- var CclistaComponent = /** @class */ (function () {
243
- function CclistaComponent(_cuentaContableService) {
244
- this._cuentaContableService = _cuentaContableService;
245
- this.cuentasContables = [];
246
- this.maxH = 720;
247
- this.query = "";
248
- this.tempAccounts = [];
249
- this.evSelectedAccount = new EventEmitter();
250
- }
251
- CclistaComponent.prototype.ngOnInit = function () {
252
- this.maxH = window.innerHeight - 320;
253
- this.obtenerCuentasContablesRecursivo();
254
- };
255
- CclistaComponent.prototype.obtenerCuentasContablesRecursivo = function () {
256
- var _this = this;
257
- this._cuentaContableService.obtieneCuentasContablesRecursivo().subscribe(function (result) {
258
- if (result) {
259
- _this.cuentasContables = result;
260
- _this.sortAccounts();
261
- }
262
- });
263
- };
264
- CclistaComponent.prototype.sortAccounts = function () {
265
- var e_1, _a;
266
- this.cuentasContables.sort(function (a, b) {
267
- // get symbol for string
268
- var characterBreak = '.';
269
- var listA = a.data.cuentaContable.split(characterBreak);
270
- var listB = b.data.cuentaContable.split(characterBreak);
271
- if (listA.length > 0 && listB.length > 0) {
272
- if (listA.length === listB.length) {
273
- for (var i = 0; i < listA.length; i++) {
274
- if (parseInt(listA[i]) > parseInt(listB[i])) {
275
- return 1;
276
- }
277
- if (parseInt(listA[i]) < parseInt(listB[i])) {
278
- return -1;
279
- }
280
- }
281
- return 0;
282
- }
283
- if (listA.length < listB.length) {
284
- for (var i = 0; i < listA.length; i++) {
285
- if (parseInt(listA[i]) > parseInt(listB[i])) {
286
- return 1;
287
- }
288
- if (parseInt(listA[i]) < parseInt(listB[i])) {
289
- return -1;
290
- }
291
- }
292
- return -1;
293
- }
294
- if (listB.length < listA.length) {
295
- for (var i = 0; i < listB.length; i++) {
296
- if (parseInt(listA[i]) > parseInt(listB[i])) {
297
- return 1;
298
- }
299
- if (parseInt(listA[i]) < parseInt(listB[i])) {
300
- return -1;
301
- }
302
- }
303
- return 1;
304
- }
305
- }
306
- return 0;
307
- });
308
- try {
309
- for (var _b = __values(this.cuentasContables), _c = _b.next(); !_c.done; _c = _b.next()) {
310
- var item = _c.value;
311
- if (item.children) {
312
- this.sortItem(item);
313
- }
314
- }
315
- }
316
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
317
- finally {
318
- try {
319
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
320
- }
321
- finally { if (e_1) throw e_1.error; }
322
- }
323
- this.tempAccounts = this.cuentasContables;
324
- };
325
- CclistaComponent.prototype.sortItem = function (account) {
326
- var e_2, _a;
327
- account.children.sort(function (a, b) {
328
- // get symbol for string
329
- var characterBreak = '.';
330
- var listA = a.data.cuentaContable.split(characterBreak);
331
- var listB = b.data.cuentaContable.split(characterBreak);
332
- if (listA.length > 0 && listB.length > 0) {
333
- if (listA.length === listB.length) {
334
- for (var i = 0; i < listA.length; i++) {
335
- if (parseInt(listA[i]) > parseInt(listB[i])) {
336
- return 1;
337
- }
338
- if (parseInt(listA[i]) < parseInt(listB[i])) {
339
- return -1;
340
- }
341
- }
342
- return 0;
343
- }
344
- if (listA.length < listB.length) {
345
- for (var i = 0; i < listA.length; i++) {
346
- if (parseInt(listA[i]) > parseInt(listB[i])) {
347
- return 1;
348
- }
349
- if (parseInt(listA[i]) < parseInt(listB[i])) {
350
- return -1;
351
- }
352
- }
353
- return -1;
354
- }
355
- if (listB.length < listA.length) {
356
- for (var i = 0; i < listB.length; i++) {
357
- if (parseInt(listA[i]) > parseInt(listB[i])) {
358
- return 1;
359
- }
360
- if (parseInt(listA[i]) < parseInt(listB[i])) {
361
- return -1;
362
- }
363
- }
364
- return 1;
365
- }
366
- }
367
- return 0;
368
- });
369
- try {
370
- for (var _b = __values(account.children), _c = _b.next(); !_c.done; _c = _b.next()) {
371
- var item = _c.value;
372
- this.sortItem(item);
373
- }
374
- }
375
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
376
- finally {
377
- try {
378
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
379
- }
380
- finally { if (e_2) throw e_2.error; }
381
- }
382
- };
383
- CclistaComponent.prototype.selectCuentaContable = function (account) {
384
- this.evSelectedAccount.emit(account);
385
- };
386
- CclistaComponent.prototype.filterAccounts = function (evt) {
387
- if (!evt) {
388
- var temp = this.resetAccount();
389
- this.cuentasContables = temp;
390
- return;
391
- }
392
- this.cuentasContables = this.browseAccount(this.tempAccounts);
393
- };
394
- CclistaComponent.prototype.resetAccount = function () {
395
- var e_3, _a;
396
- this.query = '';
397
- var accounts = [];
398
- try {
399
- for (var _b = __values(this.tempAccounts), _c = _b.next(); !_c.done; _c = _b.next()) {
400
- var cc = _c.value;
401
- accounts.push(cc);
402
- }
403
- }
404
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
405
- finally {
406
- try {
407
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
408
- }
409
- finally { if (e_3) throw e_3.error; }
410
- }
411
- return accounts;
412
- };
413
- CclistaComponent.prototype.browseAccount = function (accounts) {
414
- var e_4, _a;
415
- var listAccounts = [];
416
- if (this.query === '') {
417
- var temp = this.resetAccount();
418
- this.cuentasContables = temp;
419
- }
420
- else {
421
- try {
422
- for (var accounts_1 = __values(accounts), accounts_1_1 = accounts_1.next(); !accounts_1_1.done; accounts_1_1 = accounts_1.next()) {
423
- var account = accounts_1_1.value;
424
- if (account.data.cuentaContable.toString().toLowerCase().includes(this.query.toLowerCase()) || account.data.descripcion.toString().toLowerCase().includes(this.query.toLowerCase())) {
425
- listAccounts = listAccounts.concat({
426
- data: account.data,
427
- children: this.browseAccount(account.children)
428
- });
429
- }
430
- else {
431
- listAccounts = listAccounts.concat(this.browseAccount(account.children));
432
- }
433
- }
434
- }
435
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
436
- finally {
437
- try {
438
- if (accounts_1_1 && !accounts_1_1.done && (_a = accounts_1.return)) _a.call(accounts_1);
439
- }
440
- finally { if (e_4) throw e_4.error; }
441
- }
442
- return listAccounts;
443
- }
444
- };
445
- /** @nocollapse */ CclistaComponent.ɵfac = function CclistaComponent_Factory(t) { return new (t || CclistaComponent)(ɵɵdirectiveInject(CuentaContableService)); };
446
- /** @nocollapse */ CclistaComponent.ɵcmp = ɵɵdefineComponent({ type: CclistaComponent, selectors: [["lib-cclista"]], inputs: { isShared: "isShared", typeAccount: "typeAccount" }, outputs: { evSelectedAccount: "evSelectedAccount" }, decls: 8, vars: 8, consts: [[1, "ui-g", "ui-fluid"], [1, "ui-g-12"], [1, "ui-inputgroup"], ["type", "text", "pInputText", "", "placeholder", "Cuenta o descripci\u00F3n", 3, "ngModel", "ngModelChange", "keyup"], [2, "padding", "10px"], [3, "value", "scrollable", "scrollHeight", "resizableColumns"], ["pTemplate", "header"], ["pTemplate", "body", "style", "width: 100%;"], [2, "width", "150px"], [2, "width", "90px"], [2, "width", "60px"], [2, "width", "200px"], [1, "ui-resizable-column", 2, "width", "150px"], [3, "rowNode"], [1, "ui-resizable-column", 2, "width", "90px"], [1, "ui-resizable-column", 2, "width", "60px"], [1, "ui-resizable-column", 2, "width", "200px"], [1, "button-row"], ["pButton", "", "type", "button", "icon", "pi pi-check", "class", "ui-button-raised ui-button-success", 3, "click", 4, "ngIf"], ["pButton", "", "type", "button", "icon", "pi pi-check", 1, "ui-button-raised", "ui-button-success", 3, "click"]], template: function CclistaComponent_Template(rf, ctx) { if (rf & 1) {
447
- ɵɵelementStart(0, "div", 0);
448
- ɵɵelementStart(1, "div", 1);
449
- ɵɵelementStart(2, "div", 2);
450
- ɵɵelementStart(3, "input", 3);
451
- ɵɵlistener("ngModelChange", function CclistaComponent_Template_input_ngModelChange_3_listener($event) { return ctx.query = $event; })("keyup", function CclistaComponent_Template_input_keyup_3_listener($event) { return ctx.filterAccounts($event); });
452
- ɵɵelementEnd();
453
- ɵɵelementEnd();
454
- ɵɵelementEnd();
455
- ɵɵelementEnd();
456
- ɵɵelementStart(4, "div", 4);
457
- ɵɵelementStart(5, "p-treeTable", 5);
458
- ɵɵtemplate(6, CclistaComponent_ng_template_6_Template, 11, 0, "ng-template", 6);
459
- ɵɵtemplate(7, CclistaComponent_ng_template_7_Template, 14, 7, "ng-template", 7);
460
- ɵɵelementEnd();
461
- ɵɵelementEnd();
462
- } if (rf & 2) {
463
- ɵɵadvance(3);
464
- ɵɵproperty("ngModel", ctx.query);
465
- ɵɵadvance(2);
466
- ɵɵstyleMap(ɵɵpureFunction0(7, _c0));
467
- ɵɵproperty("value", ctx.cuentasContables ? ctx.cuentasContables : ctx.tempAccounts)("scrollable", true)("scrollHeight", ctx.maxH + "px")("resizableColumns", true);
468
- } }, directives: [DefaultValueAccessor, InputText, NgControlStatus, NgModel, TreeTable, PrimeTemplate, TreeTableToggler, NgIf, ButtonDirective], styles: [""] });
469
- return CclistaComponent;
470
- }());
471
- /*@__PURE__*/ (function () { ɵsetClassMetadata(CclistaComponent, [{
472
- type: Component,
473
- args: [{
474
- selector: 'lib-cclista',
475
- templateUrl: './cclista.component.html',
476
- styleUrls: ['./cclista.component.css']
477
- }]
478
- }], function () { return [{ type: CuentaContableService }]; }, { isShared: [{
479
- type: Input
480
- }], typeAccount: [{
481
- type: Input
482
- }], evSelectedAccount: [{
483
- type: Output
484
- }] }); })();
485
-
486
- var _c0$1 = ["dialog"];
487
- var _c1 = function (a0) { return { "width": a0, "min-width": "200px" }; };
488
- var _c2 = function (a0) { return { "height": a0 }; };
489
- var CcseleccionDialogComponent = /** @class */ (function () {
490
- function CcseleccionDialogComponent() {
491
- this.cuentasContables = [];
492
- this.maxH = 720;
493
- this.maxW = 0;
494
- this.flagModal = true;
495
- this.size = 350;
496
- this.maxH = window.innerHeight - 370;
497
- this.maxW = window.innerWidth;
498
- this.size = this.maxW - 50;
499
- this.evSelectedAccount = new EventEmitter();
500
- }
501
- CcseleccionDialogComponent.prototype.ngOnInit = function () {
502
- };
503
- CcseleccionDialogComponent.prototype.getAccount = function (account) {
504
- this.evSelectedAccount.emit(account);
505
- };
506
- CcseleccionDialogComponent.prototype.hiddenDialog = function (evt) {
507
- this.evSelectedAccount.emit(null);
508
- };
509
- /** @nocollapse */ CcseleccionDialogComponent.ɵfac = function CcseleccionDialogComponent_Factory(t) { return new (t || CcseleccionDialogComponent)(); };
510
- /** @nocollapse */ CcseleccionDialogComponent.ɵcmp = ɵɵdefineComponent({ type: CcseleccionDialogComponent, selectors: [["lib-ccseleccion-dialog"]], viewQuery: function CcseleccionDialogComponent_Query(rf, ctx) { if (rf & 1) {
511
- ɵɵstaticViewQuery(_c0$1, true);
512
- } if (rf & 2) {
513
- var _t;
514
- ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.dialog = _t.first);
515
- } }, inputs: { tipoCuenta: "tipoCuenta", displayShowCuentas: "displayShowCuentas" }, outputs: { evSelectedAccount: "evSelectedAccount" }, decls: 3, vars: 17, consts: [["header", "Selecciona cuenta contable", 3, "visible", "modal", "minY", "baseZIndex", "blockScroll", "draggable", "maximizable", "visibleChange", "onHide"], [1, "padding10", 3, "ngStyle"], [3, "isShared", "typeAccount", "evSelectedAccount"]], template: function CcseleccionDialogComponent_Template(rf, ctx) { if (rf & 1) {
516
- ɵɵelementStart(0, "p-dialog", 0);
517
- ɵɵlistener("visibleChange", function CcseleccionDialogComponent_Template_p_dialog_visibleChange_0_listener($event) { return ctx.displayShowCuentas = $event; })("onHide", function CcseleccionDialogComponent_Template_p_dialog_onHide_0_listener($event) { return ctx.hiddenDialog($event); });
518
- ɵɵelementStart(1, "div", 1);
519
- ɵɵelementStart(2, "lib-cclista", 2);
520
- ɵɵlistener("evSelectedAccount", function CcseleccionDialogComponent_Template_lib_cclista_evSelectedAccount_2_listener($event) { return ctx.getAccount($event); });
521
- ɵɵelementEnd();
522
- ɵɵelementEnd();
523
- ɵɵelementEnd();
524
- } if (rf & 2) {
525
- ɵɵstyleMap(ɵɵpureFunction1(13, _c1, ctx.size + "px"));
526
- ɵɵproperty("visible", ctx.displayShowCuentas)("modal", true)("minY", 70)("baseZIndex", 10000)("blockScroll", true)("draggable", false)("blockScroll", true)("maximizable", true);
527
- ɵɵadvance(1);
528
- ɵɵproperty("ngStyle", ɵɵpureFunction1(15, _c2, ctx.maxH + 200 + "px"));
529
- ɵɵadvance(1);
530
- ɵɵproperty("isShared", true)("typeAccount", ctx.tipoCuenta);
531
- } }, directives: [Dialog, NgStyle, CclistaComponent], styles: [""] });
532
- return CcseleccionDialogComponent;
533
- }());
534
- /*@__PURE__*/ (function () { ɵsetClassMetadata(CcseleccionDialogComponent, [{
535
- type: Component,
536
- args: [{
537
- selector: 'lib-ccseleccion-dialog',
538
- templateUrl: './ccseleccion-dialog.component.html',
539
- styleUrls: ['./ccseleccion-dialog.component.css']
540
- }]
541
- }], function () { return []; }, { dialog: [{
542
- type: ViewChild,
543
- args: ["dialog", { static: true }]
544
- }], tipoCuenta: [{
545
- type: Input
546
- }], displayShowCuentas: [{
547
- type: Input
548
- }], evSelectedAccount: [{
549
- type: Output
550
- }] }); })();
551
-
552
- var contaComponents = [
553
- CclistaComponent,
554
- CcseleccionDialogComponent
555
- ];
556
-
557
- var LoginModalService = /** @class */ (function () {
558
- function LoginModalService() {
559
- this.modal = new EventEmitter();
560
- }
561
- LoginModalService.prototype.showModal = function () {
562
- this.modal.emit(true);
563
- };
564
- /** @nocollapse */ LoginModalService.ɵfac = function LoginModalService_Factory(t) { return new (t || LoginModalService)(); };
565
- /** @nocollapse */ LoginModalService.ɵprov = ɵɵdefineInjectable({ token: LoginModalService, factory: LoginModalService.ɵfac, providedIn: 'root' });
566
- return LoginModalService;
567
- }());
568
- /*@__PURE__*/ (function () { ɵsetClassMetadata(LoginModalService, [{
569
- type: Injectable,
570
- args: [{
571
- providedIn: 'root'
572
- }]
573
- }], null, { modal: [{
574
- type: Output
575
- }] }); })();
576
-
577
- var LoadingScreenService = /** @class */ (function () {
578
- function LoadingScreenService() {
579
- this._loading = false;
580
- this.loadingStatus = new Subject();
581
- }
582
- Object.defineProperty(LoadingScreenService.prototype, "loading", {
583
- get: function () {
584
- return this._loading;
585
- },
586
- set: function (value) {
587
- this._loading = value;
588
- this.loadingStatus.next(value);
589
- },
590
- enumerable: true,
591
- configurable: true
592
- });
593
- LoadingScreenService.prototype.startLoading = function () {
594
- this.loading = true;
595
- };
596
- LoadingScreenService.prototype.stopLoading = function () {
597
- this.loading = false;
598
- };
599
- /** @nocollapse */ LoadingScreenService.ɵfac = function LoadingScreenService_Factory(t) { return new (t || LoadingScreenService)(); };
600
- /** @nocollapse */ LoadingScreenService.ɵprov = ɵɵdefineInjectable({ token: LoadingScreenService, factory: LoadingScreenService.ɵfac, providedIn: 'root' });
601
- return LoadingScreenService;
602
- }());
603
- /*@__PURE__*/ (function () { ɵsetClassMetadata(LoadingScreenService, [{
604
- type: Injectable,
605
- args: [{
606
- providedIn: 'root'
607
- }]
608
- }], null, null); })();
609
-
610
- var httpInterceptor = /** @class */ (function () {
611
- function httpInterceptor(loginModalService, toastrService, loadingScreenService) {
612
- this.loginModalService = loginModalService;
613
- this.toastrService = toastrService;
614
- this.loadingScreenService = loadingScreenService;
615
- }
616
- httpInterceptor.prototype.intercept = function (request, next) {
617
- var _this = this;
618
- this.loadingScreenService.startLoading(); // this.loadingService.start();
619
- return next.handle(request).pipe(catchError(function (error, caught) {
620
- _this.loadingScreenService.stopLoading();
621
- _this.handleError(error);
622
- return throwError(error);
623
- }), tap(function (res) {
624
- // @ts-ignore
625
- var body = (res.body) ? res.body : null;
626
- if (res.type !== 0 && res.type === 4) {
627
- _this.loadingScreenService.stopLoading();
628
- }
629
- if (body) {
630
- var message = (body.success) ? body.success : null;
631
- if (message) {
632
- _this.toastrService.success(message, 'Exito', {
633
- timeOut: 3000, closeButton: true
634
- });
635
- }
636
- }
637
- }));
638
- };
639
- httpInterceptor.prototype.handleError = function (err) {
640
- if (err.status === 401 || err.status === 403) {
641
- if (err.status === 401) {
642
- //this.router.navigateByUrl('/login');
643
- // this.router.navigateByUrl('/sing_out');
644
- this.loginModalService.showModal();
645
- }
646
- if (err.status === 403)
647
- this.toastrService.error('No tiene permiso sobre esta accion', 'Error', {
648
- timeOut: 5000
649
- });
650
- return of(err.message);
651
- }
652
- if (err.status !== 401 && err.status !== 403 && err.status !== 409) {
653
- this.toastrService.error('Ocurrio un error al procesar su solicitud', 'Error', {
654
- timeOut: 5000
655
- });
656
- }
657
- this.readError(err);
658
- return of(err);
659
- };
660
- httpInterceptor.prototype.readError = function (respuesta) {
661
- if (respuesta.error) {
662
- if (respuesta.error.error)
663
- if (respuesta.error.error.message) {
664
- this.toastrService.error(respuesta.error.error.message, 'Error', {
665
- timeOut: 3000
666
- });
667
- }
668
- if (respuesta.error.message) {
669
- this.toastrService.error(respuesta.error.message, 'Error', {
670
- timeOut: 3000
671
- });
672
- }
673
- if (respuesta.error._errors) {
674
- if (Array.isArray(respuesta.error._errors))
675
- for (var indexError = 0; indexError < respuesta.error._errors.length; indexError++) {
676
- this.toastrService.error(respuesta.error._errors[indexError].message, 'Error', {
677
- timeOut: 3000,
678
- closeButton: true
679
- });
680
- }
681
- }
682
- }
683
- };
684
- /** @nocollapse */ httpInterceptor.ɵfac = function httpInterceptor_Factory(t) { return new (t || httpInterceptor)(ɵɵinject(LoginModalService), ɵɵinject(ToastrService), ɵɵinject(LoadingScreenService)); };
685
- /** @nocollapse */ httpInterceptor.ɵprov = ɵɵdefineInjectable({ token: httpInterceptor, factory: httpInterceptor.ɵfac });
686
- return httpInterceptor;
687
- }());
688
- /*@__PURE__*/ (function () { ɵsetClassMetadata(httpInterceptor, [{
689
- type: Injectable
690
- }], function () { return [{ type: LoginModalService }, { type: ToastrService }, { type: LoadingScreenService }]; }, null); })();
691
-
692
- var Error404Component = /** @class */ (function () {
693
- function Error404Component() {
694
- }
695
- Error404Component.prototype.ngOnInit = function () {
696
- };
697
- /** @nocollapse */ Error404Component.ɵfac = function Error404Component_Factory(t) { return new (t || Error404Component)(); };
698
- /** @nocollapse */ Error404Component.ɵcmp = ɵɵdefineComponent({ type: Error404Component, selectors: [["app-error404"]], decls: 9, vars: 0, consts: [[1, "col-md-12", "sec_sof"], [1, "row"], [1, "col", "col-center"], [1, "center"], [1, "error"], [1, "col-12"]], template: function Error404Component_Template(rf, ctx) { if (rf & 1) {
699
- ɵɵelementStart(0, "div", 0);
700
- ɵɵelementStart(1, "div", 1);
701
- ɵɵelementStart(2, "div", 2);
702
- ɵɵelementStart(3, "div", 3);
703
- ɵɵelementStart(4, "div", 4);
704
- ɵɵtext(5, " Error 404 ");
705
- ɵɵelementEnd();
706
- ɵɵelementStart(6, "div", 5);
707
- ɵɵelementStart(7, "p");
708
- ɵɵtext(8, "La pagina solicitada no fue encontrada");
709
- ɵɵelementEnd();
710
- ɵɵelementEnd();
711
- ɵɵelementEnd();
712
- ɵɵelementEnd();
713
- ɵɵelementEnd();
714
- ɵɵelementEnd();
715
- } }, styles: [".error[_ngcontent-%COMP%]{font-size:70px}"] });
716
- return Error404Component;
717
- }());
718
- /*@__PURE__*/ (function () { ɵsetClassMetadata(Error404Component, [{
719
- type: Component,
720
- args: [{
721
- selector: 'app-error404',
722
- templateUrl: './error404.component.html',
723
- styleUrls: ['./error404.component.css']
724
- }]
725
- }], function () { return []; }, null); })();
726
-
727
- var LoadingService = /** @class */ (function () {
728
- function LoadingService() {
729
- this.loading = new EventEmitter();
730
- }
731
- LoadingService.prototype.setLoading = function (visible) {
732
- if (visible)
733
- this.start();
734
- else
735
- this.stop();
736
- };
737
- LoadingService.prototype.start = function () {
738
- this.loading.emit(true);
739
- };
740
- LoadingService.prototype.stop = function () {
741
- this.loading.emit(false);
742
- };
743
- /** @nocollapse */ LoadingService.ɵfac = function LoadingService_Factory(t) { return new (t || LoadingService)(); };
744
- /** @nocollapse */ LoadingService.ɵprov = ɵɵdefineInjectable({ token: LoadingService, factory: LoadingService.ɵfac, providedIn: 'root' });
745
- return LoadingService;
746
- }());
747
- /*@__PURE__*/ (function () { ɵsetClassMetadata(LoadingService, [{
748
- type: Injectable,
749
- args: [{
750
- providedIn: 'root'
751
- }]
752
- }], null, { loading: [{
753
- type: Output
754
- }] }); })();
755
-
756
- var LoadingComponent = /** @class */ (function () {
757
- function LoadingComponent(loadingService) {
758
- var _this = this;
759
- this.loadingService = loadingService;
760
- this.visible = false;
761
- this.logo_loading = 'assets/img/logo_visorus_loading.png';
762
- this.loadingService.loading.subscribe(function (_visible) {
763
- if (_visible && !_this.visible) {
764
- $('#modal_loading').modal('show');
765
- _this.visible = true;
766
- }
767
- else {
768
- setTimeout(function () {
769
- $('#modal_loading').modal('hide');
770
- }, 650);
771
- _this.visible = false;
772
- }
773
- });
774
- }
775
- /** @nocollapse */ LoadingComponent.ɵfac = function LoadingComponent_Factory(t) { return new (t || LoadingComponent)(ɵɵdirectiveInject(LoadingService)); };
776
- /** @nocollapse */ LoadingComponent.ɵcmp = ɵɵdefineComponent({ type: LoadingComponent, selectors: [["loading"]], inputs: { logo_loading: "logo_loading" }, decls: 14, vars: 4, consts: [["id", "modal_loading", "tabindex", "-1", "role", "dialog", "aria-labelledby", "exampleModalScrollableTitle", "data-backdrop", "static", "data-keyboard", "false", "aria-hidden", "true", 1, "modal", "fade"], ["role", "document", 1, "modal-dialog", "modal-dialog-scrollable"], [1, "modal-content"], [1, "modal-body"], [1, "row", "justify-content-center"], [1, "col-lg-4", "col-md-4", "col-sm-10"], [1, "loader"], [1, "box"], [1, "code"], ["width", "200px", 3, "src"], [1, "txt"]], template: function LoadingComponent_Template(rf, ctx) { if (rf & 1) {
777
- ɵɵelementStart(0, "div", 0);
778
- ɵɵelementStart(1, "div", 1);
779
- ɵɵelementStart(2, "div", 2);
780
- ɵɵelementStart(3, "div", 3);
781
- ɵɵelementStart(4, "div", 4);
782
- ɵɵelementStart(5, "div", 5);
783
- ɵɵelementStart(6, "div", 6);
784
- ɵɵelement(7, "span", 7);
785
- ɵɵelement(8, "span", 7);
786
- ɵɵelementStart(9, "div", 8);
787
- ɵɵelement(10, "img", 9);
788
- ɵɵelementEnd();
789
- ɵɵelementStart(11, "span", 10);
790
- ɵɵtext(12);
791
- ɵɵpipe(13, "translate");
792
- ɵɵelementEnd();
793
- ɵɵelementEnd();
794
- ɵɵelementEnd();
795
- ɵɵelementEnd();
796
- ɵɵelementEnd();
797
- ɵɵelementEnd();
798
- ɵɵelementEnd();
799
- ɵɵelementEnd();
800
- } if (rf & 2) {
801
- ɵɵadvance(10);
802
- ɵɵpropertyInterpolate("src", ctx.logo_loading, ɵɵsanitizeUrl);
803
- ɵɵadvance(2);
804
- ɵɵtextInterpolate1("", ɵɵpipeBind1(13, 2, "cargando"), "...");
805
- } }, pipes: [TranslatePipe], styles: [".loader[_ngcontent-%COMP%]{width:130px;height:170px;position:relative}.loader[_ngcontent-%COMP%]::after, .loader[_ngcontent-%COMP%]::before{content:\"\";width:0;height:0;position:absolute;bottom:30px;left:15px;z-index:1;transform:scale(0);transition:.2s}.loader[_ngcontent-%COMP%] .txt[_ngcontent-%COMP%]{width:120%;text-align:center;position:absolute;bottom:-30px;left:-7%;font-family:Abel,sans-serif;font-size:12px;letter-spacing:2px;color:#fff}.loader[_ngcontent-%COMP%] .code[_ngcontent-%COMP%]{position:absolute;z-index:99;bottom:-3px;-webkit-animation-name:spaceboots;-webkit-animation-duration:.8s;-webkit-transform-origin:50% 50%;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]{width:100%;height:140px;display:block;color:#fff;position:absolute;left:28px;z-index:2;overflow:hidden}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]::after, .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]::before{display:inline-block;font:14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;top:0;left:0;opacity:0}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:nth-child(1)::before{font-size:20px;content:\"\\f13b\";animation:1.1s linear infinite a}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:nth-child(1)::after{content:\"\\f13c\";animation:1.3s linear infinite b}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:nth-child(2)::before{content:\"\\f121\";font-size:25px;animation:.9s linear infinite c}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:nth-child(2)::after{content:\"\\f19a \";animation:.7s linear infinite d}.loader.amit[_ngcontent-%COMP%]::after, .loader.amit[_ngcontent-%COMP%]::before{transform:scale(1)}@keyframes a{0%{transform:translate(30px,0) rotate(30deg);opacity:0}100%{transform:translate(30px,150px) rotate(-50deg);opacity:1}}@keyframes b{0%{transform:translate(50px,0) rotate(-40deg);opacity:0}100%{transform:translate(40px,150px) rotate(80deg);opacity:1}}@keyframes c{0%{transform:translate(70px,0) rotate(10deg);opacity:0}100%{transform:translate(60px,150px) rotate(70deg);opacity:1}}@keyframes d{0%{transform:translate(30px,0) rotate(-50deg);opacity:0}100%{transform:translate(45px,150px) rotate(30deg);opacity:1}}.modal[_ngcontent-%COMP%]{z-index:2050!important}.modal-content[_ngcontent-%COMP%]{border:0!important;background-color:#fff0!important;height:350px!important}.modal-body[_ngcontent-%COMP%]{margin-left:-7%!important}"] });
806
- return LoadingComponent;
807
- }());
808
- /*@__PURE__*/ (function () { ɵsetClassMetadata(LoadingComponent, [{
809
- type: Component,
810
- args: [{
811
- selector: 'loading',
812
- templateUrl: './loading.component.html',
813
- styleUrls: ['./loading.component.css']
814
- }]
815
- }], function () { return [{ type: LoadingService }]; }, { logo_loading: [{
816
- type: Input
817
- }] }); })();
818
-
819
- var LoadingScreenComponent = /** @class */ (function () {
820
- function LoadingScreenComponent(loadingScreenService, _elmRef, _changeDetectorRef, loadingService) {
821
- var _this = this;
822
- this.loadingScreenService = loadingScreenService;
823
- this._elmRef = _elmRef;
824
- this._changeDetectorRef = _changeDetectorRef;
825
- this.loadingService = loadingService;
826
- this.debounceTime = 250;
827
- this.loading = false;
828
- this.logo_loading = 'assets/img/logo_visorus_loading.png';
829
- this.loadingService.loading.subscribe(function (_visible) {
830
- _this._elmRef.nativeElement.style.display = _visible ? 'block' : 'none';
831
- });
832
- }
833
- LoadingScreenComponent.prototype.ngAfterViewInit = function () {
834
- var _this = this;
835
- this._elmRef.nativeElement.style.display = 'none';
836
- this.loadingSubscription = this.loadingScreenService.loadingStatus.pipe(debounceTime(this.debounceTime)).subscribe(function (status) {
837
- _this._elmRef.nativeElement.style.display = status ? 'block' : 'none';
838
- _this._changeDetectorRef.detectChanges();
839
- });
840
- };
841
- LoadingScreenComponent.prototype.ngOnDestroy = function () {
842
- this.loadingSubscription.unsubscribe();
843
- };
844
- /** @nocollapse */ LoadingScreenComponent.ɵfac = function LoadingScreenComponent_Factory(t) { return new (t || LoadingScreenComponent)(ɵɵdirectiveInject(LoadingScreenService), ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(ChangeDetectorRef), ɵɵdirectiveInject(LoadingService)); };
845
- /** @nocollapse */ LoadingScreenComponent.ɵcmp = ɵɵdefineComponent({ type: LoadingScreenComponent, selectors: [["app-loading-screen"]], inputs: { logo_loading: "logo_loading" }, decls: 10, vars: 0, consts: [[1, "loading-screen-wrapper"], [1, "loading-screen-icon"], [1, "blobs"], [1, "blob-center"], [1, "blob"]], template: function LoadingScreenComponent_Template(rf, ctx) { if (rf & 1) {
846
- ɵɵelementStart(0, "div", 0);
847
- ɵɵelementStart(1, "div", 1);
848
- ɵɵelementStart(2, "div", 2);
849
- ɵɵelement(3, "div", 3);
850
- ɵɵelement(4, "div", 4);
851
- ɵɵelement(5, "div", 4);
852
- ɵɵelement(6, "div", 4);
853
- ɵɵelement(7, "div", 4);
854
- ɵɵelement(8, "div", 4);
855
- ɵɵelement(9, "div", 4);
856
- ɵɵelementEnd();
857
- ɵɵelementEnd();
858
- ɵɵelementEnd();
859
- } }, styles: [".loading-screen-wrapper[_ngcontent-%COMP%]{z-index:100000;position:fixed;background-color:rgba(0,0,0,.384);width:100%;height:100%;display:block}.loading-screen-icon[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}svg[_ngcontent-%COMP%]{display:none}.blobs[_ngcontent-%COMP%]{filter:url(#goo);width:300px;height:300px;position:relative;overflow:hidden;border-radius:70px;transform-style:preserve-3d}.blobs[_ngcontent-%COMP%] .blob-center[_ngcontent-%COMP%]{transform-style:preserve-3d;position:absolute;background:#475158;top:50%;left:50%;width:30px;height:30px;transform-origin:left top;transform:scale(.9) translate(-50%,-50%);animation:3.4s linear infinite blob-grow;border-radius:50%;box-shadow:0 -10px 40px -5px #475158}.blob[_ngcontent-%COMP%]{position:absolute;background:#475158;top:50%;left:50%;width:30px;height:30px;border-radius:50%;animation:3.4s ease-out infinite blobs;transform:scale(.9) translate(-50%,-50%);transform-origin:center top;opacity:0}.blob[_ngcontent-%COMP%]:nth-child(1){animation-delay:.2s}.blob[_ngcontent-%COMP%]:nth-child(2){animation-delay:.4s}.blob[_ngcontent-%COMP%]:nth-child(3){animation-delay:.6s}.blob[_ngcontent-%COMP%]:nth-child(4){animation-delay:.8s}.blob[_ngcontent-%COMP%]:nth-child(5){animation-delay:1s}@keyframes blobs{0%{opacity:0;transform:scale(0) translate(calc(-330px - 50%),-50%)}1%,99%{opacity:1}35%,65%{opacity:1;transform:scale(.9) translate(-50%,-50%)}100%{opacity:0;transform:scale(0) translate(calc(330px - 50%),-50%)}}@keyframes blob-grow{0%,100%,39%,92%{transform:scale(0) translate(-50%,-50%)}40%,42%,90%,91%{transform:scale(1,.9) translate(-50%,-50%)}43%,44%,86%,87%{transform:scale(1.2,1.1) translate(-50%,-50%)}45%,46%,84%,85%{transform:scale(1.3,1.2) translate(-50%,-50%)}47%,48%,82%,83%{transform:scale(1.4,1.3) translate(-50%,-50%)}52%,80%,81%{transform:scale(1.5,1.4) translate(-50%,-50%)}54%{transform:scale(1.7,1.6) translate(-50%,-50%)}58%{transform:scale(1.8,1.7) translate(-50%,-50%)}68%,70%{transform:scale(1.7,1.5) translate(-50%,-50%)}78%{transform:scale(1.6,1.4) translate(-50%,-50%)}}"] });
860
- return LoadingScreenComponent;
861
- }());
862
- /*@__PURE__*/ (function () { ɵsetClassMetadata(LoadingScreenComponent, [{
863
- type: Component,
864
- args: [{
865
- selector: 'app-loading-screen',
866
- templateUrl: './loading-screen.component.html',
867
- styleUrls: ['./loading-screen.component.scss']
868
- }]
869
- }], function () { return [{ type: LoadingScreenService }, { type: ElementRef }, { type: ChangeDetectorRef }, { type: LoadingService }]; }, { logo_loading: [{
870
- type: Input
871
- }] }); })();
872
-
873
- var PdfModalService = /** @class */ (function () {
874
- function PdfModalService() {
875
- this.visible = new EventEmitter();
876
- this.print = new EventEmitter();
877
- }
878
- PdfModalService.prototype.pdf_generate = function (base_64) {
879
- this.base_64 = base_64;
880
- this.visible.emit(true);
881
- };
882
- PdfModalService.prototype.generate_print = function (html) {
883
- this.html = html;
884
- this.print.emit(true);
885
- };
886
- /** @nocollapse */ PdfModalService.ɵfac = function PdfModalService_Factory(t) { return new (t || PdfModalService)(); };
887
- /** @nocollapse */ PdfModalService.ɵprov = ɵɵdefineInjectable({ token: PdfModalService, factory: PdfModalService.ɵfac, providedIn: 'root' });
888
- return PdfModalService;
889
- }());
890
- /*@__PURE__*/ (function () { ɵsetClassMetadata(PdfModalService, [{
891
- type: Injectable,
892
- args: [{
893
- providedIn: 'root'
894
- }]
895
- }], null, { visible: [{
896
- type: Output
897
- }], print: [{
898
- type: Output
899
- }] }); })();
900
-
901
- var FileService = /** @class */ (function () {
902
- function FileService(_toastrService, translate) {
903
- this._toastrService = _toastrService;
904
- this.translate = translate;
905
- }
906
- FileService.prototype.addFile = function (evt, toastr) {
907
- var _this = this;
908
- if (toastr === void 0) { toastr = true; }
909
- var file = evt.target.files[0];
910
- var imgObj = {
911
- id: null,
912
- nombre: '',
913
- contentType: '',
914
- orden: 0,
915
- archivo: ''
916
- };
917
- imgObj.nombre = file.name;
918
- imgObj.tipo = file.type;
919
- var reader = new FileReader();
920
- reader.readAsDataURL(file);
921
- reader.onload = function () {
922
- imgObj.archivo = reader.result;
923
- _this.translate.get(['msgSuccess', 'titleFile']).subscribe(function (data) {
924
- if (toastr)
925
- _this._toastrService.success(data.msgSuccess, data.titleFile);
926
- });
927
- };
928
- reader.onerror = function (error) {
929
- _this.translate.get(['msgError', 'titleFile']).subscribe(function (data) {
930
- if (toastr)
931
- _this._toastrService.error(data['msgError'], data['titleFile']);
932
- });
933
- };
934
- return imgObj;
935
- };
936
- FileService.prototype.base64ToBlob = function (base64, type) {
937
- var byteCharacters = atob(base64);
938
- var byteNumbers = new Array(byteCharacters.length);
939
- for (var i = 0; i < byteCharacters.length; i++) {
940
- byteNumbers[i] = byteCharacters.charCodeAt(i);
941
- }
942
- var byteArray = new Uint8Array(byteNumbers);
943
- return new Blob([byteArray], { type: type });
944
- };
945
- FileService.prototype.blobToDowload = function (blob, type, name) {
946
- var anchor = document.createElement('a');
947
- anchor.download = name;
948
- anchor.href = window.URL.createObjectURL(blob);
949
- anchor.dataset.downloadurl = [type, anchor.download, anchor.href].join(':');
950
- anchor.click();
951
- };
952
- FileService.prototype.base64ToFileDowload = function (base64, type, name) {
953
- this.blobToDowload(this.base64ToBlob(base64, type), type, name);
954
- };
955
- /** @nocollapse */ FileService.ɵfac = function FileService_Factory(t) { return new (t || FileService)(ɵɵinject(ToastrService), ɵɵinject(TranslateService)); };
956
- /** @nocollapse */ FileService.ɵprov = ɵɵdefineInjectable({ token: FileService, factory: FileService.ɵfac, providedIn: 'root' });
957
- return FileService;
958
- }());
959
- /*@__PURE__*/ (function () { ɵsetClassMetadata(FileService, [{
960
- type: Injectable,
961
- args: [{
962
- providedIn: 'root'
963
- }]
964
- }], function () { return [{ type: ToastrService }, { type: TranslateService }]; }, null); })();
965
-
966
- function PdfModalComponent_div_1_Template(rf, ctx) { if (rf & 1) {
967
- ɵɵelementStart(0, "div", 2);
968
- ɵɵelement(1, "iframe", 3);
969
- ɵɵelementEnd();
970
- } if (rf & 2) {
971
- var ctx_r0 = ɵɵnextContext();
972
- ɵɵadvance(1);
973
- ɵɵproperty("src", ctx_r0.domSanitizer.bypassSecurityTrustResourceUrl("data:application/pdf;base64," + ctx_r0.pdfBase64), ɵɵsanitizeResourceUrl);
974
- } }
975
- var _c0$2 = function (a0) { return { "width": a0, "min-width": "200px" }; };
976
- var _c1$1 = function () { return { "overflow": "visible" }; };
977
- var PdfModalComponent = /** @class */ (function () {
978
- function PdfModalComponent(_pdfModalService, fileService, domSanitizer) {
979
- var _this = this;
980
- this._pdfModalService = _pdfModalService;
981
- this.fileService = fileService;
982
- this.domSanitizer = domSanitizer;
983
- this.display = false;
984
- this.pdfBase64 = null;
985
- this.size = 840;
986
- _pdfModalService.visible.subscribe(function (resp) {
987
- if (_pdfModalService.base_64) {
988
- _this.display = resp;
989
- _this.pdfBase64 = _pdfModalService.base_64;
990
- /*
991
- let blob = fileService.base64ToBlob(_pdfModalService.base_64, "application/pdf");
992
- let blobUrl = URL.createObjectURL(blob);
993
- setTimeout(() => {
994
- let iframe = "<iframe width='100%' height='100%' src='" + blobUrl + "'></iframe>";
995
- document.getElementById('_modal_pdf').innerHTML = iframe;
996
- },20); */
997
- }
998
- });
999
- _pdfModalService.print.subscribe(function (resp) {
1000
- _this.display = resp;
1001
- setTimeout(function () {
1002
- var iframe = "<iframe id='printf' width='100%' height='100%' ></iframe>";
1003
- document.getElementById('_modal_pdf').innerHTML = iframe;
1004
- }, 20);
1005
- setTimeout(function () {
1006
- _this.imprimir();
1007
- }, 40);
1008
- });
1009
- }
1010
- PdfModalComponent.prototype.imprimir = function () {
1011
- var iframe = window.frames['printf'];
1012
- iframe.contentWindow.head.innerHTML = " <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\" integrity=\"sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm\" crossorigin=\"anonymous\">\n <style>\n .table-hover tbody tr:hover {\n color: #ffffff;\n background-color: rgb(92, 180, 234);\n }\n .tr-select{\n color: #ffffff;\n background-color: rgb(92, 180, 234);\n }\n .td-header{\n background: #f3f3f3;\n color: #0d385d;\n border-color: 1px solid #0b4b87;\n }\n .td-yellow{\n background: #fff6d3;\n }\n .td-blue{\n background: #88d1ea;\n }\n .td-green{\n background: #b9d2a0;\n }\n </style>";
1013
- iframe.contentWindow.body.innerHTML = this._pdfModalService.html;
1014
- //iframe.focus();
1015
- // iframe.contentWindow.print();
1016
- };
1017
- /** @nocollapse */ PdfModalComponent.ɵfac = function PdfModalComponent_Factory(t) { return new (t || PdfModalComponent)(ɵɵdirectiveInject(PdfModalService), ɵɵdirectiveInject(FileService), ɵɵdirectiveInject(DomSanitizer)); };
1018
- /** @nocollapse */ PdfModalComponent.ɵcmp = ɵɵdefineComponent({ type: PdfModalComponent, selectors: [["pdf-modal"]], decls: 2, vars: 15, consts: [[3, "visible", "modal", "minY", "baseZIndex", "blockScroll", "maximizable", "breakpoint", "contentStyle", "visibleChange"], ["style", "min-height: 90vh;", 4, "ngIf"], [2, "min-height", "90vh"], [2, "width", "100%", "height", "90vh", 3, "src"]], template: function PdfModalComponent_Template(rf, ctx) { if (rf & 1) {
1019
- ɵɵelementStart(0, "p-dialog", 0);
1020
- ɵɵlistener("visibleChange", function PdfModalComponent_Template_p_dialog_visibleChange_0_listener($event) { return ctx.display = $event; });
1021
- ɵɵtemplate(1, PdfModalComponent_div_1_Template, 2, 1, "div", 1);
1022
- ɵɵelementEnd();
1023
- } if (rf & 2) {
1024
- ɵɵstyleMap(ɵɵpureFunction1(12, _c0$2, ctx.size + "px"));
1025
- ɵɵproperty("visible", ctx.display)("modal", true)("minY", 70)("baseZIndex", 10000)("blockScroll", true)("blockScroll", true)("maximizable", true)("breakpoint", 840)("contentStyle", ɵɵpureFunction0(14, _c1$1));
1026
- ɵɵadvance(1);
1027
- ɵɵproperty("ngIf", ctx.pdfBase64);
1028
- } }, directives: [Dialog, NgIf], styles: [".down[_ngcontent-%COMP%]{display:block}"] });
1029
- return PdfModalComponent;
1030
- }());
1031
- /*@__PURE__*/ (function () { ɵsetClassMetadata(PdfModalComponent, [{
1032
- type: Component,
1033
- args: [{
1034
- selector: 'pdf-modal',
1035
- templateUrl: './pdf-modal.component.html',
1036
- styleUrls: ['./pdf-modal.component.css']
1037
- }]
1038
- }], function () { return [{ type: PdfModalService }, { type: FileService }, { type: DomSanitizer }]; }, null); })();
1039
-
1040
- var Usuario = /** @class */ (function () {
1041
- function Usuario() {
1042
- }
1043
- return Usuario;
1044
- }());
1045
-
1046
- var Auth = /** @class */ (function () {
1047
- function Auth() {
1048
- }
1049
- return Auth;
1050
- }());
1051
-
1052
- var AuthService = /** @class */ (function () {
1053
- function AuthService(httpClient, loadingService) {
1054
- this.httpClient = httpClient;
1055
- this.loadingService = loadingService;
1056
- this.url_host = '';
1057
- this.login = new EventEmitter();
1058
- this.seleccionEmpresa = new EventEmitter();
1059
- this.auth = new Auth();
1060
- }
1061
- AuthService.prototype.setlogin = function (user, key) {
1062
- localStorage.setItem('lang', 'es');
1063
- var config = JSON.parse(localStorage.getItem("config"));
1064
- if (config)
1065
- if (config.url)
1066
- this.url_host = config.url;
1067
- return this.httpClient.post(this.url_host + '/login' + (key ? '/' + key : ''), user);
1068
- };
1069
- AuthService.prototype.startAuth = function (user) {
1070
- this.auth = user;
1071
- this.login.emit(this.auth);
1072
- };
1073
- AuthService.prototype.isLogin = function () {
1074
- return localStorage.getItem('usuario') !== null;
1075
- };
1076
- AuthService.prototype.quitarUsuario = function () {
1077
- localStorage.removeItem('usuario');
1078
- this.auth.login = false;
1079
- this.login.emit(this.auth);
1080
- };
1081
- AuthService.prototype.verificaLogin = function () {
1082
- var _this = this;
1083
- this.usuario = this.getUser();
1084
- if (this.usuario.access_token) {
1085
- this.getDetalsUser().subscribe(function (resp) {
1086
- _this.auth.usuarioDetalles = resp;
1087
- _this.auth.login = true;
1088
- _this.login.emit(_this.auth);
1089
- }, function (error) {
1090
- _this.quitarUsuario();
1091
- });
1092
- }
1093
- else {
1094
- this.auth.usuarioDetalles = null;
1095
- this.auth.login = false;
1096
- this.login.emit(this.auth);
1097
- }
1098
- };
1099
- AuthService.prototype.loginOut = function () {
1100
- this.quitarEmpresaAdministrativa().subscribe(function (data) {
1101
- localStorage.removeItem('usuario');
1102
- }, function (error) {
1103
- localStorage.removeItem('usuario');
1104
- });
1105
- localStorage.setItem('lang', 'es');
1106
- this.auth.login = false;
1107
- this.login.emit(this.auth);
1108
- };
1109
- AuthService.prototype.getUser = function () {
1110
- this.usuario = new Usuario();
1111
- if (this.isLogin()) {
1112
- var us = localStorage.getItem('usuario');
1113
- if (us) {
1114
- this.usuario = JSON.parse(us);
1115
- }
1116
- return this.usuario;
1117
- }
1118
- else {
1119
- return this.usuario;
1120
- }
1121
- };
1122
- AuthService.prototype.getLang = function () {
1123
- var lang = localStorage.getItem('lang');
1124
- return lang ? lang : 'es';
1125
- };
1126
- AuthService.prototype.selectEmpresa = function (e) {
1127
- this.seleccionEmpresa.emit(e);
1128
- };
1129
- AuthService.prototype.quitarEmpresaAdministrativa = function () {
1130
- var usuario;
1131
- var token_type = '';
1132
- var access_token = '';
1133
- usuario = JSON.parse(localStorage.getItem("usuario"));
1134
- if (usuario) {
1135
- token_type = usuario.token_type,
1136
- access_token = usuario.access_token;
1137
- }
1138
- var httpOptions = {
1139
- headers: new HttpHeaders({
1140
- 'Accept-type': 'application/json',
1141
- 'Authorization': token_type + ' ' + access_token
1142
- })
1143
- };
1144
- var config = JSON.parse(localStorage.getItem("config"));
1145
- if (config)
1146
- if (config.url)
1147
- this.url_host = config.url;
1148
- return this.httpClient.post(this.url_host + '/usuario/setEmpresa', { id: 0 }, httpOptions);
1149
- };
1150
- AuthService.prototype.setEmpresa = function (empresa) {
1151
- // setEmpresaAdministrativa
1152
- var usuario;
1153
- var token_type = '';
1154
- var access_token = '';
1155
- usuario = JSON.parse(localStorage.getItem("usuario"));
1156
- if (usuario) {
1157
- token_type = usuario.token_type,
1158
- access_token = usuario.access_token;
1159
- }
1160
- var httpOptions = {
1161
- headers: new HttpHeaders({
1162
- 'Accept-type': 'application/json',
1163
- 'Authorization': token_type + ' ' + access_token
1164
- })
1165
- };
1166
- var config = JSON.parse(localStorage.getItem("config"));
1167
- if (config)
1168
- if (config.url)
1169
- this.url_host = config.url;
1170
- return this.httpClient.post(this.url_host + '/usuario/setEmpresa', empresa, httpOptions);
1171
- };
1172
- AuthService.prototype.setModulo = function (modulo) {
1173
- // setEmpresaAdministrativa
1174
- var usuario;
1175
- var token_type = '';
1176
- var access_token = '';
1177
- usuario = JSON.parse(localStorage.getItem("usuario"));
1178
- if (usuario) {
1179
- token_type = usuario.token_type,
1180
- access_token = usuario.access_token;
1181
- }
1182
- var httpOptions = {
1183
- headers: new HttpHeaders({
1184
- 'Accept-type': 'application/json',
1185
- 'Authorization': token_type + ' ' + access_token
1186
- })
1187
- };
1188
- var config = JSON.parse(localStorage.getItem("config"));
1189
- if (config)
1190
- if (config.url)
1191
- this.url_host = config.url;
1192
- return this.httpClient.post(this.url_host + '/usuario/setModulo', modulo, httpOptions);
1193
- };
1194
- AuthService.prototype.quitarModulo = function () {
1195
- // setEmpresaAdministrativa
1196
- var usuario;
1197
- var token_type = '';
1198
- var access_token = '';
1199
- usuario = JSON.parse(localStorage.getItem("usuario"));
1200
- if (usuario) {
1201
- token_type = usuario.token_type,
1202
- access_token = usuario.access_token;
1203
- }
1204
- var httpOptions = {
1205
- headers: new HttpHeaders({
1206
- 'Accept-type': 'application/json',
1207
- 'Authorization': token_type + ' ' + access_token
1208
- })
1209
- };
1210
- var config = JSON.parse(localStorage.getItem("config"));
1211
- if (config)
1212
- if (config.url)
1213
- this.url_host = config.url;
1214
- return this.httpClient.post(this.url_host + '/usuario/setModulo', { id: 0 }, httpOptions);
1215
- };
1216
- AuthService.prototype.getDetalsUser = function () {
1217
- var usuario;
1218
- var token_type = '';
1219
- var access_token = '';
1220
- usuario = JSON.parse(localStorage.getItem("usuario"));
1221
- if (usuario) {
1222
- token_type = usuario.token_type,
1223
- access_token = usuario.access_token;
1224
- }
1225
- var httpOptions = {
1226
- headers: new HttpHeaders({
1227
- 'Accept-type': 'application/json',
1228
- 'Authorization': token_type + ' ' + access_token
1229
- })
1230
- };
1231
- var config = JSON.parse(localStorage.getItem("config"));
1232
- if (config)
1233
- if (config.url)
1234
- this.url_host = config.url;
1235
- return this.httpClient.get(this.url_host + '/usuario/obtieneUsuarioActual', httpOptions);
1236
- };
1237
- /** @nocollapse */ AuthService.ɵfac = function AuthService_Factory(t) { return new (t || AuthService)(ɵɵinject(HttpClient), ɵɵinject(LoadingService)); };
1238
- /** @nocollapse */ AuthService.ɵprov = ɵɵdefineInjectable({ token: AuthService, factory: AuthService.ɵfac, providedIn: 'root' });
1239
- return AuthService;
1240
- }());
1241
- /*@__PURE__*/ (function () { ɵsetClassMetadata(AuthService, [{
1242
- type: Injectable,
1243
- args: [{
1244
- providedIn: 'root'
1245
- }]
1246
- }], function () { return [{ type: HttpClient }, { type: LoadingService }]; }, { login: [{
1247
- type: Output
1248
- }], seleccionEmpresa: [{
1249
- type: Output
1250
- }] }); })();
1251
-
1252
- function LoginModalComponent_div_6_label_4_Template(rf, ctx) { if (rf & 1) {
1253
- ɵɵelementStart(0, "label", 19);
1254
- ɵɵtext(1);
1255
- ɵɵpipe(2, "translate");
1256
- ɵɵelementEnd();
1257
- } if (rf & 2) {
1258
- ɵɵadvance(1);
1259
- ɵɵtextInterpolate(ɵɵpipeBind1(2, 1, "Usuario.errorLogin"));
1260
- } }
1261
- function LoginModalComponent_div_6_Template(rf, ctx) { if (rf & 1) {
1262
- var _r6 = ɵɵgetCurrentView();
1263
- ɵɵelementStart(0, "div", 7);
1264
- ɵɵelementStart(1, "div", 8);
1265
- ɵɵelementStart(2, "form", 9, 10);
1266
- ɵɵlistener("ngSubmit", function LoginModalComponent_div_6_Template_form_ngSubmit_2_listener() { ɵɵrestoreView(_r6); var _r2 = ɵɵreference(3); var ctx_r5 = ɵɵnextContext(); return ctx_r5.entrar(_r2); });
1267
- ɵɵtemplate(4, LoginModalComponent_div_6_label_4_Template, 3, 3, "label", 11);
1268
- ɵɵelementStart(5, "div", 12);
1269
- ɵɵelementStart(6, "label", 13);
1270
- ɵɵtext(7);
1271
- ɵɵpipe(8, "translate");
1272
- ɵɵelementEnd();
1273
- ɵɵelementStart(9, "input", 14, 15);
1274
- ɵɵlistener("ngModelChange", function LoginModalComponent_div_6_Template_input_ngModelChange_9_listener($event) { ɵɵrestoreView(_r6); var ctx_r7 = ɵɵnextContext(); return ctx_r7.user.username = $event; });
1275
- ɵɵpipe(11, "translate");
1276
- ɵɵelementEnd();
1277
- ɵɵelementEnd();
1278
- ɵɵelementStart(12, "div", 12);
1279
- ɵɵelementStart(13, "label", 16);
1280
- ɵɵtext(14);
1281
- ɵɵpipe(15, "translate");
1282
- ɵɵelementEnd();
1283
- ɵɵelementStart(16, "input", 17);
1284
- ɵɵlistener("ngModelChange", function LoginModalComponent_div_6_Template_input_ngModelChange_16_listener($event) { ɵɵrestoreView(_r6); var ctx_r8 = ɵɵnextContext(); return ctx_r8.user.password = $event; });
1285
- ɵɵpipe(17, "translate");
1286
- ɵɵelementEnd();
1287
- ɵɵelementEnd();
1288
- ɵɵelementStart(18, "button", 18);
1289
- ɵɵtext(19, "entrar");
1290
- ɵɵelementEnd();
1291
- ɵɵelementEnd();
1292
- ɵɵelementEnd();
1293
- ɵɵelementEnd();
1294
- } if (rf & 2) {
1295
- var ctx_r0 = ɵɵnextContext();
1296
- ɵɵadvance(4);
1297
- ɵɵproperty("ngIf", ctx_r0.error);
1298
- ɵɵadvance(3);
1299
- ɵɵtextInterpolate(ɵɵpipeBind1(8, 7, "Usuario.username"));
1300
- ɵɵadvance(2);
1301
- ɵɵpropertyInterpolate("placeholder", ɵɵpipeBind1(11, 9, "Usuario.username"));
1302
- ɵɵproperty("ngModel", ctx_r0.user.username);
1303
- ɵɵadvance(5);
1304
- ɵɵtextInterpolate(ɵɵpipeBind1(15, 11, "Usuario.password"));
1305
- ɵɵadvance(2);
1306
- ɵɵpropertyInterpolate("placeholder", ɵɵpipeBind1(17, 13, "Usuario.password"));
1307
- ɵɵproperty("ngModel", ctx_r0.user.password);
1308
- } }
1309
- function LoginModalComponent_div_7_div_5_Template(rf, ctx) { if (rf & 1) {
1310
- ɵɵelementStart(0, "div", 22);
1311
- ɵɵelementStart(1, "div", 23);
1312
- ɵɵelementStart(2, "div", 24);
1313
- ɵɵelementStart(3, "h5");
1314
- ɵɵtext(4);
1315
- ɵɵelementEnd();
1316
- ɵɵelementEnd();
1317
- ɵɵelementEnd();
1318
- ɵɵelementEnd();
1319
- } if (rf & 2) {
1320
- var empresa_r10 = ctx.$implicit;
1321
- ɵɵadvance(4);
1322
- ɵɵtextInterpolate1(" ", empresa_r10.nombre, " ");
1323
- } }
1324
- function LoginModalComponent_div_7_Template(rf, ctx) { if (rf & 1) {
1325
- ɵɵelementStart(0, "div", 7);
1326
- ɵɵelementStart(1, "div", 20);
1327
- ɵɵelementStart(2, "h4");
1328
- ɵɵtext(3, "Selecciona la empresa");
1329
- ɵɵelementEnd();
1330
- ɵɵelement(4, "hr");
1331
- ɵɵelementEnd();
1332
- ɵɵtemplate(5, LoginModalComponent_div_7_div_5_Template, 5, 1, "div", 21);
1333
- ɵɵelementEnd();
1334
- } if (rf & 2) {
1335
- var ctx_r1 = ɵɵnextContext();
1336
- ɵɵadvance(5);
1337
- ɵɵproperty("ngForOf", ctx_r1.empresas);
1338
- } }
1339
- var LoginModalComponent = /** @class */ (function () {
1340
- function LoginModalComponent(loginModalService, authService) {
1341
- var _this = this;
1342
- this.loginModalService = loginModalService;
1343
- this.authService = authService;
1344
- this.modal = false;
1345
- this.user = { username: undefined, password: undefined };
1346
- this.error = false;
1347
- this.empresas = [];
1348
- this.loginModalService.modal.subscribe(function (resp) {
1349
- $('#modalLogin').modal('show');
1350
- _this.user = { username: undefined, password: undefined };
1351
- _this.empresas = [];
1352
- });
1353
- }
1354
- LoginModalComponent.prototype.entrar = function (form) {
1355
- var _this = this;
1356
- if (form.valid) {
1357
- this.user.key = "";
1358
- var password = this.user.password.split('_');
1359
- if (password.length > 1) {
1360
- this.user.key = password[0];
1361
- this.user.password = '';
1362
- for (var index = 1; index < password.length; index++) {
1363
- this.user.password += password[index];
1364
- }
1365
- }
1366
- this.authService.setlogin(this.user, this.user.key).subscribe(function (resp) {
1367
- localStorage.setItem('usuario', JSON.stringify(resp));
1368
- var usuario = resp;
1369
- _this.authService.getDetalsUser().subscribe(function (resp) {
1370
- if (!resp.empresa) {
1371
- _this.empresas = resp.empresas;
1372
- if (_this.empresas.length == 1) {
1373
- _this.entrarEmpresa(_this.empresas[0]);
1374
- }
1375
- }
1376
- var auth = {};
1377
- auth.login = true;
1378
- auth.usuario = usuario;
1379
- auth.usuarioDetalles = resp;
1380
- _this.authService.startAuth(auth);
1381
- _this.error = false;
1382
- $('#modalLogin').modal('hide');
1383
- });
1384
- }, function (_error) {
1385
- _this.error = true;
1386
- });
1387
- }
1388
- };
1389
- LoginModalComponent.prototype.entrarEmpresa = function (_empresa) {
1390
- this.authService.setEmpresa(_empresa).subscribe(function (resp) {
1391
- $('#modalLogin').modal('hide');
1392
- });
1393
- };
1394
- /** @nocollapse */ LoginModalComponent.ɵfac = function LoginModalComponent_Factory(t) { return new (t || LoginModalComponent)(ɵɵdirectiveInject(LoginModalService), ɵɵdirectiveInject(AuthService)); };
1395
- /** @nocollapse */ LoginModalComponent.ɵcmp = ɵɵdefineComponent({ type: LoginModalComponent, selectors: [["app-login-modal"]], decls: 8, vars: 2, consts: [["id", "modalLogin", "tabindex", "-1", "role", "dialog", "aria-labelledby", "exampleModalCenterTitle", "aria-hidden", "true", 1, "modal", "fade"], ["role", "document", 1, "modal-dialog", "modal-dialog-centered"], [1, "modal-content"], [1, "modal-body"], [1, "row", "justify-content-center"], ["src", "assets/img/logo_visorus_loading.png", "alt", ""], ["class", "row", 4, "ngIf"], [1, "row"], [1, "col-lg-12", "col-md-12", "col-sm-12"], [3, "ngSubmit"], ["datoForm", "ngForm"], ["class", "error", 4, "ngIf"], [1, "form-group", "mb-3"], ["for", "exampleInputEmail1"], ["type", "text", "id", "exampleInputEmail1", "aria-describedby", "emailHelp", "name", "username", "required", "", 1, "form-control", 3, "placeholder", "ngModel", "ngModelChange"], ["username", "ngModel"], ["for", "exampleInputPassword1"], ["type", "password", "id", "exampleInputPassword1", "name", "password", "required", "", 1, "form-control", 3, "placeholder", "ngModel", "ngModelChange"], ["type", "submit", "translate", "", 1, "btn", "btn-primary_low", "btn-lg", "btn-block", "my-5", "text-light"], [1, "error"], [1, "col-xl-12", "col-lg-12", "col-sm-12"], ["class", "col-xl-6 col-lg-6 col-sm-12 mb-2", "style", "cursor: pointer", 4, "ngFor", "ngForOf"], [1, "col-xl-6", "col-lg-6", "col-sm-12", "mb-2", 2, "cursor", "pointer"], [1, "card"], [1, "card-body"]], template: function LoginModalComponent_Template(rf, ctx) { if (rf & 1) {
1396
- ɵɵelementStart(0, "div", 0);
1397
- ɵɵelementStart(1, "div", 1);
1398
- ɵɵelementStart(2, "div", 2);
1399
- ɵɵelementStart(3, "div", 3);
1400
- ɵɵelementStart(4, "div", 4);
1401
- ɵɵelement(5, "img", 5);
1402
- ɵɵelementEnd();
1403
- ɵɵtemplate(6, LoginModalComponent_div_6_Template, 20, 15, "div", 6);
1404
- ɵɵtemplate(7, LoginModalComponent_div_7_Template, 6, 1, "div", 6);
1405
- ɵɵelementEnd();
1406
- ɵɵelementEnd();
1407
- ɵɵelementEnd();
1408
- ɵɵelementEnd();
1409
- } if (rf & 2) {
1410
- ɵɵadvance(6);
1411
- ɵɵproperty("ngIf", ctx.empresas.length == 0);
1412
- ɵɵadvance(1);
1413
- ɵɵproperty("ngIf", ctx.empresas.length);
1414
- } }, directives: [NgIf, ɵangular_packages_forms_forms_y, NgControlStatusGroup, NgForm, DefaultValueAccessor, RequiredValidator, NgControlStatus, NgModel, TranslateDirective, NgForOf], pipes: [TranslatePipe], styles: [".modal[_ngcontent-%COMP%]{z-index:2050!important}.btn-primary_low[_ngcontent-%COMP%]{background:#133659!important}.ng-invalid[_ngcontent-%COMP%]:not(form), .ng-valid[_ngcontent-%COMP%]:not(form){border-left:1px solid #ced4da!important}.card[_ngcontent-%COMP%]{background:#26baed;color:#fff}.card-body[_ngcontent-%COMP%]{padding:10px}"] });
1415
- return LoginModalComponent;
1416
- }());
1417
- /*@__PURE__*/ (function () { ɵsetClassMetadata(LoginModalComponent, [{
1418
- type: Component,
1419
- args: [{
1420
- selector: 'app-login-modal',
1421
- templateUrl: './login-modal.component.html',
1422
- styleUrls: ['./login-modal.component.css']
1423
- }]
1424
- }], function () { return [{ type: LoginModalService }, { type: AuthService }]; }, null); })();
1425
-
1426
- var SessionCajaService = /** @class */ (function (_super) {
1427
- __extends(SessionCajaService, _super);
1428
- function SessionCajaService(httpClient) {
1429
- var _this = _super.call(this, httpClient, 'sessionCaja') || this;
1430
- _this.httpClient = httpClient;
1431
- return _this;
1432
- }
1433
- /** @nocollapse */ SessionCajaService.ɵfac = function SessionCajaService_Factory(t) { return new (t || SessionCajaService)(ɵɵinject(HttpClient)); };
1434
- /** @nocollapse */ SessionCajaService.ɵprov = ɵɵdefineInjectable({ token: SessionCajaService, factory: SessionCajaService.ɵfac, providedIn: 'root' });
1435
- return SessionCajaService;
1436
- }(CrudService));
1437
- /*@__PURE__*/ (function () { ɵsetClassMetadata(SessionCajaService, [{
1438
- type: Injectable,
1439
- args: [{
1440
- providedIn: 'root'
1441
- }]
1442
- }], function () { return [{ type: HttpClient }]; }, null); })();
1443
-
1444
- function SessionCreateComponent_div_4_Template(rf, ctx) { if (rf & 1) {
1445
- var _r6 = ɵɵgetCurrentView();
1446
- ɵɵelementStart(0, "div", 7);
1447
- ɵɵelementStart(1, "label", 8);
1448
- ɵɵtext(2, "Nombre de caja: ");
1449
- ɵɵelementEnd();
1450
- ɵɵelementStart(3, "input", 9);
1451
- ɵɵlistener("ngModelChange", function SessionCreateComponent_div_4_Template_input_ngModelChange_3_listener($event) { ɵɵrestoreView(_r6); var ctx_r5 = ɵɵnextContext(); return ctx_r5.caja.nombre = $event; });
1452
- ɵɵelementEnd();
1453
- ɵɵelementEnd();
1454
- } if (rf & 2) {
1455
- var ctx_r0 = ɵɵnextContext();
1456
- ɵɵadvance(3);
1457
- ɵɵproperty("ngModel", ctx_r0.caja.nombre)("disabled", true);
1458
- } }
1459
- function SessionCreateComponent_div_5_Template(rf, ctx) { if (rf & 1) {
1460
- var _r8 = ɵɵgetCurrentView();
1461
- ɵɵelementStart(0, "div", 10);
1462
- ɵɵelementStart(1, "div", 11);
1463
- ɵɵelementStart(2, "label", 12);
1464
- ɵɵtext(3, "Saldo: ");
1465
- ɵɵelementEnd();
1466
- ɵɵelementStart(4, "input", 13);
1467
- ɵɵlistener("ngModelChange", function SessionCreateComponent_div_5_Template_input_ngModelChange_4_listener($event) { ɵɵrestoreView(_r8); var ctx_r7 = ɵɵnextContext(); return ctx_r7.session.monto = $event; });
1468
- ɵɵelementEnd();
1469
- ɵɵelementEnd();
1470
- ɵɵelementStart(5, "div", 11);
1471
- ɵɵelementStart(6, "label", 14);
1472
- ɵɵtext(7, "Numero Z:");
1473
- ɵɵelementEnd();
1474
- ɵɵelementStart(8, "input", 15);
1475
- ɵɵlistener("ngModelChange", function SessionCreateComponent_div_5_Template_input_ngModelChange_8_listener($event) { ɵɵrestoreView(_r8); var ctx_r9 = ɵɵnextContext(); return ctx_r9.session.z = $event; });
1476
- ɵɵelementEnd();
1477
- ɵɵelementEnd();
1478
- ɵɵelementEnd();
1479
- } if (rf & 2) {
1480
- var ctx_r1 = ɵɵnextContext();
1481
- ɵɵadvance(4);
1482
- ɵɵproperty("ngModel", ctx_r1.session.monto)("disabled", ctx_r1.editMode);
1483
- ɵɵadvance(4);
1484
- ɵɵproperty("ngModel", ctx_r1.session.z)("disabled", true);
1485
- } }
1486
- function SessionCreateComponent_div_6_Template(rf, ctx) { if (rf & 1) {
1487
- ɵɵelementStart(0, "div", 10);
1488
- ɵɵtext(1, " Este agente no esta asignado a una caja ");
1489
- ɵɵelementEnd();
1490
- } }
1491
- function SessionCreateComponent_button_8_Template(rf, ctx) { if (rf & 1) {
1492
- var _r11 = ɵɵgetCurrentView();
1493
- ɵɵelementStart(0, "button", 16);
1494
- ɵɵlistener("click", function SessionCreateComponent_button_8_Template_button_click_0_listener() { ɵɵrestoreView(_r11); var ctx_r10 = ɵɵnextContext(); return ctx_r10.save(); });
1495
- ɵɵtext(1, "Guardar");
1496
- ɵɵelementEnd();
1497
- } }
1498
- function SessionCreateComponent_button_9_Template(rf, ctx) { if (rf & 1) {
1499
- var _r13 = ɵɵgetCurrentView();
1500
- ɵɵelementStart(0, "button", 17);
1501
- ɵɵlistener("click", function SessionCreateComponent_button_9_Template_button_click_0_listener() { ɵɵrestoreView(_r13); var ctx_r12 = ɵɵnextContext(); return ctx_r12.edit(); });
1502
- ɵɵtext(1, "Cerrar session");
1503
- ɵɵelementEnd();
1504
- } }
1505
- var _c0$3 = function () { return { "width": "750px" }; };
1506
- var SessionCreateComponent = /** @class */ (function () {
1507
- function SessionCreateComponent(sessionCajaService) {
1508
- this.sessionCajaService = sessionCajaService;
1509
- this.showCreateSession = false;
1510
- this.caja = {};
1511
- this.sessionEdit = null;
1512
- // @Input() closeSession?: boolean
1513
- this.status = new EventEmitter();
1514
- this.success = new EventEmitter();
1515
- this.session = {
1516
- inicio: new Date().getTime(),
1517
- termino: null,
1518
- monedaDenominacionList: []
1519
- };
1520
- this.flagModal = true;
1521
- this.labels = {
1522
- title: "Crear nueva session de caja"
1523
- };
1524
- this.resp = {};
1525
- this.editMode = false;
1526
- }
1527
- SessionCreateComponent.prototype.ngOnInit = function () {
1528
- console.log("denominacionList", this.monedaDenominacionList);
1529
- };
1530
- SessionCreateComponent.prototype.setSession = function () {
1531
- if (this.sessionEdit) {
1532
- this.session = this.sessionEdit;
1533
- this.session.monedaDenominacionList = this.monedaDenominacionList;
1534
- if (this.session.movimientosCaja) {
1535
- this.session.monto = this.session.movimientosCaja[0].monto;
1536
- }
1537
- this.labels = {
1538
- title: "Cerrar session"
1539
- };
1540
- this.editMode = true;
1541
- }
1542
- else if (this.caja) {
1543
- this.labels.title = "Crear nueva session de caja";
1544
- this.session.caja = this.caja;
1545
- this.session.z = this.caja.z;
1546
- }
1547
- };
1548
- SessionCreateComponent.prototype.closeModal = function () {
1549
- this.session = {};
1550
- this.editMode = false;
1551
- this.status.emit({ status: false });
1552
- };
1553
- SessionCreateComponent.prototype.save = function () {
1554
- return __awaiter(this, void 0, void 0, function () {
1555
- var _a;
1556
- return __generator(this, function (_b) {
1557
- switch (_b.label) {
1558
- case 0:
1559
- _a = this;
1560
- return [4 /*yield*/, this.sessionCajaService.save(this.session).toPromise()];
1561
- case 1:
1562
- _a.resp = (_b.sent()) || null;
1563
- if (this.resp) {
1564
- this.session = {};
1565
- this.editMode = false;
1566
- this.status.emit({ status: false, save: this.resp.data });
1567
- this.success.emit(true);
1568
- }
1569
- else {
1570
- this.success.emit(false);
1571
- }
1572
- return [2 /*return*/];
1573
- }
1574
- });
1575
- });
1576
- };
1577
- SessionCreateComponent.prototype.edit = function () {
1578
- return __awaiter(this, void 0, void 0, function () {
1579
- var _a;
1580
- return __generator(this, function (_b) {
1581
- switch (_b.label) {
1582
- case 0:
1583
- console.log("EDIT", this.session);
1584
- _a = this;
1585
- return [4 /*yield*/, this.sessionCajaService.update(this.session).toPromise()];
1586
- case 1:
1587
- _a.resp = (_b.sent()) || null;
1588
- if (this.resp) {
1589
- this.session = {};
1590
- this.editMode = false;
1591
- this.status.emit({ status: false, update: this.resp.data });
1592
- }
1593
- return [2 /*return*/];
1594
- }
1595
- });
1596
- });
1597
- };
1598
- /** @nocollapse */ SessionCreateComponent.ɵfac = function SessionCreateComponent_Factory(t) { return new (t || SessionCreateComponent)(ɵɵdirectiveInject(SessionCajaService)); };
1599
- /** @nocollapse */ SessionCreateComponent.ɵcmp = ɵɵdefineComponent({ type: SessionCreateComponent, selectors: [["session-create"]], inputs: { showCreateSession: "showCreateSession", caja: "caja", monedaDenominacionList: "monedaDenominacionList", sessionEdit: "sessionEdit" }, outputs: { status: "status", success: "success" }, decls: 12, vars: 13, consts: [[3, "visible", "modal", "closeOnEscape", "closable", "responsive", "contentStyle", "visibleChange", "onHide", "onShow"], [1, "text-primary"], ["class", "form-group", 4, "ngIf"], ["class", "row", 4, "ngIf"], ["class", "btn btn-sm btn-primary", 3, "click", 4, "ngIf"], ["class", "btn btn-sm btn-success", 3, "click", 4, "ngIf"], [1, "btn", "btn-sm", "btn-danger", 3, "click"], [1, "form-group"], ["for", "nombreCaja"], ["type", "text", 1, "form-control", 3, "ngModel", "disabled", "ngModelChange"], [1, "row"], [1, "col-sm-6"], ["for", "saldoCaja"], ["type", "number", "minlength", "1", "maxlength", "1000000", 1, "form-control", 3, "ngModel", "disabled", "ngModelChange"], ["for", "Numero Z"], ["type", "number", 1, "form-control", 3, "ngModel", "disabled", "ngModelChange"], [1, "btn", "btn-sm", "btn-primary", 3, "click"], [1, "btn", "btn-sm", "btn-success", 3, "click"]], template: function SessionCreateComponent_Template(rf, ctx) { if (rf & 1) {
1600
- ɵɵelementStart(0, "p-dialog", 0);
1601
- ɵɵlistener("visibleChange", function SessionCreateComponent_Template_p_dialog_visibleChange_0_listener($event) { return ctx.showCreateSession = $event; })("onHide", function SessionCreateComponent_Template_p_dialog_onHide_0_listener() { return ctx.closeModal(); })("onShow", function SessionCreateComponent_Template_p_dialog_onShow_0_listener() { return ctx.setSession(); });
1602
- ɵɵelementStart(1, "p-header");
1603
- ɵɵelementStart(2, "a", 1);
1604
- ɵɵtext(3);
1605
- ɵɵelementEnd();
1606
- ɵɵelementEnd();
1607
- ɵɵtemplate(4, SessionCreateComponent_div_4_Template, 4, 2, "div", 2);
1608
- ɵɵtemplate(5, SessionCreateComponent_div_5_Template, 9, 4, "div", 3);
1609
- ɵɵtemplate(6, SessionCreateComponent_div_6_Template, 2, 0, "div", 3);
1610
- ɵɵelementStart(7, "p-footer");
1611
- ɵɵtemplate(8, SessionCreateComponent_button_8_Template, 2, 0, "button", 4);
1612
- ɵɵtemplate(9, SessionCreateComponent_button_9_Template, 2, 0, "button", 5);
1613
- ɵɵelementStart(10, "button", 6);
1614
- ɵɵlistener("click", function SessionCreateComponent_Template_button_click_10_listener() { return ctx.closeModal(); });
1615
- ɵɵtext(11, "Cancelar");
1616
- ɵɵelementEnd();
1617
- ɵɵelementEnd();
1618
- ɵɵelementEnd();
1619
- } if (rf & 2) {
1620
- ɵɵproperty("visible", ctx.showCreateSession)("modal", ctx.flagModal)("closeOnEscape", ctx.flagModal)("closable", ctx.flagModal)("responsive", ctx.flagModal)("contentStyle", ɵɵpureFunction0(12, _c0$3));
1621
- ɵɵadvance(3);
1622
- ɵɵtextInterpolate1("", ctx.labels.title, ": ");
1623
- ɵɵadvance(1);
1624
- ɵɵproperty("ngIf", ctx.caja);
1625
- ɵɵadvance(1);
1626
- ɵɵproperty("ngIf", ctx.caja);
1627
- ɵɵadvance(1);
1628
- ɵɵproperty("ngIf", !ctx.caja);
1629
- ɵɵadvance(2);
1630
- ɵɵproperty("ngIf", !ctx.editMode && ctx.caja);
1631
- ɵɵadvance(1);
1632
- ɵɵproperty("ngIf", ctx.editMode && ctx.caja);
1633
- } }, directives: [Dialog, Header, NgIf, Footer, DefaultValueAccessor, NgControlStatus, NgModel, NumberValueAccessor, MinLengthValidator, MaxLengthValidator], styles: [""] });
1634
- return SessionCreateComponent;
1635
- }());
1636
- /*@__PURE__*/ (function () { ɵsetClassMetadata(SessionCreateComponent, [{
1637
- type: Component,
1638
- args: [{
1639
- selector: 'session-create',
1640
- templateUrl: './session-create.component.html',
1641
- styleUrls: ['./session-create.component.css']
1642
- }]
1643
- }], function () { return [{ type: SessionCajaService }]; }, { showCreateSession: [{
1644
- type: Input
1645
- }], caja: [{
1646
- type: Input
1647
- }], monedaDenominacionList: [{
1648
- type: Input
1649
- }], sessionEdit: [{
1650
- type: Input
1651
- }], status: [{
1652
- type: Output
1653
- }], success: [{
1654
- type: Output
1655
- }] }); })();
1656
-
1657
- var Persona = /** @class */ (function () {
1658
- function Persona() {
1659
- //this.estadoCivil= new EstadoCivil();
1660
- //this.genero = new Genero();
1661
- }
1662
- return Persona;
1663
- }());
1664
-
1665
- var PersonaFisica = /** @class */ (function () {
1666
- function PersonaFisica() {
1667
- this.datoPersona = new Persona();
1668
- this.contactos = [];
1669
- this.datoDirecciones = [];
1670
- }
1671
- return PersonaFisica;
1672
- }());
1673
-
1674
- var PersonaMoral = /** @class */ (function () {
1675
- function PersonaMoral() {
1676
- this.representanteLegal = new PersonaFisica();
1677
- this.contactos = [];
1678
- this.datoDirecciones = [];
1679
- }
1680
- return PersonaMoral;
1681
- }());
1682
-
1683
- var Agente = /** @class */ (function () {
1684
- function Agente() {
1685
- // this.catalogoTipo= new CatalogoTipo();
1686
- this.personaFisica = new PersonaFisica();
1687
- }
1688
- return Agente;
1689
- }());
1690
-
1691
- var Cliente = /** @class */ (function () {
1692
- function Cliente() {
1693
- this.agenteCobrador = new Agente();
1694
- this.agenteVendedor = new Agente();
1695
- this.personaFisica = new PersonaFisica();
1696
- this.personaMoral = new PersonaMoral();
1697
- }
1698
- return Cliente;
1699
- }());
1700
-
1701
- var ClienteService = /** @class */ (function (_super) {
1702
- __extends(ClienteService, _super);
1703
- function ClienteService(httpCliente) {
1704
- return _super.call(this, httpCliente, '/cliente') || this;
1705
- }
1706
- ClienteService.prototype.validar_archivos_bss = function (id) {
1707
- return this.getHttp().get(this.getUrl('/cliente/validarClienteBss/') + id, this.buildAuth());
1708
- };
1709
- /** @nocollapse */ ClienteService.ɵfac = function ClienteService_Factory(t) { return new (t || ClienteService)(ɵɵinject(HttpClient)); };
1710
- /** @nocollapse */ ClienteService.ɵprov = ɵɵdefineInjectable({ token: ClienteService, factory: ClienteService.ɵfac, providedIn: 'root' });
1711
- return ClienteService;
1712
- }(CrudService));
1713
- /*@__PURE__*/ (function () { ɵsetClassMetadata(ClienteService, [{
1714
- type: Injectable,
1715
- args: [{
1716
- providedIn: 'root'
1717
- }]
1718
- }], function () { return [{ type: HttpClient }]; }, null); })();
1719
-
1720
- var PaginateService = /** @class */ (function () {
1721
- function PaginateService(translate) {
1722
- this.translate = translate;
1723
- }
1724
- PaginateService.prototype.getPage = function () {
1725
- return {
1726
- rows: 25,
1727
- total: undefined,
1728
- offset: 0,
1729
- filtro: undefined,
1730
- sort: undefined,
1731
- };
1732
- };
1733
- PaginateService.prototype.getParams = function (page) {
1734
- return [
1735
- { param: 'offset', value: page.offset },
1736
- { param: 'max', value: page.rows },
1737
- { param: 'filter', value: page.filtro },
1738
- { param: 'sort', value: page.sort }
1739
- ];
1740
- };
1741
- PaginateService.prototype.getOrden = function (arg, lang) {
1742
- if (lang)
1743
- this.translate.setDefaultLang(lang);
1744
- var ordenar = [];
1745
- var tra = [];
1746
- for (var index = 0; index < arg.length; index++) {
1747
- ordenar.push({ label: "...", value: arg[index].label });
1748
- tra.push(arg[index].param);
1749
- }
1750
- var dat;
1751
- var a = true;
1752
- if (tra.length > 0)
1753
- this.translate.get(tra).subscribe(function (data) {
1754
- dat = data;
1755
- var values = Object.values(dat);
1756
- var i = 0;
1757
- ordenar.forEach(function (elem) {
1758
- elem.label = '' + values[i];
1759
- i++;
1760
- });
1761
- }, function (erro) { });
1762
- return ordenar;
1763
- };
1764
- /** @nocollapse */ PaginateService.ɵfac = function PaginateService_Factory(t) { return new (t || PaginateService)(ɵɵinject(TranslateService)); };
1765
- /** @nocollapse */ PaginateService.ɵprov = ɵɵdefineInjectable({ token: PaginateService, factory: PaginateService.ɵfac, providedIn: "root" });
1766
- return PaginateService;
1767
- }());
1768
- /*@__PURE__*/ (function () { ɵsetClassMetadata(PaginateService, [{
1769
- type: Injectable,
1770
- args: [{
1771
- providedIn: "root"
1772
- }]
1773
- }], function () { return [{ type: TranslateService }]; }, null); })();
1774
-
1775
- function SelectClienteComponent_ng_template_13_Template(rf, ctx) { if (rf & 1) {
1776
- ɵɵelementStart(0, "tr");
1777
- ɵɵelementStart(1, "th");
1778
- ɵɵtext(2);
1779
- ɵɵpipe(3, "translate");
1780
- ɵɵelementEnd();
1781
- ɵɵelementStart(4, "th");
1782
- ɵɵtext(5);
1783
- ɵɵpipe(6, "translate");
1784
- ɵɵelementEnd();
1785
- ɵɵelementStart(7, "th");
1786
- ɵɵtext(8);
1787
- ɵɵpipe(9, "translate");
1788
- ɵɵelementEnd();
1789
- ɵɵelementStart(10, "th");
1790
- ɵɵtext(11);
1791
- ɵɵpipe(12, "translate");
1792
- ɵɵelementEnd();
1793
- ɵɵelementStart(13, "th");
1794
- ɵɵtext(14);
1795
- ɵɵpipe(15, "translate");
1796
- ɵɵelementEnd();
1797
- ɵɵelementStart(16, "th");
1798
- ɵɵtext(17);
1799
- ɵɵpipe(18, "translate");
1800
- ɵɵelementEnd();
1801
- ɵɵelementEnd();
1802
- } if (rf & 2) {
1803
- ɵɵadvance(2);
1804
- ɵɵtextInterpolate(ɵɵpipeBind1(3, 6, "clave"));
1805
- ɵɵadvance(3);
1806
- ɵɵtextInterpolate(ɵɵpipeBind1(6, 8, "razonSocial"));
1807
- ɵɵadvance(3);
1808
- ɵɵtextInterpolate(ɵɵpipeBind1(9, 10, "tipo"));
1809
- ɵɵadvance(3);
1810
- ɵɵtextInterpolate(ɵɵpipeBind1(12, 12, "Cliente.limiteCredito"));
1811
- ɵɵadvance(3);
1812
- ɵɵtextInterpolate(ɵɵpipeBind1(15, 14, "Cliente.plazoCredito"));
1813
- ɵɵadvance(3);
1814
- ɵɵtextInterpolate(ɵɵpipeBind1(18, 16, "Cliente.diasPago"));
1815
- } }
1816
- function SelectClienteComponent_ng_template_14_span_6_Template(rf, ctx) { if (rf & 1) {
1817
- ɵɵelementStart(0, "span");
1818
- ɵɵtext(1);
1819
- ɵɵpipe(2, "translate");
1820
- ɵɵelementEnd();
1821
- } if (rf & 2) {
1822
- ɵɵadvance(1);
1823
- ɵɵtextInterpolate(ɵɵpipeBind1(2, 1, "fisico"));
1824
- } }
1825
- function SelectClienteComponent_ng_template_14_span_7_Template(rf, ctx) { if (rf & 1) {
1826
- ɵɵelementStart(0, "span");
1827
- ɵɵtext(1);
1828
- ɵɵpipe(2, "translate");
1829
- ɵɵelementEnd();
1830
- } if (rf & 2) {
1831
- ɵɵadvance(1);
1832
- ɵɵtextInterpolate(ɵɵpipeBind1(2, 1, "moral"));
1833
- } }
1834
- function SelectClienteComponent_ng_template_14_Template(rf, ctx) { if (rf & 1) {
1835
- ɵɵelementStart(0, "tr", 13);
1836
- ɵɵelementStart(1, "td");
1837
- ɵɵtext(2);
1838
- ɵɵelementEnd();
1839
- ɵɵelementStart(3, "td");
1840
- ɵɵtext(4);
1841
- ɵɵelementEnd();
1842
- ɵɵelementStart(5, "td");
1843
- ɵɵtemplate(6, SelectClienteComponent_ng_template_14_span_6_Template, 3, 3, "span", 14);
1844
- ɵɵtemplate(7, SelectClienteComponent_ng_template_14_span_7_Template, 3, 3, "span", 14);
1845
- ɵɵelementEnd();
1846
- ɵɵelementStart(8, "td");
1847
- ɵɵtext(9);
1848
- ɵɵelementEnd();
1849
- ɵɵelementStart(10, "td");
1850
- ɵɵtext(11);
1851
- ɵɵelementEnd();
1852
- ɵɵelementStart(12, "td");
1853
- ɵɵtext(13);
1854
- ɵɵelementEnd();
1855
- ɵɵelementEnd();
1856
- } if (rf & 2) {
1857
- var cliente_r3 = ctx.$implicit;
1858
- ɵɵproperty("pSelectableRow", cliente_r3);
1859
- ɵɵadvance(2);
1860
- ɵɵtextInterpolate(cliente_r3.codigo);
1861
- ɵɵadvance(2);
1862
- ɵɵtextInterpolate(cliente_r3.descripcionRazonSocial);
1863
- ɵɵadvance(2);
1864
- ɵɵproperty("ngIf", cliente_r3.personaFisica);
1865
- ɵɵadvance(1);
1866
- ɵɵproperty("ngIf", cliente_r3.personaMoral);
1867
- ɵɵadvance(2);
1868
- ɵɵtextInterpolate(cliente_r3.limiteCredito);
1869
- ɵɵadvance(2);
1870
- ɵɵtextInterpolate(cliente_r3.plazoCredito);
1871
- ɵɵadvance(2);
1872
- ɵɵtextInterpolate(cliente_r3.diasPago);
1873
- } }
1874
- function SelectClienteComponent_ng_template_15_Template(rf, ctx) { if (rf & 1) {
1875
- ɵɵelementStart(0, "tr");
1876
- ɵɵelementStart(1, "td", 15);
1877
- ɵɵtext(2);
1878
- ɵɵpipe(3, "translate");
1879
- ɵɵelementEnd();
1880
- ɵɵelementEnd();
1881
- } if (rf & 2) {
1882
- ɵɵadvance(2);
1883
- ɵɵtextInterpolate(ɵɵpipeBind1(3, 1, "general.noRegistros"));
1884
- } }
1885
- var SelectClienteComponent = /** @class */ (function () {
1886
- function SelectClienteComponent(clienteService, paginate) {
1887
- this.clienteService = clienteService;
1888
- this.paginate = paginate;
1889
- this.selectMode = 'single';
1890
- this.select = new EventEmitter();
1891
- this.ordenar = [];
1892
- this.loading = true;
1893
- }
1894
- SelectClienteComponent.prototype.ngOnInit = function () {
1895
- this.page = this.paginate.getPage();
1896
- this.page.rows = 20;
1897
- this.clientes = [];
1898
- this.ordenar = this.paginate.getOrden([
1899
- { param: 'razonZocial', label: 'razonZocial' }
1900
- ], 'es');
1901
- };
1902
- SelectClienteComponent.prototype.cargarDatosClientes = function (event) {
1903
- var _this = this;
1904
- if (event === void 0) { event = null; }
1905
- this.loading = true;
1906
- if (event) {
1907
- this.page.rows = event.rows;
1908
- this.page.offset = event.first;
1909
- }
1910
- this.clientes = [];
1911
- this.params = this.paginate.getParams(this.page);
1912
- this.params.push({ param: 'estatus', value: true });
1913
- if (this.page.filtro && this.page.filtro.trim() !== '') {
1914
- this.params.push({ param: 'filtroGeneral', value: this.page.filtro.trim() });
1915
- }
1916
- this.clienteService.getAll(this.params).subscribe(function (data) {
1917
- _this.page.total = data.total;
1918
- _this.clientes = data.data;
1919
- _this.loading = false;
1920
- }, function (error) {
1921
- console.error("Error al cargar clientes:", error);
1922
- _this.loading = false;
1923
- });
1924
- };
1925
- SelectClienteComponent.prototype.aplicarFiltro = function () {
1926
- this.page.offset = 0;
1927
- this.cargarDatosClientes();
1928
- };
1929
- SelectClienteComponent.prototype.seleccionaCliente = function (e) {
1930
- console.log('Fila seleccionada (evento):', e);
1931
- console.log('Datos de la fila (e.data):', e.data);
1932
- console.log('Cliente seleccionado ANTES de emitir:', this.clienteSeleccionado); // Verifica si [(selection)] ya lo actualizó
1933
- this.select.emit(e.data);
1934
- this.visible = false;
1935
- console.log('Cliente seleccionado DESPUÉS de emitir (y si se actualizó por [(selection)]):', this.clienteSeleccionado);
1936
- };
1937
- SelectClienteComponent.prototype.cerrar = function () {
1938
- this.select.emit(null);
1939
- this.visible = false;
1940
- };
1941
- /** @nocollapse */ SelectClienteComponent.ɵfac = function SelectClienteComponent_Factory(t) { return new (t || SelectClienteComponent)(ɵɵdirectiveInject(ClienteService), ɵɵdirectiveInject(PaginateService)); };
1942
- /** @nocollapse */ SelectClienteComponent.ɵcmp = ɵɵdefineComponent({ type: SelectClienteComponent, selectors: [["select-cliente"]], inputs: { clienteSeleccionado: "clienteSeleccionado", selectMode: "selectMode", visible: "visible" }, outputs: { select: "select" }, decls: 16, vars: 17, consts: [[3, "header", "visible", "visibleChange", "onHide", "onShow"], [1, "row"], [1, "col-12", "mb-3"], [1, "input-group", "mt-3"], [1, "ui-inputgroup"], ["type", "text", "name", "filtro", 1, "form-control", 3, "placeholder", "ngModel", "ngModelChange", "keyup"], ["type", "button", 1, "btn", "btn-outline-secondary", 3, "click"], [1, "fa", "fa-search"], [1, "col-lg-12"], ["dataKey", "id", "scrollHeight", "350px", 3, "value", "lazy", "paginator", "rows", "totalRecords", "selection", "selectionMode", "scrollable", "loading", "onLazyLoad", "selectionChange", "onRowSelect"], ["pTemplate", "header"], ["pTemplate", "body"], ["pTemplate", "emptymessage"], [3, "pSelectableRow"], [4, "ngIf"], ["colspan", "6"]], template: function SelectClienteComponent_Template(rf, ctx) { if (rf & 1) {
1943
- ɵɵelementStart(0, "p-dialog", 0);
1944
- ɵɵlistener("visibleChange", function SelectClienteComponent_Template_p_dialog_visibleChange_0_listener($event) { return ctx.visible = $event; })("onHide", function SelectClienteComponent_Template_p_dialog_onHide_0_listener() { return ctx.cerrar(); })("onShow", function SelectClienteComponent_Template_p_dialog_onShow_0_listener() { return ctx.cargarDatosClientes(); });
1945
- ɵɵpipe(1, "translate");
1946
- ɵɵelementStart(2, "div", 1);
1947
- ɵɵelementStart(3, "div", 2);
1948
- ɵɵelementStart(4, "div", 3);
1949
- ɵɵelementStart(5, "div", 4);
1950
- ɵɵelementStart(6, "input", 5);
1951
- ɵɵlistener("ngModelChange", function SelectClienteComponent_Template_input_ngModelChange_6_listener($event) { return ctx.page.filtro = $event; })("keyup", function SelectClienteComponent_Template_input_keyup_6_listener() { return ctx.aplicarFiltro(); });
1952
- ɵɵpipe(7, "translate");
1953
- ɵɵelementEnd();
1954
- ɵɵelementStart(8, "button", 6);
1955
- ɵɵlistener("click", function SelectClienteComponent_Template_button_click_8_listener() { return ctx.aplicarFiltro(); });
1956
- ɵɵelement(9, "i", 7);
1957
- ɵɵelementEnd();
1958
- ɵɵelementEnd();
1959
- ɵɵelementEnd();
1960
- ɵɵelementEnd();
1961
- ɵɵelementEnd();
1962
- ɵɵelementStart(10, "div", 1);
1963
- ɵɵelementStart(11, "div", 8);
1964
- ɵɵelementStart(12, "p-table", 9);
1965
- ɵɵlistener("onLazyLoad", function SelectClienteComponent_Template_p_table_onLazyLoad_12_listener($event) { return ctx.cargarDatosClientes($event); })("selectionChange", function SelectClienteComponent_Template_p_table_selectionChange_12_listener($event) { return ctx.clienteSeleccionado = $event; })("onRowSelect", function SelectClienteComponent_Template_p_table_onRowSelect_12_listener($event) { return ctx.seleccionaCliente($event); });
1966
- ɵɵtemplate(13, SelectClienteComponent_ng_template_13_Template, 19, 18, "ng-template", 10);
1967
- ɵɵtemplate(14, SelectClienteComponent_ng_template_14_Template, 14, 8, "ng-template", 11);
1968
- ɵɵtemplate(15, SelectClienteComponent_ng_template_15_Template, 4, 3, "ng-template", 12);
1969
- ɵɵelementEnd();
1970
- ɵɵelementEnd();
1971
- ɵɵelementEnd();
1972
- ɵɵelementEnd();
1973
- } if (rf & 2) {
1974
- ɵɵpropertyInterpolate("header", ɵɵpipeBind1(1, 13, "Seleccionar cliente "));
1975
- ɵɵproperty("visible", ctx.visible);
1976
- ɵɵadvance(6);
1977
- ɵɵpropertyInterpolate1("placeholder", "", ɵɵpipeBind1(7, 15, "buscar"), "...");
1978
- ɵɵproperty("ngModel", ctx.page.filtro);
1979
- ɵɵadvance(6);
1980
- ɵɵpropertyInterpolate("selectionMode", ctx.selectMode);
1981
- ɵɵproperty("value", ctx.clientes)("lazy", true)("paginator", true)("rows", ctx.page.rows)("totalRecords", ctx.page.total)("selection", ctx.clienteSeleccionado)("scrollable", true)("loading", ctx.loading);
1982
- } }, directives: [Dialog, DefaultValueAccessor, NgControlStatus, NgModel, Table, PrimeTemplate, SelectableRow, NgIf], pipes: [TranslatePipe], encapsulation: 2 });
1983
- return SelectClienteComponent;
1984
- }());
1985
- /*@__PURE__*/ (function () { ɵsetClassMetadata(SelectClienteComponent, [{
1986
- type: Component,
1987
- args: [{
1988
- selector: 'select-cliente',
1989
- templateUrl: './select-cliente.component.html'
1990
- }]
1991
- }], function () { return [{ type: ClienteService }, { type: PaginateService }]; }, { clienteSeleccionado: [{
1992
- type: Input
1993
- }], selectMode: [{
1994
- type: Input
1995
- }], visible: [{
1996
- type: Input
1997
- }], select: [{
1998
- type: Output
1999
- }] }); })();
2000
-
2001
- var ClasificadorTipo = /** @class */ (function () {
2002
- function ClasificadorTipo() {
2003
- }
2004
- return ClasificadorTipo;
2005
- }());
2006
-
2007
- var Proveedor = /** @class */ (function () {
2008
- function Proveedor() {
2009
- this.personaMoral = new PersonaMoral();
2010
- this.catalogoTipo = new ClasificadorTipo();
2011
- this.clasificadorTipo = new ClasificadorTipo();
2012
- this.personaFisica = new PersonaFisica();
2013
- }
2014
- return Proveedor;
2015
- }());
2016
-
2017
- var ProveedorService = /** @class */ (function (_super) {
2018
- __extends(ProveedorService, _super);
2019
- function ProveedorService(httpClient) {
2020
- var _this = _super.call(this, httpClient, '/proveedor') || this;
2021
- _this.httpClient = httpClient;
2022
- return _this;
2023
- }
2024
- /** @nocollapse */ ProveedorService.ɵfac = function ProveedorService_Factory(t) { return new (t || ProveedorService)(ɵɵinject(HttpClient)); };
2025
- /** @nocollapse */ ProveedorService.ɵprov = ɵɵdefineInjectable({ token: ProveedorService, factory: ProveedorService.ɵfac, providedIn: 'root' });
2026
- return ProveedorService;
2027
- }(CrudService));
2028
- /*@__PURE__*/ (function () { ɵsetClassMetadata(ProveedorService, [{
2029
- type: Injectable,
2030
- args: [{
2031
- providedIn: 'root'
2032
- }]
2033
- }], function () { return [{ type: HttpClient }]; }, null); })();
2034
-
2035
- function SelectProveedorComponent_ng_template_14_Template(rf, ctx) { if (rf & 1) {
2036
- ɵɵelementStart(0, "tr");
2037
- ɵɵelementStart(1, "th");
2038
- ɵɵtext(2);
2039
- ɵɵpipe(3, "translate");
2040
- ɵɵelementEnd();
2041
- ɵɵelementStart(4, "th");
2042
- ɵɵtext(5);
2043
- ɵɵpipe(6, "translate");
2044
- ɵɵelementEnd();
2045
- ɵɵelementStart(7, "th");
2046
- ɵɵtext(8);
2047
- ɵɵpipe(9, "translate");
2048
- ɵɵelementEnd();
2049
- ɵɵelementEnd();
2050
- } if (rf & 2) {
2051
- ɵɵadvance(2);
2052
- ɵɵtextInterpolate(ɵɵpipeBind1(3, 3, "clave"));
2053
- ɵɵadvance(3);
2054
- ɵɵtextInterpolate(ɵɵpipeBind1(6, 5, "razonSocial"));
2055
- ɵɵadvance(3);
2056
- ɵɵtextInterpolate(ɵɵpipeBind1(9, 7, "rfc"));
2057
- } }
2058
- function SelectProveedorComponent_ng_template_15_Template(rf, ctx) { if (rf & 1) {
2059
- ɵɵelementStart(0, "tr");
2060
- ɵɵelementStart(1, "td");
2061
- ɵɵtext(2);
2062
- ɵɵelementEnd();
2063
- ɵɵelementStart(3, "td");
2064
- ɵɵtext(4);
2065
- ɵɵelementEnd();
2066
- ɵɵelementStart(5, "td");
2067
- ɵɵtext(6);
2068
- ɵɵelementEnd();
2069
- ɵɵelementEnd();
2070
- } if (rf & 2) {
2071
- var proveedor_r2 = ctx.rowData;
2072
- ɵɵadvance(2);
2073
- ɵɵtextInterpolate(proveedor_r2.codigo);
2074
- ɵɵadvance(2);
2075
- ɵɵtextInterpolate(proveedor_r2.descripcionRazonSocial);
2076
- ɵɵadvance(2);
2077
- ɵɵtextInterpolate(proveedor_r2.descripcionRfc);
2078
- } }
2079
- var _c0$4 = function () { return [10, 25, 50, 100, 500]; };
2080
- var SelectProveedorComponent = /** @class */ (function () {
2081
- function SelectProveedorComponent(proveedorService, paginanateService, translate) {
2082
- this.proveedorService = proveedorService;
2083
- this.paginanateService = paginanateService;
2084
- this.translate = translate;
2085
- this.params = [];
2086
- this.ordenar = [];
2087
- this.visible = false;
2088
- this.proveedorSeleccionado = new Proveedor();
2089
- this.select = new EventEmitter();
2090
- this.translate.get('es');
2091
- }
2092
- SelectProveedorComponent.prototype.ngOnInit = function () {
2093
- this.page = this.paginanateService.getPage();
2094
- var arg = [];
2095
- this.ordenar = this.paginanateService.getOrden(arg, 'es');
2096
- this.proveedores = [];
2097
- };
2098
- SelectProveedorComponent.prototype.cargarDatosProveedores = function () {
2099
- var _this = this;
2100
- this.params = this.paginanateService.getParams(this.page);
2101
- this.params.push({ param: 'estatus', value: true });
2102
- this.proveedorService.getAll(this.params).subscribe(function (data) {
2103
- _this.proveedores = data.data;
2104
- });
2105
- };
2106
- SelectProveedorComponent.prototype.pagina = function (e) {
2107
- this.page.rows = e.rows;
2108
- this.page.offset = e.first;
2109
- this.cargarDatosProveedores();
2110
- };
2111
- SelectProveedorComponent.prototype.cerrarModal = function () {
2112
- this.select.emit(null);
2113
- this.visible = false;
2114
- };
2115
- SelectProveedorComponent.prototype.seleccionarProveedor = function (e) {
2116
- this.select.emit(e.data);
2117
- this.visible = false;
2118
- };
2119
- /** @nocollapse */ SelectProveedorComponent.ɵfac = function SelectProveedorComponent_Factory(t) { return new (t || SelectProveedorComponent)(ɵɵdirectiveInject(ProveedorService), ɵɵdirectiveInject(PaginateService), ɵɵdirectiveInject(TranslateService)); };
2120
- /** @nocollapse */ SelectProveedorComponent.ɵcmp = ɵɵdefineComponent({ type: SelectProveedorComponent, selectors: [["select-proveedor"]], inputs: { visible: "visible", proveedorSeleccionado: "proveedorSeleccionado" }, outputs: { select: "select" }, decls: 18, vars: 16, consts: [[3, "header", "visible", "visibleChange", "onHide", "onShow"], [1, "row"], [1, "col-3"], [1, "input-group", "mt-3"], ["type", "text", "name", "filtro", 1, "form-control", 3, "placeholder", "ngModel", "ngModelChange", "change"], [1, "input-group-append"], ["type", "button", 1, "btn", "btn-outline-secondary", 3, "click"], [1, "fa", "fa-search"], [1, "col-md-12"], ["selectionMode", "single", "scrollHeight", "350px", 3, "value", "selection", "scrollable", "valueChange", "selectionChange", "onRowSelect"], ["pTemplate", "header"], ["pTemplate", "body"], [3, "rows", "totalRecords", "pageLinkSize", "rowsPerPageOptions", "onPageChange"]], template: function SelectProveedorComponent_Template(rf, ctx) { if (rf & 1) {
2121
- ɵɵelementStart(0, "p-dialog", 0);
2122
- ɵɵlistener("visibleChange", function SelectProveedorComponent_Template_p_dialog_visibleChange_0_listener($event) { return ctx.visible = $event; })("onHide", function SelectProveedorComponent_Template_p_dialog_onHide_0_listener() { return ctx.cerrarModal(); })("onShow", function SelectProveedorComponent_Template_p_dialog_onShow_0_listener() { return ctx.cargarDatosProveedores(); });
2123
- ɵɵpipe(1, "translate");
2124
- ɵɵelementStart(2, "div", 1);
2125
- ɵɵelementStart(3, "div", 2);
2126
- ɵɵelementStart(4, "div", 3);
2127
- ɵɵelementStart(5, "input", 4);
2128
- ɵɵlistener("ngModelChange", function SelectProveedorComponent_Template_input_ngModelChange_5_listener($event) { return ctx.page.filtro = $event; })("change", function SelectProveedorComponent_Template_input_change_5_listener() { return ctx.cargarDatosProveedores(); });
2129
- ɵɵpipe(6, "translate");
2130
- ɵɵelementEnd();
2131
- ɵɵelementStart(7, "div", 5);
2132
- ɵɵelementStart(8, "button", 6);
2133
- ɵɵlistener("click", function SelectProveedorComponent_Template_button_click_8_listener() { return ctx.cargarDatosProveedores(); });
2134
- ɵɵelement(9, "i", 7);
2135
- ɵɵelementEnd();
2136
- ɵɵelementEnd();
2137
- ɵɵelementEnd();
2138
- ɵɵelementEnd();
2139
- ɵɵelementEnd();
2140
- ɵɵelement(10, "hr");
2141
- ɵɵelementStart(11, "div", 1);
2142
- ɵɵelementStart(12, "div", 8);
2143
- ɵɵelementStart(13, "p-table", 9);
2144
- ɵɵlistener("valueChange", function SelectProveedorComponent_Template_p_table_valueChange_13_listener($event) { return ctx.proveedores = $event; })("selectionChange", function SelectProveedorComponent_Template_p_table_selectionChange_13_listener($event) { return ctx.proveedorSeleccionado = $event; })("onRowSelect", function SelectProveedorComponent_Template_p_table_onRowSelect_13_listener($event) { return ctx.seleccionarProveedor($event); });
2145
- ɵɵtemplate(14, SelectProveedorComponent_ng_template_14_Template, 10, 9, "ng-template", 10);
2146
- ɵɵtemplate(15, SelectProveedorComponent_ng_template_15_Template, 7, 3, "ng-template", 11);
2147
- ɵɵelementEnd();
2148
- ɵɵelementEnd();
2149
- ɵɵelementStart(16, "div", 8);
2150
- ɵɵelementStart(17, "p-paginator", 12);
2151
- ɵɵlistener("onPageChange", function SelectProveedorComponent_Template_p_paginator_onPageChange_17_listener($event) { return ctx.pagina($event); });
2152
- ɵɵelementEnd();
2153
- ɵɵelementEnd();
2154
- ɵɵelementEnd();
2155
- ɵɵelementEnd();
2156
- } if (rf & 2) {
2157
- ɵɵpropertyInterpolate("header", ɵɵpipeBind1(1, 11, "ArticuloProveedor.proveedores"));
2158
- ɵɵproperty("visible", ctx.visible);
2159
- ɵɵadvance(5);
2160
- ɵɵpropertyInterpolate1("placeholder", "", ɵɵpipeBind1(6, 13, "buscar"), "...");
2161
- ɵɵproperty("ngModel", ctx.page.filtro);
2162
- ɵɵadvance(8);
2163
- ɵɵproperty("value", ctx.proveedores)("selection", ctx.proveedorSeleccionado)("scrollable", true);
2164
- ɵɵadvance(4);
2165
- ɵɵproperty("rows", ctx.page.rows)("totalRecords", ctx.page.total)("pageLinkSize", 5)("rowsPerPageOptions", ɵɵpureFunction0(15, _c0$4));
2166
- } }, directives: [Dialog, DefaultValueAccessor, NgControlStatus, NgModel, Table, PrimeTemplate, Paginator], pipes: [TranslatePipe], encapsulation: 2 });
2167
- return SelectProveedorComponent;
2168
- }());
2169
- /*@__PURE__*/ (function () { ɵsetClassMetadata(SelectProveedorComponent, [{
2170
- type: Component,
2171
- args: [{
2172
- templateUrl: 'select-proveedor.component.html',
2173
- selector: 'select-proveedor'
2174
- }]
2175
- }], function () { return [{ type: ProveedorService }, { type: PaginateService }, { type: TranslateService }]; }, { visible: [{
2176
- type: Input
2177
- }], proveedorSeleccionado: [{
2178
- type: Input
2179
- }], select: [{
2180
- type: Output
2181
- }] }); })();
2182
-
2183
- var StockService = /** @class */ (function (_super) {
2184
- __extends(StockService, _super);
2185
- function StockService(httpClient) {
2186
- var _this = _super.call(this, httpClient, 'stock') || this;
2187
- _this.httpClient = httpClient;
2188
- return _this;
2189
- }
2190
- StockService.prototype.obtenerExistenciasArticulosDescripcion = function (parametros, params) {
2191
- var _this = this;
2192
- var url = this.getBaseUrl() + '/stock/obtenerExistenciasArticulos';
2193
- var promesa = new Promise(function (resolve, reject) {
2194
- _this.httpClient.post(url + _this.serializeParams(params), parametros, _this.buildAuth()).subscribe(function (data) {
2195
- resolve(data);
2196
- }, function (err) {
2197
- reject(err);
2198
- });
2199
- });
2200
- return promesa;
2201
- };
2202
- /** @nocollapse */ StockService.ɵfac = function StockService_Factory(t) { return new (t || StockService)(ɵɵinject(HttpClient)); };
2203
- /** @nocollapse */ StockService.ɵprov = ɵɵdefineInjectable({ token: StockService, factory: StockService.ɵfac, providedIn: 'root' });
2204
- return StockService;
2205
- }(CrudService));
2206
- /*@__PURE__*/ (function () { ɵsetClassMetadata(StockService, [{
2207
- type: Injectable,
2208
- args: [{
2209
- providedIn: 'root'
2210
- }]
2211
- }], function () { return [{ type: HttpClient }]; }, null); })();
2212
-
2213
- var AlmacenService = /** @class */ (function (_super) {
2214
- __extends(AlmacenService, _super);
2215
- function AlmacenService(httpClient) {
2216
- var _this = _super.call(this, httpClient, '/almacen') || this;
2217
- _this.httpClient = httpClient;
2218
- return _this;
2219
- }
2220
- AlmacenService.prototype.obtenerAlmacenEmpresa = function () {
2221
- var url = this.geturl() + '/obtenerAlmacenEmpresa';
2222
- return this.getHttp().get(url, this.buildAuth());
2223
- };
2224
- /** @nocollapse */ AlmacenService.ɵfac = function AlmacenService_Factory(t) { return new (t || AlmacenService)(ɵɵinject(HttpClient)); };
2225
- /** @nocollapse */ AlmacenService.ɵprov = ɵɵdefineInjectable({ token: AlmacenService, factory: AlmacenService.ɵfac, providedIn: 'root' });
2226
- return AlmacenService;
2227
- }(CrudService));
2228
- /*@__PURE__*/ (function () { ɵsetClassMetadata(AlmacenService, [{
2229
- type: Injectable,
2230
- args: [{
2231
- providedIn: 'root'
2232
- }]
2233
- }], function () { return [{ type: HttpClient }]; }, null); })();
2234
-
2235
- var ArticuloInformacionService = /** @class */ (function (_super) {
2236
- __extends(ArticuloInformacionService, _super);
2237
- function ArticuloInformacionService(httpClient) {
2238
- var _this = _super.call(this, httpClient, 'articulo') || this;
2239
- _this.httpClient = httpClient;
2240
- return _this;
2241
- }
2242
- ArticuloInformacionService.prototype.obtenerExistencias = function (articulo) {
2243
- var uRL = "/existenciasArticulo/" + articulo;
2244
- return this.httpClient.get(this.geturl() + uRL, this.buildAuth());
2245
- };
2246
- /** @nocollapse */ ArticuloInformacionService.ɵfac = function ArticuloInformacionService_Factory(t) { return new (t || ArticuloInformacionService)(ɵɵinject(HttpClient)); };
2247
- /** @nocollapse */ ArticuloInformacionService.ɵprov = ɵɵdefineInjectable({ token: ArticuloInformacionService, factory: ArticuloInformacionService.ɵfac, providedIn: 'root' });
2248
- return ArticuloInformacionService;
2249
- }(CrudService));
2250
- /*@__PURE__*/ (function () { ɵsetClassMetadata(ArticuloInformacionService, [{
2251
- type: Injectable,
2252
- args: [{
2253
- providedIn: 'root'
2254
- }]
2255
- }], function () { return [{ type: HttpClient }]; }, null); })();
2256
-
2257
- function SeleccionArticuloInformacionComponent_ng_template_3_col_1_Template(rf, ctx) { if (rf & 1) {
2258
- ɵɵelement(0, "col");
2259
- } if (rf & 2) {
2260
- var col_r5 = ctx.$implicit;
2261
- ɵɵstyleProp("width", col_r5.width);
2262
- } }
2263
- function SeleccionArticuloInformacionComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
2264
- ɵɵelementStart(0, "colgroup");
2265
- ɵɵtemplate(1, SeleccionArticuloInformacionComponent_ng_template_3_col_1_Template, 1, 2, "col", 8);
2266
- ɵɵelementEnd();
2267
- } if (rf & 2) {
2268
- var columns_r3 = ctx.$implicit;
2269
- ɵɵadvance(1);
2270
- ɵɵproperty("ngForOf", columns_r3);
2271
- } }
2272
- function SeleccionArticuloInformacionComponent_ng_template_4_th_1_Template(rf, ctx) { if (rf & 1) {
2273
- ɵɵelementStart(0, "th", 10);
2274
- ɵɵtext(1);
2275
- ɵɵelementEnd();
2276
- } if (rf & 2) {
2277
- var col_r8 = ctx.$implicit;
2278
- ɵɵadvance(1);
2279
- ɵɵtextInterpolate1(" ", col_r8.header, " ");
2280
- } }
2281
- function SeleccionArticuloInformacionComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
2282
- ɵɵelementStart(0, "tr");
2283
- ɵɵtemplate(1, SeleccionArticuloInformacionComponent_ng_template_4_th_1_Template, 2, 1, "th", 9);
2284
- ɵɵelementEnd();
2285
- } if (rf & 2) {
2286
- var columns_r6 = ctx.$implicit;
2287
- ɵɵadvance(1);
2288
- ɵɵproperty("ngForOf", columns_r6);
2289
- } }
2290
- function SeleccionArticuloInformacionComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) {
2291
- ɵɵelementStart(0, "tr");
2292
- ɵɵelementStart(1, "td");
2293
- ɵɵtext(2);
2294
- ɵɵelementEnd();
2295
- ɵɵelementStart(3, "td");
2296
- ɵɵtext(4);
2297
- ɵɵelementEnd();
2298
- ɵɵelementStart(5, "td");
2299
- ɵɵtext(6);
2300
- ɵɵelementEnd();
2301
- ɵɵelementStart(7, "td");
2302
- ɵɵtext(8);
2303
- ɵɵelementEnd();
2304
- ɵɵelementStart(9, "td");
2305
- ɵɵtext(10);
2306
- ɵɵelementEnd();
2307
- ɵɵelementEnd();
2308
- } if (rf & 2) {
2309
- var rowData_r9 = ctx.$implicit;
2310
- ɵɵadvance(2);
2311
- ɵɵtextInterpolate(rowData_r9.almacenCodigo);
2312
- ɵɵadvance(2);
2313
- ɵɵtextInterpolate(rowData_r9.almacenDescripcion);
2314
- ɵɵadvance(2);
2315
- ɵɵtextInterpolate(rowData_r9.ubicacionCodigo);
2316
- ɵɵadvance(2);
2317
- ɵɵtextInterpolate(rowData_r9.ubicacionDescripcion);
2318
- ɵɵadvance(2);
2319
- ɵɵtextInterpolate(rowData_r9.existencia);
2320
- } }
2321
- var _c0$5 = function (a0) { return { "width": a0, "min-width": "200px" }; };
2322
- var _c1$2 = function () { return { width: "600px" }; };
2323
- var SeleccionArticuloInformacionComponent = /** @class */ (function () {
2324
- function SeleccionArticuloInformacionComponent(articuloInformacionService) {
2325
- this.articuloInformacionService = articuloInformacionService;
2326
- this.eventSelection = new EventEmitter();
2327
- this.flagModal = true;
2328
- this.size = 640;
2329
- this.params = [
2330
- { param: 'offset', value: 0 },
2331
- { param: 'max', value: -1 },
2332
- { param: 'order', value: 'asc' }
2333
- ];
2334
- this.columnsData = [
2335
- { field: 'codigo', header: 'Código Almacén', width: '90px' },
2336
- { field: 'descripcion', header: 'Descripción Almacen', width: '140px' },
2337
- { field: 'codigo', header: 'Código Ubicación', width: '90px' },
2338
- { field: 'descripcion', header: 'Descripción Ubicación', width: '140px' },
2339
- { field: 'opciones', header: 'Existencia', width: '80px' },
2340
- ];
2341
- }
2342
- SeleccionArticuloInformacionComponent.prototype.ngOnInit = function () {
2343
- this.OnLoad();
2344
- };
2345
- SeleccionArticuloInformacionComponent.prototype.hiddenDialog = function () {
2346
- this.eventSelection.emit({ status: false });
2347
- };
2348
- SeleccionArticuloInformacionComponent.prototype.OnResize = function (event) {
2349
- this.isMovil = event.target.innerWidth <= 640;
2350
- };
2351
- SeleccionArticuloInformacionComponent.prototype.OnLoad = function () {
2352
- var _this = this;
2353
- this.articuloInformacionService.obtenerExistencias(this.articulo.articulo.id).subscribe(function (data) {
2354
- _this.existenciasList = data.data;
2355
- });
2356
- };
2357
- SeleccionArticuloInformacionComponent.prototype.OnShow = function () {
2358
- this.titulo = 'Existencias en Almacenes';
2359
- };
2360
- SeleccionArticuloInformacionComponent.prototype.onSelectedUbicacion = function (ubicacionRow) {
2361
- this.eventSelection.emit({ status: false, ubicacion: ubicacionRow });
2362
- };
2363
- /** @nocollapse */ SeleccionArticuloInformacionComponent.ɵfac = function SeleccionArticuloInformacionComponent_Factory(t) { return new (t || SeleccionArticuloInformacionComponent)(ɵɵdirectiveInject(ArticuloInformacionService)); };
2364
- /** @nocollapse */ SeleccionArticuloInformacionComponent.ɵcmp = ɵɵdefineComponent({ type: SeleccionArticuloInformacionComponent, selectors: [["lib-seleccion-articulo-informacion"]], inputs: { showModal: "showModal", articulo: "articulo" }, outputs: { eventSelection: "eventSelection" }, decls: 9, vars: 20, consts: [[3, "header", "visible", "modal", "minY", "baseZIndex", "draggable", "blockScroll", "maximizable", "breakpoint", "onShow", "visibleChange", "onHide", "resize"], [1, "ui-g", "ui-fluid"], ["scrollHeight", "350px", 3, "columns", "value", "scrollable", "responsive"], ["pTemplate", "colgroup"], ["pTemplate", "header"], ["pTemplate", "body"], [1, "container-end"], ["pButton", "", "type", "button", "icon", "pi pi-replay", "label", "Cerrar", 1, "ui-button-raised", "ui-button-secondary", 3, "click"], [3, "width", 4, "ngFor", "ngForOf"], ["pResizableColumn", "", 4, "ngFor", "ngForOf"], ["pResizableColumn", ""]], template: function SeleccionArticuloInformacionComponent_Template(rf, ctx) { if (rf & 1) {
2365
- ɵɵelementStart(0, "p-dialog", 0);
2366
- ɵɵlistener("onShow", function SeleccionArticuloInformacionComponent_Template_p_dialog_onShow_0_listener() { return ctx.OnShow(); })("visibleChange", function SeleccionArticuloInformacionComponent_Template_p_dialog_visibleChange_0_listener($event) { return ctx.showModal = $event; })("onHide", function SeleccionArticuloInformacionComponent_Template_p_dialog_onHide_0_listener() { return ctx.hiddenDialog(); })("resize", function SeleccionArticuloInformacionComponent_Template_p_dialog_resize_0_listener($event) { return ctx.OnResize($event); }, false, ɵɵresolveWindow);
2367
- ɵɵelementStart(1, "div", 1);
2368
- ɵɵelementStart(2, "p-table", 2);
2369
- ɵɵtemplate(3, SeleccionArticuloInformacionComponent_ng_template_3_Template, 2, 1, "ng-template", 3);
2370
- ɵɵtemplate(4, SeleccionArticuloInformacionComponent_ng_template_4_Template, 2, 1, "ng-template", 4);
2371
- ɵɵtemplate(5, SeleccionArticuloInformacionComponent_ng_template_5_Template, 11, 5, "ng-template", 5);
2372
- ɵɵelementEnd();
2373
- ɵɵelementEnd();
2374
- ɵɵelementStart(6, "p-footer");
2375
- ɵɵelementStart(7, "div", 6);
2376
- ɵɵelementStart(8, "button", 7);
2377
- ɵɵlistener("click", function SeleccionArticuloInformacionComponent_Template_button_click_8_listener() { return ctx.hiddenDialog(); });
2378
- ɵɵelementEnd();
2379
- ɵɵelementEnd();
2380
- ɵɵelementEnd();
2381
- ɵɵelementEnd();
2382
- } if (rf & 2) {
2383
- ɵɵstyleMap(ɵɵpureFunction1(17, _c0$5, ctx.size + "px"));
2384
- ɵɵproperty("header", ctx.titulo)("visible", ctx.showModal)("modal", ctx.flagModal)("minY", 70)("baseZIndex", 10000)("draggable", false)("blockScroll", true)("maximizable", true)("breakpoint", 640);
2385
- ɵɵadvance(2);
2386
- ɵɵstyleMap(ɵɵpureFunction0(19, _c1$2));
2387
- ɵɵproperty("columns", ctx.columnsData)("value", ctx.existenciasList)("scrollable", true)("responsive", true);
2388
- } }, directives: [Dialog, Table, PrimeTemplate, Footer, ButtonDirective, NgForOf, ResizableColumn], styles: [""] });
2389
- return SeleccionArticuloInformacionComponent;
2390
- }());
2391
- /*@__PURE__*/ (function () { ɵsetClassMetadata(SeleccionArticuloInformacionComponent, [{
2392
- type: Component,
2393
- args: [{
2394
- selector: 'lib-seleccion-articulo-informacion',
2395
- templateUrl: './seleccion-articulo-informacion.component.html',
2396
- styleUrls: ['./seleccion-articulo-informacion.component.css']
2397
- }]
2398
- }], function () { return [{ type: ArticuloInformacionService }]; }, { showModal: [{
2399
- type: Input
2400
- }], articulo: [{
2401
- type: Input
2402
- }], eventSelection: [{
2403
- type: Output
2404
- }] }); })();
2405
-
2406
- function SeleccionaArticuloComponent_option_25_Template(rf, ctx) { if (rf & 1) {
2407
- ɵɵelementStart(0, "option", 25);
2408
- ɵɵtext(1);
2409
- ɵɵelementEnd();
2410
- } if (rf & 2) {
2411
- var almacen_r5 = ctx.$implicit;
2412
- ɵɵpropertyInterpolate("value", almacen_r5.id);
2413
- ɵɵadvance(1);
2414
- ɵɵtextInterpolate(almacen_r5.descripcion);
2415
- } }
2416
- function SeleccionaArticuloComponent_ng_template_29_th_7_Template(rf, ctx) { if (rf & 1) {
2417
- ɵɵelementStart(0, "th", 34);
2418
- ɵɵtext(1, "existenciaSecundaria");
2419
- ɵɵelementEnd();
2420
- } }
2421
- function SeleccionaArticuloComponent_ng_template_29_th_8_Template(rf, ctx) { if (rf & 1) {
2422
- ɵɵelementStart(0, "th", 28);
2423
- ɵɵtext(1, "Unidad");
2424
- ɵɵelementEnd();
2425
- } }
2426
- function SeleccionaArticuloComponent_ng_template_29_th_14_Template(rf, ctx) { if (rf & 1) {
2427
- ɵɵelementStart(0, "th", 26);
2428
- ɵɵtext(1, "Movimiento.movimientoDetalle.precio");
2429
- ɵɵelementEnd();
2430
- } }
2431
- function SeleccionaArticuloComponent_ng_template_29_th_15_Template(rf, ctx) { if (rf & 1) {
2432
- ɵɵelementStart(0, "th", 26);
2433
- ɵɵtext(1, "Precio 2");
2434
- ɵɵelementEnd();
2435
- } }
2436
- function SeleccionaArticuloComponent_ng_template_29_th_16_Template(rf, ctx) { if (rf & 1) {
2437
- ɵɵelementStart(0, "th", 26);
2438
- ɵɵtext(1, "Precio 3");
2439
- ɵɵelementEnd();
2440
- } }
2441
- function SeleccionaArticuloComponent_ng_template_29_th_17_Template(rf, ctx) { if (rf & 1) {
2442
- ɵɵelementStart(0, "th", 26);
2443
- ɵɵtext(1, "Precio 4");
2444
- ɵɵelementEnd();
2445
- } }
2446
- function SeleccionaArticuloComponent_ng_template_29_th_18_Template(rf, ctx) { if (rf & 1) {
2447
- ɵɵelementStart(0, "th", 26);
2448
- ɵɵtext(1, "Precio 5");
2449
- ɵɵelementEnd();
2450
- } }
2451
- function SeleccionaArticuloComponent_ng_template_29_th_19_Template(rf, ctx) { if (rf & 1) {
2452
- ɵɵelementStart(0, "th", 28);
2453
- ɵɵtext(1, "Movimiento.costo");
2454
- ɵɵelementEnd();
2455
- } }
2456
- function SeleccionaArticuloComponent_ng_template_29_th_22_Template(rf, ctx) { if (rf & 1) {
2457
- ɵɵelementStart(0, "th", 26);
2458
- ɵɵtext(1);
2459
- ɵɵelementEnd();
2460
- } if (rf & 2) {
2461
- var item_r15 = ctx.$implicit;
2462
- ɵɵadvance(1);
2463
- ɵɵtextInterpolate(item_r15.descripcion);
2464
- } }
2465
- function SeleccionaArticuloComponent_ng_template_29_Template(rf, ctx) { if (rf & 1) {
2466
- ɵɵelementStart(0, "tr");
2467
- ɵɵelementStart(1, "th", 26);
2468
- ɵɵtext(2, "C\u00F3digo Ubicacion");
2469
- ɵɵelementEnd();
2470
- ɵɵelementStart(3, "th", 27);
2471
- ɵɵtext(4, "Existencia");
2472
- ɵɵelementEnd();
2473
- ɵɵelementStart(5, "th", 28);
2474
- ɵɵtext(6, "Unidad");
2475
- ɵɵelementEnd();
2476
- ɵɵtemplate(7, SeleccionaArticuloComponent_ng_template_29_th_7_Template, 2, 0, "th", 29);
2477
- ɵɵtemplate(8, SeleccionaArticuloComponent_ng_template_29_th_8_Template, 2, 0, "th", 30);
2478
- ɵɵelementStart(9, "th", 26);
2479
- ɵɵtext(10, "C\u00F3digo");
2480
- ɵɵelementEnd();
2481
- ɵɵelementStart(11, "th", 31);
2482
- ɵɵtext(12, "Descripcion");
2483
- ɵɵelementEnd();
2484
- ɵɵelement(13, "th", 28);
2485
- ɵɵtemplate(14, SeleccionaArticuloComponent_ng_template_29_th_14_Template, 2, 0, "th", 32);
2486
- ɵɵtemplate(15, SeleccionaArticuloComponent_ng_template_29_th_15_Template, 2, 0, "th", 32);
2487
- ɵɵtemplate(16, SeleccionaArticuloComponent_ng_template_29_th_16_Template, 2, 0, "th", 32);
2488
- ɵɵtemplate(17, SeleccionaArticuloComponent_ng_template_29_th_17_Template, 2, 0, "th", 32);
2489
- ɵɵtemplate(18, SeleccionaArticuloComponent_ng_template_29_th_18_Template, 2, 0, "th", 32);
2490
- ɵɵtemplate(19, SeleccionaArticuloComponent_ng_template_29_th_19_Template, 2, 0, "th", 30);
2491
- ɵɵelementStart(20, "th", 28);
2492
- ɵɵtext(21, "Existencia por Unidad");
2493
- ɵɵelementEnd();
2494
- ɵɵtemplate(22, SeleccionaArticuloComponent_ng_template_29_th_22_Template, 2, 1, "th", 33);
2495
- ɵɵelementEnd();
2496
- } if (rf & 2) {
2497
- var ctx_r2 = ɵɵnextContext();
2498
- ɵɵadvance(7);
2499
- ɵɵproperty("ngIf", ctx_r2.manejaUnidadSecundaria);
2500
- ɵɵadvance(1);
2501
- ɵɵproperty("ngIf", ctx_r2.manejaUnidadSecundaria);
2502
- ɵɵadvance(6);
2503
- ɵɵproperty("ngIf", ctx_r2.configuracion.tipoPrecio !== "costo");
2504
- ɵɵadvance(1);
2505
- ɵɵproperty("ngIf", ctx_r2.configuracion.tipoPrecio !== "costo");
2506
- ɵɵadvance(1);
2507
- ɵɵproperty("ngIf", ctx_r2.configuracion.tipoPrecio !== "costo");
2508
- ɵɵadvance(1);
2509
- ɵɵproperty("ngIf", ctx_r2.configuracion.tipoPrecio !== "costo");
2510
- ɵɵadvance(1);
2511
- ɵɵproperty("ngIf", ctx_r2.configuracion.tipoPrecio !== "costo");
2512
- ɵɵadvance(1);
2513
- ɵɵproperty("ngIf", ctx_r2.configuracion.tipoPrecio === "costo");
2514
- ɵɵadvance(3);
2515
- ɵɵproperty("ngForOf", ctx_r2.clasificadorList);
2516
- } }
2517
- function SeleccionaArticuloComponent_ng_template_30_td_1_Template(rf, ctx) { if (rf & 1) {
2518
- ɵɵelementStart(0, "td", 26);
2519
- ɵɵtext(1, "Movimiento.NoAsignado");
2520
- ɵɵelementEnd();
2521
- } }
2522
- function SeleccionaArticuloComponent_ng_template_30_td_2_Template(rf, ctx) { if (rf & 1) {
2523
- ɵɵelementStart(0, "td", 42);
2524
- ɵɵtext(1);
2525
- ɵɵelementEnd();
2526
- } if (rf & 2) {
2527
- var rowData_r16 = ɵɵnextContext().$implicit;
2528
- ɵɵadvance(1);
2529
- ɵɵtextInterpolate(rowData_r16.ubicacionCodigo);
2530
- } }
2531
- function SeleccionaArticuloComponent_ng_template_30_td_7_Template(rf, ctx) { if (rf & 1) {
2532
- ɵɵelementStart(0, "td", 47);
2533
- ɵɵtext(1);
2534
- ɵɵelementEnd();
2535
- } if (rf & 2) {
2536
- var rowData_r16 = ɵɵnextContext().$implicit;
2537
- ɵɵadvance(1);
2538
- ɵɵtextInterpolate(rowData_r16.existenciaSecundaria);
2539
- } }
2540
- function SeleccionaArticuloComponent_ng_template_30_td_8_Template(rf, ctx) { if (rf & 1) {
2541
- ɵɵelementStart(0, "td", 39);
2542
- ɵɵtext(1);
2543
- ɵɵelementEnd();
2544
- } if (rf & 2) {
2545
- var rowData_r16 = ɵɵnextContext().$implicit;
2546
- ɵɵadvance(1);
2547
- ɵɵtextInterpolate(rowData_r16.unidadSecundariaCodigo);
2548
- } }
2549
- function SeleccionaArticuloComponent_ng_template_30_td_15_Template(rf, ctx) { if (rf & 1) {
2550
- ɵɵelementStart(0, "td", 42);
2551
- ɵɵtext(1);
2552
- ɵɵpipe(2, "currency");
2553
- ɵɵelementEnd();
2554
- } if (rf & 2) {
2555
- var rowData_r16 = ɵɵnextContext().$implicit;
2556
- ɵɵadvance(1);
2557
- ɵɵtextInterpolate(ɵɵpipeBind1(2, 1, rowData_r16.precioConImpuestos));
2558
- } }
2559
- function SeleccionaArticuloComponent_ng_template_30_td_16_Template(rf, ctx) { if (rf & 1) {
2560
- ɵɵelementStart(0, "td", 42);
2561
- ɵɵtext(1);
2562
- ɵɵpipe(2, "currency");
2563
- ɵɵelementEnd();
2564
- } if (rf & 2) {
2565
- var rowData_r16 = ɵɵnextContext().$implicit;
2566
- ɵɵadvance(1);
2567
- ɵɵtextInterpolate(ɵɵpipeBind1(2, 1, rowData_r16.precio2ConImpuestos));
2568
- } }
2569
- function SeleccionaArticuloComponent_ng_template_30_td_17_Template(rf, ctx) { if (rf & 1) {
2570
- ɵɵelementStart(0, "td", 42);
2571
- ɵɵtext(1);
2572
- ɵɵpipe(2, "currency");
2573
- ɵɵelementEnd();
2574
- } if (rf & 2) {
2575
- var rowData_r16 = ɵɵnextContext().$implicit;
2576
- ɵɵadvance(1);
2577
- ɵɵtextInterpolate(ɵɵpipeBind1(2, 1, rowData_r16.precio3ConImpuestos));
2578
- } }
2579
- function SeleccionaArticuloComponent_ng_template_30_td_18_Template(rf, ctx) { if (rf & 1) {
2580
- ɵɵelementStart(0, "td", 42);
2581
- ɵɵtext(1);
2582
- ɵɵpipe(2, "currency");
2583
- ɵɵelementEnd();
2584
- } if (rf & 2) {
2585
- var rowData_r16 = ɵɵnextContext().$implicit;
2586
- ɵɵadvance(1);
2587
- ɵɵtextInterpolate(ɵɵpipeBind1(2, 1, rowData_r16.precio4ConImpuestos));
2588
- } }
2589
- function SeleccionaArticuloComponent_ng_template_30_td_19_Template(rf, ctx) { if (rf & 1) {
2590
- ɵɵelementStart(0, "td", 42);
2591
- ɵɵtext(1);
2592
- ɵɵpipe(2, "currency");
2593
- ɵɵelementEnd();
2594
- } if (rf & 2) {
2595
- var rowData_r16 = ɵɵnextContext().$implicit;
2596
- ɵɵadvance(1);
2597
- ɵɵtextInterpolate(ɵɵpipeBind1(2, 1, rowData_r16.precio5ConImpuestos));
2598
- } }
2599
- function SeleccionaArticuloComponent_ng_template_30_td_20_Template(rf, ctx) { if (rf & 1) {
2600
- ɵɵelementStart(0, "td", 39);
2601
- ɵɵtext(1);
2602
- ɵɵpipe(2, "currency");
2603
- ɵɵelementEnd();
2604
- } if (rf & 2) {
2605
- var rowData_r16 = ɵɵnextContext().$implicit;
2606
- ɵɵadvance(1);
2607
- ɵɵtextInterpolate(ɵɵpipeBind1(2, 1, rowData_r16.precio));
2608
- } }
2609
- function SeleccionaArticuloComponent_ng_template_30_div_22_Template(rf, ctx) { if (rf & 1) {
2610
- ɵɵelementStart(0, "div", 48);
2611
- ɵɵelementStart(1, "div", 49);
2612
- ɵɵelementStart(2, "label", 50);
2613
- ɵɵtext(3);
2614
- ɵɵelementEnd();
2615
- ɵɵelementEnd();
2616
- ɵɵelementStart(4, "div", 49);
2617
- ɵɵelementStart(5, "label", 50);
2618
- ɵɵtext(6);
2619
- ɵɵpipe(7, "number");
2620
- ɵɵelementEnd();
2621
- ɵɵelementEnd();
2622
- ɵɵelementEnd();
2623
- } if (rf & 2) {
2624
- var item_r39 = ctx.$implicit;
2625
- ɵɵadvance(3);
2626
- ɵɵtextInterpolate(item_r39.unidad_codigo);
2627
- ɵɵadvance(3);
2628
- ɵɵtextInterpolate(ɵɵpipeBind2(7, 2, item_r39.unidad_existencia, "1.2-2"));
2629
- } }
2630
- function SeleccionaArticuloComponent_ng_template_30_td_23_Template(rf, ctx) { if (rf & 1) {
2631
- ɵɵelementStart(0, "td", 42);
2632
- ɵɵtext(1);
2633
- ɵɵelementEnd();
2634
- } if (rf & 2) {
2635
- var itemData_r40 = ctx.$implicit;
2636
- ɵɵadvance(1);
2637
- ɵɵtextInterpolate(itemData_r40.valor);
2638
- } }
2639
- function SeleccionaArticuloComponent_ng_template_30_Template(rf, ctx) { if (rf & 1) {
2640
- var _r42 = ɵɵgetCurrentView();
2641
- ɵɵelementStart(0, "tr", 35);
2642
- ɵɵtemplate(1, SeleccionaArticuloComponent_ng_template_30_td_1_Template, 2, 0, "td", 36);
2643
- ɵɵtemplate(2, SeleccionaArticuloComponent_ng_template_30_td_2_Template, 2, 1, "td", 37);
2644
- ɵɵelementStart(3, "td", 38);
2645
- ɵɵtext(4);
2646
- ɵɵelementEnd();
2647
- ɵɵelementStart(5, "td", 39);
2648
- ɵɵtext(6);
2649
- ɵɵelementEnd();
2650
- ɵɵtemplate(7, SeleccionaArticuloComponent_ng_template_30_td_7_Template, 2, 1, "td", 40);
2651
- ɵɵtemplate(8, SeleccionaArticuloComponent_ng_template_30_td_8_Template, 2, 1, "td", 41);
2652
- ɵɵelementStart(9, "td", 42);
2653
- ɵɵtext(10);
2654
- ɵɵelementEnd();
2655
- ɵɵelementStart(11, "td", 43);
2656
- ɵɵtext(12);
2657
- ɵɵelementEnd();
2658
- ɵɵelementStart(13, "td", 39);
2659
- ɵɵelementStart(14, "button", 44);
2660
- ɵɵlistener("click", function SeleccionaArticuloComponent_ng_template_30_Template_button_click_14_listener() { ɵɵrestoreView(_r42); var rowData_r16 = ctx.$implicit; var ctx_r41 = ɵɵnextContext(); return ctx_r41.onShowInformacion(rowData_r16); });
2661
- ɵɵelementEnd();
2662
- ɵɵelementEnd();
2663
- ɵɵtemplate(15, SeleccionaArticuloComponent_ng_template_30_td_15_Template, 3, 3, "td", 37);
2664
- ɵɵtemplate(16, SeleccionaArticuloComponent_ng_template_30_td_16_Template, 3, 3, "td", 37);
2665
- ɵɵtemplate(17, SeleccionaArticuloComponent_ng_template_30_td_17_Template, 3, 3, "td", 37);
2666
- ɵɵtemplate(18, SeleccionaArticuloComponent_ng_template_30_td_18_Template, 3, 3, "td", 37);
2667
- ɵɵtemplate(19, SeleccionaArticuloComponent_ng_template_30_td_19_Template, 3, 3, "td", 37);
2668
- ɵɵtemplate(20, SeleccionaArticuloComponent_ng_template_30_td_20_Template, 3, 3, "td", 41);
2669
- ɵɵelementStart(21, "td", 39);
2670
- ɵɵtemplate(22, SeleccionaArticuloComponent_ng_template_30_div_22_Template, 8, 5, "div", 45);
2671
- ɵɵelementEnd();
2672
- ɵɵtemplate(23, SeleccionaArticuloComponent_ng_template_30_td_23_Template, 2, 1, "td", 46);
2673
- ɵɵelementEnd();
2674
- } if (rf & 2) {
2675
- var rowData_r16 = ctx.$implicit;
2676
- var ctx_r3 = ɵɵnextContext();
2677
- ɵɵproperty("pSelectableRow", rowData_r16);
2678
- ɵɵadvance(1);
2679
- ɵɵproperty("ngIf", !rowData_r16.ubicacionCodigo);
2680
- ɵɵadvance(1);
2681
- ɵɵproperty("ngIf", rowData_r16.ubicacionCodigo);
2682
- ɵɵadvance(2);
2683
- ɵɵtextInterpolate(rowData_r16.existencia);
2684
- ɵɵadvance(2);
2685
- ɵɵtextInterpolate(rowData_r16.unidadCodigo);
2686
- ɵɵadvance(1);
2687
- ɵɵproperty("ngIf", ctx_r3.manejaUnidadSecundaria);
2688
- ɵɵadvance(1);
2689
- ɵɵproperty("ngIf", ctx_r3.manejaUnidadSecundaria);
2690
- ɵɵadvance(2);
2691
- ɵɵtextInterpolate(rowData_r16.articulo.codigo);
2692
- ɵɵadvance(2);
2693
- ɵɵtextInterpolate(rowData_r16.articulo.descripcion);
2694
- ɵɵadvance(3);
2695
- ɵɵproperty("ngIf", ctx_r3.configuracion.tipoPrecio !== "costo");
2696
- ɵɵadvance(1);
2697
- ɵɵproperty("ngIf", ctx_r3.configuracion.tipoPrecio !== "costo");
2698
- ɵɵadvance(1);
2699
- ɵɵproperty("ngIf", ctx_r3.configuracion.tipoPrecio !== "costo");
2700
- ɵɵadvance(1);
2701
- ɵɵproperty("ngIf", ctx_r3.configuracion.tipoPrecio !== "costo");
2702
- ɵɵadvance(1);
2703
- ɵɵproperty("ngIf", ctx_r3.configuracion.tipoPrecio !== "costo");
2704
- ɵɵadvance(1);
2705
- ɵɵproperty("ngIf", ctx_r3.configuracion.tipoPrecio === "costo");
2706
- ɵɵadvance(2);
2707
- ɵɵproperty("ngForOf", rowData_r16.existenciaUnidades);
2708
- ɵɵadvance(1);
2709
- ɵɵproperty("ngForOf", rowData_r16.articuloClasificadorList);
2710
- } }
2711
- function SeleccionaArticuloComponent_lib_seleccion_articulo_informacion_32_Template(rf, ctx) { if (rf & 1) {
2712
- var _r44 = ɵɵgetCurrentView();
2713
- ɵɵelementStart(0, "lib-seleccion-articulo-informacion", 51);
2714
- ɵɵlistener("eventSelection", function SeleccionaArticuloComponent_lib_seleccion_articulo_informacion_32_Template_lib_seleccion_articulo_informacion_eventSelection_0_listener($event) { ɵɵrestoreView(_r44); var ctx_r43 = ɵɵnextContext(); return ctx_r43.onEventInformacion($event); });
2715
- ɵɵelementEnd();
2716
- } if (rf & 2) {
2717
- var ctx_r4 = ɵɵnextContext();
2718
- ɵɵproperty("showModal", ctx_r4.showModalInformacion)("articulo", ctx_r4.articuloSelected);
2719
- } }
2720
- var _c0$6 = function (a0) { return { "width": a0, "min-width": "200px" }; };
2721
- var _c1$3 = function () { return [10, 25, 50, 100, 500]; };
2722
- var SeleccionaArticuloComponent = /** @class */ (function () {
2723
- function SeleccionaArticuloComponent(_stockService, _paginateService, _almacenService) {
2724
- this._stockService = _stockService;
2725
- this._paginateService = _paginateService;
2726
- this._almacenService = _almacenService;
2727
- this.manejaUnidadSecundaria = false;
2728
- this.emitFilaSeleccionada = new EventEmitter();
2729
- this.emitShowArticulos = new EventEmitter();
2730
- this.articulosList = [];
2731
- this.ordenar = [];
2732
- this.busquedaArticulos = {
2733
- tipoBusqueda: ''
2734
- };
2735
- this.showModal = false;
2736
- this.showModalInformacion = false;
2737
- this.showFirstTime = true;
2738
- this.clasificadorList = [];
2739
- this.size = 640;
2740
- }
2741
- SeleccionaArticuloComponent.prototype.ngOnInit = function () {
2742
- var _this = this;
2743
- this.page = this._paginateService.getPage();
2744
- this.ordenar = this._paginateService.getOrden([
2745
- { param: 'nombre', label: 'estatus' }
2746
- ], 'es');
2747
- this.showFirstTime = true;
2748
- this._almacenService.getAll(this.configuracion.params).subscribe(function (data) {
2749
- _this.almacenList = data.data;
2750
- });
2751
- this.busquedaArticulos.tipoBusqueda = 'CD';
2752
- //tempthis.obtenerExistenciaArticulosShow();
2753
- };
2754
- SeleccionaArticuloComponent.prototype.pagina = function (e) {
2755
- this.page.rows = e.rows;
2756
- this.page.offset = e.first;
2757
- this.obtenerExistenciaArticulos();
2758
- };
2759
- SeleccionaArticuloComponent.prototype.obtenerExistenciaArticulosShow = function () {
2760
- this.busquedaArticulos.tipoBusqueda = 'CD';
2761
- if (this.showFirstTime) {
2762
- this.obtenerExistenciaArticulos();
2763
- this.showFirstTime = false;
2764
- }
2765
- };
2766
- SeleccionaArticuloComponent.prototype.obtenerExistenciaArticulos = function () {
2767
- var _this = this;
2768
- this.busquedaArticulos.params = this._paginateService.getParams(this.page);
2769
- var parametros = {
2770
- almacen: (this.configuracion.noOcupaAlamacen ? null : this.movimiento.almacen),
2771
- tipoPrecio: this.configuracion.tipoPrecio,
2772
- busquedaArticulos: this.busquedaArticulos,
2773
- tipoArticulo: this.configuracion.tipoArticulo ? this.configuracion.tipoArticulo : null,
2774
- numeroPrecioDefault: this.configuracion.numeroPrecioDefault
2775
- };
2776
- this._stockService.obtenerExistenciasArticulosDescripcion(parametros, this.busquedaArticulos.params).then(function (data) {
2777
- _this.articulosList = data.articulosDescripcion;
2778
- _this.page.total = data.total;
2779
- if (data.clasificadores) {
2780
- _this.clasificadorList = data.clasificadores;
2781
- }
2782
- if (!_this.showModal) {
2783
- _this.showModal = true;
2784
- }
2785
- }).catch(function (e) {
2786
- _this.articulosList = [];
2787
- });
2788
- };
2789
- SeleccionaArticuloComponent.prototype.obtenerExistenciaArticulosVal = function () {
2790
- if (this.busquedaArticulos.tipoBusqueda != '' && !this.busquedaArticulos.key)
2791
- return false;
2792
- this.obtenerExistenciaArticulos();
2793
- };
2794
- SeleccionaArticuloComponent.prototype.obtenerExistenciaArticulosKey = function ($event) {
2795
- if ($event.key === 'Enter')
2796
- this.obtenerExistenciaArticulos();
2797
- };
2798
- SeleccionaArticuloComponent.prototype.filaSeleccionada = function ($event) {
2799
- this.emitFilaSeleccionada.emit($event);
2800
- };
2801
- SeleccionaArticuloComponent.prototype.emitirShowArticulos = function () {
2802
- this.emitShowArticulos.emit(0);
2803
- };
2804
- SeleccionaArticuloComponent.prototype.seriesArticulo = function (series) {
2805
- console.log(series);
2806
- };
2807
- SeleccionaArticuloComponent.prototype.onShowInformacion = function (eventArticulo) {
2808
- this.articuloSelected = eventArticulo;
2809
- this.showModalInformacion = true;
2810
- };
2811
- SeleccionaArticuloComponent.prototype.onEventInformacion = function (event) {
2812
- this.showModalInformacion = event.status;
2813
- };
2814
- /** @nocollapse */ SeleccionaArticuloComponent.ɵfac = function SeleccionaArticuloComponent_Factory(t) { return new (t || SeleccionaArticuloComponent)(ɵɵdirectiveInject(StockService), ɵɵdirectiveInject(PaginateService), ɵɵdirectiveInject(AlmacenService)); };
2815
- /** @nocollapse */ SeleccionaArticuloComponent.ɵcmp = ɵɵdefineComponent({ type: SeleccionaArticuloComponent, selectors: [["app-selecciona-articulo"]], inputs: { configuracion: "configuracion", showArticulos: "showArticulos", movimiento: "movimiento", manejaUnidadSecundaria: "manejaUnidadSecundaria" }, outputs: { emitFilaSeleccionada: "emitFilaSeleccionada", emitShowArticulos: "emitShowArticulos" }, decls: 33, vars: 28, consts: [[3, "header", "visible", "maximizable", "baseZIndex", "blockScroll", "minY", "visibleChange", "onShow", "onHide"], [1, "col-12", "mb-3"], [1, "row"], [1, "col-12", "col-md-3", "col-xl-3"], [1, "form-control", "col-md-6", 3, "ngModel", "ngModelChange", "change"], ["value", "C"], ["value", "D"], ["value", "CD"], ["value", "CI"], [1, "ui-inputgroup"], ["type", "text", "name", "key", 1, "form-control", 3, "ngModel", "ngModelChange", "keypress"], ["type", "button", 1, "btn", "btn-outline-primary", 3, "click"], [1, "fa", "fa-search"], [1, "col-12", "col-md-2", "col-xl-2"], [1, "form-group"], [1, "col-12", "col-md-4", "col-xl-4"], ["disabled", "", "name", "almacen", 1, "form-control", 3, "ngModel", "ngModelChange", "change"], [3, "value", 4, "ngFor", "ngForOf"], [2, "margin-top", "10px"], ["scrollHeight", "400px", "selectionMode", "single", 3, "value", "scrollable", "responsive", "onRowSelect"], ["dt", ""], ["pTemplate", "header"], ["pTemplate", "body"], [3, "rows", "totalRecords", "pageLinkSize", "rowsPerPageOptions", "onPageChange"], [3, "showModal", "articulo", "eventSelection", 4, "ngIf"], [3, "value"], ["translate", "", 2, "width", "80px"], ["translate", "", 2, "width", "70px"], ["translate", "", 2, "width", "40px"], ["style", "width: 50px", "translate", "", 4, "ngIf"], ["style", "width: 40px", "translate", "", 4, "ngIf"], ["translate", "", 2, "width", "120px"], ["style", "width: 80px", "translate", "", 4, "ngIf"], ["style", "width: 80px", "translate", "", 4, "ngFor", "ngForOf"], ["translate", "", 2, "width", "50px"], [3, "pSelectableRow"], ["style", "width: 80px;", "translate", "", 4, "ngIf"], ["style", "width: 80px;", 4, "ngIf"], [2, "width", "70px"], [2, "width", "40px"], ["style", "width: 50px;", 4, "ngIf"], ["style", "width: 40px;", 4, "ngIf"], [2, "width", "80px"], [2, "width", "120px"], ["pButton", "", "type", "button", "icon", "pi pi-eye", 1, "ui-button-raised", "ui-button-primary", 3, "click"], ["class", "row justify-content-between", 4, "ngFor", "ngForOf"], ["style", "width: 80px;", 4, "ngFor", "ngForOf"], [2, "width", "50px"], [1, "row", "justify-content-between"], [1, "col-lg-4"], ["for", ""], [3, "showModal", "articulo", "eventSelection"]], template: function SeleccionaArticuloComponent_Template(rf, ctx) { if (rf & 1) {
2816
- ɵɵelementStart(0, "p-dialog", 0);
2817
- ɵɵlistener("visibleChange", function SeleccionaArticuloComponent_Template_p_dialog_visibleChange_0_listener($event) { return ctx.showArticulos = $event; })("onShow", function SeleccionaArticuloComponent_Template_p_dialog_onShow_0_listener() { return ctx.obtenerExistenciaArticulosShow(); })("onHide", function SeleccionaArticuloComponent_Template_p_dialog_onHide_0_listener() { ctx.busquedaArticulos = { tipoBusqueda: "" }; return ctx.emitirShowArticulos(); });
2818
- ɵɵpipe(1, "translate");
2819
- ɵɵelementStart(2, "div", 1);
2820
- ɵɵelementStart(3, "div", 2);
2821
- ɵɵelementStart(4, "div", 3);
2822
- ɵɵelementStart(5, "select", 4);
2823
- ɵɵlistener("ngModelChange", function SeleccionaArticuloComponent_Template_select_ngModelChange_5_listener($event) { return ctx.busquedaArticulos.tipoBusqueda = $event; })("change", function SeleccionaArticuloComponent_Template_select_change_5_listener() { return ctx.obtenerExistenciaArticulosVal(); });
2824
- ɵɵelementStart(6, "option", 5);
2825
- ɵɵtext(7, "Codigo");
2826
- ɵɵelementEnd();
2827
- ɵɵelementStart(8, "option", 6);
2828
- ɵɵtext(9, "Descripcion");
2829
- ɵɵelementEnd();
2830
- ɵɵelementStart(10, "option", 7);
2831
- ɵɵtext(11, "Coincidencia");
2832
- ɵɵelementEnd();
2833
- ɵɵelementStart(12, "option", 8);
2834
- ɵɵtext(13, "Igual a");
2835
- ɵɵelementEnd();
2836
- ɵɵelementEnd();
2837
- ɵɵelementEnd();
2838
- ɵɵelementStart(14, "div", 3);
2839
- ɵɵelementStart(15, "div", 9);
2840
- ɵɵelementStart(16, "input", 10);
2841
- ɵɵlistener("ngModelChange", function SeleccionaArticuloComponent_Template_input_ngModelChange_16_listener($event) { return ctx.busquedaArticulos.key = $event; })("keypress", function SeleccionaArticuloComponent_Template_input_keypress_16_listener($event) { return ctx.obtenerExistenciaArticulosKey($event); });
2842
- ɵɵelementEnd();
2843
- ɵɵelementStart(17, "button", 11);
2844
- ɵɵlistener("click", function SeleccionaArticuloComponent_Template_button_click_17_listener() { return ctx.obtenerExistenciaArticulos(); });
2845
- ɵɵelement(18, "i", 12);
2846
- ɵɵelementEnd();
2847
- ɵɵelementEnd();
2848
- ɵɵelementEnd();
2849
- ɵɵelementStart(19, "div", 13);
2850
- ɵɵelementStart(20, "label", 14);
2851
- ɵɵtext(21);
2852
- ɵɵpipe(22, "translate");
2853
- ɵɵelementEnd();
2854
- ɵɵelementEnd();
2855
- ɵɵelementStart(23, "div", 15);
2856
- ɵɵelementStart(24, "select", 16);
2857
- ɵɵlistener("ngModelChange", function SeleccionaArticuloComponent_Template_select_ngModelChange_24_listener($event) { return ctx.movimiento.almacen = $event; })("change", function SeleccionaArticuloComponent_Template_select_change_24_listener() { return ctx.obtenerExistenciaArticulosVal(); });
2858
- ɵɵtemplate(25, SeleccionaArticuloComponent_option_25_Template, 2, 2, "option", 17);
2859
- ɵɵelementEnd();
2860
- ɵɵelementEnd();
2861
- ɵɵelementEnd();
2862
- ɵɵelementEnd();
2863
- ɵɵelementStart(26, "div", 18);
2864
- ɵɵelementStart(27, "p-table", 19, 20);
2865
- ɵɵlistener("onRowSelect", function SeleccionaArticuloComponent_Template_p_table_onRowSelect_27_listener($event) { return ctx.filaSeleccionada($event); });
2866
- ɵɵtemplate(29, SeleccionaArticuloComponent_ng_template_29_Template, 23, 9, "ng-template", 21);
2867
- ɵɵtemplate(30, SeleccionaArticuloComponent_ng_template_30_Template, 24, 17, "ng-template", 22);
2868
- ɵɵelementEnd();
2869
- ɵɵelementEnd();
2870
- ɵɵelementStart(31, "p-paginator", 23);
2871
- ɵɵlistener("onPageChange", function SeleccionaArticuloComponent_Template_p_paginator_onPageChange_31_listener($event) { return ctx.pagina($event); });
2872
- ɵɵelementEnd();
2873
- ɵɵelementEnd();
2874
- ɵɵtemplate(32, SeleccionaArticuloComponent_lib_seleccion_articulo_informacion_32_Template, 1, 2, "lib-seleccion-articulo-informacion", 24);
2875
- } if (rf & 2) {
2876
- ɵɵstyleMap(ɵɵpureFunction1(25, _c0$6, ctx.size + "px"));
2877
- ɵɵpropertyInterpolate("header", ɵɵpipeBind1(1, 21, "Articulos"));
2878
- ɵɵproperty("visible", ctx.showArticulos)("maximizable", true)("baseZIndex", 10000)("blockScroll", true)("minY", 70);
2879
- ɵɵadvance(5);
2880
- ɵɵproperty("ngModel", ctx.busquedaArticulos.tipoBusqueda);
2881
- ɵɵadvance(11);
2882
- ɵɵproperty("ngModel", ctx.busquedaArticulos.key);
2883
- ɵɵadvance(5);
2884
- ɵɵtextInterpolate(ɵɵpipeBind1(22, 23, "Movimiento.movimientoDetalle.almacen"));
2885
- ɵɵadvance(3);
2886
- ɵɵproperty("ngModel", ctx.movimiento.almacen);
2887
- ɵɵadvance(1);
2888
- ɵɵproperty("ngForOf", ctx.almacenList);
2889
- ɵɵadvance(2);
2890
- ɵɵproperty("value", ctx.articulosList)("scrollable", true)("responsive", true);
2891
- ɵɵadvance(4);
2892
- ɵɵproperty("rows", ctx.page.rows)("totalRecords", ctx.page.total)("pageLinkSize", 5)("rowsPerPageOptions", ɵɵpureFunction0(27, _c1$3));
2893
- ɵɵadvance(1);
2894
- ɵɵproperty("ngIf", ctx.showModalInformacion);
2895
- } }, directives: [Dialog, SelectControlValueAccessor, NgControlStatus, NgModel, NgSelectOption, ɵangular_packages_forms_forms_x, DefaultValueAccessor, NgForOf, Table, PrimeTemplate, Paginator, NgIf, TranslateDirective, SelectableRow, ButtonDirective, SeleccionArticuloInformacionComponent], pipes: [TranslatePipe, CurrencyPipe, DecimalPipe], styles: ["tr[_ngcontent-%COMP%]:hover{background-color:#34a835!important;color:#fff!important}table[_ngcontent-%COMP%]{position:absolute}"] });
2896
- return SeleccionaArticuloComponent;
2897
- }());
2898
- /*@__PURE__*/ (function () { ɵsetClassMetadata(SeleccionaArticuloComponent, [{
2899
- type: Component,
2900
- args: [{
2901
- selector: 'app-selecciona-articulo',
2902
- templateUrl: './selecciona-articulo.component.html',
2903
- styleUrls: ['./selecciona-articulo.component.css']
2904
- }]
2905
- }], function () { return [{ type: StockService }, { type: PaginateService }, { type: AlmacenService }]; }, { configuracion: [{
2906
- type: Input
2907
- }], showArticulos: [{
2908
- type: Input
2909
- }], movimiento: [{
2910
- type: Input
2911
- }], manejaUnidadSecundaria: [{
2912
- type: Input
2913
- }], emitFilaSeleccionada: [{
2914
- type: Output
2915
- }], emitShowArticulos: [{
2916
- type: Output
2917
- }] }); })();
2918
-
2919
- var AcreedorService = /** @class */ (function (_super) {
2920
- __extends(AcreedorService, _super);
2921
- function AcreedorService(httpClient) {
2922
- var _this = _super.call(this, httpClient, 'acreedor') || this;
2923
- _this.httpClient = httpClient;
2924
- return _this;
2925
- }
2926
- /** @nocollapse */ AcreedorService.ɵfac = function AcreedorService_Factory(t) { return new (t || AcreedorService)(ɵɵinject(HttpClient)); };
2927
- /** @nocollapse */ AcreedorService.ɵprov = ɵɵdefineInjectable({ token: AcreedorService, factory: AcreedorService.ɵfac, providedIn: 'root' });
2928
- return AcreedorService;
2929
- }(CrudService));
2930
- /*@__PURE__*/ (function () { ɵsetClassMetadata(AcreedorService, [{
2931
- type: Injectable,
2932
- args: [{
2933
- providedIn: 'root'
2934
- }]
2935
- }], function () { return [{ type: HttpClient }]; }, null); })();
2936
-
2937
- function SelectAcreedorComponent_ng_template_13_Template(rf, ctx) { if (rf & 1) {
2938
- ɵɵelementStart(0, "tr");
2939
- ɵɵelementStart(1, "th");
2940
- ɵɵtext(2);
2941
- ɵɵpipe(3, "translate");
2942
- ɵɵelementEnd();
2943
- ɵɵelementStart(4, "th");
2944
- ɵɵtext(5);
2945
- ɵɵpipe(6, "translate");
2946
- ɵɵelementEnd();
2947
- ɵɵelementStart(7, "th");
2948
- ɵɵtext(8);
2949
- ɵɵpipe(9, "translate");
2950
- ɵɵelementEnd();
2951
- ɵɵelementStart(10, "th");
2952
- ɵɵtext(11);
2953
- ɵɵpipe(12, "translate");
2954
- ɵɵelementEnd();
2955
- ɵɵelementStart(13, "th");
2956
- ɵɵtext(14);
2957
- ɵɵpipe(15, "translate");
2958
- ɵɵelementEnd();
2959
- ɵɵelementStart(16, "th");
2960
- ɵɵtext(17);
2961
- ɵɵpipe(18, "translate");
2962
- ɵɵelementEnd();
2963
- ɵɵelementEnd();
2964
- } if (rf & 2) {
2965
- ɵɵadvance(2);
2966
- ɵɵtextInterpolate(ɵɵpipeBind1(3, 6, "razonSocial"));
2967
- ɵɵadvance(3);
2968
- ɵɵtextInterpolate(ɵɵpipeBind1(6, 8, "rfc"));
2969
- ɵɵadvance(3);
2970
- ɵɵtextInterpolate(ɵɵpipeBind1(9, 10, "tipo"));
2971
- ɵɵadvance(3);
2972
- ɵɵtextInterpolate(ɵɵpipeBind1(12, 12, "atrasoDiasEntrega"));
2973
- ɵɵadvance(3);
2974
- ɵɵtextInterpolate(ɵɵpipeBind1(15, 14, "limiteCredito"));
2975
- ɵɵadvance(3);
2976
- ɵɵtextInterpolate(ɵɵpipeBind1(18, 16, "fechaUltimaCompra"));
2977
- } }
2978
- function SelectAcreedorComponent_ng_template_14_span_6_Template(rf, ctx) { if (rf & 1) {
2979
- ɵɵelementStart(0, "span");
2980
- ɵɵtext(1);
2981
- ɵɵpipe(2, "translate");
2982
- ɵɵelementEnd();
2983
- } if (rf & 2) {
2984
- ɵɵadvance(1);
2985
- ɵɵtextInterpolate(ɵɵpipeBind1(2, 1, "moral"));
2986
- } }
2987
- function SelectAcreedorComponent_ng_template_14_span_7_Template(rf, ctx) { if (rf & 1) {
2988
- ɵɵelementStart(0, "span");
2989
- ɵɵtext(1);
2990
- ɵɵpipe(2, "translate");
2991
- ɵɵelementEnd();
2992
- } if (rf & 2) {
2993
- ɵɵadvance(1);
2994
- ɵɵtextInterpolate(ɵɵpipeBind1(2, 1, "fisico"));
2995
- } }
2996
- function SelectAcreedorComponent_ng_template_14_Template(rf, ctx) { if (rf & 1) {
2997
- ɵɵelementStart(0, "tr", 14);
2998
- ɵɵelementStart(1, "td");
2999
- ɵɵtext(2);
3000
- ɵɵelementEnd();
3001
- ɵɵelementStart(3, "td");
3002
- ɵɵtext(4);
3003
- ɵɵelementEnd();
3004
- ɵɵelementStart(5, "td");
3005
- ɵɵtemplate(6, SelectAcreedorComponent_ng_template_14_span_6_Template, 3, 3, "span", 15);
3006
- ɵɵtemplate(7, SelectAcreedorComponent_ng_template_14_span_7_Template, 3, 3, "span", 15);
3007
- ɵɵelementEnd();
3008
- ɵɵelementStart(8, "td");
3009
- ɵɵtext(9);
3010
- ɵɵelementEnd();
3011
- ɵɵelementStart(10, "td");
3012
- ɵɵtext(11);
3013
- ɵɵelementEnd();
3014
- ɵɵelementStart(12, "td");
3015
- ɵɵtext(13);
3016
- ɵɵpipe(14, "date");
3017
- ɵɵelementEnd();
3018
- ɵɵelementEnd();
3019
- } if (rf & 2) {
3020
- var acreedor_r3 = ctx.$implicit;
3021
- ɵɵproperty("pSelectableRow", acreedor_r3);
3022
- ɵɵadvance(2);
3023
- ɵɵtextInterpolate(acreedor_r3.descripcionRazonSocial);
3024
- ɵɵadvance(2);
3025
- ɵɵtextInterpolate(acreedor_r3.descripcionRfc);
3026
- ɵɵadvance(2);
3027
- ɵɵproperty("ngIf", acreedor_r3.personaMoral);
3028
- ɵɵadvance(1);
3029
- ɵɵproperty("ngIf", acreedor_r3.personaFisica);
3030
- ɵɵadvance(2);
3031
- ɵɵtextInterpolate(acreedor_r3.atrasoDiasEntrega);
3032
- ɵɵadvance(2);
3033
- ɵɵtextInterpolate(acreedor_r3.limiteCredito);
3034
- ɵɵadvance(2);
3035
- ɵɵtextInterpolate(ɵɵpipeBind2(14, 8, acreedor_r3.fechaUltimaCompra, "dd/MM/yyyy"));
3036
- } }
3037
- function SelectAcreedorComponent_ng_template_15_Template(rf, ctx) { if (rf & 1) {
3038
- ɵɵelementStart(0, "tr");
3039
- ɵɵelementStart(1, "td");
3040
- ɵɵtext(2);
3041
- ɵɵpipe(3, "translate");
3042
- ɵɵelementEnd();
3043
- ɵɵelementEnd();
3044
- } if (rf & 2) {
3045
- ɵɵadvance(1);
3046
- ɵɵattribute("colspan", 6);
3047
- ɵɵadvance(1);
3048
- ɵɵtextInterpolate(ɵɵpipeBind1(3, 2, "general.noRegistros"));
3049
- } }
3050
- var _c0$7 = function () { return [10, 25, 50, 100, 500]; };
3051
- var SelectAcreedorComponent = /** @class */ (function () {
3052
- function SelectAcreedorComponent(acreedorService, paginanateService, translate) {
3053
- this.acreedorService = acreedorService;
3054
- this.paginanateService = paginanateService;
3055
- this.translate = translate;
3056
- this.params = [];
3057
- this.ordenar = [];
3058
- this.visible = false;
3059
- this.acreedorSeleccionado = new Proveedor();
3060
- this.select = new EventEmitter();
3061
- this.translate.get('es');
3062
- }
3063
- SelectAcreedorComponent.prototype.ngOnInit = function () {
3064
- this.page = this.paginanateService.getPage();
3065
- var arg = [];
3066
- this.ordenar = this.paginanateService.getOrden(arg, 'es');
3067
- this.acreedores = [];
3068
- };
3069
- SelectAcreedorComponent.prototype.cargarDatosAcreedores = function () {
3070
- var _this = this;
3071
- this.params = this.paginanateService.getParams(this.page);
3072
- this.params.push({ param: 'estatus', value: true });
3073
- this.acreedorService.getAll(this.params).subscribe(function (data) {
3074
- _this.acreedores = data.data;
3075
- });
3076
- };
3077
- SelectAcreedorComponent.prototype.pagina = function (e) {
3078
- this.page.rows = e.rows;
3079
- this.page.offset = e.first;
3080
- this.cargarDatosAcreedores;
3081
- };
3082
- SelectAcreedorComponent.prototype.cerrarModal = function () {
3083
- this.select.emit(null);
3084
- this.visible = false;
3085
- };
3086
- SelectAcreedorComponent.prototype.seleccionarAcreedor = function (e) {
3087
- this.select.emit(e.data);
3088
- this.visible = false;
3089
- };
3090
- /** @nocollapse */ SelectAcreedorComponent.ɵfac = function SelectAcreedorComponent_Factory(t) { return new (t || SelectAcreedorComponent)(ɵɵdirectiveInject(AcreedorService), ɵɵdirectiveInject(PaginateService), ɵɵdirectiveInject(TranslateService)); };
3091
- /** @nocollapse */ SelectAcreedorComponent.ɵcmp = ɵɵdefineComponent({ type: SelectAcreedorComponent, selectors: [["select-acreedor"]], inputs: { visible: "visible", acreedorSeleccionado: "acreedorSeleccionado" }, outputs: { select: "select" }, decls: 18, vars: 14, consts: [["header", "Selecciona el acreedor", 3, "visible", "visibleChange", "onHide", "onShow"], [1, "row"], [1, "col-3"], [1, "input-group", "mt-3"], ["type", "text", "name", "filtro", 1, "form-control", 3, "placeholder", "ngModel", "ngModelChange", "keyup"], [1, "input-group-append"], ["type", "button", 1, "btn", "btn-outline-secondary", 3, "click"], [1, "fa", "fa-search"], [1, "col-md-12"], ["dataKey", "id", "selectionMode", "single", "scrollHeight", "350px", 3, "value", "selection", "scrollable", "responsive", "selectionChange", "onRowSelect"], ["pTemplate", "header"], ["pTemplate", "body"], ["pTemplate", "emptymessage"], [3, "rows", "totalRecords", "pageLinkSize", "rowsPerPageOptions", "onPageChange"], [3, "pSelectableRow"], [4, "ngIf"]], template: function SelectAcreedorComponent_Template(rf, ctx) { if (rf & 1) {
3092
- ɵɵelementStart(0, "p-dialog", 0);
3093
- ɵɵlistener("visibleChange", function SelectAcreedorComponent_Template_p_dialog_visibleChange_0_listener($event) { return ctx.visible = $event; })("onHide", function SelectAcreedorComponent_Template_p_dialog_onHide_0_listener() { return ctx.cerrarModal(); })("onShow", function SelectAcreedorComponent_Template_p_dialog_onShow_0_listener() { return ctx.cargarDatosAcreedores(); });
3094
- ɵɵelementStart(1, "div", 1);
3095
- ɵɵelementStart(2, "div", 2);
3096
- ɵɵelementStart(3, "div", 3);
3097
- ɵɵelementStart(4, "input", 4);
3098
- ɵɵlistener("ngModelChange", function SelectAcreedorComponent_Template_input_ngModelChange_4_listener($event) { return ctx.page.filtro = $event; })("keyup", function SelectAcreedorComponent_Template_input_keyup_4_listener() { return ctx.cargarDatosAcreedores(); });
3099
- ɵɵpipe(5, "translate");
3100
- ɵɵelementEnd();
3101
- ɵɵelementStart(6, "div", 5);
3102
- ɵɵelementStart(7, "button", 6);
3103
- ɵɵlistener("click", function SelectAcreedorComponent_Template_button_click_7_listener() { return ctx.cargarDatosAcreedores(); });
3104
- ɵɵelement(8, "i", 7);
3105
- ɵɵelementEnd();
3106
- ɵɵelementEnd();
3107
- ɵɵelementEnd();
3108
- ɵɵelementEnd();
3109
- ɵɵelementEnd();
3110
- ɵɵelement(9, "hr");
3111
- ɵɵelementStart(10, "div", 1);
3112
- ɵɵelementStart(11, "div", 8);
3113
- ɵɵelementStart(12, "p-table", 9);
3114
- ɵɵlistener("selectionChange", function SelectAcreedorComponent_Template_p_table_selectionChange_12_listener($event) { return ctx.acreedorSeleccionado = $event; })("onRowSelect", function SelectAcreedorComponent_Template_p_table_onRowSelect_12_listener($event) { return ctx.seleccionarAcreedor($event); });
3115
- ɵɵtemplate(13, SelectAcreedorComponent_ng_template_13_Template, 19, 18, "ng-template", 10);
3116
- ɵɵtemplate(14, SelectAcreedorComponent_ng_template_14_Template, 15, 11, "ng-template", 11);
3117
- ɵɵtemplate(15, SelectAcreedorComponent_ng_template_15_Template, 4, 4, "ng-template", 12);
3118
- ɵɵelementEnd();
3119
- ɵɵelementEnd();
3120
- ɵɵelementStart(16, "div", 8);
3121
- ɵɵelementStart(17, "p-paginator", 13);
3122
- ɵɵlistener("onPageChange", function SelectAcreedorComponent_Template_p_paginator_onPageChange_17_listener($event) { return ctx.pagina($event); });
3123
- ɵɵelementEnd();
3124
- ɵɵelementEnd();
3125
- ɵɵelementEnd();
3126
- ɵɵelementEnd();
3127
- } if (rf & 2) {
3128
- ɵɵproperty("visible", ctx.visible);
3129
- ɵɵadvance(4);
3130
- ɵɵpropertyInterpolate1("placeholder", "", ɵɵpipeBind1(5, 11, "buscar"), "...");
3131
- ɵɵproperty("ngModel", ctx.page.filtro);
3132
- ɵɵadvance(8);
3133
- ɵɵproperty("value", ctx.acreedores)("selection", ctx.acreedorSeleccionado)("scrollable", true)("responsive", true);
3134
- ɵɵadvance(5);
3135
- ɵɵproperty("rows", ctx.page.rows)("totalRecords", ctx.page.total)("pageLinkSize", 5)("rowsPerPageOptions", ɵɵpureFunction0(13, _c0$7));
3136
- } }, directives: [Dialog, DefaultValueAccessor, NgControlStatus, NgModel, Table, PrimeTemplate, Paginator, SelectableRow, NgIf], pipes: [TranslatePipe, DatePipe], encapsulation: 2 });
3137
- return SelectAcreedorComponent;
3138
- }());
3139
- /*@__PURE__*/ (function () { ɵsetClassMetadata(SelectAcreedorComponent, [{
3140
- type: Component,
3141
- args: [{
3142
- templateUrl: 'select-acreedor.component.html',
3143
- selector: 'select-acreedor'
3144
- }]
3145
- }], function () { return [{ type: AcreedorService }, { type: PaginateService }, { type: TranslateService }]; }, { visible: [{
3146
- type: Input
3147
- }], acreedorSeleccionado: [{
3148
- type: Input
3149
- }], select: [{
3150
- type: Output
3151
- }] }); })();
3152
-
3153
- var components = [
3154
- LoadingComponent,
3155
- LoadingScreenComponent,
3156
- LoginModalComponent,
3157
- PdfModalComponent,
3158
- SessionCreateComponent,
3159
- SelectClienteComponent,
3160
- SelectProveedorComponent,
3161
- SeleccionaArticuloComponent,
3162
- SelectAcreedorComponent
3163
- ];
3164
- var exportComponents = components;
3165
- var exportServices = [];
3166
- var exportModels = [];
3167
-
3168
- var primeNg = [
3169
- CardModule,
3170
- TooltipModule,
3171
- OverlayPanelModule,
3172
- RadioButtonModule,
3173
- CheckboxModule,
3174
- AutoCompleteModule,
3175
- TableModule,
3176
- TreeTableModule,
3177
- CalendarModule,
3178
- TableModule,
3179
- ButtonModule,
3180
- InputTextModule,
3181
- DropdownModule,
3182
- InputMaskModule,
3183
- MessagesModule,
3184
- MessageModule,
3185
- PaginatorModule,
3186
- ConfirmDialogModule,
3187
- ProgressBarModule,
3188
- TriStateCheckboxModule,
3189
- KeyFilterModule,
3190
- InputSwitchModule,
3191
- DialogModule,
3192
- TabViewModule,
3193
- PanelModule,
3194
- ToolbarModule,
3195
- SplitButtonModule,
3196
- FieldsetModule,
3197
- TreeModule,
3198
- TabMenuModule,
3199
- MenubarModule,
3200
- ];
3201
- var primeNgServices = [ConfirmationService];
3202
-
3203
- function HttpLoaderFactory(http) {
3204
- return new TranslateHttpLoader(http, './assets/i18n/', '.json');
3205
- }
3206
- var CoreLibModule = /** @class */ (function () {
3207
- function CoreLibModule() {
3208
- }
3209
- /** @nocollapse */ CoreLibModule.ɵmod = ɵɵdefineNgModule({ type: CoreLibModule });
3210
- /** @nocollapse */ CoreLibModule.ɵinj = ɵɵdefineInjector({ factory: function CoreLibModule_Factory(t) { return new (t || CoreLibModule)(); }, providers: [
3211
- primeNgServices,
3212
- { provide: HTTP_INTERCEPTORS, useClass: httpInterceptor, multi: true }
3213
- ], imports: [[
3214
- CommonModule,
3215
- primeNg,
3216
- FormsModule,
3217
- ToastrModule.forRoot(),
3218
- TranslateModule.forRoot({
3219
- loader: {
3220
- provide: TranslateLoader,
3221
- useFactory: HttpLoaderFactory,
3222
- deps: [HttpClient]
3223
- }
3224
- })
3225
- ]] });
3226
- return CoreLibModule;
3227
- }());
3228
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(CoreLibModule, { declarations: [Error404Component, LoadingComponent, LoadingScreenComponent, LoginModalComponent, PdfModalComponent, SessionCreateComponent, SelectClienteComponent, SelectProveedorComponent, SeleccionaArticuloComponent, SelectAcreedorComponent, CclistaComponent, CcseleccionDialogComponent, SeleccionArticuloInformacionComponent], imports: [CommonModule, CardModule, TooltipModule, OverlayPanelModule, RadioButtonModule, CheckboxModule, AutoCompleteModule, TableModule, TreeTableModule, CalendarModule, TableModule, ButtonModule, InputTextModule, DropdownModule, InputMaskModule, MessagesModule, MessageModule, PaginatorModule, ConfirmDialogModule, ProgressBarModule, TriStateCheckboxModule, KeyFilterModule, InputSwitchModule, DialogModule, TabViewModule, PanelModule, ToolbarModule, SplitButtonModule, FieldsetModule, TreeModule, TabMenuModule, MenubarModule, FormsModule, ToastrModule, TranslateModule], exports: [LoadingComponent, LoadingScreenComponent, LoginModalComponent, PdfModalComponent, SessionCreateComponent, SelectClienteComponent, SelectProveedorComponent, SeleccionaArticuloComponent, SelectAcreedorComponent, CclistaComponent, CcseleccionDialogComponent] }); })();
3229
- /*@__PURE__*/ (function () { ɵsetClassMetadata(CoreLibModule, [{
3230
- type: NgModule,
3231
- args: [{
3232
- declarations: [
3233
- Error404Component,
3234
- components,
3235
- contaComponents,
3236
- SeleccionArticuloInformacionComponent
3237
- ],
3238
- imports: [
3239
- CommonModule,
3240
- primeNg,
3241
- FormsModule,
3242
- ToastrModule.forRoot(),
3243
- TranslateModule.forRoot({
3244
- loader: {
3245
- provide: TranslateLoader,
3246
- useFactory: HttpLoaderFactory,
3247
- deps: [HttpClient]
3248
- }
3249
- })
3250
- ],
3251
- providers: [
3252
- primeNgServices,
3253
- { provide: HTTP_INTERCEPTORS, useClass: httpInterceptor, multi: true }
3254
- ],
3255
- exports: [components, contaComponents]
3256
- }]
3257
- }], null, null); })();
3258
-
3259
- var ControlAccesoService = /** @class */ (function () {
3260
- function ControlAccesoService(authService) {
3261
- this.authService = authService;
3262
- this.cambioAcciones = new EventEmitter();
3263
- this.changeDetalleUsuario = new EventEmitter();
3264
- }
3265
- ControlAccesoService.prototype.set = function (detallesUsuarios) {
3266
- this.detallesUsuarios = detallesUsuarios;
3267
- this.changeDetalleUsuario.emit(this.detallesUsuarios);
3268
- };
3269
- ControlAccesoService.prototype.canActivete = function (rols) {
3270
- var permiso = false;
3271
- var user = this.authService.getUser();
3272
- if (!user)
3273
- false;
3274
- var _loop_1 = function (index) {
3275
- if (permiso)
3276
- return { value: permiso };
3277
- var grupoPermisos = user.roles.filter(function (permiso) {
3278
- return permiso === rols[index];
3279
- });
3280
- permiso = grupoPermisos.length > 0;
3281
- };
3282
- for (var index = 0; index < rols.length; index++) {
3283
- var state_1 = _loop_1(index);
3284
- if (typeof state_1 === "object")
3285
- return state_1.value;
3286
- }
3287
- return permiso;
3288
- };
3289
- /** @nocollapse */ ControlAccesoService.ɵfac = function ControlAccesoService_Factory(t) { return new (t || ControlAccesoService)(ɵɵinject(AuthService)); };
3290
- /** @nocollapse */ ControlAccesoService.ɵprov = ɵɵdefineInjectable({ token: ControlAccesoService, factory: ControlAccesoService.ɵfac, providedIn: 'root' });
3291
- return ControlAccesoService;
3292
- }());
3293
- /*@__PURE__*/ (function () { ɵsetClassMetadata(ControlAccesoService, [{
3294
- type: Injectable,
3295
- args: [{
3296
- providedIn: 'root'
3297
- }]
3298
- }], function () { return [{ type: AuthService }]; }, { cambioAcciones: [{
3299
- type: Output
3300
- }], changeDetalleUsuario: [{
3301
- type: Output
3302
- }] }); })();
3303
-
3304
- var InitService = /** @class */ (function () {
3305
- function InitService(http, authService) {
3306
- this.http = http;
3307
- this.authService = authService;
3308
- }
3309
- InitService.prototype.initConfig = function () {
3310
- this.http.get('assets/config.json').subscribe(function (data) {
3311
- localStorage.setItem("config", JSON.stringify(data));
3312
- });
3313
- this.http.get('assets/version.json')
3314
- //.first()
3315
- .subscribe(function (response) {
3316
- localStorage.removeItem('version');
3317
- localStorage.setItem('version', response.hash);
3318
- });
3319
- };
3320
- InitService.prototype.cargaConfig = function () {
3321
- var _this = this;
3322
- this.http.get('assets/config.json').subscribe(function (data) {
3323
- localStorage.setItem("config", JSON.stringify(data));
3324
- var url = data.url;
3325
- _this.http.post(url + '/login', { username: 'admin', password: 'admin' }).subscribe(function (data) {
3326
- localStorage.setItem('usuario', JSON.stringify(data));
3327
- var httpOptions = {
3328
- headers: new HttpHeaders({
3329
- 'Accept-type': 'application/json',
3330
- 'Authorization': data.token_type + ' ' + data.access_token
3331
- })
3332
- };
3333
- _this.http.get(url + '/usuario/obtieneUsuarioActual', httpOptions).subscribe(function (dat) {
3334
- var empresaAdmin = dat.empresas[0];
3335
- _this.authService.setEmpresa(empresaAdmin).subscribe();
3336
- });
3337
- });
3338
- });
3339
- };
3340
- /** @nocollapse */ InitService.ɵfac = function InitService_Factory(t) { return new (t || InitService)(ɵɵinject(HttpClient), ɵɵinject(AuthService)); };
3341
- /** @nocollapse */ InitService.ɵprov = ɵɵdefineInjectable({ token: InitService, factory: InitService.ɵfac, providedIn: 'root' });
3342
- return InitService;
3343
- }());
3344
- /*@__PURE__*/ (function () { ɵsetClassMetadata(InitService, [{
3345
- type: Injectable,
3346
- args: [{
3347
- providedIn: 'root'
3348
- }]
3349
- }], function () { return [{ type: HttpClient }, { type: AuthService }]; }, null); })();
3350
-
3351
- var MessageService = /** @class */ (function () {
3352
- function MessageService(toastr) {
3353
- this.toastr = toastr;
3354
- }
3355
- MessageService.prototype.deployMessage = function (tipo, titulo, msg) {
3356
- if (tipo === void 0) { tipo = null; }
3357
- switch (tipo) {
3358
- case "success":
3359
- {
3360
- this.toastr.success(msg, titulo, {
3361
- timeOut: 3000
3362
- });
3363
- }
3364
- break;
3365
- case "info":
3366
- {
3367
- this.toastr.info(msg, titulo, {
3368
- timeOut: 3000,
3369
- });
3370
- }
3371
- break;
3372
- case "warning":
3373
- {
3374
- this.toastr.warning(msg, titulo, {
3375
- timeOut: 3000
3376
- });
3377
- }
3378
- break;
3379
- case "error":
3380
- {
3381
- this.toastr.error(msg, titulo, {
3382
- timeOut: 3000
3383
- });
3384
- }
3385
- break;
3386
- case null:
3387
- {
3388
- this.toastr.success(msg, titulo, {
3389
- timeOut: 3000
3390
- });
3391
- }
3392
- break;
3393
- }
3394
- };
3395
- MessageService.prototype.success = function (msg) {
3396
- var msgs = [];
3397
- msgs.push({ severity: 'success', summary: 'Exito', detail: '' + msg });
3398
- return msgs;
3399
- };
3400
- MessageService.prototype.error = function (error) {
3401
- var msgs = [];
3402
- if (error) {
3403
- if (error.error) {
3404
- error = error.error;
3405
- if (error.error)
3406
- for (var i = 0; i < (error.error).length; i++) {
3407
- msgs.push({ severity: 'error', summary: 'Error', detail: '' + error.error[i].message });
3408
- }
3409
- }
3410
- }
3411
- else {
3412
- if (error.mensaje)
3413
- msgs.push({ severity: 'error', summary: 'Error', detail: '' + error.mensaje });
3414
- }
3415
- return msgs;
3416
- };
3417
- /** @nocollapse */ MessageService.ɵfac = function MessageService_Factory(t) { return new (t || MessageService)(ɵɵinject(ToastrService)); };
3418
- /** @nocollapse */ MessageService.ɵprov = ɵɵdefineInjectable({ token: MessageService, factory: MessageService.ɵfac, providedIn: 'root' });
3419
- return MessageService;
3420
- }());
3421
- /*@__PURE__*/ (function () { ɵsetClassMetadata(MessageService, [{
3422
- type: Injectable,
3423
- args: [{
3424
- providedIn: 'root'
3425
- }]
3426
- }], function () { return [{ type: ToastrService }]; }, null); })();
3427
-
3428
- var PersonaMoralService = /** @class */ (function (_super) {
3429
- __extends(PersonaMoralService, _super);
3430
- function PersonaMoralService(http) {
3431
- return _super.call(this, http, '/personaMoral') || this;
3432
- }
3433
- /** @nocollapse */ PersonaMoralService.ɵfac = function PersonaMoralService_Factory(t) { return new (t || PersonaMoralService)(ɵɵinject(HttpClient)); };
3434
- /** @nocollapse */ PersonaMoralService.ɵprov = ɵɵdefineInjectable({ token: PersonaMoralService, factory: PersonaMoralService.ɵfac, providedIn: 'root' });
3435
- return PersonaMoralService;
3436
- }(CrudService));
3437
- /*@__PURE__*/ (function () { ɵsetClassMetadata(PersonaMoralService, [{
3438
- type: Injectable,
3439
- args: [{
3440
- providedIn: 'root'
3441
- }]
3442
- }], function () { return [{ type: HttpClient }]; }, null); })();
3443
-
3444
- var CanActivateGuard = /** @class */ (function () {
3445
- function CanActivateGuard(controlAccesoService) {
3446
- this.controlAccesoService = controlAccesoService;
3447
- this.rol = '';
3448
- this.method = '';
3449
- }
3450
- CanActivateGuard.prototype.canActivate = function () {
3451
- return this.controlAccesoService.canActivete([this.rol]);
3452
- };
3453
- CanActivateGuard.prototype.permisos = function (rol) {
3454
- this.rol = rol;
3455
- };
3456
- /** @nocollapse */ CanActivateGuard.ɵfac = function CanActivateGuard_Factory(t) { return new (t || CanActivateGuard)(ɵɵinject(ControlAccesoService)); };
3457
- /** @nocollapse */ CanActivateGuard.ɵprov = ɵɵdefineInjectable({ token: CanActivateGuard, factory: CanActivateGuard.ɵfac, providedIn: 'root' });
3458
- return CanActivateGuard;
3459
- }());
3460
- /*@__PURE__*/ (function () { ɵsetClassMetadata(CanActivateGuard, [{
3461
- type: Injectable,
3462
- args: [{
3463
- providedIn: 'root'
3464
- }]
3465
- }], function () { return [{ type: ControlAccesoService }]; }, null); })();
3466
-
3467
- var CatalogoAdicionalService = /** @class */ (function (_super) {
3468
- __extends(CatalogoAdicionalService, _super);
3469
- function CatalogoAdicionalService(httpClient) {
3470
- var _this = _super.call(this, httpClient, 'catalogoAdicional') || this;
3471
- _this.httpClient = httpClient;
3472
- return _this;
3473
- }
3474
- /** @nocollapse */ CatalogoAdicionalService.ɵfac = function CatalogoAdicionalService_Factory(t) { return new (t || CatalogoAdicionalService)(ɵɵinject(HttpClient)); };
3475
- /** @nocollapse */ CatalogoAdicionalService.ɵprov = ɵɵdefineInjectable({ token: CatalogoAdicionalService, factory: CatalogoAdicionalService.ɵfac, providedIn: 'root' });
3476
- return CatalogoAdicionalService;
3477
- }(CrudService));
3478
- /*@__PURE__*/ (function () { ɵsetClassMetadata(CatalogoAdicionalService, [{
3479
- type: Injectable,
3480
- args: [{
3481
- providedIn: 'root'
3482
- }]
3483
- }], function () { return [{ type: HttpClient }]; }, null); })();
3484
-
3485
- var Authenticated = /** @class */ (function () {
3486
- function Authenticated(authService, controlAccesoService, router) {
3487
- this.authService = authService;
3488
- this.controlAccesoService = controlAccesoService;
3489
- this.router = router;
3490
- }
3491
- Authenticated.prototype.load = function (modulo) {
3492
- var _this = this;
3493
- var usuario = this.authService.getUser();
3494
- if (usuario) {
3495
- this.authService.getDetalsUser().subscribe(function (resp) {
3496
- var roles = resp.roles;
3497
- for (var index = 0; index < roles.length; index++) {
3498
- if (roles[index].authority === "ROLE_CLIENTE") {
3499
- //this.regresaAlprincipal('/administrativo/movimientos/ventaRapida/create')
3500
- _this.router.navigate(['movimientos/ventaRapida/create']);
3501
- }
3502
- }
3503
- if (!resp.empresa) {
3504
- _this.regresaAlprincipal(undefined);
3505
- }
3506
- _this.controlAccesoService.detallesUsuarios = resp;
3507
- _this.controlAccesoService.cambioAcciones.emit(true);
3508
- return true;
3509
- /*
3510
- if (resp.moduloAccesoActual) {
3511
- if (resp.moduloAccesoActual.descripcion === modulo) {
3512
- this.controlAccesoService.detallesUsuarios = resp;
3513
- this.controlAccesoService.cambioAcciones.emit(true);
3514
- return true;
3515
- } else {
3516
- this.regresaAlprincipal(resp.moduloAccesoActual.urlInicial);
3517
- }
3518
- } else {
3519
- this.regresaAlprincipal(undefined);
3520
- }
3521
-
3522
- */
3523
- }, function (error) {
3524
- _this.regresaAlprincipal(undefined);
3525
- });
3526
- }
3527
- else {
3528
- this.regresaAlprincipal(undefined);
3529
- }
3530
- return false;
3531
- };
3532
- Authenticated.prototype.regresaAlprincipal = function (url) {
3533
- var config = JSON.parse(localStorage.getItem("config"));
3534
- var host = "";
3535
- if (config) {
3536
- if (config.host) {
3537
- host = config.host;
3538
- }
3539
- }
3540
- if (url) {
3541
- host = host + url;
3542
- }
3543
- window.location.href = host;
3544
- };
3545
- /** @nocollapse */ Authenticated.ɵfac = function Authenticated_Factory(t) { return new (t || Authenticated)(ɵɵinject(AuthService), ɵɵinject(ControlAccesoService), ɵɵinject(Router)); };
3546
- /** @nocollapse */ Authenticated.ɵprov = ɵɵdefineInjectable({ token: Authenticated, factory: Authenticated.ɵfac, providedIn: 'root' });
3547
- return Authenticated;
3548
- }());
3549
- /*@__PURE__*/ (function () { ɵsetClassMetadata(Authenticated, [{
3550
- type: Injectable,
3551
- args: [{
3552
- providedIn: 'root'
3553
- }]
3554
- }], function () { return [{ type: AuthService }, { type: ControlAccesoService }, { type: Router }]; }, null); })();
3555
-
3556
- var VersionCheckService = /** @class */ (function () {
3557
- function VersionCheckService(http) {
3558
- this.http = http;
3559
- this.currentHash = '{{POST_BUILD_ENTERS_HASH_HERE}}';
3560
- this.versionado = false;
3561
- this.frequency = 1000 * 60 * 180;
3562
- }
3563
- VersionCheckService.prototype.initVersionCheck = function () {
3564
- var _this = this;
3565
- setInterval(function () {
3566
- _this.checkVersion();
3567
- }, this.frequency);
3568
- };
3569
- VersionCheckService.prototype.checkVersion = function () {
3570
- var _this = this;
3571
- this.http.get('assets/version.json' + '?t=' + new Date().getTime())
3572
- .subscribe(function (response) {
3573
- var hash = response.hash;
3574
- _this.currentHash = localStorage.getItem("version");
3575
- var hashChanged = _this.hasHashChanged(_this.currentHash, hash);
3576
- if (!hashChanged && !_this.versionado) {
3577
- _this.versionado = true;
3578
- if (confirm("Está disponible una actualización de Visorus ERP. El sistema se reiniciara para descargar los nuevos cambios.")) {
3579
- location.reload(true);
3580
- _this.versionado = false;
3581
- }
3582
- else {
3583
- _this.versionado = false;
3584
- }
3585
- }
3586
- }, function (err) {
3587
- console.error(err, 'No se pudo obtener versión de software');
3588
- });
3589
- };
3590
- VersionCheckService.prototype.hasHashChanged = function (currentHash, newHash) {
3591
- if (!currentHash || currentHash === '{{POST_BUILD_ENTERS_HASH_HERE}}') {
3592
- return false;
3593
- }
3594
- return currentHash === newHash;
3595
- };
3596
- /** @nocollapse */ VersionCheckService.ɵfac = function VersionCheckService_Factory(t) { return new (t || VersionCheckService)(ɵɵinject(HttpClient)); };
3597
- /** @nocollapse */ VersionCheckService.ɵprov = ɵɵdefineInjectable({ token: VersionCheckService, factory: VersionCheckService.ɵfac, providedIn: 'root' });
3598
- return VersionCheckService;
3599
- }());
3600
- /*@__PURE__*/ (function () { ɵsetClassMetadata(VersionCheckService, [{
3601
- type: Injectable,
3602
- args: [{
3603
- providedIn: 'root'
3604
- }]
3605
- }], function () { return [{ type: HttpClient }]; }, null); })();
3606
-
3607
- var AgenteService = /** @class */ (function (_super) {
3608
- __extends(AgenteService, _super);
3609
- function AgenteService(httpClient) {
3610
- var _this = _super.call(this, httpClient, 'agente') || this;
3611
- _this.httpClient = httpClient;
3612
- return _this;
3613
- }
3614
- AgenteService.prototype.saveUsuarioAgente = function (usuario) {
3615
- var url = this.getUrl('agente') + '/usuario';
3616
- return this.getHttp().post(url, usuario, this.buildAuth());
3617
- };
3618
- AgenteService.prototype.getUsuarioAgente = function (id) {
3619
- var url = this.getUrl('agente') + '/usuario/' + id;
3620
- return this.getHttp().get(url, this.buildAuth());
3621
- };
3622
- AgenteService.prototype.obtenerAgenteEmpresa = function () {
3623
- var url = this.geturl() + '/obtenerAgenteEmpresa';
3624
- return this.getHttp().get(url, this.buildAuth());
3625
- };
3626
- /** @nocollapse */ AgenteService.ɵfac = function AgenteService_Factory(t) { return new (t || AgenteService)(ɵɵinject(HttpClient)); };
3627
- /** @nocollapse */ AgenteService.ɵprov = ɵɵdefineInjectable({ token: AgenteService, factory: AgenteService.ɵfac, providedIn: 'root' });
3628
- return AgenteService;
3629
- }(CrudService));
3630
- /*@__PURE__*/ (function () { ɵsetClassMetadata(AgenteService, [{
3631
- type: Injectable,
3632
- args: [{
3633
- providedIn: 'root'
3634
- }]
3635
- }], function () { return [{ type: HttpClient }]; }, null); })();
3636
-
3637
- var Almacen = /** @class */ (function () {
3638
- function Almacen() {
3639
- }
3640
- return Almacen;
3641
- }());
3642
-
3643
- var DatoDireccion = /** @class */ (function () {
3644
- function DatoDireccion() {
3645
- }
3646
- return DatoDireccion;
3647
- }());
3648
-
3649
- var Banco = /** @class */ (function () {
3650
- function Banco() {
3651
- this.datoDireccion = new DatoDireccion();
3652
- }
3653
- return Banco;
3654
- }());
3655
-
3656
- var BancoService = /** @class */ (function (_super) {
3657
- __extends(BancoService, _super);
3658
- function BancoService(http) {
3659
- return _super.call(this, http, '/banco') || this;
3660
- }
3661
- /** @nocollapse */ BancoService.ɵfac = function BancoService_Factory(t) { return new (t || BancoService)(ɵɵinject(HttpClient)); };
3662
- /** @nocollapse */ BancoService.ɵprov = ɵɵdefineInjectable({ token: BancoService, factory: BancoService.ɵfac, providedIn: 'root' });
3663
- return BancoService;
3664
- }(CrudService));
3665
- /*@__PURE__*/ (function () { ɵsetClassMetadata(BancoService, [{
3666
- type: Injectable,
3667
- args: [{
3668
- providedIn: 'root'
3669
- }]
3670
- }], function () { return [{ type: HttpClient }]; }, null); })();
3671
-
3672
- var CatalogoTipo = /** @class */ (function () {
3673
- function CatalogoTipo() {
3674
- }
3675
- return CatalogoTipo;
3676
- }());
3677
-
3678
- var CatalogoTipoService = /** @class */ (function (_super) {
3679
- __extends(CatalogoTipoService, _super);
3680
- function CatalogoTipoService(htt) {
3681
- return _super.call(this, htt, '/catalogoTipo') || this;
3682
- }
3683
- /** @nocollapse */ CatalogoTipoService.ɵfac = function CatalogoTipoService_Factory(t) { return new (t || CatalogoTipoService)(ɵɵinject(HttpClient)); };
3684
- /** @nocollapse */ CatalogoTipoService.ɵprov = ɵɵdefineInjectable({ token: CatalogoTipoService, factory: CatalogoTipoService.ɵfac, providedIn: 'root' });
3685
- return CatalogoTipoService;
3686
- }(CrudService));
3687
- /*@__PURE__*/ (function () { ɵsetClassMetadata(CatalogoTipoService, [{
3688
- type: Injectable,
3689
- args: [{
3690
- providedIn: 'root'
3691
- }]
3692
- }], function () { return [{ type: HttpClient }]; }, null); })();
3693
-
3694
- var ClasificadorTipoService = /** @class */ (function (_super) {
3695
- __extends(ClasificadorTipoService, _super);
3696
- function ClasificadorTipoService(http) {
3697
- return _super.call(this, http, '/clasificadorTipo') || this;
3698
- }
3699
- /** @nocollapse */ ClasificadorTipoService.ɵfac = function ClasificadorTipoService_Factory(t) { return new (t || ClasificadorTipoService)(ɵɵinject(HttpClient)); };
3700
- /** @nocollapse */ ClasificadorTipoService.ɵprov = ɵɵdefineInjectable({ token: ClasificadorTipoService, factory: ClasificadorTipoService.ɵfac, providedIn: 'root' });
3701
- return ClasificadorTipoService;
3702
- }(CrudService));
3703
- /*@__PURE__*/ (function () { ɵsetClassMetadata(ClasificadorTipoService, [{
3704
- type: Injectable,
3705
- args: [{
3706
- providedIn: 'root'
3707
- }]
3708
- }], function () { return [{ type: HttpClient }]; }, null); })();
3709
-
3710
- var ClaveMovimiento = /** @class */ (function () {
3711
- function ClaveMovimiento() {
3712
- }
3713
- return ClaveMovimiento;
3714
- }());
3715
-
3716
- var ClaveMovimientoService = /** @class */ (function (_super) {
3717
- __extends(ClaveMovimientoService, _super);
3718
- function ClaveMovimientoService(http) {
3719
- return _super.call(this, http, 'claveMovimiento') || this;
3720
- }
3721
- /** @nocollapse */ ClaveMovimientoService.ɵfac = function ClaveMovimientoService_Factory(t) { return new (t || ClaveMovimientoService)(ɵɵinject(HttpClient)); };
3722
- /** @nocollapse */ ClaveMovimientoService.ɵprov = ɵɵdefineInjectable({ token: ClaveMovimientoService, factory: ClaveMovimientoService.ɵfac, providedIn: 'root' });
3723
- return ClaveMovimientoService;
3724
- }(CrudService));
3725
- /*@__PURE__*/ (function () { ɵsetClassMetadata(ClaveMovimientoService, [{
3726
- type: Injectable,
3727
- args: [{
3728
- providedIn: 'root'
3729
- }]
3730
- }], function () { return [{ type: HttpClient }]; }, null); })();
3731
-
3732
- var ClienteCuentaBanco = /** @class */ (function () {
3733
- function ClienteCuentaBanco() {
3734
- this.banco = new Banco();
3735
- this.estatus = true;
3736
- }
3737
- return ClienteCuentaBanco;
3738
- }());
3739
-
3740
- var Flete = /** @class */ (function () {
3741
- function Flete() {
3742
- }
3743
- return Flete;
3744
- }());
3745
-
3746
- var ClienteFlete = /** @class */ (function () {
3747
- function ClienteFlete() {
3748
- this.cliente = new Cliente();
3749
- this.flete = new Flete();
3750
- this.estatus = true;
3751
- }
3752
- return ClienteFlete;
3753
- }());
3754
-
3755
- var ClienteCuentaBancoService = /** @class */ (function (_super) {
3756
- __extends(ClienteCuentaBancoService, _super);
3757
- function ClienteCuentaBancoService(httpClient) {
3758
- var _this = _super.call(this, httpClient, '/clienteCuentaBanco') || this;
3759
- _this.httpClient = httpClient;
3760
- return _this;
3761
- }
3762
- ClienteCuentaBancoService.prototype.saveAll = function (params) {
3763
- var p = { 'cuentas': params };
3764
- return this.httpClient.post(this.geturl(), p, this.buildAuth());
3765
- };
3766
- /** @nocollapse */ ClienteCuentaBancoService.ɵfac = function ClienteCuentaBancoService_Factory(t) { return new (t || ClienteCuentaBancoService)(ɵɵinject(HttpClient)); };
3767
- /** @nocollapse */ ClienteCuentaBancoService.ɵprov = ɵɵdefineInjectable({ token: ClienteCuentaBancoService, factory: ClienteCuentaBancoService.ɵfac, providedIn: 'root' });
3768
- return ClienteCuentaBancoService;
3769
- }(CrudService));
3770
- /*@__PURE__*/ (function () { ɵsetClassMetadata(ClienteCuentaBancoService, [{
3771
- type: Injectable,
3772
- args: [{
3773
- providedIn: 'root'
3774
- }]
3775
- }], function () { return [{ type: HttpClient }]; }, null); })();
3776
-
3777
- var ClienteFleteService = /** @class */ (function (_super) {
3778
- __extends(ClienteFleteService, _super);
3779
- function ClienteFleteService(httpClient) {
3780
- var _this = _super.call(this, httpClient, '/clienteFlete') || this;
3781
- _this.httpClient = httpClient;
3782
- return _this;
3783
- }
3784
- ClienteFleteService.prototype.saveAll = function (p) {
3785
- var params = { fletes: p };
3786
- return this.save(params);
3787
- };
3788
- /** @nocollapse */ ClienteFleteService.ɵfac = function ClienteFleteService_Factory(t) { return new (t || ClienteFleteService)(ɵɵinject(HttpClient)); };
3789
- /** @nocollapse */ ClienteFleteService.ɵprov = ɵɵdefineInjectable({ token: ClienteFleteService, factory: ClienteFleteService.ɵfac, providedIn: 'root' });
3790
- return ClienteFleteService;
3791
- }(CrudService));
3792
- /*@__PURE__*/ (function () { ɵsetClassMetadata(ClienteFleteService, [{
3793
- type: Injectable,
3794
- args: [{
3795
- providedIn: 'root'
3796
- }]
3797
- }], function () { return [{ type: HttpClient }]; }, null); })();
3798
-
3799
- var TipoContacto = /** @class */ (function () {
3800
- function TipoContacto() {
3801
- this.estatus = true;
3802
- }
3803
- return TipoContacto;
3804
- }());
3805
-
3806
- var DatoContacto = /** @class */ (function () {
3807
- function DatoContacto() {
3808
- this.tipoContacto = new TipoContacto();
3809
- }
3810
- return DatoContacto;
3811
- }());
3812
-
3813
- var DatoContactoService = /** @class */ (function (_super) {
3814
- __extends(DatoContactoService, _super);
3815
- function DatoContactoService(http) {
3816
- return _super.call(this, http, '/contacto') || this;
3817
- }
3818
- /** @nocollapse */ DatoContactoService.ɵfac = function DatoContactoService_Factory(t) { return new (t || DatoContactoService)(ɵɵinject(HttpClient)); };
3819
- /** @nocollapse */ DatoContactoService.ɵprov = ɵɵdefineInjectable({ token: DatoContactoService, factory: DatoContactoService.ɵfac, providedIn: 'root' });
3820
- return DatoContactoService;
3821
- }(CrudService));
3822
- /*@__PURE__*/ (function () { ɵsetClassMetadata(DatoContactoService, [{
3823
- type: Injectable,
3824
- args: [{
3825
- providedIn: 'root'
3826
- }]
3827
- }], function () { return [{ type: HttpClient }]; }, null); })();
3828
-
3829
- var DatoDireccionService = /** @class */ (function (_super) {
3830
- __extends(DatoDireccionService, _super);
3831
- function DatoDireccionService(http) {
3832
- return _super.call(this, http, '/datoDireccion') || this;
3833
- }
3834
- /** @nocollapse */ DatoDireccionService.ɵfac = function DatoDireccionService_Factory(t) { return new (t || DatoDireccionService)(ɵɵinject(HttpClient)); };
3835
- /** @nocollapse */ DatoDireccionService.ɵprov = ɵɵdefineInjectable({ token: DatoDireccionService, factory: DatoDireccionService.ɵfac, providedIn: 'root' });
3836
- return DatoDireccionService;
3837
- }(CrudService));
3838
- /*@__PURE__*/ (function () { ɵsetClassMetadata(DatoDireccionService, [{
3839
- type: Injectable,
3840
- args: [{
3841
- providedIn: 'root'
3842
- }]
3843
- }], function () { return [{ type: HttpClient }]; }, null); })();
3844
-
3845
- var Departamento = /** @class */ (function () {
3846
- function Departamento() {
3847
- }
3848
- return Departamento;
3849
- }());
3850
-
3851
- var DepartamentoService = /** @class */ (function (_super) {
3852
- __extends(DepartamentoService, _super);
3853
- function DepartamentoService(http) {
3854
- return _super.call(this, http, '/departamento') || this;
3855
- }
3856
- /** @nocollapse */ DepartamentoService.ɵfac = function DepartamentoService_Factory(t) { return new (t || DepartamentoService)(ɵɵinject(HttpClient)); };
3857
- /** @nocollapse */ DepartamentoService.ɵprov = ɵɵdefineInjectable({ token: DepartamentoService, factory: DepartamentoService.ɵfac, providedIn: 'root' });
3858
- return DepartamentoService;
3859
- }(CrudService));
3860
- /*@__PURE__*/ (function () { ɵsetClassMetadata(DepartamentoService, [{
3861
- type: Injectable,
3862
- args: [{
3863
- providedIn: 'root'
3864
- }]
3865
- }], function () { return [{ type: HttpClient }]; }, null); })();
3866
-
3867
- var FormaPago = /** @class */ (function () {
3868
- function FormaPago() {
3869
- }
3870
- return FormaPago;
3871
- }());
3872
-
3873
- var Empresa = /** @class */ (function () {
3874
- function Empresa() {
3875
- this.datoDireccion = new DatoDireccion();
3876
- this.personaMoral = new PersonaMoral();
3877
- this.claveFormaPagoEfectivo = new FormaPago();
3878
- }
3879
- return Empresa;
3880
- }());
3881
-
3882
- var ConfiguracionEmpresaAdministrativa = /** @class */ (function () {
3883
- function ConfiguracionEmpresaAdministrativa() {
3884
- this.empresa = new Empresa();
3885
- }
3886
- return ConfiguracionEmpresaAdministrativa;
3887
- }());
3888
-
3889
- var EmpresaService = /** @class */ (function (_super) {
3890
- __extends(EmpresaService, _super);
3891
- function EmpresaService(httpClient) {
3892
- var _this = _super.call(this, httpClient, '/empresa') || this;
3893
- _this.httpClient = httpClient;
3894
- return _this;
3895
- }
3896
- EmpresaService.prototype.get = function () {
3897
- // return super.get(1);
3898
- return this.httpClient.get(this.getBaseUrl() + '/configuracionEmpresaAdministrativo/configuracionUsuario', this.buildAuth());
3899
- };
3900
- /** @nocollapse */ EmpresaService.ɵfac = function EmpresaService_Factory(t) { return new (t || EmpresaService)(ɵɵinject(HttpClient)); };
3901
- /** @nocollapse */ EmpresaService.ɵprov = ɵɵdefineInjectable({ token: EmpresaService, factory: EmpresaService.ɵfac, providedIn: 'root' });
3902
- return EmpresaService;
3903
- }(CrudService));
3904
- /*@__PURE__*/ (function () { ɵsetClassMetadata(EmpresaService, [{
3905
- type: Injectable,
3906
- args: [{
3907
- providedIn: 'root'
3908
- }]
3909
- }], function () { return [{ type: HttpClient }]; }, null); })();
3910
-
3911
- var FleteService = /** @class */ (function (_super) {
3912
- __extends(FleteService, _super);
3913
- function FleteService(httpClient) {
3914
- var _this = _super.call(this, httpClient, '/flete') || this;
3915
- _this.httpClient = httpClient;
3916
- return _this;
3917
- }
3918
- /** @nocollapse */ FleteService.ɵfac = function FleteService_Factory(t) { return new (t || FleteService)(ɵɵinject(HttpClient)); };
3919
- /** @nocollapse */ FleteService.ɵprov = ɵɵdefineInjectable({ token: FleteService, factory: FleteService.ɵfac, providedIn: 'root' });
3920
- return FleteService;
3921
- }(CrudService));
3922
- /*@__PURE__*/ (function () { ɵsetClassMetadata(FleteService, [{
3923
- type: Injectable,
3924
- args: [{
3925
- providedIn: 'root'
3926
- }]
3927
- }], function () { return [{ type: HttpClient }]; }, null); })();
3928
-
3929
- var FormaPagoService = /** @class */ (function (_super) {
3930
- __extends(FormaPagoService, _super);
3931
- function FormaPagoService(http) {
3932
- return _super.call(this, http, '/FormaDePago') || this;
3933
- }
3934
- /** @nocollapse */ FormaPagoService.ɵfac = function FormaPagoService_Factory(t) { return new (t || FormaPagoService)(ɵɵinject(HttpClient)); };
3935
- /** @nocollapse */ FormaPagoService.ɵprov = ɵɵdefineInjectable({ token: FormaPagoService, factory: FormaPagoService.ɵfac, providedIn: "root" });
3936
- return FormaPagoService;
3937
- }(CrudService));
3938
- /*@__PURE__*/ (function () { ɵsetClassMetadata(FormaPagoService, [{
3939
- type: Injectable,
3940
- args: [{
3941
- providedIn: "root"
3942
- }]
3943
- }], function () { return [{ type: HttpClient }]; }, null); })();
3944
-
3945
- var Moneda = /** @class */ (function () {
3946
- function Moneda() {
3947
- }
3948
- return Moneda;
3949
- }());
3950
-
3951
- var MonedaService = /** @class */ (function (_super) {
3952
- __extends(MonedaService, _super);
3953
- function MonedaService(httpClient) {
3954
- var _this = _super.call(this, httpClient, '/moneda') || this;
3955
- _this.httpClient = httpClient;
3956
- return _this;
3957
- }
3958
- /** @nocollapse */ MonedaService.ɵfac = function MonedaService_Factory(t) { return new (t || MonedaService)(ɵɵinject(HttpClient)); };
3959
- /** @nocollapse */ MonedaService.ɵprov = ɵɵdefineInjectable({ token: MonedaService, factory: MonedaService.ɵfac, providedIn: 'root' });
3960
- return MonedaService;
3961
- }(CrudService));
3962
- /*@__PURE__*/ (function () { ɵsetClassMetadata(MonedaService, [{
3963
- type: Injectable,
3964
- args: [{
3965
- providedIn: 'root'
3966
- }]
3967
- }], function () { return [{ type: HttpClient }]; }, null); })();
3968
-
3969
- var EstadoCivil = /** @class */ (function () {
3970
- function EstadoCivil() {
3971
- }
3972
- return EstadoCivil;
3973
- }());
3974
-
3975
- var Genero = /** @class */ (function () {
3976
- function Genero() {
3977
- }
3978
- return Genero;
3979
- }());
3980
-
3981
- var PersonaFisicaService = /** @class */ (function (_super) {
3982
- __extends(PersonaFisicaService, _super);
3983
- function PersonaFisicaService(httpClient) {
3984
- var _this = _super.call(this, httpClient, '/PersonaFisica') || this;
3985
- _this.httpClient = httpClient;
3986
- return _this;
3987
- }
3988
- PersonaFisicaService.prototype.getGeneros = function () {
3989
- return this.httpClient.get(this.getBaseUrl() + '/genero', this.buildAuth());
3990
- };
3991
- PersonaFisicaService.prototype.getEstadoCivil = function () {
3992
- return this.httpClient.get(this.getBaseUrl() + '/estadoCivil', this.buildAuth());
3993
- };
3994
- /** @nocollapse */ PersonaFisicaService.ɵfac = function PersonaFisicaService_Factory(t) { return new (t || PersonaFisicaService)(ɵɵinject(HttpClient)); };
3995
- /** @nocollapse */ PersonaFisicaService.ɵprov = ɵɵdefineInjectable({ token: PersonaFisicaService, factory: PersonaFisicaService.ɵfac, providedIn: "root" });
3996
- return PersonaFisicaService;
3997
- }(CrudService));
3998
- /*@__PURE__*/ (function () { ɵsetClassMetadata(PersonaFisicaService, [{
3999
- type: Injectable,
4000
- args: [{
4001
- providedIn: "root"
4002
- }]
4003
- }], function () { return [{ type: HttpClient }]; }, null); })();
4004
-
4005
- var ProveedorCuentaBanco = /** @class */ (function () {
4006
- function ProveedorCuentaBanco() {
4007
- this.banco = new Banco();
4008
- this.estatus = true;
4009
- }
4010
- return ProveedorCuentaBanco;
4011
- }());
4012
-
4013
- var ProveedorFlete = /** @class */ (function () {
4014
- function ProveedorFlete() {
4015
- this.proveedor = new Proveedor();
4016
- this.flete = new Flete();
4017
- this.estatus = true;
4018
- }
4019
- return ProveedorFlete;
4020
- }());
4021
-
4022
- var ProveedorCuentaBancoService = /** @class */ (function (_super) {
4023
- __extends(ProveedorCuentaBancoService, _super);
4024
- function ProveedorCuentaBancoService(httpClient) {
4025
- var _this = _super.call(this, httpClient, '/proveedorCuentaBanco') || this;
4026
- _this.httpClient = httpClient;
4027
- return _this;
4028
- }
4029
- ProveedorCuentaBancoService.prototype.saveAll = function (params) {
4030
- var p = { 'cuentas': params };
4031
- return this.httpClient.post(this.geturl(), p, this.buildAuth());
4032
- };
4033
- /** @nocollapse */ ProveedorCuentaBancoService.ɵfac = function ProveedorCuentaBancoService_Factory(t) { return new (t || ProveedorCuentaBancoService)(ɵɵinject(HttpClient)); };
4034
- /** @nocollapse */ ProveedorCuentaBancoService.ɵprov = ɵɵdefineInjectable({ token: ProveedorCuentaBancoService, factory: ProveedorCuentaBancoService.ɵfac, providedIn: 'root' });
4035
- return ProveedorCuentaBancoService;
4036
- }(CrudService));
4037
- /*@__PURE__*/ (function () { ɵsetClassMetadata(ProveedorCuentaBancoService, [{
4038
- type: Injectable,
4039
- args: [{
4040
- providedIn: 'root'
4041
- }]
4042
- }], function () { return [{ type: HttpClient }]; }, null); })();
4043
-
4044
- var ProveedorFleteService = /** @class */ (function (_super) {
4045
- __extends(ProveedorFleteService, _super);
4046
- function ProveedorFleteService(httpClient) {
4047
- var _this = _super.call(this, httpClient, '/proveedorFlete') || this;
4048
- _this.httpClient = httpClient;
4049
- return _this;
4050
- }
4051
- ProveedorFleteService.prototype.saveAll = function (p) {
4052
- var params = { fletes: p };
4053
- return this.save(params);
4054
- };
4055
- /** @nocollapse */ ProveedorFleteService.ɵfac = function ProveedorFleteService_Factory(t) { return new (t || ProveedorFleteService)(ɵɵinject(HttpClient)); };
4056
- /** @nocollapse */ ProveedorFleteService.ɵprov = ɵɵdefineInjectable({ token: ProveedorFleteService, factory: ProveedorFleteService.ɵfac, providedIn: 'root' });
4057
- return ProveedorFleteService;
4058
- }(CrudService));
4059
- /*@__PURE__*/ (function () { ɵsetClassMetadata(ProveedorFleteService, [{
4060
- type: Injectable,
4061
- args: [{
4062
- providedIn: 'root'
4063
- }]
4064
- }], function () { return [{ type: HttpClient }]; }, null); })();
4065
-
4066
- var ClaveAumentoDisminucionService = /** @class */ (function (_super) {
4067
- __extends(ClaveAumentoDisminucionService, _super);
4068
- function ClaveAumentoDisminucionService(http) {
4069
- return _super.call(this, http, 'claveAumentoDisminucion') || this;
4070
- }
4071
- /** @nocollapse */ ClaveAumentoDisminucionService.ɵfac = function ClaveAumentoDisminucionService_Factory(t) { return new (t || ClaveAumentoDisminucionService)(ɵɵinject(HttpClient)); };
4072
- /** @nocollapse */ ClaveAumentoDisminucionService.ɵprov = ɵɵdefineInjectable({ token: ClaveAumentoDisminucionService, factory: ClaveAumentoDisminucionService.ɵfac, providedIn: 'root' });
4073
- return ClaveAumentoDisminucionService;
4074
- }(CrudService));
4075
- /*@__PURE__*/ (function () { ɵsetClassMetadata(ClaveAumentoDisminucionService, [{
4076
- type: Injectable,
4077
- args: [{
4078
- providedIn: 'root'
4079
- }]
4080
- }], function () { return [{ type: HttpClient }]; }, null); })();
4081
-
4082
- var SerieDocumentoService = /** @class */ (function (_super) {
4083
- __extends(SerieDocumentoService, _super);
4084
- function SerieDocumentoService(httpClient) {
4085
- var _this = _super.call(this, httpClient, 'serieDocumento') || this;
4086
- _this.httpClient = httpClient;
4087
- return _this;
4088
- }
4089
- SerieDocumentoService.prototype.getTipos = function () {
4090
- return this.httpClient.get(this.getUrl('serieDocumento') + '/tipoSerie', this.buildAuth());
4091
- };
4092
- SerieDocumentoService.prototype.getReporte = function (params) {
4093
- return this.httpClient.get(this.getUrl('serieDocumento') + '/descargaFormatoReporte' + this.serializeParams(params), this.buildAuth());
4094
- };
4095
- /** @nocollapse */ SerieDocumentoService.ɵfac = function SerieDocumentoService_Factory(t) { return new (t || SerieDocumentoService)(ɵɵinject(HttpClient)); };
4096
- /** @nocollapse */ SerieDocumentoService.ɵprov = ɵɵdefineInjectable({ token: SerieDocumentoService, factory: SerieDocumentoService.ɵfac, providedIn: 'root' });
4097
- return SerieDocumentoService;
4098
- }(CrudService));
4099
- /*@__PURE__*/ (function () { ɵsetClassMetadata(SerieDocumentoService, [{
4100
- type: Injectable,
4101
- args: [{
4102
- providedIn: 'root'
4103
- }]
4104
- }], function () { return [{ type: HttpClient }]; }, null); })();
4105
-
4106
- var SerieDocumento = /** @class */ (function () {
4107
- function SerieDocumento() {
4108
- }
4109
- return SerieDocumento;
4110
- }());
4111
-
4112
- var TipoContactoService = /** @class */ (function (_super) {
4113
- __extends(TipoContactoService, _super);
4114
- function TipoContactoService(http) {
4115
- return _super.call(this, http, '/tipoContacto') || this;
4116
- }
4117
- /** @nocollapse */ TipoContactoService.ɵfac = function TipoContactoService_Factory(t) { return new (t || TipoContactoService)(ɵɵinject(HttpClient)); };
4118
- /** @nocollapse */ TipoContactoService.ɵprov = ɵɵdefineInjectable({ token: TipoContactoService, factory: TipoContactoService.ɵfac, providedIn: 'root' });
4119
- return TipoContactoService;
4120
- }(CrudService));
4121
- /*@__PURE__*/ (function () { ɵsetClassMetadata(TipoContactoService, [{
4122
- type: Injectable,
4123
- args: [{
4124
- providedIn: 'root'
4125
- }]
4126
- }], function () { return [{ type: HttpClient }]; }, null); })();
4127
-
4128
- var Ubicacion = /** @class */ (function () {
4129
- function Ubicacion() {
4130
- }
4131
- return Ubicacion;
4132
- }());
4133
-
4134
- var UbicacionService = /** @class */ (function (_super) {
4135
- __extends(UbicacionService, _super);
4136
- function UbicacionService(http) {
4137
- return _super.call(this, http, 'ubicacion') || this;
4138
- }
4139
- /** @nocollapse */ UbicacionService.ɵfac = function UbicacionService_Factory(t) { return new (t || UbicacionService)(ɵɵinject(HttpClient)); };
4140
- /** @nocollapse */ UbicacionService.ɵprov = ɵɵdefineInjectable({ token: UbicacionService, factory: UbicacionService.ɵfac, providedIn: 'root' });
4141
- return UbicacionService;
4142
- }(CrudService));
4143
- /*@__PURE__*/ (function () { ɵsetClassMetadata(UbicacionService, [{
4144
- type: Injectable,
4145
- args: [{
4146
- providedIn: 'root'
4147
- }]
4148
- }], function () { return [{ type: HttpClient }]; }, null); })();
4149
-
4150
- var TipoCatalogo = /** @class */ (function () {
4151
- function TipoCatalogo() {
4152
- }
4153
- TipoCatalogo.ARTICULO = 2;
4154
- TipoCatalogo.USO_CFDI = 11;
4155
- return TipoCatalogo;
4156
- }());
4157
-
4158
- var AcreedorCuentaContableService = /** @class */ (function (_super) {
4159
- __extends(AcreedorCuentaContableService, _super);
4160
- function AcreedorCuentaContableService(httpClient) {
4161
- var _this = _super.call(this, httpClient, 'acreedorCuentaContable') || this;
4162
- _this.httpClient = httpClient;
4163
- return _this;
4164
- }
4165
- AcreedorCuentaContableService.prototype.cuentasContables = function () {
4166
- var uRL = "/cuentaContable/obtieneCuentasContablesRecursivo/";
4167
- return this.httpClient.get(this.getUrl() + uRL, this.buildAuth());
4168
- };
4169
- /** @nocollapse */ AcreedorCuentaContableService.ɵfac = function AcreedorCuentaContableService_Factory(t) { return new (t || AcreedorCuentaContableService)(ɵɵinject(HttpClient)); };
4170
- /** @nocollapse */ AcreedorCuentaContableService.ɵprov = ɵɵdefineInjectable({ token: AcreedorCuentaContableService, factory: AcreedorCuentaContableService.ɵfac, providedIn: 'root' });
4171
- return AcreedorCuentaContableService;
4172
- }(CrudService));
4173
- /*@__PURE__*/ (function () { ɵsetClassMetadata(AcreedorCuentaContableService, [{
4174
- type: Injectable,
4175
- args: [{
4176
- providedIn: 'root'
4177
- }]
4178
- }], function () { return [{ type: HttpClient }]; }, null); })();
4179
-
4180
- var CuentaContableModel = /** @class */ (function () {
4181
- function CuentaContableModel() {
4182
- }
4183
- ;
4184
- return CuentaContableModel;
4185
- }());
4186
-
4187
- var NormaInformacionFinancieraModel = /** @class */ (function () {
4188
- function NormaInformacionFinancieraModel() {
4189
- }
4190
- ;
4191
- return NormaInformacionFinancieraModel;
4192
- }());
4193
-
4194
- /*
4195
- * Public API Surface of erp-core
4196
- */
4197
-
4198
- /**
4199
- * Generated bundle index. Do not edit.
4200
- */
4201
-
4202
- export { AcreedorCuentaContableService, AcreedorService, Agente, AgenteService, Almacen, AlmacenService, Auth, AuthService, Authenticated, Banco, BancoService, CanActivateGuard, CatalogoAdicionalService, CatalogoTipo, CatalogoTipoService, CclistaComponent, CcseleccionDialogComponent, ClasificadorTipo, ClasificadorTipoService, ClaveAumentoDisminucionService, ClaveMovimiento, ClaveMovimientoService, Cliente, ClienteCuentaBanco, ClienteCuentaBancoService, ClienteFlete, ClienteFleteService, ClienteService, ConfiguracionEmpresaAdministrativa, ControlAccesoService, CoreLibModule, CrudService, CuentaContableModel, DatoContacto, DatoContactoService, DatoDireccion, DatoDireccionService, Departamento, DepartamentoService, Empresa, EmpresaService, Error404Component, EstadoCivil, FileService, Flete, FleteService, FormaPago, FormaPagoService, Genero, GlobalService, HttpLoaderFactory, InitService, LoadingComponent, LoadingScreenComponent, LoadingScreenService, LoadingService, LoginModalComponent, LoginModalService, MessageService, Moneda, MonedaService, NormaInformacionFinancieraModel, PaginateService, PdfModalComponent, PdfModalService, Persona, PersonaFisica, PersonaFisicaService, PersonaMoral, PersonaMoralService, Proveedor, ProveedorCuentaBanco, ProveedorCuentaBancoService, ProveedorFlete, ProveedorFleteService, ProveedorService, SeleccionaArticuloComponent, SelectAcreedorComponent, SelectClienteComponent, SelectProveedorComponent, SerieDocumento, SerieDocumentoService, SessionCajaService, SessionCreateComponent, StockService, TipoCatalogo, TipoContacto, TipoContactoService, Ubicacion, UbicacionService, Usuario, VersionCheckService, httpInterceptor };
4203
- //# sourceMappingURL=visorus-erp-core.js.map