feat: 员工端新增个人资料页面,数据同步到花名册
- 后端新增 GET/PUT /portal/profile 接口,员工可查看和编辑个人资料 - 员工可编辑:紧急联系人、住址、银行卡、学历、参保城市 - 只读字段:姓名、性别、手机号、证件号码、部门、岗位、入职日期 - 数据直接写入 Employee 表(花名册),HR 管理端可见 - 更新操作记录证据链(PROFILE_UPDATE) - 前端新增 MyProfile.tsx 页面,PortalNav 添加导航入口
This commit is contained in:
@@ -1129,6 +1129,7 @@ portalAxios.interceptors.response.use(
|
||||
)
|
||||
const portalGet = ((url: string, config?: any) => portalAxios.get(url, config)) as any
|
||||
const portalPost = ((url: string, data?: any, config?: any) => portalAxios.post(url, data, config)) as any
|
||||
const portalPut = ((url: string, data?: any, config?: any) => portalAxios.put(url, data, config)) as any
|
||||
|
||||
export const portalApi = {
|
||||
/** 登录 */
|
||||
@@ -1191,6 +1192,12 @@ export const portalApi = {
|
||||
/** 入职进度 */
|
||||
onboardingProgress: () =>
|
||||
portalGet('/onboarding/progress').then(unwrap<any>()),
|
||||
/** 获取个人资料 */
|
||||
getProfile: () =>
|
||||
portalGet('/profile').then(unwrap<any>()),
|
||||
/** 更新个人资料 */
|
||||
updateProfile: (data: Record<string, unknown>) =>
|
||||
portalPut('/profile', data).then(unwrap<any>()),
|
||||
/** 制度列表 */
|
||||
policies: () =>
|
||||
portalGet('/policies').then(unwrap<any[]>()),
|
||||
|
||||
Reference in New Issue
Block a user