fix: sửa lại cho phép chỉnh sửa thời gian bắt đầu và kết thúc của điểm xuất phát và điểm kết thúc
This commit is contained in:
@@ -108,7 +108,9 @@ export const AddLocationModal = ({ isOpen, onClose, tourId, initialLegId, editin
|
||||
expenseDescription: expense?.description || '',
|
||||
expenseNote: expense?.note || '',
|
||||
paidById: expense?.paidById || '',
|
||||
plannedStart: editingLocation.plannedStart ? editingLocation.plannedStart.slice(0, 16) : '',
|
||||
plannedStart: isStartPoint
|
||||
? (editingLocation.plannedEnd ? editingLocation.plannedEnd.slice(0, 16) : '')
|
||||
: (editingLocation.plannedStart ? editingLocation.plannedStart.slice(0, 16) : ''),
|
||||
plannedEnd: editingLocation.plannedEnd ? editingLocation.plannedEnd.slice(0, 16) : ''
|
||||
});
|
||||
} else {
|
||||
@@ -291,12 +293,14 @@ export const AddLocationModal = ({ isOpen, onClose, tourId, initialLegId, editin
|
||||
name: formData.name || "Điểm xuất phát",
|
||||
latitude: parseFloat(formData.latitude as any),
|
||||
longitude: parseFloat(formData.longitude as any),
|
||||
plannedEnd: formData.plannedStart,
|
||||
});
|
||||
} else if (isEndPoint) {
|
||||
await updateTourEndPoint(tourId, {
|
||||
name: formData.name || "Điểm kết thúc",
|
||||
latitude: parseFloat(formData.latitude as any),
|
||||
longitude: parseFloat(formData.longitude as any),
|
||||
plannedStart: formData.plannedStart,
|
||||
});
|
||||
} else {
|
||||
const payload: any = {
|
||||
|
||||
Reference in New Issue
Block a user