ng-pli-commons 0.0.1335 → 0.0.1336
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/bundles/ng-pli-commons.umd.js +507 -469
- package/bundles/ng-pli-commons.umd.js.map +1 -1
- package/bundles/ng-pli-commons.umd.min.js +1 -1
- package/bundles/ng-pli-commons.umd.min.js.map +1 -1
- package/esm2015/lib/components/frontoffice.commons.component.js +16 -1
- package/esm2015/lib/services/common.service.js +29 -4
- package/esm2015/lib/services/ppp.service.js +4 -8
- package/esm2015/version.js +8 -8
- package/esm5/lib/components/frontoffice.commons.component.js +22 -1
- package/esm5/lib/services/common.service.js +29 -4
- package/esm5/lib/services/ppp.service.js +4 -8
- package/esm5/version.js +8 -8
- package/fesm2015/ng-pli-commons.js +613 -582
- package/fesm2015/ng-pli-commons.js.map +1 -1
- package/fesm5/ng-pli-commons.js +473 -435
- package/fesm5/ng-pli-commons.js.map +1 -1
- package/lib/components/frontoffice.commons.component.d.ts +10 -0
- package/lib/services/common.service.d.ts +9 -1
- package/lib/services/ppp.service.d.ts +1 -3
- package/ng-pli-commons.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -549,279 +549,6 @@
|
|
|
549
549
|
return TasaCambioService;
|
|
550
550
|
}());
|
|
551
551
|
|
|
552
|
-
var CommonService = /** @class */ (function () {
|
|
553
|
-
function CommonService(environment, httpClient, tasaCambioService) {
|
|
554
|
-
this.environment = environment;
|
|
555
|
-
this.httpClient = httpClient;
|
|
556
|
-
this.tasaCambioService = tasaCambioService;
|
|
557
|
-
this.headerJson = { headers: new i1$1.HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
558
|
-
/** Notify when the currencies info change */
|
|
559
|
-
this.currencyChanged = new rxjs.BehaviorSubject(undefined);
|
|
560
|
-
/** Notify when the categories info change */
|
|
561
|
-
this.categoryChanged = new rxjs.BehaviorSubject(undefined);
|
|
562
|
-
/** Notify when the exchange rate info change */
|
|
563
|
-
this.exchangeRateChanged = new rxjs.BehaviorSubject(undefined);
|
|
564
|
-
/** Notify when the idioma has changed */
|
|
565
|
-
this.languageChanged = new rxjs.BehaviorSubject(undefined);
|
|
566
|
-
/** Notify when the process info change */
|
|
567
|
-
this.processChanged = new rxjs.BehaviorSubject(undefined);
|
|
568
|
-
this.initValues();
|
|
569
|
-
}
|
|
570
|
-
/** It has an observable to notify if the language is changed */
|
|
571
|
-
CommonService.prototype.onLanguageChanged = function () {
|
|
572
|
-
return this.languageChanged.asObservable();
|
|
573
|
-
};
|
|
574
|
-
/** It has an observable to notify if the cateogry is changed */
|
|
575
|
-
CommonService.prototype.onCurrencyChanged = function () {
|
|
576
|
-
return this.currencyChanged.asObservable();
|
|
577
|
-
};
|
|
578
|
-
/** It has an observable to notify if the category is changed */
|
|
579
|
-
CommonService.prototype.onCategoryChanged = function () {
|
|
580
|
-
return this.categoryChanged.asObservable();
|
|
581
|
-
};
|
|
582
|
-
/** It has an observable to notify if the exchange rate is changed */
|
|
583
|
-
CommonService.prototype.onExchangeRateChanged = function () {
|
|
584
|
-
return this.exchangeRateChanged.asObservable();
|
|
585
|
-
};
|
|
586
|
-
/** It has an observable to notify if the list of process is changed */
|
|
587
|
-
CommonService.prototype.onProcessChanged = function () {
|
|
588
|
-
return this.processChanged.asObservable();
|
|
589
|
-
};
|
|
590
|
-
/**
|
|
591
|
-
* Search the info of the variables, first try to search in the local storage,
|
|
592
|
-
* if not find info, get the info from the services
|
|
593
|
-
*/
|
|
594
|
-
CommonService.prototype.initValues = function () {
|
|
595
|
-
this.searchLCurrency();
|
|
596
|
-
this.searchLCategory();
|
|
597
|
-
this.searchLExchangeRate();
|
|
598
|
-
this.searchLLanguage();
|
|
599
|
-
this.searchLProcess();
|
|
600
|
-
};
|
|
601
|
-
/**
|
|
602
|
-
* Remove all variables of the local storage
|
|
603
|
-
*/
|
|
604
|
-
CommonService.prototype.reloadValues = function () {
|
|
605
|
-
localStorage.removeItem('lCurrency');
|
|
606
|
-
localStorage.removeItem('lCategory');
|
|
607
|
-
localStorage.removeItem('lExchangeRate');
|
|
608
|
-
localStorage.removeItem('lLanguage');
|
|
609
|
-
localStorage.removeItem('lProcess');
|
|
610
|
-
};
|
|
611
|
-
/** Search list of currencies */
|
|
612
|
-
CommonService.prototype.getLanguages = function () {
|
|
613
|
-
var _this = this;
|
|
614
|
-
this.httpClient
|
|
615
|
-
.get(this.environment.host.backend.plis + 'idioma/getAll')
|
|
616
|
-
.subscribe(function (lLanguage) {
|
|
617
|
-
_this.setLLanguage(lLanguage);
|
|
618
|
-
}, function (error) {
|
|
619
|
-
console.error('Error - getListCurrencies -El sistema no responde', error);
|
|
620
|
-
});
|
|
621
|
-
};
|
|
622
|
-
/** Search list of currencies */
|
|
623
|
-
CommonService.prototype.getCurrencies = function () {
|
|
624
|
-
var _this = this;
|
|
625
|
-
this.httpClient
|
|
626
|
-
.get(this.environment.host.backend.plis + 'moneda/getAll')
|
|
627
|
-
.subscribe(function (lCurrency) {
|
|
628
|
-
_this.setLCurrencies(lCurrency);
|
|
629
|
-
}, function (error) {
|
|
630
|
-
console.error('Error - getListCurrencies -El sistema no responde', error);
|
|
631
|
-
});
|
|
632
|
-
};
|
|
633
|
-
/** Search list of categories */
|
|
634
|
-
CommonService.prototype.getCategories = function () {
|
|
635
|
-
var _this = this;
|
|
636
|
-
this.httpClient
|
|
637
|
-
.get(this.environment.host.backend.plis + 'rubro/getAll', {
|
|
638
|
-
params: new i1$1.HttpParams().set('cargarListas', 'true')
|
|
639
|
-
})
|
|
640
|
-
.subscribe(function (lCategory) {
|
|
641
|
-
_this.setLCategory(lCategory);
|
|
642
|
-
}, function (error) {
|
|
643
|
-
console.error('Error - getCategories -El sistema no responde', error);
|
|
644
|
-
});
|
|
645
|
-
};
|
|
646
|
-
/** Search list of exchange rates */
|
|
647
|
-
CommonService.prototype.getExchangeRate = function (date) {
|
|
648
|
-
var _this = this;
|
|
649
|
-
this.tasaCambioService.getAllTasaCambioLightInDate(date).subscribe(function (lExchangeRate) {
|
|
650
|
-
_this.setLExchangeRate(lExchangeRate);
|
|
651
|
-
}, function (error) {
|
|
652
|
-
console.error('Error - getExchangeRate -El sistema no responde', error);
|
|
653
|
-
});
|
|
654
|
-
};
|
|
655
|
-
/** Search list of exchange rates */
|
|
656
|
-
CommonService.prototype.getProcess = function () {
|
|
657
|
-
var _this = this;
|
|
658
|
-
this.httpClient
|
|
659
|
-
.get(this.environment.host.backend.plis + 'common/getAllProcesos')
|
|
660
|
-
.subscribe(function (lProcess) {
|
|
661
|
-
_this.setLProcess(lProcess);
|
|
662
|
-
}, function (error) {
|
|
663
|
-
console.error('Error - getProcess -El sistema no responde', error);
|
|
664
|
-
});
|
|
665
|
-
};
|
|
666
|
-
CommonService.prototype.setLCurrencies = function (lCurrency) {
|
|
667
|
-
for (var key in lCurrency) {
|
|
668
|
-
var currency = Object.assign(new ngPliUtil.Moneda(), lCurrency[key]);
|
|
669
|
-
lCurrency[key] = currency;
|
|
670
|
-
}
|
|
671
|
-
this.lCurrency = lCurrency;
|
|
672
|
-
var lCurrencySlice = this.lCurrency.slice();
|
|
673
|
-
localStorage.setItem('lCurrency', JSON.stringify(lCurrencySlice));
|
|
674
|
-
this.currencyChanged.next(lCurrencySlice);
|
|
675
|
-
};
|
|
676
|
-
CommonService.prototype.setLCategory = function (lCategory) {
|
|
677
|
-
for (var key in lCategory) {
|
|
678
|
-
var category = Object.assign(new ngPliUtil.Rubro(), lCategory[key]);
|
|
679
|
-
lCategory[key] = category;
|
|
680
|
-
}
|
|
681
|
-
this.lCategory = lCategory;
|
|
682
|
-
var lCategorySlice = this.lCategory.slice();
|
|
683
|
-
localStorage.setItem('lCategory', JSON.stringify(lCategorySlice));
|
|
684
|
-
this.categoryChanged.next(lCategorySlice);
|
|
685
|
-
};
|
|
686
|
-
CommonService.prototype.setLLanguage = function (lLanguage) {
|
|
687
|
-
this.lLanguage = lLanguage;
|
|
688
|
-
var lLanguageSlice = this.lLanguage ? this.lLanguage.slice() : this.lLanguage;
|
|
689
|
-
localStorage.setItem('lLanguage', JSON.stringify(lLanguageSlice));
|
|
690
|
-
this.languageChanged.next(lLanguageSlice);
|
|
691
|
-
};
|
|
692
|
-
CommonService.prototype.setLExchangeRate = function (lExchangeRate) {
|
|
693
|
-
for (var key in lExchangeRate) {
|
|
694
|
-
var exchangeRate = Object.assign(new ngPliUtil.TasaCambio(), lExchangeRate[key]);
|
|
695
|
-
lExchangeRate[key] = exchangeRate;
|
|
696
|
-
}
|
|
697
|
-
this.lExchangeRate = lExchangeRate;
|
|
698
|
-
var lExchangeRateSlice = this.lExchangeRate
|
|
699
|
-
? this.lExchangeRate.slice()
|
|
700
|
-
: this.lExchangeRate;
|
|
701
|
-
localStorage.setItem('lExchangeRate', JSON.stringify(lExchangeRateSlice));
|
|
702
|
-
this.exchangeRateChanged.next(lExchangeRateSlice);
|
|
703
|
-
};
|
|
704
|
-
CommonService.prototype.setLProcess = function (lProcess) {
|
|
705
|
-
for (var key in lProcess) {
|
|
706
|
-
var process = Object.assign(new ngPliUtil.Proceso(), lProcess[key]);
|
|
707
|
-
lProcess[key] = process;
|
|
708
|
-
}
|
|
709
|
-
this.lProcess = lProcess;
|
|
710
|
-
var lProcessSlice = this.lProcess ? this.lProcess.slice() : this.lProcess;
|
|
711
|
-
localStorage.setItem('lProcess', JSON.stringify(lProcessSlice));
|
|
712
|
-
this.processChanged.next(lProcessSlice);
|
|
713
|
-
};
|
|
714
|
-
CommonService.prototype.searchLCurrency = function () {
|
|
715
|
-
var lCurrency = localStorage.getItem('lCurrency');
|
|
716
|
-
if (!lCurrency || lCurrency === 'undefined') {
|
|
717
|
-
this.getCurrencies();
|
|
718
|
-
}
|
|
719
|
-
else {
|
|
720
|
-
this.setLCurrencies(JSON.parse(lCurrency));
|
|
721
|
-
}
|
|
722
|
-
};
|
|
723
|
-
CommonService.prototype.searchLLanguage = function () {
|
|
724
|
-
var lLanguage = localStorage.getItem('lLanguage');
|
|
725
|
-
if (!lLanguage || lLanguage === 'undefined') {
|
|
726
|
-
this.getLanguages();
|
|
727
|
-
}
|
|
728
|
-
else {
|
|
729
|
-
this.setLLanguage(JSON.parse(lLanguage));
|
|
730
|
-
}
|
|
731
|
-
};
|
|
732
|
-
CommonService.prototype.searchLCategory = function () {
|
|
733
|
-
var lCategory = localStorage.getItem('lCategory');
|
|
734
|
-
if (!lCategory || lCategory === 'undefined') {
|
|
735
|
-
this.getCategories();
|
|
736
|
-
}
|
|
737
|
-
else {
|
|
738
|
-
this.setLCategory(JSON.parse(lCategory));
|
|
739
|
-
}
|
|
740
|
-
};
|
|
741
|
-
CommonService.prototype.searchLExchangeRate = function () {
|
|
742
|
-
var searchER = false;
|
|
743
|
-
var searchDate = ngPliUtil.DateUtil.getMomentTimeZone();
|
|
744
|
-
// let searchDay = searchDate.date();
|
|
745
|
-
var lExchangeRateString = localStorage.getItem('lExchangeRate');
|
|
746
|
-
var lExchangeRate = [];
|
|
747
|
-
if (lExchangeRateString &&
|
|
748
|
-
lExchangeRateString != 'undefined' &&
|
|
749
|
-
lExchangeRateString.length > 0) {
|
|
750
|
-
lExchangeRate = JSON.parse(lExchangeRateString);
|
|
751
|
-
if (lExchangeRate && lExchangeRate.length > 0) {
|
|
752
|
-
var dayER = ngPliUtil.DateUtil.getFormatDateTimeZone(lExchangeRate[0].tcamFecha);
|
|
753
|
-
if (!ngPliUtil.DateUtil.isDayEqualString(searchDate.format(), dayER)) {
|
|
754
|
-
searchER = true;
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
else {
|
|
759
|
-
searchER = true;
|
|
760
|
-
}
|
|
761
|
-
if (searchER || !lExchangeRate || lExchangeRate.length == 0) {
|
|
762
|
-
this.getExchangeRate(searchDate.format('YYYY-MM-DD') + ' 00:00:00');
|
|
763
|
-
}
|
|
764
|
-
else {
|
|
765
|
-
this.setLExchangeRate(lExchangeRate);
|
|
766
|
-
}
|
|
767
|
-
};
|
|
768
|
-
CommonService.prototype.searchLProcess = function () {
|
|
769
|
-
var lProcess = localStorage.getItem('lProcess');
|
|
770
|
-
if (!lProcess || lProcess === 'undefined') {
|
|
771
|
-
this.getProcess();
|
|
772
|
-
}
|
|
773
|
-
else {
|
|
774
|
-
this.setLProcess(JSON.parse(lProcess));
|
|
775
|
-
}
|
|
776
|
-
};
|
|
777
|
-
/**
|
|
778
|
-
* It returns
|
|
779
|
-
* @param html
|
|
780
|
-
*/
|
|
781
|
-
CommonService.prototype.getBase64Pdf = function (requestPdf) {
|
|
782
|
-
return this.httpClient.post(this.environment.host.backend.backoffice + 'pdf/getBase64Pdf', requestPdf, this.headerJson);
|
|
783
|
-
};
|
|
784
|
-
/**
|
|
785
|
-
* It returns a pdf
|
|
786
|
-
* @param lPdfRequest
|
|
787
|
-
*/
|
|
788
|
-
CommonService.prototype.getBase64PdfList = function (lPdfRequest) {
|
|
789
|
-
return this.httpClient.post(this.environment.host.backend.backoffice + 'pdf/getBase64PdfList', lPdfRequest, this.headerJson);
|
|
790
|
-
};
|
|
791
|
-
/**
|
|
792
|
-
* It returns
|
|
793
|
-
* @param html
|
|
794
|
-
*/
|
|
795
|
-
CommonService.prototype.getBase64PdfByUrl = function (urlFile) {
|
|
796
|
-
return this.httpClient.post(this.environment.host.backend.backoffice + 'pdf/getBase64PdfByUrl', urlFile, this.headerJson);
|
|
797
|
-
};
|
|
798
|
-
/**
|
|
799
|
-
* It returns
|
|
800
|
-
* @param urlFile
|
|
801
|
-
*/
|
|
802
|
-
CommonService.prototype.getBase64ImageByUrl = function (urlFile) {
|
|
803
|
-
return this.httpClient.post(this.environment.host.backend.backoffice + 'pdf/getBase64ImageByUrl', urlFile, this.headerJson);
|
|
804
|
-
};
|
|
805
|
-
/** Get the actual date */
|
|
806
|
-
CommonService.prototype.getActualDate = function () {
|
|
807
|
-
return this.httpClient.get(this.environment.host.backend.configuration + 'configuration/getActualDate');
|
|
808
|
-
};
|
|
809
|
-
CommonService.decorators = [
|
|
810
|
-
{ type: i0.Injectable, args: [{
|
|
811
|
-
providedIn: 'root'
|
|
812
|
-
},] }
|
|
813
|
-
];
|
|
814
|
-
CommonService.ctorParameters = function () {
|
|
815
|
-
return [
|
|
816
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: ['environment',] }] },
|
|
817
|
-
{ type: i1$1.HttpClient },
|
|
818
|
-
{ type: TasaCambioService }
|
|
819
|
-
];
|
|
820
|
-
};
|
|
821
|
-
CommonService.ngInjectableDef = i0.defineInjectable({ factory: function CommonService_Factory() { return new CommonService(i0.inject("environment"), i0.inject(i1$1.HttpClient), i0.inject(TasaCambioService)); }, token: CommonService, providedIn: "root" });
|
|
822
|
-
return CommonService;
|
|
823
|
-
}());
|
|
824
|
-
|
|
825
552
|
var HashService = /** @class */ (function () {
|
|
826
553
|
function HashService(environment, httpClient) {
|
|
827
554
|
this.environment = environment;
|
|
@@ -934,55 +661,201 @@
|
|
|
934
661
|
}, function (error) { return reject(errorMessage); });
|
|
935
662
|
});
|
|
936
663
|
};
|
|
937
|
-
AuthenticationService.prototype.getLink = function (patCodigo) {
|
|
938
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
939
|
-
var logoutUrl, loginUrl, idPatrocinador, idPlataforma, hash, error_1;
|
|
940
|
-
return __generator(this, function (_a) {
|
|
941
|
-
switch (_a.label) {
|
|
942
|
-
case 0:
|
|
943
|
-
logoutUrl = '';
|
|
944
|
-
loginUrl = new URL(this.environment.host.frontend.login);
|
|
945
|
-
idPatrocinador = loginUrl.searchParams.get('idPatrocinador');
|
|
946
|
-
idPlataforma = loginUrl.searchParams.get('idPlataforma');
|
|
947
|
-
loginUrl.searchParams.append('idPatrocinadorPLIC', patCodigo);
|
|
948
|
-
_a.label = 1;
|
|
949
|
-
case 1:
|
|
950
|
-
_a.trys.push([1, 3, , 4]);
|
|
951
|
-
return [4 /*yield*/, this.getHash(idPatrocinador, idPlataforma, patCodigo)];
|
|
952
|
-
case 2:
|
|
953
|
-
hash = _a.sent();
|
|
954
|
-
loginUrl.searchParams.set('hash', hash);
|
|
955
|
-
logoutUrl = loginUrl.href;
|
|
956
|
-
return [3 /*break*/, 4];
|
|
957
|
-
case 3:
|
|
958
|
-
error_1 = _a.sent();
|
|
959
|
-
return [3 /*break*/, 4];
|
|
960
|
-
case 4: return [2 /*return*/, logoutUrl];
|
|
961
|
-
}
|
|
962
|
-
});
|
|
664
|
+
AuthenticationService.prototype.getLink = function (patCodigo) {
|
|
665
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
666
|
+
var logoutUrl, loginUrl, idPatrocinador, idPlataforma, hash, error_1;
|
|
667
|
+
return __generator(this, function (_a) {
|
|
668
|
+
switch (_a.label) {
|
|
669
|
+
case 0:
|
|
670
|
+
logoutUrl = '';
|
|
671
|
+
loginUrl = new URL(this.environment.host.frontend.login);
|
|
672
|
+
idPatrocinador = loginUrl.searchParams.get('idPatrocinador');
|
|
673
|
+
idPlataforma = loginUrl.searchParams.get('idPlataforma');
|
|
674
|
+
loginUrl.searchParams.append('idPatrocinadorPLIC', patCodigo);
|
|
675
|
+
_a.label = 1;
|
|
676
|
+
case 1:
|
|
677
|
+
_a.trys.push([1, 3, , 4]);
|
|
678
|
+
return [4 /*yield*/, this.getHash(idPatrocinador, idPlataforma, patCodigo)];
|
|
679
|
+
case 2:
|
|
680
|
+
hash = _a.sent();
|
|
681
|
+
loginUrl.searchParams.set('hash', hash);
|
|
682
|
+
logoutUrl = loginUrl.href;
|
|
683
|
+
return [3 /*break*/, 4];
|
|
684
|
+
case 3:
|
|
685
|
+
error_1 = _a.sent();
|
|
686
|
+
return [3 /*break*/, 4];
|
|
687
|
+
case 4: return [2 /*return*/, logoutUrl];
|
|
688
|
+
}
|
|
689
|
+
});
|
|
690
|
+
});
|
|
691
|
+
};
|
|
692
|
+
AuthenticationService.decorators = [
|
|
693
|
+
{ type: i0.Injectable, args: [{
|
|
694
|
+
providedIn: 'root'
|
|
695
|
+
},] }
|
|
696
|
+
];
|
|
697
|
+
AuthenticationService.ctorParameters = function () {
|
|
698
|
+
return [
|
|
699
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: ['environment',] }] },
|
|
700
|
+
{ type: i1$1.HttpClient },
|
|
701
|
+
{ type: HashService }
|
|
702
|
+
];
|
|
703
|
+
};
|
|
704
|
+
AuthenticationService.ngInjectableDef = i0.defineInjectable({ factory: function AuthenticationService_Factory() { return new AuthenticationService(i0.inject("environment"), i0.inject(i1$1.HttpClient), i0.inject(HashService)); }, token: AuthenticationService, providedIn: "root" });
|
|
705
|
+
return AuthenticationService;
|
|
706
|
+
}());
|
|
707
|
+
|
|
708
|
+
var StatusService = /** @class */ (function () {
|
|
709
|
+
function StatusService(environment, httpClient, authService) {
|
|
710
|
+
this.environment = environment;
|
|
711
|
+
this.httpClient = httpClient;
|
|
712
|
+
this.authService = authService;
|
|
713
|
+
this.headerJson = { headers: new i1$1.HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
714
|
+
}
|
|
715
|
+
/** It returns all list of status by prom code */
|
|
716
|
+
StatusService.prototype.getById = function (statusId) {
|
|
717
|
+
return this.httpClient.get(this.environment.host.backend.configuration + 'pliCnfStatus/getById', { params: new i1$1.HttpParams().set('statusId', statusId.toString()) });
|
|
718
|
+
};
|
|
719
|
+
/** It returns all list of status by prom code */
|
|
720
|
+
StatusService.prototype.getAllByPromCode = function (promCode) {
|
|
721
|
+
return this.httpClient.get(this.environment.host.backend.configuration + 'pliCnfStatus/getAllByPromCode', { params: new i1$1.HttpParams().set('promCodigo', promCode.toString()) });
|
|
722
|
+
};
|
|
723
|
+
/** It returns all list of status by prom code */
|
|
724
|
+
StatusService.prototype.getAllByPromCodeAndName = function (promCode, name) {
|
|
725
|
+
return this.httpClient.get(this.environment.host.backend.configuration + 'pliCnfStatus/getAllByPromCodeAndName', { params: new i1$1.HttpParams().set('promCodigo', promCode.toString()).set('name', name) });
|
|
726
|
+
};
|
|
727
|
+
StatusService.prototype.getFinalStatusByStaticInteraction = function (promCode, staticInteractionId) {
|
|
728
|
+
return this.httpClient.get(this.environment.host.backend.configuration +
|
|
729
|
+
'pliCnfStatus/getFinalStatusByStaticInteraction', {
|
|
730
|
+
params: new i1$1.HttpParams()
|
|
731
|
+
.set('promCodigo', promCode.toString())
|
|
732
|
+
.set('staticInteractionId', staticInteractionId.toString())
|
|
733
|
+
});
|
|
734
|
+
};
|
|
735
|
+
/** It returns all list of status by prom code */
|
|
736
|
+
StatusService.prototype.getInitialStatusByPromCode = function (promCode) {
|
|
737
|
+
return this.httpClient.get(this.environment.host.backend.configuration + 'pliCnfStatus/getInitialStatusByPromCode', { params: new i1$1.HttpParams().set('promCodigo', promCode.toString()) });
|
|
738
|
+
};
|
|
739
|
+
StatusService.prototype.save = function (cnfStatus) {
|
|
740
|
+
return this.httpClient.post(this.environment.host.backend.configuration + 'pliCnfStatus/save', cnfStatus, ngPliUtil.HEADER_JSON);
|
|
741
|
+
};
|
|
742
|
+
StatusService.prototype.getStatusByPromcodigoAndPageSection = function (promCodigo, pageId) {
|
|
743
|
+
return this.httpClient.get(this.environment.host.backend.configuration +
|
|
744
|
+
'pliCnfStatus/getStatusByPromcodigoAndPageSection', {
|
|
745
|
+
params: new i1$1.HttpParams()
|
|
746
|
+
.set('promCodigo', promCodigo.toString())
|
|
747
|
+
.set('pageId', pageId.toString())
|
|
748
|
+
});
|
|
749
|
+
};
|
|
750
|
+
StatusService.prototype.getStatusByPromCodigoAndCategoryId = function (promCodigo, categoryId) {
|
|
751
|
+
return this.httpClient.get(this.environment.host.backend.configuration +
|
|
752
|
+
'pliCnfStatus/getStatusByPromCodigoAndCategoryId', {
|
|
753
|
+
params: new i1$1.HttpParams()
|
|
754
|
+
.set('promCodigo', promCodigo.toString())
|
|
755
|
+
.set('categoryId', categoryId.toString())
|
|
756
|
+
});
|
|
757
|
+
};
|
|
758
|
+
StatusService.prototype.getByInitialStatusAndPromCodigoAndCategoryId = function (initialStatus, promCodigo, categoryId) {
|
|
759
|
+
return this.httpClient.get(this.environment.host.backend.configuration +
|
|
760
|
+
'pliCnfStatus/getByInitialStatusAndPromCodigoAndCategoryId', {
|
|
761
|
+
params: new i1$1.HttpParams()
|
|
762
|
+
.set('initialStatus', initialStatus.toString())
|
|
763
|
+
.set('promCodigo', promCodigo.toString())
|
|
764
|
+
.set('categoryId', categoryId.toString())
|
|
765
|
+
});
|
|
766
|
+
};
|
|
767
|
+
StatusService.prototype.getByPromCodigoAndFinalStatus = function (promCodigo, finalStatus) {
|
|
768
|
+
return this.httpClient.get(this.environment.host.backend.configuration +
|
|
769
|
+
'pliCnfStatus/getByPromCodigoAndFinalStatus', {
|
|
770
|
+
params: new i1$1.HttpParams()
|
|
771
|
+
.set('promCodigo', promCodigo.toString())
|
|
772
|
+
.set('finalStatus', finalStatus.toString())
|
|
773
|
+
});
|
|
774
|
+
};
|
|
775
|
+
StatusService.prototype.getInitialStatusByStaticInteraction = function (promCodigo, staticInteractionId) {
|
|
776
|
+
return this.httpClient.get(this.environment.host.backend.configuration +
|
|
777
|
+
'pliCnfStatus/getInitialStatusByStaticInteraction', {
|
|
778
|
+
params: new i1$1.HttpParams()
|
|
779
|
+
.set('promCodigo', promCodigo)
|
|
780
|
+
.set('staticInteractionId', staticInteractionId)
|
|
781
|
+
});
|
|
782
|
+
};
|
|
783
|
+
StatusService.prototype.getConfigCloningStatusMap = function (lStatus) {
|
|
784
|
+
return this.httpClient.post(this.environment.host.backend.configuration + 'pliCnfStatus/getConfigCloningStatusMap', lStatus);
|
|
785
|
+
};
|
|
786
|
+
StatusService.decorators = [
|
|
787
|
+
{ type: i0.Injectable, args: [{
|
|
788
|
+
providedIn: 'root'
|
|
789
|
+
},] }
|
|
790
|
+
];
|
|
791
|
+
StatusService.ctorParameters = function () {
|
|
792
|
+
return [
|
|
793
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: ['environment',] }] },
|
|
794
|
+
{ type: i1$1.HttpClient },
|
|
795
|
+
{ type: AuthenticationService }
|
|
796
|
+
];
|
|
797
|
+
};
|
|
798
|
+
StatusService.ngInjectableDef = i0.defineInjectable({ factory: function StatusService_Factory() { return new StatusService(i0.inject("environment"), i0.inject(i1$1.HttpClient), i0.inject(AuthenticationService)); }, token: StatusService, providedIn: "root" });
|
|
799
|
+
return StatusService;
|
|
800
|
+
}());
|
|
801
|
+
|
|
802
|
+
var ConfigurationService = /** @class */ (function () {
|
|
803
|
+
function ConfigurationService(environment, httpClient) {
|
|
804
|
+
this.environment = environment;
|
|
805
|
+
this.httpClient = httpClient;
|
|
806
|
+
}
|
|
807
|
+
/** Get the actual date */
|
|
808
|
+
ConfigurationService.prototype.getActualDate = function () {
|
|
809
|
+
return this.httpClient.get(this.environment.host.backend.configuration + 'configuration/getActualDate');
|
|
810
|
+
};
|
|
811
|
+
/** Get the actual date */
|
|
812
|
+
ConfigurationService.prototype.getDate = function (date) {
|
|
813
|
+
if (date === void 0) {
|
|
814
|
+
date = undefined;
|
|
815
|
+
}
|
|
816
|
+
date = date === undefined ? null : date;
|
|
817
|
+
// if (date !== undefined) {
|
|
818
|
+
return this.httpClient.post(this.environment.host.backend.configuration + 'configuration/getDate', date, ngPliUtil.HEADER_JSON);
|
|
819
|
+
// } else {
|
|
820
|
+
// return this.httpClient.post(
|
|
821
|
+
// this.environment.host.backend.configuration + 'configuration/getDate',
|
|
822
|
+
// null,
|
|
823
|
+
// HEADER_JSON
|
|
824
|
+
// );
|
|
825
|
+
// }
|
|
826
|
+
// return this.httpClient.get(
|
|
827
|
+
// this.environment.host.backend.configuration + 'configuration/getActualDate'
|
|
828
|
+
// );
|
|
829
|
+
};
|
|
830
|
+
ConfigurationService.prototype.getFileByUrl = function (url, name) {
|
|
831
|
+
var headers = new i1$1.HttpHeaders();
|
|
832
|
+
headers.set('Accept', 'application/pdf');
|
|
833
|
+
headers.set('Authorization', 'Bearer ' + ngPliUtil.AuthenticationUtil.getToken());
|
|
834
|
+
return this.httpClient.get(this.environment.host.backend.configuration + 'configuration/getFileByUrl', {
|
|
835
|
+
params: new i1$1.HttpParams().set('url', url).set('name', name),
|
|
836
|
+
headers: headers,
|
|
837
|
+
responseType: 'blob'
|
|
963
838
|
});
|
|
964
839
|
};
|
|
965
|
-
|
|
840
|
+
ConfigurationService.decorators = [
|
|
966
841
|
{ type: i0.Injectable, args: [{
|
|
967
842
|
providedIn: 'root'
|
|
968
843
|
},] }
|
|
969
844
|
];
|
|
970
|
-
|
|
845
|
+
ConfigurationService.ctorParameters = function () {
|
|
971
846
|
return [
|
|
972
847
|
{ type: undefined, decorators: [{ type: i0.Inject, args: ['environment',] }] },
|
|
973
|
-
{ type: i1$1.HttpClient }
|
|
974
|
-
{ type: HashService }
|
|
848
|
+
{ type: i1$1.HttpClient }
|
|
975
849
|
];
|
|
976
850
|
};
|
|
977
|
-
|
|
978
|
-
return
|
|
851
|
+
ConfigurationService.ngInjectableDef = i0.defineInjectable({ factory: function ConfigurationService_Factory() { return new ConfigurationService(i0.inject("environment"), i0.inject(i1$1.HttpClient)); }, token: ConfigurationService, providedIn: "root" });
|
|
852
|
+
return ConfigurationService;
|
|
979
853
|
}());
|
|
980
854
|
|
|
981
855
|
var PppService = /** @class */ (function () {
|
|
982
|
-
function PppService(environment, httpClient
|
|
856
|
+
function PppService(environment, httpClient) {
|
|
983
857
|
this.environment = environment;
|
|
984
858
|
this.httpClient = httpClient;
|
|
985
|
-
this.authService = authService;
|
|
986
859
|
this.headerJson = { headers: new i1$1.HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
987
860
|
/** This observable allows to verify if ppp is created */
|
|
988
861
|
this.subjectPpp = new rxjs.BehaviorSubject(undefined);
|
|
@@ -1578,24 +1451,315 @@
|
|
|
1578
1451
|
}
|
|
1579
1452
|
}
|
|
1580
1453
|
}
|
|
1581
|
-
return lPliPatrocinador;
|
|
1454
|
+
return lPliPatrocinador;
|
|
1455
|
+
};
|
|
1456
|
+
/** It contains the key of the json web token */
|
|
1457
|
+
PppService.TOKEN_PPP = 'tokenPpp';
|
|
1458
|
+
PppService.decorators = [
|
|
1459
|
+
{ type: i0.Injectable, args: [{
|
|
1460
|
+
providedIn: 'root'
|
|
1461
|
+
},] }
|
|
1462
|
+
];
|
|
1463
|
+
PppService.ctorParameters = function () {
|
|
1464
|
+
return [
|
|
1465
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: ['environment',] }] },
|
|
1466
|
+
{ type: i1$1.HttpClient }
|
|
1467
|
+
];
|
|
1468
|
+
};
|
|
1469
|
+
PppService.ngInjectableDef = i0.defineInjectable({ factory: function PppService_Factory() { return new PppService(i0.inject("environment"), i0.inject(i1$1.HttpClient)); }, token: PppService, providedIn: "root" });
|
|
1470
|
+
return PppService;
|
|
1471
|
+
}());
|
|
1472
|
+
|
|
1473
|
+
var CommonService = /** @class */ (function () {
|
|
1474
|
+
function CommonService(environment, httpClient, tasaCambioService, pppService, statusService, configurationService) {
|
|
1475
|
+
this.environment = environment;
|
|
1476
|
+
this.httpClient = httpClient;
|
|
1477
|
+
this.tasaCambioService = tasaCambioService;
|
|
1478
|
+
this.pppService = pppService;
|
|
1479
|
+
this.statusService = statusService;
|
|
1480
|
+
this.configurationService = configurationService;
|
|
1481
|
+
this.headerJson = { headers: new i1$1.HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
1482
|
+
/** Notify when the currencies info change */
|
|
1483
|
+
this.currencyChanged = new rxjs.BehaviorSubject(undefined);
|
|
1484
|
+
/** Notify when the categories info change */
|
|
1485
|
+
this.categoryChanged = new rxjs.BehaviorSubject(undefined);
|
|
1486
|
+
/** Notify when the exchange rate info change */
|
|
1487
|
+
this.exchangeRateChanged = new rxjs.BehaviorSubject(undefined);
|
|
1488
|
+
/** Notify when the idioma has changed */
|
|
1489
|
+
this.languageChanged = new rxjs.BehaviorSubject(undefined);
|
|
1490
|
+
/** Notify when the process info change */
|
|
1491
|
+
this.processChanged = new rxjs.BehaviorSubject(undefined);
|
|
1492
|
+
this.initValues();
|
|
1493
|
+
}
|
|
1494
|
+
/** It has an observable to notify if the language is changed */
|
|
1495
|
+
CommonService.prototype.onLanguageChanged = function () {
|
|
1496
|
+
return this.languageChanged.asObservable();
|
|
1497
|
+
};
|
|
1498
|
+
/** It has an observable to notify if the cateogry is changed */
|
|
1499
|
+
CommonService.prototype.onCurrencyChanged = function () {
|
|
1500
|
+
return this.currencyChanged.asObservable();
|
|
1501
|
+
};
|
|
1502
|
+
/** It has an observable to notify if the category is changed */
|
|
1503
|
+
CommonService.prototype.onCategoryChanged = function () {
|
|
1504
|
+
return this.categoryChanged.asObservable();
|
|
1505
|
+
};
|
|
1506
|
+
/** It has an observable to notify if the exchange rate is changed */
|
|
1507
|
+
CommonService.prototype.onExchangeRateChanged = function () {
|
|
1508
|
+
return this.exchangeRateChanged.asObservable();
|
|
1509
|
+
};
|
|
1510
|
+
/** It has an observable to notify if the list of process is changed */
|
|
1511
|
+
CommonService.prototype.onProcessChanged = function () {
|
|
1512
|
+
return this.processChanged.asObservable();
|
|
1513
|
+
};
|
|
1514
|
+
/**
|
|
1515
|
+
* Search the info of the variables, first try to search in the local storage,
|
|
1516
|
+
* if not find info, get the info from the services
|
|
1517
|
+
*/
|
|
1518
|
+
CommonService.prototype.initValues = function () {
|
|
1519
|
+
this.searchLCurrency();
|
|
1520
|
+
this.searchLCategory();
|
|
1521
|
+
this.searchLExchangeRate();
|
|
1522
|
+
this.searchLLanguage();
|
|
1523
|
+
this.searchLProcess();
|
|
1524
|
+
};
|
|
1525
|
+
/**
|
|
1526
|
+
* Remove all variables of the local storage
|
|
1527
|
+
*/
|
|
1528
|
+
CommonService.prototype.reloadValues = function () {
|
|
1529
|
+
localStorage.removeItem('lCurrency');
|
|
1530
|
+
localStorage.removeItem('lCategory');
|
|
1531
|
+
localStorage.removeItem('lExchangeRate');
|
|
1532
|
+
localStorage.removeItem('lLanguage');
|
|
1533
|
+
localStorage.removeItem('lProcess');
|
|
1534
|
+
};
|
|
1535
|
+
/** Search list of currencies */
|
|
1536
|
+
CommonService.prototype.getLanguages = function () {
|
|
1537
|
+
var _this = this;
|
|
1538
|
+
this.httpClient
|
|
1539
|
+
.get(this.environment.host.backend.plis + 'idioma/getAll')
|
|
1540
|
+
.subscribe(function (lLanguage) {
|
|
1541
|
+
_this.setLLanguage(lLanguage);
|
|
1542
|
+
}, function (error) {
|
|
1543
|
+
console.error('Error - getListCurrencies -El sistema no responde', error);
|
|
1544
|
+
});
|
|
1545
|
+
};
|
|
1546
|
+
/** Search list of currencies */
|
|
1547
|
+
CommonService.prototype.getCurrencies = function () {
|
|
1548
|
+
var _this = this;
|
|
1549
|
+
this.httpClient
|
|
1550
|
+
.get(this.environment.host.backend.plis + 'moneda/getAll')
|
|
1551
|
+
.subscribe(function (lCurrency) {
|
|
1552
|
+
_this.setLCurrencies(lCurrency);
|
|
1553
|
+
}, function (error) {
|
|
1554
|
+
console.error('Error - getListCurrencies -El sistema no responde', error);
|
|
1555
|
+
});
|
|
1556
|
+
};
|
|
1557
|
+
/** Search list of categories */
|
|
1558
|
+
CommonService.prototype.getCategories = function () {
|
|
1559
|
+
var _this = this;
|
|
1560
|
+
this.httpClient
|
|
1561
|
+
.get(this.environment.host.backend.plis + 'rubro/getAll', {
|
|
1562
|
+
params: new i1$1.HttpParams().set('cargarListas', 'true')
|
|
1563
|
+
})
|
|
1564
|
+
.subscribe(function (lCategory) {
|
|
1565
|
+
_this.setLCategory(lCategory);
|
|
1566
|
+
}, function (error) {
|
|
1567
|
+
console.error('Error - getCategories -El sistema no responde', error);
|
|
1568
|
+
});
|
|
1569
|
+
};
|
|
1570
|
+
/** Search list of exchange rates */
|
|
1571
|
+
CommonService.prototype.getExchangeRate = function (date) {
|
|
1572
|
+
var _this = this;
|
|
1573
|
+
this.tasaCambioService.getAllTasaCambioLightInDate(date).subscribe(function (lExchangeRate) {
|
|
1574
|
+
_this.setLExchangeRate(lExchangeRate);
|
|
1575
|
+
}, function (error) {
|
|
1576
|
+
console.error('Error - getExchangeRate -El sistema no responde', error);
|
|
1577
|
+
});
|
|
1578
|
+
};
|
|
1579
|
+
/** Search list of exchange rates */
|
|
1580
|
+
CommonService.prototype.getProcess = function () {
|
|
1581
|
+
var _this = this;
|
|
1582
|
+
this.httpClient
|
|
1583
|
+
.get(this.environment.host.backend.plis + 'common/getAllProcesos')
|
|
1584
|
+
.subscribe(function (lProcess) {
|
|
1585
|
+
_this.setLProcess(lProcess);
|
|
1586
|
+
}, function (error) {
|
|
1587
|
+
console.error('Error - getProcess -El sistema no responde', error);
|
|
1588
|
+
});
|
|
1589
|
+
};
|
|
1590
|
+
CommonService.prototype.setLCurrencies = function (lCurrency) {
|
|
1591
|
+
for (var key in lCurrency) {
|
|
1592
|
+
var currency = Object.assign(new ngPliUtil.Moneda(), lCurrency[key]);
|
|
1593
|
+
lCurrency[key] = currency;
|
|
1594
|
+
}
|
|
1595
|
+
this.lCurrency = lCurrency;
|
|
1596
|
+
var lCurrencySlice = this.lCurrency.slice();
|
|
1597
|
+
localStorage.setItem('lCurrency', JSON.stringify(lCurrencySlice));
|
|
1598
|
+
this.currencyChanged.next(lCurrencySlice);
|
|
1599
|
+
};
|
|
1600
|
+
CommonService.prototype.setLCategory = function (lCategory) {
|
|
1601
|
+
for (var key in lCategory) {
|
|
1602
|
+
var category = Object.assign(new ngPliUtil.Rubro(), lCategory[key]);
|
|
1603
|
+
lCategory[key] = category;
|
|
1604
|
+
}
|
|
1605
|
+
this.lCategory = lCategory;
|
|
1606
|
+
var lCategorySlice = this.lCategory.slice();
|
|
1607
|
+
localStorage.setItem('lCategory', JSON.stringify(lCategorySlice));
|
|
1608
|
+
this.categoryChanged.next(lCategorySlice);
|
|
1609
|
+
};
|
|
1610
|
+
CommonService.prototype.setLLanguage = function (lLanguage) {
|
|
1611
|
+
this.lLanguage = lLanguage;
|
|
1612
|
+
var lLanguageSlice = this.lLanguage ? this.lLanguage.slice() : this.lLanguage;
|
|
1613
|
+
localStorage.setItem('lLanguage', JSON.stringify(lLanguageSlice));
|
|
1614
|
+
this.languageChanged.next(lLanguageSlice);
|
|
1615
|
+
};
|
|
1616
|
+
CommonService.prototype.setLExchangeRate = function (lExchangeRate) {
|
|
1617
|
+
for (var key in lExchangeRate) {
|
|
1618
|
+
var exchangeRate = Object.assign(new ngPliUtil.TasaCambio(), lExchangeRate[key]);
|
|
1619
|
+
lExchangeRate[key] = exchangeRate;
|
|
1620
|
+
}
|
|
1621
|
+
this.lExchangeRate = lExchangeRate;
|
|
1622
|
+
var lExchangeRateSlice = this.lExchangeRate
|
|
1623
|
+
? this.lExchangeRate.slice()
|
|
1624
|
+
: this.lExchangeRate;
|
|
1625
|
+
localStorage.setItem('lExchangeRate', JSON.stringify(lExchangeRateSlice));
|
|
1626
|
+
this.exchangeRateChanged.next(lExchangeRateSlice);
|
|
1627
|
+
};
|
|
1628
|
+
CommonService.prototype.setLProcess = function (lProcess) {
|
|
1629
|
+
for (var key in lProcess) {
|
|
1630
|
+
var process = Object.assign(new ngPliUtil.Proceso(), lProcess[key]);
|
|
1631
|
+
lProcess[key] = process;
|
|
1632
|
+
}
|
|
1633
|
+
this.lProcess = lProcess;
|
|
1634
|
+
var lProcessSlice = this.lProcess ? this.lProcess.slice() : this.lProcess;
|
|
1635
|
+
localStorage.setItem('lProcess', JSON.stringify(lProcessSlice));
|
|
1636
|
+
this.processChanged.next(lProcessSlice);
|
|
1637
|
+
};
|
|
1638
|
+
CommonService.prototype.searchLCurrency = function () {
|
|
1639
|
+
var lCurrency = localStorage.getItem('lCurrency');
|
|
1640
|
+
if (!lCurrency || lCurrency === 'undefined') {
|
|
1641
|
+
this.getCurrencies();
|
|
1642
|
+
}
|
|
1643
|
+
else {
|
|
1644
|
+
this.setLCurrencies(JSON.parse(lCurrency));
|
|
1645
|
+
}
|
|
1646
|
+
};
|
|
1647
|
+
CommonService.prototype.searchLLanguage = function () {
|
|
1648
|
+
var lLanguage = localStorage.getItem('lLanguage');
|
|
1649
|
+
if (!lLanguage || lLanguage === 'undefined') {
|
|
1650
|
+
this.getLanguages();
|
|
1651
|
+
}
|
|
1652
|
+
else {
|
|
1653
|
+
this.setLLanguage(JSON.parse(lLanguage));
|
|
1654
|
+
}
|
|
1655
|
+
};
|
|
1656
|
+
CommonService.prototype.searchLCategory = function () {
|
|
1657
|
+
var lCategory = localStorage.getItem('lCategory');
|
|
1658
|
+
if (!lCategory || lCategory === 'undefined') {
|
|
1659
|
+
this.getCategories();
|
|
1660
|
+
}
|
|
1661
|
+
else {
|
|
1662
|
+
this.setLCategory(JSON.parse(lCategory));
|
|
1663
|
+
}
|
|
1664
|
+
};
|
|
1665
|
+
CommonService.prototype.searchLExchangeRate = function () {
|
|
1666
|
+
var searchER = false;
|
|
1667
|
+
var searchDate = ngPliUtil.DateUtil.getMomentTimeZone();
|
|
1668
|
+
// let searchDay = searchDate.date();
|
|
1669
|
+
var lExchangeRateString = localStorage.getItem('lExchangeRate');
|
|
1670
|
+
var lExchangeRate = [];
|
|
1671
|
+
if (lExchangeRateString &&
|
|
1672
|
+
lExchangeRateString != 'undefined' &&
|
|
1673
|
+
lExchangeRateString.length > 0) {
|
|
1674
|
+
lExchangeRate = JSON.parse(lExchangeRateString);
|
|
1675
|
+
if (lExchangeRate && lExchangeRate.length > 0) {
|
|
1676
|
+
var dayER = ngPliUtil.DateUtil.getFormatDateTimeZone(lExchangeRate[0].tcamFecha);
|
|
1677
|
+
if (!ngPliUtil.DateUtil.isDayEqualString(searchDate.format(), dayER)) {
|
|
1678
|
+
searchER = true;
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
}
|
|
1682
|
+
else {
|
|
1683
|
+
searchER = true;
|
|
1684
|
+
}
|
|
1685
|
+
if (searchER || !lExchangeRate || lExchangeRate.length == 0) {
|
|
1686
|
+
this.getExchangeRate(searchDate.format('YYYY-MM-DD') + ' 00:00:00');
|
|
1687
|
+
}
|
|
1688
|
+
else {
|
|
1689
|
+
this.setLExchangeRate(lExchangeRate);
|
|
1690
|
+
}
|
|
1582
1691
|
};
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1692
|
+
CommonService.prototype.searchLProcess = function () {
|
|
1693
|
+
var lProcess = localStorage.getItem('lProcess');
|
|
1694
|
+
if (!lProcess || lProcess === 'undefined') {
|
|
1695
|
+
this.getProcess();
|
|
1696
|
+
}
|
|
1697
|
+
else {
|
|
1698
|
+
this.setLProcess(JSON.parse(lProcess));
|
|
1699
|
+
}
|
|
1700
|
+
};
|
|
1701
|
+
/**
|
|
1702
|
+
* It returns
|
|
1703
|
+
* @param html
|
|
1704
|
+
*/
|
|
1705
|
+
CommonService.prototype.getBase64Pdf = function (requestPdf) {
|
|
1706
|
+
return this.httpClient.post(this.environment.host.backend.backoffice + 'pdf/getBase64Pdf', requestPdf, this.headerJson);
|
|
1707
|
+
};
|
|
1708
|
+
/**
|
|
1709
|
+
* It returns a pdf
|
|
1710
|
+
* @param lPdfRequest
|
|
1711
|
+
*/
|
|
1712
|
+
CommonService.prototype.getBase64PdfList = function (lPdfRequest) {
|
|
1713
|
+
return this.httpClient.post(this.environment.host.backend.backoffice + 'pdf/getBase64PdfList', lPdfRequest, this.headerJson);
|
|
1714
|
+
};
|
|
1715
|
+
/**
|
|
1716
|
+
* It returns
|
|
1717
|
+
* @param html
|
|
1718
|
+
*/
|
|
1719
|
+
CommonService.prototype.getBase64PdfByUrl = function (urlFile) {
|
|
1720
|
+
return this.httpClient.post(this.environment.host.backend.backoffice + 'pdf/getBase64PdfByUrl', urlFile, this.headerJson);
|
|
1721
|
+
};
|
|
1722
|
+
/**
|
|
1723
|
+
* It returns
|
|
1724
|
+
* @param urlFile
|
|
1725
|
+
*/
|
|
1726
|
+
CommonService.prototype.getBase64ImageByUrl = function (urlFile) {
|
|
1727
|
+
return this.httpClient.post(this.environment.host.backend.backoffice + 'pdf/getBase64ImageByUrl', urlFile, this.headerJson);
|
|
1728
|
+
};
|
|
1729
|
+
/** Get the actual date */
|
|
1730
|
+
CommonService.prototype.getActualDate = function () {
|
|
1731
|
+
return this.httpClient.get(this.environment.host.backend.configuration + 'configuration/getActualDate');
|
|
1732
|
+
};
|
|
1733
|
+
/** Get the actual date */
|
|
1734
|
+
CommonService.prototype.validateCloseApplicationProcess = function (promCodigo, appStateId, cnfIniStateId) {
|
|
1735
|
+
var params = new i1$1.HttpParams()
|
|
1736
|
+
.set('promCodigo', promCodigo.toString())
|
|
1737
|
+
.set('appStateId', appStateId.toString());
|
|
1738
|
+
if (cnfIniStateId != undefined) {
|
|
1739
|
+
params.set('cnfIniStateId', cnfIniStateId.toString());
|
|
1740
|
+
}
|
|
1741
|
+
return this.httpClient.get(this.environment.host.backend.configuration +
|
|
1742
|
+
'configuration/validateCloseApplicationProcess', {
|
|
1743
|
+
params: params
|
|
1744
|
+
});
|
|
1745
|
+
};
|
|
1746
|
+
CommonService.decorators = [
|
|
1586
1747
|
{ type: i0.Injectable, args: [{
|
|
1587
1748
|
providedIn: 'root'
|
|
1588
1749
|
},] }
|
|
1589
1750
|
];
|
|
1590
|
-
|
|
1751
|
+
CommonService.ctorParameters = function () {
|
|
1591
1752
|
return [
|
|
1592
1753
|
{ type: undefined, decorators: [{ type: i0.Inject, args: ['environment',] }] },
|
|
1593
1754
|
{ type: i1$1.HttpClient },
|
|
1594
|
-
{ type:
|
|
1755
|
+
{ type: TasaCambioService },
|
|
1756
|
+
{ type: PppService },
|
|
1757
|
+
{ type: StatusService },
|
|
1758
|
+
{ type: ConfigurationService }
|
|
1595
1759
|
];
|
|
1596
1760
|
};
|
|
1597
|
-
|
|
1598
|
-
return
|
|
1761
|
+
CommonService.ngInjectableDef = i0.defineInjectable({ factory: function CommonService_Factory() { return new CommonService(i0.inject("environment"), i0.inject(i1$1.HttpClient), i0.inject(TasaCambioService), i0.inject(PppService), i0.inject(StatusService), i0.inject(ConfigurationService)); }, token: CommonService, providedIn: "root" });
|
|
1762
|
+
return CommonService;
|
|
1599
1763
|
}());
|
|
1600
1764
|
|
|
1601
1765
|
var BudgetService = /** @class */ (function () {
|
|
@@ -12345,100 +12509,6 @@
|
|
|
12345
12509
|
return SponsorshipLetterService;
|
|
12346
12510
|
}());
|
|
12347
12511
|
|
|
12348
|
-
var StatusService = /** @class */ (function () {
|
|
12349
|
-
function StatusService(environment, httpClient, authService) {
|
|
12350
|
-
this.environment = environment;
|
|
12351
|
-
this.httpClient = httpClient;
|
|
12352
|
-
this.authService = authService;
|
|
12353
|
-
this.headerJson = { headers: new i1$1.HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
12354
|
-
}
|
|
12355
|
-
/** It returns all list of status by prom code */
|
|
12356
|
-
StatusService.prototype.getById = function (statusId) {
|
|
12357
|
-
return this.httpClient.get(this.environment.host.backend.configuration + 'pliCnfStatus/getById', { params: new i1$1.HttpParams().set('statusId', statusId.toString()) });
|
|
12358
|
-
};
|
|
12359
|
-
/** It returns all list of status by prom code */
|
|
12360
|
-
StatusService.prototype.getAllByPromCode = function (promCode) {
|
|
12361
|
-
return this.httpClient.get(this.environment.host.backend.configuration + 'pliCnfStatus/getAllByPromCode', { params: new i1$1.HttpParams().set('promCodigo', promCode.toString()) });
|
|
12362
|
-
};
|
|
12363
|
-
/** It returns all list of status by prom code */
|
|
12364
|
-
StatusService.prototype.getAllByPromCodeAndName = function (promCode, name) {
|
|
12365
|
-
return this.httpClient.get(this.environment.host.backend.configuration + 'pliCnfStatus/getAllByPromCodeAndName', { params: new i1$1.HttpParams().set('promCodigo', promCode.toString()).set('name', name) });
|
|
12366
|
-
};
|
|
12367
|
-
StatusService.prototype.getFinalStatusByStaticInteraction = function (promCode, staticInteractionId) {
|
|
12368
|
-
return this.httpClient.get(this.environment.host.backend.configuration +
|
|
12369
|
-
'pliCnfStatus/getFinalStatusByStaticInteraction', {
|
|
12370
|
-
params: new i1$1.HttpParams()
|
|
12371
|
-
.set('promCodigo', promCode.toString())
|
|
12372
|
-
.set('staticInteractionId', staticInteractionId.toString())
|
|
12373
|
-
});
|
|
12374
|
-
};
|
|
12375
|
-
/** It returns all list of status by prom code */
|
|
12376
|
-
StatusService.prototype.getInitialStatusByPromCode = function (promCode) {
|
|
12377
|
-
return this.httpClient.get(this.environment.host.backend.configuration + 'pliCnfStatus/getInitialStatusByPromCode', { params: new i1$1.HttpParams().set('promCodigo', promCode.toString()) });
|
|
12378
|
-
};
|
|
12379
|
-
StatusService.prototype.save = function (cnfStatus) {
|
|
12380
|
-
return this.httpClient.post(this.environment.host.backend.configuration + 'pliCnfStatus/save', cnfStatus, ngPliUtil.HEADER_JSON);
|
|
12381
|
-
};
|
|
12382
|
-
StatusService.prototype.getStatusByPromcodigoAndPageSection = function (promCodigo, pageId) {
|
|
12383
|
-
return this.httpClient.get(this.environment.host.backend.configuration +
|
|
12384
|
-
'pliCnfStatus/getStatusByPromcodigoAndPageSection', {
|
|
12385
|
-
params: new i1$1.HttpParams()
|
|
12386
|
-
.set('promCodigo', promCodigo.toString())
|
|
12387
|
-
.set('pageId', pageId.toString())
|
|
12388
|
-
});
|
|
12389
|
-
};
|
|
12390
|
-
StatusService.prototype.getStatusByPromCodigoAndCategoryId = function (promCodigo, categoryId) {
|
|
12391
|
-
return this.httpClient.get(this.environment.host.backend.configuration +
|
|
12392
|
-
'pliCnfStatus/getStatusByPromCodigoAndCategoryId', {
|
|
12393
|
-
params: new i1$1.HttpParams()
|
|
12394
|
-
.set('promCodigo', promCodigo.toString())
|
|
12395
|
-
.set('categoryId', categoryId.toString())
|
|
12396
|
-
});
|
|
12397
|
-
};
|
|
12398
|
-
StatusService.prototype.getByInitialStatusAndPromCodigoAndCategoryId = function (initialStatus, promCodigo, categoryId) {
|
|
12399
|
-
return this.httpClient.get(this.environment.host.backend.configuration +
|
|
12400
|
-
'pliCnfStatus/getByInitialStatusAndPromCodigoAndCategoryId', {
|
|
12401
|
-
params: new i1$1.HttpParams()
|
|
12402
|
-
.set('initialStatus', initialStatus.toString())
|
|
12403
|
-
.set('promCodigo', promCodigo.toString())
|
|
12404
|
-
.set('categoryId', categoryId.toString())
|
|
12405
|
-
});
|
|
12406
|
-
};
|
|
12407
|
-
StatusService.prototype.getByPromCodigoAndFinalStatus = function (promCodigo, finalStatus) {
|
|
12408
|
-
return this.httpClient.get(this.environment.host.backend.configuration +
|
|
12409
|
-
'pliCnfStatus/getByPromCodigoAndFinalStatus', {
|
|
12410
|
-
params: new i1$1.HttpParams()
|
|
12411
|
-
.set('promCodigo', promCodigo.toString())
|
|
12412
|
-
.set('finalStatus', finalStatus.toString())
|
|
12413
|
-
});
|
|
12414
|
-
};
|
|
12415
|
-
StatusService.prototype.getInitialStatusByStaticInteraction = function (promCodigo, staticInteractionId) {
|
|
12416
|
-
return this.httpClient.get(this.environment.host.backend.configuration +
|
|
12417
|
-
'pliCnfStatus/getInitialStatusByStaticInteraction', {
|
|
12418
|
-
params: new i1$1.HttpParams()
|
|
12419
|
-
.set('promCodigo', promCodigo)
|
|
12420
|
-
.set('staticInteractionId', staticInteractionId)
|
|
12421
|
-
});
|
|
12422
|
-
};
|
|
12423
|
-
StatusService.prototype.getConfigCloningStatusMap = function (lStatus) {
|
|
12424
|
-
return this.httpClient.post(this.environment.host.backend.configuration + 'pliCnfStatus/getConfigCloningStatusMap', lStatus);
|
|
12425
|
-
};
|
|
12426
|
-
StatusService.decorators = [
|
|
12427
|
-
{ type: i0.Injectable, args: [{
|
|
12428
|
-
providedIn: 'root'
|
|
12429
|
-
},] }
|
|
12430
|
-
];
|
|
12431
|
-
StatusService.ctorParameters = function () {
|
|
12432
|
-
return [
|
|
12433
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: ['environment',] }] },
|
|
12434
|
-
{ type: i1$1.HttpClient },
|
|
12435
|
-
{ type: AuthenticationService }
|
|
12436
|
-
];
|
|
12437
|
-
};
|
|
12438
|
-
StatusService.ngInjectableDef = i0.defineInjectable({ factory: function StatusService_Factory() { return new StatusService(i0.inject("environment"), i0.inject(i1$1.HttpClient), i0.inject(AuthenticationService)); }, token: StatusService, providedIn: "root" });
|
|
12439
|
-
return StatusService;
|
|
12440
|
-
}());
|
|
12441
|
-
|
|
12442
12512
|
var UserService = /** @class */ (function () {
|
|
12443
12513
|
function UserService(environment, httpClient) {
|
|
12444
12514
|
this.environment = environment;
|
|
@@ -12494,59 +12564,6 @@
|
|
|
12494
12564
|
return PliCnfBudgetService;
|
|
12495
12565
|
}());
|
|
12496
12566
|
|
|
12497
|
-
var ConfigurationService = /** @class */ (function () {
|
|
12498
|
-
function ConfigurationService(environment, httpClient) {
|
|
12499
|
-
this.environment = environment;
|
|
12500
|
-
this.httpClient = httpClient;
|
|
12501
|
-
}
|
|
12502
|
-
/** Get the actual date */
|
|
12503
|
-
ConfigurationService.prototype.getActualDate = function () {
|
|
12504
|
-
return this.httpClient.get(this.environment.host.backend.configuration + 'configuration/getActualDate');
|
|
12505
|
-
};
|
|
12506
|
-
/** Get the actual date */
|
|
12507
|
-
ConfigurationService.prototype.getDate = function (date) {
|
|
12508
|
-
if (date === void 0) {
|
|
12509
|
-
date = undefined;
|
|
12510
|
-
}
|
|
12511
|
-
date = date === undefined ? null : date;
|
|
12512
|
-
// if (date !== undefined) {
|
|
12513
|
-
return this.httpClient.post(this.environment.host.backend.configuration + 'configuration/getDate', date, ngPliUtil.HEADER_JSON);
|
|
12514
|
-
// } else {
|
|
12515
|
-
// return this.httpClient.post(
|
|
12516
|
-
// this.environment.host.backend.configuration + 'configuration/getDate',
|
|
12517
|
-
// null,
|
|
12518
|
-
// HEADER_JSON
|
|
12519
|
-
// );
|
|
12520
|
-
// }
|
|
12521
|
-
// return this.httpClient.get(
|
|
12522
|
-
// this.environment.host.backend.configuration + 'configuration/getActualDate'
|
|
12523
|
-
// );
|
|
12524
|
-
};
|
|
12525
|
-
ConfigurationService.prototype.getFileByUrl = function (url, name) {
|
|
12526
|
-
var headers = new i1$1.HttpHeaders();
|
|
12527
|
-
headers.set('Accept', 'application/pdf');
|
|
12528
|
-
headers.set('Authorization', 'Bearer ' + ngPliUtil.AuthenticationUtil.getToken());
|
|
12529
|
-
return this.httpClient.get(this.environment.host.backend.configuration + 'configuration/getFileByUrl', {
|
|
12530
|
-
params: new i1$1.HttpParams().set('url', url).set('name', name),
|
|
12531
|
-
headers: headers,
|
|
12532
|
-
responseType: 'blob'
|
|
12533
|
-
});
|
|
12534
|
-
};
|
|
12535
|
-
ConfigurationService.decorators = [
|
|
12536
|
-
{ type: i0.Injectable, args: [{
|
|
12537
|
-
providedIn: 'root'
|
|
12538
|
-
},] }
|
|
12539
|
-
];
|
|
12540
|
-
ConfigurationService.ctorParameters = function () {
|
|
12541
|
-
return [
|
|
12542
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: ['environment',] }] },
|
|
12543
|
-
{ type: i1$1.HttpClient }
|
|
12544
|
-
];
|
|
12545
|
-
};
|
|
12546
|
-
ConfigurationService.ngInjectableDef = i0.defineInjectable({ factory: function ConfigurationService_Factory() { return new ConfigurationService(i0.inject("environment"), i0.inject(i1$1.HttpClient)); }, token: ConfigurationService, providedIn: "root" });
|
|
12547
|
-
return ConfigurationService;
|
|
12548
|
-
}());
|
|
12549
|
-
|
|
12550
12567
|
var SnapshotTokenComponent = /** @class */ (function (_super) {
|
|
12551
12568
|
__extends(SnapshotTokenComponent, _super);
|
|
12552
12569
|
function SnapshotTokenComponent(cdRef, commonService, toastrService, tokenService) {
|
|
@@ -14994,6 +15011,27 @@
|
|
|
14994
15011
|
budget: budget
|
|
14995
15012
|
};
|
|
14996
15013
|
};
|
|
15014
|
+
/**
|
|
15015
|
+
* Call the validataion service
|
|
15016
|
+
* @param cnfIniStateId Initial config status id, if not exist, get the config status id from the service
|
|
15017
|
+
* @returns True if actual date is before than end application date and the stateAppId is equals of the cnfIniStateId
|
|
15018
|
+
*/
|
|
15019
|
+
FrontofficeCommonsComponent.prototype.validateCloseApplicationProcess = function (cnfIniStateId) {
|
|
15020
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
15021
|
+
var response;
|
|
15022
|
+
return __generator(this, function (_a) {
|
|
15023
|
+
switch (_a.label) {
|
|
15024
|
+
case 0: return [4 /*yield*/, this.commonService.validateCloseApplicationProcess(this.promCodigo, this.stateId, cnfIniStateId).toPromise()];
|
|
15025
|
+
case 1:
|
|
15026
|
+
response = _a.sent();
|
|
15027
|
+
this.dateClose = response.closeApplicationDate;
|
|
15028
|
+
return [2 /*return*/, new Promise(function (resolve) {
|
|
15029
|
+
resolve(response.userAllowSave);
|
|
15030
|
+
})];
|
|
15031
|
+
}
|
|
15032
|
+
});
|
|
15033
|
+
});
|
|
15034
|
+
};
|
|
14997
15035
|
return FrontofficeCommonsComponent;
|
|
14998
15036
|
}(CommonListsComponent));
|
|
14999
15037
|
|
|
@@ -17157,9 +17195,9 @@
|
|
|
17157
17195
|
/* tslint:disable */
|
|
17158
17196
|
var VERSION = {
|
|
17159
17197
|
"dirty": true,
|
|
17160
|
-
"raw": "v0.0.18-
|
|
17161
|
-
"hash": "
|
|
17162
|
-
"distance":
|
|
17198
|
+
"raw": "v0.0.18-1865-gadc79943-dirty",
|
|
17199
|
+
"hash": "gadc79943",
|
|
17200
|
+
"distance": 1865,
|
|
17163
17201
|
"tag": "v0.0.18",
|
|
17164
17202
|
"semver": {
|
|
17165
17203
|
"options": {
|
|
@@ -17175,10 +17213,10 @@
|
|
|
17175
17213
|
"build": [],
|
|
17176
17214
|
"version": "0.0.18"
|
|
17177
17215
|
},
|
|
17178
|
-
"suffix": "
|
|
17179
|
-
"semverString": "0.0.18+
|
|
17180
|
-
"version": "0.0.
|
|
17181
|
-
"buildTimestamp": "2022-02-
|
|
17216
|
+
"suffix": "1865-gadc79943-dirty",
|
|
17217
|
+
"semverString": "0.0.18+1865.gadc79943",
|
|
17218
|
+
"version": "0.0.1336",
|
|
17219
|
+
"buildTimestamp": "2022-02-16T20:50:03.941Z"
|
|
17182
17220
|
};
|
|
17183
17221
|
/* tslint:enable */
|
|
17184
17222
|
|