@hmcts/ccd-case-ui-toolkit 7.0.21 → 7.0.22-upload-timestamp
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/esm2020/lib/shared/components/palette/document/write-document-field.component.mjs +17 -1
- package/esm2020/lib/shared/domain/document/document-data.model.mjs +1 -1
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +10 -0
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +16 -0
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/palette/document/write-document-field.component.d.ts +1 -0
- package/lib/shared/components/palette/document/write-document-field.component.d.ts.map +1 -1
- package/lib/shared/domain/document/document-data.model.d.ts +1 -0
- package/lib/shared/domain/document/document-data.model.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -13488,6 +13488,9 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
13488
13488
|
if (documentHash) {
|
|
13489
13489
|
this.uploadedDocument.get(WriteDocumentFieldComponent.DOCUMENT_HASH).setValue(documentHash);
|
|
13490
13490
|
}
|
|
13491
|
+
if (this.uploadedDocument.get(WriteDocumentFieldComponent.UPLOAD_TIMESTAMP)) {
|
|
13492
|
+
this.uploadedDocument.removeControl(WriteDocumentFieldComponent.UPLOAD_TIMESTAMP);
|
|
13493
|
+
}
|
|
13491
13494
|
}
|
|
13492
13495
|
createDocumentFormWithValidator(document) {
|
|
13493
13496
|
let documentFormGroup = {
|
|
@@ -13495,6 +13498,12 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
13495
13498
|
document_binary_url: new FormControl(document.document_binary_url, Validators.required),
|
|
13496
13499
|
document_filename: new FormControl(document.document_filename, Validators.required)
|
|
13497
13500
|
};
|
|
13501
|
+
if (document.upload_timestamp && (typeof document.upload_timestamp === 'string')) {
|
|
13502
|
+
documentFormGroup = {
|
|
13503
|
+
...documentFormGroup,
|
|
13504
|
+
...{ upload_timestamp: new FormControl(document.upload_timestamp) }
|
|
13505
|
+
};
|
|
13506
|
+
}
|
|
13498
13507
|
documentFormGroup = this.secureModeOn ? {
|
|
13499
13508
|
...documentFormGroup,
|
|
13500
13509
|
...{ document_hash: new FormControl(document.document_hash) }
|
|
@@ -13507,6 +13516,12 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
13507
13516
|
document_binary_url: new FormControl(document.document_binary_url),
|
|
13508
13517
|
document_filename: new FormControl(document.document_filename)
|
|
13509
13518
|
};
|
|
13519
|
+
if (document.upload_timestamp && (typeof document.upload_timestamp === 'string')) {
|
|
13520
|
+
documentFormGroup = {
|
|
13521
|
+
...documentFormGroup,
|
|
13522
|
+
...{ upload_timestamp: new FormControl(document.upload_timestamp) }
|
|
13523
|
+
};
|
|
13524
|
+
}
|
|
13510
13525
|
documentFormGroup = this.secureModeOn ? {
|
|
13511
13526
|
...documentFormGroup,
|
|
13512
13527
|
...{ document_hash: new FormControl(document.document_hash) }
|
|
@@ -13582,6 +13597,7 @@ WriteDocumentFieldComponent.DOCUMENT_URL = 'document_url';
|
|
|
13582
13597
|
WriteDocumentFieldComponent.DOCUMENT_BINARY_URL = 'document_binary_url';
|
|
13583
13598
|
WriteDocumentFieldComponent.DOCUMENT_FILENAME = 'document_filename';
|
|
13584
13599
|
WriteDocumentFieldComponent.DOCUMENT_HASH = 'document_hash';
|
|
13600
|
+
WriteDocumentFieldComponent.UPLOAD_TIMESTAMP = 'upload_timestamp';
|
|
13585
13601
|
WriteDocumentFieldComponent.UPLOAD_ERROR_FILE_REQUIRED = 'File required';
|
|
13586
13602
|
WriteDocumentFieldComponent.UPLOAD_ERROR_NOT_AVAILABLE = 'Document upload facility is not available at the moment';
|
|
13587
13603
|
WriteDocumentFieldComponent.UPLOAD_WAITING_FILE_STATUS = 'Uploading...';
|