magaya-cai-number-honduras 1.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 (55) hide show
  1. package/.github/workflows/release.yaml +37 -0
  2. package/.vscode/launch.json +18 -0
  3. package/.whitesource +30 -0
  4. package/LICENSE +21 -0
  5. package/README.md +1 -0
  6. package/combined.log +0 -0
  7. package/error.log +0 -0
  8. package/extension.config.json +58 -0
  9. package/index.js +220 -0
  10. package/package.json +56 -0
  11. package/src/integration/helpers/dbHelper.js +12 -0
  12. package/src/integration/helpers/initilize.js +111 -0
  13. package/src/integration/index.js +1053 -0
  14. package/src/integration/jobs/creditmemo.js +155 -0
  15. package/src/integration/jobs/debitnote.js +155 -0
  16. package/src/integration/jobs/invoices.js +176 -0
  17. package/src/integration/jobs/transactionlog.js +65 -0
  18. package/src/util/db/db.js +62 -0
  19. package/src/util/email/email.js +75 -0
  20. package/src/util/email/index.js +124 -0
  21. package/src/util/email/logo/logo.jpg +0 -0
  22. package/src/util/email/settingsEmail.js +33 -0
  23. package/src/util/files/uploadHelper.js +11 -0
  24. package/src/util/gateway.js +23 -0
  25. package/src/util/setting.js +25 -0
  26. package/static/assets/img/honduras-flag-icon.svg +214 -0
  27. package/static/fa-brands-400.eot +0 -0
  28. package/static/fa-brands-400.svg +1100 -0
  29. package/static/fa-brands-400.ttf +0 -0
  30. package/static/fa-brands-400.woff +0 -0
  31. package/static/fa-brands-400.woff2 +0 -0
  32. package/static/fa-regular-400.eot +0 -0
  33. package/static/fa-regular-400.svg +368 -0
  34. package/static/fa-regular-400.ttf +0 -0
  35. package/static/fa-regular-400.woff +0 -0
  36. package/static/fa-regular-400.woff2 +0 -0
  37. package/static/fa-solid-900.eot +0 -0
  38. package/static/fa-solid-900.svg +1892 -0
  39. package/static/fa-solid-900.ttf +0 -0
  40. package/static/fa-solid-900.woff +0 -0
  41. package/static/fa-solid-900.woff2 +0 -0
  42. package/static/favicon.ico +0 -0
  43. package/static/index.html +21 -0
  44. package/static/main.js +2436 -0
  45. package/static/main.js.map +1 -0
  46. package/static/polyfills.js +5793 -0
  47. package/static/polyfills.js.map +1 -0
  48. package/static/runtime.js +154 -0
  49. package/static/runtime.js.map +1 -0
  50. package/static/scripts.js +18 -0
  51. package/static/scripts.js.map +1 -0
  52. package/static/styles.js +776 -0
  53. package/static/styles.js.map +1 -0
  54. package/static/vendor.js +98718 -0
  55. package/static/vendor.js.map +1 -0
