thêm giao diện quản lý thuyền

This commit is contained in:
Tran Anh Tuan
2025-12-10 19:49:54 +07:00
parent df4318fed4
commit 3e1c4dcbc5
24 changed files with 2091 additions and 135 deletions

View File

@@ -1,5 +1,7 @@
import { api } from "@/config";
import {
API_GET_ALL_SHIP,
API_GET_PHOTO,
API_GET_SHIP_GROUPS,
API_GET_SHIP_TYPES,
API_PATH_SEARCH_THINGS,
@@ -16,3 +18,22 @@ export async function queryShipTypes() {
export async function queryShipGroups() {
return await api.get<Model.ShipGroup[]>(API_GET_SHIP_GROUPS);
}
export async function queryAllShips(params: Model.SearchThingBody) {
return await api.get<Model.ShipResponse>(API_GET_ALL_SHIP, {
params: params,
});
}
export async function queryShipsImage(ship_id: string) {
return await api.get(`${API_GET_PHOTO}/ship/${ship_id}/main`, {
responseType: "arraybuffer",
});
}
export async function queryUpdateShip(
shipId: string,
body: Model.ShipBodyRequest
) {
return await api.put(`${API_GET_ALL_SHIP}/${shipId}`, body);
}