@fluxhub/fluxhub-lib 9.0.63 → 9.0.65

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.
@@ -976,6 +976,9 @@
976
976
  this.title_dialog = "";
977
977
  this.b_commento = false;
978
978
  this.msg_dialog = "";
979
+ this.confirm_mgs = "CONFERMA";
980
+ this.annulla_mgs = "ANNULLA";
981
+ this.commento_mgs = "Commento";
979
982
  }
980
983
  return FHConfirmValues;
981
984
  }());
@@ -995,6 +998,7 @@
995
998
  this.b_commento = false;
996
999
  this.confirm_mgs = "CONFERMA";
997
1000
  this.annulla_mgs = "ANNULLA";
1001
+ this.commento_mgs = "Commento";
998
1002
  if (conf == null) {
999
1003
  this.title = localStorage.getItem(this.app_s.COMPANY_KEY + "title_dialog");
1000
1004
  this.msg = localStorage.getItem(this.app_s.COMPANY_KEY + "msg_dialog");
@@ -1004,6 +1008,12 @@
1004
1008
  this.msg = conf.msg_dialog;
1005
1009
  if (conf.b_commento != null)
1006
1010
  this.b_commento = conf.b_commento;
1011
+ if (conf.confirm_mgs != null)
1012
+ this.confirm_mgs = conf.confirm_mgs;
1013
+ if (conf.annulla_mgs != null)
1014
+ this.annulla_mgs = conf.annulla_mgs;
1015
+ if (conf.commento_mgs != null)
1016
+ this.commento_mgs = conf.commento_mgs;
1007
1017
  }
1008
1018
  FHConfirmComponent.prototype.ok = function () {
1009
1019
  if (this.b_commento && this.commento == '') {
@@ -1030,7 +1040,7 @@
1030
1040
  ]; };
1031
1041
  FHConfirmComponent = __decorate([
1032
1042
  core.Component({
1033
- template: "\n\n <h1 mat-dialog-title>{{title}}</h1>\n <div mat-dialog-content>\n <div fxLayout=\"column\" fxLayoutGap=\"15px\">\n {{msg}}\n\n <FHTextArea [hidden]=\"!b_commento\" label=\"Commento\" required [(ngModel)]=\"commento\" ></FHTextArea>\n </div>\n\n\n </div>\n\n <div mat-dialog-actions>\n <button mat-button (click)=\"ok()\" color=\"primary\">{{confirm_mgs}}</button>\n <button mat-button (click)=\"dialogRef.close(false)\" color=\"warn\">{{annulla_mgs}}</button>\n </div>\n ",
1043
+ template: "\n\n <h1 mat-dialog-title>{{title}}</h1>\n <div mat-dialog-content>\n <div fxLayout=\"column\" fxLayoutGap=\"15px\">\n {{msg}}\n <div style=\"width:400px\" [hidden]=\"!b_commento\"><br></div>\n <div style=\"width:400px\" [hidden]=\"!b_commento\"><FHTextArea label=\"{{commento_mgs}}\" required [(ngModel)]=\"commento\" ></FHTextArea></div>\n </div>\n\n\n </div>\n\n <div mat-dialog-actions>\n <button mat-raised-button (click)=\"ok()\" color=\"primary\">{{confirm_mgs}}</button>\n <button mat-raised-button (click)=\"dialogRef.close(false)\" color=\"warn\">{{annulla_mgs}}</button>\n </div>\n ",
1034
1044
  styles: ["\n "]
1035
1045
  }),
1036
1046
  __param(2, core.Inject(dialog.MAT_DIALOG_DATA)),
@@ -9061,20 +9071,32 @@
9061
9071
  }());
9062
9072
 