package/static/main.js ADDED
@@ -0,0 +1,2436 @@
1
+ (window["webpackJsonp"] = window["webpackJsonp"] || []).push([["main"],{
2
+
3
+ /***/ "./src/$$_lazy_route_resource lazy recursive":
4
+ /*!**********************************************************!*\
5
+ !*** ./src/$$_lazy_route_resource lazy namespace object ***!
6
+ \**********************************************************/
7
+ /*! no static exports found */
8
+ /***/ (function(module, exports) {
9
+
10
+ function webpackEmptyAsyncContext(req) {
11
+ // Here Promise.resolve().then() is used instead of new Promise() to prevent
12
+ // uncaught exception popping up in devtools
13
+ return Promise.resolve().then(function() {
14
+ var e = new Error("Cannot find module '" + req + "'");
15
+ e.code = 'MODULE_NOT_FOUND';
16
+ throw e;
17
+ });
18
+ }
19
+ webpackEmptyAsyncContext.keys = function() { return []; };
20
+ webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
21
+ module.exports = webpackEmptyAsyncContext;
22
+ webpackEmptyAsyncContext.id = "./src/$$_lazy_route_resource lazy recursive";
23
+
24
+ /***/ }),
25
+
26
+ /***/ "./src/app/apiconfig/api.service.ts":
27
+ /*!******************************************!*\
28
+ !*** ./src/app/apiconfig/api.service.ts ***!
29
+ \******************************************/
30
+ /*! exports provided: ApiService */
31
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
32
+
33
+ "use strict";
34
+ __webpack_require__.r(__webpack_exports__);
35
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApiService", function() { return ApiService; });
36
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
37
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
38
+ /* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
39
+
40
+
41
+
42
+ var ApiService = /** @class */ (function () {
43
+ function ApiService(http) {
44
+ this.http = http;
45
+ }
46
+ ApiService.prototype.loadConfig = function () {
47
+ return this.http.get('./api/api/config');
48
+ };
49
+ ApiService.prototype.saveConfig = function (api) {
50
+ return this.http.post('./api/api/config', { apiConfig: api });
51
+ };
52
+ ApiService.prototype.testConfig = function (api) {
53
+ return this.http.post('./api/api/test', { apiConfig: api });
54
+ };
55
+ ApiService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
56
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
57
+ providedIn: 'root'
58
+ }),
59
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"]])
60
+ ], ApiService);
61
+ return ApiService;
62
+ }());
63
+
64
+
65
+
66
+ /***/ }),
67
+
68
+ /***/ "./src/app/apiconfig/apiconfig.component.html":
69
+ /*!****************************************************!*\
70
+ !*** ./src/app/apiconfig/apiconfig.component.html ***!
71
+ \****************************************************/
72
+ /*! no static exports found */
73
+ /***/ (function(module, exports) {
74
+
75
+ module.exports = "<div class=\"container-fluid\">\r\n\r\n <div class=\"alert alert-success\" role=\"alert\" *ngIf=\"saved\">\r\n Configuration was saved succesfully.\r\n </div>\r\n <div class=\"alert alert-success\" role=\"alert\" *ngIf=\"testSuccesfully\">\r\n Test connection completed! API available!\r\n </div>\r\n <div class=\"alert alert-danger\" role=\"alert\" *ngIf=\"testError\">\r\n Test connection failed! Wrong configuration!\r\n <br>\r\n {{error.message}}\r\n </div>\r\n\r\n <div class=\"row d-flex justify-content-center\">\r\n <h5>API configuration</h5>\r\n </div>\r\n\r\n <div class=\"input-group mb-3\">\r\n <div class=\"input-group-prepend\">\r\n <span class=\"input-group-text\" id=\"server\">API Server or IP</span>\r\n </div>\r\n <input type=\"text\" class=\"form-control\" id=\"server\" #server=\"ngModel\" [(ngModel)]=\"api.host\">\r\n </div>\r\n\r\n <div class=\"input-group mb-3\">\r\n <div class=\"input-group-prepend\">\r\n <span class=\"input-group-text\" id=\"port\">Port</span>\r\n </div>\r\n <input type=\"text\" class=\"form-control\" id=\"port\" #port=\"ngModel\" [(ngModel)]=\"api.port\">\r\n </div>\r\n\r\n <div class=\"input-group mb-3\">\r\n <div class=\"input-group-prepend\">\r\n <span class=\"input-group-text\" id=\"username\">User</span>\r\n </div>\r\n <input type=\"text\" class=\"form-control\" id=\"username\" #username=\"ngModel\" [(ngModel)]=\"api.username\">\r\n </div>\r\n\r\n <div class=\"input-group mb-3\">\r\n <div class=\"input-group-prepend\">\r\n <span class=\"input-group-text\" id=\"password\">Password</span>\r\n </div>\r\n <input type=\"password\" class=\"form-control\" id=\"password\" #password=\"ngModel\" [(ngModel)]=\"api.password\">\r\n </div>\r\n\r\n\r\n <div class=\"row d-flex justify-content-end\">\r\n <div class=\"form-group\">\r\n <button type=\"button\" class=\"btn btn-warning\" (click)=\"test()\">Test Connection</button>\r\n <button type=\"button\" class=\"btn btn-success ml-2\" (click)=\"save()\" [(disabled)]=\"cantSave\">Save</button>\r\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"cancel()\">Cancel</button>\r\n </div>\r\n </div>\r\n\r\n</div>"
76
+
77
+ /***/ }),
78
+
79
+ /***/ "./src/app/apiconfig/apiconfig.component.scss":
80
+ /*!****************************************************!*\
81
+ !*** ./src/app/apiconfig/apiconfig.component.scss ***!
82
+ \****************************************************/
83
+ /*! no static exports found */
84
+ /***/ (function(module, exports) {
85
+
86
+ module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2FwaWNvbmZpZy9hcGljb25maWcuY29tcG9uZW50LnNjc3MifQ== */"
87
+
88
+ /***/ }),
89
+
90
+ /***/ "./src/app/apiconfig/apiconfig.component.ts":
91
+ /*!**************************************************!*\
92
+ !*** ./src/app/apiconfig/apiconfig.component.ts ***!
93
+ \**************************************************/
94
+ /*! exports provided: ApiconfigComponent */
95
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
96
+
97
+ "use strict";
98
+ __webpack_require__.r(__webpack_exports__);
99
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApiconfigComponent", function() { return ApiconfigComponent; });
100
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
101
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
102
+ /* harmony import */ var _model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./model */ "./src/app/apiconfig/model.ts");
103
+ /* harmony import */ var _api_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./api.service */ "./src/app/apiconfig/api.service.ts");
104
+ /* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
105
+
106
+
107
+
108
+
109
+
110
+ var ApiconfigComponent = /** @class */ (function () {
111
+ function ApiconfigComponent(router, apiSrv) {
112
+ this.router = router;
113
+ this.apiSrv = apiSrv;
114
+ this.saved = false;
115
+ this.testSuccesfully = false;
116
+ this.testError = false;
117
+ this.cantSave = true;
118
+ this.api = new _model__WEBPACK_IMPORTED_MODULE_2__["Model"]();
119
+ }
120
+ ApiconfigComponent.prototype.ngOnInit = function () {
121
+ var _this = this;
122
+ this.apiSrv.loadConfig()
123
+ .subscribe(function (conf) {
124
+ if (conf) {
125
+ _this.api = conf;
126
+ }
127
+ else {
128
+ _this.api = new _model__WEBPACK_IMPORTED_MODULE_2__["Model"]();
129
+ }
130
+ });
131
+ };
132
+ ApiconfigComponent.prototype.save = function () {
133
+ var _this = this;
134
+ this.saved = false;
135
+ this.testSuccesfully = false;
136
+ this.testError = false;
137
+ this.apiSrv.saveConfig(this.api).subscribe(function (res) {
138
+ if (res) {
139
+ _this.saved = true;
140
+ }
141
+ });
142
+ };
143
+ ApiconfigComponent.prototype.test = function () {
144
+ var _this = this;
145
+ this.saved = false;
146
+ this.testSuccesfully = false;
147
+ this.testError = false;
148
+ this.cantSave = true;
149
+ this.apiSrv.testConfig(this.api).subscribe(function (response) {
150
+ if (response) {
151
+ _this.testError = false;
152
+ _this.testSuccesfully = true;
153
+ _this.cantSave = false;
154
+ }
155
+ }, function (err) {
156
+ if (err) {
157
+ _this.testSuccesfully = false;
158
+ _this.testError = true;
159
+ _this.error = err.error;
160
+ }
161
+ });
162
+ };
163
+ ApiconfigComponent.prototype.cancel = function () {
164
+ this.router.navigate(['']);
165
+ };
166
+ ApiconfigComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
167
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
168
+ selector: 'app-apiconfig',
169
+ template: __webpack_require__(/*! ./apiconfig.component.html */ "./src/app/apiconfig/apiconfig.component.html"),
170
+ styles: [__webpack_require__(/*! ./apiconfig.component.scss */ "./src/app/apiconfig/apiconfig.component.scss")]
171
+ }),
172
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"], _api_service__WEBPACK_IMPORTED_MODULE_3__["ApiService"]])
173
+ ], ApiconfigComponent);
174
+ return ApiconfigComponent;
175
+ }());
176
+
177
+
178
+
179
+ /***/ }),
180
+
181
+ /***/ "./src/app/apiconfig/model.ts":
182
+ /*!************************************!*\
183
+ !*** ./src/app/apiconfig/model.ts ***!
184
+ \************************************/
185
+ /*! exports provided: Model */
186
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
187
+
188
+ "use strict";
189
+ __webpack_require__.r(__webpack_exports__);
190
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Model", function() { return Model; });
191
+ var Model = /** @class */ (function () {
192
+ function Model() {
193
+ }
194
+ return Model;
195
+ }());
196
+
197
+
198
+
199
+ /***/ }),
200
+
201
+ /***/ "./src/app/app-routing.module.ts":
202
+ /*!***************************************!*\
203
+ !*** ./src/app/app-routing.module.ts ***!
204
+ \***************************************/
205
+ /*! exports provided: AppRoutingModule */
206
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
207
+
208
+ "use strict";
209
+ __webpack_require__.r(__webpack_exports__);
210
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppRoutingModule", function() { return AppRoutingModule; });
211
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
212
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
213
+ /* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
214
+ /* harmony import */ var _config_config_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./config/config.component */ "./src/app/config/config.component.ts");
215
+ /* harmony import */ var _ftpconfig_ftpconfig_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ftpconfig/ftpconfig.component */ "./src/app/ftpconfig/ftpconfig.component.ts");
216
+ /* harmony import */ var _apiconfig_apiconfig_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./apiconfig/apiconfig.component */ "./src/app/apiconfig/apiconfig.component.ts");
217
+ /* harmony import */ var _pgpsettings_pgpsettings_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pgpsettings/pgpsettings.component */ "./src/app/pgpsettings/pgpsettings.component.ts");
218
+ /* harmony import */ var _email_emailconfig_emailconfig_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./email/emailconfig/emailconfig.component */ "./src/app/email/emailconfig/emailconfig.component.ts");
219
+ /* harmony import */ var _invoice_number_setting_setting_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./invoice-number/setting/setting.component */ "./src/app/invoice-number/setting/setting.component.ts");
220
+ /* harmony import */ var _invoice_number_invoice_invoice_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./invoice-number/invoice/invoice.component */ "./src/app/invoice-number/invoice/invoice.component.ts");
221
+ /* harmony import */ var _invoice_number_creditmemo_creditmemo_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./invoice-number/creditmemo/creditmemo.component */ "./src/app/invoice-number/creditmemo/creditmemo.component.ts");
222
+ /* harmony import */ var _invoice_number_debitnote_debitnote_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./invoice-number/debitnote/debitnote.component */ "./src/app/invoice-number/debitnote/debitnote.component.ts");
223
+ /* harmony import */ var _invoice_number_status_status_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./invoice-number/status/status.component */ "./src/app/invoice-number/status/status.component.ts");
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+ var routes = [
238
+ { path: 'config', component: _config_config_component__WEBPACK_IMPORTED_MODULE_3__["ConfigComponent"] },
239
+ { path: 'api', component: _apiconfig_apiconfig_component__WEBPACK_IMPORTED_MODULE_5__["ApiconfigComponent"] },
240
+ { path: 'ftp', component: _ftpconfig_ftpconfig_component__WEBPACK_IMPORTED_MODULE_4__["FtpconfigComponent"] },
241
+ { path: 'email', component: _email_emailconfig_emailconfig_component__WEBPACK_IMPORTED_MODULE_7__["EmailconfigComponent"] },
242
+ { path: 'security', component: _pgpsettings_pgpsettings_component__WEBPACK_IMPORTED_MODULE_6__["PgpsettingsComponent"] },
243
+ {
244
+ path: 'inv-setting', component: _invoice_number_setting_setting_component__WEBPACK_IMPORTED_MODULE_8__["SettingComponent"],
245
+ children: [
246
+ { path: 'status', component: _invoice_number_status_status_component__WEBPACK_IMPORTED_MODULE_12__["StatusComponent"] },
247
+ { path: 'invoice', component: _invoice_number_invoice_invoice_component__WEBPACK_IMPORTED_MODULE_9__["InvoiceComponent"] },
248
+ { path: 'debitnote', component: _invoice_number_debitnote_debitnote_component__WEBPACK_IMPORTED_MODULE_11__["DebitnoteComponent"] },
249
+ { path: 'creditmemo', component: _invoice_number_creditmemo_creditmemo_component__WEBPACK_IMPORTED_MODULE_10__["CreditmemoComponent"] },
250
+ { path: 'email', component: _email_emailconfig_emailconfig_component__WEBPACK_IMPORTED_MODULE_7__["EmailconfigComponent"] },
251
+ { path: '**', component: _invoice_number_status_status_component__WEBPACK_IMPORTED_MODULE_12__["StatusComponent"] },
252
+ ]
253
+ },
254
+ ];
255
+ var AppRoutingModule = /** @class */ (function () {
256
+ function AppRoutingModule() {
257
+ }
258
+ AppRoutingModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
259
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
260
+ imports: [_angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterModule"].forRoot(routes, { useHash: true })],
261
+ exports: [_angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterModule"]]
262
+ })
263
+ ], AppRoutingModule);
264
+ return AppRoutingModule;
265
+ }());
266
+
267
+
268
+
269
+ /***/ }),
270
+
271
+ /***/ "./src/app/app.module.ts":
272
+ /*!*******************************!*\
273
+ !*** ./src/app/app.module.ts ***!
274
+ \*******************************/
275
+ /*! exports provided: AppModule */
276
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
277
+
278
+ "use strict";
279
+ __webpack_require__.r(__webpack_exports__);
280
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppModule", function() { return AppModule; });
281
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
282
+ /* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
283
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
284
+ /* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
285
+ /* harmony import */ var ng2_archwizard__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ng2-archwizard */ "./node_modules/ng2-archwizard/index.js");
286
+ /* harmony import */ var _app_routing_module__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./app-routing.module */ "./src/app/app-routing.module.ts");
287
+ /* harmony import */ var _root_root_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./root/root.component */ "./src/app/root/root.component.ts");
288
+ /* harmony import */ var _config_config_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./config/config.component */ "./src/app/config/config.component.ts");
289
+ /* harmony import */ var _config_config_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./config/config.service */ "./src/app/config/config.service.ts");
290
+ /* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
291
+ /* harmony import */ var _ftpconfig_ftpconfig_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ftpconfig/ftpconfig.component */ "./src/app/ftpconfig/ftpconfig.component.ts");
292
+ /* harmony import */ var _apiconfig_apiconfig_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./apiconfig/apiconfig.component */ "./src/app/apiconfig/apiconfig.component.ts");
293
+ /* harmony import */ var _pgpsettings_pgpsettings_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./pgpsettings/pgpsettings.component */ "./src/app/pgpsettings/pgpsettings.component.ts");
294
+ /* harmony import */ var _email_emailconfig_emailconfig_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./email/emailconfig/emailconfig.component */ "./src/app/email/emailconfig/emailconfig.component.ts");
295
+ /* harmony import */ var _email_emailpanel_emailpanel_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./email/emailpanel/emailpanel.component */ "./src/app/email/emailpanel/emailpanel.component.ts");
296
+ /* harmony import */ var _invoice_number_setting_setting_component__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./invoice-number/setting/setting.component */ "./src/app/invoice-number/setting/setting.component.ts");
297
+ /* harmony import */ var _invoice_number_invoice_invoice_component__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./invoice-number/invoice/invoice.component */ "./src/app/invoice-number/invoice/invoice.component.ts");
298
+ /* harmony import */ var _invoice_number_creditmemo_creditmemo_component__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./invoice-number/creditmemo/creditmemo.component */ "./src/app/invoice-number/creditmemo/creditmemo.component.ts");
299
+ /* harmony import */ var _invoice_number_debitnote_debitnote_component__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./invoice-number/debitnote/debitnote.component */ "./src/app/invoice-number/debitnote/debitnote.component.ts");
300
+ /* harmony import */ var _invoice_number_status_status_component__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./invoice-number/status/status.component */ "./src/app/invoice-number/status/status.component.ts");
301
+ /* harmony import */ var ngx_mask__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ngx-mask */ "./node_modules/ngx-mask/fesm5/ngx-mask.js");
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+ var AppModule = /** @class */ (function () {
325
+ function AppModule() {
326
+ }
327
+ AppModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
328
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["NgModule"])({
329
+ declarations: [
330
+ _root_root_component__WEBPACK_IMPORTED_MODULE_6__["RootComponent"],
331
+ _config_config_component__WEBPACK_IMPORTED_MODULE_7__["ConfigComponent"],
332
+ _ftpconfig_ftpconfig_component__WEBPACK_IMPORTED_MODULE_10__["FtpconfigComponent"],
333
+ _apiconfig_apiconfig_component__WEBPACK_IMPORTED_MODULE_11__["ApiconfigComponent"],
334
+ _pgpsettings_pgpsettings_component__WEBPACK_IMPORTED_MODULE_12__["PgpsettingsComponent"],
335
+ _email_emailconfig_emailconfig_component__WEBPACK_IMPORTED_MODULE_13__["EmailconfigComponent"],
336
+ _email_emailpanel_emailpanel_component__WEBPACK_IMPORTED_MODULE_14__["EmailpanelComponent"],
337
+ _invoice_number_setting_setting_component__WEBPACK_IMPORTED_MODULE_15__["SettingComponent"],
338
+ _invoice_number_invoice_invoice_component__WEBPACK_IMPORTED_MODULE_16__["InvoiceComponent"],
339
+ _invoice_number_creditmemo_creditmemo_component__WEBPACK_IMPORTED_MODULE_17__["CreditmemoComponent"],
340
+ _invoice_number_debitnote_debitnote_component__WEBPACK_IMPORTED_MODULE_18__["DebitnoteComponent"],
341
+ _invoice_number_status_status_component__WEBPACK_IMPORTED_MODULE_19__["StatusComponent"]
342
+ ],
343
+ imports: [
344
+ _angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__["BrowserModule"],
345
+ _app_routing_module__WEBPACK_IMPORTED_MODULE_5__["AppRoutingModule"],
346
+ _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormsModule"],
347
+ _angular_common_http__WEBPACK_IMPORTED_MODULE_9__["HttpClientModule"],
348
+ _angular_forms__WEBPACK_IMPORTED_MODULE_3__["ReactiveFormsModule"],
349
+ ng2_archwizard__WEBPACK_IMPORTED_MODULE_4__["ArchwizardModule"],
350
+ ngx_mask__WEBPACK_IMPORTED_MODULE_20__["NgxMaskModule"].forRoot()
351
+ ],
352
+ providers: [_config_config_service__WEBPACK_IMPORTED_MODULE_8__["ConfigService"]],
353
+ bootstrap: [_root_root_component__WEBPACK_IMPORTED_MODULE_6__["RootComponent"]],
354
+ exports: [_root_root_component__WEBPACK_IMPORTED_MODULE_6__["RootComponent"]]
355
+ })
356
+ ], AppModule);
357
+ return AppModule;
358
+ }());
359
+
360
+
361
+
362
+ /***/ }),
363
+
364
+ /***/ "./src/app/config/config.component.html":
365
+ /*!**********************************************!*\
366
+ !*** ./src/app/config/config.component.html ***!
367
+ \**********************************************/
368
+ /*! no static exports found */
369
+ /***/ (function(module, exports) {
370
+
371
+ module.exports = "<div class=\"container-fluid\">\r\n\r\n <div class=\"alert alert-success\" role=\"alert\" *ngIf=\"saved\">\r\n Configuration was saved succesfully.\r\n </div>\r\n\r\n <div class=\"row d-flex justify-content-center mb-2\">\r\n <h5>Configuration</h5>\r\n </div>\r\n\r\n <div class=\"row\">\r\n\r\n <div class=\"col-sm-6 border-top border-left border-right border-bottom\">\r\n <div class=\"row d-flex justify-content-center\">\r\n <h6>Credenciales API</h6>\r\n </div>\r\n\r\n\r\n <div class=\"form-group row\">\r\n <label for=\"ipAddress\" class=\"col-sm-2 col-form-label\">Servidor/IP:</label>\r\n <div class=\"col-sm-9\">\r\n <input type=\"text\" id=\"ipAddress\" class=\"form-control ml-2 mt-1\" placeholder=\"\" [(ngModel)]=\"config.server\">\r\n </div>\r\n </div>\r\n <div class=\"form-group row\">\r\n <label for=\"port\" class=\"col-sm-2 col-form-label\">Puerto:</label>\r\n <div class=\"col-sm-9\">\r\n <input type=\"text\" id=\"port\" class=\"form-control ml-2 mt-1\" placeholder=\"0\" [(ngModel)]=\"config.port\">\r\n </div>\r\n </div>\r\n <div class=\"form-group row\">\r\n <label for=\"user\" class=\"col-sm-2 col-form-label\">Usuario:</label>\r\n <div class=\"col-sm-9\">\r\n <input type=\"text\" id=\"user\" class=\"form-control ml-2 mt-1\" placeholder=\"\" [(ngModel)]=\"config.username\">\r\n </div>\r\n </div>\r\n <div class=\"form-group row\">\r\n <label for=\"password\" class=\"col-sm-2 col-form-label\">Contraseña:</label>\r\n <div class=\"col-sm-9\">\r\n <input type=\"password\" id=\"password\" class=\"form-control ml-2 mt-1\" placeholder=\"\" [(ngModel)]=\"config.password\">\r\n </div>\r\n </div>\r\n\r\n\r\n </div>\r\n <div class=\"col-sm-6 border-top border-left border-right border-bottom\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-12 align-self-center border-bottom\">\r\n <div class=\"row d-flex justify-content-center\">\r\n <h6>Calendario de procesamiento</h6>\r\n </div>\r\n <div class=\"row ml-2\">\r\n\r\n <div class=\"form-check-inline\">\r\n <input type=\"radio\" id=\"dailyHourR\" class=\"form-check-input\" [(checked)]=\"config.dailySchedule\"\r\n (click)=\"scheduleMode($event)\" /><label class=\"form-check-label\" for=\"dailyHourR\">Diaria,\r\n a las:</label>\r\n <div class=\"col-auto\">\r\n <input type=\"time\" id=\"dailyHourSet\" class=\"form-control\" [(disabled)]=\"!config.dailySchedule\"\r\n [(ngModel)]=\"config.dailyScheduleValue\">\r\n </div>\r\n\r\n </div>\r\n </div>\r\n <div class=\"row ml-2\">\r\n\r\n <div class=\"form-check-inline mt-2 mb-2\">\r\n <input type=\"radio\" id=\"dailyIntervalR\" class=\"form-check-input\" [(checked)]=\"config.intervalSchedule\"\r\n (click)=\"scheduleMode($event)\" /><label for=\"dailyIntervalR\" class=\"form-check-label\">A\r\n intervalos de:</label>\r\n <div class=\"col-auto\">\r\n <input type=\"number\" id=\"dailyIntervalSet\" class=\"form-control\" [(disabled)]=\"!config.intervalSchedule\"\r\n [(ngModel)]=\"config.intervalScheduleValue\">\r\n </div>\r\n <label for=\"dailyIntervalSet\" class=\"form-check-label\">segundos</label>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row d-flex justify-content-center\">\r\n <h6>Ejecución y credenciales FE</h6>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-sm-3\">\r\n <div class=\"form-inline m-2\">\r\n <div class=\"form-check\">\r\n <label class=\"form-check-label mr-5\">\r\n <input type=\"radio\" class=\"form-check-input\" id=\"productionRadio\" [(checked)]=\"config.productionRadio\"\r\n (click)=\"executionAndCredentials($event)\">\r\n Producción\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-9\">\r\n <div class=\"form-group row\">\r\n <label for=\"areaText\" class=\"col-sm-3 col-form-label\">Area:</label>\r\n <div class=\"col-auto\">\r\n <input type=\"text\" id=\"areaText\" class=\"form-control\" [(ngModel)]=\"config.area\">\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-sm-3\">\r\n <div class=\"form-inline m-2\">\r\n <div class=\"form-check\">\r\n <label class=\"form-check-label mr-5\">\r\n <input type=\"radio\" class=\"form-check-input\" id=\"testRadio\" [(checked)]=\"config.testRadio\"\r\n (click)=\"executionAndCredentials($event)\">\r\n Prueba\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-9\">\r\n <div class=\"form-group row\">\r\n <label for=\"areaPassword\" class=\"col-sm-3 col-form-label\">Contraseña:</label>\r\n <div class=\"col-auto\">\r\n <input type=\"password\" id=\"areaPassword\" class=\"form-control\" [(ngModel)]=\"config.areaPassword\">\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col border\">\r\n <div class=\"row d-flex justify-content-center\">\r\n <h6>Servicio WEB Factura Electónica</h6>\r\n </div>\r\n\r\n <div class=\"form-group row\">\r\n <label for=\"wsURL\" class=\"col-sm-2 col-form-label\">Servicio Web URL:</label>\r\n <div class=\"col-sm-10\">\r\n <input type=\"text\" id=\"wsURL\" class=\"form-control\" [(ngModel)]=\"config.wsURL\">\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col border\">\r\n <div class=\"row d-flex justify-content-center\">\r\n <h6>Modalidad de Impuesto</h6>\r\n </div>\r\n\r\n <div class=\"form-row mb-2\">\r\n <div class=\"form-check-inline\">\r\n <label class=\"form-check-label\">\r\n <input type=\"radio\" class=\"form-check-input\" id=\"magayaTax\" [(checked)]=\"config.magayaTax\"\r\n (click)=\"taxMode($event)\">\r\n Usar Impuestos Magaya\r\n </label>\r\n </div>\r\n <div class=\"form-check-inline ml-5\">\r\n <label class=\"form-check-label\">\r\n <input type=\"radio\" class=\"form-check-input\" id=\"priceWithTax\" [(checked)]=\"config.taxIncluded\"\r\n (click)=\"taxMode($event)\">\r\n Precio incluye Impuesto\r\n </label>\r\n </div>\r\n <div class=\"form-check-inline ml-5\">\r\n <label for=\"ivaValue\" class=\"col-sm-4 col-form-label\">Valor IVA:</label>\r\n <input type=\"text\" id=\"ivaValue\" class=\"form-control\" placeholder=\"0.00\" [(ngModel)]=\"config.ivaTax\">\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n </div>\r\n <div class=\"row mt-3\">\r\n <div class=\"col\">\r\n <button type=\"button\" class=\"btn btn-primary\">\r\n Set Correlativos\r\n </button>\r\n </div>\r\n <div class=\"col d-flex justify-content-end\">\r\n <button type=\"button\" class=\"btn btn-success\" (click)=\"save()\">\r\n Guardar\r\n </button>\r\n <button type=\"button\" class=\"btn btn-danger\" (click)=\"cancel()\">\r\n Cancelar\r\n </button>\r\n </div>\r\n </div>\r\n\r\n</div>"
372
+
373
+ /***/ }),
374
+
375
+ /***/ "./src/app/config/config.component.scss":
376
+ /*!**********************************************!*\
377
+ !*** ./src/app/config/config.component.scss ***!
378
+ \**********************************************/
379
+ /*! no static exports found */
380
+ /***/ (function(module, exports) {
381
+
382
+ module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2NvbmZpZy9jb25maWcuY29tcG9uZW50LnNjc3MifQ== */"
383
+
384
+ /***/ }),
385
+
386
+ /***/ "./src/app/config/config.component.ts":
387
+ /*!********************************************!*\
388
+ !*** ./src/app/config/config.component.ts ***!
389
+ \********************************************/
390
+ /*! exports provided: ConfigComponent */
391
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
392
+
393
+ "use strict";
394
+ __webpack_require__.r(__webpack_exports__);
395
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConfigComponent", function() { return ConfigComponent; });
396
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
397
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
398
+ /* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
399
+ /* harmony import */ var _configModel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./configModel */ "./src/app/config/configModel.ts");
400
+ /* harmony import */ var _config_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./config.service */ "./src/app/config/config.service.ts");
401
+
402
+
403
+
404
+
405
+
406
+ var ConfigComponent = /** @class */ (function () {
407
+ function ConfigComponent(router, configSrv) {
408
+ this.router = router;
409
+ this.configSrv = configSrv;
410
+ this.saved = false;
411
+ this.config = new _configModel__WEBPACK_IMPORTED_MODULE_3__["Config"]();
412
+ }
413
+ ConfigComponent.prototype.ngOnInit = function () {
414
+ var _this = this;
415
+ this.configSrv.loadConfig()
416
+ .subscribe(function (conf) {
417
+ if (conf) {
418
+ _this.config = conf;
419
+ }
420
+ else {
421
+ _this.config = new _configModel__WEBPACK_IMPORTED_MODULE_3__["Config"]();
422
+ }
423
+ });
424
+ };
425
+ ConfigComponent.prototype.taxMode = function (event) {
426
+ if (event.target.id === 'magayaTax' && event.returnValue) {
427
+ this.config.magayaTax = event.returnValue;
428
+ this.config.taxIncluded = false;
429
+ }
430
+ else if (event.target.id === 'priceWithTax' && event.returnValue) {
431
+ this.config.taxIncluded = event.returnValue;
432
+ this.config.magayaTax = false;
433
+ }
434
+ };
435
+ ConfigComponent.prototype.scheduleMode = function (event) {
436
+ if (event.target.id === 'dailyHourR' && event.returnValue) {
437
+ this.config.dailySchedule = event.returnValue;
438
+ this.config.intervalSchedule = false;
439
+ }
440
+ else if (event.target.id === 'dailyIntervalR' && event.returnValue) {
441
+ this.config.intervalSchedule = event.returnValue;
442
+ this.config.dailySchedule = false;
443
+ }
444
+ };
445
+ ConfigComponent.prototype.executionAndCredentials = function (event) {
446
+ if (event.target.id === 'productionRadio' && event.returnValue) {
447
+ this.config.productionRadio = event.returnValue;
448
+ this.config.testRadio = false;
449
+ }
450
+ else if (event.target.id === 'testRadio' && event.returnValue) {
451
+ this.config.testRadio = event.returnValue;
452
+ this.config.productionRadio = false;
453
+ }
454
+ };
455
+ ConfigComponent.prototype.setCorrelativos = function () { };
456
+ ConfigComponent.prototype.save = function () {
457
+ var _this = this;
458
+ this.configSrv.saveConfig(this.config).subscribe(function (resp) {
459
+ if (resp) {
460
+ _this.saved = true;
461
+ }
462
+ });
463
+ };
464
+ ConfigComponent.prototype.cancel = function () {
465
+ this.router.navigate(['']);
466
+ };
467
+ ConfigComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
468
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
469
+ selector: 'app-config',
470
+ template: __webpack_require__(/*! ./config.component.html */ "./src/app/config/config.component.html"),
471
+ styles: [__webpack_require__(/*! ./config.component.scss */ "./src/app/config/config.component.scss")]
472
+ }),
473
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"], _config_service__WEBPACK_IMPORTED_MODULE_4__["ConfigService"]])
474
+ ], ConfigComponent);
475
+ return ConfigComponent;
476
+ }());
477
+
478
+
479
+
480
+ /***/ }),
481
+
482
+ /***/ "./src/app/config/config.service.ts":
483
+ /*!******************************************!*\
484
+ !*** ./src/app/config/config.service.ts ***!
485
+ \******************************************/
486
+ /*! exports provided: ConfigService */
487
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
488
+
489
+ "use strict";
490
+ __webpack_require__.r(__webpack_exports__);
491
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConfigService", function() { return ConfigService; });
492
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
493
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
494
+ /* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
495
+
496
+
497
+
498
+ var ConfigService = /** @class */ (function () {
499
+ function ConfigService(http) {
500
+ this.http = http;
501
+ }
502
+ ConfigService.prototype.saveConfig = function (config) {
503
+ return this.http.post('/api/config/save', { config: config });
504
+ };
505
+ ConfigService.prototype.loadConfig = function () {
506
+ return this.http.get('/api/config/load');
507
+ };
508
+ ConfigService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
509
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
510
+ providedIn: 'root'
511
+ }),
512
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"]])
513
+ ], ConfigService);
514
+ return ConfigService;
515
+ }());
516
+
517
+
518
+
519
+ /***/ }),
520
+
521
+ /***/ "./src/app/config/configModel.ts":
522
+ /*!***************************************!*\
523
+ !*** ./src/app/config/configModel.ts ***!
524
+ \***************************************/
525
+ /*! exports provided: Config */
526
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
527
+
528
+ "use strict";
529
+ __webpack_require__.r(__webpack_exports__);
530
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Config", function() { return Config; });
531
+ var Config = /** @class */ (function () {
532
+ function Config() {
533
+ this.server = '192.168.1.25';
534
+ this.port = '8080';
535
+ this.username = 'yarrastia@magaya.com';
536
+ this.password = '123456';
537
+ this.wsURL = 'https://localhost:6110/magaya.wsdl';
538
+ this.dailySchedule = true;
539
+ this.dailyScheduleValue = '00:00:00';
540
+ this.intervalSchedule = false;
541
+ this.intervalScheduleValue = '60';
542
+ this.productionRadio = false;
543
+ this.testRadio = true;
544
+ this.area = 'Area1';
545
+ this.areaPassword = 'prueba';
546
+ this.magayaTax = false;
547
+ this.taxIncluded = true;
548
+ this.ivaTax = '0.00';
549
+ }
550
+ return Config;
551
+ }());
552
+
553
+
554
+
555
+ /***/ }),
556
+
557
+ /***/ "./src/app/email/emailconfig.service.ts":
558
+ /*!**********************************************!*\
559
+ !*** ./src/app/email/emailconfig.service.ts ***!
560
+ \**********************************************/
561
+ /*! exports provided: EmailConfigService */
562
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
563
+
564
+ "use strict";
565
+ __webpack_require__.r(__webpack_exports__);
566
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmailConfigService", function() { return EmailConfigService; });
567
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
568
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
569
+ /* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
570
+
571
+
572
+
573
+ var EmailConfigService = /** @class */ (function () {
574
+ function EmailConfigService(http) {
575
+ this.http = http;
576
+ }
577
+ EmailConfigService.prototype.saveConfig = function (emailConfig) {
578
+ return this.http.post('./api/email/config', { emailConfig: emailConfig });
579
+ };
580
+ EmailConfigService.prototype.testConfig = function (emailConfig) {
581
+ return this.http.post('./api/email/test', { emailConfig: emailConfig });
582
+ };
583
+ EmailConfigService.prototype.loadConfig = function () {
584
+ return this.http.get('./api/email/config');
585
+ };
586
+ EmailConfigService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
587
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
588
+ providedIn: 'root'
589
+ }),
590
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"]])
591
+ ], EmailConfigService);
592
+ return EmailConfigService;
593
+ }());
594
+
595
+
596
+
597
+ /***/ }),
598
+
599
+ /***/ "./src/app/email/emailconfig/emailconfig.component.html":
600
+ /*!**************************************************************!*\
601
+ !*** ./src/app/email/emailconfig/emailconfig.component.html ***!
602
+ \**************************************************************/
603
+ /*! no static exports found */
604
+ /***/ (function(module, exports) {
605
+
606
+ module.exports = "<div class=\"alert alert-success\" role=\"alert\" *ngIf=\"saved\">\r\n La configuración fue guardad satisfactoriamente.\r\n</div>\r\n<div class=\"row d-flex justify-content-center\">\r\n <h4>Configuración de correo electrónico</h4>\r\n</div>\r\n<wizard>\r\n <wizard-step stepTitle=\"Información de seguridad\">\r\n <div class=\"row mt-5\">\r\n <div class=\"col\">\r\n <div class=\"input-group mb-3\">\r\n <div class=\"input-group-prepend\">\r\n <span class=\"input-group-text\" id=\"server\">Servidor de correo</span>\r\n </div>\r\n <input type=\"text\" class=\"form-control\" id=\"server\" #server=\"ngModel\" [(ngModel)]=\"emailConfig.server\">\r\n </div>\r\n </div>\r\n <div class=\"col\">\r\n <div class=\"input-group mb-3\">\r\n <div class=\"input-group-prepend\">\r\n <span class=\"input-group-text\" id=\"port\">Puerto</span>\r\n </div>\r\n <input type=\"text\" class=\"form-control\" id=\"port\" #port=\"ngModel\" [(ngModel)]=\"emailConfig.port\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"form-check mt-2\">\r\n <input type=\"checkbox\" class=\"form-check-input\" id=\"tsl\" [(ngModel)]=\"emailConfig.tslSSL\">\r\n <label class=\"form-check-label\" for=\"tsl\">Requiere TSL/SSL</label>\r\n </div>\r\n <div class=\"form-check mt-2\">\r\n <input type=\"checkbox\" class=\"form-check-input\" id=\"credential\" [(ngModel)]=\"emailConfig.credentials\">\r\n <label class=\"form-check-label\" for=\"credential\">Usar credenciales para la autenticación en el servidor</label>\r\n </div>\r\n <div class=\"row mt-3\" *ngIf=\"emailConfig.credentials\">\r\n <div class=\"col\">\r\n <div class=\"input-group mb-3\">\r\n <div class=\"input-group-prepend\">\r\n <span class=\"input-group-text\" id=\"user\">Usuario</span>\r\n </div>\r\n <input type=\"text\" class=\"form-control\" id=\"user\" #user=\"ngModel\" [(ngModel)]=\"emailConfig.username\">\r\n </div>\r\n </div>\r\n <div class=\"col\">\r\n <div class=\"input-group mb-3\">\r\n <div class=\"input-group-prepend\">\r\n <span class=\"input-group-text\" id=\"password\">Contraseña</span>\r\n </div>\r\n <input type=\"password\" class=\"form-control\" id=\"password\" #password=\"ngModel\"\r\n [(ngModel)]=\"emailConfig.password\">\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"row d-flex justify-content-end mr-3\">\r\n <div class=\"form-group\">\r\n <button type=\"button\" class=\"btn btn-primary\" nextStep>Siguiente <i class=\"fa fa-step-forward\"\r\n aria-hidden=\"true\"></i></button>\r\n </div>\r\n </div>\r\n </wizard-step>\r\n <wizard-step stepTitle=\"Receptores de notificación\" [canExit]=\"validateEmails()\">\r\n\r\n <div class=\"container-fluid mt-2\">\r\n\r\n <div class=\"form-check mb-2\">\r\n <input type=\"checkbox\" class=\"form-check-input\" id=\"sendEmailsToCustomers\"\r\n [(ngModel)]=\"emailConfig.sendEmailsToCustomers\">\r\n <label class=\"form-check-label\" for=\"sendEmailsToCustomers\">Le gustaría recibir notificaciones del proceso?</label>\r\n </div>\r\n\r\n <div [formGroup]=\"emailForm\" *ngIf=\"emailConfig.sendEmailsToCustomers\">\r\n <div formArrayName=\"emails\" *ngFor=\"let email of emailForm.get('emails').controls; index as i;\">\r\n <div [formGroupName]=\"i\">\r\n <div class=\"input-group mb-3\">\r\n <div class=\"input-group-prepend\">\r\n <span class=\"input-group-text\">Dirección de correo electrónico *</span>\r\n </div>\r\n <input type=\"text\" style=\"border-radius: 5px;\" formControlName=\"email\" class=\"form-control\"\r\n [ngClass]=\"{ 'is-invalid':submitted && f.at(i).get('email').errors }\" />\r\n <div *ngIf=\"submitted && f.at(i).get('email').errors\" class=\"invalid-feedback\">\r\n <div *ngIf=\"submitted && f.at(i).get('email').errors.required\">Dirección de correo electrónico es obligatoria</div>\r\n </div>\r\n <div class=\"input-group-append\" *ngIf=\"(emailForm.get('emails').length === i+1)\">\r\n <button type=\"button\" style=\"border-radius: 5px;\" class=\"btn btn-primary ml-1\"\r\n (click)=\"addNewEmail()\"><i class=\"fa fa-plus\" aria-hidden=\"true\"></i></button>\r\n </div>\r\n <div class=\"input-group-append\" *ngIf=\"(emailForm.get('emails').length > 1)\">\r\n <button type=\"button\" style=\"border-radius: 5px;\" class=\"btn btn-danger ml-1\"\r\n (click)=\"deleteEmailField(i)\"><i class=\"fa fa-minus\" aria-hidden=\"true\"></i></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row d-flex justify-content-end mr-3\">\r\n <div class=\"form-group\">\r\n <button type=\"button\" class=\"btn btn-secondary\" previousStep><i class=\"fa fa-step-backward\"\r\n aria-hidden=\"true\"></i> Anterior</button>\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"setSubmitted()\" nextStep>Siguiente <i\r\n class=\"fa fa-step-forward\" aria-hidden=\"true\"></i></button>\r\n </div>\r\n </div>\r\n </wizard-step>\r\n <wizard-step stepTitle=\"Notificación a Magaya\">\r\n\r\n <div class=\"container-fluid mt-2\">\r\n\r\n <div class=\"form-check mt-2 mb-2\">\r\n <input type=\"checkbox\" class=\"form-check-input\" id=\"feedbackToMagaya\"\r\n [(ngModel)]=\"emailConfig.feedbackToMagaya\">\r\n <label class=\"form-check-label\" for=\"feedbackToMagaya\">Desea enviar notificación de estados a Magaya?</label>\r\n </div>\r\n\r\n <div [formGroup]=\"magayaContactForm\" *ngIf=\"emailConfig.feedbackToMagaya\">\r\n <div formArrayName=\"contacts\" *ngFor=\"let contact of magayaContactForm.get('contacts').controls; index as i;\">\r\n <div [formGroupName]=\"i\">\r\n <div class=\"input-group mb-3\">\r\n <div class=\"input-group-prepend\">\r\n <span class=\"input-group-text\">Dirección de correo electrónico *</span>\r\n </div>\r\n <input type=\"text\" style=\"border-radius: 5px;\" formControlName=\"contact\" class=\"form-control\"\r\n [ngClass]=\"{ 'is-invalid':magayaContact && g.at(i).get('contact').errors }\" />\r\n <div *ngIf=\"magayaContact && g.at(i).get('contact').errors\" class=\"invalid-feedback\">\r\n <div *ngIf=\"magayaContact && g.at(i).get('contact').errors.required\">Dirección de correo electrónico es obligatoria</div>\r\n </div>\r\n <div class=\"input-group-append\" *ngIf=\"(magayaContactForm.get('contacts').length === i+1)\">\r\n <button type=\"button\" style=\"border-radius: 5px;\" class=\"btn btn-primary ml-1\"\r\n (click)=\"addNewMagayaEmail()\"><i class=\"fa fa-plus\" aria-hidden=\"true\"></i></button>\r\n </div>\r\n <div class=\"input-group-append\" *ngIf=\"(magayaContactForm.get('contacts').length > 1)\">\r\n <button type=\"button\" style=\"border-radius: 5px;\" class=\"btn btn-danger ml-1\"\r\n (click)=\"deleteContactField(i)\"><i class=\"fa fa-minus\" aria-hidden=\"true\"></i></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row d-flex justify-content-end mr-3\">\r\n <div class=\"form-group\">\r\n <button type=\"button\" class=\"btn btn-secondary\" previousStep><i class=\"fa fa-step-backward\"\r\n aria-hidden=\"true\"></i> Anterior</button>\r\n <button type=\"button\" class=\"btn btn-warning ml-1\" (click)=\"testEmailConfiguration()\"><i class=\"fa fa-check\"\r\n aria-hidden=\"true\"></i> Probar</button>\r\n <button type=\"button\" class=\"btn btn-success ml-1\" (click)=\"saveEmailConfiguration()\"><i class=\"fa fa-save\"\r\n aria-hidden=\"true\"></i> Guardar</button>\r\n <button type=\"button\" class=\"btn btn-success ml-1\" (click)=\"sendEmailConfiguration()\"><i\r\n class=\"fa fa-check-circle\" aria-hidden=\"true\"></i> Finalizar</button>\r\n </div>\r\n </div>\r\n </wizard-step>\r\n</wizard>"
607
+
608
+ /***/ }),
609
+
610
+ /***/ "./src/app/email/emailconfig/emailconfig.component.scss":
611
+ /*!**************************************************************!*\
612
+ !*** ./src/app/email/emailconfig/emailconfig.component.scss ***!
613
+ \**************************************************************/
614
+ /*! no static exports found */
615
+ /***/ (function(module, exports) {
616
+
617
+ module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2VtYWlsL2VtYWlsY29uZmlnL2VtYWlsY29uZmlnLmNvbXBvbmVudC5zY3NzIn0= */"
618
+
619
+ /***/ }),
620
+
621
+ /***/ "./src/app/email/emailconfig/emailconfig.component.ts":
622
+ /*!************************************************************!*\
623
+ !*** ./src/app/email/emailconfig/emailconfig.component.ts ***!
624
+ \************************************************************/
625
+ /*! exports provided: EmailconfigComponent */
626
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
627
+
628
+ "use strict";
629
+ __webpack_require__.r(__webpack_exports__);
630
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmailconfigComponent", function() { return EmailconfigComponent; });
631
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
632
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
633
+ /* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
634
+ /* harmony import */ var _model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../model */ "./src/app/email/model.ts");
635
+ /* harmony import */ var _emailconfig_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../emailconfig.service */ "./src/app/email/emailconfig.service.ts");
636
+
637
+
638
+
639
+
640
+
641
+ var EmailconfigComponent = /** @class */ (function () {
642
+ function EmailconfigComponent(emailFormBuilder, emailSrv) {
643
+ this.emailFormBuilder = emailFormBuilder;
644
+ this.emailSrv = emailSrv;
645
+ this.submitted = false;
646
+ this.magayaContact = false;
647
+ this.saved = false;
648
+ this.tested = false;
649
+ this.emailConfig = new _model__WEBPACK_IMPORTED_MODULE_3__["EmailConfigModel"]();
650
+ this.emailForm = this.emailFormBuilder.group({
651
+ emails: this.emailFormBuilder.array([this.createEmailField()]),
652
+ });
653
+ this.magayaContactForm = this.emailFormBuilder.group({
654
+ contacts: this.emailFormBuilder.array([this.createMagayaEmailField()]),
655
+ });
656
+ }
657
+ EmailconfigComponent.prototype.ngOnInit = function () {
658
+ var _this = this;
659
+ this.emailSrv.loadConfig()
660
+ .subscribe(function (conf) {
661
+ if (conf) {
662
+ _this.emailConfig = conf;
663
+ var emailFields = _this.emailConfig.customerEmails.split(',');
664
+ var contactFields = _this.emailConfig.magayaContacts.split(',');
665
+ if (emailFields.length > 0) {
666
+ var fields = [];
667
+ for (var _i = 0, emailFields_1 = emailFields; _i < emailFields_1.length; _i++) {
668
+ var fieldValue = emailFields_1[_i];
669
+ fields.push(_this.createEmailField(fieldValue));
670
+ }
671
+ _this.emailForm = _this.emailFormBuilder.group({
672
+ emails: _this.emailFormBuilder.array(fields)
673
+ });
674
+ }
675
+ else {
676
+ _this.emailForm = _this.emailFormBuilder.group({
677
+ emails: _this.emailFormBuilder.array([_this.createEmailField()]),
678
+ });
679
+ }
680
+ if (contactFields.length > 0) {
681
+ var fields = [];
682
+ for (var _a = 0, contactFields_1 = contactFields; _a < contactFields_1.length; _a++) {
683
+ var fieldValue = contactFields_1[_a];
684
+ fields.push(_this.createMagayaEmailField(fieldValue));
685
+ }
686
+ _this.magayaContactForm = _this.emailFormBuilder.group({
687
+ contacts: _this.emailFormBuilder.array(fields),
688
+ });
689
+ }
690
+ else {
691
+ _this.magayaContactForm = _this.emailFormBuilder.group({
692
+ contacts: _this.emailFormBuilder.array([_this.createMagayaEmailField()]),
693
+ });
694
+ }
695
+ }
696
+ else {
697
+ _this.emailConfig = new _model__WEBPACK_IMPORTED_MODULE_3__["EmailConfigModel"]();
698
+ var contactFields = _this.emailConfig.magayaContacts.split(',');
699
+ _this.emailForm = _this.emailFormBuilder.group({
700
+ emails: _this.emailFormBuilder.array([_this.createEmailField()]),
701
+ });
702
+ if (contactFields.length > 0) {
703
+ var fields = [];
704
+ for (var _b = 0, contactFields_2 = contactFields; _b < contactFields_2.length; _b++) {
705
+ var fieldValue = contactFields_2[_b];
706
+ fields.push(_this.createMagayaEmailField(fieldValue));
707
+ }
708
+ _this.magayaContactForm = _this.emailFormBuilder.group({
709
+ contacts: _this.emailFormBuilder.array(fields),
710
+ });
711
+ }
712
+ else {
713
+ _this.magayaContactForm = _this.emailFormBuilder.group({
714
+ contacts: _this.emailFormBuilder.array([_this.createMagayaEmailField()]),
715
+ });
716
+ }
717
+ }
718
+ }, function (err) {
719
+ _this.emailConfig = new _model__WEBPACK_IMPORTED_MODULE_3__["EmailConfigModel"]();
720
+ var contactFields = _this.emailConfig.magayaContacts.split(',');
721
+ _this.emailForm = _this.emailFormBuilder.group({
722
+ emails: _this.emailFormBuilder.array([_this.createEmailField()]),
723
+ });
724
+ if (contactFields.length > 0) {
725
+ var fields = [];
726
+ for (var _i = 0, contactFields_3 = contactFields; _i < contactFields_3.length; _i++) {
727
+ var fieldValue = contactFields_3[_i];
728
+ fields.push(_this.createMagayaEmailField(fieldValue));
729
+ }
730
+ _this.magayaContactForm = _this.emailFormBuilder.group({
731
+ contacts: _this.emailFormBuilder.array(fields),
732
+ });
733
+ }
734
+ else {
735
+ _this.magayaContactForm = _this.emailFormBuilder.group({
736
+ contacts: _this.emailFormBuilder.array([_this.createMagayaEmailField()]),
737
+ });
738
+ }
739
+ });
740
+ };
741
+ EmailconfigComponent.prototype.createEmailField = function (value) {
742
+ if (value === void 0) { value = ''; }
743
+ return this.emailFormBuilder.group({
744
+ email: [value, _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required]
745
+ });
746
+ };
747
+ EmailconfigComponent.prototype.createMagayaEmailField = function (value) {
748
+ if (value === void 0) { value = ''; }
749
+ return this.emailFormBuilder.group({
750
+ contact: [value, _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required]
751
+ });
752
+ };
753
+ Object.defineProperty(EmailconfigComponent.prototype, "f", {
754
+ get: function () {
755
+ var fields = this.emailForm.get('emails');
756
+ return fields;
757
+ },
758
+ enumerable: true,
759
+ configurable: true
760
+ });
761
+ Object.defineProperty(EmailconfigComponent.prototype, "g", {
762
+ get: function () {
763
+ var fields = this.magayaContactForm.get('contacts');
764
+ return fields;
765
+ },
766
+ enumerable: true,
767
+ configurable: true
768
+ });
769
+ EmailconfigComponent.prototype.addNewEmail = function () {
770
+ this.emailAddress = this.emailForm.get('emails');
771
+ this.emailAddress.push(this.createEmailField());
772
+ };
773
+ EmailconfigComponent.prototype.addNewMagayaEmail = function () {
774
+ this.emailAddress = this.magayaContactForm.get('contacts');
775
+ this.emailAddress.push(this.createMagayaEmailField());
776
+ };
777
+ EmailconfigComponent.prototype.setSubmitted = function () {
778
+ this.submitted = true;
779
+ };
780
+ EmailconfigComponent.prototype.validateEmails = function () {
781
+ if (this.emailConfig.sendEmailsToCustomers) {
782
+ var emails = this.emailForm.get('emails');
783
+ if (emails) {
784
+ for (var i = 0; i < emails.length; i++) {
785
+ if (emails.at(i).value.email === '' || emails.at(i).value.email === ' ') {
786
+ return false;
787
+ }
788
+ }
789
+ }
790
+ }
791
+ return true;
792
+ };
793
+ EmailconfigComponent.prototype.validateContacts = function () {
794
+ if (this.emailConfig.feedbackToMagaya) {
795
+ var contacts = this.magayaContactForm.get('contacts');
796
+ for (var i = 0; i < contacts.length; i++) {
797
+ if (contacts.at(i).value.contact === '' || contacts.at(i).value.contact === ' ') {
798
+ return false;
799
+ }
800
+ }
801
+ }
802
+ return true;
803
+ };
804
+ EmailconfigComponent.prototype.saveCustomersEmail = function () {
805
+ var emails = this.emailForm.get('emails');
806
+ this.emailConfig.customerEmails = '';
807
+ for (var i = 0; i < emails.length; i++) {
808
+ var cont = emails.at(i).value.email;
809
+ if (cont && cont !== '' && cont !== ' ') {
810
+ this.emailConfig.customerEmails += cont;
811
+ if (emails.length !== i + 1 && emails.at(i + 1).value.email
812
+ && emails.at(i + 1).value.email !== '' && emails.at(i + 1).value.email !== '') {
813
+ this.emailConfig.customerEmails += ',';
814
+ }
815
+ }
816
+ }
817
+ };
818
+ EmailconfigComponent.prototype.saveMagayaEmail = function () {
819
+ var contacts = this.magayaContactForm.get('contacts');
820
+ this.emailConfig.magayaContacts = '';
821
+ for (var i = 0; i < contacts.length; i++) {
822
+ var cont = contacts.at(i).value.contact;
823
+ if (cont && cont !== '' && cont !== ' ') {
824
+ this.emailConfig.magayaContacts += cont;
825
+ if (contacts.length !== i + 1 && contacts.at(i + 1).value.contact
826
+ && contacts.at(i + 1).value.contact !== '' && contacts.at(i + 1).value.contact !== '') {
827
+ this.emailConfig.magayaContacts += ',';
828
+ }
829
+ }
830
+ }
831
+ };
832
+ EmailconfigComponent.prototype.deleteEmailField = function (idx) {
833
+ var emails = this.emailForm.get('emails');
834
+ emails.removeAt(idx);
835
+ };
836
+ EmailconfigComponent.prototype.deleteContactField = function (idx) {
837
+ var contacts = this.magayaContactForm.get('contacts');
838
+ contacts.removeAt(idx);
839
+ };
840
+ EmailconfigComponent.prototype.saveEmailConfiguration = function () {
841
+ this.magayaContact = false;
842
+ if (this.validateContacts()) {
843
+ this.saveCustomersEmail();
844
+ this.saveMagayaEmail();
845
+ }
846
+ else {
847
+ this.magayaContact = true;
848
+ }
849
+ };
850
+ EmailconfigComponent.prototype.sendEmailConfiguration = function () {
851
+ var _this = this;
852
+ this.magayaContact = false;
853
+ if (this.validateContacts()) {
854
+ this.saveCustomersEmail();
855
+ this.saveMagayaEmail();
856
+ this.saved = false;
857
+ this.tested = false;
858
+ this.emailSrv.saveConfig(this.emailConfig)
859
+ .subscribe(function (result) {
860
+ if (result) {
861
+ _this.saved = true;
862
+ }
863
+ });
864
+ }
865
+ else {
866
+ this.magayaContact = true;
867
+ }
868
+ };
869
+ EmailconfigComponent.prototype.testEmailConfiguration = function () {
870
+ var _this = this;
871
+ this.saveCustomersEmail();
872
+ this.saveMagayaEmail();
873
+ this.tested = false;
874
+ this.saved = false;
875
+ this.emailSrv.testConfig(this.emailConfig)
876
+ .subscribe(function (result) {
877
+ if (result) {
878
+ _this.tested = true;
879
+ }
880
+ });
881
+ };
882
+ EmailconfigComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
883
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
884
+ selector: 'app-emailconfig',
885
+ template: __webpack_require__(/*! ./emailconfig.component.html */ "./src/app/email/emailconfig/emailconfig.component.html"),
886
+ styles: [__webpack_require__(/*! ./emailconfig.component.scss */ "./src/app/email/emailconfig/emailconfig.component.scss")]
887
+ }),
888
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormBuilder"], _emailconfig_service__WEBPACK_IMPORTED_MODULE_4__["EmailConfigService"]])
889
+ ], EmailconfigComponent);
890
+ return EmailconfigComponent;
891
+ }());
892
+
893
+
894
+
895
+ /***/ }),
896
+
897
+ /***/ "./src/app/email/emailpanel/emailpanel.component.html":
898
+ /*!************************************************************!*\
899
+ !*** ./src/app/email/emailpanel/emailpanel.component.html ***!
900
+ \************************************************************/
901
+ /*! no static exports found */
902
+ /***/ (function(module, exports) {
903
+
904
+ module.exports = "<p>\n emailpanel works!\n</p>\n"
905
+
906
+ /***/ }),
907
+
908
+ /***/ "./src/app/email/emailpanel/emailpanel.component.scss":
909
+ /*!************************************************************!*\
910
+ !*** ./src/app/email/emailpanel/emailpanel.component.scss ***!
911
+ \************************************************************/
912
+ /*! no static exports found */
913
+ /***/ (function(module, exports) {
914
+
915
+ module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2VtYWlsL2VtYWlscGFuZWwvZW1haWxwYW5lbC5jb21wb25lbnQuc2NzcyJ9 */"
916
+
917
+ /***/ }),
918
+
919
+ /***/ "./src/app/email/emailpanel/emailpanel.component.ts":
920
+ /*!**********************************************************!*\
921
+ !*** ./src/app/email/emailpanel/emailpanel.component.ts ***!
922
+ \**********************************************************/
923
+ /*! exports provided: EmailpanelComponent */
924
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
925
+
926
+ "use strict";
927
+ __webpack_require__.r(__webpack_exports__);
928
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmailpanelComponent", function() { return EmailpanelComponent; });
929
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
930
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
931
+
932
+
933
+ var EmailpanelComponent = /** @class */ (function () {
934
+ function EmailpanelComponent() {
935
+ }
936
+ EmailpanelComponent.prototype.ngOnInit = function () {
937
+ };
938
+ EmailpanelComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
939
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
940
+ selector: 'app-emailpanel',
941
+ template: __webpack_require__(/*! ./emailpanel.component.html */ "./src/app/email/emailpanel/emailpanel.component.html"),
942
+ styles: [__webpack_require__(/*! ./emailpanel.component.scss */ "./src/app/email/emailpanel/emailpanel.component.scss")]
943
+ }),
944
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [])
945
+ ], EmailpanelComponent);
946
+ return EmailpanelComponent;
947
+ }());
948
+
949
+
950
+
951
+ /***/ }),
952
+
953
+ /***/ "./src/app/email/model.ts":
954
+ /*!********************************!*\
955
+ !*** ./src/app/email/model.ts ***!
956
+ \********************************/
957
+ /*! exports provided: EmailConfigModel */
958
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
959
+
960
+ "use strict";
961
+ __webpack_require__.r(__webpack_exports__);
962
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmailConfigModel", function() { return EmailConfigModel; });
963
+ var EmailConfigModel = /** @class */ (function () {
964
+ function EmailConfigModel() {
965
+ this.server = '';
966
+ this.username = '';
967
+ this.password = '';
968
+ this.port = 25;
969
+ this.customerEmails = '';
970
+ this.magayaContacts = 'yarrastia@magaya.com, rcachoeira@magaya.com, integration_issues@magaya.com, yrodriguez@magaya.com';
971
+ this.feedbackToMagaya = false;
972
+ this.sendEmailsToCustomers = true;
973
+ this.tslSSL = false;
974
+ this.credentials = false;
975
+ }
976
+ return EmailConfigModel;
977
+ }());
978
+
979
+
980
+
981
+ /***/ }),
982
+
983
+ /***/ "./src/app/ftpconfig/ftpconfig.component.html":
984
+ /*!****************************************************!*\
985
+ !*** ./src/app/ftpconfig/ftpconfig.component.html ***!
986
+ \****************************************************/
987
+ /*! no static exports found */
988
+ /***/ (function(module, exports) {
989
+
990
+ module.exports = "<div class=\"container-fluid\">\r\n\r\n <div class=\"alert alert-success\" role=\"alert\" *ngIf=\"saved\">\r\n Configuration was saved succesfully.\r\n </div>\r\n <div class=\"alert alert-success\" role=\"alert\" *ngIf=\"testSuccesfully\">\r\n Test connection completed! FTP available!\r\n </div>\r\n <div class=\"alert alert-danger\" role=\"alert\" *ngIf=\"testError\">\r\n Test connection failed! Wrong configuration!\r\n <br>\r\n {{error.message}}\r\n </div>\r\n\r\n <div class=\"row d-flex justify-content-center\">\r\n <h5>FTP Server configuration</h5>\r\n </div>\r\n \r\n <div class=\"form-group row\">\r\n <div class=\"input-group mb-3 col\">\r\n <div class=\"input-group-prepend\">\r\n <label class=\"input-group-text\" for=\"protocol\">Host</label>\r\n </div>\r\n <input type=\"text\" class=\"form-control\" #host=\"ngModel\" [(ngModel)]=\"ftp.host\">\r\n </div>\r\n <div class=\"input-group mb-3 col\">\r\n <div class=\"input-group-prepend\">\r\n <label class=\"input-group-text\" for=\"protocol\">User</label>\r\n </div>\r\n <input type=\"text\" #username=\"ngModel\" class=\"form-control\" [(ngModel)]=\"ftp.username\">\r\n </div>\r\n <div class=\"input-group mb-3 col\">\r\n <div class=\"input-group-prepend\">\r\n <label class=\"input-group-text\" for=\"protocol\">Password</label>\r\n </div>\r\n <input type=\"password\" #password=\"ngModel\" class=\"form-control\" [(ngModel)]=\"ftp.password\">\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n <div class=\"form-group row\">\r\n <div class=\"input-group mb-3 col\">\r\n <div class=\"input-group-prepend\">\r\n <label class=\"input-group-text\" for=\"protocol\">Protocol</label>\r\n </div>\r\n <select class=\"custom-select\" id=\"protocol\" #protocol=\"ngModel\" [(ngModel)]=\"ftp.protocol\">\r\n <option selected>Choose...</option>\r\n <option value=\"ftp\">FTP</option>\r\n <option value=\"ftps\">FTPS</option>\r\n <option value=\"sftp\">SFTP</option>\r\n </select>\r\n </div>\r\n <div class=\"input-group mb-3 col\">\r\n <div class=\"input-group-prepend\">\r\n <label class=\"input-group-text\" for=\"protocol\">Port</label>\r\n </div>\r\n <input type=\"text\" class=\"form-control\" #port=\"ngModel\" [(ngModel)]=\"ftp.port\">\r\n </div>\r\n <div class=\"input-group mb-3 col\">\r\n <div class=\"input-group-prepend\">\r\n <label class=\"input-group-text\" for=\"protocol\">Retries</label>\r\n </div>\r\n <input type=\"number\" class=\"form-control\" #retries=\"ngModel\" [(ngModel)]=\"ftp.retries\">\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"form-group row\">\r\n <div class=\"input-group mb-3 col\">\r\n <div class=\"input-group-prepend\">\r\n <label class=\"input-group-text\" for=\"protocol\">Time</label>\r\n </div>\r\n <input type=\"number\" class=\"form-control\" #timeout=\"ngModel\" [(ngModel)]=\"ftp.time\">\r\n <select class=\"custom-select\" id=\"timeoutUnit\" #timeoutUnit=\"ngModel\" [(ngModel)]=\"ftp.tunit\">\r\n <option selected>Choose..</option>\r\n <option value=\"second\">Sec</option>\r\n <option value=\"minutes\">Min</option>\r\n <option value=\"hours\">Hr</option>\r\n </select>\r\n </div>\r\n\r\n <div class=\"input-group mb-3 col\">\r\n <div class=\"input-group-prepend\">\r\n <label class=\"input-group-text\" for=\"protocol\">Retry Interval</label>\r\n </div>\r\n <input type=\"number\" class=\"form-control\" #retryInterval=\"ngModel\" [(ngModel)]=\"ftp.retryInterval\">\r\n </div>\r\n\r\n <div class=\"input-group mb-3 col\">\r\n <div class=\"input-group-prepend\">\r\n <div class=\"input-group-text\">\r\n <input type=\"checkbox\" aria-label=\"Checkbox for following text input\" (change)=\"sshKeyClick()\">\r\n </div>\r\n </div>\r\n <div class=\"input-group-prepend\">\r\n <label class=\"input-group-text\" for=\"protocol\">SSH Key</label>\r\n </div>\r\n <input type=\"text\" class=\"form-control\" aria-label=\"Text input with checkbox\" #requireSSHKey=\"ngModel\"\r\n [(disabled)]=\"!ftp.requireSSHKey\" [(ngModel)]=\"ftp.sshKeyPath\">\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <div class=\"row d-flex justify-content-end\">\r\n <div class=\"form-group\">\r\n <button type=\"button\" class=\"btn btn-warning\" (click)=\"test()\">Test Connection</button>\r\n <button type=\"button\" class=\"btn btn-success ml-2\" (click)=\"save()\" [(disabled)]=\"cantSave\">Save</button>\r\n <button type=\"button\" class=\"btn btn-primary ml-2\" (click)=\"start()\" [(disabled)]=\"cantStart\" *ngIf=\"!isStarted\">Start</button>\r\n <button type=\"button\" class=\"btn btn-dark ml-2\" (click)=\"stop()\" *ngIf=\"isStarted\">Stop</button>\r\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"cancel()\">Cancel</button>\r\n </div>\r\n </div>\r\n\r\n <!--\r\n <div *ngIf=\"canSelectPath\">\r\n\r\n <div class=\"form-group row\">\r\n <div class=\"input-group mb-3 col\">\r\n <div class=\"input-group-prepend\">\r\n <label class=\"input-group-text\" for=\"protocol\">In Path</label>\r\n </div>\r\n <select class=\"custom-select\" id=\"inPath\" #inPath=\"ngModel\" [(ngModel)]=\"ftp.inPath\">\r\n <option selected>Choose...</option>\r\n <option value=\"ftp\">FTP</option>\r\n <option value=\"ftps\">FTPS</option>\r\n <option value=\"sftp\">SFTP</option>\r\n </select>\r\n </div>\r\n <div class=\"input-group mb-3 col\">\r\n <div class=\"input-group-prepend\">\r\n <label class=\"input-group-text\" for=\"protocol\">Out Path</label>\r\n </div>\r\n <select class=\"custom-select\" id=\"outPath\" #outPath=\"ngModel\" [(ngModel)]=\"ftp.outPath\">\r\n <option selected>Choose...</option>\r\n <option value=\"ftp\">FTP</option>\r\n <option value=\"ftps\">FTPS</option>\r\n <option value=\"sftp\">SFTP</option>\r\n </select>\r\n </div>\r\n\r\n </div>\r\n </div> \r\n\r\n<div>{{ftp.tunit}}</div>\r\n-->\r\n</div>"
991
+
992
+ /***/ }),
993
+
994
+ /***/ "./src/app/ftpconfig/ftpconfig.component.scss":
995
+ /*!****************************************************!*\
996
+ !*** ./src/app/ftpconfig/ftpconfig.component.scss ***!
997
+ \****************************************************/
998
+ /*! no static exports found */
999
+ /***/ (function(module, exports) {
1000
+
1001
+ module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2Z0cGNvbmZpZy9mdHBjb25maWcuY29tcG9uZW50LnNjc3MifQ== */"
1002
+
1003
+ /***/ }),
1004
+
1005
+ /***/ "./src/app/ftpconfig/ftpconfig.component.ts":
1006
+ /*!**************************************************!*\
1007
+ !*** ./src/app/ftpconfig/ftpconfig.component.ts ***!
1008
+ \**************************************************/
1009
+ /*! exports provided: FtpconfigComponent */
1010
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1011
+
1012
+ "use strict";
1013
+ __webpack_require__.r(__webpack_exports__);
1014
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FtpconfigComponent", function() { return FtpconfigComponent; });
1015
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
1016
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
1017
+ /* harmony import */ var _model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./model */ "./src/app/ftpconfig/model.ts");
1018
+ /* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
1019
+ /* harmony import */ var _ftpconfig_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ftpconfig.service */ "./src/app/ftpconfig/ftpconfig.service.ts");
1020
+
1021
+
1022
+
1023
+
1024
+
1025
+ var FtpconfigComponent = /** @class */ (function () {
1026
+ function FtpconfigComponent(router, ftpSrv) {
1027
+ this.router = router;
1028
+ this.ftpSrv = ftpSrv;
1029
+ this.saved = false;
1030
+ this.testSuccesfully = false;
1031
+ this.testError = false;
1032
+ this.canSelectPath = false;
1033
+ this.cantSave = true;
1034
+ this.cantStart = true;
1035
+ this.isStarted = false;
1036
+ this.ftp = new _model__WEBPACK_IMPORTED_MODULE_2__["FTPConfigModel"]();
1037
+ }
1038
+ FtpconfigComponent.prototype.ngOnInit = function () {
1039
+ var _this = this;
1040
+ this.ftpSrv.loadConfig()
1041
+ .subscribe(function (conf) {
1042
+ if (conf) {
1043
+ _this.ftp = conf;
1044
+ }
1045
+ else {
1046
+ _this.ftp = new _model__WEBPACK_IMPORTED_MODULE_2__["FTPConfigModel"]();
1047
+ }
1048
+ });
1049
+ this.ftpSrv.getProcessStatus().subscribe(function (status) {
1050
+ _this.isStarted = status.isStarted;
1051
+ });
1052
+ };
1053
+ FtpconfigComponent.prototype.stop = function () {
1054
+ var _this = this;
1055
+ this.ftpSrv.stopProcess().subscribe(function (result) {
1056
+ _this.isStarted = false;
1057
+ });
1058
+ };
1059
+ FtpconfigComponent.prototype.sshKeyClick = function () {
1060
+ if (this.ftp.requireSSHKey) {
1061
+ this.ftp.requireSSHKey = false;
1062
+ }
1063
+ else {
1064
+ this.ftp.requireSSHKey = true;
1065
+ }
1066
+ };
1067
+ FtpconfigComponent.prototype.save = function () {
1068
+ var _this = this;
1069
+ this.saved = false;
1070
+ this.isStarted = false;
1071
+ this.cantStart = true;
1072
+ this.testSuccesfully = false;
1073
+ this.testError = false;
1074
+ this.canSelectPath = false;
1075
+ this.cantStart = false;
1076
+ this.ftpSrv.saveConfig(this.ftp).subscribe(function (res) {
1077
+ if (res) {
1078
+ _this.saved = true;
1079
+ _this.cantStart = false;
1080
+ }
1081
+ });
1082
+ };
1083
+ FtpconfigComponent.prototype.start = function () {
1084
+ var _this = this;
1085
+ this.isStarted = true;
1086
+ this.saved = false;
1087
+ this.testSuccesfully = false;
1088
+ this.testError = false;
1089
+ this.canSelectPath = false;
1090
+ this.save();
1091
+ this.ftpSrv.startProcess().subscribe(function (res) {
1092
+ if (res) {
1093
+ _this.saved = true;
1094
+ }
1095
+ });
1096
+ };
1097
+ FtpconfigComponent.prototype.test = function () {
1098
+ var _this = this;
1099
+ this.isStarted = false;
1100
+ this.saved = false;
1101
+ this.testSuccesfully = false;
1102
+ this.testError = false;
1103
+ this.cantSave = true;
1104
+ this.cantStart = true;
1105
+ this.canSelectPath = false;
1106
+ this.ftpSrv.testConfig(this.ftp).subscribe(function (response) {
1107
+ if (response) {
1108
+ _this.testError = false;
1109
+ _this.testSuccesfully = true;
1110
+ _this.cantSave = false;
1111
+ _this.cantStart = false;
1112
+ _this.canSelectPath = true;
1113
+ }
1114
+ }, function (err) {
1115
+ if (err) {
1116
+ _this.testSuccesfully = false;
1117
+ _this.testError = true;
1118
+ _this.error = err.error;
1119
+ }
1120
+ });
1121
+ };
1122
+ FtpconfigComponent.prototype.cancel = function () {
1123
+ window.close();
1124
+ };
1125
+ FtpconfigComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
1126
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
1127
+ selector: 'app-ftpconfig',
1128
+ template: __webpack_require__(/*! ./ftpconfig.component.html */ "./src/app/ftpconfig/ftpconfig.component.html"),
1129
+ styles: [__webpack_require__(/*! ./ftpconfig.component.scss */ "./src/app/ftpconfig/ftpconfig.component.scss")]
1130
+ }),
1131
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_3__["Router"], _ftpconfig_service__WEBPACK_IMPORTED_MODULE_4__["FtpconfigService"]])
1132
+ ], FtpconfigComponent);
1133
+ return FtpconfigComponent;
1134
+ }());
1135
+
1136
+
1137
+
1138
+ /***/ }),
1139
+
1140
+ /***/ "./src/app/ftpconfig/ftpconfig.service.ts":
1141
+ /*!************************************************!*\
1142
+ !*** ./src/app/ftpconfig/ftpconfig.service.ts ***!
1143
+ \************************************************/
1144
+ /*! exports provided: FtpconfigService */
1145
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1146
+
1147
+ "use strict";
1148
+ __webpack_require__.r(__webpack_exports__);
1149
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FtpconfigService", function() { return FtpconfigService; });
1150
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
1151
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
1152
+ /* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
1153
+
1154
+
1155
+
1156
+ var FtpconfigService = /** @class */ (function () {
1157
+ function FtpconfigService(http) {
1158
+ this.http = http;
1159
+ }
1160
+ FtpconfigService.prototype.saveConfig = function (ftpConfig) {
1161
+ return this.http.post('./api/ftp/config', { ftpConfig: ftpConfig });
1162
+ };
1163
+ FtpconfigService.prototype.startProcess = function () {
1164
+ return this.http.get('./integration/start-process-ftp');
1165
+ };
1166
+ FtpconfigService.prototype.stopProcess = function () {
1167
+ return this.http.get('./integration/stop-process-ftp');
1168
+ };
1169
+ FtpconfigService.prototype.loadConfig = function () {
1170
+ return this.http.get('./api/ftp/config');
1171
+ };
1172
+ FtpconfigService.prototype.testConfig = function (ftpConfig) {
1173
+ return this.http.post('./api/ftp/test', { ftpConfig: ftpConfig });
1174
+ };
1175
+ FtpconfigService.prototype.getProcessStatus = function () {
1176
+ return this.http.get('./integration/get-status-process');
1177
+ };
1178
+ FtpconfigService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
1179
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
1180
+ providedIn: 'root'
1181
+ }),
1182
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"]])
1183
+ ], FtpconfigService);
1184
+ return FtpconfigService;
1185
+ }());
1186
+
1187
+
1188
+
1189
+ /***/ }),
1190
+
1191
+ /***/ "./src/app/ftpconfig/model.ts":
1192
+ /*!************************************!*\
1193
+ !*** ./src/app/ftpconfig/model.ts ***!
1194
+ \************************************/
1195
+ /*! exports provided: FTPConfigModel */
1196
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1197
+
1198
+ "use strict";
1199
+ __webpack_require__.r(__webpack_exports__);
1200
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FTPConfigModel", function() { return FTPConfigModel; });
1201
+ var FTPConfigModel = /** @class */ (function () {
1202
+ function FTPConfigModel() {
1203
+ this.host = '';
1204
+ this.username = '';
1205
+ this.password = '';
1206
+ this.protocol = 'ftp';
1207
+ this.port = 22;
1208
+ this.escape = true;
1209
+ this.retries = 2;
1210
+ this.time = 10;
1211
+ this.retryInterval = 5;
1212
+ this.retryMultiplier = 1;
1213
+ this.requiresPassword = true;
1214
+ this.autoConfirm = true;
1215
+ this.cwd = '';
1216
+ this.additionalLftpCommands = '';
1217
+ this.requireSSHKey = false;
1218
+ this.sshKeyPath = '';
1219
+ this.tunit = 'second';
1220
+ this.inPath = '/36016/in';
1221
+ this.outPath = '/36016/out';
1222
+ this.urlList = '';
1223
+ }
1224
+ return FTPConfigModel;
1225
+ }());
1226
+
1227
+
1228
+
1229
+ /***/ }),
1230
+
1231
+ /***/ "./src/app/invoice-number/creditmemo/creditmemo.component.html":
1232
+ /*!*********************************************************************!*\
1233
+ !*** ./src/app/invoice-number/creditmemo/creditmemo.component.html ***!
1234
+ \*********************************************************************/
1235
+ /*! no static exports found */
1236
+ /***/ (function(module, exports) {
1237
+
1238
+ module.exports = "<div class=\"container-fluid\">\n\n <div class=\"alert alert-success\" role=\"alert\" *ngIf=\"invSrv.Csaved\">\n Configuración guardada satisfactoriamente.\n </div>\n <div class=\"alert alert-danger\" role=\"alert\" *ngIf=\"invSrv.Cerror\">\n Falló el intento de guardad la configuración.\n <br>\n {{error.message}}\n </div>\n\n <div class=\"row d-flex justify-content-center\">\n <h5>Configuración de las Notas de Créditos</h5>\n </div>\n\n <div class=\"form-check mt-2 mb-3\">\n <input type=\"checkbox\" class=\"form-check-input\" id=\"creditMemoCanStart\"\n [(ngModel)]=\"invSrv.setting.creditMemoCanStart\">\n <label class=\"form-check-label\" for=\"creditMemoCanStart\">Habilitar configuración de Notas de Crédito</label>\n </div>\n\n <div *ngIf=\"invSrv.setting.creditMemoCanStart\">\n\n <div class=\"input-group mb-3\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\">CAI</span>\n </div>\n <input type=\"text\" class=\"form-control\" #cainumber=\"ngModel\" [(ngModel)]=\"invSrv.setting.creditMemoCAI\">\n </div>\n\n <div class=\"input-group mb-3\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\">Fecha límite de emisión</span>\n </div>\n <input type=\"date\" class=\"form-control\" #expdate=\"ngModel\"\n [(ngModel)]=\"invSrv.setting.creditMemoPackageExpirationDate\">\n </div>\n\n <div class=\"input-group mb-3\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\">Número inicial</span>\n </div>\n <input type=\"text\" class=\"form-control\" #stnumber=\"ngModel\" mask=\"000-000-00-00000000\" [showMaskTyped]=\"true\"\n [(ngModel)]=\"invSrv.setting.creditMemoPackageNumberStart\" (ngModelChange)=\"onChangeStart($event)\">\n </div>\n\n <div class=\"input-group mb-3\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\">Número final</span>\n </div>\n <input type=\"text\" class=\"form-control\" #endnumber=\"ngModel\" mask=\"000-000-00-00000000\" [showMaskTyped]=\"true\"\n [(ngModel)]=\"invSrv.setting.creditMemoPackageNumberEnd\" (ngModelChange)=\"onChangeEnd($event)\">\n </div>\n\n <div class=\"form-check mt-2\">\n <input type=\"checkbox\" class=\"form-check-input\" id=\"cemail\"\n [(ngModel)]=\"invSrv.setting.creditMemoPackageEmailNotificationActive\">\n <label class=\"form-check-label\" for=\"cemail\">Habilitar notificación por correo electrónico</label>\n </div>\n\n <div class=\"input-group mb-3\" *ngIf=\"invSrv.setting.creditMemoPackageEmailNotificationActive\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\">Notificar faltando</span>\n </div>\n <input type=\"text\" class=\"form-control\" #notnumber=\"ngModel\"\n [(ngModel)]=\"invSrv.setting.creditMemoPackageEmailNotificationNumber\">\n </div>\n </div>\n\n <div class=\"mb-3\">\n <div class=\"alert alert-success\" role=\"alert\" *ngIf=\"invSrv.cdmCSaved\">\n Asignación del número siguiente de forma satisfactoria.\n </div>\n <div class=\"alert alert-danger\" role=\"alert\" *ngIf=\"invSrv.cdmCError\">\n No se pudo asignar el número siguiente.\n <br>\n {{error.message}}\n </div>\n <div class=\"input-group mb-3 mt-2\">\n <div class=\"input-group-prepend\">\n <div class=\"input-group-text\">\n <input type=\"checkbox\" aria-label=\"\" [(disabled)] = \"invSrv.isCreditMemoStarted\" (change)=\"selectCurrent()\">\n </div>\n </div>\n <div class=\"input-group-prepend\">\n <label class=\"input-group-text\" for=\"protocol\">Siguiente número para Notas de Crédito</label>\n </div>\n <input type=\"text\" class=\"form-control\" #cdmcurrent=\"ngModel\" [(disabled)]=\"!activateCurrent\"\n [(ngModel)]=\"invSrv.setting.CDMCurrent\">\n <button type=\"button\" class=\"btn btn-success ml-2\" (click)=\"setCurrent()\"\n [(disabled)]=\"!activateCurrent\">Asignar</button>\n </div>\n </div>\n\n\n\n\n <div class=\"row d-flex justify-content-end mr-1\">\n <div class=\"form-group\">\n <button type=\"button\" class=\"btn btn-success ml-2\" (click)=\"save()\" [(disabled)]=\"cantSave\">Guardar</button>\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"cancel()\">Cancelar</button>\n </div>\n </div>\n</div>"
1239
+
1240
+ /***/ }),
1241
+
1242
+ /***/ "./src/app/invoice-number/creditmemo/creditmemo.component.scss":
1243
+ /*!*********************************************************************!*\
1244
+ !*** ./src/app/invoice-number/creditmemo/creditmemo.component.scss ***!
1245
+ \*********************************************************************/
1246
+ /*! no static exports found */
1247
+ /***/ (function(module, exports) {
1248
+
1249
+ module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2ludm9pY2UtbnVtYmVyL2NyZWRpdG1lbW8vY3JlZGl0bWVtby5jb21wb25lbnQuc2NzcyJ9 */"
1250
+
1251
+ /***/ }),
1252
+
1253
+ /***/ "./src/app/invoice-number/creditmemo/creditmemo.component.ts":
1254
+ /*!*******************************************************************!*\
1255
+ !*** ./src/app/invoice-number/creditmemo/creditmemo.component.ts ***!
1256
+ \*******************************************************************/
1257
+ /*! exports provided: CreditmemoComponent */
1258
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1259
+
1260
+ "use strict";
1261
+ __webpack_require__.r(__webpack_exports__);
1262
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CreditmemoComponent", function() { return CreditmemoComponent; });
1263
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
1264
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
1265
+ /* harmony import */ var _settings_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../settings.service */ "./src/app/invoice-number/settings.service.ts");
1266
+
1267
+
1268
+
1269
+ var CreditmemoComponent = /** @class */ (function () {
1270
+ function CreditmemoComponent(invSrv) {
1271
+ this.invSrv = invSrv;
1272
+ this.activateCurrent = false;
1273
+ }
1274
+ CreditmemoComponent.prototype.ngOnDestroy = function () {
1275
+ this.sub.unsubscribe();
1276
+ };
1277
+ CreditmemoComponent.prototype.ngOnInit = function () {
1278
+ var _this = this;
1279
+ this.invSrv.loadConfig().subscribe(function (result) {
1280
+ if (result) {
1281
+ _this.invSrv.setting = result;
1282
+ }
1283
+ });
1284
+ this.invSrv.loadCDMCurrent().subscribe(function (result) {
1285
+ if (result) {
1286
+ _this.invSrv.setting.CDMCurrent = result;
1287
+ }
1288
+ });
1289
+ this.sub = this.invSrv.getCursors()
1290
+ .subscribe(function (data) {
1291
+ });
1292
+ this.invSrv.Isaved = false;
1293
+ this.invSrv.Csaved = false;
1294
+ this.invSrv.Dsaved = false;
1295
+ this.invSrv.Ierror = false;
1296
+ this.invSrv.Cerror = false;
1297
+ this.invSrv.Derror = false;
1298
+ this.invSrv.invCSaved = false;
1299
+ this.invSrv.dbnCSaved = false;
1300
+ this.invSrv.cdmCSaved = false;
1301
+ this.invSrv.invCError = false;
1302
+ this.invSrv.dbnCError = false;
1303
+ this.invSrv.cdmCError = false;
1304
+ };
1305
+ CreditmemoComponent.prototype.onChangeStart = function (event) {
1306
+ var st = this.invSrv.setting.creditMemoPackageNumberStart;
1307
+ this.invSrv.setting.creditMemoPackageNumberStart = st.slice(0, 3) + "-" + st.slice(3, 6) + "-" + st.slice(6, 8) + "-" + st.slice(8, st.length);
1308
+ };
1309
+ CreditmemoComponent.prototype.onChangeEnd = function (event) {
1310
+ var end = this.invSrv.setting.creditMemoPackageNumberEnd;
1311
+ this.invSrv.setting.creditMemoPackageNumberEnd = end.slice(0, 3) + "-" + end.slice(3, 6) + "-" + end.slice(6, 8) + "-" + end.slice(8, end.length);
1312
+ };
1313
+ CreditmemoComponent.prototype.save = function () {
1314
+ var _this = this;
1315
+ this.invSrv.saveConfig().subscribe(function (result) {
1316
+ _this.invSrv.Csaved = false;
1317
+ _this.invSrv.Cerror = false;
1318
+ if (result) {
1319
+ _this.invSrv.Csaved = result.resp;
1320
+ _this.invSrv.Cerror = false;
1321
+ }
1322
+ else {
1323
+ _this.invSrv.Csaved = false;
1324
+ _this.invSrv.Cerror = false;
1325
+ }
1326
+ }, function (err) {
1327
+ if (err) {
1328
+ _this.invSrv.Cerror = true;
1329
+ _this.invSrv.Csaved = false;
1330
+ }
1331
+ });
1332
+ };
1333
+ CreditmemoComponent.prototype.cancel = function () {
1334
+ window.close();
1335
+ };
1336
+ CreditmemoComponent.prototype.setCurrent = function () {
1337
+ var _this = this;
1338
+ this.invSrv.cdmCError = false;
1339
+ this.invSrv.cdmCSaved = false;
1340
+ this.invSrv.saveCDMCurrent().subscribe(function (result) {
1341
+ if (result) {
1342
+ _this.invSrv.cdmCSaved = result.resp;
1343
+ _this.invSrv.cdmCError = false;
1344
+ }
1345
+ else {
1346
+ _this.invSrv.cdmCError = false;
1347
+ _this.invSrv.cdmCSaved = false;
1348
+ }
1349
+ }, function (err) {
1350
+ if (err) {
1351
+ _this.invSrv.cdmCSaved = false;
1352
+ _this.invSrv.cdmCError = true;
1353
+ }
1354
+ });
1355
+ };
1356
+ CreditmemoComponent.prototype.selectCurrent = function () {
1357
+ if (this.activateCurrent) {
1358
+ this.activateCurrent = false;
1359
+ }
1360
+ else {
1361
+ this.activateCurrent = true;
1362
+ }
1363
+ };
1364
+ CreditmemoComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
1365
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
1366
+ selector: 'app-creditmemo',
1367
+ template: __webpack_require__(/*! ./creditmemo.component.html */ "./src/app/invoice-number/creditmemo/creditmemo.component.html"),
1368
+ styles: [__webpack_require__(/*! ./creditmemo.component.scss */ "./src/app/invoice-number/creditmemo/creditmemo.component.scss")]
1369
+ }),
1370
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_settings_service__WEBPACK_IMPORTED_MODULE_2__["SettingsService"]])
1371
+ ], CreditmemoComponent);
1372
+ return CreditmemoComponent;
1373
+ }());
1374
+
1375
+
1376
+
1377
+ /***/ }),
1378
+
1379
+ /***/ "./src/app/invoice-number/debitnote/debitnote.component.html":
1380
+ /*!*******************************************************************!*\
1381
+ !*** ./src/app/invoice-number/debitnote/debitnote.component.html ***!
1382
+ \*******************************************************************/
1383
+ /*! no static exports found */
1384
+ /***/ (function(module, exports) {
1385
+
1386
+ module.exports = "<div class=\"container-fluid\">\n\n <div class=\"alert alert-success\" role=\"alert\" *ngIf=\"invSrv.Dsaved\">\n Configuración guardada satisfactoriamente.\n </div>\n <div class=\"alert alert-danger\" role=\"alert\" *ngIf=\"invSrv.Derror\">\n Falló el intento de guardad la configuración.\n <br>\n {{error.message}}\n </div>\n\n <div class=\"row d-flex justify-content-center\">\n <h5>Configuración de Notas de Débito</h5>\n </div>\n <div class=\"form-check mt-2 mb-3\">\n <input type=\"checkbox\" class=\"form-check-input\" id=\"debitNoteCanStart\"\n [(ngModel)]=\"invSrv.setting.debitNoteCanStart\">\n <label class=\"form-check-label\" for=\"debitNoteCanStart\">Habilitar configuración de Notas de Débitos</label>\n </div>\n\n <div *ngIf=\"invSrv.setting.debitNoteCanStart\">\n\n <div class=\"input-group mb-3\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\">CAI</span>\n </div>\n <input type=\"text\" class=\"form-control\" #cainumber=\"ngModel\" [(ngModel)]=\"invSrv.setting.debitNoteCAI\">\n </div>\n\n <div class=\"input-group mb-3\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\">Fecha límite de emisión</span>\n </div>\n <input type=\"date\" class=\"form-control\" #expdate=\"ngModel\"\n [(ngModel)]=\"invSrv.setting.debitNotePackageExpirationDate\">\n </div>\n\n <div class=\"input-group mb-3\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\">Número inicial</span>\n </div>\n <input type=\"text\" class=\"form-control\" #stnumber=\"ngModel\" mask=\"000-000-00-00000000\" [showMaskTyped]=\"true\"\n [(ngModel)]=\"invSrv.setting.debitNotePackageNumberStart\" (ngModelChange)=\"onChangeStart($event)\">\n </div>\n\n <div class=\"input-group mb-3\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\">Número final</span>\n </div>\n <input type=\"text\" class=\"form-control\" #endnumber=\"ngModel\" mask=\"000-000-00-00000000\" [showMaskTyped]=\"true\"\n [(ngModel)]=\"invSrv.setting.debitNotePackageNumberEnd\" (ngModelChange)=\"onChangeEnd($event)\">\n </div>\n\n\n <div class=\"form-check mt-2\">\n <input type=\"checkbox\" class=\"form-check-input\" id=\"demail\"\n [(ngModel)]=\"invSrv.setting.debitNotePackageEmailNotificationActive\">\n <label class=\"form-check-label\" for=\"demail\">Habilitar notificación por correo electrónico</label>\n </div>\n\n <div class=\"input-group mb-3\" *ngIf=\"invSrv.setting.debitNotePackageEmailNotificationActive\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\">Notificar faltando</span>\n </div>\n <input type=\"text\" class=\"form-control\" #notnumber=\"ngModel\"\n [(ngModel)]=\"invSrv.setting.debitNotePackageEmailNotificationNumber\">\n </div>\n </div>\n\n <div class=\"mb-3\">\n <div class=\"alert alert-success\" role=\"alert\" *ngIf=\"invSrv.dbnCSaved\">\n Asignación del número siguiente de forma satisfactoria.\n </div>\n <div class=\"alert alert-danger\" role=\"alert\" *ngIf=\"invSrv.dbnCError\">\n No se pudo asignar el número siguiente.\n <br>\n {{error.message}}\n </div>\n <div class=\"input-group mb-3 mt-2\">\n <div class=\"input-group-prepend\">\n <div class=\"input-group-text\">\n <input type=\"checkbox\" aria-label=\"\" [(disabled)] = \"invSrv.isDebitNoteStarted\" (change)=\"selectCurrent()\">\n </div>\n </div>\n <div class=\"input-group-prepend\">\n <label class=\"input-group-text\" for=\"protocol\">Siguiente número para Notas de Débito</label>\n </div>\n <input type=\"text\" class=\"form-control\" #dbncurrent=\"ngModel\" [(disabled)]=\"!activateCurrent\"\n [(ngModel)]=\"invSrv.setting.DBNCurrent\">\n <button type=\"button\" class=\"btn btn-success ml-2\" (click)=\"setCurrent()\"\n [(disabled)]=\"!activateCurrent\">Asignar</button>\n </div>\n </div>\n\n\n <div class=\"row d-flex justify-content-end mr-1\">\n <div class=\"form-group\">\n <button type=\"button\" class=\"btn btn-success ml-2\" (click)=\"save()\" [(disabled)]=\"cantSave\">Guardar</button>\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"cancel()\">Cancelar</button>\n </div>\n </div>\n</div>"
1387
+
1388
+ /***/ }),
1389
+
1390
+ /***/ "./src/app/invoice-number/debitnote/debitnote.component.scss":
1391
+ /*!*******************************************************************!*\
1392
+ !*** ./src/app/invoice-number/debitnote/debitnote.component.scss ***!
1393
+ \*******************************************************************/
1394
+ /*! no static exports found */
1395
+ /***/ (function(module, exports) {
1396
+
1397
+ module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2ludm9pY2UtbnVtYmVyL2RlYml0bm90ZS9kZWJpdG5vdGUuY29tcG9uZW50LnNjc3MifQ== */"
1398
+
1399
+ /***/ }),
1400
+
1401
+ /***/ "./src/app/invoice-number/debitnote/debitnote.component.ts":
1402
+ /*!*****************************************************************!*\
1403
+ !*** ./src/app/invoice-number/debitnote/debitnote.component.ts ***!
1404
+ \*****************************************************************/
1405
+ /*! exports provided: DebitnoteComponent */
1406
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1407
+
1408
+ "use strict";
1409
+ __webpack_require__.r(__webpack_exports__);
1410
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DebitnoteComponent", function() { return DebitnoteComponent; });
1411
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
1412
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
1413
+ /* harmony import */ var _settings_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../settings.service */ "./src/app/invoice-number/settings.service.ts");
1414
+
1415
+
1416
+
1417
+ var DebitnoteComponent = /** @class */ (function () {
1418
+ function DebitnoteComponent(invSrv) {
1419
+ this.invSrv = invSrv;
1420
+ this.activateCurrent = false;
1421
+ }
1422
+ DebitnoteComponent.prototype.ngOnDestroy = function () {
1423
+ this.sub.unsubscribe();
1424
+ };
1425
+ DebitnoteComponent.prototype.ngOnInit = function () {
1426
+ var _this = this;
1427
+ this.invSrv.loadConfig().subscribe(function (result) {
1428
+ if (result) {
1429
+ _this.invSrv.setting = result;
1430
+ }
1431
+ });
1432
+ this.invSrv.loadDBNCurrent().subscribe(function (result) {
1433
+ if (result) {
1434
+ _this.invSrv.setting.DBNCurrent = result;
1435
+ }
1436
+ });
1437
+ this.sub = this.invSrv.getCursors()
1438
+ .subscribe(function (data) {
1439
+ });
1440
+ this.invSrv.Isaved = false;
1441
+ this.invSrv.Csaved = false;
1442
+ this.invSrv.Dsaved = false;
1443
+ this.invSrv.Ierror = false;
1444
+ this.invSrv.Cerror = false;
1445
+ this.invSrv.Derror = false;
1446
+ this.invSrv.invCSaved = false;
1447
+ this.invSrv.dbnCSaved = false;
1448
+ this.invSrv.cdmCSaved = false;
1449
+ this.invSrv.invCError = false;
1450
+ this.invSrv.dbnCError = false;
1451
+ this.invSrv.cdmCError = false;
1452
+ };
1453
+ DebitnoteComponent.prototype.onChangeStart = function (event) {
1454
+ var st = this.invSrv.setting.debitNotePackageNumberStart;
1455
+ this.invSrv.setting.debitNotePackageNumberStart = st.slice(0, 3) + "-" + st.slice(3, 6) + "-" + st.slice(6, 8) + "-" + st.slice(8, st.length);
1456
+ };
1457
+ DebitnoteComponent.prototype.onChangeEnd = function (event) {
1458
+ var end = this.invSrv.setting.debitNotePackageNumberEnd;
1459
+ this.invSrv.setting.debitNotePackageNumberEnd = end.slice(0, 3) + "-" + end.slice(3, 6) + "-" + end.slice(6, 8) + "-" + end.slice(8, end.length);
1460
+ };
1461
+ DebitnoteComponent.prototype.save = function () {
1462
+ var _this = this;
1463
+ this.invSrv.saveConfig().subscribe(function (result) {
1464
+ _this.invSrv.Dsaved = false;
1465
+ _this.invSrv.Derror = false;
1466
+ if (result) {
1467
+ _this.invSrv.Dsaved = result.resp;
1468
+ _this.invSrv.Derror = false;
1469
+ }
1470
+ else {
1471
+ _this.invSrv.Dsaved = false;
1472
+ _this.invSrv.Derror = false;
1473
+ }
1474
+ }, function (err) {
1475
+ if (err) {
1476
+ _this.invSrv.Derror = true;
1477
+ _this.invSrv.Dsaved = false;
1478
+ }
1479
+ });
1480
+ };
1481
+ DebitnoteComponent.prototype.cancel = function () {
1482
+ window.close();
1483
+ };
1484
+ DebitnoteComponent.prototype.setCurrent = function () {
1485
+ var _this = this;
1486
+ this.invSrv.dbnCError = false;
1487
+ this.invSrv.dbnCSaved = false;
1488
+ this.invSrv.saveDBNCurrent().subscribe(function (result) {
1489
+ if (result) {
1490
+ _this.invSrv.dbnCSaved = result.resp;
1491
+ _this.invSrv.dbnCError = false;
1492
+ }
1493
+ else {
1494
+ _this.invSrv.dbnCError = false;
1495
+ _this.invSrv.dbnCSaved = false;
1496
+ }
1497
+ }, function (err) {
1498
+ if (err) {
1499
+ _this.invSrv.dbnCSaved = false;
1500
+ _this.invSrv.dbnCError = true;
1501
+ }
1502
+ });
1503
+ };
1504
+ DebitnoteComponent.prototype.selectCurrent = function () {
1505
+ if (this.activateCurrent) {
1506
+ this.activateCurrent = false;
1507
+ }
1508
+ else {
1509
+ this.activateCurrent = true;
1510
+ }
1511
+ };
1512
+ DebitnoteComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
1513
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
1514
+ selector: 'app-debitnote',
1515
+ template: __webpack_require__(/*! ./debitnote.component.html */ "./src/app/invoice-number/debitnote/debitnote.component.html"),
1516
+ styles: [__webpack_require__(/*! ./debitnote.component.scss */ "./src/app/invoice-number/debitnote/debitnote.component.scss")]
1517
+ }),
1518
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_settings_service__WEBPACK_IMPORTED_MODULE_2__["SettingsService"]])
1519
+ ], DebitnoteComponent);
1520
+ return DebitnoteComponent;
1521
+ }());
1522
+
1523
+
1524
+
1525
+ /***/ }),
1526
+
1527
+ /***/ "./src/app/invoice-number/invoice/invoice.component.html":
1528
+ /*!***************************************************************!*\
1529
+ !*** ./src/app/invoice-number/invoice/invoice.component.html ***!
1530
+ \***************************************************************/
1531
+ /*! no static exports found */
1532
+ /***/ (function(module, exports) {
1533
+
1534
+ module.exports = "<div class=\"container-fluid\">\n\n <div class=\"alert alert-success\" role=\"alert\" *ngIf=\"invSrv.Isaved\">\n Configuración guardada satisfactoriamente.\n </div>\n <div class=\"alert alert-danger\" role=\"alert\" *ngIf=\"invSrv.Ierror\">\n Falló el intento de guardad la configuración.\n <br>\n {{error.message}}\n </div>\n\n\n <div class=\"row d-flex justify-content-center\">\n <h5>Configuración de Facturas</h5>\n </div>\n\n <div class=\"form-check mt-2 mb-3\">\n <input type=\"checkbox\" class=\"form-check-input\" id=\"invoiceCanStart\" [(ngModel)]=\"invSrv.setting.invoiceCanStart\">\n <label class=\"form-check-label\" for=\"invoiceCanStart\">Habilitar configuración de Facturas</label>\n </div>\n\n <div *ngIf=\"invSrv.setting.invoiceCanStart\">\n <div class=\"input-group mb-3\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\">CAI</span>\n </div>\n <input type=\"text\" class=\"form-control\" #cainumber=\"ngModel\" [(ngModel)]=\"invSrv.setting.invoiceCAI\">\n </div>\n\n <div class=\"input-group mb-3\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\">Fecha límite de emisión</span>\n </div>\n <input type=\"date\" class=\"form-control\" #expdate=\"ngModel\"\n [(ngModel)]=\"invSrv.setting.invoicePackageExpirationDate\">\n </div>\n\n <div class=\"input-group mb-3\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\">Número inicial</span>\n </div>\n <input type=\"text\" class=\"form-control\" #stnumber=\"ngModel\" mask=\"000-000-00-00000000\" [showMaskTyped]=\"true\"\n [(ngModel)]=\"invSrv.setting.invoicePackageNumberStart\" (ngModelChange)=\"onChangeStart($event)\">\n </div>\n\n <div class=\"input-group mb-3\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\">Número final</span>\n </div>\n <input type=\"text\" class=\"form-control\" #endnumber=\"ngModel\" mask=\"000-000-00-00000000\" [showMaskTyped]=\"true\"\n [(ngModel)]=\"invSrv.setting.invoicePackageNumberEnd\" (ngModelChange)=\"onChangeEnd($event)\">\n </div>\n\n <div class=\"form-check mt-2\">\n <input type=\"checkbox\" class=\"form-check-input\" id=\"iemail\"\n [(ngModel)]=\"invSrv.setting.invoicePackageEmailNotificationActive\">\n <label class=\"form-check-label\" for=\"iemail\">Habilitar notificación por correo electrónico</label>\n </div>\n\n <div class=\"input-group mb-3\" *ngIf=\"invSrv.setting.invoicePackageEmailNotificationActive\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\">Notificar faltando</span>\n </div>\n <input type=\"text\" class=\"form-control\" #notnumber=\"ngModel\"\n [(ngModel)]=\"invSrv.setting.invoicePackageEmailNotificationNumber\">\n </div>\n </div>\n\n <div class=\"mb-3\">\n <div class=\"alert alert-success\" role=\"alert\" *ngIf=\"invSrv.invCSaved\">\n Asignación del número siguiente de forma satisfactoria.\n </div>\n <div class=\"alert alert-danger\" role=\"alert\" *ngIf=\"invSrv.invCError\">\n No se pudo asignar el número siguiente.\n <br>\n {{error.message}}\n </div>\n <div class=\"input-group mb-3 mt-2\">\n <div class=\"input-group-prepend\">\n <div class=\"input-group-text\">\n <input type=\"checkbox\" aria-label=\"\" [(disabled)] = \"invSrv.isInvoiceStarted\" (change)=\"selectCurrent()\">\n </div>\n </div>\n <div class=\"input-group-prepend\">\n <label class=\"input-group-text\" for=\"protocol\">Siguiente número para Facturas de Cobro</label>\n </div>\n <input type=\"text\" class=\"form-control\" #invcurrent=\"ngModel\" [(disabled)]=\"!activateCurrent\"\n [(ngModel)]=\"invSrv.setting.InvCurrent\">\n <button type=\"button\" class=\"btn btn-success ml-2\" (click)=\"setCurrent()\"\n [(disabled)]=\"!activateCurrent\">Asignar</button>\n </div>\n </div>\n <div class=\"row d-flex justify-content-end mr-1\">\n <div class=\"form-group\">\n <button type=\"button\" class=\"btn btn-success ml-2\" (click)=\"save()\" [(disabled)]=\"cantSave\">Guardar</button>\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"cancel()\">Cancelar</button>\n </div>\n </div>\n</div>"
1535
+
1536
+ /***/ }),
1537
+
1538
+ /***/ "./src/app/invoice-number/invoice/invoice.component.scss":
1539
+ /*!***************************************************************!*\
1540
+ !*** ./src/app/invoice-number/invoice/invoice.component.scss ***!
1541
+ \***************************************************************/
1542
+ /*! no static exports found */
1543
+ /***/ (function(module, exports) {
1544
+
1545
+ module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2ludm9pY2UtbnVtYmVyL2ludm9pY2UvaW52b2ljZS5jb21wb25lbnQuc2NzcyJ9 */"
1546
+
1547
+ /***/ }),
1548
+
1549
+ /***/ "./src/app/invoice-number/invoice/invoice.component.ts":
1550
+ /*!*************************************************************!*\
1551
+ !*** ./src/app/invoice-number/invoice/invoice.component.ts ***!
1552
+ \*************************************************************/
1553
+ /*! exports provided: InvoiceComponent */
1554
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1555
+
1556
+ "use strict";
1557
+ __webpack_require__.r(__webpack_exports__);
1558
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InvoiceComponent", function() { return InvoiceComponent; });
1559
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
1560
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
1561
+ /* harmony import */ var _settings_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../settings.service */ "./src/app/invoice-number/settings.service.ts");
1562
+
1563
+
1564
+
1565
+ var InvoiceComponent = /** @class */ (function () {
1566
+ function InvoiceComponent(invSrv) {
1567
+ this.invSrv = invSrv;
1568
+ this.activateCurrent = false;
1569
+ }
1570
+ InvoiceComponent.prototype.ngOnDestroy = function () {
1571
+ this.sub.unsubscribe();
1572
+ };
1573
+ InvoiceComponent.prototype.ngOnInit = function () {
1574
+ var _this = this;
1575
+ this.invSrv.loadConfig().subscribe(function (result) {
1576
+ if (result) {
1577
+ _this.invSrv.setting = result;
1578
+ }
1579
+ });
1580
+ this.invSrv.loadINVCurrent().subscribe(function (result) {
1581
+ if (result) {
1582
+ _this.invSrv.setting.InvCurrent = result;
1583
+ }
1584
+ });
1585
+ this.sub = this.invSrv.getCursors()
1586
+ .subscribe(function (data) {
1587
+ });
1588
+ this.invSrv.Isaved = false;
1589
+ this.invSrv.Csaved = false;
1590
+ this.invSrv.Dsaved = false;
1591
+ this.invSrv.Ierror = false;
1592
+ this.invSrv.Cerror = false;
1593
+ this.invSrv.Derror = false;
1594
+ this.invSrv.invCSaved = false;
1595
+ this.invSrv.dbnCSaved = false;
1596
+ this.invSrv.cdmCSaved = false;
1597
+ this.invSrv.invCError = false;
1598
+ this.invSrv.dbnCError = false;
1599
+ this.invSrv.cdmCError = false;
1600
+ };
1601
+ InvoiceComponent.prototype.onChangeStart = function (event) {
1602
+ var st = this.invSrv.setting.invoicePackageNumberStart;
1603
+ this.invSrv.setting.invoicePackageNumberStart = st.slice(0, 3) + "-" + st.slice(3, 6) + "-" + st.slice(6, 8) + "-" + st.slice(8, st.length);
1604
+ };
1605
+ InvoiceComponent.prototype.onChangeEnd = function (event) {
1606
+ var end = this.invSrv.setting.invoicePackageNumberEnd;
1607
+ this.invSrv.setting.invoicePackageNumberEnd = end.slice(0, 3) + "-" + end.slice(3, 6) + "-" + end.slice(6, 8) + "-" + end.slice(8, end.length);
1608
+ };
1609
+ InvoiceComponent.prototype.save = function () {
1610
+ var _this = this;
1611
+ this.invSrv.saveConfig().subscribe(function (result) {
1612
+ _this.invSrv.Isaved = false;
1613
+ _this.invSrv.Ierror = false;
1614
+ if (result) {
1615
+ _this.invSrv.Isaved = result.resp;
1616
+ _this.invSrv.Ierror = false;
1617
+ }
1618
+ else {
1619
+ _this.invSrv.Isaved = false;
1620
+ _this.invSrv.Ierror = false;
1621
+ }
1622
+ }, function (err) {
1623
+ if (err) {
1624
+ _this.invSrv.Isaved = false;
1625
+ _this.invSrv.Ierror = true;
1626
+ }
1627
+ });
1628
+ };
1629
+ InvoiceComponent.prototype.setCurrent = function () {
1630
+ var _this = this;
1631
+ this.invSrv.invCError = false;
1632
+ this.invSrv.invCSaved = false;
1633
+ this.invSrv.saveINVCurrent().subscribe(function (result) {
1634
+ if (result) {
1635
+ _this.invSrv.invCSaved = result.resp;
1636
+ _this.invSrv.invCError = false;
1637
+ }
1638
+ else {
1639
+ _this.invSrv.invCError = false;
1640
+ _this.invSrv.invCSaved = false;
1641
+ }
1642
+ }, function (err) {
1643
+ if (err) {
1644
+ _this.invSrv.invCSaved = false;
1645
+ _this.invSrv.invCError = true;
1646
+ }
1647
+ });
1648
+ };
1649
+ InvoiceComponent.prototype.selectCurrent = function () {
1650
+ if (this.activateCurrent) {
1651
+ this.activateCurrent = false;
1652
+ }
1653
+ else {
1654
+ this.activateCurrent = true;
1655
+ }
1656
+ };
1657
+ InvoiceComponent.prototype.cancel = function () {
1658
+ window.close();
1659
+ };
1660
+ InvoiceComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
1661
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
1662
+ selector: 'app-invoice',
1663
+ template: __webpack_require__(/*! ./invoice.component.html */ "./src/app/invoice-number/invoice/invoice.component.html"),
1664
+ styles: [__webpack_require__(/*! ./invoice.component.scss */ "./src/app/invoice-number/invoice/invoice.component.scss")]
1665
+ }),
1666
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_settings_service__WEBPACK_IMPORTED_MODULE_2__["SettingsService"]])
1667
+ ], InvoiceComponent);
1668
+ return InvoiceComponent;
1669
+ }());
1670
+
1671
+
1672
+
1673
+ /***/ }),
1674
+
1675
+ /***/ "./src/app/invoice-number/setting/setting.component.html":
1676
+ /*!***************************************************************!*\
1677
+ !*** ./src/app/invoice-number/setting/setting.component.html ***!
1678
+ \***************************************************************/
1679
+ /*! no static exports found */
1680
+ /***/ (function(module, exports) {
1681
+
1682
+ module.exports = "<div class=\"container-fluid\">\r\n <ul class=\"nav nav-tabs pills mb-5\" id=\"nav-tab\" role=\"tablist\">\r\n \r\n <li class=\"nav-item\">\r\n <a class=\"nav-link\" [ngClass]=\"{'active': tab === 'status'}\" id=\"status\" [routerLink]=\"['./status']\" (click)=\"onClick($event)\">Estado de procesos</a>\r\n </li>\r\n \r\n <li class=\"nav-item\">\r\n <a class=\"nav-link\" [ngClass]=\"{'active': tab === 'invoice'}\" id=\"invoice\" [routerLink]=\"['./invoice']\" (click)=\"onClick($event)\">Facturas</a>\r\n </li>\r\n \r\n <li class=\"nav-item\">\r\n <a class=\"nav-link\" [ngClass]=\"{'active': tab === 'dbni'}\" id=\"dbni\" [routerLink]=\"['./debitnote']\" (click)=\"onClick($event)\">Notas Débito</a>\r\n </li>\r\n \r\n <li class=\"nav-item\">\r\n <a class=\"nav-link\" [ngClass]=\"{'active': tab === 'cdm'}\" id=\"cdm\" [routerLink]=\"['./creditmemo']\" (click)=\"onClick($event)\">Notas Crédito</a>\r\n </li>\r\n \r\n <li class=\"nav-item\"\r\n *ngIf=\"invSrv.setting.invoicePackageEmailNotificationActive || invSrv.setting.debitNotePackageEmailNotificationActive || invSrv.setting.creditMemoPackageEmailNotificationActive\">\r\n <a class=\"nav-link\" [ngClass]=\"{'active': tab === 'email'}\" id=\"email\" [routerLink]=\"['./email']\" (click)=\"onClick($event)\">Correo electrónico</a>\r\n </li>\r\n </ul>\r\n <router-outlet></router-outlet>\r\n </div>"
1683
+
1684
+ /***/ }),
1685
+
1686
+ /***/ "./src/app/invoice-number/setting/setting.component.scss":
1687
+ /*!***************************************************************!*\
1688
+ !*** ./src/app/invoice-number/setting/setting.component.scss ***!
1689
+ \***************************************************************/
1690
+ /*! no static exports found */
1691
+ /***/ (function(module, exports) {
1692
+
1693
+ module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2ludm9pY2UtbnVtYmVyL3NldHRpbmcvc2V0dGluZy5jb21wb25lbnQuc2NzcyJ9 */"
1694
+
1695
+ /***/ }),
1696
+
1697
+ /***/ "./src/app/invoice-number/setting/setting.component.ts":
1698
+ /*!*************************************************************!*\
1699
+ !*** ./src/app/invoice-number/setting/setting.component.ts ***!
1700
+ \*************************************************************/
1701
+ /*! exports provided: SettingComponent */
1702
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1703
+
1704
+ "use strict";
1705
+ __webpack_require__.r(__webpack_exports__);
1706
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SettingComponent", function() { return SettingComponent; });
1707
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
1708
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
1709
+ /* harmony import */ var _settings_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../settings.service */ "./src/app/invoice-number/settings.service.ts");
1710
+ /* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
1711
+
1712
+
1713
+
1714
+
1715
+ var SettingComponent = /** @class */ (function () {
1716
+ function SettingComponent(invSrv, router) {
1717
+ this.invSrv = invSrv;
1718
+ this.router = router;
1719
+ this.tab = 'status';
1720
+ }
1721
+ SettingComponent.prototype.ngOnInit = function () {
1722
+ var _this = this;
1723
+ this.router.navigateByUrl('inv-setting');
1724
+ this.invSrv.loadConfig().subscribe(function (result) {
1725
+ if (result) {
1726
+ _this.invSrv.setting = result;
1727
+ }
1728
+ });
1729
+ this.sub = this.invSrv.getCursors()
1730
+ .subscribe(function (data) {
1731
+ });
1732
+ };
1733
+ SettingComponent.prototype.ngOnDestroy = function () {
1734
+ this.sub.unsubscribe();
1735
+ };
1736
+ SettingComponent.prototype.onClick = function ($e) {
1737
+ // console.log($e.target.id);
1738
+ this.tab = $e.target.id;
1739
+ };
1740
+ SettingComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
1741
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
1742
+ selector: 'app-setting',
1743
+ template: __webpack_require__(/*! ./setting.component.html */ "./src/app/invoice-number/setting/setting.component.html"),
1744
+ styles: [__webpack_require__(/*! ./setting.component.scss */ "./src/app/invoice-number/setting/setting.component.scss")]
1745
+ }),
1746
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_settings_service__WEBPACK_IMPORTED_MODULE_2__["SettingsService"], _angular_router__WEBPACK_IMPORTED_MODULE_3__["Router"]])
1747
+ ], SettingComponent);
1748
+ return SettingComponent;
1749
+ }());
1750
+
1751
+
1752
+
1753
+ /***/ }),
1754
+
1755
+ /***/ "./src/app/invoice-number/settings.service.ts":
1756
+ /*!****************************************************!*\
1757
+ !*** ./src/app/invoice-number/settings.service.ts ***!
1758
+ \****************************************************/
1759
+ /*! exports provided: SettingsService */
1760
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1761
+
1762
+ "use strict";
1763
+ __webpack_require__.r(__webpack_exports__);
1764
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SettingsService", function() { return SettingsService; });
1765
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
1766
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
1767
+ /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./settings */ "./src/app/invoice-number/settings.ts");
1768
+ /* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
1769
+ /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
1770
+ /* harmony import */ var socket_io_client__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! socket.io-client */ "./node_modules/socket.io-client/lib/index.js");
1771
+ /* harmony import */ var socket_io_client__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(socket_io_client__WEBPACK_IMPORTED_MODULE_5__);
1772
+
1773
+
1774
+
1775
+
1776
+
1777
+
1778
+ var SettingsService = /** @class */ (function () {
1779
+ function SettingsService(http) {
1780
+ var _this = this;
1781
+ this.http = http;
1782
+ this.Isaved = false;
1783
+ this.Csaved = false;
1784
+ this.Dsaved = false;
1785
+ this.Ierror = false;
1786
+ this.Cerror = false;
1787
+ this.Derror = false;
1788
+ this.invCSaved = false;
1789
+ this.dbnCSaved = false;
1790
+ this.cdmCSaved = false;
1791
+ this.invCError = false;
1792
+ this.dbnCError = false;
1793
+ this.cdmCError = false;
1794
+ this.isInvoiceStarted = false;
1795
+ this.isCreditMemoStarted = false;
1796
+ this.isDebitNoteStarted = false;
1797
+ this.setting = new _settings__WEBPACK_IMPORTED_MODULE_2__["InvoiceSettings"]();
1798
+ this.http.get('./getURL').subscribe(function (data) {
1799
+ _this.url = data.url;
1800
+ });
1801
+ }
1802
+ SettingsService.prototype.getCursors = function () {
1803
+ var _this = this;
1804
+ return rxjs__WEBPACK_IMPORTED_MODULE_4__["Observable"].create(function (observer) {
1805
+ _this.socket = socket_io_client__WEBPACK_IMPORTED_MODULE_5__(_this.url);
1806
+ _this.socket.on('InvCurrent', function (InvCurrent) {
1807
+ _this.setting.InvCurrent = InvCurrent;
1808
+ observer.next(InvCurrent);
1809
+ });
1810
+ _this.socket.on('DBNCurrent', function (DBNCurrent) {
1811
+ _this.setting.DBNCurrent = DBNCurrent;
1812
+ observer.next(DBNCurrent);
1813
+ });
1814
+ _this.socket.on('CDMCurrent', function (CDMCurrent) {
1815
+ _this.setting.CDMCurrent = CDMCurrent;
1816
+ observer.next(CDMCurrent);
1817
+ });
1818
+ });
1819
+ };
1820
+ SettingsService.prototype.saveConfig = function () {
1821
+ return this.http.post('./integration/setting', { setting: this.setting });
1822
+ };
1823
+ SettingsService.prototype.loadConfig = function () {
1824
+ return this.http.get('./integration/setting');
1825
+ };
1826
+ SettingsService.prototype.saveINVCurrent = function () {
1827
+ return this.http.post('./integration/invcurrent', { current: this.setting.InvCurrent });
1828
+ };
1829
+ SettingsService.prototype.saveDBNCurrent = function () {
1830
+ return this.http.post('./integration/dbncurrent', { current: this.setting.DBNCurrent });
1831
+ };
1832
+ SettingsService.prototype.saveCDMCurrent = function () {
1833
+ return this.http.post('./integration/cdmcurrent', { current: this.setting.CDMCurrent });
1834
+ };
1835
+ SettingsService.prototype.loadINVCurrent = function () {
1836
+ return this.http.get('./integration/invcurrent');
1837
+ };
1838
+ SettingsService.prototype.loadDBNCurrent = function () {
1839
+ return this.http.get('./integration/dbncurrent');
1840
+ };
1841
+ SettingsService.prototype.loadCDMCurrent = function () {
1842
+ return this.http.get('./integration/cdmcurrent');
1843
+ };
1844
+ SettingsService.prototype.startProcess = function () {
1845
+ return this.http.get('./integration/start-process');
1846
+ };
1847
+ SettingsService.prototype.stopProcess = function () {
1848
+ return this.http.get('./integration/stop-process');
1849
+ };
1850
+ SettingsService.prototype.checkProcessStatuss = function () {
1851
+ return this.http.get('./integration/get-status-process');
1852
+ };
1853
+ SettingsService.prototype.startINV = function () {
1854
+ return this.http.get('./integration/start-inv-process');
1855
+ };
1856
+ SettingsService.prototype.stopINV = function () {
1857
+ return this.http.get('./integration/stop-inv-process');
1858
+ };
1859
+ SettingsService.prototype.startDBN = function () {
1860
+ return this.http.get('./integration/start-dbn-process');
1861
+ };
1862
+ SettingsService.prototype.stopDBN = function () {
1863
+ return this.http.get('./integration/stop-dbn-process');
1864
+ };
1865
+ SettingsService.prototype.startCDM = function () {
1866
+ return this.http.get('./integration/start-cdm-process');
1867
+ };
1868
+ SettingsService.prototype.stopCDM = function () {
1869
+ return this.http.get('./integration/stop-cdm-process');
1870
+ };
1871
+ SettingsService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
1872
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
1873
+ providedIn: 'root'
1874
+ }),
1875
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_3__["HttpClient"]])
1876
+ ], SettingsService);
1877
+ return SettingsService;
1878
+ }());
1879
+
1880
+
1881
+
1882
+ /***/ }),
1883
+
1884
+ /***/ "./src/app/invoice-number/settings.ts":
1885
+ /*!********************************************!*\
1886
+ !*** ./src/app/invoice-number/settings.ts ***!
1887
+ \********************************************/
1888
+ /*! exports provided: InvoiceSettings */
1889
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1890
+
1891
+ "use strict";
1892
+ __webpack_require__.r(__webpack_exports__);
1893
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InvoiceSettings", function() { return InvoiceSettings; });
1894
+ var InvoiceSettings = /** @class */ (function () {
1895
+ function InvoiceSettings() {
1896
+ this.invoiceCanStart = false;
1897
+ this.debitNoteCanStart = false;
1898
+ this.creditMemoCanStart = false;
1899
+ this.invoicePackageNumberStart = '0';
1900
+ this.invoiceCAI = '';
1901
+ this.invoicePackageNumberEnd = '0';
1902
+ this.invoicePackageEmailNotificationActive = false;
1903
+ this.invoicePackageEmailNotificationNumber = 0;
1904
+ this.invoicePackageExpirationDate = new Date();
1905
+ this.invoiceFactorExcecutionTime = 'min';
1906
+ this.invoiceValueExcecutionTime = 1;
1907
+ this.debitNotePackageNumberStart = '0';
1908
+ this.debitNoteCAI = '';
1909
+ this.debitNotePackageNumberEnd = '0';
1910
+ this.debitNotePackageEmailNotificationActive = false;
1911
+ this.debitNotePackageEmailNotificationNumber = 0;
1912
+ this.debitNotePackageExpirationDate = new Date();
1913
+ this.debitNoteFactorExcecutionTime = 'min';
1914
+ this.debitNoteValueExcecutionTime = 1;
1915
+ this.creditMemoPackageNumberStart = '0';
1916
+ this.creditMemoCAI = '';
1917
+ this.creditMemoPackageNumberEnd = '0';
1918
+ this.creditMemoPackageEmailNotificationActive = false;
1919
+ this.creditMemoPackageEmailNotificationNumber = 0;
1920
+ this.creditMemoPackageExpirationDate = new Date();
1921
+ this.creditMemoFactorExcecutionTime = 'min';
1922
+ this.creditMemoValueExcecutionTime = 1;
1923
+ }
1924
+ return InvoiceSettings;
1925
+ }());
1926
+
1927
+
1928
+
1929
+ /***/ }),
1930
+
1931
+ /***/ "./src/app/invoice-number/status/status.component.html":
1932
+ /*!*************************************************************!*\
1933
+ !*** ./src/app/invoice-number/status/status.component.html ***!
1934
+ \*************************************************************/
1935
+ /*! no static exports found */
1936
+ /***/ (function(module, exports) {
1937
+
1938
+ module.exports = "<div class=\"container-fluid\">\n <!-- <div class=\"tab-pane\">\n <div role=\"tabpanel\" class=\"tab-pane\" id=\"status\" aria-labelledby=\"status-tab\"> -->\n <div class=\"row\">\n <div class=\"col\">\n <div class=\"alert alert-dark\" role=\"alert\">Proceso de Facturas de Cobro</div>\n </div>\n <div class=\"col\">\n <div class=\"alert alert-success d-flex justify-content-center\" *ngIf=\"invSrv.isInvoiceStarted\">\n En ejecución\n </div>\n <div class=\"alert alert-danger d-flex justify-content-center\" *ngIf=\"!invSrv.isInvoiceStarted\">\n Detenido\n </div>\n </div>\n <div class=\"col flex-column justify-content-center\">\n <button type=\"button\" class=\"btn btn-primary btn-lg\" (click)=\"startInvoice()\"\n [(disabled)]=\"!invSrv.setting.invoiceCanStart\" *ngIf=\"!invSrv.isInvoiceStarted\">Iniciar</button>\n <button type=\"button\" class=\"btn btn-danger btn-lg\" (click)=\"stopInvoice()\"\n *ngIf=\"invSrv.isInvoiceStarted\">Detener</button>\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"col\">\n <div class=\"alert alert-dark\" role=\"alert\">Proceso Notas de Débito</div>\n </div>\n <div class=\"col\">\n <div class=\"alert alert-success d-flex justify-content-center\" *ngIf=\"invSrv.isDebitNoteStarted\">\n En ejecución\n </div>\n <div class=\"alert alert-danger d-flex justify-content-center\" *ngIf=\"!invSrv.isDebitNoteStarted\">\n Detenido\n </div>\n </div>\n <div class=\"col flex-column justify-content-center\">\n <button type=\"button\" class=\"btn btn-primary btn-lg\" (click)=\"startDBN()\"\n [(disabled)]=\"!invSrv.setting.debitNoteCanStart\" *ngIf=\"!invSrv.isDebitNoteStarted\">Iniciar</button>\n <button type=\"button\" class=\"btn btn-danger btn-lg\" (click)=\"stopDBN()\"\n *ngIf=\"invSrv.isDebitNoteStarted\">Detener</button>\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"col\">\n <div class=\"alert alert-dark\" role=\"alert\">Proceso Notas de Crédito</div>\n </div>\n <div class=\"col\">\n <div class=\"alert alert-success d-flex justify-content-center\" *ngIf=\"invSrv.isCreditMemoStarted\">\n En ejecución\n </div>\n <div class=\"alert alert-danger d-flex justify-content-center\" *ngIf=\"!invSrv.isCreditMemoStarted\">\n Detenido\n </div>\n </div>\n <div class=\"col flex-column justify-content-center\">\n <button type=\"button\" class=\"btn btn-primary btn-lg\" (click)=\"startCDM()\"\n [(disabled)]=\"!invSrv.setting.creditMemoCanStart\" *ngIf=\"!invSrv.isCreditMemoStarted\">Iniciar</button>\n <button type=\"button\" class=\"btn btn-danger btn-lg\" (click)=\"stopCDM()\"\n *ngIf=\"invSrv.isCreditMemoStarted\">Detener</button>\n </div>\n </div>\n </div>\n <!-- </div>\n</div> -->"
1939
+
1940
+ /***/ }),
1941
+
1942
+ /***/ "./src/app/invoice-number/status/status.component.scss":
1943
+ /*!*************************************************************!*\
1944
+ !*** ./src/app/invoice-number/status/status.component.scss ***!
1945
+ \*************************************************************/
1946
+ /*! no static exports found */
1947
+ /***/ (function(module, exports) {
1948
+
1949
+ module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2ludm9pY2UtbnVtYmVyL3N0YXR1cy9zdGF0dXMuY29tcG9uZW50LnNjc3MifQ== */"
1950
+
1951
+ /***/ }),
1952
+
1953
+ /***/ "./src/app/invoice-number/status/status.component.ts":
1954
+ /*!***********************************************************!*\
1955
+ !*** ./src/app/invoice-number/status/status.component.ts ***!
1956
+ \***********************************************************/
1957
+ /*! exports provided: StatusComponent */
1958
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1959
+
1960
+ "use strict";
1961
+ __webpack_require__.r(__webpack_exports__);
1962
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StatusComponent", function() { return StatusComponent; });
1963
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
1964
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
1965
+ /* harmony import */ var _settings_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../settings.service */ "./src/app/invoice-number/settings.service.ts");
1966
+
1967
+
1968
+
1969
+ var StatusComponent = /** @class */ (function () {
1970
+ function StatusComponent(invSrv) {
1971
+ this.invSrv = invSrv;
1972
+ }
1973
+ StatusComponent.prototype.ngOnInit = function () {
1974
+ this.readStatus();
1975
+ };
1976
+ StatusComponent.prototype.readStatus = function () {
1977
+ var _this = this;
1978
+ this.invSrv.checkProcessStatuss().subscribe(function (result) {
1979
+ _this.invSrv.isInvoiceStarted = result.isInvoiceStarted;
1980
+ _this.invSrv.isDebitNoteStarted = result.isDebitNoteStarted;
1981
+ _this.invSrv.isCreditMemoStarted = result.isCreditMemoStarted;
1982
+ });
1983
+ };
1984
+ StatusComponent.prototype.startInvoice = function () {
1985
+ var _this = this;
1986
+ this.invSrv.startINV().subscribe(function (result) {
1987
+ if (result) {
1988
+ _this.invSrv.isInvoiceStarted = result.success;
1989
+ }
1990
+ });
1991
+ };
1992
+ StatusComponent.prototype.stopInvoice = function () {
1993
+ var _this = this;
1994
+ this.invSrv.stopINV().subscribe(function (result) {
1995
+ if (result) {
1996
+ _this.invSrv.isInvoiceStarted = result.isInvoiceStarted;
1997
+ }
1998
+ _this.readStatus();
1999
+ });
2000
+ };
2001
+ StatusComponent.prototype.startDBN = function () {
2002
+ var _this = this;
2003
+ this.invSrv.startDBN().subscribe(function (result) {
2004
+ if (result) {
2005
+ _this.invSrv.isDebitNoteStarted = result.success;
2006
+ }
2007
+ _this.readStatus();
2008
+ });
2009
+ };
2010
+ StatusComponent.prototype.stopDBN = function () {
2011
+ var _this = this;
2012
+ this.invSrv.stopDBN().subscribe(function (result) {
2013
+ if (result) {
2014
+ _this.invSrv.isDebitNoteStarted = result.isDebitNoteStarted;
2015
+ }
2016
+ _this.readStatus();
2017
+ });
2018
+ };
2019
+ StatusComponent.prototype.startCDM = function () {
2020
+ var _this = this;
2021
+ this.invSrv.startCDM().subscribe(function (result) {
2022
+ if (result) {
2023
+ _this.invSrv.isCreditMemoStarted = result.success;
2024
+ }
2025
+ _this.readStatus();
2026
+ });
2027
+ };
2028
+ StatusComponent.prototype.stopCDM = function () {
2029
+ var _this = this;
2030
+ this.invSrv.stopCDM().subscribe(function (result) {
2031
+ if (result) {
2032
+ _this.invSrv.isCreditMemoStarted = result.isCreditMemoStarted;
2033
+ }
2034
+ _this.readStatus();
2035
+ });
2036
+ };
2037
+ StatusComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
2038
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
2039
+ selector: 'app-status',
2040
+ template: __webpack_require__(/*! ./status.component.html */ "./src/app/invoice-number/status/status.component.html"),
2041
+ styles: [__webpack_require__(/*! ./status.component.scss */ "./src/app/invoice-number/status/status.component.scss")]
2042
+ }),
2043
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_settings_service__WEBPACK_IMPORTED_MODULE_2__["SettingsService"]])
2044
+ ], StatusComponent);
2045
+ return StatusComponent;
2046
+ }());
2047
+
2048
+
2049
+
2050
+ /***/ }),
2051
+
2052
+ /***/ "./src/app/pgpsettings/pgpsettings.component.html":
2053
+ /*!********************************************************!*\
2054
+ !*** ./src/app/pgpsettings/pgpsettings.component.html ***!
2055
+ \********************************************************/
2056
+ /*! no static exports found */
2057
+ /***/ (function(module, exports) {
2058
+
2059
+ module.exports = "<div class=\"container-fluid\">\r\n\r\n <div class=\"alert alert-success\" role=\"alert\" *ngIf=\"success\">\r\n Configuration was saved succesfully.\r\n </div>\r\n <div class=\"alert alert-danger\" role=\"alert\" *ngIf=\"error\">\r\n Configuration was not saved successfully.\r\n </div>\r\n\r\n <div class=\"row d-flex justify-content-center\">\r\n <h5>PGP Security configuration</h5>\r\n </div>\r\n\r\n <div class=\"input-group mb-3\">\r\n <div class=\"input-group-prepend\">\r\n <span class=\"input-group-text\" id=\"inputGroupFilePubkeyFile\">PGP Public Key</span>\r\n </div>\r\n <div class=\"custom-file\">\r\n <input type=\"file\" class=\"custom-file-input\" id=\"pubkeyFile\" aria-describedby=\"inputGroupFilePubkeyFile\" (change)=\"keysFile($event)\">\r\n <label class=\"custom-file-label\" for=\"pubkeyFile\">{{pgpSettings.pubkeyFileName}}</label>\r\n </div>\r\n </div>\r\n <div class=\"input-group mb-3\">\r\n <div class=\"input-group-prepend\">\r\n <span class=\"input-group-text\" id=\"inputGroupFilePrivkeyFile\">PGP Private Key</span>\r\n </div>\r\n <div class=\"custom-file\">\r\n <input type=\"file\" class=\"custom-file-input\" id=\"privkeyFile\" aria-describedby=\"inputGroupFilePrivkeyFile\"\r\n (change)=\"keysFile($event)\">\r\n <label class=\"custom-file-label\" for=\"privkeyFile\" aria-placeholder=\"Choose file\">{{pgpSettings.privkeyFileName}}</label>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-group mb-3\">\r\n <div class=\"input-group-prepend\">\r\n <span class=\"input-group-text\" id=\"username\">Passphrase</span>\r\n </div>\r\n <input type=\"password\" class=\"form-control\" id=\"username\" #username=\"ngModel\" [(ngModel)]=\"pgpSettings.passphrase\">\r\n </div>\r\n\r\n\r\n <div class=\"row d-flex justify-content-end\">\r\n <div class=\"form-group\">\r\n <button type=\"button\" class=\"btn btn-success ml-2\" (click)=\"save()\" [(disabled)]=\"cantSave\">Save</button>\r\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"cancel()\">Cancel</button>\r\n </div>\r\n </div>\r\n\r\n <div>{{pgpSettings.pubkeyFilePath}}</div>\r\n\r\n</div>"
2060
+
2061
+ /***/ }),
2062
+
2063
+ /***/ "./src/app/pgpsettings/pgpsettings.component.scss":
2064
+ /*!********************************************************!*\
2065
+ !*** ./src/app/pgpsettings/pgpsettings.component.scss ***!
2066
+ \********************************************************/
2067
+ /*! no static exports found */
2068
+ /***/ (function(module, exports) {
2069
+
2070
+ module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL3BncHNldHRpbmdzL3BncHNldHRpbmdzLmNvbXBvbmVudC5zY3NzIn0= */"
2071
+
2072
+ /***/ }),
2073
+
2074
+ /***/ "./src/app/pgpsettings/pgpsettings.component.ts":
2075
+ /*!******************************************************!*\
2076
+ !*** ./src/app/pgpsettings/pgpsettings.component.ts ***!
2077
+ \******************************************************/
2078
+ /*! exports provided: PgpsettingsComponent */
2079
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2080
+
2081
+ "use strict";
2082
+ __webpack_require__.r(__webpack_exports__);
2083
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PgpsettingsComponent", function() { return PgpsettingsComponent; });
2084
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
2085
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
2086
+ /* harmony import */ var _pgpsettings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pgpsettings */ "./src/app/pgpsettings/pgpsettings.ts");
2087
+ /* harmony import */ var _pgpsettings_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pgpsettings.service */ "./src/app/pgpsettings/pgpsettings.service.ts");
2088
+
2089
+
2090
+
2091
+
2092
+ var PgpsettingsComponent = /** @class */ (function () {
2093
+ function PgpsettingsComponent(pgpSrv) {
2094
+ this.pgpSrv = pgpSrv;
2095
+ this.pgpSettings = new _pgpsettings__WEBPACK_IMPORTED_MODULE_2__["PgpsettingsModel"]();
2096
+ this.saved = false;
2097
+ this.pbkUploaded = false;
2098
+ this.pvkUploaded = false;
2099
+ this.error = false;
2100
+ this.success = false;
2101
+ }
2102
+ PgpsettingsComponent.prototype.ngOnInit = function () {
2103
+ var _this = this;
2104
+ this.pgpSrv.loadConfig()
2105
+ .subscribe(function (conf) {
2106
+ if (conf) {
2107
+ _this.pgpSettings = conf;
2108
+ }
2109
+ else {
2110
+ _this.pgpSettings = new _pgpsettings__WEBPACK_IMPORTED_MODULE_2__["PgpsettingsModel"]();
2111
+ }
2112
+ });
2113
+ };
2114
+ PgpsettingsComponent.prototype.keysFile = function (event) {
2115
+ var _this = this;
2116
+ this.saved = false;
2117
+ this.pbkUploaded = false;
2118
+ this.pvkUploaded = false;
2119
+ this.error = false;
2120
+ this.success = false;
2121
+ if (event.currentTarget.id === 'pubkeyFile') {
2122
+ this.pgpSettings.pubkeyFileName = event.target.files[0].name;
2123
+ this.pgpSettings.pubkeyFile = event.target.files[0];
2124
+ this.pgpSrv.pushPGPFile(this.pgpSettings, event.currentTarget.id).subscribe(function (response) {
2125
+ _this.pbkUploaded = true;
2126
+ }, function (error) {
2127
+ _this.error = true;
2128
+ _this.pbkUploaded = false;
2129
+ });
2130
+ }
2131
+ else if (event.currentTarget.id === 'privkeyFile') {
2132
+ this.pgpSettings.privkeyFileName = event.target.files[0].name;
2133
+ this.pgpSettings.privkeyFile = event.target.files[0];
2134
+ this.pgpSrv.pushPGPFile(this.pgpSettings, event.currentTarget.id).subscribe(function (response) {
2135
+ _this.pvkUploaded = true;
2136
+ }, function (error) {
2137
+ _this.error = true;
2138
+ _this.pvkUploaded = false;
2139
+ });
2140
+ }
2141
+ };
2142
+ PgpsettingsComponent.prototype.save = function () {
2143
+ var _this = this;
2144
+ this.saved = false;
2145
+ this.pbkUploaded = false;
2146
+ this.pvkUploaded = false;
2147
+ this.error = false;
2148
+ this.success = false;
2149
+ this.pgpSrv.PGPSend(this.pgpSettings).subscribe(function (response) {
2150
+ _this.saved = response;
2151
+ if (_this.saved && _this.pbkUploaded && _this.pvkUploaded) {
2152
+ _this.success = true;
2153
+ }
2154
+ }, function (error) {
2155
+ _this.saved = false;
2156
+ _this.error = true;
2157
+ });
2158
+ };
2159
+ PgpsettingsComponent.prototype.cancel = function () {
2160
+ window.close();
2161
+ };
2162
+ PgpsettingsComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
2163
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
2164
+ selector: 'app-pgpsettings',
2165
+ template: __webpack_require__(/*! ./pgpsettings.component.html */ "./src/app/pgpsettings/pgpsettings.component.html"),
2166
+ styles: [__webpack_require__(/*! ./pgpsettings.component.scss */ "./src/app/pgpsettings/pgpsettings.component.scss")]
2167
+ }),
2168
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_pgpsettings_service__WEBPACK_IMPORTED_MODULE_3__["PgpsettingsService"]])
2169
+ ], PgpsettingsComponent);
2170
+ return PgpsettingsComponent;
2171
+ }());
2172
+
2173
+
2174
+
2175
+ /***/ }),
2176
+
2177
+ /***/ "./src/app/pgpsettings/pgpsettings.service.ts":
2178
+ /*!****************************************************!*\
2179
+ !*** ./src/app/pgpsettings/pgpsettings.service.ts ***!
2180
+ \****************************************************/
2181
+ /*! exports provided: PgpsettingsService */
2182
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2183
+
2184
+ "use strict";
2185
+ __webpack_require__.r(__webpack_exports__);
2186
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PgpsettingsService", function() { return PgpsettingsService; });
2187
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
2188
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
2189
+ /* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
2190
+
2191
+
2192
+
2193
+ var PgpsettingsService = /** @class */ (function () {
2194
+ function PgpsettingsService(http) {
2195
+ this.http = http;
2196
+ }
2197
+ PgpsettingsService.prototype.pushPGPFile = function (pgpSetting, fieldname) {
2198
+ var formdata = new FormData();
2199
+ if (fieldname === 'pubkeyFile') {
2200
+ formdata.append('file', pgpSetting.pubkeyFile, pgpSetting.pubkeyFileName);
2201
+ }
2202
+ else if (fieldname === 'privkeyFile') {
2203
+ formdata.append('file', pgpSetting.privkeyFile, pgpSetting.privkeyFileName);
2204
+ }
2205
+ var req = new _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpRequest"]('POST', './api/pgp/upload', formdata, {
2206
+ reportProgress: true,
2207
+ responseType: 'text'
2208
+ });
2209
+ return this.http.request(req);
2210
+ };
2211
+ PgpsettingsService.prototype.PGPSend = function (pgpSetting) {
2212
+ return this.http.post('./api/pgp/save', { pgpSetting: pgpSetting });
2213
+ };
2214
+ PgpsettingsService.prototype.loadConfig = function () {
2215
+ return this.http.get('./api/pgp/config');
2216
+ };
2217
+ PgpsettingsService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
2218
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
2219
+ providedIn: 'root'
2220
+ }),
2221
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"]])
2222
+ ], PgpsettingsService);
2223
+ return PgpsettingsService;
2224
+ }());
2225
+
2226
+
2227
+
2228
+ /***/ }),
2229
+
2230
+ /***/ "./src/app/pgpsettings/pgpsettings.ts":
2231
+ /*!********************************************!*\
2232
+ !*** ./src/app/pgpsettings/pgpsettings.ts ***!
2233
+ \********************************************/
2234
+ /*! exports provided: PgpsettingsModel */
2235
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2236
+
2237
+ "use strict";
2238
+ __webpack_require__.r(__webpack_exports__);
2239
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PgpsettingsModel", function() { return PgpsettingsModel; });
2240
+ var PgpsettingsModel = /** @class */ (function () {
2241
+ function PgpsettingsModel() {
2242
+ this.passphrase = '';
2243
+ this.pubkeyFileName = '';
2244
+ this.privkeyFileName = '';
2245
+ }
2246
+ return PgpsettingsModel;
2247
+ }());
2248
+
2249
+
2250
+
2251
+ /***/ }),
2252
+
2253
+ /***/ "./src/app/root/root.component.html":
2254
+ /*!******************************************!*\
2255
+ !*** ./src/app/root/root.component.html ***!
2256
+ \******************************************/
2257
+ /*! no static exports found */
2258
+ /***/ (function(module, exports) {
2259
+
2260
+ module.exports = "<div class=\"container mt-5\">\r\n <div class=\"row\" *ngIf=\"showNavbar\">\r\n\r\n <nav class=\"navbar navbar-expand-lg navbar-light bg-light\">\r\n <button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarSupportedContent\"\r\n aria-controls=\"navbarSupportedContent\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\r\n <span class=\"navbar-toggler-icon\"></span>\r\n </button>\r\n\r\n <div class=\"collapse navbar-collapse\" id=\"navbarSupportedContent\">\r\n <ul class=\"navbar-nav mr-auto\">\r\n\r\n <li class=\"nav-item active\">\r\n <a class=\"nav-link\" href=\"#\"><i class=\"fa fa-home\" aria-hidden=\"true\"></i> Home</a>\r\n </li>\r\n\r\n <li class=\"nav-item active\">\r\n <a class=\"nav-link\" href=\"#config\"><i class=\"fa fa-wrench\" aria-hidden=\"true\"></i> Setting</a>\r\n </li>\r\n\r\n <li class=\"nav-item active\">\r\n <a class=\"nav-link\" href=\"#ftp\"><i class=\"fa fa-wrench\" aria-hidden=\"true\"></i> FTP Setting</a>\r\n </li>\r\n <li class=\"nav-item active\">\r\n <a class=\"nav-link\" href=\"#api\"><i class=\"fa fa-wrench\" aria-hidden=\"true\"></i> API Setting</a>\r\n </li>\r\n <li class=\"nav-item active\">\r\n <a class=\"nav-link\" href=\"#email\"><i class=\"fa fa-wrench\" aria-hidden=\"true\"></i> Email Setting</a>\r\n </li>\r\n <li class=\"nav-item active\">\r\n <a class=\"nav-link\" href=\"#inv-setting\"><i class=\"fa fa-wrench\" aria-hidden=\"true\"></i> Invoice Number\r\n Setting</a>\r\n </li>\r\n </ul>\r\n </div>\r\n </nav>\r\n </div>\r\n\r\n <div class=\"jumbotron jumbotron-fluid\">\r\n <router-outlet></router-outlet>\r\n </div>\r\n</div>"
2261
+
2262
+ /***/ }),
2263
+
2264
+ /***/ "./src/app/root/root.component.scss":
2265
+ /*!******************************************!*\
2266
+ !*** ./src/app/root/root.component.scss ***!
2267
+ \******************************************/
2268
+ /*! no static exports found */
2269
+ /***/ (function(module, exports) {
2270
+
2271
+ module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL3Jvb3Qvcm9vdC5jb21wb25lbnQuc2NzcyJ9 */"
2272
+
2273
+ /***/ }),
2274
+
2275
+ /***/ "./src/app/root/root.component.ts":
2276
+ /*!****************************************!*\
2277
+ !*** ./src/app/root/root.component.ts ***!
2278
+ \****************************************/
2279
+ /*! exports provided: RootComponent */
2280
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2281
+
2282
+ "use strict";
2283
+ __webpack_require__.r(__webpack_exports__);
2284
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RootComponent", function() { return RootComponent; });
2285
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
2286
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
2287
+ /* harmony import */ var _root_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./root.service */ "./src/app/root/root.service.ts");
2288
+
2289
+
2290
+
2291
+ var RootComponent = /** @class */ (function () {
2292
+ function RootComponent(rootSrv) {
2293
+ this.rootSrv = rootSrv;
2294
+ this.showNavbar = false;
2295
+ }
2296
+ RootComponent.prototype.ngOnInit = function () {
2297
+ var _this = this;
2298
+ this.rootSrv.testEnviroment().subscribe(function (result) {
2299
+ if (result.env === 'dev') {
2300
+ _this.showNavbar = true;
2301
+ }
2302
+ else {
2303
+ _this.showNavbar = false;
2304
+ }
2305
+ });
2306
+ };
2307
+ RootComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
2308
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
2309
+ selector: 'app-root',
2310
+ template: __webpack_require__(/*! ./root.component.html */ "./src/app/root/root.component.html"),
2311
+ styles: [__webpack_require__(/*! ./root.component.scss */ "./src/app/root/root.component.scss")]
2312
+ }),
2313
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_root_service__WEBPACK_IMPORTED_MODULE_2__["RootService"]])
2314
+ ], RootComponent);
2315
+ return RootComponent;
2316
+ }());
2317
+
2318
+
2319
+
2320
+ /***/ }),
2321
+
2322
+ /***/ "./src/app/root/root.service.ts":
2323
+ /*!**************************************!*\
2324
+ !*** ./src/app/root/root.service.ts ***!
2325
+ \**************************************/
2326
+ /*! exports provided: RootService */
2327
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2328
+
2329
+ "use strict";
2330
+ __webpack_require__.r(__webpack_exports__);
2331
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RootService", function() { return RootService; });
2332
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
2333
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
2334
+ /* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
2335
+
2336
+
2337
+
2338
+ var RootService = /** @class */ (function () {
2339
+ function RootService(http) {
2340
+ this.http = http;
2341
+ }
2342
+ RootService.prototype.testEnviroment = function () {
2343
+ return this.http.get('./test');
2344
+ };
2345
+ RootService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
2346
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
2347
+ providedIn: 'root'
2348
+ }),
2349
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"]])
2350
+ ], RootService);
2351
+ return RootService;
2352
+ }());
2353
+
2354
+
2355
+
2356
+ /***/ }),
2357
+
2358
+ /***/ "./src/environments/environment.ts":
2359
+ /*!*****************************************!*\
2360
+ !*** ./src/environments/environment.ts ***!
2361
+ \*****************************************/
2362
+ /*! exports provided: environment */
2363
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2364
+
2365
+ "use strict";
2366
+ __webpack_require__.r(__webpack_exports__);
2367
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "environment", function() { return environment; });
2368
+ // This file can be replaced during build by using the `fileReplacements` array.
2369
+ // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
2370
+ // The list of file replacements can be found in `angular.json`.
2371
+ var environment = {
2372
+ production: false
2373
+ };
2374
+ /*
2375
+ * For easier debugging in development mode, you can import the following file
2376
+ * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
2377
+ *
2378
+ * This import should be commented out in production mode because it will have a negative impact
2379
+ * on performance if an error is thrown.
2380
+ */
2381
+ // import 'zone.js/dist/zone-error'; // Included with Angular CLI.
2382
+
2383
+
2384
+ /***/ }),
2385
+
2386
+ /***/ "./src/main.ts":
2387
+ /*!*********************!*\
2388
+ !*** ./src/main.ts ***!
2389
+ \*********************/
2390
+ /*! no exports provided */
2391
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2392
+
2393
+ "use strict";
2394
+ __webpack_require__.r(__webpack_exports__);
2395
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
2396
+ /* harmony import */ var _angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/platform-browser-dynamic */ "./node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js");
2397
+ /* harmony import */ var _app_app_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./app/app.module */ "./src/app/app.module.ts");
2398
+ /* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./environments/environment */ "./src/environments/environment.ts");
2399
+
2400
+
2401
+
2402
+
2403
+ if (_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].production) {
2404
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["enableProdMode"])();
2405
+ }
2406
+ Object(_angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_1__["platformBrowserDynamic"])().bootstrapModule(_app_app_module__WEBPACK_IMPORTED_MODULE_2__["AppModule"])
2407
+ .catch(function (err) { return console.error(err); });
2408
+
2409
+
2410
+ /***/ }),
2411
+
2412
+ /***/ 0:
2413
+ /*!***************************!*\
2414
+ !*** multi ./src/main.ts ***!
2415
+ \***************************/
2416
+ /*! no static exports found */
2417
+ /***/ (function(module, exports, __webpack_require__) {
2418
+
2419
+ module.exports = __webpack_require__(/*! C:\Users\yarrastia\Documents\NodeJS\Magaya\Market Hondura\invoice-number\magaya-implementation-services-ui\src\main.ts */"./src/main.ts");
2420
+
2421
+
2422
+ /***/ }),
2423
+
2424
+ /***/ 1:
2425
+ /*!********************!*\
2426
+ !*** ws (ignored) ***!
2427
+ \********************/
2428
+ /*! no static exports found */
2429
+ /***/ (function(module, exports) {
2430
+
2431
+ /* (ignored) */
2432
+
2433
+ /***/ })
2434
+
2435
+ },[[0,"runtime","vendor"]]]);
2436
+ //# sourceMappingURL=main.js.map