update tab nhật ký (Lọc, Ngôn ngữ,...)
This commit is contained in:
@@ -2,6 +2,7 @@ import { api } from "@/config";
|
||||
import {
|
||||
API_GET_TRIP,
|
||||
API_HAUL_HANDLE,
|
||||
API_POST_TRIPSLIST,
|
||||
API_UPDATE_FISHING_LOGS,
|
||||
API_UPDATE_TRIP_STATUS,
|
||||
} from "@/constants";
|
||||
@@ -20,4 +21,8 @@ export async function queryStartNewHaul(body: Model.NewFishingLogRequest) {
|
||||
|
||||
export async function queryUpdateFishingLogs(body: Model.FishingLog) {
|
||||
return api.put(API_UPDATE_FISHING_LOGS, body);
|
||||
}
|
||||
}
|
||||
|
||||
export async function queryTripsList(body: Model.TripListBody) {
|
||||
return api.post(API_POST_TRIPSLIST, body);
|
||||
}
|
||||
|
||||
30
controller/typings.d.ts
vendored
30
controller/typings.d.ts
vendored
@@ -93,7 +93,37 @@ declare namespace Model {
|
||||
message?: string;
|
||||
started_at?: number;
|
||||
}
|
||||
|
||||
// Trip
|
||||
// Body API trip
|
||||
interface TripListBody {
|
||||
name?: string;
|
||||
order?: string;
|
||||
dir?: "asc" | "desc";
|
||||
limit: number;
|
||||
offset: number;
|
||||
metadata?: TripRequestMetadata;
|
||||
}
|
||||
|
||||
interface TripRequestMetadata {
|
||||
status?: string;
|
||||
from?: string;
|
||||
to?: string;
|
||||
ship_name?: string;
|
||||
reg_number?: string;
|
||||
province_code?: string;
|
||||
owner_id?: string;
|
||||
ship_id?: string;
|
||||
thing_id?: string;
|
||||
}
|
||||
|
||||
interface TripsListResponse {
|
||||
total?: number;
|
||||
offset?: number;
|
||||
limit?: number;
|
||||
trips?: Trip[];
|
||||
}
|
||||
|
||||
interface Trip {
|
||||
id: string;
|
||||
ship_id: string;
|
||||
|
||||
Reference in New Issue
Block a user