@fluxhub/fluxhub-lib 22.0.27 → 22.0.29
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.
|
@@ -11175,10 +11175,24 @@ class FHGridComponent {
|
|
|
11175
11175
|
this.p_fi.cols = this.export_visible_columns ? this.getExportCols() : null;
|
|
11176
11176
|
this.p_fi.uiid_stampa = this.uti_s.newGuid();
|
|
11177
11177
|
this.uiid_stampa = this.p_fi.uiid_stampa;
|
|
11178
|
+
const uiid = this.uiid_stampa;
|
|
11179
|
+
const dialogRef = this.dialogRef_W;
|
|
11178
11180
|
this._gridservice
|
|
11179
11181
|
.doQuery(this.p_fi, true, this.m_appService.API_ENDPOINT + 'doexportn')
|
|
11180
|
-
.subscribe(
|
|
11181
|
-
|
|
11182
|
+
.subscribe({
|
|
11183
|
+
next: (data) => {
|
|
11184
|
+
// KO: il file non arrivera' mai, inutile restare in attesa
|
|
11185
|
+
if (data?.result_msg == 'KO') {
|
|
11186
|
+
dialogRef?.close();
|
|
11187
|
+
this._toast.error('Export non riuscito');
|
|
11188
|
+
return;
|
|
11189
|
+
}
|
|
11190
|
+
this.check_end(type == 'pdf' ? '.pdf' : '.xlsx', uiid, dialogRef);
|
|
11191
|
+
},
|
|
11192
|
+
error: () => {
|
|
11193
|
+
dialogRef?.close();
|
|
11194
|
+
this._toast.error('Export non riuscito');
|
|
11195
|
+
},
|
|
11182
11196
|
});
|
|
11183
11197
|
}
|
|
11184
11198
|
/**
|
|
@@ -30029,6 +30043,10 @@ class WkfService {
|
|
|
30029
30043
|
Authorization: "Bearer " + localStorage.getItem(this.app_s.COMPANY_KEY + "token"),
|
|
30030
30044
|
});
|
|
30031
30045
|
this.url = this.app_s.API_ENDPOINT + this.app_s.WKF_ENDPOINT;
|
|
30046
|
+
// il backend Node valida values come array di stringhe: un null (nota o cc non
|
|
30047
|
+
// valorizzati) fa rispondere 500 a dowkf e la mail non parte
|
|
30048
|
+
if ((queryp.sql == "send_wkf_mail" || queryp.sql == "send_mail") && queryp.values)
|
|
30049
|
+
queryp.values = queryp.values.map((v) => (v == null ? "" : "" + v));
|
|
30032
30050
|
let post_v = JSON.stringify(queryp);
|
|
30033
30051
|
return this.http.post(this.url, post_v, { headers: this.headers }).pipe(map((res) => {
|
|
30034
30052
|
// Handle errors, display if enabled
|