mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
feat: add getApprovalLineHistory method
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
|||||||
} from '@/types/api/production/project-flock';
|
} from '@/types/api/production/project-flock';
|
||||||
import { BaseApiService } from '@/services/api/base';
|
import { BaseApiService } from '@/services/api/base';
|
||||||
import {
|
import {
|
||||||
|
Approvals,
|
||||||
BaseApiResponse,
|
BaseApiResponse,
|
||||||
BaseGroupedApproval,
|
BaseGroupedApproval,
|
||||||
ErrorApiResponse,
|
ErrorApiResponse,
|
||||||
@@ -53,6 +54,33 @@ export class ProjectFlockService extends BaseApiService<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async getApprovalLineHistory(
|
||||||
|
id: number,
|
||||||
|
page: number = 1,
|
||||||
|
limit: number = 100
|
||||||
|
) {
|
||||||
|
try {
|
||||||
|
const approvalHistoryRes = await httpClient<Approvals>('/approvals', {
|
||||||
|
query: {
|
||||||
|
module_name: 'PROJECT_FLOCKS',
|
||||||
|
module_id: id,
|
||||||
|
group_step_number: 'false',
|
||||||
|
page,
|
||||||
|
limit,
|
||||||
|
order_by_date: 'ASC',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
return approvalHistoryRes;
|
||||||
|
} catch (error) {
|
||||||
|
if (axios.isAxiosError<Approvals>(error)) {
|
||||||
|
return error.response?.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lookup for Project Flock Kandang
|
* Lookup for Project Flock Kandang
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user