carriera-intern-components 1.1.172 → 1.1.173
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.
|
@@ -3458,7 +3458,7 @@ class DropZoneComponent {
|
|
|
3458
3458
|
this.sanitizer = sanitizer;
|
|
3459
3459
|
effect(() => {
|
|
3460
3460
|
const files = this.files();
|
|
3461
|
-
if (!this.initialFilesProcessed() && files
|
|
3461
|
+
if (!this.initialFilesProcessed() && files?.length) {
|
|
3462
3462
|
this.populateDocs(files);
|
|
3463
3463
|
this.initialFilesProcessed.set(true);
|
|
3464
3464
|
}
|
|
@@ -3472,10 +3472,11 @@ class DropZoneComponent {
|
|
|
3472
3472
|
this.docsChange.emit(this.docs());
|
|
3473
3473
|
}
|
|
3474
3474
|
populateDocs(currentFiles) {
|
|
3475
|
-
if (currentFiles
|
|
3475
|
+
if (currentFiles?.length) {
|
|
3476
3476
|
this.docs.set(currentFiles.map((file) => ({
|
|
3477
3477
|
fileName: file.fileName || '',
|
|
3478
3478
|
baseName: file.fileName || '',
|
|
3479
|
+
fileId: file.fileId || 0,
|
|
3479
3480
|
type: file.fileName
|
|
3480
3481
|
?.split('.')
|
|
3481
3482
|
.pop()
|
|
@@ -3757,6 +3758,7 @@ class DropZoneComponent {
|
|
|
3757
3758
|
handleDelete(fileName) {
|
|
3758
3759
|
this.carouselLeft();
|
|
3759
3760
|
const fileIdToDelete = this.docs().find((doc) => doc.fileName === fileName)?.fileId;
|
|
3761
|
+
console.log(fileIdToDelete, "fileIdToDelete");
|
|
3760
3762
|
if (fileIdToDelete) {
|
|
3761
3763
|
this.deletedDocs.set([
|
|
3762
3764
|
...this.deletedDocs(),
|