@fluxhub/fluxhub-lib 19.0.61 → 19.0.62

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.
@@ -629,36 +629,42 @@ class UtilityService {
629
629
  return false;
630
630
  }
631
631
  sql_date(dt) {
632
- if (dt == null)
633
- return 'dbnull';
634
- if (typeof dt == 'undefined')
635
- return 'dbnull';
636
- if (typeof dt == 'string') {
637
- let apdt = this.string2date(dt, 2);
638
- if (apdt)
639
- dt = new Date(apdt);
632
+ try {
633
+ if (dt == null)
634
+ return 'dbnull';
635
+ if (typeof dt == 'undefined')
636
+ return 'dbnull';
637
+ if (typeof dt == 'string') {
638
+ let apdt = this.string2date(dt, 2);
639
+ if (apdt)
640
+ dt = new Date(apdt);
641
+ }
642
+ if (dt.getFullYear() == 1970)
643
+ return 'dbnull';
644
+ var mm = dt.getMonth() + 1; // getMonth() is zero-based
645
+ var dd = dt.getDate();
646
+ if (this.app_s.SQL_SERVER_LANG == 'it')
647
+ return [
648
+ (dd > 9 ? '' : '0') + dd,
649
+ '-',
650
+ (mm > 9 ? '' : '0') + mm,
651
+ '-',
652
+ dt.getFullYear(),
653
+ ].join('');
654
+ if (this.app_s.SQL_SERVER_LANG == 'uk')
655
+ return [
656
+ dt.getFullYear(),
657
+ '-',
658
+ (mm > 9 ? '' : '0') + mm,
659
+ '-',
660
+ (dd > 9 ? '' : '0') + dd,
661
+ ].join('');
662
+ return 'Parametro SQL_SERVER_LANG non corretto';
640
663
  }
641
- if (dt.getFullYear() == 1970)
664
+ catch (e) {
665
+ console.log('ERRORE CONV DATE', dt, typeof dt);
642
666
  return 'dbnull';
643
- var mm = dt.getMonth() + 1; // getMonth() is zero-based
644
- var dd = dt.getDate();
645
- if (this.app_s.SQL_SERVER_LANG == 'it')
646
- return [
647
- (dd > 9 ? '' : '0') + dd,
648
- '-',
649
- (mm > 9 ? '' : '0') + mm,
650
- '-',
651
- dt.getFullYear(),
652
- ].join('');
653
- if (this.app_s.SQL_SERVER_LANG == 'uk')
654
- return [
655
- dt.getFullYear(),
656
- '-',
657
- (mm > 9 ? '' : '0') + mm,
658
- '-',
659
- (dd > 9 ? '' : '0') + dd,
660
- ].join('');
661
- return 'Parametro SQL_SERVER_LANG non corretto';
667
+ }
662
668
  }
663
669
  sql_date_grid(dt, adds = '') {
664
670
  if (dt == null)
@@ -7187,20 +7193,22 @@ class FHWinAskTextComponent {
7187
7193
  appearance="outline"
7188
7194
  floatLabel="always"
7189
7195
  style="width:100%"
7190
- ><mat-label>{{ label }}</mat-label>
7191
- <input matInput type="text" [(ngModel)]="value" required />
7196
+ >
7197
+ <mat-label>{{ label }}</mat-label>
7198
+ <input matInput type="text" [(ngModel)]="value" required (keydown.enter)="do_check()" />
7192
7199
  </mat-form-field>
7193
7200
  <mat-form-field
7194
7201
  appearance="outline"
7195
7202
  floatLabel="always"
7196
7203
  *ngIf="password_mode"
7197
- ><mat-label>{{ label | translate }}</mat-label>
7198
-
7204
+ >
7205
+ <mat-label>{{ label | translate }}</mat-label>
7199
7206
  <input
7200
7207
  autocomplete="new-password"
7201
7208
  matInput
7202
7209
  type="password"
7203
7210
  [(ngModel)]="value"
7211
+ (keydown.enter)="do_check()"
7204
7212
  />
7205
7213
  </mat-form-field>
7206
7214
  <br /><br />
@@ -7274,20 +7282,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
7274
7282
  appearance="outline"
7275
7283
  floatLabel="always"
7276
7284
  style="width:100%"
7277
- ><mat-label>{{ label }}</mat-label>
7278
- <input matInput type="text" [(ngModel)]="value" required />
7285
+ >
7286
+ <mat-label>{{ label }}</mat-label>
7287
+ <input matInput type="text" [(ngModel)]="value" required (keydown.enter)="do_check()" />
7279
7288
  </mat-form-field>
7280
7289
  <mat-form-field
7281
7290
  appearance="outline"
7282
7291
  floatLabel="always"
7283
7292
  *ngIf="password_mode"
7284
- ><mat-label>{{ label | translate }}</mat-label>
7285
-
7293
+ >
7294
+ <mat-label>{{ label | translate }}</mat-label>
7286
7295
  <input
7287
7296
  autocomplete="new-password"
7288
7297
  matInput
7289
7298
  type="password"
7290
7299
  [(ngModel)]="value"
7300
+ (keydown.enter)="do_check()"
7291
7301
  />
7292
7302
  </mat-form-field>
7293
7303
  <br /><br />