ng-pli-commons 0.0.1663 → 0.0.1665
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/components/pdf-config/pdf-config.component.mjs +3 -3
- package/esm2020/lib/components/pdf-visualizer/pdf-visualizer.component.mjs +7 -9
- package/esm2020/lib/components/progress-bar/progress-bar.component.mjs +11 -4
- package/esm2020/lib/services/budget.service.mjs +3 -3
- package/esm2020/lib/services/document-history.service.mjs +1 -1
- package/esm2020/lib/services/gic-client-disbursement-metadata.service.mjs +31 -0
- package/esm2020/lib/services/gic-client.service.mjs +7 -1
- package/esm2020/lib/services/gic-cnf-bankvision-transaction.service.mjs +31 -0
- package/esm2020/lib/services/gic-cnf-closing-date.service.mjs +34 -0
- package/esm2020/lib/services/gic-cnf-maintenance.service.mjs +30 -0
- package/esm2020/lib/services/gic-collection.service.mjs +45 -0
- package/esm2020/lib/services/gic-disbursement.service.mjs +30 -0
- package/esm2020/lib/services/gic-payment-application.service.mjs +27 -0
- package/esm2020/lib/services/gic-payment-plan.service.mjs +29 -0
- package/esm2020/lib/services/import-excel-gic.service.mjs +40 -0
- package/esm2020/lib/services/initial-configuration-gic-parameters.service.mjs +51 -0
- package/esm2020/lib/services/interest-adjustment.service.mjs +31 -0
- package/esm2020/lib/services/maintenance.service.mjs +59 -0
- package/esm2020/lib/services/progress-bar.service.mjs +13 -6
- package/esm2020/lib/services/return-refund.service.mjs +47 -0
- package/esm2020/lib/services/tasa.cambio.service.mjs +9 -1
- package/esm2020/lib/services/token.service.mjs +2 -5
- package/esm2020/lib/utils/formio-util.mjs +20 -26
- package/esm2020/public-api.mjs +14 -1
- package/esm2020/version.mjs +8 -8
- package/fesm2015/ng-pli-commons.mjs +2030 -1555
- package/fesm2015/ng-pli-commons.mjs.map +1 -1
- package/fesm2020/ng-pli-commons.mjs +2003 -1554
- package/fesm2020/ng-pli-commons.mjs.map +1 -1
- package/lib/components/progress-bar/progress-bar.component.d.ts +2 -1
- package/lib/services/budget.service.d.ts +1 -1
- package/lib/services/gic-client-disbursement-metadata.service.d.ts +12 -0
- package/lib/services/gic-client.service.d.ts +2 -0
- package/lib/services/gic-cnf-bankvision-transaction.service.d.ts +13 -0
- package/lib/services/gic-cnf-closing-date.service.d.ts +15 -0
- package/lib/services/gic-cnf-maintenance.service.d.ts +13 -0
- package/lib/services/gic-collection.service.d.ts +18 -0
- package/lib/services/gic-disbursement.service.d.ts +14 -0
- package/lib/services/gic-payment-application.service.d.ts +13 -0
- package/lib/services/gic-payment-plan.service.d.ts +18 -0
- package/lib/services/import-excel-gic.service.d.ts +20 -0
- package/lib/services/initial-configuration-gic-parameters.service.d.ts +19 -0
- package/lib/services/interest-adjustment.service.d.ts +15 -0
- package/lib/services/maintenance.service.d.ts +22 -0
- package/lib/services/progress-bar.service.d.ts +3 -2
- package/lib/services/return-refund.service.d.ts +18 -0
- package/lib/services/tasa.cambio.service.d.ts +2 -0
- package/package.json +1 -1
- package/public-api.d.ts +13 -0
|
@@ -17,7 +17,7 @@ import { FormioModule, FormioComponent } from 'formioangular-colfuturo';
|
|
|
17
17
|
import * as i4$2 from '@tinymce/tinymce-angular';
|
|
18
18
|
import { EditorModule } from '@tinymce/tinymce-angular';
|
|
19
19
|
import * as i7 from 'ng-pli-util';
|
|
20
|
-
import { NumberUtil, AuthenticationUtil, JwtUtil, PliPatrocinador, PliPrograma, PliPromocion, HEADER_JSON, Moneda, Rubro, TasaCambio, Proceso, DateUtil, primeLocaleEs, UtilString, EPermission,
|
|
20
|
+
import { NumberUtil, AuthenticationUtil, JwtUtil, PliPatrocinador, PliPrograma, PliPromocion, HEADER_JSON, Moneda, Rubro, TasaCambio, Proceso, DateUtil, primeLocaleEs, UtilString, EPermission, PliCnfPresupuestoGlobal, PliCnfPresupuestoGlobalRubro, PliCnfPresupuestoAsistente, PliCnfSnapshotToken, PliCnfGuaranteeToken, ETipoPresupuesto, Token, ETypeColumn, SegFilter, EPdfSize, EPdfOrientation, EProceso, RequestPdf, PdfDocument, PliUsuario, EFormioKey, Email, InteractionApplicationUser, ETypeStaticInteraction, SendApplication, EDocumentState, Document, EBudgetError, EBudgetBuildType, ECnfPageSection, EProjectFrom, DatatableUtil, NgPliUtilModule, ApplicationBudgetTotal, Archive } from 'ng-pli-util';
|
|
21
21
|
import * as i5 from 'primeng/dialog';
|
|
22
22
|
import { DialogModule } from 'primeng/dialog';
|
|
23
23
|
import * as i2$1 from 'primeng/dropdown';
|
|
@@ -31,7 +31,6 @@ import { TieredMenuModule } from 'primeng/tieredmenu';
|
|
|
31
31
|
import * as i4$3 from 'primeng/picklist';
|
|
32
32
|
import { PickListModule } from 'primeng/picklist';
|
|
33
33
|
import { BehaviorSubject, Subject, throwError, Observable } from 'rxjs';
|
|
34
|
-
import * as utils_ from 'formiojs-colfuturo/utils/utils';
|
|
35
34
|
import * as i2 from 'ngx-toastr';
|
|
36
35
|
import * as i4$1 from '@angular/router';
|
|
37
36
|
import { map, catchError } from 'rxjs/operators';
|
|
@@ -41,11 +40,11 @@ import html2canvas from 'html2canvas';
|
|
|
41
40
|
import html2pdf from 'html2pdf.js';
|
|
42
41
|
import * as i1$1 from '@angular/platform-browser';
|
|
43
42
|
import * as PDFJS_ from 'pdfjs-dist/build/pdf';
|
|
44
|
-
import * as
|
|
45
|
-
import Panzoom__default from 'panzoom/dist/panzoom';
|
|
43
|
+
import * as panzoom_ from 'panzoom/dist/panzoom';
|
|
46
44
|
import * as i1$2 from '@angular/fire/compat/auth';
|
|
47
45
|
import 'jquery';
|
|
48
46
|
import * as FileSaver from 'file-saver';
|
|
47
|
+
import * as utils_ from 'formiojs-colfuturo/utils/utils';
|
|
49
48
|
import Cropper from 'cropperjs';
|
|
50
49
|
|
|
51
50
|
class NgPliCommonsService {
|
|
@@ -103,6 +102,14 @@ class TasaCambioService {
|
|
|
103
102
|
getAllTasaCambioLightInDate(date) {
|
|
104
103
|
return this.httpClient.get(this.environment.host.backend.plis + 'tasacambio/getAllTasaCambioLightInDate', { params: new HttpParams().set('date', date) });
|
|
105
104
|
}
|
|
105
|
+
getAllTasaCambioLightInDateByMonOrigenDestino(date, monOrigen, monDestino) {
|
|
106
|
+
return this.httpClient.get(this.environment.host.backend.plis + 'tasacambio/getAllTasaCambioLightInDateByMonOrigenDestino', {
|
|
107
|
+
params: new HttpParams()
|
|
108
|
+
.set('date', date)
|
|
109
|
+
.set('monOrigen', monOrigen)
|
|
110
|
+
.set('monDestino', monDestino)
|
|
111
|
+
});
|
|
112
|
+
}
|
|
106
113
|
}
|
|
107
114
|
TasaCambioService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: TasaCambioService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
108
115
|
TasaCambioService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: TasaCambioService, providedIn: 'root' });
|
|
@@ -1209,1454 +1216,927 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
|
|
|
1209
1216
|
args: [LOCALE_ID]
|
|
1210
1217
|
}] } });
|
|
1211
1218
|
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
* @param components
|
|
1218
|
-
* @return the object is [{panel: , items: [{ value: , label: }]}]
|
|
1219
|
-
*/
|
|
1220
|
-
static getFormattedComponentsByPanel(components) {
|
|
1221
|
-
let result = [];
|
|
1222
|
-
if (components) {
|
|
1223
|
-
let group = null;
|
|
1224
|
-
let object = null;
|
|
1225
|
-
for (const component of components) {
|
|
1226
|
-
if (component[EFormioKey.TITLE_PANEL] !== group) {
|
|
1227
|
-
if (group !== null) {
|
|
1228
|
-
result.push(object);
|
|
1229
|
-
}
|
|
1230
|
-
object = { label: component[EFormioKey.TITLE_PANEL], items: [], toggle: false };
|
|
1231
|
-
group = component[EFormioKey.TITLE_PANEL];
|
|
1232
|
-
}
|
|
1233
|
-
object.items.push({
|
|
1234
|
-
label: component[EFormioKey.LABEL],
|
|
1235
|
-
value: component[EFormioKey.KEY]
|
|
1236
|
-
});
|
|
1237
|
-
}
|
|
1238
|
-
if (group !== null)
|
|
1239
|
-
result.push(object);
|
|
1240
|
-
}
|
|
1241
|
-
return result;
|
|
1219
|
+
class FormService {
|
|
1220
|
+
constructor(environment, httpClient) {
|
|
1221
|
+
this.environment = environment;
|
|
1222
|
+
this.httpClient = httpClient;
|
|
1223
|
+
this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
1242
1224
|
}
|
|
1243
|
-
/**
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
* @param data
|
|
1247
|
-
*/
|
|
1248
|
-
static getRequiredComponentsByData(components, data) {
|
|
1249
|
-
// get the required components
|
|
1250
|
-
let array = FormioUtil.getRequiredComponents(components);
|
|
1251
|
-
// if not data then return components
|
|
1252
|
-
if (data && array) {
|
|
1253
|
-
for (let i = 0; i < array.length; i++) {
|
|
1254
|
-
const component = array[i];
|
|
1255
|
-
// use formio to check condition according with data
|
|
1256
|
-
if (utils.checkCondition(component, null, data, null, null)) {
|
|
1257
|
-
const key = component[EFormioKey.KEY];
|
|
1258
|
-
if (data[key] != undefined && data[key] != null && data[key] != '') {
|
|
1259
|
-
// remove item from array
|
|
1260
|
-
array.splice(i, 1);
|
|
1261
|
-
i--;
|
|
1262
|
-
}
|
|
1263
|
-
else {
|
|
1264
|
-
if (component.customConditional &&
|
|
1265
|
-
component.customConditional.includes('show')) {
|
|
1266
|
-
// remove item from array
|
|
1267
|
-
array.splice(i, 1);
|
|
1268
|
-
i--;
|
|
1269
|
-
}
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
else {
|
|
1273
|
-
// remove item from array
|
|
1274
|
-
array.splice(i, 1);
|
|
1275
|
-
i--;
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
}
|
|
1279
|
-
return array;
|
|
1225
|
+
/** It returns the list of form by prom codigo */
|
|
1226
|
+
getByPromCodigo(promCodigo) {
|
|
1227
|
+
return this.httpClient.get(this.environment.host.backend.configuration + 'form/getByPromCodigo', { params: new HttpParams().set('promCodigo', promCodigo.toString()) });
|
|
1280
1228
|
}
|
|
1281
|
-
/**
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
*/
|
|
1285
|
-
static getUniqueComponents(components) {
|
|
1286
|
-
return FormioUtil.getComponentsByFeature(components, [EFormioKey.UNIQUE], true);
|
|
1229
|
+
/** It returns the list of form by prom codigo */
|
|
1230
|
+
getAll() {
|
|
1231
|
+
return this.httpClient.get(this.environment.host.backend.configuration + 'form/getAll');
|
|
1287
1232
|
}
|
|
1288
|
-
/**
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1233
|
+
/** It returns a form by id */
|
|
1234
|
+
getById(id) {
|
|
1235
|
+
return this.httpClient.get(this.environment.host.backend.configuration + 'form/getById', {
|
|
1236
|
+
params: new HttpParams().set('id', id)
|
|
1237
|
+
});
|
|
1238
|
+
}
|
|
1239
|
+
/** It saves a form */
|
|
1240
|
+
save(form) {
|
|
1241
|
+
return this.httpClient.post(this.environment.host.backend.configuration + 'form/save', form, this.headerJson);
|
|
1242
|
+
}
|
|
1243
|
+
saveFormMultiPromCodigo(reMultPromCodDto) {
|
|
1244
|
+
return this.httpClient.post(this.environment.host.backend.configuration + 'form/saveMultiaplicacionPromCod', reMultPromCodDto, this.headerJson);
|
|
1245
|
+
}
|
|
1246
|
+
/** It deletes a form by id */
|
|
1247
|
+
delete(id) {
|
|
1248
|
+
return this.httpClient.delete(this.environment.host.backend.configuration + 'form/delete', {
|
|
1249
|
+
params: new HttpParams().set('id', id)
|
|
1250
|
+
});
|
|
1251
|
+
}
|
|
1252
|
+
/** It returns the form according to profile have been setting up in form */
|
|
1253
|
+
getByPromCodigoAccordingToProfile(promCodigo, patCodigo, formId) {
|
|
1254
|
+
let params = new HttpParams()
|
|
1255
|
+
.set('promCodigo', promCodigo.toString())
|
|
1256
|
+
.set('patCodigo', patCodigo.toString())
|
|
1257
|
+
.set('formId', formId !== undefined ? formId : '');
|
|
1258
|
+
return this.httpClient.get(this.environment.host.backend.configuration + 'form/getByPromCodigoAndProfile', { params: params });
|
|
1259
|
+
}
|
|
1260
|
+
/** It returns the form according to list of prom codigo */
|
|
1261
|
+
getByListPromCodigo(listPromCod) {
|
|
1262
|
+
return this.httpClient.get(this.environment.host.backend.configuration + 'form/getByListPromCodigo', { params: new HttpParams().set('listPromCodigo', listPromCod.toString()) });
|
|
1263
|
+
}
|
|
1264
|
+
/** It remove the redis cache of the form by prom codigo */
|
|
1265
|
+
removeFromCacheByPromCodigo(promCodigo) {
|
|
1266
|
+
return this.httpClient.get(this.environment.host.backend.configuration + 'form/removeFromCacheByPromCodigo', {
|
|
1267
|
+
params: new HttpParams().set('promCodigo', promCodigo.toString())
|
|
1268
|
+
});
|
|
1269
|
+
}
|
|
1270
|
+
/** It remove the redis cache of the form by prom codigo */
|
|
1271
|
+
removeFromCacheByPromCodigoAndTitle(promCodigo, title) {
|
|
1272
|
+
return this.httpClient.get(this.environment.host.backend.configuration +
|
|
1273
|
+
'form/removeFromCacheByPromCodigoAndTitle', {
|
|
1274
|
+
params: new HttpParams()
|
|
1275
|
+
.set('promCodigo', promCodigo.toString())
|
|
1276
|
+
.set('title', title)
|
|
1277
|
+
});
|
|
1278
|
+
}
|
|
1279
|
+
/** It remove the redis cache of the form by prom codigo */
|
|
1280
|
+
removeFromCacheByPromCodigoAndProfile(promCodigo, patCodigo, formId, username) {
|
|
1281
|
+
return this.httpClient.get(this.environment.host.backend.configuration +
|
|
1282
|
+
'form/removeFromCacheByPromCodigoAndProfile', {
|
|
1283
|
+
params: new HttpParams()
|
|
1284
|
+
.set('promCodigo', promCodigo.toString())
|
|
1285
|
+
.set('patCodigo', patCodigo.toString())
|
|
1286
|
+
.set('formId', formId)
|
|
1287
|
+
.set('username', username)
|
|
1288
|
+
});
|
|
1294
1289
|
}
|
|
1295
1290
|
/**
|
|
1296
|
-
*
|
|
1297
|
-
* @param
|
|
1298
|
-
* @param properties path of properties example [validate, required] or [unique]
|
|
1299
|
-
* @param value the value that should have the property
|
|
1291
|
+
* Get form by Id
|
|
1292
|
+
* @param statusId
|
|
1300
1293
|
*/
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1294
|
+
getByStateId(statusId) {
|
|
1295
|
+
return this.httpClient.get(this.environment.host.backend.configuration + 'form/getByStateId', {
|
|
1296
|
+
params: new HttpParams().set('statusId', statusId)
|
|
1297
|
+
});
|
|
1298
|
+
}
|
|
1299
|
+
getConfigCloningFormMap(oldFormPPP, newFormPPP) {
|
|
1300
|
+
return this.httpClient.get(this.environment.host.backend.configuration + 'form/getConfigCloningFormMap', {
|
|
1301
|
+
params: new HttpParams()
|
|
1302
|
+
.set('oldFormPPP', oldFormPPP.toString())
|
|
1303
|
+
.set('newFormPPP', newFormPPP.toString())
|
|
1304
|
+
});
|
|
1305
|
+
}
|
|
1306
|
+
getListFormProjectSummaryConfigByPromCodigo(promCodigo, patCodigo) {
|
|
1307
|
+
return this.httpClient.get(this.environment.host.backend.configuration +
|
|
1308
|
+
'form/getListFormProjectSummaryConfigByPromCodigo', {
|
|
1309
|
+
params: new HttpParams()
|
|
1310
|
+
.set('promCodigo', promCodigo.toString())
|
|
1311
|
+
.set('patCodigo', patCodigo.toString())
|
|
1312
|
+
});
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
FormService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: FormService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1316
|
+
FormService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: FormService, providedIn: 'root' });
|
|
1317
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: FormService, decorators: [{
|
|
1318
|
+
type: Injectable,
|
|
1319
|
+
args: [{
|
|
1320
|
+
providedIn: 'root'
|
|
1321
|
+
}]
|
|
1322
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1323
|
+
type: Inject,
|
|
1324
|
+
args: ['environment']
|
|
1325
|
+
}] }, { type: i1.HttpClient }]; } });
|
|
1326
|
+
|
|
1327
|
+
class TokenService {
|
|
1328
|
+
constructor(environment, httpClient, formService, currencyPipe) {
|
|
1329
|
+
this.environment = environment;
|
|
1330
|
+
this.httpClient = httpClient;
|
|
1331
|
+
this.formService = formService;
|
|
1332
|
+
this.currencyPipe = currencyPipe;
|
|
1333
|
+
}
|
|
1334
|
+
/** This promise allows to execute a function when consulting the form fields. */
|
|
1335
|
+
getFormFieldsByPromCode(promCodigo) {
|
|
1336
|
+
return new Promise((resolve, reject) => {
|
|
1337
|
+
// Search the dynamic form
|
|
1338
|
+
let lFormFieldsToken = null;
|
|
1339
|
+
this.formService.getByPromCodigo(promCodigo).subscribe({
|
|
1340
|
+
next: (arrayForms) => {
|
|
1341
|
+
if (arrayForms.length > 0) {
|
|
1342
|
+
for (const forms of arrayForms) {
|
|
1343
|
+
if (forms.components && forms.components.length > 0) {
|
|
1344
|
+
for (const components of forms.components) {
|
|
1345
|
+
if (components.components && components.components.length > 0) {
|
|
1346
|
+
for (const component of components.components) {
|
|
1347
|
+
if (component.columns && component.columns.length > 0) {
|
|
1348
|
+
for (const cComponents of component.columns) {
|
|
1349
|
+
if (cComponents.components &&
|
|
1350
|
+
cComponents.components.length > 0) {
|
|
1351
|
+
for (const iterator of cComponents.components) {
|
|
1352
|
+
if (iterator.type === 'address') {
|
|
1353
|
+
delete iterator.components;
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1330
1362
|
}
|
|
1331
1363
|
}
|
|
1332
1364
|
}
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
* @param components
|
|
1341
|
-
*/
|
|
1342
|
-
static getComponents(components) {
|
|
1343
|
-
return FormioUtil.getComponentsByRecursion(components, '', null);
|
|
1344
|
-
}
|
|
1345
|
-
/**
|
|
1346
|
-
* It returns the components array of the form by recursion
|
|
1347
|
-
* @param components array of components
|
|
1348
|
-
* @param titlePanel name of parent panel, so children components will inherit the panelName
|
|
1349
|
-
* @param conditionalObject conditional object it will be inherited from panel {conditional: { eq: , value: , when: , json: }, customConditional: }
|
|
1350
|
-
*/
|
|
1351
|
-
static getComponentsByRecursion(components, titlePanel, conditionalParent) {
|
|
1352
|
-
// it contains the result array
|
|
1353
|
-
let result = [];
|
|
1354
|
-
if (components) {
|
|
1355
|
-
// iterate over components
|
|
1356
|
-
for (const component of components) {
|
|
1357
|
-
// avoid the editgrid component ot if it has a different behavior it should have an else statement
|
|
1358
|
-
if (component[EFormioKey.TYPE] !== EFormioKey.EDITGRID) {
|
|
1359
|
-
// if component is panel then titlePanel variable is changed, and it is gonna be inherited
|
|
1360
|
-
if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
|
|
1361
|
-
titlePanel = component[EFormioKey.TITLE];
|
|
1365
|
+
let form = arrayForms;
|
|
1366
|
+
if (!form ||
|
|
1367
|
+
!form[0] ||
|
|
1368
|
+
!form[0].promCodigo ||
|
|
1369
|
+
form[0].promCodigo != promCodigo) {
|
|
1370
|
+
// this.router.navigate(['404']);
|
|
1371
|
+
resolve(lFormFieldsToken);
|
|
1362
1372
|
}
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
// change condition
|
|
1370
|
-
if (conditional)
|
|
1371
|
-
conditionalParent = conditional;
|
|
1372
|
-
// it contains the subcomponents depending on the value of component if it has components or columns
|
|
1373
|
-
let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
|
|
1374
|
-
? component[EFormioKey.COMPONENTS]
|
|
1375
|
-
: component[EFormioKey.COLUMNS];
|
|
1376
|
-
// if component has subComponents, then execute the recursion function to get the recursionnResult
|
|
1377
|
-
const recursionResult = FormioUtil.getComponentsByRecursion(subComponents, titlePanel, conditionalParent);
|
|
1378
|
-
// if recursion result then result concats the recursionResult
|
|
1379
|
-
if (recursionResult)
|
|
1380
|
-
result = result.concat(recursionResult);
|
|
1381
|
-
// reset conditional Parent
|
|
1382
|
-
if (component[EFormioKey.ID] == conditionalParent.id)
|
|
1383
|
-
conditionalParent = undefined;
|
|
1373
|
+
lFormFieldsToken = [];
|
|
1374
|
+
for (let formComp of form) {
|
|
1375
|
+
let newComponents;
|
|
1376
|
+
let components = [];
|
|
1377
|
+
if (formComp.components) {
|
|
1378
|
+
newComponents = formComp.components;
|
|
1384
1379
|
}
|
|
1385
|
-
else {
|
|
1386
|
-
|
|
1380
|
+
else if (formComp.columns) {
|
|
1381
|
+
newComponents = formComp.columns;
|
|
1387
1382
|
}
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
component[EFormioKey.CUSTOM_CONDITIONAL] =
|
|
1400
|
-
conditional[EFormioKey.CUSTOM_CONDITIONAL];
|
|
1401
|
-
// add namPanel as property
|
|
1402
|
-
component[EFormioKey.TITLE_PANEL] = titlePanel;
|
|
1403
|
-
// add component to the result
|
|
1404
|
-
result.push(component);
|
|
1383
|
+
if (newComponents && UtilString.isValid(formComp.title)) {
|
|
1384
|
+
lFormFieldsToken.push({
|
|
1385
|
+
title: {
|
|
1386
|
+
key: TokenService.getKeyFormulario(formComp.title),
|
|
1387
|
+
value: formComp.title,
|
|
1388
|
+
object: formComp
|
|
1389
|
+
},
|
|
1390
|
+
value: []
|
|
1391
|
+
});
|
|
1392
|
+
lFormFieldsToken[lFormFieldsToken.length - 1].value =
|
|
1393
|
+
this.getComponenetForm(components, newComponents, null, false, null);
|
|
1405
1394
|
}
|
|
1406
1395
|
}
|
|
1396
|
+
resolve(lFormFieldsToken);
|
|
1397
|
+
},
|
|
1398
|
+
error: (error) => {
|
|
1399
|
+
reject(error);
|
|
1407
1400
|
}
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
return result;
|
|
1411
|
-
}
|
|
1412
|
-
/**
|
|
1413
|
-
* It returns the components
|
|
1414
|
-
* @param components
|
|
1415
|
-
* @param keepEditGrids
|
|
1416
|
-
*/
|
|
1417
|
-
static getComponentsWithEditGrids(components) {
|
|
1418
|
-
return FormioUtil.getComponentsByRecursionWithEditGrids(components, '', null);
|
|
1401
|
+
});
|
|
1402
|
+
});
|
|
1419
1403
|
}
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
let result = [];
|
|
1429
|
-
if (components) {
|
|
1430
|
-
// iterate over components
|
|
1431
|
-
for (const component of components) {
|
|
1432
|
-
// avoid the editgrid component ot if it has a different behavior it should have an else statement
|
|
1433
|
-
// if component is panel then titlePanel variable is changed, and it is gonna be inherited
|
|
1434
|
-
if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
|
|
1435
|
-
titlePanel = component[EFormioKey.TITLE];
|
|
1404
|
+
getFormFieldsByFormId(formId) {
|
|
1405
|
+
return new Promise((resolve, reject) => {
|
|
1406
|
+
// Search the dynamic form
|
|
1407
|
+
let lFormFieldsToken = null;
|
|
1408
|
+
this.formService.getById(formId).subscribe((result) => {
|
|
1409
|
+
let form = result;
|
|
1410
|
+
if (!form || !form[0]) {
|
|
1411
|
+
resolve(lFormFieldsToken);
|
|
1436
1412
|
}
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
conditionalParent = conditional;
|
|
1444
|
-
// it contains the subcomponents depending on the value of component if it has components or columns
|
|
1445
|
-
let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
|
|
1446
|
-
? component[EFormioKey.COMPONENTS]
|
|
1447
|
-
: component[EFormioKey.COLUMNS];
|
|
1448
|
-
if (component[EFormioKey.TYPE] === EFormioKey.EDITGRID) {
|
|
1449
|
-
component[EFormioKey.TITLE_PANEL] = titlePanel;
|
|
1450
|
-
result.push(component);
|
|
1413
|
+
lFormFieldsToken = [];
|
|
1414
|
+
for (let formComp of form) {
|
|
1415
|
+
let newComponents;
|
|
1416
|
+
let components = [];
|
|
1417
|
+
if (formComp.components) {
|
|
1418
|
+
newComponents = formComp.components;
|
|
1451
1419
|
}
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
if (
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
// resolve conditional conditional object
|
|
1467
|
-
let conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
|
|
1468
|
-
if (!conditional)
|
|
1469
|
-
conditional = conditionalParent;
|
|
1470
|
-
component[EFormioKey.CONDITIONAL] = conditional[EFormioKey.CONDITIONAL];
|
|
1471
|
-
component[EFormioKey.CUSTOM_CONDITIONAL] =
|
|
1472
|
-
conditional[EFormioKey.CUSTOM_CONDITIONAL];
|
|
1473
|
-
// add namPanel as property
|
|
1474
|
-
component[EFormioKey.TITLE_PANEL] = titlePanel;
|
|
1475
|
-
// add component to the result
|
|
1476
|
-
result.push(component);
|
|
1420
|
+
else if (formComp.columns) {
|
|
1421
|
+
newComponents = formComp.columns;
|
|
1422
|
+
}
|
|
1423
|
+
if (newComponents && UtilString.isValid(formComp.title)) {
|
|
1424
|
+
lFormFieldsToken.push({
|
|
1425
|
+
title: {
|
|
1426
|
+
key: TokenService.getKeyFormulario(formComp.title),
|
|
1427
|
+
value: formComp.title,
|
|
1428
|
+
object: formComp
|
|
1429
|
+
},
|
|
1430
|
+
value: []
|
|
1431
|
+
});
|
|
1432
|
+
lFormFieldsToken[lFormFieldsToken.length - 1].value =
|
|
1433
|
+
this.getComponenetForm(components, newComponents, null, false, null);
|
|
1477
1434
|
}
|
|
1478
1435
|
}
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1436
|
+
resolve(lFormFieldsToken);
|
|
1437
|
+
}, (error) => {
|
|
1438
|
+
reject(error);
|
|
1439
|
+
});
|
|
1440
|
+
});
|
|
1482
1441
|
}
|
|
1483
|
-
/**
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1442
|
+
/** This promise allows to execute a function when consulting the form fields. */
|
|
1443
|
+
getFormPanelsByPromCode(promCodigo) {
|
|
1444
|
+
return new Promise((resolve, reject) => {
|
|
1445
|
+
// Search the dynamic form
|
|
1446
|
+
let lFormPannelsToken = null;
|
|
1447
|
+
this.formService.getByPromCodigo(promCodigo).subscribe((result) => {
|
|
1448
|
+
let form = result;
|
|
1449
|
+
if (!form ||
|
|
1450
|
+
!form[0] ||
|
|
1451
|
+
!form[0].promCodigo ||
|
|
1452
|
+
form[0].promCodigo != promCodigo) {
|
|
1453
|
+
// this.router.navigate(['404']);
|
|
1454
|
+
resolve(lFormPannelsToken);
|
|
1455
|
+
}
|
|
1456
|
+
lFormPannelsToken = [];
|
|
1457
|
+
for (let formComp of form) {
|
|
1458
|
+
let newComponents;
|
|
1459
|
+
let components = [];
|
|
1460
|
+
if (formComp.components) {
|
|
1461
|
+
newComponents = formComp.components;
|
|
1462
|
+
}
|
|
1463
|
+
else if (formComp.columns) {
|
|
1464
|
+
newComponents = formComp.columns;
|
|
1465
|
+
}
|
|
1466
|
+
if (newComponents && UtilString.isValid(formComp.title)) {
|
|
1467
|
+
lFormPannelsToken.push({
|
|
1468
|
+
title: {
|
|
1469
|
+
key: TokenService.getKeyFormulario(formComp.title),
|
|
1470
|
+
value: formComp.title,
|
|
1471
|
+
object: formComp
|
|
1472
|
+
},
|
|
1473
|
+
value: []
|
|
1474
|
+
});
|
|
1475
|
+
lFormPannelsToken[lFormPannelsToken.length - 1].value =
|
|
1476
|
+
this.getPanelComponenet(components, newComponents, null);
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
resolve(lFormPannelsToken);
|
|
1480
|
+
}, (error) => {
|
|
1481
|
+
reject(error);
|
|
1482
|
+
});
|
|
1483
|
+
});
|
|
1498
1484
|
}
|
|
1499
1485
|
/**
|
|
1500
|
-
*
|
|
1486
|
+
* A recursive method to get all the information of the editGrid dynamic form
|
|
1501
1487
|
* @param components
|
|
1488
|
+
* @param form
|
|
1502
1489
|
*/
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
static getEditGridKeyLabelsByRecursion(components, titlePanel, conditionalParent) {
|
|
1513
|
-
// it contains the result array
|
|
1514
|
-
let result = [];
|
|
1515
|
-
if (components) {
|
|
1516
|
-
// iterate over components
|
|
1517
|
-
for (const component of components) {
|
|
1518
|
-
// if component is panel then titlePanel variable is changed, and it is gonna be inherited
|
|
1519
|
-
if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
|
|
1520
|
-
titlePanel = component[EFormioKey.TITLE];
|
|
1521
|
-
}
|
|
1522
|
-
if (typeof component[EFormioKey.COMPONENTS] !== 'undefined' ||
|
|
1523
|
-
typeof component[EFormioKey.COLUMNS] !== 'undefined') {
|
|
1524
|
-
// resolve conditional parent conditional
|
|
1525
|
-
const conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
|
|
1526
|
-
// change condition
|
|
1527
|
-
if (conditional)
|
|
1528
|
-
conditionalParent = conditional;
|
|
1529
|
-
// it contains the subcomponents depending on the value of component if it has components or columns
|
|
1530
|
-
let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
|
|
1531
|
-
? component[EFormioKey.COMPONENTS]
|
|
1532
|
-
: component[EFormioKey.COLUMNS];
|
|
1533
|
-
if (component[EFormioKey.TYPE] == EFormioKey.EDITGRID) {
|
|
1534
|
-
// add namPanel as property
|
|
1535
|
-
component[EFormioKey.TITLE_PANEL] = titlePanel;
|
|
1536
|
-
// add component to the result
|
|
1537
|
-
result.push(component);
|
|
1538
|
-
}
|
|
1539
|
-
else {
|
|
1540
|
-
// if component has subComponents, then execute the recursion function to get the recursionnResult
|
|
1541
|
-
const recursionResult = FormioUtil.getEditGridKeyLabelsByRecursion(subComponents, titlePanel, conditionalParent);
|
|
1542
|
-
// if recursion result then result concats the recursionResult
|
|
1543
|
-
if (recursionResult)
|
|
1544
|
-
result = result.concat(recursionResult);
|
|
1545
|
-
// reset conditional Parent
|
|
1546
|
-
if (component[EFormioKey.ID] == conditionalParent.id)
|
|
1547
|
-
conditionalParent = undefined;
|
|
1548
|
-
}
|
|
1490
|
+
getPanelComponenet(components, form, panelName) {
|
|
1491
|
+
for (let formComp of form) {
|
|
1492
|
+
if (formComp.type === 'panel') {
|
|
1493
|
+
components.push(formComp);
|
|
1494
|
+
}
|
|
1495
|
+
else if (formComp.components || formComp.columns) {
|
|
1496
|
+
let newComponents;
|
|
1497
|
+
if (formComp.components) {
|
|
1498
|
+
newComponents = formComp.components;
|
|
1549
1499
|
}
|
|
1550
|
-
else {
|
|
1500
|
+
else if (formComp.columns) {
|
|
1501
|
+
newComponents = formComp.columns;
|
|
1551
1502
|
}
|
|
1503
|
+
components = this.getPanelComponenet(components, newComponents, panelName);
|
|
1552
1504
|
}
|
|
1553
1505
|
}
|
|
1554
|
-
return
|
|
1506
|
+
return components;
|
|
1555
1507
|
}
|
|
1556
1508
|
/**
|
|
1557
|
-
*
|
|
1509
|
+
* A recursive method to get all the information of the components a columns of the dynamic form
|
|
1558
1510
|
* @param components
|
|
1559
|
-
* @param
|
|
1511
|
+
* @param form
|
|
1560
1512
|
*/
|
|
1561
|
-
|
|
1562
|
-
|
|
1513
|
+
getComponenetForm(components, form, panelName, editgrid, editGridKey) {
|
|
1514
|
+
for (let formComp of form) {
|
|
1515
|
+
if (formComp.components || formComp.columns) {
|
|
1516
|
+
let newComponents;
|
|
1517
|
+
if (formComp.components) {
|
|
1518
|
+
newComponents = formComp.components;
|
|
1519
|
+
if (formComp.type === 'editgrid') {
|
|
1520
|
+
editgrid = true;
|
|
1521
|
+
editGridKey = formComp.key;
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
else if (formComp.columns) {
|
|
1525
|
+
newComponents = formComp.columns;
|
|
1526
|
+
}
|
|
1527
|
+
if (formComp.type && formComp.type === 'panel') {
|
|
1528
|
+
panelName = formComp.title;
|
|
1529
|
+
}
|
|
1530
|
+
components = this.getComponenetForm(components, newComponents, panelName, editgrid, editGridKey);
|
|
1531
|
+
}
|
|
1532
|
+
else {
|
|
1533
|
+
formComp.panelName = panelName;
|
|
1534
|
+
formComp.editgrid = editgrid;
|
|
1535
|
+
formComp.editGridKey = editGridKey;
|
|
1536
|
+
components.push(formComp);
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
return components;
|
|
1563
1540
|
}
|
|
1564
|
-
/**
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
// if component is panel then titlePanel variable is changed, and it is gonna be inherited
|
|
1578
|
-
if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
|
|
1579
|
-
titlePanel = component[EFormioKey.TITLE];
|
|
1541
|
+
/** This promise allows to execute a function when consulting the form fields. */
|
|
1542
|
+
getFormEditGridFieldsByPromCode(promCodigo) {
|
|
1543
|
+
return new Promise((resolve, reject) => {
|
|
1544
|
+
// Search the dynamic form
|
|
1545
|
+
let lFormFieldsToken = null;
|
|
1546
|
+
this.formService.getByPromCodigo(promCodigo).subscribe((result) => {
|
|
1547
|
+
let form = result;
|
|
1548
|
+
if (!form ||
|
|
1549
|
+
!form[0] ||
|
|
1550
|
+
!form[0].promCodigo ||
|
|
1551
|
+
form[0].promCodigo != promCodigo) {
|
|
1552
|
+
// this.router.navigate(['404']);
|
|
1553
|
+
resolve(lFormFieldsToken);
|
|
1580
1554
|
}
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
conditionalParent = conditional;
|
|
1588
|
-
// it contains the subcomponents depending on the value of component if it has components or columns
|
|
1589
|
-
let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
|
|
1590
|
-
? component[EFormioKey.COMPONENTS]
|
|
1591
|
-
: component[EFormioKey.COLUMNS];
|
|
1592
|
-
if (component[EFormioKey.TYPE] === EFormioKey.EDITGRID &&
|
|
1593
|
-
component['key'] == editGridName) {
|
|
1594
|
-
existEditGrid = true;
|
|
1595
|
-
if (typeof component[EFormioKey.COMPONENTS] !== 'undefined' ||
|
|
1596
|
-
typeof component[EFormioKey.COLUMNS] !== 'undefined') {
|
|
1597
|
-
// resolve conditional parent conditional
|
|
1598
|
-
const conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
|
|
1599
|
-
// change condition
|
|
1600
|
-
if (conditional)
|
|
1601
|
-
conditionalParent = conditional;
|
|
1602
|
-
// it contains the subcomponents depending on the value of component if it has components or columns
|
|
1603
|
-
let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
|
|
1604
|
-
? component[EFormioKey.COMPONENTS]
|
|
1605
|
-
: component[EFormioKey.COLUMNS];
|
|
1606
|
-
// if component has subComponents, then execute the recursion function to get the recursionnResult
|
|
1607
|
-
const recursionResult = FormioUtil.getComponentsByRecursionIntoEditGrids(subComponents, titlePanel, conditionalParent, editGridName, existEditGrid);
|
|
1608
|
-
// if recursion result then result concats the recursionResult
|
|
1609
|
-
if (recursionResult)
|
|
1610
|
-
result = result.concat(recursionResult);
|
|
1611
|
-
// reset conditional Parent
|
|
1612
|
-
if (component && conditionalParent) {
|
|
1613
|
-
if (component[EFormioKey.ID] == conditionalParent.id)
|
|
1614
|
-
conditionalParent = undefined;
|
|
1615
|
-
}
|
|
1616
|
-
}
|
|
1617
|
-
else {
|
|
1618
|
-
// avoid the component type button
|
|
1619
|
-
if (component[EFormioKey.TYPE] !== EFormioKey.BUTTON &&
|
|
1620
|
-
component[EFormioKey.KEY] &&
|
|
1621
|
-
component[EFormioKey.LABEL] &&
|
|
1622
|
-
existEditGrid) {
|
|
1623
|
-
// resolve conditional conditional object
|
|
1624
|
-
let conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
|
|
1625
|
-
if (!conditional)
|
|
1626
|
-
conditional = conditionalParent;
|
|
1627
|
-
component[EFormioKey.CONDITIONAL] =
|
|
1628
|
-
conditional[EFormioKey.CONDITIONAL];
|
|
1629
|
-
component[EFormioKey.CUSTOM_CONDITIONAL] =
|
|
1630
|
-
conditional[EFormioKey.CUSTOM_CONDITIONAL];
|
|
1631
|
-
// add namPanel as property
|
|
1632
|
-
component[EFormioKey.TITLE_PANEL] = titlePanel;
|
|
1633
|
-
// add component to the result
|
|
1634
|
-
result.push(component);
|
|
1635
|
-
}
|
|
1636
|
-
}
|
|
1555
|
+
lFormFieldsToken = [];
|
|
1556
|
+
for (let formComp of form) {
|
|
1557
|
+
let newComponents;
|
|
1558
|
+
let components = [];
|
|
1559
|
+
if (formComp.components) {
|
|
1560
|
+
newComponents = formComp.components;
|
|
1637
1561
|
}
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
// if recursion result then result concats the recursionResult
|
|
1641
|
-
if (recursionResult)
|
|
1642
|
-
result = result.concat(recursionResult);
|
|
1643
|
-
// reset conditional Parent
|
|
1644
|
-
if (component && conditionalParent) {
|
|
1645
|
-
if (component[EFormioKey.ID] == conditionalParent.id)
|
|
1646
|
-
conditionalParent = undefined;
|
|
1562
|
+
else if (formComp.columns) {
|
|
1563
|
+
newComponents = formComp.columns;
|
|
1647
1564
|
}
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
component[EFormioKey.CONDITIONAL] = conditional[EFormioKey.CONDITIONAL];
|
|
1660
|
-
component[EFormioKey.CUSTOM_CONDITIONAL] =
|
|
1661
|
-
conditional[EFormioKey.CUSTOM_CONDITIONAL];
|
|
1662
|
-
// add namPanel as property
|
|
1663
|
-
component[EFormioKey.TITLE_PANEL] = titlePanel;
|
|
1664
|
-
// add component to the result
|
|
1665
|
-
result.push(component);
|
|
1565
|
+
if (newComponents && UtilString.isValid(formComp.title)) {
|
|
1566
|
+
lFormFieldsToken.push({
|
|
1567
|
+
title: {
|
|
1568
|
+
key: TokenService.getKeyFormulario(formComp.title),
|
|
1569
|
+
value: formComp.title,
|
|
1570
|
+
object: formComp
|
|
1571
|
+
},
|
|
1572
|
+
value: []
|
|
1573
|
+
});
|
|
1574
|
+
lFormFieldsToken[lFormFieldsToken.length - 1].value =
|
|
1575
|
+
this.getEditGridComponenet(components, newComponents, null);
|
|
1666
1576
|
}
|
|
1667
1577
|
}
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1578
|
+
resolve(lFormFieldsToken);
|
|
1579
|
+
}, (error) => {
|
|
1580
|
+
reject(error);
|
|
1581
|
+
});
|
|
1582
|
+
});
|
|
1671
1583
|
}
|
|
1672
1584
|
/**
|
|
1673
|
-
*
|
|
1674
|
-
* @param
|
|
1675
|
-
* @
|
|
1585
|
+
* A recursive method to get all the information of the editGrid dynamic form
|
|
1586
|
+
* @param components
|
|
1587
|
+
* @param form
|
|
1676
1588
|
*/
|
|
1677
|
-
|
|
1678
|
-
let
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
if (
|
|
1686
|
-
|
|
1589
|
+
getEditGridComponenet(components, form, panelName) {
|
|
1590
|
+
for (let formComp of form) {
|
|
1591
|
+
if (formComp.type === 'editgrid') {
|
|
1592
|
+
formComp.panelName = panelName;
|
|
1593
|
+
components.push(formComp);
|
|
1594
|
+
}
|
|
1595
|
+
else if (formComp.components || formComp.columns) {
|
|
1596
|
+
let newComponents;
|
|
1597
|
+
if (formComp.components) {
|
|
1598
|
+
newComponents = formComp.components;
|
|
1687
1599
|
}
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
});
|
|
1691
|
-
if (!form) {
|
|
1692
|
-
//console.error('No se encontró el formulario con id ' + dForm.formId);
|
|
1693
|
-
continue;
|
|
1600
|
+
else if (formComp.columns) {
|
|
1601
|
+
newComponents = formComp.columns;
|
|
1694
1602
|
}
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
listData[key] = dForm.data[key];
|
|
1698
|
-
listDataByForm[keyFormTitle + key] = dForm.data[key];
|
|
1603
|
+
if (formComp.type && formComp.type === 'panel') {
|
|
1604
|
+
panelName = formComp.title;
|
|
1699
1605
|
}
|
|
1606
|
+
components = this.getEditGridComponenet(components, newComponents, panelName);
|
|
1700
1607
|
}
|
|
1701
1608
|
}
|
|
1702
|
-
return
|
|
1703
|
-
listData: listData,
|
|
1704
|
-
listDataByForm: listDataByForm
|
|
1705
|
-
};
|
|
1609
|
+
return components;
|
|
1706
1610
|
}
|
|
1707
|
-
/**
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
*/
|
|
1711
|
-
static getPanelComponents(components) {
|
|
1712
|
-
return FormioUtil.getComponentsByPanel(components);
|
|
1611
|
+
/** It returns the tokens by promCodigo */
|
|
1612
|
+
getListByPromCodigo(promCode) {
|
|
1613
|
+
return this.httpClient.get(this.environment.host.backend.configuration + 'token/getByPromCodigo', { params: new HttpParams().set('promCodigo', promCode.toString()) });
|
|
1713
1614
|
}
|
|
1714
|
-
/**
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
// it contains the result array
|
|
1720
|
-
let result = [];
|
|
1721
|
-
if (components) {
|
|
1722
|
-
// iterate over components
|
|
1723
|
-
for (const component of components) {
|
|
1724
|
-
// avoid the editgrid component ot if it has a different behavior it should have an else statement
|
|
1725
|
-
if (component[EFormioKey.TYPE] !== EFormioKey.EDITGRID) {
|
|
1726
|
-
// if component is panel then titlePanel variable is changed, and it is gonna be inherited
|
|
1727
|
-
if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
|
|
1728
|
-
result.push(component);
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
}
|
|
1732
|
-
}
|
|
1733
|
-
return result;
|
|
1615
|
+
/** It returns the token by id */
|
|
1616
|
+
getById(id) {
|
|
1617
|
+
return this.httpClient.get(this.environment.host.backend.configuration + 'token/getById', {
|
|
1618
|
+
params: new HttpParams().set('id', id.toString())
|
|
1619
|
+
});
|
|
1734
1620
|
}
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
constructor(environment, httpClient) {
|
|
1739
|
-
this.environment = environment;
|
|
1740
|
-
this.httpClient = httpClient;
|
|
1741
|
-
this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
1621
|
+
/** It deletes a form by id */
|
|
1622
|
+
delete(id) {
|
|
1623
|
+
return this.httpClient.delete(this.environment.host.backend.configuration + 'token/delete', { params: new HttpParams().set('id', id) });
|
|
1742
1624
|
}
|
|
1743
|
-
/** It
|
|
1744
|
-
|
|
1745
|
-
return this.httpClient.
|
|
1625
|
+
/** It saves the token */
|
|
1626
|
+
save(token) {
|
|
1627
|
+
return this.httpClient.post(this.environment.host.backend.configuration + 'token/save', token, HEADER_JSON);
|
|
1746
1628
|
}
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1629
|
+
static getKeyFormulario(formTitle) {
|
|
1630
|
+
if (UtilString.isValid(formTitle)) {
|
|
1631
|
+
return (UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_FORM) +
|
|
1632
|
+
UtilString.replaceAccentSpacesOthers(formTitle).replace(/_/g, '-'));
|
|
1633
|
+
}
|
|
1634
|
+
return '';
|
|
1750
1635
|
}
|
|
1751
|
-
/** It returns
|
|
1752
|
-
|
|
1753
|
-
return this.httpClient.get(this.environment.host.backend.
|
|
1754
|
-
|
|
1755
|
-
|
|
1636
|
+
/** It returns the unique verification code */
|
|
1637
|
+
getUniqueVerificationCode(login, token) {
|
|
1638
|
+
return this.httpClient.get(this.environment.host.backend.documentsRepository +
|
|
1639
|
+
'documento/consultarCodigoUnico/' +
|
|
1640
|
+
login +
|
|
1641
|
+
'/' +
|
|
1642
|
+
token, { params: new HttpParams() });
|
|
1756
1643
|
}
|
|
1757
|
-
/** It
|
|
1758
|
-
|
|
1759
|
-
|
|
1644
|
+
/** It send the information to copy the Document viewer */
|
|
1645
|
+
copyDocumentInformationViewer(login, token, uniqueCode, documentURL, documentName) {
|
|
1646
|
+
let infoDocumento = {
|
|
1647
|
+
codigoUnico: uniqueCode,
|
|
1648
|
+
rutaDocumento: documentURL,
|
|
1649
|
+
documentName: documentName
|
|
1650
|
+
};
|
|
1651
|
+
return this.httpClient.post(this.environment.host.backend.documentsRepository +
|
|
1652
|
+
'documento/adicionarDocumento/' +
|
|
1653
|
+
login +
|
|
1654
|
+
'/' +
|
|
1655
|
+
token, infoDocumento, HEADER_JSON);
|
|
1760
1656
|
}
|
|
1761
|
-
|
|
1762
|
-
return
|
|
1657
|
+
static getKeyBudget() {
|
|
1658
|
+
return UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_BUDGET);
|
|
1763
1659
|
}
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
return this.httpClient.delete(this.environment.host.backend.configuration + 'form/delete', {
|
|
1767
|
-
params: new HttpParams().set('id', id)
|
|
1768
|
-
});
|
|
1660
|
+
static getKeyDocument() {
|
|
1661
|
+
return UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_DOCUMENTO);
|
|
1769
1662
|
}
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
let params = new HttpParams()
|
|
1773
|
-
.set('promCodigo', promCodigo.toString())
|
|
1774
|
-
.set('patCodigo', patCodigo.toString())
|
|
1775
|
-
.set('formId', formId !== undefined ? formId : '');
|
|
1776
|
-
return this.httpClient.get(this.environment.host.backend.configuration + 'form/getByPromCodigoAndProfile', { params: params });
|
|
1663
|
+
static getKeyTask() {
|
|
1664
|
+
return UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_TASKL);
|
|
1777
1665
|
}
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
return this.httpClient.get(this.environment.host.backend.configuration + 'form/getByListPromCodigo', { params: new HttpParams().set('listPromCodigo', listPromCod.toString()) });
|
|
1666
|
+
static getKeyStatic() {
|
|
1667
|
+
return UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_STATIC);
|
|
1781
1668
|
}
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
});
|
|
1669
|
+
static getKeyCalculated(token) {
|
|
1670
|
+
return (UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_CALCULATED) +
|
|
1671
|
+
'_' +
|
|
1672
|
+
UtilString.replaceAccentSpacesOthers(token.name));
|
|
1787
1673
|
}
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
params: new HttpParams()
|
|
1793
|
-
.set('promCodigo', promCodigo.toString())
|
|
1794
|
-
.set('title', title)
|
|
1795
|
-
});
|
|
1674
|
+
static getKeySnapshot(token) {
|
|
1675
|
+
return (UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_SNAPSHOT) +
|
|
1676
|
+
'_' +
|
|
1677
|
+
UtilString.replaceAccentSpacesOthers(token.name));
|
|
1796
1678
|
}
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
params: new HttpParams()
|
|
1802
|
-
.set('promCodigo', promCodigo.toString())
|
|
1803
|
-
.set('patCodigo', patCodigo.toString())
|
|
1804
|
-
.set('formId', formId)
|
|
1805
|
-
.set('username', username)
|
|
1806
|
-
});
|
|
1679
|
+
static getKeyGuarantee(token) {
|
|
1680
|
+
return (UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_GUARANTEE) +
|
|
1681
|
+
'_' +
|
|
1682
|
+
UtilString.replaceAccentSpacesOthers(token.name));
|
|
1807
1683
|
}
|
|
1808
1684
|
/**
|
|
1809
|
-
*
|
|
1810
|
-
* @param
|
|
1685
|
+
* Return a value that represent the type of label: 1=Form, 2=Budget, 3=Static, 4=Calculated
|
|
1686
|
+
* @param key Value to evalueate
|
|
1811
1687
|
*/
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1688
|
+
static getKeyType(key) {
|
|
1689
|
+
key = key.replace('{', '').replace('}', '');
|
|
1690
|
+
key = key.substring(1, key.indexOf('_'));
|
|
1691
|
+
if (key.startsWith(UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_FORM))) {
|
|
1692
|
+
return 1;
|
|
1693
|
+
}
|
|
1694
|
+
else if (key.startsWith(UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_BUDGET))) {
|
|
1695
|
+
return 2;
|
|
1696
|
+
}
|
|
1697
|
+
else if (key.startsWith(UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_STATIC))) {
|
|
1698
|
+
return 3;
|
|
1699
|
+
}
|
|
1700
|
+
else if (key.startsWith(UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_CALCULATED))) {
|
|
1701
|
+
return 4;
|
|
1702
|
+
}
|
|
1703
|
+
else if (key.startsWith(UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_TASKL))) {
|
|
1704
|
+
return 5;
|
|
1705
|
+
}
|
|
1706
|
+
return null;
|
|
1831
1707
|
}
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1708
|
+
/**
|
|
1709
|
+
* Depends of the type of formFieldToken return de value of the valueData
|
|
1710
|
+
* @param formFieldToken
|
|
1711
|
+
* @param valueData
|
|
1712
|
+
*/
|
|
1713
|
+
getValueFromFormField(formFieldToken, valueData) {
|
|
1714
|
+
if (typeof valueData == 'object') {
|
|
1715
|
+
if (formFieldToken.type) {
|
|
1716
|
+
if (formFieldToken.type == 'address') {
|
|
1717
|
+
return valueData.formatted_address;
|
|
1718
|
+
}
|
|
1719
|
+
if (formFieldToken.type == 'select' &&
|
|
1720
|
+
formFieldToken.searchField &&
|
|
1721
|
+
valueData.hasOwnProperty(formFieldToken.searchField)) {
|
|
1722
|
+
return valueData[formFieldToken.searchField];
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
return valueData;
|
|
1851
1727
|
}
|
|
1852
|
-
/**
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1728
|
+
/**
|
|
1729
|
+
* Try to find the token in the stringText and replace with dataValue. If detect format of number or date try to format the dataValue
|
|
1730
|
+
* @param stringText
|
|
1731
|
+
* @param token
|
|
1732
|
+
* @param dataValue
|
|
1733
|
+
*/
|
|
1734
|
+
replaceToken(stringText, token, dataValue) {
|
|
1735
|
+
let valueReplace = null;
|
|
1736
|
+
if (token && token[0] == '#') {
|
|
1737
|
+
let typeToken = token.substring(1, token.indexOf('('));
|
|
1738
|
+
if (typeToken == 'date') {
|
|
1739
|
+
let dateFormat = token.substring(token.indexOf('}') + 1, token.indexOf(')'));
|
|
1740
|
+
dateFormat = dateFormat.trim().replace(/\"/g, '').replace(/\'/g, '');
|
|
1741
|
+
let dateValue = DateUtil.getDate(dataValue);
|
|
1742
|
+
if (dateValue) {
|
|
1743
|
+
valueReplace = DateUtil.getMoment(dateValue).format(dateFormat);
|
|
1744
|
+
}
|
|
1745
|
+
else {
|
|
1746
|
+
valueReplace = '';
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
else if (typeToken == 'number') {
|
|
1750
|
+
let numberValue = Number(dataValue);
|
|
1751
|
+
if (numberValue != undefined && !isNaN(numberValue)) {
|
|
1752
|
+
let numberFormat = token.substring(token.indexOf('}') + 1, token.indexOf(')'));
|
|
1753
|
+
numberFormat = numberFormat.trim().replace(/\"/g, '').replace(/\'/g, '');
|
|
1754
|
+
valueReplace = this.currencyPipe.transform(numberValue, this.locale, '', numberFormat);
|
|
1755
|
+
}
|
|
1756
|
+
else {
|
|
1757
|
+
console.log('El dato [' +
|
|
1758
|
+
dataValue +
|
|
1759
|
+
'] para el token [' +
|
|
1760
|
+
token +
|
|
1761
|
+
'] tipo númerico no es valido');
|
|
1762
|
+
valueReplace = '';
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
else {
|
|
1766
|
+
console.log('tipo de token indefinido. [typeToken[' + typeToken + ']]');
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1769
|
+
else if (token && token[0] == '$') {
|
|
1770
|
+
valueReplace = dataValue;
|
|
1771
|
+
}
|
|
1772
|
+
else {
|
|
1773
|
+
console.log('El token no es valido. [token[' + token + ']]');
|
|
1774
|
+
}
|
|
1775
|
+
if (stringText && valueReplace !== null) {
|
|
1776
|
+
// replace text in a more efficient way
|
|
1777
|
+
stringText = stringText.split(token).join(valueReplace);
|
|
1778
|
+
//stringText = stringText.replace(token, valueReplace);
|
|
1779
|
+
}
|
|
1780
|
+
return stringText;
|
|
1781
|
+
}
|
|
1782
|
+
getListTokensByStringSegmentation(stringText) {
|
|
1783
|
+
const arrayToken = stringText.match(/\${([^}]+)\}/g);
|
|
1784
|
+
const arrayTokenFormattedDate = stringText.match(/\#date[^)]+\)/g);
|
|
1785
|
+
const arrayTokenFormattedNumber = stringText.match(/\#number[^)]+\)/g);
|
|
1786
|
+
let arrayTokenFormatted = [];
|
|
1787
|
+
if (arrayTokenFormattedDate &&
|
|
1788
|
+
arrayTokenFormattedDate.length > 0 &&
|
|
1789
|
+
arrayTokenFormattedNumber &&
|
|
1790
|
+
arrayTokenFormattedNumber.length > 0) {
|
|
1791
|
+
arrayTokenFormatted = arrayTokenFormattedDate.concat(arrayTokenFormattedNumber);
|
|
1792
|
+
}
|
|
1793
|
+
else if (arrayTokenFormattedDate && arrayTokenFormattedDate.length > 0) {
|
|
1794
|
+
arrayTokenFormatted = arrayTokenFormattedDate.slice();
|
|
1795
|
+
}
|
|
1796
|
+
else if (arrayTokenFormattedNumber && arrayTokenFormattedNumber.length > 0) {
|
|
1797
|
+
arrayTokenFormatted = arrayTokenFormattedNumber.slice();
|
|
1798
|
+
}
|
|
1799
|
+
const result = [];
|
|
1800
|
+
if (arrayToken) {
|
|
1801
|
+
for (const token of arrayToken) {
|
|
1802
|
+
const infoToken = { key: token, value: token };
|
|
1803
|
+
if (arrayTokenFormatted) {
|
|
1804
|
+
for (const tokenFormatted of arrayTokenFormatted) {
|
|
1805
|
+
const index = tokenFormatted.indexOf(token);
|
|
1806
|
+
if (index >= 0) {
|
|
1807
|
+
infoToken.value = tokenFormatted;
|
|
1808
|
+
break;
|
|
1883
1809
|
}
|
|
1884
1810
|
}
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
else if (formComp.columns) {
|
|
1901
|
-
newComponents = formComp.columns;
|
|
1902
|
-
}
|
|
1903
|
-
if (newComponents && UtilString.isValid(formComp.title)) {
|
|
1904
|
-
lFormFieldsToken.push({
|
|
1905
|
-
title: {
|
|
1906
|
-
key: TokenService.getKeyFormulario(formComp.title),
|
|
1907
|
-
value: formComp.title,
|
|
1908
|
-
object: formComp
|
|
1909
|
-
},
|
|
1910
|
-
value: []
|
|
1911
|
-
});
|
|
1912
|
-
lFormFieldsToken[lFormFieldsToken.length - 1].value =
|
|
1913
|
-
this.getComponenetForm(components, newComponents, null, false, null);
|
|
1811
|
+
}
|
|
1812
|
+
result.push(infoToken);
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
return result;
|
|
1816
|
+
}
|
|
1817
|
+
changeIdPropertiesOfObject(normalizationColumns, listData) {
|
|
1818
|
+
const newData = [];
|
|
1819
|
+
listData.forEach((data) => {
|
|
1820
|
+
const objData = {};
|
|
1821
|
+
Object.keys(data).forEach((property) => {
|
|
1822
|
+
if (data.hasOwnProperty(property)) {
|
|
1823
|
+
normalizationColumns.forEach((column) => {
|
|
1824
|
+
if (column.idColumn.toString() === property) {
|
|
1825
|
+
objData[column.key] = data[property];
|
|
1914
1826
|
}
|
|
1915
|
-
}
|
|
1916
|
-
resolve(lFormFieldsToken);
|
|
1917
|
-
},
|
|
1918
|
-
error: (error) => {
|
|
1919
|
-
reject(error);
|
|
1827
|
+
});
|
|
1920
1828
|
}
|
|
1921
1829
|
});
|
|
1830
|
+
if (objData) {
|
|
1831
|
+
newData.push(objData);
|
|
1832
|
+
}
|
|
1922
1833
|
});
|
|
1834
|
+
return newData;
|
|
1923
1835
|
}
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
for (let formComp of form) {
|
|
1935
|
-
let newComponents;
|
|
1936
|
-
let components = [];
|
|
1937
|
-
if (formComp.components) {
|
|
1938
|
-
newComponents = formComp.components;
|
|
1939
|
-
}
|
|
1940
|
-
else if (formComp.columns) {
|
|
1941
|
-
newComponents = formComp.columns;
|
|
1942
|
-
}
|
|
1943
|
-
if (newComponents && UtilString.isValid(formComp.title)) {
|
|
1944
|
-
lFormFieldsToken.push({
|
|
1945
|
-
title: {
|
|
1946
|
-
key: TokenService.getKeyFormulario(formComp.title),
|
|
1947
|
-
value: formComp.title,
|
|
1948
|
-
object: formComp
|
|
1949
|
-
},
|
|
1950
|
-
value: []
|
|
1951
|
-
});
|
|
1952
|
-
lFormFieldsToken[lFormFieldsToken.length - 1].value =
|
|
1953
|
-
this.getComponenetForm(components, newComponents, null, false, null);
|
|
1836
|
+
generateHtmlByTokensAndData(html, listData, listTokens) {
|
|
1837
|
+
const translatedCards = [];
|
|
1838
|
+
listData.forEach((data) => {
|
|
1839
|
+
const objToken = {};
|
|
1840
|
+
const htmlTranslated = { html: html };
|
|
1841
|
+
Object.keys(data).forEach((property) => {
|
|
1842
|
+
listTokens.forEach((token) => {
|
|
1843
|
+
if (property == token.key.replace('${', '').replace('}', '')) {
|
|
1844
|
+
objToken[token.key] = data[property];
|
|
1845
|
+
htmlTranslated.html = htmlTranslated.html.replace(token.key, data[property]);
|
|
1954
1846
|
}
|
|
1955
|
-
}
|
|
1956
|
-
resolve(lFormFieldsToken);
|
|
1957
|
-
}, (error) => {
|
|
1958
|
-
reject(error);
|
|
1847
|
+
});
|
|
1959
1848
|
});
|
|
1849
|
+
translatedCards.push(htmlTranslated);
|
|
1960
1850
|
});
|
|
1851
|
+
return translatedCards;
|
|
1961
1852
|
}
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1853
|
+
getListTokensByString(stringText) {
|
|
1854
|
+
var arrayToken = stringText.match(/\${([^}]+)\}/g);
|
|
1855
|
+
var arrayTokenFormattedDate = stringText.match(/\#date[^)]+\)/g);
|
|
1856
|
+
var arrayTokenFormattedNumber = stringText.match(/\#number[^)]+\)/g);
|
|
1857
|
+
var arrayTokenFormatted = [];
|
|
1858
|
+
if (arrayTokenFormattedDate &&
|
|
1859
|
+
arrayTokenFormattedDate.length > 0 &&
|
|
1860
|
+
arrayTokenFormattedNumber &&
|
|
1861
|
+
arrayTokenFormattedNumber.length > 0) {
|
|
1862
|
+
arrayTokenFormatted = arrayTokenFormattedDate.concat(arrayTokenFormattedNumber);
|
|
1863
|
+
}
|
|
1864
|
+
else if (arrayTokenFormattedDate && arrayTokenFormattedDate.length > 0) {
|
|
1865
|
+
arrayTokenFormatted = arrayTokenFormattedDate.slice();
|
|
1866
|
+
}
|
|
1867
|
+
else if (arrayTokenFormattedNumber && arrayTokenFormattedNumber.length > 0) {
|
|
1868
|
+
arrayTokenFormatted = arrayTokenFormattedNumber.slice();
|
|
1869
|
+
}
|
|
1870
|
+
var result = [];
|
|
1871
|
+
if (arrayToken) {
|
|
1872
|
+
for (const token of arrayToken) {
|
|
1873
|
+
let keyType = TokenService.getKeyType(token);
|
|
1874
|
+
if (keyType === null) {
|
|
1875
|
+
continue;
|
|
1975
1876
|
}
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
newComponents = formComp.columns;
|
|
1985
|
-
}
|
|
1986
|
-
if (newComponents && UtilString.isValid(formComp.title)) {
|
|
1987
|
-
lFormPannelsToken.push({
|
|
1988
|
-
title: {
|
|
1989
|
-
key: TokenService.getKeyFormulario(formComp.title),
|
|
1990
|
-
value: formComp.title,
|
|
1991
|
-
object: formComp
|
|
1992
|
-
},
|
|
1993
|
-
value: []
|
|
1994
|
-
});
|
|
1995
|
-
lFormPannelsToken[lFormPannelsToken.length - 1].value =
|
|
1996
|
-
this.getPanelComponenet(components, newComponents, null);
|
|
1877
|
+
var infoToken = { key: token, value: token };
|
|
1878
|
+
if (arrayTokenFormatted) {
|
|
1879
|
+
for (const tokenFormatted of arrayTokenFormatted) {
|
|
1880
|
+
var index = tokenFormatted.indexOf(token);
|
|
1881
|
+
if (index >= 0) {
|
|
1882
|
+
infoToken.value = tokenFormatted;
|
|
1883
|
+
break;
|
|
1884
|
+
}
|
|
1997
1885
|
}
|
|
1998
1886
|
}
|
|
1999
|
-
|
|
2000
|
-
}
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
1887
|
+
result.push(infoToken);
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
return result;
|
|
1891
|
+
// let tokens: any[] = [];
|
|
1892
|
+
// let i = this.nextValidPositionTokens(stringText, 0);
|
|
1893
|
+
// let count = 0;
|
|
1894
|
+
// while (i >= 0 && count <= 10) {
|
|
1895
|
+
// let infoToken: {} = null;
|
|
1896
|
+
// let nextI: number = i;
|
|
1897
|
+
// let character = stringText.substring(i, (i + 1));
|
|
1898
|
+
// if (character == "$") {
|
|
1899
|
+
// let nextCharacter = stringText.substring((i + 1), (i + 2));
|
|
1900
|
+
// // The next character need to be a { sign
|
|
1901
|
+
// if (nextCharacter != "{") {
|
|
1902
|
+
// i = this.nextValidPositionTokens(stringText, nextI + 1);
|
|
1903
|
+
// continue;
|
|
1904
|
+
// }
|
|
1905
|
+
// let keyToken: string = stringText.substring(i, stringText.indexOf("}", i) + 1);
|
|
1906
|
+
// // If the token have a valid key type
|
|
1907
|
+
// let keyType: number = TokenService.getKeyType(keyToken.replace("{", "").replace("}", ""));
|
|
1908
|
+
// if (keyType === null) {
|
|
1909
|
+
// i = this.nextValidPositionTokens(stringText, nextI + 1);
|
|
1910
|
+
// continue;
|
|
1911
|
+
// }
|
|
1912
|
+
// infoToken = {
|
|
1913
|
+
// key: keyToken,
|
|
1914
|
+
// value: keyToken
|
|
1915
|
+
// };
|
|
1916
|
+
// nextI = stringText.indexOf("}", i);
|
|
1917
|
+
// } else {
|
|
1918
|
+
// let nextSign: number = stringText.indexOf("$", i);
|
|
1919
|
+
// // We inly support #date($ and #number($ in this 2 scenarios the lenght can't be more than 10 characters
|
|
1920
|
+
// if (nextSign < 0 || (nextSign - i) > 10) {
|
|
1921
|
+
// i = this.nextValidPositionTokens(stringText, nextI + 1);
|
|
1922
|
+
// continue;
|
|
1923
|
+
// }
|
|
1924
|
+
// let keyToken: string = stringText.substring(stringText.indexOf("$", i), stringText.indexOf("}", i) + 1);
|
|
1925
|
+
// let valueToken: string = stringText.substring(i, stringText.indexOf(")", i) + 1);
|
|
1926
|
+
// infoToken = {
|
|
1927
|
+
// key: keyToken,
|
|
1928
|
+
// value: valueToken
|
|
1929
|
+
// };
|
|
1930
|
+
// nextI = stringText.indexOf(")", i);
|
|
1931
|
+
// }
|
|
1932
|
+
// tokens.push(infoToken);
|
|
1933
|
+
// i = this.nextValidPositionTokens(stringText, nextI);
|
|
1934
|
+
// count++;
|
|
1935
|
+
// }
|
|
1936
|
+
// return tokens;
|
|
1937
|
+
}
|
|
1938
|
+
nextValidPositionTokens(stringText, nextI) {
|
|
1939
|
+
let tokenDollarSign = stringText.indexOf('$', nextI);
|
|
1940
|
+
let tokenNumSign = stringText.indexOf('#', nextI);
|
|
1941
|
+
let i = tokenDollarSign < 0 && tokenNumSign >= 0
|
|
1942
|
+
? tokenNumSign
|
|
1943
|
+
: tokenNumSign < 0 && tokenDollarSign >= 0
|
|
1944
|
+
? tokenDollarSign
|
|
1945
|
+
: tokenDollarSign < tokenNumSign
|
|
1946
|
+
? tokenDollarSign
|
|
1947
|
+
: tokenNumSign;
|
|
1948
|
+
return i;
|
|
2004
1949
|
}
|
|
2005
1950
|
/**
|
|
2006
|
-
*
|
|
2007
|
-
* @param
|
|
2008
|
-
* @param
|
|
1951
|
+
* It reuses replaceTokensFromListObjectPublic but set all keys lobjecttokens as lowercase
|
|
1952
|
+
* @param tokenName
|
|
1953
|
+
* @param formula
|
|
1954
|
+
* @param lObjectTokens
|
|
2009
1955
|
*/
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
else if (formComp.components || formComp.columns) {
|
|
2016
|
-
let newComponents;
|
|
2017
|
-
if (formComp.components) {
|
|
2018
|
-
newComponents = formComp.components;
|
|
2019
|
-
}
|
|
2020
|
-
else if (formComp.columns) {
|
|
2021
|
-
newComponents = formComp.columns;
|
|
2022
|
-
}
|
|
2023
|
-
components = this.getPanelComponenet(components, newComponents, panelName);
|
|
1956
|
+
replaceTokensFromListObjectPublic(tokenName, formula, lObjectTokens) {
|
|
1957
|
+
let lDataOrg = [];
|
|
1958
|
+
if (lObjectTokens) {
|
|
1959
|
+
for (let dataForm in lObjectTokens) {
|
|
1960
|
+
lDataOrg[dataForm.toLowerCase()] = lObjectTokens[dataForm];
|
|
2024
1961
|
}
|
|
2025
1962
|
}
|
|
2026
|
-
return
|
|
1963
|
+
return this.replaceTokensFromListObject(tokenName, formula, lDataOrg);
|
|
2027
1964
|
}
|
|
2028
1965
|
/**
|
|
2029
|
-
*
|
|
2030
|
-
* @param
|
|
2031
|
-
* @param
|
|
1966
|
+
* @param tokenName token name
|
|
1967
|
+
* @param formula String with the formula to execute
|
|
1968
|
+
* @param lObjectTokens List of tokens with the values to replace
|
|
2032
1969
|
*/
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
1970
|
+
replaceTokensFromListObject(tokenName, formula, lObjectTokens) {
|
|
1971
|
+
if (!formula || formula.length == 0) {
|
|
1972
|
+
throw {
|
|
1973
|
+
message: 'La formula del token ' + tokenName + ' esta vacía',
|
|
1974
|
+
title: 'Alerta!',
|
|
1975
|
+
error: 'La formula del token ' + tokenName + ' esta vacía. [formula[' + formula + ']]'
|
|
1976
|
+
};
|
|
1977
|
+
}
|
|
1978
|
+
let replacedTokens = formula.toString();
|
|
1979
|
+
if (replacedTokens.startsWith('file://')) {
|
|
1980
|
+
return replacedTokens;
|
|
1981
|
+
}
|
|
1982
|
+
// Find the tokens in the formula
|
|
1983
|
+
let tokensArray = this.getListTokensByString(replacedTokens);
|
|
1984
|
+
if (tokensArray.length == 0) {
|
|
1985
|
+
return replacedTokens;
|
|
1986
|
+
}
|
|
1987
|
+
// If there any token, try to replace
|
|
1988
|
+
for (let i = 0; i < tokensArray.length; i++) {
|
|
1989
|
+
let objectToken = lObjectTokens[tokensArray[i].key] !== undefined
|
|
1990
|
+
? lObjectTokens[tokensArray[i].key]
|
|
1991
|
+
: null;
|
|
1992
|
+
let clearKey;
|
|
1993
|
+
if (objectToken == null) {
|
|
1994
|
+
clearKey = tokensArray[i].key.replace('${', '').replace('}', '').toLowerCase();
|
|
1995
|
+
objectToken =
|
|
1996
|
+
lObjectTokens[clearKey] !== undefined ? lObjectTokens[clearKey] : null;
|
|
1997
|
+
if (objectToken == null) {
|
|
1998
|
+
clearKey = tokensArray[i].key
|
|
1999
|
+
.replace('{', '')
|
|
2000
|
+
.replace('}', '')
|
|
2001
|
+
.split('_')[1]
|
|
2002
|
+
.toLowerCase();
|
|
2003
|
+
objectToken =
|
|
2004
|
+
lObjectTokens[clearKey] !== undefined ? lObjectTokens[clearKey] : null;
|
|
2049
2005
|
}
|
|
2050
|
-
components = this.getComponenetForm(components, newComponents, panelName, editgrid, editGridKey);
|
|
2051
2006
|
}
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2007
|
+
if (objectToken == null) {
|
|
2008
|
+
// If not find the token, by default put an empty string
|
|
2009
|
+
/*if (TokenService.excludedToken.indexOf(clearKey) === -1) {
|
|
2010
|
+
console.error(
|
|
2011
|
+
'El token ' + tokensArray[i].value + ' no fue encontrado.',
|
|
2012
|
+
lObjectTokens,
|
|
2013
|
+
tokensArray
|
|
2014
|
+
);
|
|
2015
|
+
}*/
|
|
2016
|
+
objectToken = '';
|
|
2057
2017
|
}
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
let
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
value: formComp.title,
|
|
2090
|
-
object: formComp
|
|
2091
|
-
},
|
|
2092
|
-
value: []
|
|
2093
|
-
});
|
|
2094
|
-
lFormFieldsToken[lFormFieldsToken.length - 1].value =
|
|
2095
|
-
this.getEditGridComponenet(components, newComponents, null);
|
|
2096
|
-
}
|
|
2018
|
+
if (objectToken != null) {
|
|
2019
|
+
let value = Number(objectToken)
|
|
2020
|
+
? objectToken
|
|
2021
|
+
: Array.isArray(objectToken)
|
|
2022
|
+
? JSON.stringify(objectToken)
|
|
2023
|
+
: "'" + objectToken + "'";
|
|
2024
|
+
replacedTokens = this.replaceToken(replacedTokens, tokensArray[i].value, value);
|
|
2025
|
+
// } else {
|
|
2026
|
+
// console.error(lObjectTokens, tokensArray);
|
|
2027
|
+
// throw {
|
|
2028
|
+
// message: "No se encontró valor para un token",
|
|
2029
|
+
// title: "Alerta!",
|
|
2030
|
+
// error: "El token " + tokensArray[i].value + " no fue encontrado."
|
|
2031
|
+
// };
|
|
2032
|
+
//
|
|
2033
|
+
// Si es la ultima iteracion y la formula tiene [ es porque tiene un array en el valor que resolvio el token
|
|
2034
|
+
if (i == tokensArray.length - 1 && replacedTokens.includes('[')) {
|
|
2035
|
+
// Se ponen todos los operandos como elementos en un array ['expresion a', '&&', 'Expresion B']
|
|
2036
|
+
let formExpressions = replacedTokens.split(/ (\|\||&&) /);
|
|
2037
|
+
let lAuxformExpression = [];
|
|
2038
|
+
formExpressions.forEach((expression) => {
|
|
2039
|
+
if (expression.charAt(0) == '[') {
|
|
2040
|
+
let isTagFound = '';
|
|
2041
|
+
isTagFound = this.findTag(expression);
|
|
2042
|
+
lAuxformExpression.push(isTagFound);
|
|
2043
|
+
}
|
|
2044
|
+
else {
|
|
2045
|
+
lAuxformExpression.push(expression);
|
|
2046
|
+
}
|
|
2047
|
+
});
|
|
2048
|
+
replacedTokens = lAuxformExpression.join(' ');
|
|
2097
2049
|
}
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
});
|
|
2102
|
-
});
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
return replacedTokens;
|
|
2103
2053
|
}
|
|
2104
2054
|
/**
|
|
2105
|
-
*
|
|
2106
|
-
*
|
|
2107
|
-
*
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
formComp.panelName = panelName;
|
|
2113
|
-
components.push(formComp);
|
|
2114
|
-
}
|
|
2115
|
-
else if (formComp.components || formComp.columns) {
|
|
2116
|
-
let newComponents;
|
|
2117
|
-
if (formComp.components) {
|
|
2118
|
-
newComponents = formComp.components;
|
|
2119
|
-
}
|
|
2120
|
-
else if (formComp.columns) {
|
|
2121
|
-
newComponents = formComp.columns;
|
|
2122
|
-
}
|
|
2123
|
-
if (formComp.type && formComp.type === 'panel') {
|
|
2124
|
-
panelName = formComp.title;
|
|
2125
|
-
}
|
|
2126
|
-
components = this.getEditGridComponenet(components, newComponents, panelName);
|
|
2127
|
-
}
|
|
2128
|
-
}
|
|
2129
|
-
return components;
|
|
2130
|
-
}
|
|
2131
|
-
/** It returns the tokens by promCodigo */
|
|
2132
|
-
getListByPromCodigo(promCode) {
|
|
2133
|
-
return this.httpClient.get(this.environment.host.backend.configuration + 'token/getByPromCodigo', { params: new HttpParams().set('promCodigo', promCode.toString()) });
|
|
2134
|
-
}
|
|
2135
|
-
/** It returns the token by id */
|
|
2136
|
-
getById(id) {
|
|
2137
|
-
return this.httpClient.get(this.environment.host.backend.configuration + 'token/getById', {
|
|
2138
|
-
params: new HttpParams().set('id', id.toString())
|
|
2139
|
-
});
|
|
2140
|
-
}
|
|
2141
|
-
/** It deletes a form by id */
|
|
2142
|
-
delete(id) {
|
|
2143
|
-
return this.httpClient.delete(this.environment.host.backend.configuration + 'token/delete', { params: new HttpParams().set('id', id) });
|
|
2144
|
-
}
|
|
2145
|
-
/** It saves the token */
|
|
2146
|
-
save(token) {
|
|
2147
|
-
return this.httpClient.post(this.environment.host.backend.configuration + 'token/save', token, HEADER_JSON);
|
|
2148
|
-
}
|
|
2149
|
-
static getKeyFormulario(formTitle) {
|
|
2150
|
-
if (UtilString.isValid(formTitle)) {
|
|
2151
|
-
return (UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_FORM) +
|
|
2152
|
-
UtilString.replaceAccentSpacesOthers(formTitle).replace(/_/g, '-'));
|
|
2153
|
-
}
|
|
2154
|
-
return '';
|
|
2155
|
-
}
|
|
2156
|
-
/** It returns the unique verification code */
|
|
2157
|
-
getUniqueVerificationCode(login, token) {
|
|
2158
|
-
return this.httpClient.get(this.environment.host.backend.documentsRepository +
|
|
2159
|
-
'documento/consultarCodigoUnico/' +
|
|
2160
|
-
login +
|
|
2161
|
-
'/' +
|
|
2162
|
-
token, { params: new HttpParams() });
|
|
2163
|
-
}
|
|
2164
|
-
/** It send the information to copy the Document viewer */
|
|
2165
|
-
copyDocumentInformationViewer(login, token, uniqueCode, documentURL, documentName) {
|
|
2166
|
-
let infoDocumento = {
|
|
2167
|
-
codigoUnico: uniqueCode,
|
|
2168
|
-
rutaDocumento: documentURL,
|
|
2169
|
-
documentName: documentName
|
|
2170
|
-
};
|
|
2171
|
-
return this.httpClient.post(this.environment.host.backend.documentsRepository +
|
|
2172
|
-
'documento/adicionarDocumento/' +
|
|
2173
|
-
login +
|
|
2174
|
-
'/' +
|
|
2175
|
-
token, infoDocumento, HEADER_JSON);
|
|
2176
|
-
}
|
|
2177
|
-
static getKeyBudget() {
|
|
2178
|
-
return UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_BUDGET);
|
|
2179
|
-
}
|
|
2180
|
-
static getKeyDocument() {
|
|
2181
|
-
return UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_DOCUMENTO);
|
|
2182
|
-
}
|
|
2183
|
-
static getKeyTask() {
|
|
2184
|
-
return UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_TASKL);
|
|
2185
|
-
}
|
|
2186
|
-
static getKeyStatic() {
|
|
2187
|
-
return UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_STATIC);
|
|
2188
|
-
}
|
|
2189
|
-
static getKeyCalculated(token) {
|
|
2190
|
-
return (UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_CALCULATED) +
|
|
2191
|
-
'_' +
|
|
2192
|
-
UtilString.replaceAccentSpacesOthers(token.name));
|
|
2193
|
-
}
|
|
2194
|
-
static getKeySnapshot(token) {
|
|
2195
|
-
return (UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_SNAPSHOT) +
|
|
2196
|
-
'_' +
|
|
2197
|
-
UtilString.replaceAccentSpacesOthers(token.name));
|
|
2198
|
-
}
|
|
2199
|
-
static getKeyGuarantee(token) {
|
|
2200
|
-
return (UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_GUARANTEE) +
|
|
2201
|
-
'_' +
|
|
2202
|
-
UtilString.replaceAccentSpacesOthers(token.name));
|
|
2203
|
-
}
|
|
2204
|
-
/**
|
|
2205
|
-
* Return a value that represent the type of label: 1=Form, 2=Budget, 3=Static, 4=Calculated
|
|
2206
|
-
* @param key Value to evalueate
|
|
2055
|
+
* MEtodo que teniendo una expresion de la forma ['tag1', 'tag2']==tag3
|
|
2056
|
+
* evalua si tag3 hace parte del array si tiene el operador ==.
|
|
2057
|
+
* Si tiene el operador != examina que tag3 no haga parte del array+
|
|
2058
|
+
*
|
|
2059
|
+
* @param expression Operando que evalua tag. Es de la forma ['tag1', 'tag2']==tag3
|
|
2060
|
+
* @returns Retorna 'true' o 'false' en string que despues sera pasado a un eval()
|
|
2061
|
+
* mas adelante en el flujo
|
|
2207
2062
|
*/
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
else if (key.startsWith(UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_STATIC))) {
|
|
2218
|
-
return 3;
|
|
2219
|
-
}
|
|
2220
|
-
else if (key.startsWith(UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_CALCULATED))) {
|
|
2221
|
-
return 4;
|
|
2063
|
+
findTag(expression) {
|
|
2064
|
+
let regexOperator = new RegExp('(===|==|!==|!=)');
|
|
2065
|
+
// Retorna el operador
|
|
2066
|
+
let operator = expression.match(regexOperator);
|
|
2067
|
+
// Si no encuentra un operador segun el patron retorna 'false'
|
|
2068
|
+
// para evitar resultados inesperados
|
|
2069
|
+
if (operator == null) {
|
|
2070
|
+
console.error('No se encontro un operador permitido para la expresion');
|
|
2071
|
+
return 'false';
|
|
2222
2072
|
}
|
|
2223
|
-
|
|
2224
|
-
|
|
2073
|
+
// Separa la sentencia por el operador
|
|
2074
|
+
// La primera parte es el valor por el cual se remplaza el token que es un array en string "['a', 'b']"
|
|
2075
|
+
// El segundo es el valor con el cual se va a comparar
|
|
2076
|
+
let valueToken, valueToCompare;
|
|
2077
|
+
[valueToken, valueToCompare] = expression.split(operator[0]);
|
|
2078
|
+
// Se limpia el string correspondiente al array para que los elementos queden separados por ","
|
|
2079
|
+
valueToken = valueToken.replace(/[^a-zA-Z0-9 ,]/g, '');
|
|
2080
|
+
// Si no hay tags asociados al registro se devuelve 'false'
|
|
2081
|
+
if (!valueToken) {
|
|
2082
|
+
console.error('No hay tags asociados a esta aplicación');
|
|
2083
|
+
return 'false';
|
|
2225
2084
|
}
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2085
|
+
// Se limpia el string correspondiente al valor por comparar
|
|
2086
|
+
valueToCompare = valueToCompare.replace(/[^a-zA-Z0-9 ]/g, '');
|
|
2087
|
+
// El string correspondiente al array pasa a ser tipo array
|
|
2088
|
+
valueToken = valueToken.split(',');
|
|
2089
|
+
// Se trata de constatar si el valor a comparar se encuetra o no dentro
|
|
2090
|
+
// Si el operador que se encontro == returna true si lo encuentra
|
|
2091
|
+
let isTagFound = true;
|
|
2092
|
+
switch (operator[0]) {
|
|
2093
|
+
case '==':
|
|
2094
|
+
isTagFound = valueToken.some((tag) => tag == valueToCompare);
|
|
2095
|
+
break;
|
|
2096
|
+
case '===':
|
|
2097
|
+
isTagFound = valueToken.some((tag) => tag === valueToCompare);
|
|
2098
|
+
break;
|
|
2099
|
+
case '!==':
|
|
2100
|
+
isTagFound = valueToken.some((tag) => tag !== valueToCompare);
|
|
2101
|
+
break;
|
|
2102
|
+
case '!=':
|
|
2103
|
+
isTagFound = valueToken.some((tag) => tag != valueToCompare);
|
|
2104
|
+
break;
|
|
2105
|
+
default:
|
|
2106
|
+
break;
|
|
2245
2107
|
}
|
|
2246
|
-
|
|
2108
|
+
expression = isTagFound ? 'true' : 'false';
|
|
2109
|
+
return expression;
|
|
2247
2110
|
}
|
|
2248
2111
|
/**
|
|
2249
|
-
* Try to
|
|
2250
|
-
* @param
|
|
2251
|
-
* @param
|
|
2252
|
-
* @param
|
|
2112
|
+
* Try to eval the formula depend of the type of fields.
|
|
2113
|
+
* @param lStaticToken
|
|
2114
|
+
* @param formulaName
|
|
2115
|
+
* @param formula
|
|
2253
2116
|
*/
|
|
2254
|
-
|
|
2255
|
-
let
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
}
|
|
2269
|
-
else if (typeToken == 'number') {
|
|
2270
|
-
let numberValue = Number(dataValue);
|
|
2271
|
-
if (numberValue != undefined && !isNaN(numberValue)) {
|
|
2272
|
-
let numberFormat = token.substring(token.indexOf('}') + 1, token.indexOf(')'));
|
|
2273
|
-
numberFormat = numberFormat.trim().replace(/\"/g, '').replace(/\'/g, '');
|
|
2274
|
-
valueReplace = this.currencyPipe.transform(numberValue, this.locale, '', numberFormat);
|
|
2275
|
-
}
|
|
2276
|
-
else {
|
|
2277
|
-
console.log('El dato [' +
|
|
2278
|
-
dataValue +
|
|
2279
|
-
'] para el token [' +
|
|
2280
|
-
token +
|
|
2281
|
-
'] tipo númerico no es valido');
|
|
2282
|
-
valueReplace = '';
|
|
2117
|
+
validateFormula(lStaticToken, formulaName, formula) {
|
|
2118
|
+
let evalFormula = false;
|
|
2119
|
+
// To validate the formula, first organize the info to key - value array
|
|
2120
|
+
let objectTokens = [];
|
|
2121
|
+
for (let panel of lStaticToken) {
|
|
2122
|
+
for (let groupToken of panel.value) {
|
|
2123
|
+
for (let staticToken of groupToken.value) {
|
|
2124
|
+
for (let arrayTokenInfo of staticToken) {
|
|
2125
|
+
objectTokens[arrayTokenInfo.key] = arrayTokenInfo.object
|
|
2126
|
+
? arrayTokenInfo.object.type == 'number'
|
|
2127
|
+
? '0'
|
|
2128
|
+
: ''
|
|
2129
|
+
: '';
|
|
2130
|
+
}
|
|
2283
2131
|
}
|
|
2284
2132
|
}
|
|
2285
|
-
else {
|
|
2286
|
-
console.log('tipo de token indefinido. [typeToken[' + typeToken + ']]');
|
|
2287
|
-
}
|
|
2288
|
-
}
|
|
2289
|
-
else if (token && token[0] == '$') {
|
|
2290
|
-
valueReplace = dataValue;
|
|
2291
2133
|
}
|
|
2292
|
-
|
|
2293
|
-
|
|
2134
|
+
try {
|
|
2135
|
+
formula = this.replaceTokensFromListObject(formulaName, formula, objectTokens);
|
|
2294
2136
|
}
|
|
2295
|
-
|
|
2296
|
-
//
|
|
2297
|
-
|
|
2298
|
-
//stringText = stringText.replace(token, valueReplace);
|
|
2299
|
-
}
|
|
2300
|
-
return stringText;
|
|
2301
|
-
}
|
|
2302
|
-
getListTokensByStringSegmentation(stringText) {
|
|
2303
|
-
const arrayToken = stringText.match(/\${([^}]+)\}/g);
|
|
2304
|
-
const arrayTokenFormattedDate = stringText.match(/\#date[^)]+\)/g);
|
|
2305
|
-
const arrayTokenFormattedNumber = stringText.match(/\#number[^)]+\)/g);
|
|
2306
|
-
let arrayTokenFormatted = [];
|
|
2307
|
-
if (arrayTokenFormattedDate &&
|
|
2308
|
-
arrayTokenFormattedDate.length > 0 &&
|
|
2309
|
-
arrayTokenFormattedNumber &&
|
|
2310
|
-
arrayTokenFormattedNumber.length > 0) {
|
|
2311
|
-
arrayTokenFormatted = arrayTokenFormattedDate.concat(arrayTokenFormattedNumber);
|
|
2312
|
-
}
|
|
2313
|
-
else if (arrayTokenFormattedDate && arrayTokenFormattedDate.length > 0) {
|
|
2314
|
-
arrayTokenFormatted = arrayTokenFormattedDate.slice();
|
|
2315
|
-
}
|
|
2316
|
-
else if (arrayTokenFormattedNumber && arrayTokenFormattedNumber.length > 0) {
|
|
2317
|
-
arrayTokenFormatted = arrayTokenFormattedNumber.slice();
|
|
2318
|
-
}
|
|
2319
|
-
const result = [];
|
|
2320
|
-
if (arrayToken) {
|
|
2321
|
-
for (const token of arrayToken) {
|
|
2322
|
-
const infoToken = { key: token, value: token };
|
|
2323
|
-
if (arrayTokenFormatted) {
|
|
2324
|
-
for (const tokenFormatted of arrayTokenFormatted) {
|
|
2325
|
-
const index = tokenFormatted.indexOf(token);
|
|
2326
|
-
if (index >= 0) {
|
|
2327
|
-
infoToken.value = tokenFormatted;
|
|
2328
|
-
break;
|
|
2329
|
-
}
|
|
2330
|
-
}
|
|
2331
|
-
}
|
|
2332
|
-
result.push(infoToken);
|
|
2333
|
-
}
|
|
2334
|
-
}
|
|
2335
|
-
return result;
|
|
2336
|
-
}
|
|
2337
|
-
changeIdPropertiesOfObject(normalizationColumns, listData) {
|
|
2338
|
-
const newData = [];
|
|
2339
|
-
listData.forEach((data) => {
|
|
2340
|
-
const objData = {};
|
|
2341
|
-
Object.keys(data).forEach((property) => {
|
|
2342
|
-
if (data.hasOwnProperty(property)) {
|
|
2343
|
-
normalizationColumns.forEach((column) => {
|
|
2344
|
-
if (column.idColumn.toString() === property) {
|
|
2345
|
-
objData[column.key] = data[property];
|
|
2346
|
-
}
|
|
2347
|
-
});
|
|
2348
|
-
}
|
|
2349
|
-
});
|
|
2350
|
-
if (objData) {
|
|
2351
|
-
newData.push(objData);
|
|
2352
|
-
}
|
|
2353
|
-
});
|
|
2354
|
-
return newData;
|
|
2355
|
-
}
|
|
2356
|
-
generateHtmlByTokensAndData(html, listData, listTokens) {
|
|
2357
|
-
const translatedCards = [];
|
|
2358
|
-
listData.forEach((data) => {
|
|
2359
|
-
const objToken = {};
|
|
2360
|
-
const htmlTranslated = { html: html };
|
|
2361
|
-
Object.keys(data).forEach((property) => {
|
|
2362
|
-
listTokens.forEach((token) => {
|
|
2363
|
-
if (property == token.key.replace('${', '').replace('}', '')) {
|
|
2364
|
-
objToken[token.key] = data[property];
|
|
2365
|
-
htmlTranslated.html = htmlTranslated.html.replace(token.key, data[property]);
|
|
2366
|
-
}
|
|
2367
|
-
});
|
|
2368
|
-
});
|
|
2369
|
-
translatedCards.push(htmlTranslated);
|
|
2370
|
-
});
|
|
2371
|
-
return translatedCards;
|
|
2372
|
-
}
|
|
2373
|
-
getListTokensByString(stringText) {
|
|
2374
|
-
var arrayToken = stringText.match(/\${([^}]+)\}/g);
|
|
2375
|
-
var arrayTokenFormattedDate = stringText.match(/\#date[^)]+\)/g);
|
|
2376
|
-
var arrayTokenFormattedNumber = stringText.match(/\#number[^)]+\)/g);
|
|
2377
|
-
var arrayTokenFormatted = [];
|
|
2378
|
-
if (arrayTokenFormattedDate &&
|
|
2379
|
-
arrayTokenFormattedDate.length > 0 &&
|
|
2380
|
-
arrayTokenFormattedNumber &&
|
|
2381
|
-
arrayTokenFormattedNumber.length > 0) {
|
|
2382
|
-
arrayTokenFormatted = arrayTokenFormattedDate.concat(arrayTokenFormattedNumber);
|
|
2383
|
-
}
|
|
2384
|
-
else if (arrayTokenFormattedDate && arrayTokenFormattedDate.length > 0) {
|
|
2385
|
-
arrayTokenFormatted = arrayTokenFormattedDate.slice();
|
|
2386
|
-
}
|
|
2387
|
-
else if (arrayTokenFormattedNumber && arrayTokenFormattedNumber.length > 0) {
|
|
2388
|
-
arrayTokenFormatted = arrayTokenFormattedNumber.slice();
|
|
2389
|
-
}
|
|
2390
|
-
var result = [];
|
|
2391
|
-
if (arrayToken) {
|
|
2392
|
-
for (const token of arrayToken) {
|
|
2393
|
-
let keyType = TokenService.getKeyType(token);
|
|
2394
|
-
if (keyType === null) {
|
|
2395
|
-
continue;
|
|
2396
|
-
}
|
|
2397
|
-
var infoToken = { key: token, value: token };
|
|
2398
|
-
if (arrayTokenFormatted) {
|
|
2399
|
-
for (const tokenFormatted of arrayTokenFormatted) {
|
|
2400
|
-
var index = tokenFormatted.indexOf(token);
|
|
2401
|
-
if (index >= 0) {
|
|
2402
|
-
infoToken.value = tokenFormatted;
|
|
2403
|
-
break;
|
|
2404
|
-
}
|
|
2405
|
-
}
|
|
2406
|
-
}
|
|
2407
|
-
result.push(infoToken);
|
|
2408
|
-
}
|
|
2409
|
-
}
|
|
2410
|
-
return result;
|
|
2411
|
-
// let tokens: any[] = [];
|
|
2412
|
-
// let i = this.nextValidPositionTokens(stringText, 0);
|
|
2413
|
-
// let count = 0;
|
|
2414
|
-
// while (i >= 0 && count <= 10) {
|
|
2415
|
-
// let infoToken: {} = null;
|
|
2416
|
-
// let nextI: number = i;
|
|
2417
|
-
// let character = stringText.substring(i, (i + 1));
|
|
2418
|
-
// if (character == "$") {
|
|
2419
|
-
// let nextCharacter = stringText.substring((i + 1), (i + 2));
|
|
2420
|
-
// // The next character need to be a { sign
|
|
2421
|
-
// if (nextCharacter != "{") {
|
|
2422
|
-
// i = this.nextValidPositionTokens(stringText, nextI + 1);
|
|
2423
|
-
// continue;
|
|
2424
|
-
// }
|
|
2425
|
-
// let keyToken: string = stringText.substring(i, stringText.indexOf("}", i) + 1);
|
|
2426
|
-
// // If the token have a valid key type
|
|
2427
|
-
// let keyType: number = TokenService.getKeyType(keyToken.replace("{", "").replace("}", ""));
|
|
2428
|
-
// if (keyType === null) {
|
|
2429
|
-
// i = this.nextValidPositionTokens(stringText, nextI + 1);
|
|
2430
|
-
// continue;
|
|
2431
|
-
// }
|
|
2432
|
-
// infoToken = {
|
|
2433
|
-
// key: keyToken,
|
|
2434
|
-
// value: keyToken
|
|
2435
|
-
// };
|
|
2436
|
-
// nextI = stringText.indexOf("}", i);
|
|
2437
|
-
// } else {
|
|
2438
|
-
// let nextSign: number = stringText.indexOf("$", i);
|
|
2439
|
-
// // We inly support #date($ and #number($ in this 2 scenarios the lenght can't be more than 10 characters
|
|
2440
|
-
// if (nextSign < 0 || (nextSign - i) > 10) {
|
|
2441
|
-
// i = this.nextValidPositionTokens(stringText, nextI + 1);
|
|
2442
|
-
// continue;
|
|
2443
|
-
// }
|
|
2444
|
-
// let keyToken: string = stringText.substring(stringText.indexOf("$", i), stringText.indexOf("}", i) + 1);
|
|
2445
|
-
// let valueToken: string = stringText.substring(i, stringText.indexOf(")", i) + 1);
|
|
2446
|
-
// infoToken = {
|
|
2447
|
-
// key: keyToken,
|
|
2448
|
-
// value: valueToken
|
|
2449
|
-
// };
|
|
2450
|
-
// nextI = stringText.indexOf(")", i);
|
|
2451
|
-
// }
|
|
2452
|
-
// tokens.push(infoToken);
|
|
2453
|
-
// i = this.nextValidPositionTokens(stringText, nextI);
|
|
2454
|
-
// count++;
|
|
2455
|
-
// }
|
|
2456
|
-
// return tokens;
|
|
2457
|
-
}
|
|
2458
|
-
nextValidPositionTokens(stringText, nextI) {
|
|
2459
|
-
let tokenDollarSign = stringText.indexOf('$', nextI);
|
|
2460
|
-
let tokenNumSign = stringText.indexOf('#', nextI);
|
|
2461
|
-
let i = tokenDollarSign < 0 && tokenNumSign >= 0
|
|
2462
|
-
? tokenNumSign
|
|
2463
|
-
: tokenNumSign < 0 && tokenDollarSign >= 0
|
|
2464
|
-
? tokenDollarSign
|
|
2465
|
-
: tokenDollarSign < tokenNumSign
|
|
2466
|
-
? tokenDollarSign
|
|
2467
|
-
: tokenNumSign;
|
|
2468
|
-
return i;
|
|
2469
|
-
}
|
|
2470
|
-
/**
|
|
2471
|
-
* It reuses replaceTokensFromListObjectPublic but set all keys lobjecttokens as lowercase
|
|
2472
|
-
* @param tokenName
|
|
2473
|
-
* @param formula
|
|
2474
|
-
* @param lObjectTokens
|
|
2475
|
-
*/
|
|
2476
|
-
replaceTokensFromListObjectPublic(tokenName, formula, lObjectTokens) {
|
|
2477
|
-
let lDataOrg = [];
|
|
2478
|
-
if (lObjectTokens) {
|
|
2479
|
-
for (let dataForm in lObjectTokens) {
|
|
2480
|
-
lDataOrg[dataForm.toLowerCase()] = lObjectTokens[dataForm];
|
|
2481
|
-
}
|
|
2482
|
-
}
|
|
2483
|
-
return this.replaceTokensFromListObject(tokenName, formula, lDataOrg);
|
|
2484
|
-
}
|
|
2485
|
-
/**
|
|
2486
|
-
* @param tokenName token name
|
|
2487
|
-
* @param formula String with the formula to execute
|
|
2488
|
-
* @param lObjectTokens List of tokens with the values to replace
|
|
2489
|
-
*/
|
|
2490
|
-
replaceTokensFromListObject(tokenName, formula, lObjectTokens) {
|
|
2491
|
-
if (!formula || formula.length == 0) {
|
|
2492
|
-
throw {
|
|
2493
|
-
message: 'La formula del token ' + tokenName + ' esta vacía',
|
|
2494
|
-
title: 'Alerta!',
|
|
2495
|
-
error: 'La formula del token ' + tokenName + ' esta vacía. [formula[' + formula + ']]'
|
|
2496
|
-
};
|
|
2497
|
-
}
|
|
2498
|
-
let replacedTokens = formula.toString();
|
|
2499
|
-
if (replacedTokens.startsWith('file://')) {
|
|
2500
|
-
return replacedTokens;
|
|
2501
|
-
}
|
|
2502
|
-
// Find the tokens in the formula
|
|
2503
|
-
let tokensArray = this.getListTokensByString(replacedTokens);
|
|
2504
|
-
if (tokensArray.length == 0) {
|
|
2505
|
-
return replacedTokens;
|
|
2506
|
-
}
|
|
2507
|
-
// If there any token, try to replace
|
|
2508
|
-
for (let i = 0; i < tokensArray.length; i++) {
|
|
2509
|
-
let objectToken = lObjectTokens[tokensArray[i].key] !== undefined
|
|
2510
|
-
? lObjectTokens[tokensArray[i].key]
|
|
2511
|
-
: null;
|
|
2512
|
-
let clearKey;
|
|
2513
|
-
if (objectToken == null) {
|
|
2514
|
-
clearKey = tokensArray[i].key.replace('${', '').replace('}', '').toLowerCase();
|
|
2515
|
-
objectToken =
|
|
2516
|
-
lObjectTokens[clearKey] !== undefined ? lObjectTokens[clearKey] : null;
|
|
2517
|
-
if (objectToken == null) {
|
|
2518
|
-
clearKey = tokensArray[i].key
|
|
2519
|
-
.replace('{', '')
|
|
2520
|
-
.replace('}', '')
|
|
2521
|
-
.split('_')[1]
|
|
2522
|
-
.toLowerCase();
|
|
2523
|
-
objectToken =
|
|
2524
|
-
lObjectTokens[clearKey] !== undefined ? lObjectTokens[clearKey] : null;
|
|
2525
|
-
}
|
|
2526
|
-
}
|
|
2527
|
-
if (objectToken == null) {
|
|
2528
|
-
// If not find the token, by default put an empty string
|
|
2529
|
-
/*if (TokenService.excludedToken.indexOf(clearKey) === -1) {
|
|
2530
|
-
console.error(
|
|
2531
|
-
'El token ' + tokensArray[i].value + ' no fue encontrado.',
|
|
2532
|
-
lObjectTokens,
|
|
2533
|
-
tokensArray
|
|
2534
|
-
);
|
|
2535
|
-
}*/
|
|
2536
|
-
objectToken = '';
|
|
2537
|
-
}
|
|
2538
|
-
if (objectToken != null) {
|
|
2539
|
-
let value = Number(objectToken)
|
|
2540
|
-
? objectToken
|
|
2541
|
-
: Array.isArray(objectToken)
|
|
2542
|
-
? JSON.stringify(objectToken)
|
|
2543
|
-
: "'" + objectToken + "'";
|
|
2544
|
-
replacedTokens = this.replaceToken(replacedTokens, tokensArray[i].value, value);
|
|
2545
|
-
// } else {
|
|
2546
|
-
// console.error(lObjectTokens, tokensArray);
|
|
2547
|
-
// throw {
|
|
2548
|
-
// message: "No se encontró valor para un token",
|
|
2549
|
-
// title: "Alerta!",
|
|
2550
|
-
// error: "El token " + tokensArray[i].value + " no fue encontrado."
|
|
2551
|
-
// };
|
|
2552
|
-
//
|
|
2553
|
-
// Si es la ultima iteracion y la formula tiene [ es porque tiene un array en el valor que resolvio el token
|
|
2554
|
-
if (i == tokensArray.length - 1 && replacedTokens.includes('[')) {
|
|
2555
|
-
// Se ponen todos los operandos como elementos en un array ['expresion a', '&&', 'Expresion B']
|
|
2556
|
-
let formExpressions = replacedTokens.split(/ (\|\||&&) /);
|
|
2557
|
-
let lAuxformExpression = [];
|
|
2558
|
-
formExpressions.forEach((expression) => {
|
|
2559
|
-
if (expression.charAt(0) == '[') {
|
|
2560
|
-
let isTagFound = '';
|
|
2561
|
-
isTagFound = this.findTag(expression);
|
|
2562
|
-
lAuxformExpression.push(isTagFound);
|
|
2563
|
-
}
|
|
2564
|
-
else {
|
|
2565
|
-
lAuxformExpression.push(expression);
|
|
2566
|
-
}
|
|
2567
|
-
});
|
|
2568
|
-
replacedTokens = lAuxformExpression.join(' ');
|
|
2569
|
-
}
|
|
2570
|
-
}
|
|
2571
|
-
}
|
|
2572
|
-
return replacedTokens;
|
|
2573
|
-
}
|
|
2574
|
-
/**
|
|
2575
|
-
* MEtodo que teniendo una expresion de la forma ['tag1', 'tag2']==tag3
|
|
2576
|
-
* evalua si tag3 hace parte del array si tiene el operador ==.
|
|
2577
|
-
* Si tiene el operador != examina que tag3 no haga parte del array+
|
|
2578
|
-
*
|
|
2579
|
-
* @param expression Operando que evalua tag. Es de la forma ['tag1', 'tag2']==tag3
|
|
2580
|
-
* @returns Retorna 'true' o 'false' en string que despues sera pasado a un eval()
|
|
2581
|
-
* mas adelante en el flujo
|
|
2582
|
-
*/
|
|
2583
|
-
findTag(expression) {
|
|
2584
|
-
let regexOperator = new RegExp('(===|==|!==|!=)');
|
|
2585
|
-
// Retorna el operador
|
|
2586
|
-
let operator = expression.match(regexOperator);
|
|
2587
|
-
// Si no encuentra un operador segun el patron retorna 'false'
|
|
2588
|
-
// para evitar resultados inesperados
|
|
2589
|
-
if (operator == null) {
|
|
2590
|
-
console.error('No se encontro un operador permitido para la expresion');
|
|
2591
|
-
return 'false';
|
|
2592
|
-
}
|
|
2593
|
-
// Separa la sentencia por el operador
|
|
2594
|
-
// La primera parte es el valor por el cual se remplaza el token que es un array en string "['a', 'b']"
|
|
2595
|
-
// El segundo es el valor con el cual se va a comparar
|
|
2596
|
-
let valueToken, valueToCompare;
|
|
2597
|
-
[valueToken, valueToCompare] = expression.split(operator[0]);
|
|
2598
|
-
// Se limpia el string correspondiente al array para que los elementos queden separados por ","
|
|
2599
|
-
valueToken = valueToken.replace(/[^a-zA-Z0-9 ,]/g, '');
|
|
2600
|
-
// Si no hay tags asociados al registro se devuelve 'false'
|
|
2601
|
-
if (!valueToken) {
|
|
2602
|
-
console.error('No hay tags asociados a esta aplicación');
|
|
2603
|
-
return 'false';
|
|
2604
|
-
}
|
|
2605
|
-
// Se limpia el string correspondiente al valor por comparar
|
|
2606
|
-
valueToCompare = valueToCompare.replace(/[^a-zA-Z0-9 ]/g, '');
|
|
2607
|
-
// El string correspondiente al array pasa a ser tipo array
|
|
2608
|
-
valueToken = valueToken.split(',');
|
|
2609
|
-
// Se trata de constatar si el valor a comparar se encuetra o no dentro
|
|
2610
|
-
// Si el operador que se encontro == returna true si lo encuentra
|
|
2611
|
-
let isTagFound = true;
|
|
2612
|
-
switch (operator[0]) {
|
|
2613
|
-
case '==':
|
|
2614
|
-
isTagFound = valueToken.some((tag) => tag == valueToCompare);
|
|
2615
|
-
break;
|
|
2616
|
-
case '===':
|
|
2617
|
-
isTagFound = valueToken.some((tag) => tag === valueToCompare);
|
|
2618
|
-
break;
|
|
2619
|
-
case '!==':
|
|
2620
|
-
isTagFound = valueToken.some((tag) => tag !== valueToCompare);
|
|
2621
|
-
break;
|
|
2622
|
-
case '!=':
|
|
2623
|
-
isTagFound = valueToken.some((tag) => tag != valueToCompare);
|
|
2624
|
-
break;
|
|
2625
|
-
default:
|
|
2626
|
-
break;
|
|
2627
|
-
}
|
|
2628
|
-
expression = isTagFound ? 'true' : 'false';
|
|
2629
|
-
return expression;
|
|
2630
|
-
}
|
|
2631
|
-
/**
|
|
2632
|
-
* Try to eval the formula depend of the type of fields.
|
|
2633
|
-
* @param lStaticToken
|
|
2634
|
-
* @param formulaName
|
|
2635
|
-
* @param formula
|
|
2636
|
-
*/
|
|
2637
|
-
validateFormula(lStaticToken, formulaName, formula) {
|
|
2638
|
-
let evalFormula = false;
|
|
2639
|
-
// To validate the formula, first organize the info to key - value array
|
|
2640
|
-
let objectTokens = [];
|
|
2641
|
-
for (let panel of lStaticToken) {
|
|
2642
|
-
for (let groupToken of panel.value) {
|
|
2643
|
-
for (let staticToken of groupToken.value) {
|
|
2644
|
-
for (let arrayTokenInfo of staticToken) {
|
|
2645
|
-
objectTokens[arrayTokenInfo.key] = arrayTokenInfo.object
|
|
2646
|
-
? arrayTokenInfo.object.type == 'number'
|
|
2647
|
-
? '0'
|
|
2648
|
-
: ''
|
|
2649
|
-
: '';
|
|
2650
|
-
}
|
|
2651
|
-
}
|
|
2652
|
-
}
|
|
2653
|
-
}
|
|
2654
|
-
try {
|
|
2655
|
-
formula = this.replaceTokensFromListObject(formulaName, formula, objectTokens);
|
|
2656
|
-
}
|
|
2657
|
-
catch (error) {
|
|
2658
|
-
//console.error(error);
|
|
2659
|
-
throw error;
|
|
2137
|
+
catch (error) {
|
|
2138
|
+
//console.error(error);
|
|
2139
|
+
throw error;
|
|
2660
2140
|
}
|
|
2661
2141
|
if (formula !== null) {
|
|
2662
2142
|
try {
|
|
@@ -3130,7 +2610,7 @@ class BudgetService {
|
|
|
3130
2610
|
}), catchError((error) => {
|
|
3131
2611
|
console.log('El sistema no responde', error);
|
|
3132
2612
|
throw this.toastr.error('El sistema no responde', 'Error!');
|
|
3133
|
-
}));
|
|
2613
|
+
})).subscribe();
|
|
3134
2614
|
}
|
|
3135
2615
|
/** It saves a globalBudgetCategory */
|
|
3136
2616
|
savePresupuestoGlobalCategory(globalBudgetCategoryBefore, globalBudgetCategory, patCodigo) {
|
|
@@ -3173,7 +2653,7 @@ class BudgetService {
|
|
|
3173
2653
|
}), catchError((error) => {
|
|
3174
2654
|
console.log('El sistema no responde', error);
|
|
3175
2655
|
throw this.toastr.error('El sistema no responde', 'Error!');
|
|
3176
|
-
}));
|
|
2656
|
+
})).subscribe();
|
|
3177
2657
|
}
|
|
3178
2658
|
/** Returns a list of PliCnfPresupuestoAsistente */
|
|
3179
2659
|
getAllPresupuestoAsistente(cpreCodigo) {
|
|
@@ -4813,10 +4293,10 @@ class PdfConfigComponent extends ConfigurationCommonsComponent {
|
|
|
4813
4293
|
}
|
|
4814
4294
|
}
|
|
4815
4295
|
PdfConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: PdfConfigComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: CommonService }, { token: ConfigurationDocumentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4816
|
-
PdfConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: PdfConfigComponent, selector: "pli-pdf-config", inputs: { promCodigo: "promCodigo", showFormula: "showFormula", showSnapshot: "showSnapshot", showSnapshotForm: "showSnapshotForm", showName: "showName", showIdiCodigo: "showIdiCodigo", showCdocCodigo: "showCdocCodigo", showTemplate: "showTemplate", showVisibles: "showVisibles", showMargins: "showMargins", showHeader: "showHeader", showFooter: "showFooter", showFont: "showFont", showTokens: "showTokens", showFrm: "showFrm", showStatic: "showStatic", showBudget: "showBudget", showCalculated: "showCalculated", showCalculatedForm: "showCalculatedForm", showSize: "showSize", showOrientation: "showOrientation", showRepeatHeader: "showRepeatHeader", showRepeatFooter: "showRepeatFooter", showPager: "showPager", showHeaderFooterHeight: "showHeaderFooterHeight", tgdocCodigo: "tgdocCodigo", pdfConfig: "pdfConfig", toolbar: "toolbar" }, outputs: { pdfConfigChange: "pdfConfigChange" }, usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\r\n\t<div class=\"col-md-3\">\r\n\t\t<div class=\"row\">\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showName\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"name\" class=\"form-control-label\">Nombre *</label>\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tname=\"name\"\r\n\t\t\t\t\t\tid=\"name\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.name\"\r\n\t\t\t\t\t\tplaceholder=\"Nombre\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showFormula\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"formula\" class=\"form-control-label\"\r\n\t\t\t\t\t\t>F\u00F3rmula de la visibilidad del documento</label\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<textarea\r\n\t\t\t\t\t\tstyle=\"resize: vertical\"\r\n\t\t\t\t\t\trows=\"2\"\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tname=\"formula\"\r\n\t\t\t\t\t\tid=\"formula\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.formula\"\r\n\t\t\t\t\t\tplaceholder=\"Formula de la visibilidad del documento\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t</textarea>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showIdiCodigo\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"idiCodigo\" class=\"form-control-label\">Idioma *</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"idiCodigo\"\r\n\t\t\t\t\t\tid=\"idiCodigo\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.idiCodigo\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option value=\"\">-- Seleccione opci\u00F3n</option>\r\n\t\t\t\t\t\t<option *ngFor=\"let language of listLanguage\" [value]=\"language.idiCodigo\">\r\n\t\t\t\t\t\t\t{{ language.idiIdioma }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showCdocCodigo\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"cdocCodigo\" class=\"form-control-label\">Tipo documento *</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"cdocCodigo\"\r\n\t\t\t\t\t\tid=\"cdocCodigo\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.cdocCodigo\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option value=\"\">-- Seleccione opci\u00F3n</option>\r\n\t\t\t\t\t\t<option *ngFor=\"let document of listDocument\" [value]=\"document.id\">\r\n\t\t\t\t\t\t\t{{ document.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showVisibles\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"name\" class=\"form-control-label\">Visibilidad usuario</label>\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\t\t\tid=\"visibleInternal\"\r\n\t\t\t\t\t\t\t\tname=\"visibleInternal\"\r\n\t\t\t\t\t\t\t\tvalue=\"1\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.visibleInternal\"\r\n\t\t\t\t\t\t\t/> <label for=\"visibleInternal\">Interno</label> \r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\t\t\tid=\"visibleExternal\"\r\n\t\t\t\t\t\t\t\tname=\"visibleExternal\"\r\n\t\t\t\t\t\t\t\tvalue=\"1\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.visibleExternal\"\r\n\t\t\t\t\t\t\t/> \r\n\t\t\t\t\t\t\t<label for=\"visibleExternal\">Externo</label>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showFont\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"font\" class=\"form-control-label\">Tipo de letra</label>\r\n\t\t\t\t\t<select name=\"font\" id=\"font\" class=\"form-control\" [(ngModel)]=\"pdfConfig.font\">\r\n\t\t\t\t\t\t<option *ngFor=\"let font of listFont\" [value]=\"font.value\">\r\n\t\t\t\t\t\t\t{{ font.label }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showSize\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"size\" class=\"form-control-label\">Tama\u00F1o de hoja</label>\r\n\t\t\t\t\t<select name=\"size\" id=\"size\" class=\"form-control\" [(ngModel)]=\"pdfConfig.size\">\r\n\t\t\t\t\t\t<option *ngFor=\"let size of listSizes\" [value]=\"size.id\">\r\n\t\t\t\t\t\t\t{{ size.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showOrientation\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"orientation\" class=\"form-control-label\">Orientaci\u00F3n</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"orientation\"\r\n\t\t\t\t\t\tid=\"orientation\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.orientation\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option\r\n\t\t\t\t\t\t\t*ngFor=\"let orientation of listOrientation\"\r\n\t\t\t\t\t\t\t[value]=\"orientation.id\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{{ orientation.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showPager\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.showPager\"\r\n\t\t\t\t\t\tid=\"showPager\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"showPager\" class=\"form-control-label\"> Ver paginador</label>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showRepeatHeader\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.repeatHeader\"\r\n\t\t\t\t\t\tid=\"repeatHeader\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"repeatHeader\" class=\"form-control-label\"> Repetir encabezado</label>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showRepeatFooter\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.repeatFooter\"\r\n\t\t\t\t\t\tid=\"repeatFooter\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"repeatFooter\" class=\"form-control-label\">\r\n\t\t\t\t\t\tRepetir pie de p\u00E1gina</label\r\n\t\t\t\t\t>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-md-12\" *ngIf=\"showMargins\" [ngClass]=\"{ 'top-space': showBr }\">\r\n\t\t\t\tM\u00E1rgenes (cm)\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Arriba</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Arriba\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginRight\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Derecha</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Derecha\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginBottom\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Abajo</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Abajo\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginLeft\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Izquierda</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Izquierda\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div\r\n\t\t\t\tclass=\"col-md-12\"\r\n\t\t\t\t*ngIf=\"showHeaderFooterHeight\"\r\n\t\t\t\t[ngClass]=\"{ 'top-space': showBr }\"\r\n\t\t\t>\r\n\t\t\t\tAlturas (cm)\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showHeaderFooterHeight\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Cabecera</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Cabecera\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showHeaderFooterHeight\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Pie de p\u00E1gina</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Pie de p\u00E1g\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12 margin-top\" *ngIf=\"showTokens\">\r\n\t\t\t\t<pli-configuration-token\r\n\t\t\t\t\t[promCodigo]=\"promCodigo\"\r\n\t\t\t\t\t[showFrm]=\"showFrm\"\r\n\t\t\t\t\t[showStatic]=\"showStatic\"\r\n\t\t\t\t\t[showBudget]=\"showBudget\"\r\n\t\t\t\t\t[showCalculated]=\"showCalculated\"\r\n\t\t\t\t\t[showCalculatedForm]=\"showCalculatedForm\"\r\n\t\t\t\t\t[showSnapshotForm]=\"showSnapshotForm\"\r\n\t\t\t\t\t[showSnapshot]=\"showSnapshot\"\r\n\t\t\t\t></pli-configuration-token>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"col-md-9\">\r\n\t\t<div class=\"row\">\r\n\t\t\t<div class=\"col-md-12\" *ngIf=\"showHeader\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"header\" class=\"form-control-label\">Encabezado</label>\r\n\t\t\t\t\t<editor\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.header\"\r\n\t\t\t\t\t\t[init]=\"{\r\n\t\t\t\t\t\t\tbranding: false,\r\n\t\t\t\t\t\t\tbase_url: '/tinymce',\r\n\t\t\t\t\t\t\tsuffix: '.min',\r\n\t\t\t\t\t\t\tplugins: [\r\n\t\t\t\t\t\t\t\t'code preview autoresize paste colorpicker textcolor link table lists advlist image'\r\n\t\t\t\t\t\t\t],\r\n\t\t\t\t\t\t\ttoolbar:\r\n\t\t\t\t\t\t\t\t'undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | forecolor backcolor fontsizeselect | code preview image link'\r\n\t\t\t\t\t\t}\"\r\n\t\t\t\t\t></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"row margin-top\" *ngIf=\"showTemplate\">\r\n\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"template\" class=\"form-control-label\">Cuerpo</label>\r\n\t\t\t\t\t<editor\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.template\"\r\n\t\t\t\t\t\t[init]=\"{\r\n\t\t\t\t\t\t\tbranding: false,\r\n\t\t\t\t\t\t\tbase_url: '/tinymce',\r\n\t\t\t\t\t\t\tsuffix: '.min',\r\n\t\t\t\t\t\t\tplugins: [\r\n\t\t\t\t\t\t\t\t'code preview autoresize paste colorpicker textcolor link table lists advlist image'\r\n\t\t\t\t\t\t\t],\r\n\t\t\t\t\t\t\ttoolbar:\r\n\t\t\t\t\t\t\t\t'undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | forecolor backcolor fontsizeselect | code preview image link'\r\n\t\t\t\t\t\t}\"\r\n\t\t\t\t\t></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"row margin-top\" *ngIf=\"showFooter\">\r\n\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"footer\" class=\"form-control-label\">Pie de p\u00E1gina</label>\r\n\t\t\t\t\t<editor\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.footer\"\r\n\t\t\t\t\t\t[init]=\"{\r\n\t\t\t\t\t\t\tbranding: false,\r\n\t\t\t\t\t\t\tbase_url: '/tinymce',\r\n\t\t\t\t\t\t\tsuffix: '.min',\r\n\t\t\t\t\t\t\tplugins: [\r\n\t\t\t\t\t\t\t\t'code preview autoresize paste colorpicker textcolor link table lists advlist image'\r\n\t\t\t\t\t\t\t],\r\n\t\t\t\t\t\t\ttoolbar:\r\n\t\t\t\t\t\t\t\t'undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | forecolor backcolor fontsizeselect | code preview image link'\r\n\t\t\t\t\t\t}\"\r\n\t\t\t\t\t></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n", styles: [".top-space{margin-top:12px}.check-space{margin-right:5px}\n"], components: [{ type: ConfigurationTokenComponent, selector: "pli-configuration-token", inputs: ["promCodigo", "showFrm", "showFrmMultiple", "showStatic", "showBudget", "showCalculated", "showCalculatedForm", "showSnapshot", "showSnapshotForm", "showDocument", "showTask", "showGuatantee", "showGuatanteeForm", "showAsTitle"], outputs: ["onStaticToken"] }, { type: i4$2.EditorComponent, selector: "editor", inputs: ["cloudChannel", "apiKey", "init", "id", "initialValue", "outputFormat", "inline", "tagName", "plugins", "toolbar", "modelEvents", "allowedEvents", "ignoreEvents", "disabled"] }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i9.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i9.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }] });
|
|
4296
|
+
PdfConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: PdfConfigComponent, selector: "pli-pdf-config", inputs: { promCodigo: "promCodigo", showFormula: "showFormula", showSnapshot: "showSnapshot", showSnapshotForm: "showSnapshotForm", showName: "showName", showIdiCodigo: "showIdiCodigo", showCdocCodigo: "showCdocCodigo", showTemplate: "showTemplate", showVisibles: "showVisibles", showMargins: "showMargins", showHeader: "showHeader", showFooter: "showFooter", showFont: "showFont", showTokens: "showTokens", showFrm: "showFrm", showStatic: "showStatic", showBudget: "showBudget", showCalculated: "showCalculated", showCalculatedForm: "showCalculatedForm", showSize: "showSize", showOrientation: "showOrientation", showRepeatHeader: "showRepeatHeader", showRepeatFooter: "showRepeatFooter", showPager: "showPager", showHeaderFooterHeight: "showHeaderFooterHeight", tgdocCodigo: "tgdocCodigo", pdfConfig: "pdfConfig", toolbar: "toolbar" }, outputs: { pdfConfigChange: "pdfConfigChange" }, usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\r\n\t<div class=\"col-md-3\">\r\n\t\t<div class=\"row\">\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showName\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"name\" class=\"form-control-label\">Nombre *</label>\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tname=\"name\"\r\n\t\t\t\t\t\tid=\"name\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.name\"\r\n\t\t\t\t\t\tplaceholder=\"Nombre\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showFormula\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"formula\" class=\"form-control-label\"\r\n\t\t\t\t\t\t>F\u00F3rmula de la visibilidad del documento</label\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<textarea\r\n\t\t\t\t\t\tstyle=\"resize: vertical\"\r\n\t\t\t\t\t\trows=\"2\"\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tname=\"formula\"\r\n\t\t\t\t\t\tid=\"formula\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.formula\"\r\n\t\t\t\t\t\tplaceholder=\"Formula de la visibilidad del documento\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t</textarea>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showIdiCodigo\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"idiCodigo\" class=\"form-control-label\">Idioma *</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"idiCodigo\"\r\n\t\t\t\t\t\tid=\"idiCodigo\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.idiCodigo\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option value=\"\">-- Seleccione opci\u00F3n</option>\r\n\t\t\t\t\t\t<option *ngFor=\"let language of listLanguage\" [value]=\"language.idiCodigo\">\r\n\t\t\t\t\t\t\t{{ language.idiIdioma }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showCdocCodigo\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"cdocCodigo\" class=\"form-control-label\">Tipo documento *</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"cdocCodigo\"\r\n\t\t\t\t\t\tid=\"cdocCodigo\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.cdocCodigo\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option value=\"\">-- Seleccione opci\u00F3n</option>\r\n\t\t\t\t\t\t<option *ngFor=\"let document of listDocument\" [value]=\"document.id\">\r\n\t\t\t\t\t\t\t{{ document.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showVisibles\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"name\" class=\"form-control-label\">Visibilidad usuario</label>\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\t\t\tid=\"visibleInternal\"\r\n\t\t\t\t\t\t\t\tname=\"visibleInternal\"\r\n\t\t\t\t\t\t\t\tvalue=\"1\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.visibleInternal\"\r\n\t\t\t\t\t\t\t/> <label for=\"visibleInternal\">Interno</label> \r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\t\t\tid=\"visibleExternal\"\r\n\t\t\t\t\t\t\t\tname=\"visibleExternal\"\r\n\t\t\t\t\t\t\t\tvalue=\"1\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.visibleExternal\"\r\n\t\t\t\t\t\t\t/> \r\n\t\t\t\t\t\t\t<label for=\"visibleExternal\">Externo</label>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showFont\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"font\" class=\"form-control-label\">Tipo de letra</label>\r\n\t\t\t\t\t<select name=\"font\" id=\"font\" class=\"form-control\" [(ngModel)]=\"pdfConfig.font\">\r\n\t\t\t\t\t\t<option *ngFor=\"let font of listFont\" [value]=\"font.value\">\r\n\t\t\t\t\t\t\t{{ font.label }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showSize\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"size\" class=\"form-control-label\">Tama\u00F1o de hoja</label>\r\n\t\t\t\t\t<select name=\"size\" id=\"size\" class=\"form-control\" [(ngModel)]=\"pdfConfig.size\">\r\n\t\t\t\t\t\t<option *ngFor=\"let size of listSizes\" [value]=\"size.id\">\r\n\t\t\t\t\t\t\t{{ size.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showOrientation\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"orientation\" class=\"form-control-label\">Orientaci\u00F3n</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"orientation\"\r\n\t\t\t\t\t\tid=\"orientation\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.orientation\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option\r\n\t\t\t\t\t\t\t*ngFor=\"let orientation of listOrientation\"\r\n\t\t\t\t\t\t\t[value]=\"orientation.id\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{{ orientation.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showPager\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.showPager\"\r\n\t\t\t\t\t\tid=\"showPager\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"showPager\" class=\"form-control-label\"> Ver paginador</label>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showRepeatHeader\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.repeatHeader\"\r\n\t\t\t\t\t\tid=\"repeatHeader\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"repeatHeader\" class=\"form-control-label\"> Repetir encabezado</label>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showRepeatFooter\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.repeatFooter\"\r\n\t\t\t\t\t\tid=\"repeatFooter\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"repeatFooter\" class=\"form-control-label\">\r\n\t\t\t\t\t\tRepetir pie de p\u00E1gina</label\r\n\t\t\t\t\t>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-md-12\" *ngIf=\"showMargins\" [ngClass]=\"{ 'top-space': showBr }\">\r\n\t\t\t\tM\u00E1rgenes (cm)\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Arriba</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Arriba\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginRight\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Derecha</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Derecha\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginBottom\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Abajo</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Abajo\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginLeft\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Izquierda</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Izquierda\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div\r\n\t\t\t\tclass=\"col-md-12\"\r\n\t\t\t\t*ngIf=\"showHeaderFooterHeight\"\r\n\t\t\t\t[ngClass]=\"{ 'top-space': showBr }\"\r\n\t\t\t>\r\n\t\t\t\tAlturas (cm)\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showHeaderFooterHeight\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Cabecera</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Cabecera\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showHeaderFooterHeight\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Pie de p\u00E1gina</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Pie de p\u00E1g\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12 margin-top\" *ngIf=\"showTokens\">\r\n\t\t\t\t<pli-configuration-token\r\n\t\t\t\t\t[promCodigo]=\"promCodigo\"\r\n\t\t\t\t\t[showFrm]=\"showFrm\"\r\n\t\t\t\t\t[showStatic]=\"showStatic\"\r\n\t\t\t\t\t[showBudget]=\"showBudget\"\r\n\t\t\t\t\t[showCalculated]=\"showCalculated\"\r\n\t\t\t\t\t[showCalculatedForm]=\"showCalculatedForm\"\r\n\t\t\t\t\t[showSnapshotForm]=\"showSnapshotForm\"\r\n\t\t\t\t\t[showSnapshot]=\"showSnapshot\"\r\n\t\t\t\t></pli-configuration-token>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"col-md-9\">\r\n\t\t<div class=\"row\">\r\n\t\t\t<div class=\"col-md-12\" *ngIf=\"showHeader\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"header\" class=\"form-control-label\">Encabezado</label>\r\n\t\t\t\t\t<editor [(ngModel)]=\"pdfConfig.header\" [init]=\"options\"></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"row margin-top\" *ngIf=\"showTemplate\">\r\n\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"template\" class=\"form-control-label\">Cuerpo</label>\r\n\t\t\t\t\t<editor [(ngModel)]=\"pdfConfig.template\" [init]=\"options\"></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"row margin-top\" *ngIf=\"showFooter\">\r\n\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"footer\" class=\"form-control-label\">Pie de p\u00E1gina</label>\r\n\t\t\t\t\t<editor [(ngModel)]=\"pdfConfig.footer\" [init]=\"options\"></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n", styles: [".top-space{margin-top:12px}.check-space{margin-right:5px}\n"], components: [{ type: ConfigurationTokenComponent, selector: "pli-configuration-token", inputs: ["promCodigo", "showFrm", "showFrmMultiple", "showStatic", "showBudget", "showCalculated", "showCalculatedForm", "showSnapshot", "showSnapshotForm", "showDocument", "showTask", "showGuatantee", "showGuatanteeForm", "showAsTitle"], outputs: ["onStaticToken"] }, { type: i4$2.EditorComponent, selector: "editor", inputs: ["cloudChannel", "apiKey", "init", "id", "initialValue", "outputFormat", "inline", "tagName", "plugins", "toolbar", "modelEvents", "allowedEvents", "ignoreEvents", "disabled"] }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i9.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i9.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }] });
|
|
4817
4297
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: PdfConfigComponent, decorators: [{
|
|
4818
4298
|
type: Component,
|
|
4819
|
-
args: [{ selector: 'pli-pdf-config', template: "<div class=\"row\">\r\n\t<div class=\"col-md-3\">\r\n\t\t<div class=\"row\">\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showName\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"name\" class=\"form-control-label\">Nombre *</label>\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tname=\"name\"\r\n\t\t\t\t\t\tid=\"name\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.name\"\r\n\t\t\t\t\t\tplaceholder=\"Nombre\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showFormula\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"formula\" class=\"form-control-label\"\r\n\t\t\t\t\t\t>F\u00F3rmula de la visibilidad del documento</label\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<textarea\r\n\t\t\t\t\t\tstyle=\"resize: vertical\"\r\n\t\t\t\t\t\trows=\"2\"\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tname=\"formula\"\r\n\t\t\t\t\t\tid=\"formula\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.formula\"\r\n\t\t\t\t\t\tplaceholder=\"Formula de la visibilidad del documento\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t</textarea>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showIdiCodigo\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"idiCodigo\" class=\"form-control-label\">Idioma *</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"idiCodigo\"\r\n\t\t\t\t\t\tid=\"idiCodigo\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.idiCodigo\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option value=\"\">-- Seleccione opci\u00F3n</option>\r\n\t\t\t\t\t\t<option *ngFor=\"let language of listLanguage\" [value]=\"language.idiCodigo\">\r\n\t\t\t\t\t\t\t{{ language.idiIdioma }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showCdocCodigo\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"cdocCodigo\" class=\"form-control-label\">Tipo documento *</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"cdocCodigo\"\r\n\t\t\t\t\t\tid=\"cdocCodigo\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.cdocCodigo\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option value=\"\">-- Seleccione opci\u00F3n</option>\r\n\t\t\t\t\t\t<option *ngFor=\"let document of listDocument\" [value]=\"document.id\">\r\n\t\t\t\t\t\t\t{{ document.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showVisibles\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"name\" class=\"form-control-label\">Visibilidad usuario</label>\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\t\t\tid=\"visibleInternal\"\r\n\t\t\t\t\t\t\t\tname=\"visibleInternal\"\r\n\t\t\t\t\t\t\t\tvalue=\"1\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.visibleInternal\"\r\n\t\t\t\t\t\t\t/> <label for=\"visibleInternal\">Interno</label> \r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\t\t\tid=\"visibleExternal\"\r\n\t\t\t\t\t\t\t\tname=\"visibleExternal\"\r\n\t\t\t\t\t\t\t\tvalue=\"1\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.visibleExternal\"\r\n\t\t\t\t\t\t\t/> \r\n\t\t\t\t\t\t\t<label for=\"visibleExternal\">Externo</label>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showFont\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"font\" class=\"form-control-label\">Tipo de letra</label>\r\n\t\t\t\t\t<select name=\"font\" id=\"font\" class=\"form-control\" [(ngModel)]=\"pdfConfig.font\">\r\n\t\t\t\t\t\t<option *ngFor=\"let font of listFont\" [value]=\"font.value\">\r\n\t\t\t\t\t\t\t{{ font.label }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showSize\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"size\" class=\"form-control-label\">Tama\u00F1o de hoja</label>\r\n\t\t\t\t\t<select name=\"size\" id=\"size\" class=\"form-control\" [(ngModel)]=\"pdfConfig.size\">\r\n\t\t\t\t\t\t<option *ngFor=\"let size of listSizes\" [value]=\"size.id\">\r\n\t\t\t\t\t\t\t{{ size.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showOrientation\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"orientation\" class=\"form-control-label\">Orientaci\u00F3n</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"orientation\"\r\n\t\t\t\t\t\tid=\"orientation\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.orientation\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option\r\n\t\t\t\t\t\t\t*ngFor=\"let orientation of listOrientation\"\r\n\t\t\t\t\t\t\t[value]=\"orientation.id\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{{ orientation.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showPager\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.showPager\"\r\n\t\t\t\t\t\tid=\"showPager\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"showPager\" class=\"form-control-label\"> Ver paginador</label>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showRepeatHeader\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.repeatHeader\"\r\n\t\t\t\t\t\tid=\"repeatHeader\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"repeatHeader\" class=\"form-control-label\"> Repetir encabezado</label>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showRepeatFooter\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.repeatFooter\"\r\n\t\t\t\t\t\tid=\"repeatFooter\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"repeatFooter\" class=\"form-control-label\">\r\n\t\t\t\t\t\tRepetir pie de p\u00E1gina</label\r\n\t\t\t\t\t>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-md-12\" *ngIf=\"showMargins\" [ngClass]=\"{ 'top-space': showBr }\">\r\n\t\t\t\tM\u00E1rgenes (cm)\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Arriba</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Arriba\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginRight\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Derecha</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Derecha\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginBottom\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Abajo</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Abajo\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginLeft\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Izquierda</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Izquierda\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div\r\n\t\t\t\tclass=\"col-md-12\"\r\n\t\t\t\t*ngIf=\"showHeaderFooterHeight\"\r\n\t\t\t\t[ngClass]=\"{ 'top-space': showBr }\"\r\n\t\t\t>\r\n\t\t\t\tAlturas (cm)\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showHeaderFooterHeight\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Cabecera</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Cabecera\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showHeaderFooterHeight\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Pie de p\u00E1gina</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Pie de p\u00E1g\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12 margin-top\" *ngIf=\"showTokens\">\r\n\t\t\t\t<pli-configuration-token\r\n\t\t\t\t\t[promCodigo]=\"promCodigo\"\r\n\t\t\t\t\t[showFrm]=\"showFrm\"\r\n\t\t\t\t\t[showStatic]=\"showStatic\"\r\n\t\t\t\t\t[showBudget]=\"showBudget\"\r\n\t\t\t\t\t[showCalculated]=\"showCalculated\"\r\n\t\t\t\t\t[showCalculatedForm]=\"showCalculatedForm\"\r\n\t\t\t\t\t[showSnapshotForm]=\"showSnapshotForm\"\r\n\t\t\t\t\t[showSnapshot]=\"showSnapshot\"\r\n\t\t\t\t></pli-configuration-token>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"col-md-9\">\r\n\t\t<div class=\"row\">\r\n\t\t\t<div class=\"col-md-12\" *ngIf=\"showHeader\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"header\" class=\"form-control-label\">Encabezado</label>\r\n\t\t\t\t\t<editor\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.header\"\r\n\t\t\t\t\t\t[init]=\"{\r\n\t\t\t\t\t\t\tbranding: false,\r\n\t\t\t\t\t\t\tbase_url: '/tinymce',\r\n\t\t\t\t\t\t\tsuffix: '.min',\r\n\t\t\t\t\t\t\tplugins: [\r\n\t\t\t\t\t\t\t\t'code preview autoresize paste colorpicker textcolor link table lists advlist image'\r\n\t\t\t\t\t\t\t],\r\n\t\t\t\t\t\t\ttoolbar:\r\n\t\t\t\t\t\t\t\t'undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | forecolor backcolor fontsizeselect | code preview image link'\r\n\t\t\t\t\t\t}\"\r\n\t\t\t\t\t></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"row margin-top\" *ngIf=\"showTemplate\">\r\n\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"template\" class=\"form-control-label\">Cuerpo</label>\r\n\t\t\t\t\t<editor\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.template\"\r\n\t\t\t\t\t\t[init]=\"{\r\n\t\t\t\t\t\t\tbranding: false,\r\n\t\t\t\t\t\t\tbase_url: '/tinymce',\r\n\t\t\t\t\t\t\tsuffix: '.min',\r\n\t\t\t\t\t\t\tplugins: [\r\n\t\t\t\t\t\t\t\t'code preview autoresize paste colorpicker textcolor link table lists advlist image'\r\n\t\t\t\t\t\t\t],\r\n\t\t\t\t\t\t\ttoolbar:\r\n\t\t\t\t\t\t\t\t'undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | forecolor backcolor fontsizeselect | code preview image link'\r\n\t\t\t\t\t\t}\"\r\n\t\t\t\t\t></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"row margin-top\" *ngIf=\"showFooter\">\r\n\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"footer\" class=\"form-control-label\">Pie de p\u00E1gina</label>\r\n\t\t\t\t\t<editor\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.footer\"\r\n\t\t\t\t\t\t[init]=\"{\r\n\t\t\t\t\t\t\tbranding: false,\r\n\t\t\t\t\t\t\tbase_url: '/tinymce',\r\n\t\t\t\t\t\t\tsuffix: '.min',\r\n\t\t\t\t\t\t\tplugins: [\r\n\t\t\t\t\t\t\t\t'code preview autoresize paste colorpicker textcolor link table lists advlist image'\r\n\t\t\t\t\t\t\t],\r\n\t\t\t\t\t\t\ttoolbar:\r\n\t\t\t\t\t\t\t\t'undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | forecolor backcolor fontsizeselect | code preview image link'\r\n\t\t\t\t\t\t}\"\r\n\t\t\t\t\t></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n", styles: [".top-space{margin-top:12px}.check-space{margin-right:5px}\n"] }]
|
|
4299
|
+
args: [{ selector: 'pli-pdf-config', template: "<div class=\"row\">\r\n\t<div class=\"col-md-3\">\r\n\t\t<div class=\"row\">\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showName\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"name\" class=\"form-control-label\">Nombre *</label>\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tname=\"name\"\r\n\t\t\t\t\t\tid=\"name\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.name\"\r\n\t\t\t\t\t\tplaceholder=\"Nombre\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showFormula\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"formula\" class=\"form-control-label\"\r\n\t\t\t\t\t\t>F\u00F3rmula de la visibilidad del documento</label\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<textarea\r\n\t\t\t\t\t\tstyle=\"resize: vertical\"\r\n\t\t\t\t\t\trows=\"2\"\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tname=\"formula\"\r\n\t\t\t\t\t\tid=\"formula\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.formula\"\r\n\t\t\t\t\t\tplaceholder=\"Formula de la visibilidad del documento\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t</textarea>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showIdiCodigo\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"idiCodigo\" class=\"form-control-label\">Idioma *</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"idiCodigo\"\r\n\t\t\t\t\t\tid=\"idiCodigo\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.idiCodigo\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option value=\"\">-- Seleccione opci\u00F3n</option>\r\n\t\t\t\t\t\t<option *ngFor=\"let language of listLanguage\" [value]=\"language.idiCodigo\">\r\n\t\t\t\t\t\t\t{{ language.idiIdioma }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showCdocCodigo\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"cdocCodigo\" class=\"form-control-label\">Tipo documento *</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"cdocCodigo\"\r\n\t\t\t\t\t\tid=\"cdocCodigo\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.cdocCodigo\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option value=\"\">-- Seleccione opci\u00F3n</option>\r\n\t\t\t\t\t\t<option *ngFor=\"let document of listDocument\" [value]=\"document.id\">\r\n\t\t\t\t\t\t\t{{ document.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showVisibles\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"name\" class=\"form-control-label\">Visibilidad usuario</label>\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\t\t\tid=\"visibleInternal\"\r\n\t\t\t\t\t\t\t\tname=\"visibleInternal\"\r\n\t\t\t\t\t\t\t\tvalue=\"1\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.visibleInternal\"\r\n\t\t\t\t\t\t\t/> <label for=\"visibleInternal\">Interno</label> \r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\t\t\tid=\"visibleExternal\"\r\n\t\t\t\t\t\t\t\tname=\"visibleExternal\"\r\n\t\t\t\t\t\t\t\tvalue=\"1\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.visibleExternal\"\r\n\t\t\t\t\t\t\t/> \r\n\t\t\t\t\t\t\t<label for=\"visibleExternal\">Externo</label>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showFont\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"font\" class=\"form-control-label\">Tipo de letra</label>\r\n\t\t\t\t\t<select name=\"font\" id=\"font\" class=\"form-control\" [(ngModel)]=\"pdfConfig.font\">\r\n\t\t\t\t\t\t<option *ngFor=\"let font of listFont\" [value]=\"font.value\">\r\n\t\t\t\t\t\t\t{{ font.label }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showSize\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"size\" class=\"form-control-label\">Tama\u00F1o de hoja</label>\r\n\t\t\t\t\t<select name=\"size\" id=\"size\" class=\"form-control\" [(ngModel)]=\"pdfConfig.size\">\r\n\t\t\t\t\t\t<option *ngFor=\"let size of listSizes\" [value]=\"size.id\">\r\n\t\t\t\t\t\t\t{{ size.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showOrientation\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"orientation\" class=\"form-control-label\">Orientaci\u00F3n</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"orientation\"\r\n\t\t\t\t\t\tid=\"orientation\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.orientation\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option\r\n\t\t\t\t\t\t\t*ngFor=\"let orientation of listOrientation\"\r\n\t\t\t\t\t\t\t[value]=\"orientation.id\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{{ orientation.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showPager\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.showPager\"\r\n\t\t\t\t\t\tid=\"showPager\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"showPager\" class=\"form-control-label\"> Ver paginador</label>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showRepeatHeader\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.repeatHeader\"\r\n\t\t\t\t\t\tid=\"repeatHeader\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"repeatHeader\" class=\"form-control-label\"> Repetir encabezado</label>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showRepeatFooter\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.repeatFooter\"\r\n\t\t\t\t\t\tid=\"repeatFooter\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"repeatFooter\" class=\"form-control-label\">\r\n\t\t\t\t\t\tRepetir pie de p\u00E1gina</label\r\n\t\t\t\t\t>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-md-12\" *ngIf=\"showMargins\" [ngClass]=\"{ 'top-space': showBr }\">\r\n\t\t\t\tM\u00E1rgenes (cm)\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Arriba</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Arriba\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginRight\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Derecha</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Derecha\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginBottom\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Abajo</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Abajo\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginLeft\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Izquierda</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Izquierda\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div\r\n\t\t\t\tclass=\"col-md-12\"\r\n\t\t\t\t*ngIf=\"showHeaderFooterHeight\"\r\n\t\t\t\t[ngClass]=\"{ 'top-space': showBr }\"\r\n\t\t\t>\r\n\t\t\t\tAlturas (cm)\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showHeaderFooterHeight\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Cabecera</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Cabecera\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showHeaderFooterHeight\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Pie de p\u00E1gina</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Pie de p\u00E1g\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12 margin-top\" *ngIf=\"showTokens\">\r\n\t\t\t\t<pli-configuration-token\r\n\t\t\t\t\t[promCodigo]=\"promCodigo\"\r\n\t\t\t\t\t[showFrm]=\"showFrm\"\r\n\t\t\t\t\t[showStatic]=\"showStatic\"\r\n\t\t\t\t\t[showBudget]=\"showBudget\"\r\n\t\t\t\t\t[showCalculated]=\"showCalculated\"\r\n\t\t\t\t\t[showCalculatedForm]=\"showCalculatedForm\"\r\n\t\t\t\t\t[showSnapshotForm]=\"showSnapshotForm\"\r\n\t\t\t\t\t[showSnapshot]=\"showSnapshot\"\r\n\t\t\t\t></pli-configuration-token>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"col-md-9\">\r\n\t\t<div class=\"row\">\r\n\t\t\t<div class=\"col-md-12\" *ngIf=\"showHeader\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"header\" class=\"form-control-label\">Encabezado</label>\r\n\t\t\t\t\t<editor [(ngModel)]=\"pdfConfig.header\" [init]=\"options\"></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"row margin-top\" *ngIf=\"showTemplate\">\r\n\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"template\" class=\"form-control-label\">Cuerpo</label>\r\n\t\t\t\t\t<editor [(ngModel)]=\"pdfConfig.template\" [init]=\"options\"></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"row margin-top\" *ngIf=\"showFooter\">\r\n\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"footer\" class=\"form-control-label\">Pie de p\u00E1gina</label>\r\n\t\t\t\t\t<editor [(ngModel)]=\"pdfConfig.footer\" [init]=\"options\"></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n", styles: [".top-space{margin-top:12px}.check-space{margin-right:5px}\n"] }]
|
|
4820
4300
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: CommonService }, { type: ConfigurationDocumentService }]; }, propDecorators: { promCodigo: [{
|
|
4821
4301
|
type: Input
|
|
4822
4302
|
}], showFormula: [{
|
|
@@ -5702,7 +5182,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
|
|
|
5702
5182
|
}] }, { type: i1$2.AngularFireAuth }, { type: i2$2.AngularFireStorage }, { type: i1.HttpClient }]; } });
|
|
5703
5183
|
|
|
5704
5184
|
const PDFJS$1 = PDFJS_;
|
|
5705
|
-
|
|
5185
|
+
const panzoom$1 = panzoom_;
|
|
5706
5186
|
class PdfVisualizerComponent {
|
|
5707
5187
|
constructor(commonService, sanitization, taostrService, fileService) {
|
|
5708
5188
|
this.commonService = commonService;
|
|
@@ -5788,16 +5268,15 @@ class PdfVisualizerComponent {
|
|
|
5788
5268
|
showBase64Pdf(result) {
|
|
5789
5269
|
this.base64 = result.base64;
|
|
5790
5270
|
var data = atob(this.base64);
|
|
5791
|
-
PDFJS$1.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.
|
|
5271
|
+
PDFJS$1.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.228/pdf.worker.js';
|
|
5792
5272
|
if (PDFJS$1.GlobalWorkerOptions)
|
|
5793
5273
|
PDFJS$1.GlobalWorkerOptions.workerSrc =
|
|
5794
|
-
'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.
|
|
5795
|
-
// create instance of PdfDocument with the id of canvas
|
|
5274
|
+
'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.228/pdf.worker.js';
|
|
5796
5275
|
// create instance of PdfDocument with the id of canvas
|
|
5797
5276
|
this.pdfDocument = new PdfDocument(this.id_canvas);
|
|
5798
5277
|
// assign variables out of scope
|
|
5799
5278
|
let pdfdocument = this.pdfDocument;
|
|
5800
|
-
|
|
5279
|
+
panzoom$1(this.pdfDocument.canvas, {
|
|
5801
5280
|
smoothScroll: false
|
|
5802
5281
|
});
|
|
5803
5282
|
let self = this;
|
|
@@ -5844,8 +5323,7 @@ class PdfVisualizerComponent {
|
|
|
5844
5323
|
let self = this;
|
|
5845
5324
|
// Using promise to fetch the page
|
|
5846
5325
|
this.pdfDocument.pdfDoc.getPage(num).then(function (page) {
|
|
5847
|
-
var
|
|
5848
|
-
var viewport = page.getViewport({ scale: scale });
|
|
5326
|
+
var viewport = page.getViewport(selfPdfDocument.scale);
|
|
5849
5327
|
selfPdfDocument.canvas.height = viewport.height;
|
|
5850
5328
|
selfPdfDocument.canvas.width = viewport.width;
|
|
5851
5329
|
// Render PDF page into canvas context
|
|
@@ -6078,7 +5556,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
|
|
|
6078
5556
|
}] } });
|
|
6079
5557
|
|
|
6080
5558
|
const PDFJS = PDFJS_;
|
|
6081
|
-
const panzoom =
|
|
5559
|
+
const panzoom = panzoom_;
|
|
6082
5560
|
/** Pdf visualizer Refactor - TODO improve logic and check the edit functionality */
|
|
6083
5561
|
class PdfMergeVisualizerComponent {
|
|
6084
5562
|
constructor(commonService, taostrService, sanitization) {
|
|
@@ -10111,118 +9589,637 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
|
|
|
10111
9589
|
args: ['environment']
|
|
10112
9590
|
}] }, { type: i1.HttpClient }]; } });
|
|
10113
9591
|
|
|
10114
|
-
class SegmentationUserService {
|
|
10115
|
-
constructor(environment, httpClient) {
|
|
10116
|
-
this.environment = environment;
|
|
10117
|
-
this.httpClient = httpClient;
|
|
10118
|
-
this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
9592
|
+
class SegmentationUserService {
|
|
9593
|
+
constructor(environment, httpClient) {
|
|
9594
|
+
this.environment = environment;
|
|
9595
|
+
this.httpClient = httpClient;
|
|
9596
|
+
this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
9597
|
+
}
|
|
9598
|
+
getSegmentationByUserTopFive(username, type) {
|
|
9599
|
+
return this.httpClient.get(this.environment.host.backend.segmentation +
|
|
9600
|
+
'PlicSegmentationUserController/getSegmentationByUserTopFive', { params: new HttpParams().set('username', username).set('type', type.toString()) });
|
|
9601
|
+
}
|
|
9602
|
+
updatePositionSegmentation(lSegmentationUser) {
|
|
9603
|
+
return this.httpClient.post(this.environment.host.backend.segmentation +
|
|
9604
|
+
'PlicSegmentationUserController/updatePositionSegmentation', lSegmentationUser, this.headerJson);
|
|
9605
|
+
}
|
|
9606
|
+
saveAllSegmentation(lSegmentationUser) {
|
|
9607
|
+
return this.httpClient.post(this.environment.host.backend.segmentation +
|
|
9608
|
+
'PlicSegmentationUserController/saveAllSegmentation', lSegmentationUser, this.headerJson);
|
|
9609
|
+
}
|
|
9610
|
+
/** It deletes a search object by id */
|
|
9611
|
+
deleteSegmentation(id) {
|
|
9612
|
+
return this.httpClient.delete(this.environment.host.backend.segmentation +
|
|
9613
|
+
'PlicSegmentationUserController/deleteSegmentation', { params: new HttpParams().set('id', id) });
|
|
9614
|
+
}
|
|
9615
|
+
changeTopFiveSegmentation(username, type) {
|
|
9616
|
+
return this.httpClient.get(this.environment.host.backend.segmentation +
|
|
9617
|
+
'PlicSegmentationUserController/changeTopFiveSegmentation', { params: new HttpParams().set('username', username).set('type', type.toString()) });
|
|
9618
|
+
}
|
|
9619
|
+
showEllipsisSegmentationByUser(username, type) {
|
|
9620
|
+
return this.httpClient.get(this.environment.host.backend.segmentation +
|
|
9621
|
+
'PlicSegmentationUserController/showEllipsisSegmentationByUser', { params: new HttpParams().set('username', username).set('type', type.toString()) });
|
|
9622
|
+
}
|
|
9623
|
+
getSegmentationGreaterThanPosition(username, type, position) {
|
|
9624
|
+
return this.httpClient.get(this.environment.host.backend.segmentation +
|
|
9625
|
+
'PlicSegmentationUserController/getSegmentationGreaterThanPosition', {
|
|
9626
|
+
params: new HttpParams()
|
|
9627
|
+
.set('username', username)
|
|
9628
|
+
.set('type', type.toString())
|
|
9629
|
+
.set('position', position.toString())
|
|
9630
|
+
});
|
|
9631
|
+
}
|
|
9632
|
+
getSegmentationByIdOrderByName(username, type) {
|
|
9633
|
+
return this.httpClient.get(this.environment.host.backend.segmentation +
|
|
9634
|
+
'PlicSegmentationUserController/getSegmentationByIdOrderByName', { params: new HttpParams().set('username', username).set('type', type.toString()) });
|
|
9635
|
+
}
|
|
9636
|
+
getSegmentationById(segmentationId) {
|
|
9637
|
+
return this.httpClient.get(this.environment.host.backend.segmentation +
|
|
9638
|
+
'PlicSegmentationUserController/getSegmentationById', { params: new HttpParams().set('segmentationId', segmentationId) });
|
|
9639
|
+
}
|
|
9640
|
+
getAllSegmentationByLoginAndType(username, type) {
|
|
9641
|
+
return this.httpClient.get(this.environment.host.backend.segmentation +
|
|
9642
|
+
'PlicSegmentationUserController/getAllSegmentationByLoginAndType', { params: new HttpParams().set('username', username).set('type', type.toString()) });
|
|
9643
|
+
}
|
|
9644
|
+
getPublicSegmentation(lastNHours, type) {
|
|
9645
|
+
return this.httpClient.get(this.environment.host.backend.segmentation +
|
|
9646
|
+
'PlicSegmentationUserController/getPublicSegmentation', {
|
|
9647
|
+
params: new HttpParams()
|
|
9648
|
+
.set('lastNHours', lastNHours.toString())
|
|
9649
|
+
.set('type', type.toString())
|
|
9650
|
+
});
|
|
9651
|
+
}
|
|
9652
|
+
getSegColumn() {
|
|
9653
|
+
return this.httpClient.get(this.environment.host.backend.segmentation +
|
|
9654
|
+
'PlicSegmentationUserController/getSegColumn', { params: new HttpParams() });
|
|
9655
|
+
}
|
|
9656
|
+
getSegmentationByName(username, type, name) {
|
|
9657
|
+
return this.httpClient.get(this.environment.host.backend.segmentation +
|
|
9658
|
+
'PlicSegmentationUserController/getSegmentationByName', {
|
|
9659
|
+
params: new HttpParams()
|
|
9660
|
+
.set('username', username)
|
|
9661
|
+
.set('type', type.toString())
|
|
9662
|
+
.set('name', name)
|
|
9663
|
+
});
|
|
9664
|
+
}
|
|
9665
|
+
}
|
|
9666
|
+
SegmentationUserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationUserService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9667
|
+
SegmentationUserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationUserService, providedIn: 'root' });
|
|
9668
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationUserService, decorators: [{
|
|
9669
|
+
type: Injectable,
|
|
9670
|
+
args: [{
|
|
9671
|
+
providedIn: 'root'
|
|
9672
|
+
}]
|
|
9673
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
9674
|
+
type: Inject,
|
|
9675
|
+
args: ['environment']
|
|
9676
|
+
}] }, { type: i1.HttpClient }]; } });
|
|
9677
|
+
|
|
9678
|
+
class SegmentationService {
|
|
9679
|
+
constructor(environment, httpClient) {
|
|
9680
|
+
this.environment = environment;
|
|
9681
|
+
this.httpClient = httpClient;
|
|
9682
|
+
this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
9683
|
+
}
|
|
9684
|
+
/** It send the email */
|
|
9685
|
+
send(segmentation) {
|
|
9686
|
+
return this.httpClient.post(this.environment.host.backend.queue + 'segmentation/send', segmentation, this.headerJson);
|
|
9687
|
+
}
|
|
9688
|
+
/** It send the email */
|
|
9689
|
+
sendMultiple(listSegmentation) {
|
|
9690
|
+
return this.httpClient.post(this.environment.host.backend.queue + 'segmentation/sendMassive', listSegmentation, this.headerJson);
|
|
9691
|
+
}
|
|
9692
|
+
}
|
|
9693
|
+
SegmentationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9694
|
+
SegmentationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationService, providedIn: 'root' });
|
|
9695
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationService, decorators: [{
|
|
9696
|
+
type: Injectable,
|
|
9697
|
+
args: [{
|
|
9698
|
+
providedIn: 'root'
|
|
9699
|
+
}]
|
|
9700
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
9701
|
+
type: Inject,
|
|
9702
|
+
args: ['environment']
|
|
9703
|
+
}] }, { type: i1.HttpClient }]; } });
|
|
9704
|
+
|
|
9705
|
+
// import * as utils_ from 'formiojs-proyectoscolfuturo/utils/utils';
|
|
9706
|
+
const utils = utils_;
|
|
9707
|
+
class FormioUtil {
|
|
9708
|
+
/**
|
|
9709
|
+
* It returns the components formated by panel
|
|
9710
|
+
* @param components
|
|
9711
|
+
* @return the object is [{panel: , items: [{ value: , label: }]}]
|
|
9712
|
+
*/
|
|
9713
|
+
static getFormattedComponentsByPanel(components) {
|
|
9714
|
+
let result = [];
|
|
9715
|
+
if (components) {
|
|
9716
|
+
let group = null;
|
|
9717
|
+
let object = null;
|
|
9718
|
+
for (const component of components) {
|
|
9719
|
+
if (component[EFormioKey.TITLE_PANEL] !== group) {
|
|
9720
|
+
if (group !== null) {
|
|
9721
|
+
result.push(object);
|
|
9722
|
+
}
|
|
9723
|
+
object = { label: component[EFormioKey.TITLE_PANEL], items: [], toggle: false };
|
|
9724
|
+
group = component[EFormioKey.TITLE_PANEL];
|
|
9725
|
+
}
|
|
9726
|
+
object.items.push({
|
|
9727
|
+
label: component[EFormioKey.LABEL],
|
|
9728
|
+
value: component[EFormioKey.KEY]
|
|
9729
|
+
});
|
|
9730
|
+
}
|
|
9731
|
+
if (group !== null)
|
|
9732
|
+
result.push(object);
|
|
9733
|
+
}
|
|
9734
|
+
return result;
|
|
10119
9735
|
}
|
|
10120
|
-
|
|
10121
|
-
|
|
10122
|
-
|
|
9736
|
+
/**
|
|
9737
|
+
* It returns the components are required according with data
|
|
9738
|
+
* @param components array of components
|
|
9739
|
+
* @param data
|
|
9740
|
+
*/
|
|
9741
|
+
static getRequiredComponentsByData(components, data) {
|
|
9742
|
+
// get the required components
|
|
9743
|
+
let array = FormioUtil.getRequiredComponents(components);
|
|
9744
|
+
// if not data then return components
|
|
9745
|
+
if (data && array) {
|
|
9746
|
+
for (let i = 0; i < array.length; i++) {
|
|
9747
|
+
const component = array[i];
|
|
9748
|
+
// use formio to check condition according with data
|
|
9749
|
+
if (utils.checkCondition(component, null, data, null, null)) {
|
|
9750
|
+
const key = component[EFormioKey.KEY];
|
|
9751
|
+
if (data[key] != undefined && data[key] != null && data[key] != '') {
|
|
9752
|
+
// remove item from array
|
|
9753
|
+
array.splice(i, 1);
|
|
9754
|
+
i--;
|
|
9755
|
+
}
|
|
9756
|
+
else {
|
|
9757
|
+
if (component.customConditional &&
|
|
9758
|
+
component.customConditional.includes('show')) {
|
|
9759
|
+
// remove item from array
|
|
9760
|
+
array.splice(i, 1);
|
|
9761
|
+
i--;
|
|
9762
|
+
}
|
|
9763
|
+
}
|
|
9764
|
+
}
|
|
9765
|
+
else {
|
|
9766
|
+
// remove item from array
|
|
9767
|
+
array.splice(i, 1);
|
|
9768
|
+
i--;
|
|
9769
|
+
}
|
|
9770
|
+
}
|
|
9771
|
+
}
|
|
9772
|
+
return array;
|
|
10123
9773
|
}
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
9774
|
+
/**
|
|
9775
|
+
* It returns the components that are required
|
|
9776
|
+
* @param components array of components
|
|
9777
|
+
*/
|
|
9778
|
+
static getUniqueComponents(components) {
|
|
9779
|
+
return FormioUtil.getComponentsByFeature(components, [EFormioKey.UNIQUE], true);
|
|
10127
9780
|
}
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
9781
|
+
/**
|
|
9782
|
+
* It returns the components that are required
|
|
9783
|
+
* @param components array of components
|
|
9784
|
+
*/
|
|
9785
|
+
static getRequiredComponents(components) {
|
|
9786
|
+
return FormioUtil.getComponentsByFeature(components, [EFormioKey.VALIDATE, EFormioKey.REQUIRED], true);
|
|
10131
9787
|
}
|
|
10132
|
-
/**
|
|
10133
|
-
|
|
10134
|
-
|
|
10135
|
-
|
|
9788
|
+
/**
|
|
9789
|
+
* It returns the components that have a specific feature defined by properties and value
|
|
9790
|
+
* @param components array of components
|
|
9791
|
+
* @param properties path of properties example [validate, required] or [unique]
|
|
9792
|
+
* @param value the value that should have the property
|
|
9793
|
+
*/
|
|
9794
|
+
static getComponentsByFeature(components, properties, value) {
|
|
9795
|
+
let result = [];
|
|
9796
|
+
if (properties && properties.length > 0) {
|
|
9797
|
+
// get components
|
|
9798
|
+
const fields = FormioUtil.getComponents(components);
|
|
9799
|
+
// get first and last property
|
|
9800
|
+
const firstProperty = properties[0];
|
|
9801
|
+
const lastProperty = properties[properties.length - 1];
|
|
9802
|
+
if (fields) {
|
|
9803
|
+
// iterate the fields
|
|
9804
|
+
for (let i = 0; i < fields.length; i++) {
|
|
9805
|
+
// it contains the entire object field
|
|
9806
|
+
const field = fields[i];
|
|
9807
|
+
// it contains the current component and it is gonna be the component of every property
|
|
9808
|
+
let component = field;
|
|
9809
|
+
if (field[firstProperty]) {
|
|
9810
|
+
for (let j = 0; j < properties.length; j++) {
|
|
9811
|
+
const property = properties[j];
|
|
9812
|
+
// if component.property doesnt exist then break
|
|
9813
|
+
if (!component[property])
|
|
9814
|
+
break;
|
|
9815
|
+
if (property === lastProperty) {
|
|
9816
|
+
// it is the last property so if the value is equals to component.lastproperty then it is added to result
|
|
9817
|
+
if (component[property] == value)
|
|
9818
|
+
result.push(field);
|
|
9819
|
+
}
|
|
9820
|
+
else {
|
|
9821
|
+
// otherwise component will be equal to the component.property
|
|
9822
|
+
component = component[property];
|
|
9823
|
+
}
|
|
9824
|
+
}
|
|
9825
|
+
}
|
|
9826
|
+
}
|
|
9827
|
+
}
|
|
9828
|
+
}
|
|
9829
|
+
return result;
|
|
10136
9830
|
}
|
|
10137
|
-
|
|
10138
|
-
|
|
10139
|
-
|
|
9831
|
+
/**
|
|
9832
|
+
* It returns the components
|
|
9833
|
+
* @param components
|
|
9834
|
+
*/
|
|
9835
|
+
static getComponents(components) {
|
|
9836
|
+
return FormioUtil.getComponentsByRecursion(components, '', null);
|
|
10140
9837
|
}
|
|
10141
|
-
|
|
10142
|
-
|
|
10143
|
-
|
|
9838
|
+
/**
|
|
9839
|
+
* It returns the components array of the form by recursion
|
|
9840
|
+
* @param components array of components
|
|
9841
|
+
* @param titlePanel name of parent panel, so children components will inherit the panelName
|
|
9842
|
+
* @param conditionalObject conditional object it will be inherited from panel {conditional: { eq: , value: , when: , json: }, customConditional: }
|
|
9843
|
+
*/
|
|
9844
|
+
static getComponentsByRecursion(components, titlePanel, conditionalParent) {
|
|
9845
|
+
// it contains the result array
|
|
9846
|
+
let result = [];
|
|
9847
|
+
if (components) {
|
|
9848
|
+
// iterate over components
|
|
9849
|
+
for (const component of components) {
|
|
9850
|
+
// avoid the editgrid component ot if it has a different behavior it should have an else statement
|
|
9851
|
+
if (component[EFormioKey.TYPE] !== EFormioKey.EDITGRID) {
|
|
9852
|
+
// if component is panel then titlePanel variable is changed, and it is gonna be inherited
|
|
9853
|
+
if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
|
|
9854
|
+
titlePanel = component[EFormioKey.TITLE];
|
|
9855
|
+
}
|
|
9856
|
+
if (typeof component[EFormioKey.COMPONENTS] !== 'undefined' ||
|
|
9857
|
+
typeof component[EFormioKey.COLUMNS] !== 'undefined') {
|
|
9858
|
+
// resolve conditional parent conditional
|
|
9859
|
+
const conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
|
|
9860
|
+
// change condition
|
|
9861
|
+
if (conditional)
|
|
9862
|
+
conditionalParent = conditional;
|
|
9863
|
+
// it contains the subcomponents depending on the value of component if it has components or columns
|
|
9864
|
+
let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
|
|
9865
|
+
? component[EFormioKey.COMPONENTS]
|
|
9866
|
+
: component[EFormioKey.COLUMNS];
|
|
9867
|
+
// if component has subComponents, then execute the recursion function to get the recursionnResult
|
|
9868
|
+
const recursionResult = FormioUtil.getComponentsByRecursion(subComponents, titlePanel, conditionalParent);
|
|
9869
|
+
// if recursion result then result concats the recursionResult
|
|
9870
|
+
if (recursionResult)
|
|
9871
|
+
result = result.concat(recursionResult);
|
|
9872
|
+
// reset conditional Parent
|
|
9873
|
+
if (component[EFormioKey.ID] == conditionalParent.id)
|
|
9874
|
+
conditionalParent = undefined;
|
|
9875
|
+
}
|
|
9876
|
+
else {
|
|
9877
|
+
// avoid the component type button
|
|
9878
|
+
if (component[EFormioKey.TYPE] !== EFormioKey.BUTTON &&
|
|
9879
|
+
component[EFormioKey.KEY] &&
|
|
9880
|
+
component[EFormioKey.LABEL]) {
|
|
9881
|
+
// resolve conditional conditional object
|
|
9882
|
+
let conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
|
|
9883
|
+
if (!conditional)
|
|
9884
|
+
conditional = conditionalParent;
|
|
9885
|
+
component[EFormioKey.CONDITIONAL] = conditional[EFormioKey.CONDITIONAL];
|
|
9886
|
+
component[EFormioKey.CUSTOM_CONDITIONAL] =
|
|
9887
|
+
conditional[EFormioKey.CUSTOM_CONDITIONAL];
|
|
9888
|
+
// add namPanel as property
|
|
9889
|
+
component[EFormioKey.TITLE_PANEL] = titlePanel;
|
|
9890
|
+
// add component to the result
|
|
9891
|
+
result.push(component);
|
|
9892
|
+
}
|
|
9893
|
+
}
|
|
9894
|
+
}
|
|
9895
|
+
}
|
|
9896
|
+
}
|
|
9897
|
+
return result;
|
|
10144
9898
|
}
|
|
10145
|
-
|
|
10146
|
-
|
|
10147
|
-
|
|
10148
|
-
|
|
10149
|
-
|
|
10150
|
-
|
|
10151
|
-
|
|
10152
|
-
});
|
|
9899
|
+
/**
|
|
9900
|
+
* It returns the components
|
|
9901
|
+
* @param components
|
|
9902
|
+
* @param keepEditGrids
|
|
9903
|
+
*/
|
|
9904
|
+
static getComponentsWithEditGrids(components) {
|
|
9905
|
+
return FormioUtil.getComponentsByRecursionWithEditGrids(components, '', null);
|
|
10153
9906
|
}
|
|
10154
|
-
|
|
10155
|
-
|
|
10156
|
-
|
|
9907
|
+
/**
|
|
9908
|
+
* It returns the components array of the form by recursion
|
|
9909
|
+
* @param components array of components
|
|
9910
|
+
* @param titlePanel name of parent panel, so children components will inherit the panelName
|
|
9911
|
+
* @param conditionalObject conditional object it will be inherited from panel {conditional: { eq: , value: , when: , json: }, customConditional: }
|
|
9912
|
+
*/
|
|
9913
|
+
static getComponentsByRecursionWithEditGrids(components, titlePanel, conditionalParent) {
|
|
9914
|
+
// it contains the result array
|
|
9915
|
+
let result = [];
|
|
9916
|
+
if (components) {
|
|
9917
|
+
// iterate over components
|
|
9918
|
+
for (const component of components) {
|
|
9919
|
+
// avoid the editgrid component ot if it has a different behavior it should have an else statement
|
|
9920
|
+
// if component is panel then titlePanel variable is changed, and it is gonna be inherited
|
|
9921
|
+
if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
|
|
9922
|
+
titlePanel = component[EFormioKey.TITLE];
|
|
9923
|
+
}
|
|
9924
|
+
if (typeof component[EFormioKey.COMPONENTS] !== 'undefined' ||
|
|
9925
|
+
typeof component[EFormioKey.COLUMNS] !== 'undefined') {
|
|
9926
|
+
// resolve conditional parent conditional
|
|
9927
|
+
const conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
|
|
9928
|
+
// change condition
|
|
9929
|
+
if (conditional)
|
|
9930
|
+
conditionalParent = conditional;
|
|
9931
|
+
// it contains the subcomponents depending on the value of component if it has components or columns
|
|
9932
|
+
let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
|
|
9933
|
+
? component[EFormioKey.COMPONENTS]
|
|
9934
|
+
: component[EFormioKey.COLUMNS];
|
|
9935
|
+
if (component[EFormioKey.TYPE] === EFormioKey.EDITGRID) {
|
|
9936
|
+
component[EFormioKey.TITLE_PANEL] = titlePanel;
|
|
9937
|
+
result.push(component);
|
|
9938
|
+
}
|
|
9939
|
+
// if component has subComponents, then execute the recursion function to get the recursionnResult
|
|
9940
|
+
const recursionResult = FormioUtil.getComponentsByRecursionWithEditGrids(subComponents, titlePanel, conditionalParent);
|
|
9941
|
+
// if recursion result then result concats the recursionResult
|
|
9942
|
+
if (recursionResult)
|
|
9943
|
+
result = result.concat(recursionResult);
|
|
9944
|
+
// reset conditional Parent
|
|
9945
|
+
if (component[EFormioKey.ID] == conditionalParent.id)
|
|
9946
|
+
conditionalParent = undefined;
|
|
9947
|
+
}
|
|
9948
|
+
else {
|
|
9949
|
+
// avoid the component type button
|
|
9950
|
+
if (component[EFormioKey.TYPE] !== EFormioKey.BUTTON &&
|
|
9951
|
+
component[EFormioKey.KEY] &&
|
|
9952
|
+
component[EFormioKey.LABEL]) {
|
|
9953
|
+
// resolve conditional conditional object
|
|
9954
|
+
let conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
|
|
9955
|
+
if (!conditional)
|
|
9956
|
+
conditional = conditionalParent;
|
|
9957
|
+
component[EFormioKey.CONDITIONAL] = conditional[EFormioKey.CONDITIONAL];
|
|
9958
|
+
component[EFormioKey.CUSTOM_CONDITIONAL] =
|
|
9959
|
+
conditional[EFormioKey.CUSTOM_CONDITIONAL];
|
|
9960
|
+
// add namPanel as property
|
|
9961
|
+
component[EFormioKey.TITLE_PANEL] = titlePanel;
|
|
9962
|
+
// add component to the result
|
|
9963
|
+
result.push(component);
|
|
9964
|
+
}
|
|
9965
|
+
}
|
|
9966
|
+
}
|
|
9967
|
+
}
|
|
9968
|
+
return result;
|
|
10157
9969
|
}
|
|
10158
|
-
|
|
10159
|
-
|
|
10160
|
-
|
|
9970
|
+
/**
|
|
9971
|
+
* It resolve the inheritance conditional
|
|
9972
|
+
* @param conditionalObject
|
|
9973
|
+
* @param conditional
|
|
9974
|
+
* @param customConditional
|
|
9975
|
+
*/
|
|
9976
|
+
static resolveInheritanceConditional(conditionalObject, conditional, customConditional, parentId) {
|
|
9977
|
+
// validate if there is a condition with the new fields
|
|
9978
|
+
if (!conditionalObject ||
|
|
9979
|
+
customConditional ||
|
|
9980
|
+
(conditional && conditional[EFormioKey.WHEN] && conditional[EFormioKey.EQ]) ||
|
|
9981
|
+
(conditional && conditional[EFormioKey.JSON])) {
|
|
9982
|
+
return { conditional: conditional, customConditional: customConditional, id: parentId };
|
|
9983
|
+
}
|
|
9984
|
+
return null;
|
|
10161
9985
|
}
|
|
10162
|
-
|
|
10163
|
-
|
|
10164
|
-
|
|
9986
|
+
/**
|
|
9987
|
+
* It returns the edit grid components
|
|
9988
|
+
* @param components
|
|
9989
|
+
*/
|
|
9990
|
+
static getEditGridKeyLabels(components) {
|
|
9991
|
+
return FormioUtil.getEditGridKeyLabelsByRecursion(components, '', null);
|
|
10165
9992
|
}
|
|
10166
|
-
|
|
10167
|
-
|
|
10168
|
-
|
|
10169
|
-
|
|
10170
|
-
|
|
10171
|
-
|
|
10172
|
-
|
|
9993
|
+
/**
|
|
9994
|
+
* It returns the components edit grid array of the form by recursion
|
|
9995
|
+
* @param components array of components
|
|
9996
|
+
* @param titlePanel name of parent panel, so children components will inherit the panelName
|
|
9997
|
+
* @param conditionalObject conditional object it will be inherited from panel {conditional: { eq: , value: , when: , json: }, customConditional: }
|
|
9998
|
+
*/
|
|
9999
|
+
static getEditGridKeyLabelsByRecursion(components, titlePanel, conditionalParent) {
|
|
10000
|
+
// it contains the result array
|
|
10001
|
+
let result = [];
|
|
10002
|
+
if (components) {
|
|
10003
|
+
// iterate over components
|
|
10004
|
+
for (const component of components) {
|
|
10005
|
+
// if component is panel then titlePanel variable is changed, and it is gonna be inherited
|
|
10006
|
+
if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
|
|
10007
|
+
titlePanel = component[EFormioKey.TITLE];
|
|
10008
|
+
}
|
|
10009
|
+
if (typeof component[EFormioKey.COMPONENTS] !== 'undefined' ||
|
|
10010
|
+
typeof component[EFormioKey.COLUMNS] !== 'undefined') {
|
|
10011
|
+
// resolve conditional parent conditional
|
|
10012
|
+
const conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
|
|
10013
|
+
// change condition
|
|
10014
|
+
if (conditional)
|
|
10015
|
+
conditionalParent = conditional;
|
|
10016
|
+
// it contains the subcomponents depending on the value of component if it has components or columns
|
|
10017
|
+
let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
|
|
10018
|
+
? component[EFormioKey.COMPONENTS]
|
|
10019
|
+
: component[EFormioKey.COLUMNS];
|
|
10020
|
+
if (component[EFormioKey.TYPE] == EFormioKey.EDITGRID) {
|
|
10021
|
+
// add namPanel as property
|
|
10022
|
+
component[EFormioKey.TITLE_PANEL] = titlePanel;
|
|
10023
|
+
// add component to the result
|
|
10024
|
+
result.push(component);
|
|
10025
|
+
}
|
|
10026
|
+
else {
|
|
10027
|
+
// if component has subComponents, then execute the recursion function to get the recursionnResult
|
|
10028
|
+
const recursionResult = FormioUtil.getEditGridKeyLabelsByRecursion(subComponents, titlePanel, conditionalParent);
|
|
10029
|
+
// if recursion result then result concats the recursionResult
|
|
10030
|
+
if (recursionResult)
|
|
10031
|
+
result = result.concat(recursionResult);
|
|
10032
|
+
// reset conditional Parent
|
|
10033
|
+
if (component[EFormioKey.ID] == conditionalParent.id)
|
|
10034
|
+
conditionalParent = undefined;
|
|
10035
|
+
}
|
|
10036
|
+
}
|
|
10037
|
+
else {
|
|
10038
|
+
}
|
|
10039
|
+
}
|
|
10040
|
+
}
|
|
10041
|
+
return result;
|
|
10173
10042
|
}
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
-
|
|
10043
|
+
/**
|
|
10044
|
+
* It returns the components
|
|
10045
|
+
* @param components
|
|
10046
|
+
* @param keepEditGrids
|
|
10047
|
+
*/
|
|
10048
|
+
static getComponentsIntoEditGrids(components, editGridName) {
|
|
10049
|
+
return FormioUtil.getComponentsByRecursionIntoEditGrids(components, '', null, editGridName, false);
|
|
10177
10050
|
}
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10181
|
-
|
|
10182
|
-
|
|
10183
|
-
|
|
10184
|
-
|
|
10185
|
-
|
|
10051
|
+
/**
|
|
10052
|
+
* It returns the components array of the form by recursion
|
|
10053
|
+
* @param components array of components
|
|
10054
|
+
* @param titlePanel name of parent panel, so children components will inherit the panelName
|
|
10055
|
+
* @param conditionalObject conditional object it will be inherited from panel {conditional: { eq: , value: , when: , json: }, customConditional: }
|
|
10056
|
+
*/
|
|
10057
|
+
static getComponentsByRecursionIntoEditGrids(components, titlePanel, conditionalParent, editGridName, existEditGrid) {
|
|
10058
|
+
// it contains the result array
|
|
10059
|
+
let result = [];
|
|
10060
|
+
if (components) {
|
|
10061
|
+
// iterate over components
|
|
10062
|
+
for (const component of components) {
|
|
10063
|
+
// avoid the editgrid component ot if it has a different behavior it should have an else statement
|
|
10064
|
+
// if component is panel then titlePanel variable is changed, and it is gonna be inherited
|
|
10065
|
+
if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
|
|
10066
|
+
titlePanel = component[EFormioKey.TITLE];
|
|
10067
|
+
}
|
|
10068
|
+
if (typeof component[EFormioKey.COMPONENTS] !== 'undefined' ||
|
|
10069
|
+
typeof component[EFormioKey.COLUMNS] !== 'undefined') {
|
|
10070
|
+
// resolve conditional parent conditional
|
|
10071
|
+
const conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
|
|
10072
|
+
// change condition
|
|
10073
|
+
if (conditional)
|
|
10074
|
+
conditionalParent = conditional;
|
|
10075
|
+
// it contains the subcomponents depending on the value of component if it has components or columns
|
|
10076
|
+
let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
|
|
10077
|
+
? component[EFormioKey.COMPONENTS]
|
|
10078
|
+
: component[EFormioKey.COLUMNS];
|
|
10079
|
+
if (component[EFormioKey.TYPE] === EFormioKey.EDITGRID &&
|
|
10080
|
+
component['key'] == editGridName) {
|
|
10081
|
+
existEditGrid = true;
|
|
10082
|
+
if (typeof component[EFormioKey.COMPONENTS] !== 'undefined' ||
|
|
10083
|
+
typeof component[EFormioKey.COLUMNS] !== 'undefined') {
|
|
10084
|
+
// resolve conditional parent conditional
|
|
10085
|
+
const conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
|
|
10086
|
+
// change condition
|
|
10087
|
+
if (conditional)
|
|
10088
|
+
conditionalParent = conditional;
|
|
10089
|
+
// it contains the subcomponents depending on the value of component if it has components or columns
|
|
10090
|
+
let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
|
|
10091
|
+
? component[EFormioKey.COMPONENTS]
|
|
10092
|
+
: component[EFormioKey.COLUMNS];
|
|
10093
|
+
// if component has subComponents, then execute the recursion function to get the recursionnResult
|
|
10094
|
+
const recursionResult = FormioUtil.getComponentsByRecursionIntoEditGrids(subComponents, titlePanel, conditionalParent, editGridName, existEditGrid);
|
|
10095
|
+
// if recursion result then result concats the recursionResult
|
|
10096
|
+
if (recursionResult)
|
|
10097
|
+
result = result.concat(recursionResult);
|
|
10098
|
+
// reset conditional Parent
|
|
10099
|
+
if (component && conditionalParent) {
|
|
10100
|
+
if (component[EFormioKey.ID] == conditionalParent.id)
|
|
10101
|
+
conditionalParent = undefined;
|
|
10102
|
+
}
|
|
10103
|
+
}
|
|
10104
|
+
else {
|
|
10105
|
+
// avoid the component type button
|
|
10106
|
+
if (component[EFormioKey.TYPE] !== EFormioKey.BUTTON &&
|
|
10107
|
+
component[EFormioKey.KEY] &&
|
|
10108
|
+
component[EFormioKey.LABEL] &&
|
|
10109
|
+
existEditGrid) {
|
|
10110
|
+
// resolve conditional conditional object
|
|
10111
|
+
let conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
|
|
10112
|
+
if (!conditional)
|
|
10113
|
+
conditional = conditionalParent;
|
|
10114
|
+
component[EFormioKey.CONDITIONAL] =
|
|
10115
|
+
conditional[EFormioKey.CONDITIONAL];
|
|
10116
|
+
component[EFormioKey.CUSTOM_CONDITIONAL] =
|
|
10117
|
+
conditional[EFormioKey.CUSTOM_CONDITIONAL];
|
|
10118
|
+
// add namPanel as property
|
|
10119
|
+
component[EFormioKey.TITLE_PANEL] = titlePanel;
|
|
10120
|
+
// add component to the result
|
|
10121
|
+
result.push(component);
|
|
10122
|
+
}
|
|
10123
|
+
}
|
|
10124
|
+
}
|
|
10125
|
+
// if component has subComponents, then execute the recursion function to get the recursionnResult
|
|
10126
|
+
const recursionResult = FormioUtil.getComponentsByRecursionIntoEditGrids(subComponents, titlePanel, conditionalParent, editGridName, existEditGrid);
|
|
10127
|
+
// if recursion result then result concats the recursionResult
|
|
10128
|
+
if (recursionResult)
|
|
10129
|
+
result = result.concat(recursionResult);
|
|
10130
|
+
// reset conditional Parent
|
|
10131
|
+
if (component && conditionalParent) {
|
|
10132
|
+
if (component[EFormioKey.ID] == conditionalParent.id)
|
|
10133
|
+
conditionalParent = undefined;
|
|
10134
|
+
}
|
|
10135
|
+
}
|
|
10136
|
+
else {
|
|
10137
|
+
// avoid the component type button
|
|
10138
|
+
if (component[EFormioKey.TYPE] !== EFormioKey.BUTTON &&
|
|
10139
|
+
component[EFormioKey.KEY] &&
|
|
10140
|
+
component[EFormioKey.LABEL] &&
|
|
10141
|
+
existEditGrid) {
|
|
10142
|
+
// resolve conditional conditional object
|
|
10143
|
+
let conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
|
|
10144
|
+
if (!conditional)
|
|
10145
|
+
conditional = conditionalParent;
|
|
10146
|
+
component[EFormioKey.CONDITIONAL] = conditional[EFormioKey.CONDITIONAL];
|
|
10147
|
+
component[EFormioKey.CUSTOM_CONDITIONAL] =
|
|
10148
|
+
conditional[EFormioKey.CUSTOM_CONDITIONAL];
|
|
10149
|
+
// add namPanel as property
|
|
10150
|
+
component[EFormioKey.TITLE_PANEL] = titlePanel;
|
|
10151
|
+
// add component to the result
|
|
10152
|
+
result.push(component);
|
|
10153
|
+
}
|
|
10154
|
+
}
|
|
10155
|
+
}
|
|
10156
|
+
}
|
|
10157
|
+
return result;
|
|
10186
10158
|
}
|
|
10187
|
-
|
|
10188
|
-
|
|
10189
|
-
|
|
10190
|
-
|
|
10191
|
-
|
|
10192
|
-
|
|
10193
|
-
|
|
10194
|
-
|
|
10195
|
-
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
|
|
10200
|
-
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
|
|
10159
|
+
/**
|
|
10160
|
+
* Create 2 jason objects of data form by component key and other by component key and title form key
|
|
10161
|
+
* @param dataForm dataForm model object
|
|
10162
|
+
* @returns Object of 2 element
|
|
10163
|
+
*/
|
|
10164
|
+
static createListDataByDataFormList(dataForm, listForm) {
|
|
10165
|
+
let listData = {};
|
|
10166
|
+
let listDataByForm = {};
|
|
10167
|
+
if (dataForm && dataForm.length > 0) {
|
|
10168
|
+
listData = {};
|
|
10169
|
+
listDataByForm = {};
|
|
10170
|
+
let dForm;
|
|
10171
|
+
for (dForm of dataForm) {
|
|
10172
|
+
if (!dForm.data) {
|
|
10173
|
+
continue;
|
|
10174
|
+
}
|
|
10175
|
+
const form = listForm.find(function (formTmp) {
|
|
10176
|
+
return formTmp.id == dForm.formId;
|
|
10177
|
+
});
|
|
10178
|
+
if (!form) {
|
|
10179
|
+
//console.error('No se encontró el formulario con id ' + dForm.formId);
|
|
10180
|
+
continue;
|
|
10181
|
+
}
|
|
10182
|
+
const keyFormTitle = TokenService.getKeyFormulario(form.title) + '_';
|
|
10183
|
+
for (const key in dForm.data) {
|
|
10184
|
+
listData[key] = dForm.data[key];
|
|
10185
|
+
listDataByForm[keyFormTitle + key] = dForm.data[key];
|
|
10186
|
+
}
|
|
10187
|
+
}
|
|
10188
|
+
}
|
|
10189
|
+
return {
|
|
10190
|
+
listData: listData,
|
|
10191
|
+
listDataByForm: listDataByForm
|
|
10192
|
+
};
|
|
10205
10193
|
}
|
|
10206
|
-
/**
|
|
10207
|
-
|
|
10208
|
-
|
|
10194
|
+
/**
|
|
10195
|
+
* It returns the components
|
|
10196
|
+
* @param components
|
|
10197
|
+
*/
|
|
10198
|
+
static getPanelComponents(components) {
|
|
10199
|
+
return FormioUtil.getComponentsByPanel(components);
|
|
10209
10200
|
}
|
|
10210
|
-
/**
|
|
10211
|
-
|
|
10212
|
-
|
|
10201
|
+
/**
|
|
10202
|
+
* It returns the components array of the form
|
|
10203
|
+
* @param components array of components
|
|
10204
|
+
*/
|
|
10205
|
+
static getComponentsByPanel(components) {
|
|
10206
|
+
// it contains the result array
|
|
10207
|
+
let result = [];
|
|
10208
|
+
if (components) {
|
|
10209
|
+
// iterate over components
|
|
10210
|
+
for (const component of components) {
|
|
10211
|
+
// avoid the editgrid component ot if it has a different behavior it should have an else statement
|
|
10212
|
+
if (component[EFormioKey.TYPE] !== EFormioKey.EDITGRID) {
|
|
10213
|
+
// if component is panel then titlePanel variable is changed, and it is gonna be inherited
|
|
10214
|
+
if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
|
|
10215
|
+
result.push(component);
|
|
10216
|
+
}
|
|
10217
|
+
}
|
|
10218
|
+
}
|
|
10219
|
+
}
|
|
10220
|
+
return result;
|
|
10213
10221
|
}
|
|
10214
|
-
}
|
|
10215
|
-
SegmentationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10216
|
-
SegmentationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationService, providedIn: 'root' });
|
|
10217
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationService, decorators: [{
|
|
10218
|
-
type: Injectable,
|
|
10219
|
-
args: [{
|
|
10220
|
-
providedIn: 'root'
|
|
10221
|
-
}]
|
|
10222
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
10223
|
-
type: Inject,
|
|
10224
|
-
args: ['environment']
|
|
10225
|
-
}] }, { type: i1.HttpClient }]; } });
|
|
10222
|
+
}
|
|
10226
10223
|
|
|
10227
10224
|
class SendApplicationService {
|
|
10228
10225
|
constructor(environment, tokenService, emailService, interactionApplicationUserService) {
|
|
@@ -11754,12 +11751,19 @@ class ProgressBarService {
|
|
|
11754
11751
|
constructor(environment, httpClient) {
|
|
11755
11752
|
this.environment = environment;
|
|
11756
11753
|
this.httpClient = httpClient;
|
|
11754
|
+
this.urlBase = this.environment.host.backend.configuration;
|
|
11757
11755
|
}
|
|
11758
|
-
saveProgress(data) {
|
|
11759
|
-
|
|
11756
|
+
saveProgress(data, projectFrom = EProjectFrom.PLI) {
|
|
11757
|
+
if (projectFrom == EProjectFrom.GIC) {
|
|
11758
|
+
this.urlBase = this.environment.host.backend.gicConfiguration;
|
|
11759
|
+
}
|
|
11760
|
+
return this.httpClient.post(this.urlBase + 'progressBar/saveProgress', data, HEADER_JSON);
|
|
11760
11761
|
}
|
|
11761
|
-
getProgress(processId, processType) {
|
|
11762
|
-
|
|
11762
|
+
getProgress(processId, processType, projectFrom = EProjectFrom.PLI) {
|
|
11763
|
+
if (projectFrom == EProjectFrom.GIC) {
|
|
11764
|
+
this.urlBase = this.environment.host.backend.gicConfiguration;
|
|
11765
|
+
}
|
|
11766
|
+
return this.httpClient.get(this.urlBase + 'progressBar/getProgressByProcessIdAndProcessType', {
|
|
11763
11767
|
params: new HttpParams()
|
|
11764
11768
|
.set('processId', processId.toString())
|
|
11765
11769
|
.set('processType', processType.toString())
|
|
@@ -11782,6 +11786,8 @@ class ProgressBarComponent {
|
|
|
11782
11786
|
constructor(toastrService, progressBarService) {
|
|
11783
11787
|
this.toastrService = toastrService;
|
|
11784
11788
|
this.progressBarService = progressBarService;
|
|
11789
|
+
// Desde que proyecto se consulta a la barra. 1 Para PLI, 2 GIC
|
|
11790
|
+
this.projectFrom = EProjectFrom.PLI; // Enumerado
|
|
11785
11791
|
this.finishProcess = new EventEmitter();
|
|
11786
11792
|
this.setTimeOutValue = 0;
|
|
11787
11793
|
}
|
|
@@ -11809,7 +11815,7 @@ class ProgressBarComponent {
|
|
|
11809
11815
|
}
|
|
11810
11816
|
async handleProgress() {
|
|
11811
11817
|
let processActual = await this.progressBarService
|
|
11812
|
-
.getProgress(this.processId, this.processType)
|
|
11818
|
+
.getProgress(this.processId, this.processType, this.projectFrom)
|
|
11813
11819
|
.toPromise();
|
|
11814
11820
|
let process;
|
|
11815
11821
|
if (processActual == null) {
|
|
@@ -11819,7 +11825,9 @@ class ProgressBarComponent {
|
|
|
11819
11825
|
process.state = '';
|
|
11820
11826
|
process.current = this.current;
|
|
11821
11827
|
process.end = this.end;
|
|
11822
|
-
processActual = await this.progressBarService
|
|
11828
|
+
processActual = await this.progressBarService
|
|
11829
|
+
.saveProgress(process, this.projectFrom)
|
|
11830
|
+
.toPromise();
|
|
11823
11831
|
}
|
|
11824
11832
|
this.processId = processActual.processId;
|
|
11825
11833
|
this.percentage = processActual.percentage;
|
|
@@ -11840,7 +11848,7 @@ class ProgressBarComponent {
|
|
|
11840
11848
|
}
|
|
11841
11849
|
}
|
|
11842
11850
|
ProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ProgressBarComponent, deps: [{ token: i2.ToastrService }, { token: ProgressBarService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11843
|
-
ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: ProgressBarComponent, selector: "pli-progress-bar", inputs: { processId: "processId", processType: "processType", percentage: "percentage", current: "current", end: "end" }, outputs: { finishProcess: "finishProcess" }, ngImport: i0, template: "<div class=\"progress\">\r\n <div class=\"progress-bar progress-bar-striped active\" role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\" [ngStyle]=\"{ width: percentage + '%' }\">\r\n {{ percentage }}%\r\n </div>\r\n</div>", styles: [".progress .progress-bar{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}\n"], directives: [{ type: i8.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
11851
|
+
ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: ProgressBarComponent, selector: "pli-progress-bar", inputs: { processId: "processId", processType: "processType", percentage: "percentage", current: "current", end: "end", projectFrom: "projectFrom" }, outputs: { finishProcess: "finishProcess" }, ngImport: i0, template: "<div class=\"progress\">\r\n <div class=\"progress-bar progress-bar-striped active\" role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\" [ngStyle]=\"{ width: percentage + '%' }\">\r\n {{ percentage }}%\r\n </div>\r\n</div>", styles: [".progress .progress-bar{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}\n"], directives: [{ type: i8.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
11844
11852
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ProgressBarComponent, decorators: [{
|
|
11845
11853
|
type: Component,
|
|
11846
11854
|
args: [{ selector: 'pli-progress-bar', template: "<div class=\"progress\">\r\n <div class=\"progress-bar progress-bar-striped active\" role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\" [ngStyle]=\"{ width: percentage + '%' }\">\r\n {{ percentage }}%\r\n </div>\r\n</div>", styles: [".progress .progress-bar{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}\n"] }]
|
|
@@ -11854,6 +11862,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
|
|
|
11854
11862
|
type: Input
|
|
11855
11863
|
}], end: [{
|
|
11856
11864
|
type: Input
|
|
11865
|
+
}], projectFrom: [{
|
|
11866
|
+
type: Input
|
|
11857
11867
|
}], finishProcess: [{
|
|
11858
11868
|
type: Output
|
|
11859
11869
|
}] } });
|
|
@@ -13126,16 +13136,210 @@ class CommitteeSnapshotService {
|
|
|
13126
13136
|
deleteByName(name) {
|
|
13127
13137
|
return this.httpClient.delete(`${this.environment.host.backend.backoffice}committee-snapshot/deleteByName?name=${name}`);
|
|
13128
13138
|
}
|
|
13129
|
-
deleteByPromCode(promCodigo) {
|
|
13130
|
-
return this.httpClient.delete(`${this.environment.host.backend.backoffice}committee-snapshot/deleteByPromCode?promCodigo=${promCodigo}`);
|
|
13139
|
+
deleteByPromCode(promCodigo) {
|
|
13140
|
+
return this.httpClient.delete(`${this.environment.host.backend.backoffice}committee-snapshot/deleteByPromCode?promCodigo=${promCodigo}`);
|
|
13141
|
+
}
|
|
13142
|
+
deleteByCommitteeId(committeeId) {
|
|
13143
|
+
return this.httpClient.delete(`${this.environment.host.backend.backoffice}committee-snapshot/deleteByCommitteeId?committeeId=${committeeId}`);
|
|
13144
|
+
}
|
|
13145
|
+
}
|
|
13146
|
+
CommitteeSnapshotService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CommitteeSnapshotService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13147
|
+
CommitteeSnapshotService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CommitteeSnapshotService, providedIn: 'root' });
|
|
13148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CommitteeSnapshotService, decorators: [{
|
|
13149
|
+
type: Injectable,
|
|
13150
|
+
args: [{
|
|
13151
|
+
providedIn: 'root'
|
|
13152
|
+
}]
|
|
13153
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
13154
|
+
type: Inject,
|
|
13155
|
+
args: ['environment']
|
|
13156
|
+
}] }, { type: i1.HttpClient }]; } });
|
|
13157
|
+
|
|
13158
|
+
class CreditScoreService {
|
|
13159
|
+
constructor(environment, httpClient) {
|
|
13160
|
+
this.environment = environment;
|
|
13161
|
+
this.httpClient = httpClient;
|
|
13162
|
+
}
|
|
13163
|
+
calculateCodebtorsScore(promCodigo, applicationId) {
|
|
13164
|
+
return this.httpClient.get(this.environment.host.backend.backoffice + 'credit-score/calculateCodebtorsScore', {
|
|
13165
|
+
params: new HttpParams()
|
|
13166
|
+
.set('applicationId', applicationId)
|
|
13167
|
+
.set('promCodigo', String(promCodigo))
|
|
13168
|
+
});
|
|
13169
|
+
}
|
|
13170
|
+
calculateScore(promCodigo, lApplicationId) {
|
|
13171
|
+
return this.httpClient.post(this.environment.host.backend.backoffice + 'credit-score/calculateScore', lApplicationId, {
|
|
13172
|
+
params: new HttpParams().set('promCodigo', String(promCodigo))
|
|
13173
|
+
});
|
|
13174
|
+
}
|
|
13175
|
+
getCreditScoreDate(identification, promCodigo) {
|
|
13176
|
+
return this.httpClient.post(this.environment.host.backend.backoffice + 'credit-score/getCreditScoreDate', identification, {
|
|
13177
|
+
params: new HttpParams().set('promCodigo', String(promCodigo))
|
|
13178
|
+
});
|
|
13179
|
+
}
|
|
13180
|
+
}
|
|
13181
|
+
CreditScoreService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CreditScoreService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13182
|
+
CreditScoreService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CreditScoreService, providedIn: 'root' });
|
|
13183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CreditScoreService, decorators: [{
|
|
13184
|
+
type: Injectable,
|
|
13185
|
+
args: [{
|
|
13186
|
+
providedIn: 'root'
|
|
13187
|
+
}]
|
|
13188
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
13189
|
+
type: Inject,
|
|
13190
|
+
args: ['environment']
|
|
13191
|
+
}] }, { type: i1.HttpClient }]; } });
|
|
13192
|
+
|
|
13193
|
+
class DataLetterSegmentationService {
|
|
13194
|
+
constructor(environment, httpClient) {
|
|
13195
|
+
this.environment = environment;
|
|
13196
|
+
this.httpClient = httpClient;
|
|
13197
|
+
this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
13198
|
+
}
|
|
13199
|
+
generateDataLetterFromSnapshot(idCampaign) {
|
|
13200
|
+
return this.httpClient.post(this.environment.host.backend.backoffice + 'data-letter/generateDataLetterFromSnapshot', idCampaign, this.headerJson);
|
|
13201
|
+
}
|
|
13202
|
+
segment(idCampaign) {
|
|
13203
|
+
return this.httpClient.post(this.environment.host.backend.backoffice + 'data-letter/segment', idCampaign, this.headerJson);
|
|
13204
|
+
}
|
|
13205
|
+
findSegmentationByCommitteeIdAndCampaignIdAndActive(idCommittee, idCampaign, active) {
|
|
13206
|
+
return this.httpClient.get(this.environment.host.backend.backoffice +
|
|
13207
|
+
'data-letter/findSegmentationByCommitteeIdAndCampaignIdAndActive', {
|
|
13208
|
+
params: new HttpParams()
|
|
13209
|
+
.set('idCommittee', idCommittee.toString())
|
|
13210
|
+
.set('idCampaign', idCampaign.toString())
|
|
13211
|
+
.set('active', active.toString())
|
|
13212
|
+
});
|
|
13213
|
+
}
|
|
13214
|
+
findDataLetterByCampaignId(idCampaign) {
|
|
13215
|
+
return this.httpClient.get(this.environment.host.backend.backoffice + 'data-letter/findByCampaignId', { params: new HttpParams().set('idCampaign', idCampaign.toString()) });
|
|
13216
|
+
}
|
|
13217
|
+
generateLetter(promCodigo, campaignId, filter) {
|
|
13218
|
+
var params = { promCodigo, campaignId, filter };
|
|
13219
|
+
return this.httpClient.post(this.environment.host.backend.backoffice + 'data-letter/generateLetter', params, this.headerJson);
|
|
13220
|
+
}
|
|
13221
|
+
sendLetters(test, campaignId, email, filter) {
|
|
13222
|
+
var params = { test, campaignId, email, filter };
|
|
13223
|
+
return this.httpClient.post(this.environment.host.backend.queue + 'letterCampaing', params, this.headerJson);
|
|
13224
|
+
}
|
|
13225
|
+
findLogs(campaignId) {
|
|
13226
|
+
return this.httpClient.get(this.environment.host.backend.backoffice + 'data-letter/findLogs?idCampaign=' + campaignId);
|
|
13227
|
+
}
|
|
13228
|
+
getUniversities(campaignId) {
|
|
13229
|
+
return this.httpClient.get(this.environment.host.backend.backoffice + 'data-letter/universities?idCampaign=' + campaignId);
|
|
13230
|
+
}
|
|
13231
|
+
getParagraphs(promCodigo) {
|
|
13232
|
+
return this.httpClient.get(this.environment.host.backend.backoffice + 'data-letter/paragraphs?promCodigo=' + promCodigo);
|
|
13233
|
+
}
|
|
13234
|
+
}
|
|
13235
|
+
DataLetterSegmentationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DataLetterSegmentationService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13236
|
+
DataLetterSegmentationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DataLetterSegmentationService, providedIn: 'root' });
|
|
13237
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DataLetterSegmentationService, decorators: [{
|
|
13238
|
+
type: Injectable,
|
|
13239
|
+
args: [{
|
|
13240
|
+
providedIn: 'root'
|
|
13241
|
+
}]
|
|
13242
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
13243
|
+
type: Inject,
|
|
13244
|
+
args: ['environment']
|
|
13245
|
+
}] }, { type: i1.HttpClient }]; } });
|
|
13246
|
+
|
|
13247
|
+
class DocumentAnalysisAutoService {
|
|
13248
|
+
constructor(environment, httpClient) {
|
|
13249
|
+
this.environment = environment;
|
|
13250
|
+
this.httpClient = httpClient;
|
|
13251
|
+
this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
13252
|
+
}
|
|
13253
|
+
/** It send All applications for automatic document analysis */
|
|
13254
|
+
send(sendDocAnalysisAutoDto) {
|
|
13255
|
+
return this.httpClient.post(this.environment.host.backend.queue + 'docAnalysisAuto/send', sendDocAnalysisAutoDto);
|
|
13256
|
+
}
|
|
13257
|
+
}
|
|
13258
|
+
DocumentAnalysisAutoService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DocumentAnalysisAutoService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13259
|
+
DocumentAnalysisAutoService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DocumentAnalysisAutoService, providedIn: 'root' });
|
|
13260
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DocumentAnalysisAutoService, decorators: [{
|
|
13261
|
+
type: Injectable,
|
|
13262
|
+
args: [{
|
|
13263
|
+
providedIn: 'root'
|
|
13264
|
+
}]
|
|
13265
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
13266
|
+
type: Inject,
|
|
13267
|
+
args: ['environment']
|
|
13268
|
+
}] }, { type: i1.HttpClient }]; } });
|
|
13269
|
+
|
|
13270
|
+
class DocumentValidationAttemptService {
|
|
13271
|
+
constructor(environment, httpClient) {
|
|
13272
|
+
this.environment = environment;
|
|
13273
|
+
this.httpClient = httpClient;
|
|
13274
|
+
}
|
|
13275
|
+
getByApplicationIdAndDocumentId(applicationId, configurationDocumentId) {
|
|
13276
|
+
return this.httpClient.get(this.environment.host.backend.frontoffice + 'getByApplicationIdAndDocumentId', {
|
|
13277
|
+
params: new HttpParams()
|
|
13278
|
+
.set('applicationId', applicationId)
|
|
13279
|
+
.set('configurationDocumentId', configurationDocumentId.toString())
|
|
13280
|
+
});
|
|
13281
|
+
}
|
|
13282
|
+
save(documentValidationAttempt) {
|
|
13283
|
+
return this.httpClient.post(this.environment.host.backend.frontoffice + 'save', documentValidationAttempt);
|
|
13284
|
+
}
|
|
13285
|
+
}
|
|
13286
|
+
DocumentValidationAttemptService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DocumentValidationAttemptService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13287
|
+
DocumentValidationAttemptService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DocumentValidationAttemptService, providedIn: 'root' });
|
|
13288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DocumentValidationAttemptService, decorators: [{
|
|
13289
|
+
type: Injectable,
|
|
13290
|
+
args: [{
|
|
13291
|
+
providedIn: 'root'
|
|
13292
|
+
}]
|
|
13293
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
13294
|
+
type: Inject,
|
|
13295
|
+
args: ['environment']
|
|
13296
|
+
}] }, { type: i1.HttpClient }]; } });
|
|
13297
|
+
|
|
13298
|
+
class GicClientDisbursementMetadataService {
|
|
13299
|
+
constructor(environment, httpClient) {
|
|
13300
|
+
this.environment = environment;
|
|
13301
|
+
this.httpClient = httpClient;
|
|
13302
|
+
this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
13303
|
+
}
|
|
13304
|
+
getClientDisbursementMetadata(promCodigo, identification) {
|
|
13305
|
+
return this.httpClient.get(this.environment.host.backend.gicBackoffice +
|
|
13306
|
+
'gic-client-metadata/getClientDisbursementMetadata', {
|
|
13307
|
+
params: new HttpParams()
|
|
13308
|
+
.set('promCodigo', String(promCodigo))
|
|
13309
|
+
.set('identification', String(identification))
|
|
13310
|
+
});
|
|
13311
|
+
}
|
|
13312
|
+
}
|
|
13313
|
+
GicClientDisbursementMetadataService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicClientDisbursementMetadataService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13314
|
+
GicClientDisbursementMetadataService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicClientDisbursementMetadataService, providedIn: 'root' });
|
|
13315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicClientDisbursementMetadataService, decorators: [{
|
|
13316
|
+
type: Injectable,
|
|
13317
|
+
args: [{
|
|
13318
|
+
providedIn: 'root'
|
|
13319
|
+
}]
|
|
13320
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
13321
|
+
type: Inject,
|
|
13322
|
+
args: ['environment']
|
|
13323
|
+
}] }, { type: i1.HttpClient }]; } });
|
|
13324
|
+
|
|
13325
|
+
class GicCnfBankvisionTransactionService {
|
|
13326
|
+
constructor(environment, httpClient) {
|
|
13327
|
+
this.environment = environment;
|
|
13328
|
+
this.httpClient = httpClient;
|
|
13329
|
+
}
|
|
13330
|
+
getByPromCodigo(promCode) {
|
|
13331
|
+
let httpParams = new HttpParams();
|
|
13332
|
+
httpParams = httpParams.set('promCodigo', String(promCode));
|
|
13333
|
+
return this.httpClient.get(this.environment.host.backend.gicConfiguration +
|
|
13334
|
+
'gic_cnf_bankvision_transaction/getByPromCodigo', { params: (httpParams = httpParams) });
|
|
13131
13335
|
}
|
|
13132
|
-
|
|
13133
|
-
return this.httpClient.
|
|
13336
|
+
save(gicCnfBankvisionTransaction) {
|
|
13337
|
+
return this.httpClient.post(this.environment.host.backend.gicConfiguration + 'gic_cnf_bankvision_transaction/save', gicCnfBankvisionTransaction);
|
|
13134
13338
|
}
|
|
13135
13339
|
}
|
|
13136
|
-
|
|
13137
|
-
|
|
13138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type:
|
|
13340
|
+
GicCnfBankvisionTransactionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCnfBankvisionTransactionService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13341
|
+
GicCnfBankvisionTransactionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCnfBankvisionTransactionService, providedIn: 'root' });
|
|
13342
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCnfBankvisionTransactionService, decorators: [{
|
|
13139
13343
|
type: Injectable,
|
|
13140
13344
|
args: [{
|
|
13141
13345
|
providedIn: 'root'
|
|
@@ -13145,32 +13349,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
|
|
|
13145
13349
|
args: ['environment']
|
|
13146
13350
|
}] }, { type: i1.HttpClient }]; } });
|
|
13147
13351
|
|
|
13148
|
-
class
|
|
13352
|
+
class GicCnfClosingDateService {
|
|
13149
13353
|
constructor(environment, httpClient) {
|
|
13150
13354
|
this.environment = environment;
|
|
13151
13355
|
this.httpClient = httpClient;
|
|
13152
13356
|
}
|
|
13153
|
-
|
|
13154
|
-
return this.httpClient.get(this.environment.host.backend.
|
|
13155
|
-
params: new HttpParams()
|
|
13156
|
-
.set('applicationId', applicationId)
|
|
13157
|
-
.set('promCodigo', String(promCodigo))
|
|
13158
|
-
});
|
|
13357
|
+
getAll() {
|
|
13358
|
+
return this.httpClient.get(this.environment.host.backend.gicConfiguration + 'gic_cnf_closing_date/getAll');
|
|
13159
13359
|
}
|
|
13160
|
-
|
|
13161
|
-
return this.httpClient.post(this.environment.host.backend.
|
|
13162
|
-
params: new HttpParams().set('promCodigo', String(promCodigo))
|
|
13163
|
-
});
|
|
13360
|
+
save(gicCnfClosingDate) {
|
|
13361
|
+
return this.httpClient.post(this.environment.host.backend.gicConfiguration + 'gic_cnf_closing_date/save', gicCnfClosingDate);
|
|
13164
13362
|
}
|
|
13165
|
-
|
|
13166
|
-
return this.httpClient.
|
|
13167
|
-
|
|
13168
|
-
|
|
13363
|
+
delete(id) {
|
|
13364
|
+
return this.httpClient.delete(this.environment.host.backend.gicConfiguration + 'gic_cnf_closing_date', { params: new HttpParams().set('id', String(id)) });
|
|
13365
|
+
}
|
|
13366
|
+
getClosingDate() {
|
|
13367
|
+
return this.httpClient.get(this.environment.host.backend.gicConfiguration + 'gic_cnf_closing_date/getClosingDate');
|
|
13169
13368
|
}
|
|
13170
13369
|
}
|
|
13171
|
-
|
|
13172
|
-
|
|
13173
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type:
|
|
13370
|
+
GicCnfClosingDateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCnfClosingDateService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13371
|
+
GicCnfClosingDateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCnfClosingDateService, providedIn: 'root' });
|
|
13372
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCnfClosingDateService, decorators: [{
|
|
13174
13373
|
type: Injectable,
|
|
13175
13374
|
args: [{
|
|
13176
13375
|
providedIn: 'root'
|
|
@@ -13180,51 +13379,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
|
|
|
13180
13379
|
args: ['environment']
|
|
13181
13380
|
}] }, { type: i1.HttpClient }]; } });
|
|
13182
13381
|
|
|
13183
|
-
class
|
|
13382
|
+
class GicClientService {
|
|
13184
13383
|
constructor(environment, httpClient) {
|
|
13185
13384
|
this.environment = environment;
|
|
13186
13385
|
this.httpClient = httpClient;
|
|
13187
13386
|
this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
13188
13387
|
}
|
|
13189
|
-
|
|
13190
|
-
return this.httpClient.post(this.environment.host.backend.
|
|
13191
|
-
}
|
|
13192
|
-
segment(idCampaign) {
|
|
13193
|
-
return this.httpClient.post(this.environment.host.backend.backoffice + 'data-letter/segment', idCampaign, this.headerJson);
|
|
13194
|
-
}
|
|
13195
|
-
findSegmentationByCommitteeIdAndCampaignIdAndActive(idCommittee, idCampaign, active) {
|
|
13196
|
-
return this.httpClient.get(this.environment.host.backend.backoffice +
|
|
13197
|
-
'data-letter/findSegmentationByCommitteeIdAndCampaignIdAndActive', {
|
|
13198
|
-
params: new HttpParams()
|
|
13199
|
-
.set('idCommittee', idCommittee.toString())
|
|
13200
|
-
.set('idCampaign', idCampaign.toString())
|
|
13201
|
-
.set('active', active.toString())
|
|
13202
|
-
});
|
|
13203
|
-
}
|
|
13204
|
-
findDataLetterByCampaignId(idCampaign) {
|
|
13205
|
-
return this.httpClient.get(this.environment.host.backend.backoffice + 'data-letter/findByCampaignId', { params: new HttpParams().set('idCampaign', idCampaign.toString()) });
|
|
13206
|
-
}
|
|
13207
|
-
generateLetter(promCodigo, campaignId, filter) {
|
|
13208
|
-
var params = { promCodigo, campaignId, filter };
|
|
13209
|
-
return this.httpClient.post(this.environment.host.backend.backoffice + 'data-letter/generateLetter', params, this.headerJson);
|
|
13210
|
-
}
|
|
13211
|
-
sendLetters(test, campaignId, email, filter) {
|
|
13212
|
-
var params = { test, campaignId, email, filter };
|
|
13213
|
-
return this.httpClient.post(this.environment.host.backend.queue + 'letterCampaing', params, this.headerJson);
|
|
13388
|
+
getByDataTablesParameters(dataTableParameters) {
|
|
13389
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'gic-client/getByDataTablesParameters', dataTableParameters, this.headerJson);
|
|
13214
13390
|
}
|
|
13215
|
-
|
|
13216
|
-
return this.httpClient.
|
|
13391
|
+
sendToGic(gicClientRequestTO) {
|
|
13392
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'gic-client/send', gicClientRequestTO, this.headerJson);
|
|
13217
13393
|
}
|
|
13218
|
-
|
|
13219
|
-
return this.httpClient.
|
|
13394
|
+
savePaymentDay(identification, promCodigo, paymentDay) {
|
|
13395
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'gic-client/savePaymentDay?identification=' + identification + '&promCodigo=' + promCodigo + '&paymentDay=' + paymentDay, null);
|
|
13220
13396
|
}
|
|
13221
|
-
|
|
13222
|
-
return this.httpClient.
|
|
13397
|
+
saveSurplus(identification, promCodigo, surplus) {
|
|
13398
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'gic-client/saveSurplusType?identification=' + identification + '&promCodigo=' + promCodigo + '&surplusType=' + surplus, null);
|
|
13223
13399
|
}
|
|
13224
13400
|
}
|
|
13225
|
-
|
|
13226
|
-
|
|
13227
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type:
|
|
13401
|
+
GicClientService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicClientService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13402
|
+
GicClientService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicClientService, providedIn: 'root' });
|
|
13403
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicClientService, decorators: [{
|
|
13228
13404
|
type: Injectable,
|
|
13229
13405
|
args: [{
|
|
13230
13406
|
providedIn: 'root'
|
|
@@ -13234,20 +13410,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
|
|
|
13234
13410
|
args: ['environment']
|
|
13235
13411
|
}] }, { type: i1.HttpClient }]; } });
|
|
13236
13412
|
|
|
13237
|
-
class
|
|
13413
|
+
class GicDisbursementService {
|
|
13238
13414
|
constructor(environment, httpClient) {
|
|
13239
13415
|
this.environment = environment;
|
|
13240
13416
|
this.httpClient = httpClient;
|
|
13241
13417
|
this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
13242
13418
|
}
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
|
|
13419
|
+
getByDataTablesParameters(dataTableParameters) {
|
|
13420
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice +
|
|
13421
|
+
'gic-disbursement/getByDataTablesParameters', dataTableParameters, this.headerJson);
|
|
13422
|
+
}
|
|
13423
|
+
updateBankvisionState(updateBankvisionRequestTO) {
|
|
13424
|
+
return this.httpClient.put(this.environment.host.backend.gicBackoffice + 'gic-disbursement/updateBankvisionState', updateBankvisionRequestTO);
|
|
13246
13425
|
}
|
|
13247
13426
|
}
|
|
13248
|
-
|
|
13249
|
-
|
|
13250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type:
|
|
13427
|
+
GicDisbursementService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicDisbursementService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13428
|
+
GicDisbursementService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicDisbursementService, providedIn: 'root' });
|
|
13429
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicDisbursementService, decorators: [{
|
|
13251
13430
|
type: Injectable,
|
|
13252
13431
|
args: [{
|
|
13253
13432
|
providedIn: 'root'
|
|
@@ -13257,25 +13436,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
|
|
|
13257
13436
|
args: ['environment']
|
|
13258
13437
|
}] }, { type: i1.HttpClient }]; } });
|
|
13259
13438
|
|
|
13260
|
-
class
|
|
13439
|
+
class GicCollectionService {
|
|
13261
13440
|
constructor(environment, httpClient) {
|
|
13262
13441
|
this.environment = environment;
|
|
13263
13442
|
this.httpClient = httpClient;
|
|
13443
|
+
this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
13264
13444
|
}
|
|
13265
|
-
|
|
13266
|
-
return this.httpClient.
|
|
13267
|
-
|
|
13268
|
-
|
|
13269
|
-
|
|
13445
|
+
getByDataTablesParameters(dataTableParameters) {
|
|
13446
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice +
|
|
13447
|
+
'gic-collection/getByDataTablesParameters', dataTableParameters, this.headerJson);
|
|
13448
|
+
}
|
|
13449
|
+
updateBankvisionState(updateBankvisionRequestTO) {
|
|
13450
|
+
return this.httpClient.put(this.environment.host.backend.gicBackoffice + 'gic-collection/updateBankvisionState', updateBankvisionRequestTO);
|
|
13451
|
+
}
|
|
13452
|
+
updateGicPaymentApplication(gicPaymentApplication) {
|
|
13453
|
+
return this.httpClient.put(this.environment.host.backend.gicBackoffice + 'gic-payment-application/updateGicPaymentApplication', gicPaymentApplication);
|
|
13454
|
+
}
|
|
13455
|
+
delete(gicPaymentApplicationId) {
|
|
13456
|
+
return this.httpClient.delete(this.environment.host.backend.gicBackoffice + 'gic-payment-application/delete', {
|
|
13457
|
+
params: new HttpParams().set('gicPaymentApplicationId', gicPaymentApplicationId)
|
|
13270
13458
|
});
|
|
13271
13459
|
}
|
|
13272
|
-
|
|
13273
|
-
return this.httpClient.post(this.environment.host.backend.
|
|
13460
|
+
deletedeletePaymentApplications(gicPaymentApplicationIds) {
|
|
13461
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'gic-payment-application/deletePaymentApplications', gicPaymentApplicationIds, this.headerJson);
|
|
13462
|
+
}
|
|
13463
|
+
sendToBankVision(listIds) {
|
|
13464
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice +
|
|
13465
|
+
'gic-payment-application/sendToBankVision', listIds, this.headerJson);
|
|
13274
13466
|
}
|
|
13275
13467
|
}
|
|
13276
|
-
|
|
13277
|
-
|
|
13278
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type:
|
|
13468
|
+
GicCollectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCollectionService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13469
|
+
GicCollectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCollectionService, providedIn: 'root' });
|
|
13470
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCollectionService, decorators: [{
|
|
13279
13471
|
type: Injectable,
|
|
13280
13472
|
args: [{
|
|
13281
13473
|
providedIn: 'root'
|
|
@@ -13285,22 +13477,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
|
|
|
13285
13477
|
args: ['environment']
|
|
13286
13478
|
}] }, { type: i1.HttpClient }]; } });
|
|
13287
13479
|
|
|
13288
|
-
class
|
|
13480
|
+
class GicPaymentApplicationService {
|
|
13289
13481
|
constructor(environment, httpClient) {
|
|
13290
13482
|
this.environment = environment;
|
|
13291
13483
|
this.httpClient = httpClient;
|
|
13292
13484
|
this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
13293
13485
|
}
|
|
13294
13486
|
getByDataTablesParameters(dataTableParameters) {
|
|
13295
|
-
return this.httpClient.post(this.environment.host.backend.gicBackoffice +
|
|
13487
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice +
|
|
13488
|
+
'gic-payment-application/getByDataTablesParameters', dataTableParameters, this.headerJson);
|
|
13296
13489
|
}
|
|
13297
|
-
|
|
13298
|
-
|
|
13490
|
+
}
|
|
13491
|
+
GicPaymentApplicationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicPaymentApplicationService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13492
|
+
GicPaymentApplicationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicPaymentApplicationService, providedIn: 'root' });
|
|
13493
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicPaymentApplicationService, decorators: [{
|
|
13494
|
+
type: Injectable,
|
|
13495
|
+
args: [{
|
|
13496
|
+
providedIn: 'root'
|
|
13497
|
+
}]
|
|
13498
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
13499
|
+
type: Inject,
|
|
13500
|
+
args: ['environment']
|
|
13501
|
+
}] }, { type: i1.HttpClient }]; } });
|
|
13502
|
+
|
|
13503
|
+
class InitialConfigurationGicParametersService {
|
|
13504
|
+
constructor(environment, httpClient) {
|
|
13505
|
+
this.environment = environment;
|
|
13506
|
+
this.httpClient = httpClient;
|
|
13507
|
+
this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
13508
|
+
}
|
|
13509
|
+
saveConfiguration(gicParametersConfiguration) {
|
|
13510
|
+
return this.httpClient.post(this.environment.host.backend.gicConfiguration +
|
|
13511
|
+
'gic-initial-configuration/saveConfiguration', gicParametersConfiguration, this.headerJson);
|
|
13512
|
+
}
|
|
13513
|
+
getAllConfigurationByPromCodigo(promCodigo) {
|
|
13514
|
+
return this.httpClient.get(this.environment.host.backend.gicConfiguration +
|
|
13515
|
+
'gic-initial-configuration/getAllConfigurationByPromCodigo', { params: new HttpParams().set('promCodigo', promCodigo.toString()) });
|
|
13516
|
+
}
|
|
13517
|
+
getConfigurationById(id) {
|
|
13518
|
+
return this.httpClient.get(this.environment.host.backend.gicConfiguration +
|
|
13519
|
+
'gic-initial-configuration/getConfigurationById', { params: new HttpParams().set('id', id.toString()) });
|
|
13520
|
+
}
|
|
13521
|
+
updateGicParametersConfiguration(gicParametersConfiguration) {
|
|
13522
|
+
return this.httpClient.post(this.environment.host.backend.gicConfiguration +
|
|
13523
|
+
'gic-initial-configuration/updateGicParametersConfiguration', gicParametersConfiguration);
|
|
13524
|
+
}
|
|
13525
|
+
deleteConfigurationById(id, promCodigo) {
|
|
13526
|
+
return this.httpClient.delete(this.environment.host.backend.gicConfiguration +
|
|
13527
|
+
'gic-initial-configuration/deleteConfigurationById', { params: new HttpParams().set('id', id.toString()).set('promCodigo', promCodigo) });
|
|
13528
|
+
}
|
|
13529
|
+
getLPromCodigos() {
|
|
13530
|
+
return this.httpClient.get(this.environment.host.backend.gicConfiguration +
|
|
13531
|
+
'gic-initial-configuration/getLPromCodigos');
|
|
13532
|
+
}
|
|
13533
|
+
cloningConfigByPromCodigo(promCodigoOfCloning, promCodigoOfCloningDestination) {
|
|
13534
|
+
return this.httpClient.post(this.environment.host.backend.gicConfiguration +
|
|
13535
|
+
`gic-initial-configuration/cloningConfigByPromCodigo?promCodigoOfCloning=${promCodigoOfCloning}&promCodigoOfCloningDestination=${promCodigoOfCloningDestination}`, this.headerJson);
|
|
13299
13536
|
}
|
|
13300
13537
|
}
|
|
13301
|
-
|
|
13302
|
-
|
|
13303
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type:
|
|
13538
|
+
InitialConfigurationGicParametersService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: InitialConfigurationGicParametersService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13539
|
+
InitialConfigurationGicParametersService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: InitialConfigurationGicParametersService, providedIn: 'root' });
|
|
13540
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: InitialConfigurationGicParametersService, decorators: [{
|
|
13304
13541
|
type: Injectable,
|
|
13305
13542
|
args: [{
|
|
13306
13543
|
providedIn: 'root'
|
|
@@ -15018,9 +15255,9 @@ class CustomValidator {
|
|
|
15018
15255
|
/* tslint:disable */
|
|
15019
15256
|
const VERSION = {
|
|
15020
15257
|
"dirty": true,
|
|
15021
|
-
"raw": "v0.0.18-
|
|
15022
|
-
"hash": "
|
|
15023
|
-
"distance":
|
|
15258
|
+
"raw": "v0.0.18-2147-g383be85f-dirty",
|
|
15259
|
+
"hash": "g383be85f",
|
|
15260
|
+
"distance": 2147,
|
|
15024
15261
|
"tag": "v0.0.18",
|
|
15025
15262
|
"semver": {
|
|
15026
15263
|
"options": {
|
|
@@ -15036,10 +15273,10 @@ const VERSION = {
|
|
|
15036
15273
|
"build": [],
|
|
15037
15274
|
"version": "0.0.18"
|
|
15038
15275
|
},
|
|
15039
|
-
"suffix": "
|
|
15040
|
-
"semverString": "0.0.18+
|
|
15041
|
-
"version": "0.0.
|
|
15042
|
-
"buildTimestamp": "2022-12-
|
|
15276
|
+
"suffix": "2147-g383be85f-dirty",
|
|
15277
|
+
"semverString": "0.0.18+2147.g383be85f",
|
|
15278
|
+
"version": "0.0.1665",
|
|
15279
|
+
"buildTimestamp": "2022-12-22T13:18:21.360Z"
|
|
15043
15280
|
};
|
|
15044
15281
|
/* tslint:enable */
|
|
15045
15282
|
|
|
@@ -15161,6 +15398,218 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
|
|
|
15161
15398
|
args: ['environment']
|
|
15162
15399
|
}] }, { type: i1.HttpClient }]; } });
|
|
15163
15400
|
|
|
15401
|
+
class ReturnRefundService {
|
|
15402
|
+
constructor(environment, httpClient) {
|
|
15403
|
+
this.environment = environment;
|
|
15404
|
+
this.httpClient = httpClient;
|
|
15405
|
+
this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
15406
|
+
}
|
|
15407
|
+
/** It save a return or refund */
|
|
15408
|
+
save(returnRefund) {
|
|
15409
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'gic-return-refund/save', returnRefund, this.headerJson);
|
|
15410
|
+
}
|
|
15411
|
+
validateIdentification(promCodigo, identification) {
|
|
15412
|
+
return this.httpClient.get(this.environment.host.backend.gicBackoffice + 'gic-return-refund/validate-identification', {
|
|
15413
|
+
params: new HttpParams().set('promCodigo', promCodigo).set('identification', identification)
|
|
15414
|
+
});
|
|
15415
|
+
}
|
|
15416
|
+
getCreditCreilingAvailable(promCodigo, fund, identification) {
|
|
15417
|
+
return this.httpClient.get(this.environment.host.backend.gicBackoffice + 'gic-return-refund/getCreditCeilingAvailable', {
|
|
15418
|
+
params: new HttpParams().set('promCodigo', promCodigo).set('identification', identification).set('fund', fund)
|
|
15419
|
+
});
|
|
15420
|
+
}
|
|
15421
|
+
delete(disbursementDatatableId) {
|
|
15422
|
+
return this.httpClient.delete(this.environment.host.backend.gicBackoffice + 'gic-return-refund/delete', {
|
|
15423
|
+
params: new HttpParams().set('disbursementDatatableId', disbursementDatatableId)
|
|
15424
|
+
});
|
|
15425
|
+
}
|
|
15426
|
+
getBankvisionCode(disbursementDatatableId) {
|
|
15427
|
+
return this.httpClient.get(this.environment.host.backend.gicBackoffice + 'gic-return-refund/getRubCode', {
|
|
15428
|
+
params: new HttpParams().set('disbursementDatatableId', disbursementDatatableId)
|
|
15429
|
+
});
|
|
15430
|
+
}
|
|
15431
|
+
}
|
|
15432
|
+
ReturnRefundService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReturnRefundService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
15433
|
+
ReturnRefundService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReturnRefundService, providedIn: 'root' });
|
|
15434
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReturnRefundService, decorators: [{
|
|
15435
|
+
type: Injectable,
|
|
15436
|
+
args: [{
|
|
15437
|
+
providedIn: 'root'
|
|
15438
|
+
}]
|
|
15439
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
15440
|
+
type: Inject,
|
|
15441
|
+
args: ['environment']
|
|
15442
|
+
}] }, { type: i1.HttpClient }]; } });
|
|
15443
|
+
|
|
15444
|
+
class InterestAdjustmentService {
|
|
15445
|
+
constructor(environment, httpClient) {
|
|
15446
|
+
this.environment = environment;
|
|
15447
|
+
this.httpClient = httpClient;
|
|
15448
|
+
this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
15449
|
+
}
|
|
15450
|
+
/** It save a return or refund */
|
|
15451
|
+
save(interestAdjustment) {
|
|
15452
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'interest_adjustment/save', interestAdjustment, this.headerJson);
|
|
15453
|
+
}
|
|
15454
|
+
getByDataTablesParameters(dataTableParameters) {
|
|
15455
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice +
|
|
15456
|
+
'interest_adjustment/getByDataTablesParameters', dataTableParameters, this.headerJson);
|
|
15457
|
+
}
|
|
15458
|
+
}
|
|
15459
|
+
InterestAdjustmentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: InterestAdjustmentService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
15460
|
+
InterestAdjustmentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: InterestAdjustmentService, providedIn: 'root' });
|
|
15461
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: InterestAdjustmentService, decorators: [{
|
|
15462
|
+
type: Injectable,
|
|
15463
|
+
args: [{
|
|
15464
|
+
providedIn: 'root'
|
|
15465
|
+
}]
|
|
15466
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
15467
|
+
type: Inject,
|
|
15468
|
+
args: ['environment']
|
|
15469
|
+
}] }, { type: i1.HttpClient }]; } });
|
|
15470
|
+
|
|
15471
|
+
class ImportExcelGICService {
|
|
15472
|
+
constructor(environment, httpClient) {
|
|
15473
|
+
this.environment = environment;
|
|
15474
|
+
this.httpClient = httpClient;
|
|
15475
|
+
this.urlBase = this.environment.host.backend.gicQueuePublisher + 'import-excel';
|
|
15476
|
+
this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
15477
|
+
}
|
|
15478
|
+
sendInitials(clients) {
|
|
15479
|
+
return this.httpClient.post(this.urlBase + '/initials', clients);
|
|
15480
|
+
}
|
|
15481
|
+
sendDisbursments(disbursments) {
|
|
15482
|
+
let aux = { disbursementList: disbursments };
|
|
15483
|
+
return this.httpClient.post(this.urlBase + '/disbursments', aux, this.headerJson);
|
|
15484
|
+
}
|
|
15485
|
+
/**
|
|
15486
|
+
* Send collections
|
|
15487
|
+
* @param collections
|
|
15488
|
+
* @return observable<any>
|
|
15489
|
+
*/
|
|
15490
|
+
sendCollections(collections) {
|
|
15491
|
+
let aux = { gicCollectionList: collections };
|
|
15492
|
+
return this.httpClient.post(this.urlBase + '/collections', aux, this.headerJson);
|
|
15493
|
+
}
|
|
15494
|
+
}
|
|
15495
|
+
ImportExcelGICService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ImportExcelGICService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
15496
|
+
ImportExcelGICService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ImportExcelGICService, providedIn: 'root' });
|
|
15497
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ImportExcelGICService, decorators: [{
|
|
15498
|
+
type: Injectable,
|
|
15499
|
+
args: [{
|
|
15500
|
+
providedIn: 'root'
|
|
15501
|
+
}]
|
|
15502
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
15503
|
+
type: Inject,
|
|
15504
|
+
args: ['environment']
|
|
15505
|
+
}] }, { type: i1.HttpClient }]; } });
|
|
15506
|
+
|
|
15507
|
+
class GicCnfMaintenaceService {
|
|
15508
|
+
constructor(environment, httpClient) {
|
|
15509
|
+
this.environment = environment;
|
|
15510
|
+
this.httpClient = httpClient;
|
|
15511
|
+
}
|
|
15512
|
+
getByPromCodigo(promCodigo) {
|
|
15513
|
+
return this.httpClient.get(this.environment.host.backend.gicConfiguration + 'gic-cnf-maintenance/getByPromCodigo', {
|
|
15514
|
+
params: new HttpParams().set('promCodigo', promCodigo)
|
|
15515
|
+
});
|
|
15516
|
+
}
|
|
15517
|
+
save(gicCnfMaintenance) {
|
|
15518
|
+
return this.httpClient.post(this.environment.host.backend.gicConfiguration + 'gic-cnf-maintenance/save', gicCnfMaintenance);
|
|
15519
|
+
}
|
|
15520
|
+
}
|
|
15521
|
+
GicCnfMaintenaceService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCnfMaintenaceService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
15522
|
+
GicCnfMaintenaceService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCnfMaintenaceService, providedIn: 'root' });
|
|
15523
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCnfMaintenaceService, decorators: [{
|
|
15524
|
+
type: Injectable,
|
|
15525
|
+
args: [{
|
|
15526
|
+
providedIn: 'root'
|
|
15527
|
+
}]
|
|
15528
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
15529
|
+
type: Inject,
|
|
15530
|
+
args: ['environment']
|
|
15531
|
+
}] }, { type: i1.HttpClient }]; } });
|
|
15532
|
+
|
|
15533
|
+
class MaintenanceService {
|
|
15534
|
+
constructor(environment, httpClient) {
|
|
15535
|
+
this.environment = environment;
|
|
15536
|
+
this.httpClient = httpClient;
|
|
15537
|
+
this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
15538
|
+
}
|
|
15539
|
+
getByDataTablesParameters(dataTableParameters) {
|
|
15540
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'maintenance/getByDataTablesParameters', dataTableParameters, this.headerJson);
|
|
15541
|
+
}
|
|
15542
|
+
getByDataTablesParametersForCondonation(dataTableParameters) {
|
|
15543
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'maintenance/getByDataTablesParametersForCondonation', dataTableParameters, this.headerJson);
|
|
15544
|
+
}
|
|
15545
|
+
update(maintenanceForm) {
|
|
15546
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'maintenance/update', maintenanceForm, this.headerJson);
|
|
15547
|
+
}
|
|
15548
|
+
downloadFlatFile(maintenanceIds) {
|
|
15549
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'maintenance/downloadFlatFile', { data: maintenanceIds }, this.headerJson);
|
|
15550
|
+
}
|
|
15551
|
+
delete(maintenanceId) {
|
|
15552
|
+
return this.httpClient.delete(this.environment.host.backend.gicBackoffice + 'maintenance/delete', {
|
|
15553
|
+
params: new HttpParams().set('maintenanceId', maintenanceId)
|
|
15554
|
+
});
|
|
15555
|
+
}
|
|
15556
|
+
deleteCondonationMaintenance(maintenanceId) {
|
|
15557
|
+
return this.httpClient.delete(this.environment.host.backend.gicBackoffice + 'maintenance/deleteCondonationMaintenace', {
|
|
15558
|
+
params: new HttpParams().set('maintenanceId', maintenanceId)
|
|
15559
|
+
});
|
|
15560
|
+
}
|
|
15561
|
+
deleteByIdIn(maintenanceIdList) {
|
|
15562
|
+
return this.httpClient.delete(this.environment.host.backend.gicBackoffice + 'maintenance/deleteByIdIn', {
|
|
15563
|
+
params: new HttpParams().set('maintenanceIdList', maintenanceIdList.toString())
|
|
15564
|
+
});
|
|
15565
|
+
}
|
|
15566
|
+
downloadCondonationFile() {
|
|
15567
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'maintenance/downloadCondonationFile', this.headerJson);
|
|
15568
|
+
}
|
|
15569
|
+
updateCondonationMaintenace(maintenanceForm) {
|
|
15570
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'maintenance/updateCondonationMaintenance', maintenanceForm, this.headerJson);
|
|
15571
|
+
}
|
|
15572
|
+
generateCondonationMaintenance() {
|
|
15573
|
+
return this.httpClient.get(this.environment.host.backend.gicBackoffice + 'maintenance/generateCondonationMaintenace');
|
|
15574
|
+
}
|
|
15575
|
+
}
|
|
15576
|
+
MaintenanceService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: MaintenanceService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
15577
|
+
MaintenanceService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: MaintenanceService, providedIn: 'root' });
|
|
15578
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: MaintenanceService, decorators: [{
|
|
15579
|
+
type: Injectable,
|
|
15580
|
+
args: [{
|
|
15581
|
+
providedIn: 'root'
|
|
15582
|
+
}]
|
|
15583
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
15584
|
+
type: Inject,
|
|
15585
|
+
args: ['environment']
|
|
15586
|
+
}] }, { type: i1.HttpClient }]; } });
|
|
15587
|
+
|
|
15588
|
+
class GicPaymentPlanService {
|
|
15589
|
+
constructor(environment, httpClient) {
|
|
15590
|
+
this.environment = environment;
|
|
15591
|
+
this.httpClient = httpClient;
|
|
15592
|
+
this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
15593
|
+
}
|
|
15594
|
+
generatePaymentPlants(data) {
|
|
15595
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'payment-plan/generatePaymentPlants', data, this.headerJson);
|
|
15596
|
+
}
|
|
15597
|
+
generatePaymentPlantsByIdentifications(identifications) {
|
|
15598
|
+
return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'payment-plan/generatePaymentPlantsByIdentifications', identifications, this.headerJson);
|
|
15599
|
+
}
|
|
15600
|
+
}
|
|
15601
|
+
GicPaymentPlanService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicPaymentPlanService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
15602
|
+
GicPaymentPlanService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicPaymentPlanService, providedIn: 'root' });
|
|
15603
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicPaymentPlanService, decorators: [{
|
|
15604
|
+
type: Injectable,
|
|
15605
|
+
args: [{
|
|
15606
|
+
providedIn: 'root'
|
|
15607
|
+
}]
|
|
15608
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
15609
|
+
type: Inject,
|
|
15610
|
+
args: ['environment']
|
|
15611
|
+
}] }, { type: i1.HttpClient }]; } });
|
|
15612
|
+
|
|
15164
15613
|
/*
|
|
15165
15614
|
* Public API Surface of ng-pli-commons
|
|
15166
15615
|
*/
|
|
@@ -15169,5 +15618,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
|
|
|
15169
15618
|
* Generated bundle index. Do not edit.
|
|
15170
15619
|
*/
|
|
15171
15620
|
|
|
15172
|
-
export { ApplicationFillPercentageService, ApplicationService, ApplicationTagService, AuthenticationService, BackofficeCommonsComponent, BudgetApplicationService, BudgetService, BudgetSimulationService, CommitteMoneyServiceService, CommitteePdfService, CommitteeSnapshotService, CommonInfoService, CommonListsComponent, CommonService, ConfigurationCommonsComponent, ConfigurationDocumentService, ConfigurationMinisiteService, ConfigurationService, ConfigurationTokenComponent, ConfigurationTokenSubjectService, CreditScoreService, CreditStudyService, CubeService, CurrencyColfuturoFormatterDirective, CurrencyColfuturoPipe, CurrencyDecimalColfuturoFormatterDirective, CurrencyDecimalColfuturoPipe, CurrencyPrintColfuturoPipe, CustomValidator, DashboardCommonsComponent, DataFormService, DataLetterSegmentationService, DocumentAnalysisAutoService, DocumentHistoryService, DocumentManagementService, DocumentService, DocumentValidationAttemptService, DocumentaryTypeService, DynamicFilterComponent, EmailService, EvaluationService, ExcelToJsonComponent, ExportExcelService, FileService, FormService, FormUtil, FormioUtil, FrontofficeCommonsComponent, GicClientService, GlobalShowTaskService, GuaranteeDocumentService, GuaranteeEnrollmentService, GuaranteeService, GuaranteeTokenComponent, HashService, ImportDataService, InitialRecordService, IntegrationADOService, InteractionApplicationUserService, KeysAssignationService, LegalizationService, LetterCampaingService, LetterTaskMappingService, LogService, MigrationPlisService, MigrationSurveyQueueService, NgPliCommonsModule, NgPliCommonsService, PageService, PartnerService, PartnerSystemService, PdfAnalyzerComponent, PdfAnalyzerService, PdfConfigComponent, PdfGeneratorComponent, PdfMergeVisualizerComponent, PdfVisualizerComponent, PermissionService, PliCnfAcuityFieldsService, PliCnfAppCardFilterService, PliCnfAppointmentTypeService, PliCnfBudgetProgramTypeService, PliCnfBudgetService, PliCnfCloningService, PliCnfCommitteePdfConfigTableConfigService, PliCnfCommitteePdfGenStatusService, PliCnfCommitteeService, PliCnfCommitteeVisualizationModeService, PliCnfConfigMinisiteService, PliCnfConfigurationCreditStudyService, PliCnfDocumentManagementService, PliCnfDynamicKeysAssignService, PliCnfEvaluationTaskMailingService, PliCnfEvaluationTaskService, PliCnfEvaluationTemplateService, PliCnfFormEditService, PliCnfFormMultiaplicacionService, PliCnfGuaranteeDocumentsTemplateService, PliCnfGuaranteeTokenService, PliCnfHeaderService, PliCnfIndicatorService, PliCnfInformationSystemService, PliCnfInteractionService, PliCnfLetterTemplateService, PliCnfLetterTemplateTypeService, PliCnfLookAndFeelService, PliCnfMenuFormService, PliCnfMigrationPlisFieldBudgetService, PliCnfMigrationPlisFieldService, PliCnfMigrationStatusPlisService, PliCnfPageSectionFormService, PliCnfPageSubProcessService, PliCnfPdfsService, PliCnfProfileFormService, PliCnfProfileUserService, PliCnfProjectSummaryService, PliCnfScenarioService, PliCnfSegmentationService, PliCnfSnapshotTokenServices, PliCnfStatusFlowInteractionService, PliCnfStatusFlowService, PliCnfSupportDocumentCategoryService, PliCnfSupportDocumentService, PliCnfSurveyDocumentService, PliCnfSurveyPdfService, PliCnfSurveyService, PliCnfTaskGroupService, PliCnfTextCategoryService, PliCnfTextOptionService, PliCnfTextService, PliCnfTypeTextService, PliCnfUniversityArticleService, PliCnfUserCalendarService, PliCnfUserWorkspaceService, PliCnfValproKeysService, PliCnfWorkspaceSegmentationService, PliMultipleValueFilterService, PliPromocionUsernameService, PliSegActionUserService, PliSegmentationService, PliTagAssignmentService, PliTagService, PliUserService, PppService, ProfileService, ProgressBarComponent, ProgressBarService, PromotionScoreService, SegmentationService, SegmentationTokensComponent, SegmentationTokensService, SegmentationUserService, SelectPppComponent, SendApplicationService, SesionFormService, SesionService, ShowHideColumnsTableComponent, SpinnerService, SponsorshipLetterService, StatusService, SummaryBudgetService, SurveyMetadataService, SurveyQueueService, SurveyService, TasaCambioService, ThousandsPipe, TokenComponent, TokenService, TokenTransformationService, TokensCalculatorComponent, UniversityService, UploadDocumentsService, UserService, VersionCommons, VisualizationCommitteeService };
|
|
15621
|
+
export { ApplicationFillPercentageService, ApplicationService, ApplicationTagService, AuthenticationService, BackofficeCommonsComponent, BudgetApplicationService, BudgetService, BudgetSimulationService, CommitteMoneyServiceService, CommitteePdfService, CommitteeSnapshotService, CommonInfoService, CommonListsComponent, CommonService, ConfigurationCommonsComponent, ConfigurationDocumentService, ConfigurationMinisiteService, ConfigurationService, ConfigurationTokenComponent, ConfigurationTokenSubjectService, CreditScoreService, CreditStudyService, CubeService, CurrencyColfuturoFormatterDirective, CurrencyColfuturoPipe, CurrencyDecimalColfuturoFormatterDirective, CurrencyDecimalColfuturoPipe, CurrencyPrintColfuturoPipe, CustomValidator, DashboardCommonsComponent, DataFormService, DataLetterSegmentationService, DocumentAnalysisAutoService, DocumentHistoryService, DocumentManagementService, DocumentService, DocumentValidationAttemptService, DocumentaryTypeService, DynamicFilterComponent, EmailService, EvaluationService, ExcelToJsonComponent, ExportExcelService, FileService, FormService, FormUtil, FormioUtil, FrontofficeCommonsComponent, GicClientDisbursementMetadataService, GicClientService, GicCnfBankvisionTransactionService, GicCnfClosingDateService, GicCnfMaintenaceService, GicCollectionService, GicDisbursementService, GicPaymentApplicationService, GicPaymentPlanService, GlobalShowTaskService, GuaranteeDocumentService, GuaranteeEnrollmentService, GuaranteeService, GuaranteeTokenComponent, HashService, ImportDataService, ImportExcelGICService, InitialConfigurationGicParametersService, InitialRecordService, IntegrationADOService, InteractionApplicationUserService, InterestAdjustmentService, KeysAssignationService, LegalizationService, LetterCampaingService, LetterTaskMappingService, LogService, MaintenanceService, MigrationPlisService, MigrationSurveyQueueService, NgPliCommonsModule, NgPliCommonsService, PageService, PartnerService, PartnerSystemService, PdfAnalyzerComponent, PdfAnalyzerService, PdfConfigComponent, PdfGeneratorComponent, PdfMergeVisualizerComponent, PdfVisualizerComponent, PermissionService, PliCnfAcuityFieldsService, PliCnfAppCardFilterService, PliCnfAppointmentTypeService, PliCnfBudgetProgramTypeService, PliCnfBudgetService, PliCnfCloningService, PliCnfCommitteePdfConfigTableConfigService, PliCnfCommitteePdfGenStatusService, PliCnfCommitteeService, PliCnfCommitteeVisualizationModeService, PliCnfConfigMinisiteService, PliCnfConfigurationCreditStudyService, PliCnfDocumentManagementService, PliCnfDynamicKeysAssignService, PliCnfEvaluationTaskMailingService, PliCnfEvaluationTaskService, PliCnfEvaluationTemplateService, PliCnfFormEditService, PliCnfFormMultiaplicacionService, PliCnfGuaranteeDocumentsTemplateService, PliCnfGuaranteeTokenService, PliCnfHeaderService, PliCnfIndicatorService, PliCnfInformationSystemService, PliCnfInteractionService, PliCnfLetterTemplateService, PliCnfLetterTemplateTypeService, PliCnfLookAndFeelService, PliCnfMenuFormService, PliCnfMigrationPlisFieldBudgetService, PliCnfMigrationPlisFieldService, PliCnfMigrationStatusPlisService, PliCnfPageSectionFormService, PliCnfPageSubProcessService, PliCnfPdfsService, PliCnfProfileFormService, PliCnfProfileUserService, PliCnfProjectSummaryService, PliCnfScenarioService, PliCnfSegmentationService, PliCnfSnapshotTokenServices, PliCnfStatusFlowInteractionService, PliCnfStatusFlowService, PliCnfSupportDocumentCategoryService, PliCnfSupportDocumentService, PliCnfSurveyDocumentService, PliCnfSurveyPdfService, PliCnfSurveyService, PliCnfTaskGroupService, PliCnfTextCategoryService, PliCnfTextOptionService, PliCnfTextService, PliCnfTypeTextService, PliCnfUniversityArticleService, PliCnfUserCalendarService, PliCnfUserWorkspaceService, PliCnfValproKeysService, PliCnfWorkspaceSegmentationService, PliMultipleValueFilterService, PliPromocionUsernameService, PliSegActionUserService, PliSegmentationService, PliTagAssignmentService, PliTagService, PliUserService, PppService, ProfileService, ProgressBarComponent, ProgressBarService, PromotionScoreService, ReturnRefundService, SegmentationService, SegmentationTokensComponent, SegmentationTokensService, SegmentationUserService, SelectPppComponent, SendApplicationService, SesionFormService, SesionService, ShowHideColumnsTableComponent, SpinnerService, SponsorshipLetterService, StatusService, SummaryBudgetService, SurveyMetadataService, SurveyQueueService, SurveyService, TasaCambioService, ThousandsPipe, TokenComponent, TokenService, TokenTransformationService, TokensCalculatorComponent, UniversityService, UploadDocumentsService, UserService, VersionCommons, VisualizationCommitteeService };
|
|
15173
15622
|
//# sourceMappingURL=ng-pli-commons.mjs.map
|