@controleonline/ui-customers 1.0.87 → 1.0.89

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@controleonline/ui-customers",
3
- "version": "1.0.87",
3
+ "version": "1.0.89",
4
4
  "author": "ControleOnline",
5
5
  "description": "ControleOnline customers Quasar UI Component",
6
6
  "license": "MIT",
@@ -21,7 +21,6 @@ import {
21
21
  isImageFile,
22
22
  isPdfFile,
23
23
  normalizeDocumentFiles,
24
- toDocumentIri,
25
24
  ACCEPTED_DOCUMENT_FILE_TYPES,
26
25
  } from './documentsTabHelpers';
27
26
  import {
@@ -214,7 +213,8 @@ const DocumentAttachments = ({
214
213
  <DefaultUpload
215
214
  relationStoreName="document_file"
216
215
  relationField="document"
217
- relationResource={toDocumentIri(documentId)}
216
+ // DefaultUpload builds `/${relationResource}/${entityId}`, so pass the bare collection name.
217
+ relationResource="documents"
218
218
  entityId={documentId}
219
219
  companyId={companyId}
220
220
  context="document"
@@ -27,6 +27,9 @@ test('DocumentAttachments exposes view/share/print/remove via DefaultUpload', ()
27
27
  assert.match(attachments, /handleShare|Share\.share/);
28
28
  assert.match(attachments, /handlePrint|print\(/);
29
29
  assert.match(attachments, /ACCEPTED_DOCUMENT_FILE_TYPES/);
30
+ // app-community#1392: a full IRI here produced `//documents/N/N` and the relation was never saved.
31
+ assert.match(attachments, /relationResource="documents"/);
32
+ assert.doesNotMatch(attachments, /relationResource=\{/);
30
33
  assert.ok(attachments.split('\n').length <= 500, 'DocumentAttachments must stay under 500 lines');
31
34
  });
32
35