@fluxhub/fluxhub-lib 1.0.604 → 1.0.606

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.
Files changed (32) hide show
  1. package/bundles/fluxhub-fluxhub-lib.umd.js +5349 -5187
  2. package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
  3. package/bundles/fluxhub-fluxhub-lib.umd.min.js +1 -1
  4. package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
  5. package/esm2015/fluxhub-fluxhub-lib.js +6 -5
  6. package/esm2015/lib/controls/fhcombobox.js +1 -2
  7. package/esm2015/lib/controls/fhfieldpicklist.js +2 -2
  8. package/esm2015/lib/controls/fhgrid_toolbar.js +16 -6
  9. package/esm2015/lib/controls/fhuploadpanel.js +5 -3
  10. package/esm2015/lib/controls/win_user_info.js +4 -5
  11. package/esm2015/lib/fluxhub-lib.module.js +4 -3
  12. package/esm2015/lib/wkf_engine/win_sostituisci_utente.js +146 -0
  13. package/esm2015/lib/wkf_engine/wkfapp.js +64 -1
  14. package/esm5/fluxhub-fluxhub-lib.js +6 -5
  15. package/esm5/lib/controls/fhcombobox.js +2 -3
  16. package/esm5/lib/controls/fhfieldpicklist.js +2 -2
  17. package/esm5/lib/controls/fhgrid_toolbar.js +11 -2
  18. package/esm5/lib/controls/fhuploadpanel.js +2 -2
  19. package/esm5/lib/controls/win_user_info.js +2 -3
  20. package/esm5/lib/fluxhub-lib.module.js +4 -3
  21. package/esm5/lib/wkf_engine/win_sostituisci_utente.js +133 -0
  22. package/esm5/lib/wkf_engine/wkfapp.js +88 -21
  23. package/fesm2015/fluxhub-fluxhub-lib.js +989 -815
  24. package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
  25. package/fesm5/fluxhub-fluxhub-lib.js +5344 -5183
  26. package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
  27. package/fluxhub-fluxhub-lib.d.ts +5 -4
  28. package/fluxhub-fluxhub-lib.metadata.json +1 -1
  29. package/lib/controls/fhgrid_toolbar.d.ts +1 -0
  30. package/lib/wkf_engine/win_sostituisci_utente.d.ts +23 -0
  31. package/lib/wkf_engine/wkfapp.d.ts +1 -0
  32. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { Injectable, defineInjectable, Component, inject, ViewChild, ViewContainerRef, Directive, EventEmitter, Input, Output, HostListener, Pipe, ElementRef, Inject, PLATFORM_ID, forwardRef, Optional, NgModule } from '@angular/core';
1
+ import { Injectable, defineInjectable, Component, inject, ViewChild, ViewContainerRef, Directive, EventEmitter, Input, Output, forwardRef, HostListener, Pipe, ElementRef, Inject, PLATFORM_ID, Optional, NgModule } from '@angular/core';
2
2
  import { HttpHeaders, HttpClient } from '@angular/common/http';
3
3
  import { ToastrService } from 'ngx-toastr';
4
4
  import { map, catchError, flatMap } from 'rxjs/operators';
