fix(pembanding): handle kordinat di data pembanding dan tampilan actifity team

This commit is contained in:
majid
2025-03-20 10:22:35 +07:00
parent bfc9b989ef
commit 155fe5f011
4 changed files with 39 additions and 14 deletions

View File

@@ -413,7 +413,7 @@
`;
} else {
subOptionsHtml = `
<div>
<div class="flex grid gap-2">
<select id="subOptionsPenugasan" class="input">
<option value="" selected disabled>Pilih Penugasan</option>
<option value="surveyor">Surveyor</option>

View File

@@ -721,10 +721,11 @@
},
error: function(xhr, status, error) {
hideLoadingSwal();
console.error('Error:', error);
const response = JSON.parse(xhr.responseText);
console.error('Error:', response.message);
Swal.fire({
title: 'Error!',
text: 'Terjadi kesalahan pada server',
text: response.message || 'Terjadi kesalahan',
icon: 'error',
confirmButtonText: 'OK'
});

View File

@@ -267,17 +267,17 @@
<td class="px-4 py-2">
<div class="grid grid-cols-2 gap-2">
<input type="text" name="kordinat_lat" class="input" placeholder="Latitude"
value="{{ $inspectionData['asset']['kordinat_lat'] ?? '' }}">
value="{{ $inspectionData['asset']['kordinat_lat'] ?? '' }}" pattern="^-?((1[0-7]\d|\d{1,2})(\.\d+)?|180(\.0+)?)$">
<input type="text" name="kordinat_lng" class="input" placeholder="Longitude"
value="{{ $inspectionData['asset']['kordinat_lng'] ?? '' }}">
value="{{ $inspectionData['asset']['kordinat_lng'] ?? '' }}" pattern="^-?((1[0-7]\d|\d{1,2})(\.\d+)?|180(\.0+)?)$">
</div>
</td>
<td class="px-4 py-2">
<div class="grid grid-cols-2 gap-2">
<input type="text" name="kordinat_lat_pembanding[]" class="input"
placeholder="Latitude">
placeholder="Latitude" pattern="^-?((1[0-7]\d|\d{1,2})(\.\d+)?|180(\.0+)?)$">
<input type="text" name="kordinat_lng_pembanding[]" class="input"
placeholder="Longitude">
placeholder="Longitude" pattern="^-?((1[0-7]\d|\d{1,2})(\.\d+)?|180(\.0+)?)$">
</div>
</td>
</tr>