9063
9073
  var win_salva_annulla = /** @class */ (function () {
9064
- function win_salva_annulla(dialogRef, data) {
9074
+ function win_salva_annulla(dialogRef, data, toast) {
9065
9075
  this.dialogRef = dialogRef;
9066
9076
  this.data = data;
9077
+ this.toast = toast;
9067
9078
  this.salva_ed_esci = 'SALVA ED ESCI';
9068
9079
  this.esci_senza_salvataggi = 'ESCI SENZA SALVATAGGIO';
9080
+ this.commento = "";
9081
+ this.b_commento = false;
9082
+ this.commento_mgs = "Commento";
9069
9083
  if (data != null) {
9070
9084
  if (data.mgs_salva_ed_esci != null)
9071
9085
  this.salva_ed_esci = data.mgs_salva_ed_esci;
9072
9086
  if (data.msg_esci_senza_salvataggi != null)
9073
9087
  this.esci_senza_salvataggi = data.msg_esci_senza_salvataggi;
9088
+ if (data.b_commento != null)
9089
+ this.b_commento = data.b_commento;
9090
+ if (data.commento_mgs != null)
9091
+ this.commento_mgs = data.commento_mgs;
9074
9092
  }
9075
9093
  }
9076
9094
  win_salva_annulla.prototype.close = function () { this.dialogRef.close(null); };
9077
9095
  win_salva_annulla.prototype.salva_esci = function () {
9096
+ if (this.b_commento && this.commento == '') {
9097
+ this.toast.error('Inserire un commento');
9098
+ return;
9099
+ }
9078
9100
  this.dialogRef.close("salva_esci");
9079
9101
  };
9080
9102
  win_salva_annulla.prototype.esci_senza_salv = function () {
@@ -9084,14 +9106,15 @@
9084
9106
  };
9085
9107
  win_salva_annulla.ctorParameters = function () { return [
9086
9108
  { type: dialog.MatDialogRef },
9087
- { type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
9109
+ { type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] },
9110
+ { type: ngxToastr.ToastrService }
9088
9111
  ]; };
9089
9112
  win_salva_annulla = __decorate([
9090
9113
  core.Component({
9091
- template: "\n <div style=\"width:100%\" fxLayout=\"row\" fxLayoutAlign=\"end start\"><img src=\"assets/icons/x.png\" style=\"cursor: pointer;\" (click)=\"close()\" /> </div>\n <hr width=\"100%\" size=\"0.5\" color=\"#DDDDDD\">\n\n <div mat-dialog-content style=\"font-size: 15px;\">\n <br>\n <div style=\"width:100%;text-align:center;\">\n <button mat-flat-button color=\"primary\" (click)=\"salva_esci()\">{{salva_ed_esci}}</button>&nbsp;&nbsp;&nbsp;&nbsp;\n <button mat-flat-button color=\"warn\" (click)=\"esci_senza_salv()\">{{esci_senza_salvataggi}}</button>\n\n </div>\n </div>\n "
9114
+ template: "\n <div style=\"width:100%\" fxLayout=\"row\" fxLayoutAlign=\"end start\"><img src=\"assets/icons/x.png\" style=\"cursor: pointer;\" (click)=\"close()\" /> </div>\n <hr width=\"100%\" size=\"0.5\" color=\"#DDDDDD\">\n\n <div mat-dialog-content>\n <div style=\"width:400px\" [hidden]=\"!b_commento\"><br></div>\n <div style=\"width:400px\" [hidden]=\"!b_commento\"><FHTextArea label=\"{{commento_mgs}}\" required [(ngModel)]=\"commento\" ></FHTextArea></div>\n <br>\n <div style=\"width:100%;text-align:center;\">\n <button mat-flat-button color=\"primary\" (click)=\"salva_esci()\">{{salva_ed_esci}}</button>&nbsp;&nbsp;&nbsp;&nbsp;\n <button mat-flat-button color=\"warn\" (click)=\"esci_senza_salv()\">{{esci_senza_salvataggi}}</button>\n\n </div>\n </div>\n "
9092
9115
  }),
9093
9116
  __param(1, core.Inject(dialog.MAT_DIALOG_DATA)),
9094
- __metadata("design:paramtypes", [dialog.MatDialogRef, Object])
9117
+ __metadata("design:paramtypes", [dialog.MatDialogRef, Object, ngxToastr.ToastrService])
9095
9118
  ], win_salva_annulla);
9096
9119
  return win_salva_annulla;
9097
9120
  }());