cập nhật api thêm/sửa mẻ

This commit is contained in:
Tran Anh Tuan
2025-11-10 10:45:31 +07:00
parent 45746a6a0f
commit f3b0e7b7eb
5 changed files with 97 additions and 24 deletions

View File

@@ -2,6 +2,7 @@ import { api } from "@/config";
import {
API_GET_TRIP,
API_HAUL_HANDLE,
API_UPDATE_FISHING_LOGS,
API_UPDATE_TRIP_STATUS,
} from "@/constants";
@@ -16,3 +17,7 @@ export async function queryUpdateTripState(body: Model.TripUpdateStateRequest) {
export async function queryStartNewHaul(body: Model.NewFishingLogRequest) {
return api.put(API_HAUL_HANDLE, body);
}
export async function queryUpdateFishingLogs(body: Model.FishingLog) {
return api.put(API_UPDATE_FISHING_LOGS, body);
}

View File

@@ -152,8 +152,8 @@ declare namespace Model {
interface FishingLog {
fishing_log_id: string;
trip_id: string;
start_at: string; // ISO datetime
end_at: string; // ISO datetime
start_at: Date; // ISO datetime
end_at: Date; // ISO datetime
start_lat: number;
start_lon: number;
haul_lat: number;