R60 A1-A6:首页工作台优化
这个提交包含在:
@@ -1,5 +1,36 @@
|
||||
import { apiRequestData } from "./http";
|
||||
|
||||
export type PortalRecentActivity = {
|
||||
id: string;
|
||||
type:
|
||||
| "reimbursement.submit"
|
||||
| "reimbursement.approve"
|
||||
| "reimbursement.reject"
|
||||
| "leave.submit"
|
||||
| "leave.approve"
|
||||
| "leave.reject"
|
||||
| "attendance.clock_in"
|
||||
| "attendance.clock_out"
|
||||
| "attendance.supplement"
|
||||
| "asset.assign"
|
||||
| "asset.return";
|
||||
actorName: string;
|
||||
summary: string;
|
||||
createdAt: string;
|
||||
href: string;
|
||||
};
|
||||
|
||||
export type PortalTeamStatusItem = {
|
||||
employeeId: string;
|
||||
name: string;
|
||||
avatarUrl: string | null;
|
||||
presenceStatus: string | null;
|
||||
attendanceClockIn: string | null;
|
||||
attendanceClockOut: string | null;
|
||||
onLeave: boolean;
|
||||
leaveType: string | null;
|
||||
};
|
||||
|
||||
export type PortalHomePayload = {
|
||||
workspace: {
|
||||
id: string | null;
|
||||
@@ -55,8 +86,14 @@ export type PortalHomePayload = {
|
||||
hints: string[];
|
||||
}
|
||||
| null;
|
||||
recentActivities: PortalRecentActivity[];
|
||||
teamStatusBoard: PortalTeamStatusItem[];
|
||||
};
|
||||
|
||||
export async function fetchPortalHome() {
|
||||
return apiRequestData<PortalHomePayload>("/api/portal/home");
|
||||
}
|
||||
|
||||
export async function fetchPortalTeamStatus() {
|
||||
return apiRequestData<PortalTeamStatusItem[]>("/api/portal/team-status");
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户