refactor(sn): modularize map and features and standardize file naming

This commit is contained in:
2026-10-01 15:47:57 +09:00
parent 7b506320b4
commit 4c7c4c00ab
331 changed files with 15085 additions and 11695 deletions
@@ -1,11 +1,11 @@
/** 준설 조회·등록·수정·삭제와 최근접 관로 HTTP 계약을 담당한다. */
import {
deleteData,
getBlobData,
getRawJson,
postRawJson,
putData,
} from "@/components/lib/api";
} from "@/shared/api/sewerage-api";
import { getBlobData } from "@/shared/api/file-api";
import { requestGridExcel } from "@/shared/api/grid-export";
import { isDredgingBackendEnabled } from "./backend-mode";
import { toDredgingApiError } from "./dredging-error";
@@ -40,7 +40,9 @@ export type DredgingGridQuery = {
sort?: string;
};
export const fetchDredgingGridPage = async (query: DredgingGridQuery): Promise<{
export const fetchDredgingGridPage = async (
query: DredgingGridQuery,
): Promise<{
content: Array<Record<string, unknown> & { recordIds: string[] }>;
totalElements: number;
number: number;
@@ -55,12 +57,18 @@ export const fetchDredgingGridPage = async (query: DredgingGridQuery): Promise<{
};
/** 적용 조건 전체의 서버 XLSX를 받는다. page/size는 다운로드에 전달하지 않는다. */
export const downloadDredgingGridExcel = (query: Omit<DredgingGridQuery, "page" | "size">): Promise<void> => {
export const downloadDredgingGridExcel = (
query: Omit<DredgingGridQuery, "page" | "size">,
): Promise<void> => {
const params = new URLSearchParams();
Object.entries(query).forEach(([key, value]) => {
if (value !== undefined && value !== "") params.set(key, String(value));
});
return requestGridExcel(`v1/dredging/grid/exportJobs?${params}`, {}, `준설관리_${query.viewType}_${query.fromDate}_${query.toDate}.xlsx`);
return requestGridExcel(
`v1/dredging/grid/exportJobs?${params}`,
{},
`준설관리_${query.viewType}_${query.fromDate}_${query.toDate}.xlsx`,
);
};
type LocationRequest = GeoPoint & {
@@ -99,7 +107,6 @@ export const fetchDredgingRecords = async (params: {
}
};
/** 등록된 준설사진의 공통 첨부파일 참조를 조회한다. */
export const fetchDredgingPhotos = async (
dredgingJobSn: string | number,