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