mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 21:41:57 +00:00
feat(FE-314-315): API Integration project budgets and refactoring UI
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user