@@ -2860,7 +2860,6 @@ class FHComboboxComponent {
2860
2860
  fillCombo() {
2861
2861
  // console.log(this.init_fill);
2862
2862
  // if(!this.init_fill){this.init_fill=true;return;}
2863
- console.log("fillcombo " + this.sql);
2864
2863
  if (this.sql.indexOf('|') != -1 && this.sql.indexOf('$') != -1) {
2865
2864
  this.set_options(this.sql);
2866
2865
  return;
@@ -4408,6 +4407,7 @@ FHUploadPanelComponent.decorators = [
4408
4407
  <td style="text-align:center">{{app.Filesize}}</td>
4409
4408
  <td>
4410
4409
  <div fxLayout="row">
4410
+ <div *ngIf="enabled">
4411
4411
  <a mat-icon-button matTooltip="Modifica Descrizione" *ngIf="app.can_delete" (click)="edit_descri(app)">
4412
4412
  <mat-icon>edit</mat-icon>
4413
4413
  </a>
@@ -4415,7 +4415,7 @@ FHUploadPanelComponent.decorators = [
4415
4415
  <a mat-icon-button [matTooltip]="'Modifica Descrizione consentita solo a: '+app.nc" *ngIf="!app.can_delete" [disabled]="true" >
4416
4416
  <mat-icon>edit</mat-icon>
4417
4417
  </a>
4418
-
4418
+ </div>
4419
4419
  <div [innerHTML]="app.descrizione_vis" style="width:100%">
4420
4420
  </div>
4421
4421
  </div></td>
@@ -4493,6 +4493,7 @@ FHUploadPanelComponent.decorators = [
4493
4493
  <td style="text-align:center">{{app.Filesize}}</td>
4494
4494
  <td>
4495
4495
  <div fxLayout="row">
4496
+ <div *ngIf="enabled">
4496
4497
  <a mat-icon-button matTooltip="Modifica Descrizione" *ngIf="app.can_delete" (click)="edit_descri(app)">
4497
4498
  <mat-icon>edit</mat-icon>
4498
4499
  </a>
@@ -4500,7 +4501,7 @@ FHUploadPanelComponent.decorators = [
4500
4501
  <a mat-icon-button [matTooltip]="'Modifica Descrizione consentita solo a: '+app.nc" *ngIf="!app.can_delete" [disabled]="true" >
4501
4502
  <mat-icon>edit</mat-icon>
4502
4503
  </a>
4503
-
4504
+ </div>
4504
4505
  <div [innerHTML]="app.descrizione_vis" style="width:100%">
4505
4506
  </div>
4506
4507
  </div></td>
@@ -5457,176 +5458,690 @@ win_riassegna_select_user.propDecorators = {
5457
5458
  * @fileoverview added by tsickle
5458
5459
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5459
5460
  */
5460
- /**
5461
- * @abstract
5462
- */
5463
- class wkfapp {
5461
+ /** @type {?} */
5462
+ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR = {
5463
+ provide: NG_VALUE_ACCESSOR,
5464
+ useExisting: forwardRef((/**
5465
+ * @return {?}
5466
+ */
5467
+ () => FHUserFieldComponent)),
5468
+ multi: true
5469
+ };
5470
+ class FHUserFieldComponent {
5464
5471
  /**
5465
- * @protected
5466
- * @param {?} app_s
5467
- * @param {?} m_service
5468
- * @param {?} m_dataService
5469
- * @param {?} m_fservice
5470
- * @param {?} m_router
5471
- * @param {?} _toastr
5472
+ * @param {?} dataservice
5472
5473
  * @param {?} dialog
5473
- * @param {?} m_wkf
5474
- * @param {?} m_uti
5475
5474
  */
5476
- constructor(app_s, m_service, m_dataService, m_fservice, m_router, _toastr, dialog, m_wkf, m_uti) {
5477
- this.app_s = app_s;
5478
- this.m_service = m_service;
5479
- this.m_dataService = m_dataService;
5480
- this.m_fservice = m_fservice;
5481
- this.m_router = m_router;
5482
- this._toastr = _toastr;
5475
+ constructor(dataservice, dialog) {
5476
+ this.dataservice = dataservice;
5483
5477
  this.dialog = dialog;
5484
- this.m_wkf = m_wkf;
5485
- this.m_uti = m_uti;
5486
- this.b_editing = false;
5487
- this.is_Supervisor = false;
5488
- this.is_Visor = false;
5489
- this.is_Admin = false;
5490
- this.is_PowerUser = false;
5491
- this.is_Ins = false;
5492
- this.id_applicativo = "";
5493
- this.codice_app = ""; //codice documento
5494
- //codice documento
5495
- this.att_panelcat = ""; //descrizione breve
5496
- //descrizione breve
5497
- this.documento_pubblico = false;
5498
- this.titolo_email = "";
5499
- this.tbl_name = ""; //vista sql
5500
- //vista sql
5501
- this.app_root = "";
5502
- this.grid_key = "";
5503
- this.m_id_Doc = "";
5504
- this.title = "";
5505
- this.user_nome = "";
5506
- this.user_cognome = "";
5507
- this.user_email = "";
5508
- this.b_initd = false;
5509
- this.nota_wax = "";
5510
- this.is_init = false;
5511
- this.imp = "";
5512
- this.m_cod_documento = '';
5513
- this.sort_field = '';
5514
- if (!m_service.checkCredentials()) {
5515
- return;
5516
- }
5517
- this.sort_field = "case when CHARINDEX('" + this.user_idp + "',autori)>0 then 1 else 0 end desc,codice desc";
5478
+ this.label = '';
5479
+ this.required = false;
5480
+ this.enabled = true;
5481
+ this.hidden = false;
5482
+ this.multi = false;
5483
+ this.change = new EventEmitter();
5484
+ this.select = new EventEmitter();
5485
+ this.userName = '';
5486
+ this.selectedUser = [];
5487
+ this.all_user = null;
5488
+ this.onChange = (/**
5489
+ * @param {?} _
5490
+ * @return {?}
5491
+ */
5492
+ (_) => {
5493
+ });
5494
+ this.onTouched = (/**
5495
+ * @return {?}
5496
+ */
5497
+ () => {
5498
+ });
5518
5499
  }
5519
5500
  /**
5520
- * @param {?} a
5521
- * @param {?} d
5522
5501
  * @return {?}
5523
5502
  */
5524
- goto_edit_doc(a, d) {
5525
- this.m_router.navigate([this.app_root, a, d, 'edit']);
5503
+ ngOnInit() {
5504
+ if (this.required)
5505
+ this.label = this.label + ' *';
5526
5506
  }
5527
5507
  /**
5528
- * @param {?} o
5529
5508
  * @return {?}
5530
5509
  */
5531
- cmd_wkf(o) {
5532
- if (o.cmd == 'annulla_richiesta')
5533
- this.annulla_richiesta();
5534
- if (o.cmd == 'recupera_richiesta')
5535
- this.recupera_richiesta();
5536
- if (o.cmd == 'riassegna_richiesta')
5537
- this.riassegna_richiesta();
5538
- if (o.cmd == 'annulla_imp')
5539
- this.annulla_imp();
5540
- if (o.cmd == 'test_utente')
5541
- this.test_utente();
5542
- if (o.cmd == 'insert_doc')
5543
- this.insert_doc();
5510
+ getUsersNc() {
5511
+ /** @type {?} */
5512
+ let s_nc = '';
5513
+ for (let i = 0; i < this.selectedUser.length; i++) {
5514
+ if (s_nc != '')
5515
+ s_nc = s_nc + ',';
5516
+ s_nc = s_nc + `${this.selectedUser[i].cognome} ${this.selectedUser[i].nome}`;
5517
+ }
5518
+ return s_nc;
5544
5519
  }
5545
5520
  /**
5546
5521
  * @return {?}
5547
5522
  */
5548
- annulla_richiesta() {
5549
- if (this.get_grid().sRow == null) {
5550
- this._toastr.error("Selezionare il documento da annullare");
5551
- return;
5552
- }
5553
- localStorage.setItem(this.app_s.COMPANY_KEY + "title_dialog", 'Conferma Operazione');
5554
- localStorage.setItem(this.app_s.COMPANY_KEY + "msg_dialog", "Confermi di voler annullare il documento numero: " + this.get_grid().sRow.codice + "?");
5523
+ getUsersEmail() {
5555
5524
  /** @type {?} */
5556
- let dialogRef = this.dialog.open(FHConfirmComponent, { 'disableClose': true });
5557
- dialogRef.afterClosed().subscribe((/**
5558
- * @param {?} result
5559
- * @return {?}
5560
- */
5561
- result => {
5562
- if (result) {
5563
- /** @type {?} */
5564
- let p = new QParam();
5565
- p.sql = "UPDATE_WKF_ANNULATO";
5566
- p.types = ['string', 'string', 'int'];
5567
- p.values = [
5568
- this.id_applicativo, this.get_grid().sRow.uiid, -1
5569
- ];
5570
- this
5571
- .m_dataService
5572
- .doQuery(p)
5573
- .subscribe((/**
5574
- * @param {?} data
5575
- * @return {?}
5576
- */
5577
- data => {
5578
- if (data != null)
5579
- if (data.result_msg == "OK") {
5580
- this.get_grid().doFill('');
5581
- }
5582
- }));
5583
- }
5584
- }));
5525
+ let s_nc = '';
5526
+ for (let i = 0; i < this.selectedUser.length; i++) {
5527
+ if (s_nc != '')
5528
+ s_nc = s_nc + ',';
5529
+ s_nc = s_nc + `${this.selectedUser[i].email}`;
5530
+ }
5531
+ return s_nc;
5585
5532
  }
5586
5533
  /**
5587
5534
  * @return {?}
5588
5535
  */
5589
- recupera_richiesta() {
5536
+ getUsersUsername() {
5590
5537
  /** @type {?} */
5591
- let dialogRef = this.dialog.open(win_recupera_doc, { 'disableClose': true });
5592
- dialogRef.componentInstance.init_w(this.id_applicativo);
5593
- dialogRef.afterClosed().subscribe((/**
5594
- * @param {?} result
5595
- * @return {?}
5596
- */
5597
- result => {
5598
- if (result == 'ok')
5599
- this.get_grid().doFill('');
5600
- }));
5538
+ let s_nc = '';
5539
+ for (let i = 0; i < this.selectedUser.length; i++) {
5540
+ if (s_nc != '')
5541
+ s_nc = s_nc + ',';
5542
+ s_nc = s_nc + `${this.selectedUser[i].username}`;
5543
+ }
5544
+ return s_nc;
5601
5545
  }
5602
5546
  /**
5547
+ * @param {?} value
5603
5548
  * @return {?}
5604
5549
  */
5605
- riassegna_richiesta() {
5606
- if (this.get_grid().sRow == null) {
5607
- this._toastr.error("Selezionare il documento da riassegnare");
5550
+ writeValue(value) {
5551
+ if (value == null) {
5552
+ this.clear();
5608
5553
  return;
5609
5554
  }
5555
+ if (value == '') {
5556
+ this.clear();
5557
+ return;
5558
+ }
5559
+ if (value == 'noop') {
5560
+ this.userName = this.getUsersNc();
5561
+ this.onChange(this.getUsersUsername());
5562
+ return;
5563
+ }
5564
+ if (this.selectedUser == null) {
5565
+ this.setByUsername(value);
5566
+ this.userName = this.getUsersNc();
5567
+ return;
5568
+ }
5569
+ if (this.getUsersUsername() != value) {
5570
+ this.setByUsername(value);
5571
+ this.userName = this.getUsersNc();
5572
+ }
5573
+ }
5574
+ /**
5575
+ * @param {?} emails
5576
+ * @return {?}
5577
+ */
5578
+ setByEmail(emails) {
5579
+ console.log('emails ', emails);
5580
+ if (emails == null)
5581
+ return;
5582
+ if (emails == '')
5583
+ return;
5610
5584
  /** @type {?} */
5611
- let p = new QParam();
5612
- p.sql = "SELECT_WLIVELLIV2ADM";
5613
- p.types = ['string', 'string', 'string'];
5614
- p.values = [this.id_applicativo, this.get_grid().sRow.uiid, this.get_grid().sRow.stato];
5615
- this
5616
- .m_dataService
5617
- .doQuery(p)
5585
+ let a = emails.split(',');
5586
+ /** @type {?} */
5587
+ let s_nc = '';
5588
+ for (let i = 0; i < a.length; i++) {
5589
+ if (s_nc != '')
5590
+ s_nc = s_nc + ',';
5591
+ s_nc = s_nc + '\'' + a[i] + '\'';
5592
+ }
5593
+ console.log('s_nc ', s_nc);
5594
+ if (s_nc == "")
5595
+ return;
5596
+ /** @type {?} */
5597
+ const param = {
5598
+ sql: 'SELECT_USERS_INFOS_BY_EMAIL_NOREP',
5599
+ types: ['string'],
5600
+ values: [s_nc],
5601
+ names: [],
5602
+ };
5603
+ console.log(param);
5604
+ this.dataservice.doQuery(param)
5618
5605
  .subscribe((/**
5619
5606
  * @param {?} data
5620
5607
  * @return {?}
5621
5608
  */
5622
- data => {
5623
- if (data != null)
5624
- if (data.result_msg == "OK") {
5625
- this.livs_adm = data.result_data;
5626
- /** @type {?} */
5627
- let s_i = new Array();
5628
- /** @type {?} */
5629
- let ap_lvl = "";
5609
+ (data) => {
5610
+ /** @type {?} */
5611
+ let result = data.result_data;
5612
+ if (result != null) {
5613
+ this.selectedUser = result;
5614
+ this.writeValue('noop');
5615
+ this.select.emit(this.selectedUser);
5616
+ console.log(this.selectedUser);
5617
+ this.userName = this.getUsersNc();
5618
+ console.log(this.userName);
5619
+ }
5620
+ else
5621
+ this.clear();
5622
+ }));
5623
+ }
5624
+ /**
5625
+ * @param {?} username
5626
+ * @return {?}
5627
+ */
5628
+ setByUsername(username) {
5629
+ if (!username)
5630
+ return;
5631
+ /** @type {?} */
5632
+ let a = username.split(',');
5633
+ /** @type {?} */
5634
+ let s_nc = '';
5635
+ for (let i = 0; i < a.length; i++) {
5636
+ if (s_nc != '')
5637
+ s_nc = s_nc + ',';
5638
+ s_nc = s_nc + '\'' + a[i] + '\'';
5639
+ }
5640
+ /** @type {?} */
5641
+ const param = {
5642
+ sql: 'SELECT_USERS_INFOS_BY_USERNAME_NOREP',
5643
+ types: ['string'],
5644
+ values: [s_nc],
5645
+ names: [],
5646
+ };
5647
+ this.dataservice.doQuery(param)
5648
+ .subscribe((/**
5649
+ * @param {?} data
5650
+ * @return {?}
5651
+ */
5652
+ (data) => {
5653
+ /** @type {?} */
5654
+ let result = data.result_data;
5655
+ if (result != null) {
5656
+ this.selectedUser = result;
5657
+ this.writeValue('noop');
5658
+ this.select.emit(this.selectedUser);
5659
+ console.log(this.selectedUser);
5660
+ this.userName = this.getUsersNc();
5661
+ console.log(this.userName);
5662
+ }
5663
+ else
5664
+ this.clear();
5665
+ }));
5666
+ }
5667
+ /**
5668
+ * @return {?}
5669
+ */
5670
+ load_all_users() {
5671
+ /** @type {?} */
5672
+ const param = {
5673
+ sql: 'SELECT_ALL_USERS',
5674
+ types: [],
5675
+ values: [],
5676
+ names: [],
5677
+ };
5678
+ this.dataservice.doQuery(param)
5679
+ .subscribe((/**
5680
+ * @param {?} data
5681
+ * @return {?}
5682
+ */
5683
+ (data) => {
5684
+ this.all_user = data.result_data;
5685
+ if (this.all_user == null) {
5686
+ this.all_user = [];
5687
+ }
5688
+ this.open_pick();
5689
+ }));
5690
+ }
5691
+ /**
5692
+ * @return {?}
5693
+ */
5694
+ open_pick() {
5695
+ if (this.all_user == null) {
5696
+ this.load_all_users();
5697
+ return;
5698
+ }
5699
+ if (!this.enabled)
5700
+ return;
5701
+ /** @type {?} */
5702
+ let dialogRef = this.dialog.open(FHUserPickerComponent, {
5703
+ disableClose: true, width: "700px", height: "550px"
5704
+ });
5705
+ dialogRef.componentInstance.user_sel = this.selectedUser;
5706
+ dialogRef.componentInstance.users_list = Object.assign([], this.all_user);
5707
+ dialogRef.componentInstance.single_sel = !this.multi;
5708
+ dialogRef.componentInstance.filtra();
5709
+ dialogRef.afterClosed().subscribe((/**
5710
+ * @param {?} result
5711
+ * @return {?}
5712
+ */
5713
+ result => {
5714
+ if (result == null)
5715
+ return;
5716
+ if (result != null) {
5717
+ this.selectedUser = result;
5718
+ this.writeValue('noop');
5719
+ this.select.emit(this.selectedUser);
5720
+ this.userName = this.getUsersNc();
5721
+ }
5722
+ this.change.emit(this.selectedUser);
5723
+ this.select.emit(this.selectedUser);
5724
+ }));
5725
+ }
5726
+ /**
5727
+ * @return {?}
5728
+ */
5729
+ clear() {
5730
+ this.selectedUser = [];
5731
+ this.onChange([]);
5732
+ this.userName = "";
5733
+ }
5734
+ /**
5735
+ * @param {?} fn
5736
+ * @return {?}
5737
+ */
5738
+ registerOnChange(fn) {
5739
+ this.onChange = fn;
5740
+ }
5741
+ /**
5742
+ * @param {?} fn
5743
+ * @return {?}
5744
+ */
5745
+ registerOnTouched(fn) {
5746
+ this.onTouched = fn;
5747
+ }
5748
+ }
5749
+ FHUserFieldComponent.decorators = [
5750
+ { type: Component, args: [{
5751
+ selector: 'FHUserField', providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR],
5752
+ template: `
5753
+ <div fxLayout="row" [hidden]="!enabled || hidden">
5754
+ <mat-form-field style="clickable-field" (click)="open_pick()" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
5755
+
5756
+ <input matInput
5757
+ [hidden]="hidden"
5758
+
5759
+ type="text"
5760
+ [ngModel]="userName"
5761
+ [disabled]="false" readonly>
5762
+
5763
+ </mat-form-field>
5764
+ <button mat-icon-button matSuffix
5765
+ [hidden]="selectedUser.length==0"
5766
+ (click)="clear()">
5767
+ <mat-icon>clear</mat-icon>
5768
+ </button>
5769
+ </div>
5770
+ <mat-form-field [hidden]="enabled || hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
5771
+ <input type="text" #el1 matInput [disabled]="true" [(ngModel)]="userName"
5772
+ >
5773
+ </mat-form-field>
5774
+ `,
5775
+ styles: [`
5776
+ .clickable-field {
5777
+ border: 1px solid #000000;
5778
+ color: #000000;
5779
+ }
5780
+
5781
+ .clickable-field:focus {
5782
+ outline: none;
5783
+ }
5784
+
5785
+ :host ::ng-deep .mat-input-element {
5786
+ cursor: pointer !important;
5787
+ }
5788
+ `]
5789
+ }] }
5790
+ ];
5791
+ /** @nocollapse */
5792
+ FHUserFieldComponent.ctorParameters = () => [
5793
+ { type: QueryService },
5794
+ { type: MatDialog }
5795
+ ];
5796
+ FHUserFieldComponent.propDecorators = {
5797
+ label: [{ type: Input }],
5798
+ required: [{ type: Input }],
5799
+ enabled: [{ type: Input }],
5800
+ hidden: [{ type: Input }],
5801
+ multi: [{ type: Input }],
5802
+ change: [{ type: Output }],
5803
+ select: [{ type: Output }],
5804
+ userName: [{ type: Input }]
5805
+ };
5806
+
5807
+ /**
5808
+ * @fileoverview added by tsickle
5809
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5810
+ */
5811
+ class win_sostituisci_utente {
5812
+ /**
5813
+ * @param {?} dialogRef
5814
+ * @param {?} m_appService
5815
+ * @param {?} toastr
5816
+ * @param {?} _dataService
5817
+ */
5818
+ constructor(dialogRef, m_appService, toastr, _dataService) {
5819
+ this.dialogRef = dialogRef;
5820
+ this.m_appService = m_appService;
5821
+ this.toastr = toastr;
5822
+ this._dataService = _dataService;
5823
+ this.nota = "";
5824
+ this.title = "";
5825
+ this.comm_notrequired = true;
5826
+ this.comm_notrequired = true;
5827
+ }
5828
+ /**
5829
+ * @return {?}
5830
+ */
5831
+ ok() {
5832
+ console.log(this.up.getUsersUsername(), this.up1.getUsersUsername());
5833
+ if (this.up.getUsersUsername() == null) {
5834
+ this.toastr.error('selezionare utente origine');
5835
+ return;
5836
+ }
5837
+ if (this.up.getUsersUsername() == '-1') {
5838
+ this.toastr.error('selezionare utente origine');
5839
+ return;
5840
+ }
5841
+ if (this.up.getUsersUsername() == '') {
5842
+ this.toastr.error('selezionare utente origine');
5843
+ return;
5844
+ }
5845
+ if (this.up1.getUsersUsername() == null) {
5846
+ this.toastr.error('selezionare utente destinazione');
5847
+ return;
5848
+ }
5849
+ if (this.up1.getUsersUsername() == '-1') {
5850
+ this.toastr.error('selezionare utente destinazione');
5851
+ return;
5852
+ }
5853
+ if (this.up1.getUsersUsername() == '') {
5854
+ this.toastr.error('selezionare utente destinazione');
5855
+ return;
5856
+ }
5857
+ /** @type {?} */
5858
+ let o = new Object();
5859
+ o.u1 = this.up.getUsersUsername();
5860
+ o.u2 = this.up1.getUsersUsername();
5861
+ o.result = "ok";
5862
+ this.dialogRef.close(o);
5863
+ }
5864
+ /**
5865
+ * @return {?}
5866
+ */
5867
+ annulla() {
5868
+ this.dialogRef.close("");
5869
+ }
5870
+ /**
5871
+ * @return {?}
5872
+ */
5873
+ ngOnInit() {
5874
+ }
5875
+ }
5876
+ win_sostituisci_utente.decorators = [
5877
+ { type: Component, args: [{
5878
+ template: `
5879
+
5880
+ <h4 mat-dialog-title>{{title}}
5881
+ </h4>
5882
+ <div mat-dialog-content fxLayoutGap="5px" fxLayout="column" style="font-size:12px">
5883
+ <div style="width:100%">
5884
+ <FHUserField label="Utente da sostituire" #up ></FHUserField>
5885
+ </div>
5886
+ <div style="width:100%">
5887
+ <FHUserField label="Utente sostituto" #up1 ></FHUserField>
5888
+ </div>
5889
+
5890
+ </div>
5891
+ <div mat-dialog-actions fxLayout="row" fxLayoutAlign="center center">
5892
+ <div><button mat-flat-button color="primary" (click)="ok()"> OK</button></div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
5893
+ <div> <button mat-flat-button style="background-color: #F5F5F5" (click)="annulla()">ANNULLA</button></div>
5894
+ </div>
5895
+
5896
+ `
5897
+ }] }
5898
+ ];
5899
+ /** @nocollapse */
5900
+ win_sostituisci_utente.ctorParameters = () => [
5901
+ { type: MatDialogRef },
5902
+ { type: AppService },
5903
+ { type: ToastrService },
5904
+ { type: QueryService }
5905
+ ];
5906
+ win_sostituisci_utente.propDecorators = {
5907
+ up: [{ type: ViewChild, args: ['up',] }],
5908
+ up1: [{ type: ViewChild, args: ['up1',] }]
5909
+ };
5910
+
5911
+ /**
5912
+ * @fileoverview added by tsickle
5913
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5914
+ */
5915
+ /**
5916
+ * @abstract
5917
+ */
5918
+ class wkfapp {
5919
+ /**
5920
+ * @protected
5921
+ * @param {?} app_s
5922
+ * @param {?} m_service
5923
+ * @param {?} m_dataService
5924
+ * @param {?} m_fservice
5925
+ * @param {?} m_router
5926
+ * @param {?} _toastr
5927
+ * @param {?} dialog
5928
+ * @param {?} m_wkf
5929
+ * @param {?} m_uti
5930
+ */
5931
+ constructor(app_s, m_service, m_dataService, m_fservice, m_router, _toastr, dialog, m_wkf, m_uti) {
5932
+ this.app_s = app_s;
5933
+ this.m_service = m_service;
5934
+ this.m_dataService = m_dataService;
5935
+ this.m_fservice = m_fservice;
5936
+ this.m_router = m_router;
5937
+ this._toastr = _toastr;
5938
+ this.dialog = dialog;
5939
+ this.m_wkf = m_wkf;
5940
+ this.m_uti = m_uti;
5941
+ this.b_editing = false;
5942
+ this.is_Supervisor = false;
5943
+ this.is_Visor = false;
5944
+ this.is_Admin = false;
5945
+ this.is_PowerUser = false;
5946
+ this.is_Ins = false;
5947
+ this.id_applicativo = "";
5948
+ this.codice_app = ""; //codice documento
5949
+ //codice documento
5950
+ this.att_panelcat = ""; //descrizione breve
5951
+ //descrizione breve
5952
+ this.documento_pubblico = false;
5953
+ this.titolo_email = "";
5954
+ this.tbl_name = ""; //vista sql
5955
+ //vista sql
5956
+ this.app_root = "";
5957
+ this.grid_key = "";
5958
+ this.m_id_Doc = "";
5959
+ this.title = "";
5960
+ this.user_nome = "";
5961
+ this.user_cognome = "";
5962
+ this.user_email = "";
5963
+ this.b_initd = false;
5964
+ this.nota_wax = "";
5965
+ this.is_init = false;
5966
+ this.imp = "";
5967
+ this.m_cod_documento = '';
5968
+ this.sort_field = '';
5969
+ if (!m_service.checkCredentials()) {
5970
+ return;
5971
+ }
5972
+ this.sort_field = "case when CHARINDEX('" + this.user_idp + "',autori)>0 then 1 else 0 end desc,codice desc";
5973
+ }
5974
+ /**
5975
+ * @param {?} a
5976
+ * @param {?} d
5977
+ * @return {?}
5978
+ */
5979
+ goto_edit_doc(a, d) {
5980
+ this.m_router.navigate([this.app_root, a, d, 'edit']);
5981
+ }
5982
+ /**
5983
+ * @param {?} o
5984
+ * @return {?}
5985
+ */
5986
+ cmd_wkf(o) {
5987
+ if (o.cmd == 'annulla_richiesta')
5988
+ this.annulla_richiesta();
5989
+ if (o.cmd == 'recupera_richiesta')
5990
+ this.recupera_richiesta();
5991
+ if (o.cmd == 'riassegna_richiesta')
5992
+ this.riassegna_richiesta();
5993
+ if (o.cmd == 'sostituisci_utente')
5994
+ this.sostituisci_utente();
5995
+ if (o.cmd == 'annulla_imp')
5996
+ this.annulla_imp();
5997
+ if (o.cmd == 'test_utente')
5998
+ this.test_utente();
5999
+ if (o.cmd == 'insert_doc')
6000
+ this.insert_doc();
6001
+ }
6002
+ /**
6003
+ * @return {?}
6004
+ */
6005
+ annulla_richiesta() {
6006
+ if (this.get_grid().sRow == null) {
6007
+ this._toastr.error("Selezionare il documento da annullare");
6008
+ return;
6009
+ }
6010
+ localStorage.setItem(this.app_s.COMPANY_KEY + "title_dialog", 'Conferma Operazione');
6011
+ localStorage.setItem(this.app_s.COMPANY_KEY + "msg_dialog", "Confermi di voler annullare il documento numero: " + this.get_grid().sRow.codice + "?");
6012
+ /** @type {?} */
6013
+ let dialogRef = this.dialog.open(FHConfirmComponent, { 'disableClose': true });
6014
+ dialogRef.afterClosed().subscribe((/**
6015
+ * @param {?} result
6016
+ * @return {?}
6017
+ */
6018
+ result => {
6019
+ if (result) {
6020
+ /** @type {?} */
6021
+ let p = new QParam();
6022
+ p.sql = "UPDATE_WKF_ANNULATO";
6023
+ p.types = ['string', 'string', 'int'];
6024
+ p.values = [
6025
+ this.id_applicativo, this.get_grid().sRow.uiid, -1
6026
+ ];
6027
+ this
6028
+ .m_dataService
6029
+ .doQuery(p)
6030
+ .subscribe((/**
6031
+ * @param {?} data
6032
+ * @return {?}
6033
+ */
6034
+ data => {
6035
+ if (data != null)
6036
+ if (data.result_msg == "OK") {
6037
+ this.get_grid().doFill('');
6038
+ }
6039
+ }));
6040
+ }
6041
+ }));
6042
+ }
6043
+ /**
6044
+ * @return {?}
6045
+ */
6046
+ recupera_richiesta() {
6047
+ /** @type {?} */
6048
+ let dialogRef = this.dialog.open(win_recupera_doc, { 'disableClose': true });
6049
+ dialogRef.componentInstance.init_w(this.id_applicativo);
6050
+ dialogRef.afterClosed().subscribe((/**
6051
+ * @param {?} result
6052
+ * @return {?}
6053
+ */
6054
+ result => {
6055
+ if (result == 'ok')
6056
+ this.get_grid().doFill('');
6057
+ }));
6058
+ }
6059
+ /**
6060
+ * @return {?}
6061
+ */
6062
+ sostituisci_utente() {
6063
+ if (this.get_grid().sRow == null) {
6064
+ this._toastr.error("Selezionare il documento");
6065
+ return;
6066
+ }
6067
+ /** @type {?} */
6068
+ let p = new QParam();
6069
+ p.sql = "SELECT_USERS_BY_WKF_DOC";
6070
+ p.types = ['string', 'string'];
6071
+ p.values = [this.id_applicativo, this.get_grid().sRow.uiid];
6072
+ this
6073
+ .m_dataService
6074
+ .doQuery(p)
6075
+ .subscribe((/**
6076
+ * @param {?} data
6077
+ * @return {?}
6078
+ */
6079
+ data => {
6080
+ if (data != null)
6081
+ if (data.result_msg == "OK") {
6082
+ /** @type {?} */
6083
+ let dialogRef = this.dialog.open(win_sostituisci_utente, { 'disableClose': true, 'width': '450px' });
6084
+ dialogRef.componentInstance.up.all_user = data.result_data;
6085
+ dialogRef.componentInstance.title = "Sostituzione utente: " + this.get_grid().sRow.codice + " - " + this.get_grid().sRow.oggetto;
6086
+ dialogRef.afterClosed().subscribe((/**
6087
+ * @param {?} result
6088
+ * @return {?}
6089
+ */
6090
+ result => {
6091
+ if (result != null)
6092
+ if (result.result != null)
6093
+ if (result.result == 'ok') {
6094
+ /** @type {?} */
6095
+ let p = new QParam();
6096
+ p.sql = "UPDATE_USER_WORKFLOW";
6097
+ p.types = ['string', 'string', 'string', 'string'];
6098
+ p.values = [this.id_applicativo, this.get_grid().sRow.uiid, result.u1, result.u2];
6099
+ this
6100
+ .m_dataService
6101
+ .doQuery(p)
6102
+ .subscribe((/**
6103
+ * @param {?} data
6104
+ * @return {?}
6105
+ */
6106
+ data => {
6107
+ if (data != null)
6108
+ if (data.result_msg == "OK") {
6109
+ this._toastr.info('Workflow Aggiornato');
6110
+ }
6111
+ }));
6112
+ }
6113
+ }));
6114
+ }
6115
+ }));
6116
+ }
6117
+ /**
6118
+ * @return {?}
6119
+ */
6120
+ riassegna_richiesta() {
6121
+ if (this.get_grid().sRow == null) {
6122
+ this._toastr.error("Selezionare il documento da riassegnare");
6123
+ return;
6124
+ }
6125
+ /** @type {?} */
6126
+ let p = new QParam();
6127
+ p.sql = "SELECT_WLIVELLIV2ADM";
6128
+ p.types = ['string', 'string', 'string'];
6129
+ p.values = [this.id_applicativo, this.get_grid().sRow.uiid, this.get_grid().sRow.stato];
6130
+ this
6131
+ .m_dataService
6132
+ .doQuery(p)
6133
+ .subscribe((/**
6134
+ * @param {?} data
6135
+ * @return {?}
6136
+ */
6137
+ data => {
6138
+ if (data != null)
6139
+ if (data.result_msg == "OK") {
6140
+ this.livs_adm = data.result_data;
6141
+ /** @type {?} */
6142
+ let s_i = new Array();
6143
+ /** @type {?} */
6144
+ let ap_lvl = "";
5630
6145
  for (let i = 0; i < this.livs_adm.length; i++)
5631
6146
  if (ap_lvl.indexOf(String(this.livs_adm[i].livello)) == -1) {
5632
6147
  ap_lvl = ap_lvl + String(this.livs_adm[i].livello) + "|";
@@ -10816,7 +11331,7 @@ FHLogPanelComponent.propDecorators = {
10816
11331
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
10817
11332
  */
10818
11333
  /** @type {?} */
10819
- const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR = {
11334
+ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 = {
10820
11335
  provide: NG_VALUE_ACCESSOR,
10821
11336
  useExisting: forwardRef((/**
10822
11337
  * @return {?}
@@ -10992,7 +11507,7 @@ class FHCurrencyFieldComponent {
10992
11507
  FHCurrencyFieldComponent.decorators = [
10993
11508
  { type: Component, args: [{
10994
11509
  selector: 'FHCurrencyField',
10995
- providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR],
11510
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1],
10996
11511
  template: `
10997
11512
  <mat-form-field [hidden]="!enabled || hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
10998
11513
  <input type="text" style="text-align:right" #el matInput
@@ -11016,229 +11531,16 @@ FHCurrencyFieldComponent.decorators = [
11016
11531
  FHCurrencyFieldComponent.ctorParameters = () => [];
11017
11532
  FHCurrencyFieldComponent.propDecorators = {
11018
11533
  el: [{ type: ViewChild, args: ['el',] }],
11019
- decimal: [{ type: Input }],
11020
- label: [{ type: Input }],
11021
- required: [{ type: Input }],
11022
- enabled: [{ type: Input }],
11023
- hidden: [{ type: Input }],
11024
- color: [{ type: Input }],
11025
- label_width: [{ type: Input }],
11026
- change: [{ type: Output }],
11027
- enter_pressed: [{ type: Output }],
11028
- value: [{ type: Input }]
11029
- };
11030
-
11031
- /**
11032
- * @fileoverview added by tsickle
11033
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11034
- */
11035
- /** @type {?} */
11036
- const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT = {
11037
- provide: NG_VALUE_ACCESSOR,
11038
- useExisting: forwardRef((/**
11039
- * @return {?}
11040
- */
11041
- () => FHRichText)),
11042
- multi: true
11043
- };
11044
- class FHRichText {
11045
- constructor() {
11046
- this.enabled = true;
11047
- this.value = "";
11048
- this.label = "";
11049
- this.height = "360";
11050
- this.change = new EventEmitter();
11051
- this.focus = new EventEmitter();
11052
- this.blur = new EventEmitter();
11053
- this.config = new Object();
11054
- this.onChange = (/**
11055
- * @param {?} _
11056
- * @return {?}
11057
- */
11058
- (_) => {
11059
- });
11060
- this.onTouched = (/**
11061
- * @return {?}
11062
- */
11063
- () => {
11064
- });
11065
- }
11066
- /**
11067
- * @param {?} o
11068
- * @return {?}
11069
- */
11070
- onFocus(o) {
11071
- this.focus.emit(o);
11072
- }
11073
- /**
11074
- * @param {?} o
11075
- * @return {?}
11076
- */
11077
- onBlur(o) {
11078
- this.blur.emit(o);
11079
- }
11080
- /**
11081
- * @return {?}
11082
- */
11083
- ngOnInit() {
11084
- this.config = { height: this.height };
11085
- if (this.enabled) {
11086
- this.config.toolbarGroups = [
11087
- { name: 'document', groups: ['mode', 'document', 'doctools'] },
11088
- { name: 'clipboard', groups: ['clipboard', 'undo'] },
11089
- { name: 'editing', groups: ['find', 'selection', 'spellchecker'] },
11090
- { name: 'basicstyles', groups: ['basicstyles', 'cleanup'] },
11091
- { name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align', 'bidi'] },
11092
- { name: 'links' },
11093
- { name: 'insert' },
11094
- { name: 'styles' },
11095
- { name: 'colors' },
11096
- { name: 'tools' },
11097
- { name: 'others' },
11098
- { name: 'about' }
11099
- ];
11100
- }
11101
- else {
11102
- this.config.allowedContent = true;
11103
- this.config.toolbarGroups = [];
11104
- }
11105
- /*
11106
- var element = document.querySelector( '.cke_top' );
11107
- console.log("Just to do some debugging we check " + element);
11108
- var myEl = this.ced.toolbarButtons
11109
- myEl.toggle();
11110
- element = document.querySelector( '.cke_bottom' );
11111
- myEl = ced.element( element );
11112
- myEl.toggle();
11113
-
11114
- var myEl2 = angular.element( document.querySelector( '.test' ) );
11115
- myEl2.toggleClass("invisible")*/
11116
- }
11117
- /**
11118
- * @param {?} value
11119
- * @return {?}
11120
- */
11121
- writeValue(value) {
11122
- this.value = value;
11123
- this.onChange(this.value);
11124
- }
11125
- /**
11126
- * @param {?} fn
11127
- * @return {?}
11128
- */
11129
- registerOnChange(fn) {
11130
- this.onChange = fn;
11131
- }
11132
- /**
11133
- * @param {?} fn
11134
- * @return {?}
11135
- */
11136
- registerOnTouched(fn) {
11137
- this.onTouched = fn;
11138
- }
11139
- }
11140
- FHRichText.decorators = [
11141
- { type: Component, args: [{
11142
- selector: 'FHRichText', providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT], template: `
11143
- <b *ngIf="label!=''">{{label}}</b>
11144
- <ckeditor
11145
- [(ngModel)]="value"
11146
- [config]="config"
11147
- [readonly]="!enabled"
11148
- (change)="writeValue($event)"
11149
- (focus)="onFocus($event)"
11150
- (blur)="onBlur($event)" ngDefaultControl
11151
- debounce="500">
11152
- </ckeditor>
11153
-
11154
- `,
11155
- styles: [`
11156
-
11157
- `]
11158
- }] }
11159
- ];
11160
- /** @nocollapse */
11161
- FHRichText.ctorParameters = () => [];
11162
- FHRichText.propDecorators = {
11163
- enabled: [{ type: Input }],
11164
- value: [{ type: Input }],
11165
- label: [{ type: Input }],
11166
- height: [{ type: Input }],
11167
- change: [{ type: Output }],
11168
- focus: [{ type: Output }],
11169
- blur: [{ type: Output }]
11170
- };
11171
-
11172
- /**
11173
- * @fileoverview added by tsickle
11174
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11175
- */
11176
- class WinOutputComponent {
11177
- /**
11178
- * @param {?} dialogRef
11179
- * @param {?} toastr
11180
- */
11181
- constructor(dialogRef, toastr) {
11182
- this.dialogRef = dialogRef;
11183
- this.toastr = toastr;
11184
- this.title = "";
11185
- this.label = "";
11186
- this.valore = "";
11187
- this.min_chars = 3;
11188
- this.max_chars = 50;
11189
- }
11190
- /**
11191
- * @return {?}
11192
- */
11193
- ngOnInit() {
11194
- }
11195
- /**
11196
- * @return {?}
11197
- */
11198
- show() {
11199
- }
11200
- /**
11201
- * @return {?}
11202
- */
11203
- hide() {
11204
- this.dialogRef.close(null);
11205
- }
11206
- /**
11207
- * @return {?}
11208
- */
11209
- chiudi() {
11210
- this.dialogRef.close(null);
11211
- }
11212
- }
11213
- WinOutputComponent.decorators = [
11214
- { type: Component, args: [{
11215
- selector: 'app-win_output',
11216
- template: `
11217
-
11218
- <h2 mat-dialog-title>{{title}}</h2>
11219
- <mat-dialog-content style="min-width:500px;font-size: 12px;">
11220
-
11221
- <div [innerHTML]="valore" style="width:100%">
11222
- </div>
11223
-
11224
- </mat-dialog-content>
11225
- <mat-dialog-actions>
11226
- <button mat-flat-button color="warn" (click)="chiudi()">CHIUDI</button>
11227
- </mat-dialog-actions>
11228
-
11229
-
11230
- `
11231
- }] }
11232
- ];
11233
- /** @nocollapse */
11234
- WinOutputComponent.ctorParameters = () => [
11235
- { type: MatDialogRef },
11236
- { type: ToastrService }
11237
- ];
11238
- WinOutputComponent.propDecorators = {
11239
- title: [{ type: Input }],
11534
+ decimal: [{ type: Input }],
11240
11535
  label: [{ type: Input }],
11241
- valore: [{ type: Input }]
11536
+ required: [{ type: Input }],
11537
+ enabled: [{ type: Input }],
11538
+ hidden: [{ type: Input }],
11539
+ color: [{ type: Input }],
11540
+ label_width: [{ type: Input }],
11541
+ change: [{ type: Output }],
11542
+ enter_pressed: [{ type: Output }],
11543
+ value: [{ type: Input }]
11242
11544
  };
11243
11545
 
11244
11546
  /**
@@ -11246,30 +11548,24 @@ WinOutputComponent.propDecorators = {
11246
11548
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11247
11549
  */
11248
11550
  /** @type {?} */
11249
- const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC = {
11551
+ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT = {
11250
11552
  provide: NG_VALUE_ACCESSOR,
11251
11553
  useExisting: forwardRef((/**
11252
11554
  * @return {?}
11253
11555
  */
11254
- () => FHNumericFieldComponent)),
11556
+ () => FHRichText)),
11255
11557
  multi: true
11256
11558
  };
11257
- class FHNumericFieldComponent {
11258
- /**
11259
- * @param {?} uti_s
11260
- */
11261
- constructor(uti_s) {
11262
- this.uti_s = uti_s;
11263
- this.decimal = 0;
11264
- this.label = '';
11265
- this.th_character = '.';
11266
- this.required = false;
11559
+ class FHRichText {
11560
+ constructor() {
11267
11561
  this.enabled = true;
11268
- this.hidden = false;
11269
- this.m_color = '';
11562
+ this.value = "";
11563
+ this.label = "";
11564
+ this.height = "360";
11270
11565
  this.change = new EventEmitter();
11271
- this.innerValue = 0;
11272
- this.chgf = false;
11566
+ this.focus = new EventEmitter();
11567
+ this.blur = new EventEmitter();
11568
+ this.config = new Object();
11273
11569
  this.onChange = (/**
11274
11570
  * @param {?} _
11275
11571
  * @return {?}
@@ -11281,59 +11577,65 @@ class FHNumericFieldComponent {
11281
11577
  */
11282
11578
  () => {
11283
11579
  });
11284
- this.formattedAmount = '0,00';
11285
- this.value = 0.00;
11286
11580
  }
11287
11581
  /**
11582
+ * @param {?} o
11288
11583
  * @return {?}
11289
11584
  */
11290
- getStyle() {
11291
- return this.m_color;
11585
+ onFocus(o) {
11586
+ this.focus.emit(o);
11292
11587
  }
11293
11588
  /**
11294
- * @param {?} color
11589
+ * @param {?} o
11295
11590
  * @return {?}
11296
11591
  */
11297
- set_backcolor(color) {
11298
- this.m_color = color;
11592
+ onBlur(o) {
11593
+ this.blur.emit(o);
11299
11594
  }
11300
11595
  /**
11301
11596
  * @return {?}
11302
11597
  */
11303
- chg() {
11304
- // setTimeout(()=>{
11305
- if (this.formattedAmount != '') {
11306
- this.value = this.uti_s.round(parseFloat(this.formattedAmount.split('.').join('').split(',').join('.')), this.decimal);
11307
- this.formattedAmount = this.transform(this.value, this.decimal);
11598
+ ngOnInit() {
11599
+ this.config = { height: this.height };
11600
+ if (this.enabled) {
11601
+ this.config.toolbarGroups = [
11602
+ { name: 'document', groups: ['mode', 'document', 'doctools'] },
11603
+ { name: 'clipboard', groups: ['clipboard', 'undo'] },
11604
+ { name: 'editing', groups: ['find', 'selection', 'spellchecker'] },
11605
+ { name: 'basicstyles', groups: ['basicstyles', 'cleanup'] },
11606
+ { name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align', 'bidi'] },
11607
+ { name: 'links' },
11608
+ { name: 'insert' },
11609
+ { name: 'styles' },
11610
+ { name: 'colors' },
11611
+ { name: 'tools' },
11612
+ { name: 'others' },
11613
+ { name: 'about' }
11614
+ ];
11308
11615
  }
11309
11616
  else {
11310
- this.value = this.uti_s.round(0, this.decimal);
11311
- this.formattedAmount = this.transform(this.value, this.decimal);
11617
+ this.config.allowedContent = true;
11618
+ this.config.toolbarGroups = [];
11312
11619
  }
11313
- this.chgf = true;
11314
- this.onChange(this.value);
11620
+ /*
11621
+ var element = document.querySelector( '.cke_top' );
11622
+ console.log("Just to do some debugging we check " + element);
11623
+ var myEl = this.ced.toolbarButtons
11624
+ myEl.toggle();
11625
+ element = document.querySelector( '.cke_bottom' );
11626
+ myEl = ced.element( element );
11627
+ myEl.toggle();
11628
+
11629
+ var myEl2 = angular.element( document.querySelector( '.test' ) );
11630
+ myEl2.toggleClass("invisible")*/
11315
11631
  }
11316
11632
  /**
11317
11633
  * @param {?} value
11318
11634
  * @return {?}
11319
11635
  */
11320
11636
  writeValue(value) {
11321
- if (this.chgf) {
11322
- this.chgf = false;
11323
- return;
11324
- }
11325
- // console.log('writeValue '+value+' '+this.decimal);
11326
- if (value == null)
11327
- value = 0.00;
11328
- if (value !== this.innerValue) {
11329
- this.innerValue = value;
11330
- this.value = value;
11331
- // if( this.formattedAmount==this.transform(this.value,this.decimal))return;
11332
- //console.log('prima '+this.formattedAmount);
11333
- this.formattedAmount = this.transform(this.value, this.decimal);
11334
- // console.log('dopo '+this.formattedAmount);
11335
- // this.onChange(this.value);
11336
- }
11637
+ this.value = value;
11638
+ this.onChange(this.value);
11337
11639
  }
11338
11640
  /**
11339
11641
  * @param {?} fn
@@ -11349,91 +11651,20 @@ class FHNumericFieldComponent {
11349
11651
  registerOnTouched(fn) {
11350
11652
  this.onTouched = fn;
11351
11653
  }
11352
- /**
11353
- * @param {?} value
11354
- * @param {?=} fractionSize
11355
- * @return {?}
11356
- */
11357
- transform(value, fractionSize = 0) {
11358
- //console.log('transform '+value+' '+fractionSize);
11359
- //console.log('transform '+value+' '+fractionSize);
11360
- let [integer, fraction = ""] = (value || "").toString().split('.');
11361
- fraction = fractionSize > 0
11362
- ? ',' + (fraction + '000000').substring(0, fractionSize)
11363
- : "";
11364
- if (this.th_character != '')
11365
- integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, this.th_character);
11366
- if (integer == '')
11367
- integer = '0';
11368
- if (this.decimal == 0)
11369
- return integer;
11370
- // console.log(integer + fraction);
11371
- return integer + fraction;
11372
- }
11373
- /**
11374
- * @param {?} element
11375
- * @return {?}
11376
- */
11377
- removeCurrencyPipeFormat(element) {
11378
- //console.log('removeCurrencyPipeFormat '+this.value);
11379
- try {
11380
- // this.value=this.value.split('.').join('');
11381
- this.formattedAmount = this.transform(this.value, this.decimal);
11382
- }
11383
- catch (e) {
11384
- console.log(e);
11385
- }
11386
- }
11387
- /**
11388
- * @param {?} element
11389
- * @return {?}
11390
- */
11391
- click_select_allf(element) {
11392
- setTimeout((/**
11393
- * @return {?}
11394
- */
11395
- () => {
11396
- this.el.nativeElement.select();
11397
- }), 200);
11398
- }
11399
- /**
11400
- * @param {?} element
11401
- * @return {?}
11402
- */
11403
- select_allf(element) {
11404
- this.el.nativeElement.select();
11405
- }
11406
- /**
11407
- * @return {?}
11408
- */
11409
- setFocus() {
11410
- this.el.nativeElement.focus();
11411
- }
11412
- /**
11413
- * @return {?}
11414
- */
11415
- ngOnInit() {
11416
- if (this.required)
11417
- this.el.nativeElement.required = this.required;
11418
- this.el.nativeElement.disabled = !this.enabled;
11419
- if (this.value == null)
11420
- this.value = 0;
11421
- // console.log('tttttttttttt',this.decimal);
11422
- this.formattedAmount = this.transform(this.value, this.decimal);
11423
- }
11424
11654
  }
11425
- FHNumericFieldComponent.decorators = [
11655
+ FHRichText.decorators = [
11426
11656
  { type: Component, args: [{
11427
- selector: 'FHNumericField',
11428
- providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC],
11429
- template: `
11430
- <mat-form-field [hidden]="hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
11431
- <input type="text" style="text-align:right" [style.background-color]="getStyle()" #el matInput
11432
- [disabled]="!enabled" [(ngModel)]="formattedAmount"
11433
- (blur)="chg()" (click)="click_select_allf($event);"
11434
- (focus)="removeCurrencyPipeFormat($event);select_allf($event);"
11435
- pattern="[0-9]+">
11436
- </mat-form-field>
11657
+ selector: 'FHRichText', providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT], template: `
11658
+ <b *ngIf="label!=''">{{label}}</b>
11659
+ <ckeditor
11660
+ [(ngModel)]="value"
11661
+ [config]="config"
11662
+ [readonly]="!enabled"
11663
+ (change)="writeValue($event)"
11664
+ (focus)="onFocus($event)"
11665
+ (blur)="onBlur($event)" ngDefaultControl
11666
+ debounce="500">
11667
+ </ckeditor>
11437
11668
 
11438
11669
  `,
11439
11670
  styles: [`
@@ -11442,106 +11673,87 @@ FHNumericFieldComponent.decorators = [
11442
11673
  }] }
11443
11674
  ];
11444
11675
  /** @nocollapse */
11445
- FHNumericFieldComponent.ctorParameters = () => [
11446
- { type: UtilityService }
11447
- ];
11448
- FHNumericFieldComponent.propDecorators = {
11449
- el: [{ type: ViewChild, args: ['el',] }],
11450
- decimal: [{ type: Input }],
11451
- label: [{ type: Input }],
11452
- th_character: [{ type: Input }],
11453
- required: [{ type: Input }],
11676
+ FHRichText.ctorParameters = () => [];
11677
+ FHRichText.propDecorators = {
11454
11678
  enabled: [{ type: Input }],
11455
- hidden: [{ type: Input }],
11679
+ value: [{ type: Input }],
11680
+ label: [{ type: Input }],
11681
+ height: [{ type: Input }],
11456
11682
  change: [{ type: Output }],
11457
- value: [{ type: Input }]
11683
+ focus: [{ type: Output }],
11684
+ blur: [{ type: Output }]
11458
11685
  };
11459
11686
 
11460
11687
  /**
11461
11688
  * @fileoverview added by tsickle
11462
11689
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11463
11690
  */
11464
- class FHListPick {
11691
+ class WinOutputComponent {
11465
11692
  /**
11466
11693
  * @param {?} dialogRef
11467
11694
  * @param {?} toastr
11468
- * @param {?} m_appService
11469
11695
  */
11470
- constructor(dialogRef, toastr, m_appService) {
11696
+ constructor(dialogRef, toastr) {
11471
11697
  this.dialogRef = dialogRef;
11472
11698
  this.toastr = toastr;
11473
- this.m_appService = m_appService;
11474
- this.label = "";
11475
- this.separator = ",";
11476
11699
  this.title = "";
11477
- this.sql = "";
11478
- this.single_sel = false;
11479
- this.sel_values = "";
11700
+ this.label = "";
11701
+ this.valore = "";
11702
+ this.min_chars = 3;
11703
+ this.max_chars = 50;
11480
11704
  }
11481
11705
  /**
11482
11706
  * @return {?}
11483
11707
  */
11484
- doFill() {
11485
- if (!this.single_sel)
11486
- this.cmb_sel.setByDescri(this.sel_values);
11487
- this.cmb_sel.sql = this.sql;
11488
- this.cmb_sel.types = this.types;
11489
- this.cmb_sel.values = this.values;
11490
- this.cmb_sel.fillCombo();
11708
+ ngOnInit() {
11491
11709
  }
11492
11710
  /**
11493
11711
  * @return {?}
11494
11712
  */
11495
- ok() {
11496
- if (this.cmb_sel.getValue() == "") {
11497
- this.toastr.error('Selezionare un valore');
11498
- return;
11499
- }
11500
- this.dialogRef.close(this.cmb_sel.getObjects());
11713
+ show() {
11501
11714
  }
11502
- /**
11503
- * @return {?}
11504
- */
11505
- ok_single() {
11506
- if (!this.single_sel)
11507
- return;
11508
- this.dialogRef.close(this.cmb_sel.getObjects());
11715
+ /**
11716
+ * @return {?}
11717
+ */
11718
+ hide() {
11719
+ this.dialogRef.close(null);
11509
11720
  }
11510
11721
  /**
11511
11722
  * @return {?}
11512
11723
  */
11513
- ngOnInit() {
11724
+ chiudi() {
11725
+ this.dialogRef.close(null);
11514
11726
  }
11515
11727
  }
11516
- FHListPick.decorators = [
11728
+ WinOutputComponent.decorators = [
11517
11729
  { type: Component, args: [{
11518
- selector: 'fhlistpick',
11730
+ selector: 'app-win_output',
11519
11731
  template: `
11520
- <h2 mat-dialog-title>{{title}}</h2>
11521
- <mat-dialog-content style="min-width:700px;min-height:500px;font-size: 12px">
11522
- <FHList #cmb_sel [label]="label" [single_sel]="single_sel" [separator]="separator" style="width:100%;height:100%" init_fill="false" (selchange)="ok_single()"></FHList>
11523
11732
 
11524
- </mat-dialog-content>
11733
+ <h2 mat-dialog-title>{{title}}</h2>
11734
+ <mat-dialog-content style="min-width:500px;font-size: 12px;">
11525
11735
 
11736
+ <div [innerHTML]="valore" style="width:100%">
11737
+ </div>
11526
11738
 
11739
+ </mat-dialog-content>
11527
11740
  <mat-dialog-actions>
11528
- <div fxLayout="row" fxLayoutAlign="center center" style="width: 100%">
11529
-
11530
- <button mat-flat-button color="primary" *ngIf="!single_sel" (click)="ok()">OK</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
11531
- <button mat-flat-button style="background-color: #F5F5F5" (click)="dialogRef.close('')">ANNULLA</button>
11532
- </div>
11741
+ <button mat-flat-button color="warn" (click)="chiudi()">CHIUDI</button>
11533
11742
  </mat-dialog-actions>
11743
+
11744
+
11534
11745
  `
11535
11746
  }] }
11536
11747
  ];
11537
11748
  /** @nocollapse */
11538
- FHListPick.ctorParameters = () => [
11749
+ WinOutputComponent.ctorParameters = () => [
11539
11750
  { type: MatDialogRef },
11540
- { type: ToastrService },
11541
- { type: AppService }
11751
+ { type: ToastrService }
11542
11752
  ];
11543
- FHListPick.propDecorators = {
11544
- cmb_sel: [{ type: ViewChild, args: ['cmb_sel',] }]
11753
+ WinOutputComponent.propDecorators = {
11754
+ title: [{ type: Input }],
11755
+ label: [{ type: Input }],
11756
+ valore: [{ type: Input }]
11545
11757
  };
11546
11758
 
11547
11759
  /**
@@ -11549,32 +11761,30 @@ FHListPick.propDecorators = {
11549
11761
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11550
11762
  */
11551
11763
  /** @type {?} */
11552
- const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 = {
11764
+ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC = {
11553
11765
  provide: NG_VALUE_ACCESSOR,
11554
11766
  useExisting: forwardRef((/**
11555
11767
  * @return {?}
11556
11768
  */
11557
- () => FHUserFieldComponent)),
11769
+ () => FHNumericFieldComponent)),
11558
11770
  multi: true
11559
11771
  };
11560
- class FHUserFieldComponent {
11772
+ class FHNumericFieldComponent {
11561
11773
  /**
11562
- * @param {?} dataservice
11563
- * @param {?} dialog
11774
+ * @param {?} uti_s
11564
11775
  */
11565
- constructor(dataservice, dialog) {
11566
- this.dataservice = dataservice;
11567
- this.dialog = dialog;
11776
+ constructor(uti_s) {
11777
+ this.uti_s = uti_s;
11778
+ this.decimal = 0;
11568
11779
  this.label = '';
11780
+ this.th_character = '.';
11569
11781
  this.required = false;
11570
11782
  this.enabled = true;
11571
11783
  this.hidden = false;
11572
- this.multi = false;
11784
+ this.m_color = '';
11573
11785
  this.change = new EventEmitter();
11574
- this.select = new EventEmitter();
11575
- this.userName = '';
11576
- this.selectedUser = [];
11577
- this.all_user = null;
11786
+ this.innerValue = 0;
11787
+ this.chgf = false;
11578
11788
  this.onChange = (/**
11579
11789
  * @param {?} _
11580
11790
  * @return {?}
@@ -11586,312 +11796,267 @@ class FHUserFieldComponent {
11586
11796
  */
11587
11797
  () => {
11588
11798
  });
11799
+ this.formattedAmount = '0,00';
11800
+ this.value = 0.00;
11589
11801
  }
11590
11802
  /**
11591
11803
  * @return {?}
11592
11804
  */
11593
- ngOnInit() {
11594
- if (this.required)
11595
- this.label = this.label + ' *';
11805
+ getStyle() {
11806
+ return this.m_color;
11596
11807
  }
11597
11808
  /**
11809
+ * @param {?} color
11598
11810
  * @return {?}
11599
11811
  */
11600
- getUsersNc() {
11601
- /** @type {?} */
11602
- let s_nc = '';
11603
- for (let i = 0; i < this.selectedUser.length; i++) {
11604
- if (s_nc != '')
11605
- s_nc = s_nc + ',';
11606
- s_nc = s_nc + `${this.selectedUser[i].cognome} ${this.selectedUser[i].nome}`;
11607
- }
11608
- return s_nc;
11812
+ set_backcolor(color) {
11813
+ this.m_color = color;
11609
11814
  }
11610
11815
  /**
11611
11816
  * @return {?}
11612
11817
  */
11613
- getUsersEmail() {
11614
- /** @type {?} */
11615
- let s_nc = '';
11616
- for (let i = 0; i < this.selectedUser.length; i++) {
11617
- if (s_nc != '')
11618
- s_nc = s_nc + ',';
11619
- s_nc = s_nc + `${this.selectedUser[i].email}`;
11818
+ chg() {
11819
+ // setTimeout(()=>{
11820
+ if (this.formattedAmount != '') {
11821
+ this.value = this.uti_s.round(parseFloat(this.formattedAmount.split('.').join('').split(',').join('.')), this.decimal);
11822
+ this.formattedAmount = this.transform(this.value, this.decimal);
11620
11823
  }
11621
- return s_nc;
11622
- }
11623
- /**
11624
- * @return {?}
11625
- */
11626
- getUsersUsername() {
11627
- /** @type {?} */
11628
- let s_nc = '';
11629
- for (let i = 0; i < this.selectedUser.length; i++) {
11630
- if (s_nc != '')
11631
- s_nc = s_nc + ',';
11632
- s_nc = s_nc + `${this.selectedUser[i].username}`;
11824
+ else {
11825
+ this.value = this.uti_s.round(0, this.decimal);
11826
+ this.formattedAmount = this.transform(this.value, this.decimal);
11633
11827
  }
11634
- return s_nc;
11828
+ this.chgf = true;
11829
+ this.onChange(this.value);
11635
11830
  }
11636
11831
  /**
11637
11832
  * @param {?} value
11638
11833
  * @return {?}
11639
11834
  */
11640
11835
  writeValue(value) {
11641
- if (value == null) {
11642
- this.clear();
11643
- return;
11644
- }
11645
- if (value == '') {
11646
- this.clear();
11647
- return;
11648
- }
11649
- if (value == 'noop') {
11650
- this.userName = this.getUsersNc();
11651
- this.onChange(this.getUsersUsername());
11652
- return;
11653
- }
11654
- if (this.selectedUser == null) {
11655
- this.setByUsername(value);
11656
- this.userName = this.getUsersNc();
11836
+ if (this.chgf) {
11837
+ this.chgf = false;
11657
11838
  return;
11658
11839
  }
11659
- if (this.getUsersUsername() != value) {
11660
- this.setByUsername(value);
11661
- this.userName = this.getUsersNc();
11840
+ // console.log('writeValue '+value+' '+this.decimal);
11841
+ if (value == null)
11842
+ value = 0.00;
11843
+ if (value !== this.innerValue) {
11844
+ this.innerValue = value;
11845
+ this.value = value;
11846
+ // if( this.formattedAmount==this.transform(this.value,this.decimal))return;
11847
+ //console.log('prima '+this.formattedAmount);
11848
+ this.formattedAmount = this.transform(this.value, this.decimal);
11849
+ // console.log('dopo '+this.formattedAmount);
11850
+ // this.onChange(this.value);
11662
11851
  }
11663
11852
  }
11664
11853
  /**
11665
- * @param {?} emails
11854
+ * @param {?} fn
11666
11855
  * @return {?}
11667
11856
  */
11668
- setByEmail(emails) {
11669
- console.log('emails ', emails);
11670
- if (emails == null)
11671
- return;
11672
- if (emails == '')
11673
- return;
11674
- /** @type {?} */
11675
- let a = emails.split(',');
11676
- /** @type {?} */
11677
- let s_nc = '';
11678
- for (let i = 0; i < a.length; i++) {
11679
- if (s_nc != '')
11680
- s_nc = s_nc + ',';
11681
- s_nc = s_nc + '\'' + a[i] + '\'';
11682
- }
11683
- console.log('s_nc ', s_nc);
11684
- if (s_nc == "")
11685
- return;
11686
- /** @type {?} */
11687
- const param = {
11688
- sql: 'SELECT_USERS_INFOS_BY_EMAIL_NOREP',
11689
- types: ['string'],
11690
- values: [s_nc],
11691
- names: [],
11692
- };
11693
- console.log(param);
11694
- this.dataservice.doQuery(param)
11695
- .subscribe((/**
11696
- * @param {?} data
11697
- * @return {?}
11698
- */
11699
- (data) => {
11700
- /** @type {?} */
11701
- let result = data.result_data;
11702
- if (result != null) {
11703
- this.selectedUser = result;
11704
- this.writeValue('noop');
11705
- this.select.emit(this.selectedUser);
11706
- console.log(this.selectedUser);
11707
- this.userName = this.getUsersNc();
11708
- console.log(this.userName);
11709
- }
11710
- else
11711
- this.clear();
11712
- }));
11857
+ registerOnChange(fn) {
11858
+ this.onChange = fn;
11713
11859
  }
11714
11860
  /**
11715
- * @param {?} username
11861
+ * @param {?} fn
11716
11862
  * @return {?}
11717
11863
  */
11718
- setByUsername(username) {
11719
- if (!username)
11720
- return;
11721
- /** @type {?} */
11722
- let a = username.split(',');
11723
- /** @type {?} */
11724
- let s_nc = '';
11725
- for (let i = 0; i < a.length; i++) {
11726
- if (s_nc != '')
11727
- s_nc = s_nc + ',';
11728
- s_nc = s_nc + '\'' + a[i] + '\'';
11729
- }
11730
- /** @type {?} */
11731
- const param = {
11732
- sql: 'SELECT_USERS_INFOS_BY_USERNAME_NOREP',
11733
- types: ['string'],
11734
- values: [s_nc],
11735
- names: [],
11736
- };
11737
- this.dataservice.doQuery(param)
11738
- .subscribe((/**
11739
- * @param {?} data
11740
- * @return {?}
11741
- */
11742
- (data) => {
11743
- /** @type {?} */
11744
- let result = data.result_data;
11745
- if (result != null) {
11746
- this.selectedUser = result;
11747
- this.writeValue('noop');
11748
- this.select.emit(this.selectedUser);
11749
- console.log(this.selectedUser);
11750
- this.userName = this.getUsersNc();
11751
- console.log(this.userName);
11752
- }
11753
- else
11754
- this.clear();
11755
- }));
11864
+ registerOnTouched(fn) {
11865
+ this.onTouched = fn;
11866
+ }
11867
+ /**
11868
+ * @param {?} value
11869
+ * @param {?=} fractionSize
11870
+ * @return {?}
11871
+ */
11872
+ transform(value, fractionSize = 0) {
11873
+ //console.log('transform '+value+' '+fractionSize);
11874
+ //console.log('transform '+value+' '+fractionSize);
11875
+ let [integer, fraction = ""] = (value || "").toString().split('.');
11876
+ fraction = fractionSize > 0
11877
+ ? ',' + (fraction + '000000').substring(0, fractionSize)
11878
+ : "";
11879
+ if (this.th_character != '')
11880
+ integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, this.th_character);
11881
+ if (integer == '')
11882
+ integer = '0';
11883
+ if (this.decimal == 0)
11884
+ return integer;
11885
+ // console.log(integer + fraction);
11886
+ return integer + fraction;
11756
11887
  }
11757
11888
  /**
11889
+ * @param {?} element
11758
11890
  * @return {?}
11759
11891
  */
11760
- load_all_users() {
11761
- /** @type {?} */
11762
- const param = {
11763
- sql: 'SELECT_ALL_USERS',
11764
- types: [],
11765
- values: [],
11766
- names: [],
11767
- };
11768
- this.dataservice.doQuery(param)
11769
- .subscribe((/**
11770
- * @param {?} data
11771
- * @return {?}
11772
- */
11773
- (data) => {
11774
- this.all_user = data.result_data;
11775
- if (this.all_user == null) {
11776
- this.all_user = [];
11777
- }
11778
- this.open_pick();
11779
- }));
11892
+ removeCurrencyPipeFormat(element) {
11893
+ //console.log('removeCurrencyPipeFormat '+this.value);
11894
+ try {
11895
+ // this.value=this.value.split('.').join('');
11896
+ this.formattedAmount = this.transform(this.value, this.decimal);
11897
+ }
11898
+ catch (e) {
11899
+ console.log(e);
11900
+ }
11780
11901
  }
11781
11902
  /**
11903
+ * @param {?} element
11782
11904
  * @return {?}
11783
11905
  */
11784
- open_pick() {
11785
- if (this.all_user == null) {
11786
- this.load_all_users();
11787
- return;
11788
- }
11789
- if (!this.enabled)
11790
- return;
11791
- /** @type {?} */
11792
- let dialogRef = this.dialog.open(FHUserPickerComponent, {
11793
- disableClose: true, width: "700px", height: "550px"
11794
- });
11795
- dialogRef.componentInstance.user_sel = this.selectedUser;
11796
- dialogRef.componentInstance.users_list = Object.assign([], this.all_user);
11797
- dialogRef.componentInstance.single_sel = !this.multi;
11798
- dialogRef.componentInstance.filtra();
11799
- dialogRef.afterClosed().subscribe((/**
11800
- * @param {?} result
11906
+ click_select_allf(element) {
11907
+ setTimeout((/**
11801
11908
  * @return {?}
11802
11909
  */
11803
- result => {
11804
- if (result == null)
11805
- return;
11806
- if (result != null) {
11807
- this.selectedUser = result;
11808
- this.writeValue('noop');
11809
- this.select.emit(this.selectedUser);
11810
- this.userName = this.getUsersNc();
11811
- }
11812
- this.change.emit(this.selectedUser);
11813
- this.select.emit(this.selectedUser);
11814
- }));
11910
+ () => {
11911
+ this.el.nativeElement.select();
11912
+ }), 200);
11815
11913
  }
11816
11914
  /**
11915
+ * @param {?} element
11817
11916
  * @return {?}
11818
11917
  */
11819
- clear() {
11820
- this.selectedUser = [];
11821
- this.onChange([]);
11822
- this.userName = "";
11918
+ select_allf(element) {
11919
+ this.el.nativeElement.select();
11823
11920
  }
11824
11921
  /**
11825
- * @param {?} fn
11826
11922
  * @return {?}
11827
11923
  */
11828
- registerOnChange(fn) {
11829
- this.onChange = fn;
11924
+ setFocus() {
11925
+ this.el.nativeElement.focus();
11830
11926
  }
11831
11927
  /**
11832
- * @param {?} fn
11833
11928
  * @return {?}
11834
11929
  */
11835
- registerOnTouched(fn) {
11836
- this.onTouched = fn;
11930
+ ngOnInit() {
11931
+ if (this.required)
11932
+ this.el.nativeElement.required = this.required;
11933
+ this.el.nativeElement.disabled = !this.enabled;
11934
+ if (this.value == null)
11935
+ this.value = 0;
11936
+ // console.log('tttttttttttt',this.decimal);
11937
+ this.formattedAmount = this.transform(this.value, this.decimal);
11837
11938
  }
11838
11939
  }
11839
- FHUserFieldComponent.decorators = [
11940
+ FHNumericFieldComponent.decorators = [
11840
11941
  { type: Component, args: [{
11841
- selector: 'FHUserField', providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1],
11942
+ selector: 'FHNumericField',
11943
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC],
11842
11944
  template: `
11843
- <div fxLayout="row" [hidden]="!enabled || hidden">
11844
- <mat-form-field style="clickable-field" (click)="open_pick()" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
11845
-
11846
- <input matInput
11847
- [hidden]="hidden"
11848
-
11849
- type="text"
11850
- [ngModel]="userName"
11851
- [disabled]="false" readonly>
11852
-
11853
- </mat-form-field>
11854
- <button mat-icon-button matSuffix
11855
- [hidden]="selectedUser.length==0"
11856
- (click)="clear()">
11857
- <mat-icon>clear</mat-icon>
11858
- </button>
11859
- </div>
11860
- <mat-form-field [hidden]="enabled || hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
11861
- <input type="text" #el1 matInput [disabled]="true" [(ngModel)]="userName"
11862
- >
11945
+ <mat-form-field [hidden]="hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
11946
+ <input type="text" style="text-align:right" [style.background-color]="getStyle()" #el matInput
11947
+ [disabled]="!enabled" [(ngModel)]="formattedAmount"
11948
+ (blur)="chg()" (click)="click_select_allf($event);"
11949
+ (focus)="removeCurrencyPipeFormat($event);select_allf($event);"
11950
+ pattern="[0-9]+">
11863
11951
  </mat-form-field>
11952
+
11864
11953
  `,
11865
11954
  styles: [`
11866
- .clickable-field {
11867
- border: 1px solid #000000;
11868
- color: #000000;
11869
- }
11870
-
11871
- .clickable-field:focus {
11872
- outline: none;
11873
- }
11874
11955
 
11875
- :host ::ng-deep .mat-input-element {
11876
- cursor: pointer !important;
11877
- }
11878
- `]
11956
+ `]
11879
11957
  }] }
11880
11958
  ];
11881
11959
  /** @nocollapse */
11882
- FHUserFieldComponent.ctorParameters = () => [
11883
- { type: QueryService },
11884
- { type: MatDialog }
11960
+ FHNumericFieldComponent.ctorParameters = () => [
11961
+ { type: UtilityService }
11885
11962
  ];
11886
- FHUserFieldComponent.propDecorators = {
11963
+ FHNumericFieldComponent.propDecorators = {
11964
+ el: [{ type: ViewChild, args: ['el',] }],
11965
+ decimal: [{ type: Input }],
11887
11966
  label: [{ type: Input }],
11967
+ th_character: [{ type: Input }],
11888
11968
  required: [{ type: Input }],
11889
11969
  enabled: [{ type: Input }],
11890
11970
  hidden: [{ type: Input }],
11891
- multi: [{ type: Input }],
11892
11971
  change: [{ type: Output }],
11893
- select: [{ type: Output }],
11894
- userName: [{ type: Input }]
11972
+ value: [{ type: Input }]
11973
+ };
11974
+
11975
+ /**
11976
+ * @fileoverview added by tsickle
11977
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11978
+ */
11979
+ class FHListPick {
11980
+ /**
11981
+ * @param {?} dialogRef
11982
+ * @param {?} toastr
11983
+ * @param {?} m_appService
11984
+ */
11985
+ constructor(dialogRef, toastr, m_appService) {
11986
+ this.dialogRef = dialogRef;
11987
+ this.toastr = toastr;
11988
+ this.m_appService = m_appService;
11989
+ this.label = "";
11990
+ this.separator = ",";
11991
+ this.title = "";
11992
+ this.sql = "";
11993
+ this.single_sel = false;
11994
+ this.sel_values = "";
11995
+ }
11996
+ /**
11997
+ * @return {?}
11998
+ */
11999
+ doFill() {
12000
+ if (!this.single_sel)
12001
+ this.cmb_sel.setByDescri(this.sel_values);
12002
+ this.cmb_sel.sql = this.sql;
12003
+ this.cmb_sel.types = this.types;
12004
+ this.cmb_sel.values = this.values;
12005
+ this.cmb_sel.fillCombo();
12006
+ }
12007
+ /**
12008
+ * @return {?}
12009
+ */
12010
+ ok() {
12011
+ if (this.cmb_sel.getValue() == "") {
12012
+ this.toastr.error('Selezionare un valore');
12013
+ return;
12014
+ }
12015
+ this.dialogRef.close(this.cmb_sel.getObjects());
12016
+ }
12017
+ /**
12018
+ * @return {?}
12019
+ */
12020
+ ok_single() {
12021
+ if (!this.single_sel)
12022
+ return;
12023
+ this.dialogRef.close(this.cmb_sel.getObjects());
12024
+ }
12025
+ /**
12026
+ * @return {?}
12027
+ */
12028
+ ngOnInit() {
12029
+ }
12030
+ }
12031
+ FHListPick.decorators = [
12032
+ { type: Component, args: [{
12033
+ selector: 'fhlistpick',
12034
+ template: `
12035
+ <h2 mat-dialog-title>{{title}}</h2>
12036
+ <mat-dialog-content style="min-width:700px;min-height:500px;font-size: 12px">
12037
+ <FHList #cmb_sel [label]="label" [single_sel]="single_sel" [separator]="separator" style="width:100%;height:100%" init_fill="false" (selchange)="ok_single()"></FHList>
12038
+
12039
+ </mat-dialog-content>
12040
+
12041
+
12042
+ <mat-dialog-actions>
12043
+ <div fxLayout="row" fxLayoutAlign="center center" style="width: 100%">
12044
+
12045
+ <button mat-flat-button color="primary" *ngIf="!single_sel" (click)="ok()">OK</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
12046
+ <button mat-flat-button style="background-color: #F5F5F5" (click)="dialogRef.close('')">ANNULLA</button>
12047
+ </div>
12048
+ </mat-dialog-actions>
12049
+ `
12050
+ }] }
12051
+ ];
12052
+ /** @nocollapse */
12053
+ FHListPick.ctorParameters = () => [
12054
+ { type: MatDialogRef },
12055
+ { type: ToastrService },
12056
+ { type: AppService }
12057
+ ];
12058
+ FHListPick.propDecorators = {
12059
+ cmb_sel: [{ type: ViewChild, args: ['cmb_sel',] }]
11895
12060
  };
11896
12061
 
11897
12062
  /**
@@ -15128,6 +15293,12 @@ class FHGridToolBarComponent {
15128
15293
  riassegna_richiesta() {
15129
15294
  this.command.emit({ cmd: 'riassegna_richiesta' });
15130
15295
  }
15296
+ /**
15297
+ * @return {?}
15298
+ */
15299
+ sostituisci_utente() {
15300
+ this.command.emit({ cmd: 'sostituisci_utente' });
15301
+ }
15131
15302
  /**
15132
15303
  * @return {?}
15133
15304
  */
@@ -15161,12 +15332,14 @@ FHGridToolBarComponent.decorators = [
15161
15332
  <mat-toolbar>
15162
15333
  <div fxLayout="row" fxLayoutGap="3px" fxLayoutAlign="end center">
15163
15334
 
15164
-
15335
+
15165
15336
  <button mat-flat-button color="warn" mat-button fxHide fxShow.gt-sm [matMenuTriggerFor]="gest_menu" *ngIf="toolbar_wkfapp?.is_Supervisor || toolbar_wkfapp?.is_Admin || toolbar_wkfapp?.is_PowerUser"><mat-icon>label_important</mat-icon>&nbsp;&nbsp;&nbsp;{{'Gestione' | translate}}</button>
15166
15337
  <mat-menu #gest_menu="matMenu" >
15167
15338
  <button mat-menu-item style="background-color: #F5F5F5" (click)="annulla_richiesta()"> {{'ANNULLA DOCUMENTO' | translate}} </button>
15168
15339
  <button mat-menu-item style="background-color: #F5F5F5" (click)="recupera_richiesta()"> {{'RECUPERA DOCUMENTO' | translate}} </button>
15169
15340
  <button mat-menu-item style="background-color: #F5F5F5" (click)="riassegna_richiesta()" *ngIf="toolbar_wkfapp?.is_Supervisor || toolbar_wkfapp?.is_Admin"> {{'RIASSEGNA DOCUMENTO' | translate}} </button>
15341
+ <button mat-menu-item style="background-color: #F5F5F5" (click)="sostituisci_utente()" *ngIf="toolbar_wkfapp?.is_Admin"> {{'SOSTITUISCI UTENTE' | translate}} </button>
15342
+
15170
15343
  <button mat-menu-item style="background-color: #F5F5F5" (click)="test_utente()" *ngIf="toolbar_wkfapp?.is_Admin"> {{'TEST UTENTE' | translate}} </button>
15171
15344
 
15172
15345
  </mat-menu>
@@ -15177,7 +15350,7 @@ FHGridToolBarComponent.decorators = [
15177
15350
  </mat-toolbar>
15178
15351
  </div>
15179
15352
  <div *ngIf="type=='WKF'" fxLayoutGap="3px" fxLayout="row" fxLayoutAlign="end center" style="width: 100%;background-color: maroon">
15180
-
15353
+
15181
15354
  <mat-toolbar>
15182
15355
  <div fxLayout="row" fxLayoutGap="3px" fxLayoutAlign="end center">
15183
15356
 
@@ -15188,13 +15361,15 @@ FHGridToolBarComponent.decorators = [
15188
15361
  <button mat-menu-item (click)="annulla_richiesta()"> {{'ANNULLA DOCUMENTO' | translate}} </button>
15189
15362
  <button mat-menu-item (click)="recupera_richiesta()"> {{'RECUPERA DOCUMENTO' | translate}} </button>
15190
15363
  <button mat-menu-item (click)="riassegna_richiesta()"> {{'RIASSEGNA DOCUMENTO' | translate}} </button>
15364
+ <button mat-menu-item (click)="sostituisci_utente()" *ngIf="toolbar_wkfapp?.is_Admin"> {{'SOSTITUISCI UTENTE' | translate}} </button>
15365
+
15191
15366
  <button mat-menu-item (click)="test_utente()" *ngIf="toolbar_wkfapp?.is_Admin"> {{'TEST UTENTE' | translate}} </button>
15192
15367
 
15193
15368
  </mat-menu>
15194
15369
  <button mat-flat-button (click)="annulla_imp()" *ngIf="toolbar_wkfapp?.imp!=null && toolbar_wkfapp?.imp!=''"> {{toolbar_wkfapp?.imp}} </button>
15195
15370
  <div *ngFor="let app of custom_commands" >
15196
15371
  &nbsp;&nbsp;<button mat-flat-button [color]="app.color" (click)="exec_command(app.command)"><mat-icon *ngIf="app.icon!=null">{{app.icon}}</mat-icon>&nbsp;{{app.label | translate}}</button>
15197
-
15372
+
15198
15373
  </div>
15199
15374
  </div>
15200
15375
  </mat-toolbar>
@@ -15215,11 +15390,11 @@ FHGridToolBarComponent.decorators = [
15215
15390
  </mat-toolbar>
15216
15391
  </div>
15217
15392
  <div *ngIf="type=='CUSTOM'" fxLayoutGap="3px" fxLayout="row" fxLayoutAlign="end center">
15218
-
15393
+
15219
15394
  <div *ngFor="let app of custom_commands" ><button mat-flat-button [color]="app.color" (click)="exec_command(app.command)">{{app.label | translate}}</button>
15220
15395
  </div>
15221
15396
  </div>
15222
-
15397
+
15223
15398
  `,
15224
15399
  styles: [`
15225
15400
 
@@ -18296,7 +18471,7 @@ FHFieldPickListComponent.decorators = [
18296
18471
  { type: Component, args: [{
18297
18472
  providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2],
18298
18473
  selector: 'FHFieldPickList', template: `
18299
- <div fxLayout="row" style="width: 100%" fxLayoutAlign="start start" [hidden]="hidden"><div style="width: 100%">
18474
+ <div fxLayout="row" style="width: 100%" fxLayoutAlign="start center" [hidden]="hidden"><div style="width: 100%">
18300
18475
  <mat-form-field appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
18301
18476
  <input type="text" #el1 matInput [readonly]="!enabled || only_in_list" [(ngModel)]="value">
18302
18477
  </mat-form-field></div>&nbsp;&nbsp;
@@ -19512,7 +19687,6 @@ class win_user_info {
19512
19687
  this.user_roles = this.appService.user_roles.split(',').join(' ');
19513
19688
  this.user_lang = this.appService.user_lang;
19514
19689
  this.isadmin = this.appService.user_isadmin;
19515
- console.log('this.isadmin ', this.isadmin);
19516
19690
  }
19517
19691
  /**
19518
19692
  * @return {?}
@@ -19560,7 +19734,7 @@ win_user_info.decorators = [
19560
19734
  { type: Component, args: [{
19561
19735
  template: ` <h2 mat-dialog-title style="min-width:300px">Info Utente</h2>
19562
19736
  <mat-dialog-content style="font-size:12px">
19563
-
19737
+
19564
19738
  <table class="fh_table">
19565
19739
 
19566
19740
  <tbody>
@@ -19608,8 +19782,8 @@ win_user_info.decorators = [
19608
19782
  </tbody>
19609
19783
  </table>
19610
19784
  <img style="vertical-align:middle;max-height:300px" *ngIf="b_filef" aria-hidden src="{{foto_ut}}" />
19611
-
19612
-
19785
+
19786
+
19613
19787
  <div fxLayoutAlign="center center" fxLayout="row">
19614
19788
  <button mat-flat-button color="primary" (click)="dialogRef.close()">CHIUDI</button>
19615
19789
  </div>
@@ -19800,12 +19974,12 @@ FluxhubLibModule.decorators = [
19800
19974
  FHMdReader, FHLogPanelComponent, WinAskTextBigComponent, FHCurrencyFieldComponent, FHRichText, WinOutputComponent, FHNumericFieldComponent,
19801
19975
  FHListPick, WinWait, FHUserFieldComponent, FSInput, FSResult, QGParam, QGResult, QParam, QResult, win_salva_annulla, win_assegna,
19802
19976
  win_conferma, win_select_canale, win_select_level, win_uploads, win_commenti, win_info_doc, win_log, win_recupera_doc, win_riassegna_select_level,
19803
- win_riassegna_select_user, win_commento_sel_notif, FHGridJSONComponent, FormBuilderComponent, FormExecuterComponent, FHTableManager, win_manage_values, win_manage_roles, FHComboboxComponentFilter],
19977
+ win_riassegna_select_user, win_sostituisci_utente, win_commento_sel_notif, FHGridJSONComponent, FormBuilderComponent, FormExecuterComponent, FHTableManager, win_manage_values, win_manage_roles, FHComboboxComponentFilter],
19804
19978
  providers: [HighlightService, DragulaService
19805
19979
  ],
19806
19980
  entryComponents: [
19807
19981
  // Customize dialog must be import here.
19808
- win_user_info, win_insert_commento, win_manage_roles, win_manage_values, win_show_image, WinAskButtonsComponent, win_salva_annulla, win_assegna, win_conferma, win_select_canale, win_select_level, win_uploads, win_commenti, win_info_doc, win_log, win_recupera_doc, win_riassegna_select_level, win_riassegna_select_user, win_commento_sel_notif,
19982
+ win_user_info, win_insert_commento, win_manage_roles, win_manage_values, win_show_image, WinAskButtonsComponent, win_salva_annulla, win_assegna, win_conferma, win_select_canale, win_select_level, win_uploads, win_commenti, win_info_doc, win_log, win_recupera_doc, win_riassegna_select_level, win_sostituisci_utente, win_riassegna_select_user, win_commento_sel_notif,
19809
19983
  FHPickListComponent,
19810
19984
  FHConfirmComponent,
19811
19985
  win_time_slider,
@@ -20034,5 +20208,5 @@ class dt {
20034
20208
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
20035
20209
  */
20036
20210
 
20037
- export { AppMakerService, AppService, ApprovaGridComponent, AuthenticationService, ComboBoxEditor, CurrencyComponent, DateComponent, DtPick, FHAutoCompleteComponent, FHComboboxComponent, FHConfirmComponent, FHCurrencyFieldComponent, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHFieldPickListComponent, FHGridComponent, FHGridJSONComponent, FHGuard, FHListComponent, FHListPick, FHLogPanelComponent, FHMdReader, FHNumericFieldComponent, FHPickListComponent, FHRichText, FHRoleManager, FHTableManager, FHTimePickerComponent, FHUploadComponent, FHUploadPanelComponent, FHUserFieldComponent, FHUserPickerComponent, FHWinComboSelect, FSInput, FSResult, FileService, FluxhubLibModule, FormBuilderComponent, FormExecuterComponent, GridService, LocalDBService, NumericEditorComponent, OdbcService, OfficeAutomatorService, QGParam, QGResult, QParam, QResult, QueryService, ReplaceLineBreaks, TextAreaEditor, UtilityService, WinAskButtonsComponent, WinAskNumberComponent, WinAskTextBigComponent, WinAskTextComponent, WinOutputComponent, WinWait, WkfService, dati_aggiuntivi, dt, fhimagepreview, win_insert_commento, win_mappa, win_salva_annulla, win_show_image, win_time_slider, win_user_info, wkf_header_bar, wkfapp, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 as ɵa, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR as ɵb, win_riassegna_select_user as ɵba, win_commento_sel_notif as ɵbb, win_manage_values as ɵbc, win_manage_roles as ɵbd, FHComboboxComponentFilter as ɵbe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC as ɵc, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT as ɵd, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 as ɵe, FHHelpButton as ɵf, SafePipe as ɵg, DecimalMask as ɵh, FHValueAccessor as ɵi, MOMENT_DATE_FORMATS as ɵj, MomentDateAdapter as ɵk, win_grid_help as ɵl, HighlightService as ɵm, FHViewerComponent as ɵn, FHGridToolBarComponent as ɵp, win_assegna as ɵq, win_conferma as ɵr, win_select_canale as ɵs, win_select_level as ɵt, win_uploads as ɵu, win_commenti as ɵv, win_info_doc as ɵw, win_log as ɵx, win_recupera_doc as ɵy, win_riassegna_select_level as ɵz };
20211
+ export { AppMakerService, AppService, ApprovaGridComponent, AuthenticationService, ComboBoxEditor, CurrencyComponent, DateComponent, DtPick, FHAutoCompleteComponent, FHComboboxComponent, FHConfirmComponent, FHCurrencyFieldComponent, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHFieldPickListComponent, FHGridComponent, FHGridJSONComponent, FHGuard, FHListComponent, FHListPick, FHLogPanelComponent, FHMdReader, FHNumericFieldComponent, FHPickListComponent, FHRichText, FHRoleManager, FHTableManager, FHTimePickerComponent, FHUploadComponent, FHUploadPanelComponent, FHUserFieldComponent, FHUserPickerComponent, FHWinComboSelect, FSInput, FSResult, FileService, FluxhubLibModule, FormBuilderComponent, FormExecuterComponent, GridService, LocalDBService, NumericEditorComponent, OdbcService, OfficeAutomatorService, QGParam, QGResult, QParam, QResult, QueryService, ReplaceLineBreaks, TextAreaEditor, UtilityService, WinAskButtonsComponent, WinAskNumberComponent, WinAskTextBigComponent, WinAskTextComponent, WinOutputComponent, WinWait, WkfService, dati_aggiuntivi, dt, fhimagepreview, win_insert_commento, win_mappa, win_salva_annulla, win_show_image, win_time_slider, win_user_info, wkf_header_bar, wkfapp, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 as ɵa, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 as ɵb, win_riassegna_select_user as ɵba, win_sostituisci_utente as ɵbb, win_commento_sel_notif as ɵbc, win_manage_values as ɵbd, win_manage_roles as ɵbe, FHComboboxComponentFilter as ɵbf, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC as ɵc, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT as ɵd, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR as ɵe, FHHelpButton as ɵf, SafePipe as ɵg, DecimalMask as ɵh, FHValueAccessor as ɵi, MOMENT_DATE_FORMATS as ɵj, MomentDateAdapter as ɵk, win_grid_help as ɵl, HighlightService as ɵm, FHViewerComponent as ɵn, FHGridToolBarComponent as ɵp, win_assegna as ɵq, win_conferma as ɵr, win_select_canale as ɵs, win_select_level as ɵt, win_uploads as ɵu, win_commenti as ɵv, win_info_doc as ɵw, win_log as ɵx, win_recupera_doc as ɵy, win_riassegna_select_level as ɵz };
20038
20212
  //# sourceMappingURL=fluxhub-fluxhub-lib.js.map