feat: 岗位面试状态按时间降序排序
- 在transformInterviewStatus函数中添加interviewDate字段 - 实现按面试时间降序排序(最新的在前) - 确保面试状态板块显示的顺序更符合用户查看习惯 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,8 @@ import marketingCoursesData from './marketingCourses.json';
|
|||||||
// 转换函数:将JSON数据转换为页面所需格式
|
// 转换函数:将JSON数据转换为页面所需格式
|
||||||
// 转换面试状态数据
|
// 转换面试状态数据
|
||||||
const transformInterviewStatus = (statusData, jobsData) => {
|
const transformInterviewStatus = (statusData, jobsData) => {
|
||||||
return statusData.map((status, index) => {
|
return statusData
|
||||||
|
.map((status, index) => {
|
||||||
// 从岗位数据中查找匹配的岗位详情
|
// 从岗位数据中查找匹配的岗位详情
|
||||||
const matchedJob = jobsData.find(job =>
|
const matchedJob = jobsData.find(job =>
|
||||||
job["内推岗位名称"] === status["查询岗位名称"]
|
job["内推岗位名称"] === status["查询岗位名称"]
|
||||||
@@ -18,6 +19,7 @@ const transformInterviewStatus = (statusData, jobsData) => {
|
|||||||
// 解析日期
|
// 解析日期
|
||||||
const dateParts = status["阶段日期"].split('/');
|
const dateParts = status["阶段日期"].split('/');
|
||||||
const formattedDate = `${dateParts[0]}-${dateParts[1].padStart(2, '0')}-${dateParts[2].padStart(2, '0')}`;
|
const formattedDate = `${dateParts[0]}-${dateParts[1].padStart(2, '0')}-${dateParts[2].padStart(2, '0')}`;
|
||||||
|
const interviewDate = new Date(parseInt(dateParts[0]), parseInt(dateParts[1]) - 1, parseInt(dateParts[2]));
|
||||||
|
|
||||||
// 根据面试状态确定状态码和文本
|
// 根据面试状态确定状态码和文本
|
||||||
let statusCode = 'PENDING';
|
let statusCode = 'PENDING';
|
||||||
@@ -35,6 +37,7 @@ const transformInterviewStatus = (statusData, jobsData) => {
|
|||||||
id: index + 1,
|
id: index + 1,
|
||||||
position: status["查询岗位名称"],
|
position: status["查询岗位名称"],
|
||||||
interviewTime: formattedDate,
|
interviewTime: formattedDate,
|
||||||
|
interviewDate: interviewDate, // 用于排序
|
||||||
status: statusCode,
|
status: statusCode,
|
||||||
statusText: statusText,
|
statusText: statusText,
|
||||||
job: matchedJob ? {
|
job: matchedJob ? {
|
||||||
@@ -51,6 +54,10 @@ const transformInterviewStatus = (statusData, jobsData) => {
|
|||||||
companyInfo: ""
|
companyInfo: ""
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
})
|
||||||
|
.sort((a, b) => {
|
||||||
|
// 按面试时间降序排序(最新的在前)
|
||||||
|
return b.interviewDate - a.interviewDate;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
1
网页未导入数据/岗位面试状态/1-off_初筛未通过.json
Normal file
1
网页未导入数据/岗位面试状态/1-off_初筛未通过.json
Normal file
File diff suppressed because one or more lines are too long
1
网页未导入数据/岗位面试状态/1-on_hr评估中.json
Normal file
1
网页未导入数据/岗位面试状态/1-on_hr评估中.json
Normal file
File diff suppressed because one or more lines are too long
1
网页未导入数据/岗位面试状态/2-off_面试未通过.json
Normal file
1
网页未导入数据/岗位面试状态/2-off_面试未通过.json
Normal file
File diff suppressed because one or more lines are too long
1
网页未导入数据/岗位面试状态/2-on_到场面试.json
Normal file
1
网页未导入数据/岗位面试状态/2-on_到场面试.json
Normal file
File diff suppressed because one or more lines are too long
1
网页未导入数据/岗位面试状态/2-on_收到通知.json
Normal file
1
网页未导入数据/岗位面试状态/2-on_收到通知.json
Normal file
File diff suppressed because one or more lines are too long
1
网页未导入数据/岗位面试状态/2-wati_等待面试.json
Normal file
1
网页未导入数据/岗位面试状态/2-wati_等待面试.json
Normal file
File diff suppressed because one or more lines are too long
1
网页未导入数据/岗位面试状态/3-off_未参与面试.json
Normal file
1
网页未导入数据/岗位面试状态/3-off_未参与面试.json
Normal file
File diff suppressed because one or more lines are too long
1
网页未导入数据/岗位面试状态/3-wati_等待HR通知.json
Normal file
1
网页未导入数据/岗位面试状态/3-wati_等待HR通知.json
Normal file
File diff suppressed because one or more lines are too long
1
网页未导入数据/岗位面试状态/4-off_拒绝Offer.json
Normal file
1
网页未导入数据/岗位面试状态/4-off_拒绝Offer.json
Normal file
File diff suppressed because one or more lines are too long
1
网页未导入数据/岗位面试状态/4-on_收到Offer.json
Normal file
1
网页未导入数据/岗位面试状态/4-on_收到Offer.json
Normal file
File diff suppressed because one or more lines are too long
1
网页未导入数据/岗位面试状态/4-wati_等待回复.json
Normal file
1
网页未导入数据/岗位面试状态/4-wati_等待回复.json
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user