base commit

This commit is contained in:
@kirill.komarov
2026-05-10 14:28:35 +05:00
parent 1e376caecc
commit 5ddde15fd3
102 changed files with 332 additions and 7657 deletions
@@ -46,6 +46,7 @@ export type AdminOrderDetailResponse = {
id: string
authorType: string
text: string
attachmentUrl?: string | null
createdAt: string
}>
}
+12 -2
View File
@@ -39,6 +39,7 @@ export type OrderDetailResponse = {
id: string
authorType: string
text: string
attachmentUrl?: string | null
createdAt: string
}>
}
@@ -68,8 +69,17 @@ export async function postOrderMessage(id: string, text: string): Promise<void>
await apiClient.post(`me/orders/${id}/messages`, { text })
}
export async function payOrderStub(id: string): Promise<{ ok: boolean; status: string }> {
const { data } = await apiClient.post<{ ok: boolean; status: string }>(`me/orders/${id}/pay`)
/** Подтверждение оплаты переводом: multipart detail + необязательный файл receipt (хотя бы одно нужно на сервере). */
export async function submitOrderPayment(
orderId: string,
payload: { detail: string; receiptFile: File | null },
): Promise<{ ok: boolean; status: string }> {
const formData = new FormData()
formData.append('detail', payload.detail)
if (payload.receiptFile) {
formData.append('receipt', payload.receiptFile)
}
const { data } = await apiClient.post<{ ok: boolean; status: string }>(`me/orders/${orderId}/pay`, formData)
return data
}