@fluxhub/fluxhub-lib 18.0.47 → 18.0.49
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.
|
@@ -788,36 +788,42 @@ class UtilityService {
|
|
|
788
788
|
return false;
|
|
789
789
|
}
|
|
790
790
|
sql_date(dt) {
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
791
|
+
try {
|
|
792
|
+
if (dt == null)
|
|
793
|
+
return 'dbnull';
|
|
794
|
+
if (typeof dt == 'undefined')
|
|
795
|
+
return 'dbnull';
|
|
796
|
+
if (typeof dt == 'string') {
|
|
797
|
+
let apdt = this.string2date(dt, 2);
|
|
798
|
+
if (apdt)
|
|
799
|
+
dt = new Date(apdt);
|
|
800
|
+
}
|
|
801
|
+
if (dt.getFullYear() == 1970)
|
|
802
|
+
return 'dbnull';
|
|
803
|
+
var mm = dt.getMonth() + 1; // getMonth() is zero-based
|
|
804
|
+
var dd = dt.getDate();
|
|
805
|
+
if (this.app_s.SQL_SERVER_LANG == 'it')
|
|
806
|
+
return [
|
|
807
|
+
(dd > 9 ? '' : '0') + dd,
|
|
808
|
+
'-',
|
|
809
|
+
(mm > 9 ? '' : '0') + mm,
|
|
810
|
+
'-',
|
|
811
|
+
dt.getFullYear(),
|
|
812
|
+
].join('');
|
|
813
|
+
if (this.app_s.SQL_SERVER_LANG == 'uk')
|
|
814
|
+
return [
|
|
815
|
+
dt.getFullYear(),
|
|
816
|
+
'-',
|
|
817
|
+
(mm > 9 ? '' : '0') + mm,
|
|
818
|
+
'-',
|
|
819
|
+
(dd > 9 ? '' : '0') + dd,
|
|
820
|
+
].join('');
|
|
821
|
+
return 'Parametro SQL_SERVER_LANG non corretto';
|
|
799
822
|
}
|
|
800
|
-
|
|
823
|
+
catch (e) {
|
|
824
|
+
console.log('ERRORE CONV DATE', dt, typeof dt);
|
|
801
825
|
return 'dbnull';
|
|
802
|
-
|
|
803
|
-
var dd = dt.getDate();
|
|
804
|
-
if (this.app_s.SQL_SERVER_LANG == 'it')
|
|
805
|
-
return [
|
|
806
|
-
(dd > 9 ? '' : '0') + dd,
|
|
807
|
-
'-',
|
|
808
|
-
(mm > 9 ? '' : '0') + mm,
|
|
809
|
-
'-',
|
|
810
|
-
dt.getFullYear(),
|
|
811
|
-
].join('');
|
|
812
|
-
if (this.app_s.SQL_SERVER_LANG == 'uk')
|
|
813
|
-
return [
|
|
814
|
-
dt.getFullYear(),
|
|
815
|
-
'-',
|
|
816
|
-
(mm > 9 ? '' : '0') + mm,
|
|
817
|
-
'-',
|
|
818
|
-
(dd > 9 ? '' : '0') + dd,
|
|
819
|
-
].join('');
|
|
820
|
-
return 'Parametro SQL_SERVER_LANG non corretto';
|
|
826
|
+
}
|
|
821
827
|
}
|
|
822
828
|
sql_date_grid(dt, adds = '') {
|
|
823
829
|
if (dt == null)
|
|
@@ -17143,6 +17149,10 @@ class WkfService {
|
|
|
17143
17149
|
Authorization: "Bearer " + localStorage.getItem(this.app_s.COMPANY_KEY + "token"),
|
|
17144
17150
|
});
|
|
17145
17151
|
this.url = this.app_s.API_ENDPOINT + this.app_s.WKF_ENDPOINT;
|
|
17152
|
+
// il backend Node valida values come array di stringhe: un null (nota o cc non
|
|
17153
|
+
// valorizzati) fa rispondere 500 a dowkf e la mail non parte
|
|
17154
|
+
if ((queryp.sql == "send_wkf_mail" || queryp.sql == "send_mail") && queryp.values)
|
|
17155
|
+
queryp.values = queryp.values.map((v) => (v == null ? "" : "" + v));
|
|
17146
17156
|
let post_v = JSON.stringify(queryp);
|
|
17147
17157
|
return this.http.post(this.url, post_v, { headers: this.headers }).pipe(map((res) => {
|
|
17148
17158
|
// Handle errors, display if enabled
|
|
@@ -42617,7 +42627,12 @@ class wkfapp_v2 {
|
|
|
42617
42627
|
p = new QParam();
|
|
42618
42628
|
p.sql = 'UPDATE_RIASSEGNA_TODO';
|
|
42619
42629
|
p.types = ['string', 'string'];
|
|
42620
|
-
|
|
42630
|
+
// Gli attori del picker portano sempre username (idp solo se vengono dai livelli):
|
|
42631
|
+
// con idp null la sottoquery dava username null sul todo (WBA-10).
|
|
42632
|
+
p.values = [
|
|
42633
|
+
this.wax[0].username || this.wax[0].idp,
|
|
42634
|
+
this.get_grid().sRow.uiid,
|
|
42635
|
+
];
|
|
42621
42636
|
ok_op = false;
|
|
42622
42637
|
this.m_dataService.doQuery(p).subscribe((data) => {
|
|
42623
42638
|
if (data != null)
|