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