fix(surveyor):perbaikkan hapus foto

This commit is contained in:
majid
2025-04-17 15:33:34 +07:00
committed by putrakuningan
parent 23aa158cc2
commit b53b94e27d

View File

@@ -364,6 +364,8 @@
param_name: paramName
};
// Add file to existing files set to prevent duplicates
existingFiles.add(file.name);
@@ -830,6 +832,9 @@
const filePreviewElement = file.previewElement;
console.log(file.originalPath);
if (!filePreviewElement) {
console.error('File preview element not found for:', file);
return;
@@ -874,7 +879,7 @@
url: "{{ route('surveyor.hapusFoto') }}",
method: 'DELETE',
data: {
path: file.originalPath,
path: response.path,
permohonan_id: {{ $permohonan->id ?? 0 }},
dokument_id: '{{ request('dokument') ?? '' }}',
param_name: response.param_name