feat: Enhance Outdoor Fair and Public Job Fair features
- Added QR code functionality for companies signing up for outdoor fairs. - Implemented job management for outdoor fairs, including job listing and editing. - Updated Public Job Fair detail view to reflect new data structure. - Refactored EditModal to support dynamic lists for host, co-organizer, and organizing units. - Introduced cross-domain city selection for job fairs. - Enhanced API services for managing cross-domain jobs and cities. - Improved data handling for outdoor fair items, including review status and QR code content. - Updated type definitions to accommodate new fields and structures.
This commit is contained in:
@@ -10,7 +10,11 @@ import {
|
||||
import { Button, Form, Input, message } from 'antd';
|
||||
import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons';
|
||||
import type { DictValueEnumObj } from '@/components/DictTag';
|
||||
import { addJobForCompany, updateJobForCompany } from '@/services/jobportal/outdoorFairDetail';
|
||||
import {
|
||||
addCurrentCompanyJob,
|
||||
addJobForCompany,
|
||||
updateJobForCompany,
|
||||
} from '@/services/jobportal/outdoorFairDetail';
|
||||
|
||||
interface Props {
|
||||
open: boolean;
|
||||
@@ -21,6 +25,7 @@ interface Props {
|
||||
experienceEnum: DictValueEnumObj;
|
||||
areaEnum: DictValueEnumObj;
|
||||
jobTypeEnum: DictValueEnumObj;
|
||||
companyScoped?: boolean;
|
||||
onCancel: () => void;
|
||||
onSuccess: () => void;
|
||||
}
|
||||
@@ -34,6 +39,7 @@ const JobEditModal: React.FC<Props> = ({
|
||||
experienceEnum,
|
||||
areaEnum,
|
||||
jobTypeEnum,
|
||||
companyScoped,
|
||||
onCancel,
|
||||
onSuccess,
|
||||
}) => {
|
||||
@@ -82,7 +88,9 @@ const JobEditModal: React.FC<Props> = ({
|
||||
};
|
||||
const res = job
|
||||
? await updateJobForCompany(fairId, { ...job, ...payload })
|
||||
: await addJobForCompany({ fairId, companyId: company!.companyId, ...payload });
|
||||
: companyScoped
|
||||
? await addCurrentCompanyJob({ fairId, ...payload })
|
||||
: await addJobForCompany({ fairId, companyId: company!.companyId, ...payload });
|
||||
if (res.code === 200) {
|
||||
message.success(job ? '岗位修改成功' : '岗位添加成功');
|
||||
onSuccess();
|
||||
@@ -163,7 +171,13 @@ const JobEditModal: React.FC<Props> = ({
|
||||
{fields.map(({ key, name, ...restField }) => (
|
||||
<div
|
||||
key={key}
|
||||
style={{ display: 'flex', width: '100%', marginBottom: 8, alignItems: 'center', gap: 8 }}
|
||||
style={{
|
||||
display: 'flex',
|
||||
width: '100%',
|
||||
marginBottom: 8,
|
||||
alignItems: 'center',
|
||||
gap: 8,
|
||||
}}
|
||||
>
|
||||
<Form.Item
|
||||
{...restField}
|
||||
@@ -195,7 +209,12 @@ const JobEditModal: React.FC<Props> = ({
|
||||
>
|
||||
<Input placeholder="请输入职务" />
|
||||
</Form.Item>
|
||||
<Button type="text" danger icon={<MinusCircleOutlined />} onClick={() => remove(name)} />
|
||||
<Button
|
||||
type="text"
|
||||
danger
|
||||
icon={<MinusCircleOutlined />}
|
||||
onClick={() => remove(name)}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
<Form.Item>
|
||||
|
||||
Reference in New Issue
Block a user