@fluxhub/fluxhub-lib 9.0.62 → 9.0.64

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.
@@ -974,7 +974,10 @@
974
974
  var FHConfirmValues = /** @class */ (function () {
975
975
  function FHConfirmValues() {
976
976
  this.title_dialog = "";
977
+ this.b_commento = false;
977
978
  this.msg_dialog = "";
979
+ this.confirm_mgs = "CONFERMA";
980
+ this.annulla_mgs = "ANNULLA";
978
981
  }
979
982
  return FHConfirmValues;
980
983
  }());
@@ -983,12 +986,15 @@
983
986
  * A Sample of how simple it is to create a new window, with its own injects.
984
987
  */
985
988
  var FHConfirmComponent = /** @class */ (function () {
986
- function FHConfirmComponent(dialogRef, app_s, conf) {
989
+ function FHConfirmComponent(dialogRef, app_s, conf, toast) {
987
990
  this.dialogRef = dialogRef;
988
991
  this.app_s = app_s;
989
992
  this.conf = conf;
993
+ this.toast = toast;
990
994
  this.title = "";
991
995
  this.msg = "";
996
+ this.commento = "";
997
+ this.b_commento = false;
992
998
  this.confirm_mgs = "CONFERMA";
993
999
  this.annulla_mgs = "ANNULLA";
994
1000
  if (conf == null) {
@@ -998,7 +1004,20 @@
998
1004
  }
999
1005
  this.title = conf.title_dialog;
1000
1006
  this.msg = conf.msg_dialog;
1007
+ if (conf.b_commento != null)
1008
+ this.b_commento = conf.b_commento;
1009
+ if (conf.confirm_mgs != null)
1010
+ this.confirm_mgs = conf.confirm_mgs;
1011
+ if (conf.annulla_mgs != null)
1012
+ this.annulla_mgs = conf.annulla_mgs;
1001
1013
  }
1014
+ FHConfirmComponent.prototype.ok = function () {
1015
+ if (this.b_commento && this.commento == '') {
1016
+ this.toast.error('Inserire un commento');
1017
+ return;
1018
+ }
1019
+ this.dialogRef.close(true);
1020
+ };
1002
1021
  FHConfirmComponent.prototype.close = function () {
1003
1022
  this.dialogRef.close(null);
1004
1023
  };
@@ -1012,15 +1031,16 @@
1012
1031
  FHConfirmComponent.ctorParameters = function () { return [
1013
1032
  { type: dialog.MatDialogRef },
1014
1033
  { type: AppService },
1015
- { type: FHConfirmValues, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
1034
+ { type: FHConfirmValues, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] },
1035
+ { type: ngxToastr.ToastrService }
1016
1036
  ]; };
1017
1037
  FHConfirmComponent = __decorate([
1018
1038
  core.Component({
1019
- template: "\n\n <h1 mat-dialog-title>{{title}}</h1>\n <div mat-dialog-content style=\"font-size:12px\">{{msg}}</div>\n <div mat-dialog-actions>\n <button mat-button (click)=\"dialogRef.close(true)\" color=\"primary\">{{confirm_mgs}}</button>\n <button mat-button (click)=\"dialogRef.close(false)\" color=\"warn\">{{annulla_mgs}}</button>\n </div>\n ",
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 ",
1020
1040
  styles: ["\n "]
1021
1041
  }),
1022
1042
  __param(2, core.Inject(dialog.MAT_DIALOG_DATA)),
1023
- __metadata("design:paramtypes", [dialog.MatDialogRef, AppService, FHConfirmValues])
1043
+ __metadata("design:paramtypes", [dialog.MatDialogRef, AppService, FHConfirmValues, ngxToastr.ToastrService])
1024
1044
  ], FHConfirmComponent);
1025
1045
  return FHConfirmComponent;
1026
1046
  }());