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:
@@ -19,6 +19,9 @@ import { getGetInfoCache, saveGetInfoCache } from '@/utils/jobPortalAuth';
|
||||
import { getAccessToken } from '@/access';
|
||||
import { getUserInfo } from '@/services/session';
|
||||
import JobPortalHeader from '@/components/JobPortalHeader';
|
||||
import { getDictValueEnum } from '@/services/system/dict';
|
||||
import { getDictLabel } from '@/utils/jobPortalDict';
|
||||
import type { DictValueEnumObj } from '@/components/DictTag';
|
||||
import './index.less';
|
||||
|
||||
const { Title, Text } = Typography;
|
||||
@@ -128,6 +131,7 @@ const JobPortalPage: React.FC = () => {
|
||||
const [currentPage, setCurrentPage] = useState<number>(1);
|
||||
const [jobTitleData, setJobTitleData] = useState<any>(null);
|
||||
const [jobRecommendData, setJobRecommendData] = useState<any>(null);
|
||||
const [companyNatureEnum, setCompanyNatureEnum] = useState<DictValueEnumObj>({});
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
const [itemsPerPage] = useState<number>(6);
|
||||
const [totalPages, setTotalPages] = useState<number>(1);
|
||||
@@ -189,6 +193,9 @@ const JobPortalPage: React.FC = () => {
|
||||
|
||||
fetchJobTitleData();
|
||||
fetchJobRecommendData();
|
||||
getDictValueEnum('company_nature', false, true)
|
||||
.then(setCompanyNatureEnum)
|
||||
.catch(() => setCompanyNatureEnum({}));
|
||||
}, [itemsPerPage]);
|
||||
|
||||
const handleIndustryHover = (industryId: string) => {
|
||||
@@ -290,6 +297,11 @@ const JobPortalPage: React.FC = () => {
|
||||
</div>
|
||||
<div className="job-tags">
|
||||
{job.jobCategory && <Tag className="job-tag">{job.jobCategory}</Tag>}
|
||||
{(job.companyNature || job.company?.companyNature) && (
|
||||
<Tag className="job-tag">
|
||||
{getDictLabel(companyNatureEnum, job.companyNature || job.company?.companyNature)}
|
||||
</Tag>
|
||||
)}
|
||||
{job.vacancies && <Tag className="job-tag">招聘{job.vacancies}人</Tag>}
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user