@arsedizioni/ars-utils 21.2.144 → 21.2.146

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.
@@ -168,6 +168,7 @@ class ClipperDocumentManager {
168
168
  this.dialogService = inject(ApplicationDialogService);
169
169
  this.canUseArchive = signal(false, ...(ngDevMode ? [{ debugName: "canUseArchive" }] : /* istanbul ignore next */ []));
170
170
  this.canHandleTooManyResults = signal(false, ...(ngDevMode ? [{ debugName: "canHandleTooManyResults" }] : /* istanbul ignore next */ []));
171
+ this.canPopulateContacts = signal(false, ...(ngDevMode ? [{ debugName: "canPopulateContacts" }] : /* istanbul ignore next */ []));
171
172
  }
172
173
  /**
173
174
  * Export a document in pdf format
@@ -344,17 +345,18 @@ class ClipperDocumentManager {
344
345
  data: {
345
346
  info: 'Puoi inviare i documenti a chi vuoi ma, per poterli visualizzare, è necessario essere un utente abbonato.',
346
347
  count: items.length,
347
- canPopulate: true,
348
+ canPopulate: this.canPopulateContacts(),
348
349
  },
349
350
  minWidth: '375px',
350
351
  maxWidth: '600px',
351
352
  width: '100%',
352
353
  });
353
354
  d.componentInstance.done
354
- .subscribe((data) => {
355
+ .subscribe(data => {
355
356
  const params = {
356
357
  recipients: data.recipients,
357
358
  subject: data.subject,
359
+ text: data.text,
358
360
  ids: items?.map(n => n.documentId ?? n.id) ?? []
359
361
  };
360
362
  this.dialogService.busy('Invio in corso...');
@@ -371,7 +373,7 @@ class ClipperDocumentManager {
371
373
  });
372
374
  });
373
375
  d.componentInstance.populate
374
- .subscribe((data) => {
376
+ .subscribe(data => {
375
377
  this.populateContacts.emit(data);
376
378
  });
377
379
  }
@@ -2997,6 +2999,8 @@ class ClipperBrowserComponent extends ClipperSearchResultManager {
2997
2999
  this.user = this.clipperService.loginInfo?.context;
2998
3000
  }
2999
3001
  ngOnInit() {
3002
+ // Disable features based on user context
3003
+ this.canPopulateContacts.set(false);
3000
3004
  // Initialize filter
3001
3005
  this.filterParams.version = 7;
3002
3006
  this.filterParams.modules = [{ name: "Normativa vigente", shortName: "Normativa vigente", value: ClipperModule.NormativaVigente }];