Enforced approval rights
This commit is contained in:
@@ -37,6 +37,7 @@ import {
|
||||
UpdateMilestoneRequest,
|
||||
Award,
|
||||
CreateAwardRequest,
|
||||
UpdateAwardRequest,
|
||||
Contract,
|
||||
ContractStatus,
|
||||
CreateContractRequest,
|
||||
@@ -869,6 +870,20 @@ export const createAward = async (payload: CreateAwardRequest): Promise<Award> =
|
||||
return res.data;
|
||||
};
|
||||
|
||||
export const updateAward = async (payload: UpdateAwardRequest): Promise<void> => {
|
||||
const numericAwardId = toIntegerId(payload.awardId);
|
||||
const numericOrgId = toIntegerId(payload.organisationId);
|
||||
const numericProgId = toIntegerId(payload.programmeId);
|
||||
|
||||
await apiClient.put('/v1/api/grants/awards', {
|
||||
awardId: numericAwardId,
|
||||
organisationId: numericOrgId,
|
||||
programmeId: numericProgId,
|
||||
amount: Number(payload.amount),
|
||||
...(payload.status !== undefined ? { status: Number(payload.status) } : {}),
|
||||
});
|
||||
};
|
||||
|
||||
export const fetchHashId = async (id64: number | string): Promise<string> => {
|
||||
try {
|
||||
const res = await apiClient.get<string>(`/v1/api/tools/hashid/${id64}`);
|
||||
|
||||
Reference in New Issue
Block a user