feat(FE-314-315): API Integration project budgets and refactoring UI

This commit is contained in:
randy-ar
2025-12-03 21:09:12 +07:00
parent 31f758d680
commit f0ec758d7f
10 changed files with 544 additions and 572 deletions
@@ -141,6 +141,38 @@ export class ProjectFlockService extends BaseApiService<
}
}
/**
* Resubmit Project Flock
*/
async resubmit(
id: number,
payload: UpdateProjectFlockPayload
): Promise<BaseApiResponse<ProjectFlock> | undefined> {
try {
const updatePath = `${this.basePath}/${id}/resubmit`;
const headers = {
'Content-Type': 'application/json',
...(this.header ?? {}),
};
const updateRes = await httpClient<BaseApiResponse<ProjectFlock>>(
updatePath,
{
method: 'PUT',
body: payload,
headers,
}
);
return updateRes;
} catch (error: unknown) {
if (axios.isAxiosError<BaseApiResponse<ProjectFlock>>(error)) {
return error.response?.data;
}
return undefined;
}
}
/**
* Approve single Project Flock
*/