@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.
@@ -845,6 +845,7 @@ var FHConfirmValues = /** @class */ (function () {
845
845
  this.msg_dialog = "";
846
846
  this.confirm_mgs = "CONFERMA";
847
847
  this.annulla_mgs = "ANNULLA";
848
+ this.commento_mgs = "Commento";
848
849
  }
849
850
  return FHConfirmValues;
850
851
  }());
@@ -864,6 +865,7 @@ var FHConfirmComponent = /** @class */ (function () {
864
865
  this.b_commento = false;
865
866
  this.confirm_mgs = "CONFERMA";
866
867
  this.annulla_mgs = "ANNULLA";
868
+ this.commento_mgs = "Commento";
867
869
  if (conf == null) {
868
870
  this.title = localStorage.getItem(this.app_s.COMPANY_KEY + "title_dialog");
869
871
  this.msg = localStorage.getItem(this.app_s.COMPANY_KEY + "msg_dialog");
@@ -877,6 +879,8 @@ var FHConfirmComponent = /** @class */ (function () {
877
879
  this.confirm_mgs = conf.confirm_mgs;
878
880
  if (conf.annulla_mgs != null)
879
881
  this.annulla_mgs = conf.annulla_mgs;
882
+ if (conf.commento_mgs != null)
883
+ this.commento_mgs = conf.commento_mgs;
880
884
  }
881
885
  FHConfirmComponent.prototype.ok = function () {
882
886
  if (this.b_commento && this.commento == '') {
@@ -903,7 +907,7 @@ var FHConfirmComponent = /** @class */ (function () {
903
907
  ]; };
904
908
  FHConfirmComponent = __decorate([
905
909
  Component({
906
- 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 ",
910
+ 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 ",
907
911
  styles: ["\n "]
908
912
  }),
909
913
  __param(2, Inject(MAT_DIALOG_DATA)),
@@ -8934,20 +8938,32 @@ var FHListPick = /** @class */ (function () {
8934
8938
  }());
8935
8939
 
8936
8940
  var win_salva_annulla = /** @class */ (function () {
8937
- function win_salva_annulla(dialogRef, data) {
8941
+ function win_salva_annulla(dialogRef, data, toast) {
8938
8942
  this.dialogRef = dialogRef;
8939
8943
  this.data = data;
8944
+ this.toast = toast;
8940
8945
  this.salva_ed_esci = 'SALVA ED ESCI';
8941
8946
  this.esci_senza_salvataggi = 'ESCI SENZA SALVATAGGIO';
8947
+ this.commento = "";
8948
+ this.b_commento = false;
8949
+ this.commento_mgs = "Commento";
8942
8950
  if (data != null) {
8943
8951
  if (data.mgs_salva_ed_esci != null)
8944
8952
  this.salva_ed_esci = data.mgs_salva_ed_esci;
8945
8953
  if (data.msg_esci_senza_salvataggi != null)
8946
8954
  this.esci_senza_salvataggi = data.msg_esci_senza_salvataggi;
8955
+ if (data.b_commento != null)
8956
+ this.b_commento = data.b_commento;
8957
+ if (data.commento_mgs != null)
8958
+ this.commento_mgs = data.commento_mgs;
8947
8959
  }
8948
8960
  }
8949
8961
  win_salva_annulla.prototype.close = function () { this.dialogRef.close(null); };
8950
8962
  win_salva_annulla.prototype.salva_esci = function () {
8963
+ if (this.b_commento && this.commento == '') {
8964
+ this.toast.error('Inserire un commento');
8965
+ return;
8966
+ }
8951
8967
  this.dialogRef.close("salva_esci");
8952
8968
  };
8953
8969
  win_salva_annulla.prototype.esci_senza_salv = function () {
@@ -8957,14 +8973,15 @@ var win_salva_annulla = /** @class */ (function () {
8957
8973
  };
8958
8974
  win_salva_annulla.ctorParameters = function () { return [
8959
8975
  { type: MatDialogRef },
8960
- { type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
8976
+ { type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] },
8977
+ { type: ToastrService }
8961
8978
  ]; };
8962
8979
  win_salva_annulla = __decorate([
8963
8980
  Component({
8964
- 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 "
8981
+ 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 "
8965
8982
  }),
8966
8983
  __param(1, Inject(MAT_DIALOG_DATA)),
8967
- __metadata("design:paramtypes", [MatDialogRef, Object])
8984
+ __metadata("design:paramtypes", [MatDialogRef, Object, ToastrService])
8968
8985
  ], win_salva_annulla);
8969
8986
  return win_salva_annulla;
8970
8987
  }());