feat(aihr): complete company message R1-R3
This commit is contained in:
@@ -23,6 +23,17 @@ export interface BroadcastMessageSummary {
|
||||
|
||||
export interface BroadcastMessage extends BroadcastMessageSummary {
|
||||
content: string;
|
||||
attachment?: BroadcastAttachment;
|
||||
}
|
||||
|
||||
export interface BroadcastAttachment {
|
||||
id: number;
|
||||
fileName: string;
|
||||
fileSize: number;
|
||||
contentType: string;
|
||||
status: 'READY';
|
||||
summary?: string;
|
||||
downloadUrl: string;
|
||||
}
|
||||
|
||||
export interface BroadcastMessagePage {
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
import { apiRequest } from './api';
|
||||
|
||||
export type DirectChannelCode = 'PRESIDENT' | 'FINANCE' | 'HR' | 'AUDIT' | 'OPERATIONS';
|
||||
export type DirectFeedbackStatus = 'SUBMITTED' | 'REPLIED';
|
||||
|
||||
export interface DirectChannel {
|
||||
code: DirectChannelCode;
|
||||
name: string;
|
||||
defaultAnonymous: boolean;
|
||||
}
|
||||
|
||||
export interface DirectFeedback {
|
||||
id: number;
|
||||
channelCode: DirectChannelCode;
|
||||
channelName: string;
|
||||
anonymous: boolean;
|
||||
content: string;
|
||||
status: DirectFeedbackStatus;
|
||||
replyContent?: string;
|
||||
repliedAt?: string;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface DirectFeedbackPage {
|
||||
total: number;
|
||||
pageNum: number;
|
||||
pageSize: number;
|
||||
rows: DirectFeedback[];
|
||||
}
|
||||
|
||||
export const listDirectChannels = () =>
|
||||
apiRequest<DirectChannel[]>({
|
||||
url: '/api/aihr/direct/channels',
|
||||
method: 'GET',
|
||||
timeout: 15000
|
||||
});
|
||||
|
||||
export const submitDirectFeedback = (data: {
|
||||
requestId: string;
|
||||
channelCode: DirectChannelCode;
|
||||
anonymous: boolean;
|
||||
content: string;
|
||||
}) =>
|
||||
apiRequest<DirectFeedback>({
|
||||
url: '/api/aihr/direct/feedback',
|
||||
method: 'POST',
|
||||
data,
|
||||
timeout: 15000
|
||||
});
|
||||
|
||||
export const listMyDirectFeedback = (pageNum = 1, pageSize = 20) =>
|
||||
apiRequest<DirectFeedbackPage>({
|
||||
url: `/api/aihr/direct/mine?pageNum=${pageNum}&pageSize=${pageSize}`,
|
||||
method: 'GET',
|
||||
timeout: 15000
|
||||
});
|
||||
Reference in New Issue
Block a user