@fluxhub/fluxhub-lib 9.0.64 → 9.0.66

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.
@@ -978,6 +978,7 @@
978
978
  this.msg_dialog = "";
979
979
  this.confirm_mgs = "CONFERMA";
980
980
  this.annulla_mgs = "ANNULLA";
981
+ this.commento_mgs = "Commento";
981
982
  }
982
983
  return FHConfirmValues;
983
984
  }());
@@ -997,6 +998,7 @@
997
998
  this.b_commento = false;
998
999
  this.confirm_mgs = "CONFERMA";
999
1000
  this.annulla_mgs = "ANNULLA";
1001
+ this.commento_mgs = "Commento";
1000
1002
  if (conf == null) {
1001
1003
  this.title = localStorage.getItem(this.app_s.COMPANY_KEY + "title_dialog");
1002
1004
  this.msg = localStorage.getItem(this.app_s.COMPANY_KEY + "msg_dialog");
@@ -1010,6 +1012,8 @@
1010
1012
  this.confirm_mgs = conf.confirm_mgs;
1011
1013
  if (conf.annulla_mgs != null)
1012
1014
  this.annulla_mgs = conf.annulla_mgs;
1015
+ if (conf.commento_mgs != null)
1016
+ this.commento_mgs = conf.commento_mgs;
1013
1017
  }
1014
1018
  FHConfirmComponent.prototype.ok = function () {
1015
1019
  if (this.b_commento && this.commento == '') {
@@ -1036,7 +1040,7 @@
1036
1040
  ]; };
1037
1041
  FHConfirmComponent = __decorate([
1038
1042
  core.Component({
1039
- 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\" 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 ",
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 ",
1040
1044
  styles: ["\n "]
1041
1045
  }),
1042
1046
  __param(2, core.Inject(dialog.MAT_DIALOG_DATA)),
@@ -9067,20 +9071,32 @@
9067
9071
  }());
9068
9072
 
9069
9073
  var win_salva_annulla = /** @class */ (function () {
9070
- function win_salva_annulla(dialogRef, data) {
9074
+ function win_salva_annulla(dialogRef, data, toast) {
9071
9075
  this.dialogRef = dialogRef;
9072
9076
  this.data = data;
9077
+ this.toast = toast;
9073
9078
  this.salva_ed_esci = 'SALVA ED ESCI';
9074
9079
  this.esci_senza_salvataggi = 'ESCI SENZA SALVATAGGIO';
9080
+ this.commento = "";
9081
+ this.b_commento = false;
9082
+ this.commento_mgs = "Commento";
9075
9083
  if (data != null) {
9076
9084
  if (data.mgs_salva_ed_esci != null)
9077
9085
  this.salva_ed_esci = data.mgs_salva_ed_esci;
9078
9086
  if (data.msg_esci_senza_salvataggi != null)
9079
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;
9080
9092
  }
9081
9093
  }
9082
9094
  win_salva_annulla.prototype.close = function () { this.dialogRef.close(null); };
9083
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
+ }
9084
9100
  this.dialogRef.close("salva_esci");
9085
9101
  };
9086
9102
  win_salva_annulla.prototype.esci_senza_salv = function () {
@@ -9090,14 +9106,15 @@
9090
9106
  };
9091
9107
  win_salva_annulla.ctorParameters = function () { return [
9092
9108
  { type: dialog.MatDialogRef },
9093
- { 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 }
9094
9111
  ]; };
9095
9112
  win_salva_annulla = __decorate([
9096
9113
  core.Component({
9097
- 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 "
9098
9115
  }),
9099
9116
  __param(1, core.Inject(dialog.MAT_DIALOG_DATA)),
9100
- __metadata("design:paramtypes", [dialog.MatDialogRef, Object])
9117
+ __metadata("design:paramtypes", [dialog.MatDialogRef, Object, ngxToastr.ToastrService])
9101
9118
  ], win_salva_annulla);
9102
9119
  return win_salva_annulla;
9103
9120
  }());