Add location report map page and history list aligned with Android.

Extract shared LocationReportService, wire location_report menu routing, and add unit tests for reporting cooldown and history pagination.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-07 11:34:54 +08:00
parent 5a2b7b6097
commit d2879ad7e2
17 changed files with 1975 additions and 152 deletions

View File

@ -64,6 +64,36 @@ final class HomeAPI {
)
}
///
func locationReportList(
staffId: String,
page: Int,
pageSize: Int,
type: Int,
startDate: String?,
endDate: String?
) async throws -> LocationReportHistoryListResponse {
var queryItems = [
URLQueryItem(name: "staff_id", value: staffId),
URLQueryItem(name: "page", value: String(page)),
URLQueryItem(name: "page_size", value: String(pageSize)),
URLQueryItem(name: "type", value: String(type)),
]
if let startDate, !startDate.isEmpty {
queryItems.append(URLQueryItem(name: "start_date", value: startDate))
}
if let endDate, !endDate.isEmpty {
queryItems.append(URLQueryItem(name: "end_date", value: endDate))
}
return try await client.send(
APIRequest(
method: .get,
path: "/api/yf-handset-app/photog/loacation/list",
queryItems: queryItems
)
)
}
///
func roleApplyPending() async throws -> [RoleApplyPendingResponse] {
try await client.send(