@fluxhub/fluxhub-lib 10.0.657 → 10.0.659

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.
@@ -23994,8 +23994,131 @@ win_uploads_v2.propDecorators = {
23994
23994
  upc: [{ type: ViewChild, args: ["upc",] }]
23995
23995
  };
23996
23996
 
23997
+ class win_assegna_a {
23998
+ constructor(dialogRef, m_appService, toastr, _trs, data) {
23999
+ this.dialogRef = dialogRef;
24000
+ this.m_appService = m_appService;
24001
+ this.toastr = toastr;
24002
+ this._trs = _trs;
24003
+ this.data = data;
24004
+ this.op = "L";
24005
+ this.lbl = "";
24006
+ this.nota = "";
24007
+ this.nota_commento = "";
24008
+ this.title = "";
24009
+ this.comm_notrequired = 0;
24010
+ this.all_users = [];
24011
+ if (data != null) {
24012
+ if (data.commento_default != null)
24013
+ this.nota = data.commento_default;
24014
+ if (data.comm_notrequired != null)
24015
+ this.comm_notrequired = data.comm_notrequired ? 1 : 0;
24016
+ if (data.title != null)
24017
+ this.title = data.title;
24018
+ if (data.lbl != null)
24019
+ this.lbl = data.lbl;
24020
+ if (data.utenti != null) {
24021
+ this.arrAutori = data.utenti;
24022
+ this.all_users = JSON.parse(JSON.stringify(data.utenti));
24023
+ this.title = this._trs.instant("ASSEGNA DOCUMENTO");
24024
+ for (let i = 0; i < this.arrAutori.length; i++) {
24025
+ if (this.arrAutori[i].username == null)
24026
+ this.arrAutori[i].username = this.arrAutori[i].idp;
24027
+ }
24028
+ if (this.comm_notrequired == 2)
24029
+ this.nota_commento = this._trs.instant(" (COMMENTO NON OBBLIGATORIO)");
24030
+ if (data != null) {
24031
+ if (data.commento_default != null)
24032
+ this.nota = data.commento_default;
24033
+ if (data.comm_notrequired != null)
24034
+ this.comm_notrequired = data.comm_notrequired;
24035
+ }
24036
+ }
24037
+ }
24038
+ }
24039
+ close() {
24040
+ this.dialogRef.close(null);
24041
+ }
24042
+ ok() {
24043
+ if (this.op == 'A')
24044
+ if (this.up.getSelArr().length == 0) {
24045
+ this.toastr.error("ERRORE", this._trs.instant("SELEZIONARE ALMENO UN UTENTE"), {
24046
+ timeOut: 1000,
24047
+ progressBar: true,
24048
+ });
24049
+ return;
24050
+ }
24051
+ let o = new Object();
24052
+ o.nota = this.nota;
24053
+ if (this.op == 'A')
24054
+ o.arrsel = this.up.getSelArr();
24055
+ else
24056
+ o.arrsel = this.all_users;
24057
+ this.dialogRef.close(o);
24058
+ }
24059
+ ngAfterViewInit() { }
24060
+ }
24061
+ win_assegna_a.decorators = [
24062
+ { type: Component, args: [{
24063
+ template: `
24064
+ <div fxLayout="column">
24065
+     <div  fxFlex="100" fxLayout="row"   class="dialog_header">
24066
+ <div fxLayout="row" fxLayoutAlign="start center" style="width:50%">{{title | translate}}</div>
24067
+ <div style="width:50%" fxLayout="row" fxLayoutAlign="end start">
24068
+ <img    src="assets/icons/x.png"        style="cursor: pointer;"        (click)="close()" />
24069
+ </div>
24070
+ </div>
24071
+ <div
24072
+ mat-dialog-content
24073
+ fxLayout="column"
24074
+ style="font-size: 15px;min-width: 750px"
24075
+ >
24076
+ <br><br>
24077
+ <div fxLayout="row" fxLayoutAlign="start center" fxFlexGap="5px" fxFlex="100">
24078
+ <div style="width:100px;font-weight:bold">Operazione:*</div>
24079
+ <mat-radio-group [(ngModel)]="op">
24080
+ <mat-radio-button value="L">LIBERA</mat-radio-button>&nbsp;&nbsp;&nbsp;&nbsp;
24081
+ <mat-radio-button value="A">ASSEGNA</mat-radio-button>
24082
+ </mat-radio-group>
24083
+ </div>
24084
+ <div style="width:100%;height:450px" [hidden]="op!='A'">
24085
+ <FHPickUsers
24086
+ #up
24087
+ [users_list]="arrAutori"
24088
+ [vis_buttons]="false"
24089
+ ></FHPickUsers>
24090
+ </div>
24091
+
24092
+ </div>
24093
+ <br />
24094
+ <div style="width:100%;text-align:center;">
24095
+ <button mat-flat-button color="primary" (click)="ok()"> {{'OK' | translate }}</button
24096
+ >&nbsp;&nbsp;&nbsp;
24097
+ <button
24098
+ mat-flat-button
24099
+ style="background-color: #F5F5F5"
24100
+ (click)="close()"
24101
+ >
24102
+ {{'ANNULLA' | translate }}
24103
+ </button>
24104
+ </div>
24105
+ </div>
24106
+ `
24107
+ },] }
24108
+ ];
24109
+ win_assegna_a.ctorParameters = () => [
24110
+ { type: MatDialogRef },
24111
+ { type: AppService },
24112
+ { type: ToastrService },
24113
+ { type: TranslateService },
24114
+ { type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
24115
+ ];
24116
+ win_assegna_a.propDecorators = {
24117
+ up: [{ type: ViewChild, args: ["up",] }]
24118
+ };
24119
+
23997
24120
  class dati_aggiuntivi_v2 {
23998
- constructor(app_s, m_dataService, m_router, m_dialog, m_route, m_wkf, uti_s, m_fileservice, tsr) {
24121
+ constructor(app_s, m_dataService, m_router, m_dialog, m_route, m_wkf, uti_s, m_fileservice, tsr, _toastr) {
23999
24122
  this.app_s = app_s;
24000
24123
  this.m_dataService = m_dataService;
24001
24124
  this.m_router = m_router;
@@ -24005,6 +24128,7 @@ class dati_aggiuntivi_v2 {
24005
24128
  this.uti_s = uti_s;
24006
24129
  this.m_fileservice = m_fileservice;
24007
24130
  this.tsr = tsr;
24131
+ this._toastr = _toastr;
24008
24132
  this.m_obj = {};
24009
24133
  this.sort_field = "";
24010
24134
  this.in_carico = false;
@@ -24655,6 +24779,96 @@ class dati_aggiuntivi_v2 {
24655
24779
  }*/
24656
24780
  }
24657
24781
  assegna_a() {
24782
+ let arx = this.m_obj.assegnati_paralleli.split(',');
24783
+ let arrAutori = [];
24784
+ for (let x = 0; x < arx.length; x++)
24785
+ for (let y = 0; y < this.livs.length; y++) {
24786
+ if (arx[x] == this.livs[y].username) {
24787
+ arrAutori.push({ username: arx[x], nc: this.livs[y].nc });
24788
+ break;
24789
+ }
24790
+ }
24791
+ // console.log('arrAutori ',arrAutori);
24792
+ arrAutori = arrAutori.sort((n1, n2) => {
24793
+ if (n1.nc > n2.nc) {
24794
+ return 1;
24795
+ }
24796
+ if (n1.nc < n2.nc) {
24797
+ return -1;
24798
+ }
24799
+ return 0;
24800
+ });
24801
+ const dialogRef = this.m_dialog.open(win_assegna_a, { 'disableClose': true, width: '99%', data: {
24802
+ title: this.tsr.instant('Conferma Assegnazione'),
24803
+ lbl: '',
24804
+ commento_default: '',
24805
+ comm_notrequired: '',
24806
+ utenti: arrAutori
24807
+ } });
24808
+ dialogRef.afterClosed().subscribe(result => {
24809
+ if (result) {
24810
+ if (result.arrsel.lenght == 0) {
24811
+ this._toastr.error('Impossibile riassegnare');
24812
+ return;
24813
+ }
24814
+ console.log(' result.arrsel ', result.arrsel);
24815
+ let arr_new_arr = '';
24816
+ this.m_obj.autori = '';
24817
+ let b_edit = false;
24818
+ result.arrsel.map((v) => {
24819
+ if (arr_new_arr != '')
24820
+ arr_new_arr += ',';
24821
+ arr_new_arr += v.username;
24822
+ if (this.m_obj.autori.indexOf(v.username) == -1) {
24823
+ if (this.m_obj.autori != '')
24824
+ this.m_obj.autori = this.m_obj.autori + ',';
24825
+ this.m_obj.autori = this.m_obj.autori + v.username;
24826
+ }
24827
+ if (v.username == this.app_info.user)
24828
+ b_edit = true;
24829
+ });
24830
+ this.in_carico = false;
24831
+ if (this.m_obj.autori != null)
24832
+ if (this.m_obj.autori.split(',').length != 1)
24833
+ this.in_carico = true;
24834
+ this.b_assenza_a = false;
24835
+ if (this.m_obj.assegnati_paralleli != null)
24836
+ if (this.m_obj.assegnati_paralleli.split(',').length != 1)
24837
+ this.b_assenza_a = true;
24838
+ // console.log('this.m_obj.autori ',this.m_obj.autori, this.in_carico, this.b_assenza_a);
24839
+ this.update_status(b_edit, false, this.in_carico, this.b_assenza_a, 18);
24840
+ if (this.respingi_enabled)
24841
+ this.update_status(b_edit, true, this.in_carico, this.b_assenza_a, 19);
24842
+ let p = new QParam();
24843
+ p.sql = "UPDATE_WKF_DOC_AUTHOR";
24844
+ p.values = [this.id_applicativo, this.id_documento, this.m_obj.autori];
24845
+ p.types = ["string", "string", "string"];
24846
+ this.m_dataService.doQuery(p).subscribe((data) => {
24847
+ if (data != null)
24848
+ if (data.result_msg == "OK") {
24849
+ this.sendEMail_ex(this.user_idp, arr_new_arr, this.app_info.descrizione_breve +
24850
+ ", Ti è stato assegnato il documento numero: " +
24851
+ this.m_obj.codice +
24852
+ " " +
24853
+ this.getTitle() +
24854
+ " - " +
24855
+ this.getLvlDescri(String(this.m_liv), this.m_statox), "<br>Attività:" +
24856
+ this.getLvlDescri(String(this.m_liv), this.m_statox) +
24857
+ "<br>" +
24858
+ this.m_statox +
24859
+ "<br>" +
24860
+ this.getDescri(), this.id_applicativo, this.id_documento, this.app_info.COMPANY_SITE_ROOT +
24861
+ "#/" +
24862
+ this.app_info.modulo_swf +
24863
+ "/" +
24864
+ this.id_applicativo +
24865
+ "/" +
24866
+ this.id_documento +
24867
+ "/edit", this.m_obj.codice, "", true, "", false);
24868
+ }
24869
+ });
24870
+ }
24871
+ });
24658
24872
  }
24659
24873
  exec_wkf(trans, liv, arrdest, comm, crea_ver = false) {
24660
24874
  if (crea_ver == null)
@@ -25790,7 +26004,8 @@ dati_aggiuntivi_v2.ctorParameters = () => [
25790
26004
  { type: WkfService },
25791
26005
  { type: UtilityService },
25792
26006
  { type: FileService },
25793
- { type: TranslateService }
26007
+ { type: TranslateService },
26008
+ { type: ToastrService }
25794
26009
  ];
25795
26010
  dati_aggiuntivi_v2.propDecorators = {
25796
26011
  onResize: [{ type: HostListener, args: ["window:resize", ["event"],] }]
@@ -25938,7 +26153,7 @@ wkf_header_bar_v2.decorators = [
25938
26153
  {{revisione_lbl | translate}}
25939
26154
  </button>
25940
26155
  </div>
25941
- <div *ngIf="(edit_button) && assegna_a">
26156
+ <div *ngIf="assegna_a">
25942
26157
  <button
25943
26158
  mat-flat-button
25944
26159
  (click)="evt_assegna_a()"
@@ -28231,7 +28446,7 @@ FluxhubLibModule.decorators = [
28231
28446
  FHComboboxComponentFilter, FHPickFieldComponent, FHUploadPanelS3Component, FHUploadS3Component, fh_win_show_email, fh_win_show_email_s3, fh_win_auto_complete,
28232
28447
  win_salva_annulla_v2, win_assegna_v2, win_conferma_v2, win_select_canale_v2, win_select_level_v2, win_uploads_v2,
28233
28448
  win_commenti_v2, win_info_doc_v2, win_log_v2, win_recupera_doc_v2, win_riassegna_select_level_v2, win_riassegna_select_user_v2,
28234
- win_sostituisci_utente_v2, win_commento_sel_notif_v2, wkf_header_bar_v2, win_insert_commento_v2
28449
+ win_sostituisci_utente_v2, win_commento_sel_notif_v2, wkf_header_bar_v2, win_insert_commento_v2, win_assegna_a
28235
28450
  ],
28236
28451
  providers: [HighlightService, DragulaService]
28237
28452
  },] }
@@ -29283,5 +29498,5 @@ wkfapp_v2.ctorParameters = () => [
29283
29498
  * Generated bundle index. Do not edit.
29284
29499
  */
29285
29500
 
29286
- export { AppMakerService, AppService, ApprovaGridComponent, AuthenticationService, CheckboxEditorComponent, ComboBoxEditor, CurrencyComponent, FHAutoCompleteComponent, FHCheckBox, FHComboboxComponent, FHConfirmValues, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHFieldPickListComponent, FHFormToolBarComponent, FHGridComponent, FHGridComponentN, FHGridJSONComponent, FHGuard, FHListComponent, FHLogPanelComponent, FHMdReader, FHNumericFieldComponent, FHPickFieldComponent, FHRichText, FHRoleManager, FHTableManager, FHTextArea, FHTextInput, FHTimePickerComponent, FHUploadComponent, FHUploadPanelComponent, FHUploadPanelS3Component, FHUploadS3Component, FHUserFieldComponent, FSInput, FSResult, FileService, FluxhubLibModule, FormBuilderComponent, FormExecuterComponent, GridService, LocalDBService, NumericEditorComponent, OdbcService, OfficeAutomatorService, QGParam, QGResult, QParam, QResult, QueryService, ReplaceLineBreaks, TextAreaEditor, UtilityService, WkfService, dati_aggiuntivi, dati_aggiuntivi_v2, fh_win_app_logs, fh_win_ask_big_text, fh_win_ask_buttons, fh_win_ask_number, fh_win_ask_richtext, fh_win_ask_text, fh_win_auto_complete, fh_win_combo, fh_win_confirm, fh_win_list, fh_win_mappa, fh_win_output, fh_win_picklist, fh_win_show_email, fh_win_show_email_s3, fh_win_show_image, fh_win_show_log, fh_win_show_log_dett, fh_win_time_slider, fh_win_uploads, fh_win_user_info, fh_win_user_picker, fh_win_wait, fhimagepreview, win_insert_commento, win_salva_annulla, wkf_header_bar, wkf_header_bar_v2, wkfapp, wkfapp_v2, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 as ɵa, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$3 as ɵb, win_commenti as ɵba, win_info_doc as ɵbb, win_log as ɵbc, win_recupera_doc as ɵbd, win_riassegna_select_level as ɵbe, win_riassegna_select_user as ɵbf, win_sostituisci_utente as ɵbg, win_commento_sel_notif as ɵbh, win_manage_values as ɵbi, win_manage_roles as ɵbj, FHComboboxComponentFilter as ɵbk, win_salva_annulla_v2 as ɵbl, win_assegna_v2 as ɵbm, win_conferma_v2 as ɵbn, win_select_canale_v2 as ɵbo, win_select_level_v2 as ɵbp, win_uploads_v2 as ɵbq, win_commenti_v2 as ɵbr, win_info_doc_v2 as ɵbs, win_log_v2 as ɵbt, win_recupera_doc_v2 as ɵbu, win_riassegna_select_level_v2 as ɵbv, win_riassegna_select_user_v2 as ɵbw, win_sostituisci_utente_v2 as ɵbx, win_commento_sel_notif_v2 as ɵby, win_insert_commento_v2 as ɵbz, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$8 as ɵc, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$5 as ɵd, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR as ɵe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$6 as ɵf, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC as ɵg, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT as ɵh, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$4 as ɵi, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 as ɵj, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7 as ɵk, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$9 as ɵl, MOMENT_DATE_FORMATS as ɵm, MomentDateAdapter as ɵn, HighlightService as ɵo, win_show_log_info_dett as ɵp, FHHelpButton as ɵq, SafePipe as ɵr, FHViewerComponent as ɵs, FHGridToolBarComponent as ɵu, win_grid_help as ɵv, win_assegna as ɵw, win_conferma as ɵx, win_select_canale as ɵy, win_select_level as ɵz };
29501
+ export { AppMakerService, AppService, ApprovaGridComponent, AuthenticationService, CheckboxEditorComponent, ComboBoxEditor, CurrencyComponent, FHAutoCompleteComponent, FHCheckBox, FHComboboxComponent, FHConfirmValues, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHFieldPickListComponent, FHFormToolBarComponent, FHGridComponent, FHGridComponentN, FHGridJSONComponent, FHGuard, FHListComponent, FHLogPanelComponent, FHMdReader, FHNumericFieldComponent, FHPickFieldComponent, FHRichText, FHRoleManager, FHTableManager, FHTextArea, FHTextInput, FHTimePickerComponent, FHUploadComponent, FHUploadPanelComponent, FHUploadPanelS3Component, FHUploadS3Component, FHUserFieldComponent, FSInput, FSResult, FileService, FluxhubLibModule, FormBuilderComponent, FormExecuterComponent, GridService, LocalDBService, NumericEditorComponent, OdbcService, OfficeAutomatorService, QGParam, QGResult, QParam, QResult, QueryService, ReplaceLineBreaks, TextAreaEditor, UtilityService, WkfService, dati_aggiuntivi, dati_aggiuntivi_v2, fh_win_app_logs, fh_win_ask_big_text, fh_win_ask_buttons, fh_win_ask_number, fh_win_ask_richtext, fh_win_ask_text, fh_win_auto_complete, fh_win_combo, fh_win_confirm, fh_win_list, fh_win_mappa, fh_win_output, fh_win_picklist, fh_win_show_email, fh_win_show_email_s3, fh_win_show_image, fh_win_show_log, fh_win_show_log_dett, fh_win_time_slider, fh_win_uploads, fh_win_user_info, fh_win_user_picker, fh_win_wait, fhimagepreview, win_insert_commento, win_salva_annulla, wkf_header_bar, wkf_header_bar_v2, wkfapp, wkfapp_v2, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 as ɵa, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$3 as ɵb, win_commenti as ɵba, win_info_doc as ɵbb, win_log as ɵbc, win_recupera_doc as ɵbd, win_riassegna_select_level as ɵbe, win_riassegna_select_user as ɵbf, win_sostituisci_utente as ɵbg, win_commento_sel_notif as ɵbh, win_manage_values as ɵbi, win_manage_roles as ɵbj, FHComboboxComponentFilter as ɵbk, win_salva_annulla_v2 as ɵbl, win_assegna_v2 as ɵbm, win_conferma_v2 as ɵbn, win_select_canale_v2 as ɵbo, win_select_level_v2 as ɵbp, win_uploads_v2 as ɵbq, win_commenti_v2 as ɵbr, win_info_doc_v2 as ɵbs, win_log_v2 as ɵbt, win_recupera_doc_v2 as ɵbu, win_riassegna_select_level_v2 as ɵbv, win_riassegna_select_user_v2 as ɵbw, win_sostituisci_utente_v2 as ɵbx, win_commento_sel_notif_v2 as ɵby, win_insert_commento_v2 as ɵbz, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$8 as ɵc, win_assegna_a as ɵca, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$5 as ɵd, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR as ɵe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$6 as ɵf, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC as ɵg, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT as ɵh, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$4 as ɵi, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 as ɵj, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7 as ɵk, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$9 as ɵl, MOMENT_DATE_FORMATS as ɵm, MomentDateAdapter as ɵn, HighlightService as ɵo, win_show_log_info_dett as ɵp, FHHelpButton as ɵq, SafePipe as ɵr, FHViewerComponent as ɵs, FHGridToolBarComponent as ɵu, win_grid_help as ɵv, win_assegna as ɵw, win_conferma as ɵx, win_select_canale as ɵy, win_select_level as ɵz };
29287
29502
  //# sourceMappingURL=fluxhub-fluxhub-lib.js.map