feat: Enhance Company and Job Portal functionality

- Added company nature selection to ManagementList and JobDetailPage.
- Implemented detailed tags for job benefits and schedules in JobDetailPage and JobListPage.
- Introduced CompanyInfoPage for managing company details, including nature, scale, and contacts.
- Enhanced ManagementList to support salary composition, welfare benefits, and work schedule fields.
- Created utility functions for parsing and serializing comma-separated tags.
- Updated API services to fetch and update current company information.
- Added tests for new utility functions to ensure correct parsing and serialization of tags.
This commit is contained in:
2026-07-20 11:53:43 +08:00
parent 4d48d33476
commit ed0ac7c4c2
17 changed files with 681 additions and 47 deletions

View File

@@ -0,0 +1,21 @@
import { parseCommaSeparatedTags, serializeCommaSeparatedTags } from '@/utils/jobDetailTags';
describe('job detail tag helpers', () => {
it('parses English and Chinese commas, trims values, and removes duplicates', () => {
expect(parseCommaSeparatedTags('基本工资, 绩效工资,奖金,基本工资')).toEqual([
'基本工资',
'绩效工资',
'奖金',
]);
});
it('keeps dictionary selections and manual entries in one comma-separated value', () => {
expect(serializeCommaSeparatedTags(['五险一金', '带薪年假', '生日福利'])).toBe(
'五险一金,带薪年假,生日福利',
);
});
it('serializes a cleared selector as an empty string so an existing value can be removed', () => {
expect(serializeCommaSeparatedTags([])).toBe('');
});
});