feat(工作报告、加班申请团队视角): 工作报告、加班申请现在可以查看团队视角了(查看下属)。
fix(工作报告): 修复周报在新增/编辑时,不能展示工作日志。
This commit is contained in:
@@ -34,6 +34,8 @@ type OvertimeApplicationApprovalRecordResponse = Omit<
|
||||
auditorUserId: StringIdResponse;
|
||||
};
|
||||
|
||||
type TeamOvertimeSummaryResponse = Api.OvertimeApplication.TeamOvertimeSummary;
|
||||
|
||||
function normalizeBooleanFlag(value: boolean | number | string | null | undefined) {
|
||||
if (typeof value === 'boolean') {
|
||||
return value;
|
||||
@@ -94,6 +96,18 @@ function createPageQuery(params: Api.OvertimeApplication.OvertimeApplicationSear
|
||||
query.append('pageNo', String(params.pageNo ?? 1));
|
||||
query.append('pageSize', String(params.pageSize ?? 10));
|
||||
|
||||
if (params.applicantIds !== null && params.applicantIds !== undefined) {
|
||||
if (params.applicantIds.length) {
|
||||
params.applicantIds.forEach(item => {
|
||||
if (item) {
|
||||
query.append('applicantIds', item);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
query.append('applicantIds', '');
|
||||
}
|
||||
}
|
||||
|
||||
if (params.keyword) {
|
||||
query.append('keyword', params.keyword);
|
||||
}
|
||||
@@ -287,6 +301,17 @@ export async function fetchGetOvertimeApplicationStatusDict() {
|
||||
);
|
||||
}
|
||||
|
||||
export async function fetchGetTeamOvertimeSummary(params: Api.OvertimeApplication.TeamOvertimeSummaryParams = {}) {
|
||||
const result = await request<TeamOvertimeSummaryResponse>({
|
||||
...safeJsonRequestConfig,
|
||||
url: `${OVERTIME_APPLICATION_PREFIX}/team/summary`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
|
||||
return mapServiceResult(result as ServiceRequestResult<TeamOvertimeSummaryResponse>, data => data);
|
||||
}
|
||||
|
||||
export function fetchExportOvertimeApplications(params: Api.OvertimeApplication.OvertimeApplicationSearchParams = {}) {
|
||||
const query = createPageQuery(params);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user