feat: 代招代发
This commit is contained in:
@ -1,6 +1,10 @@
|
||||
import { Image } from '@tarojs/components';
|
||||
|
||||
import { Arrow } from '@taroify/icons';
|
||||
import classNames from 'classnames';
|
||||
import React, { useCallback } from 'react';
|
||||
|
||||
import { cityValues } from '@/components/user-batch-publish';
|
||||
import { PageUrl } from '@/constants/app';
|
||||
import { JOB_MANAGE_STATUS_TITLE_MAP, JobManageStatus } from '@/constants/job';
|
||||
import { JobManageInfo } from '@/types/job';
|
||||
@ -25,6 +29,29 @@ const STATUS_CLASS_MAP = {
|
||||
[JobManageStatus.Expire]: 'close',
|
||||
};
|
||||
|
||||
function GoBatchTag({ cityCode, jobId }: { cityCode: string; jobId: JobManageInfo['id'] }) {
|
||||
const handleClick = useCallback(
|
||||
e => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
navigateTo(PageUrl.GroupDelegatePublish, { cityCode, jobId });
|
||||
},
|
||||
[cityCode, jobId]
|
||||
);
|
||||
if (!cityValues.find(c => c.cityCode === cityCode)) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<div onClick={handleClick} className={`${PREFIX}__buy-tag-wrapper`}>
|
||||
<div className={`${PREFIX}__buy-tag`}>
|
||||
<Image className={`${PREFIX}__buy-tag-icon`} src="https://publiccdn.neighbourhood.com.cn/img/lightning.svg" />
|
||||
<div>加速招聘</div>
|
||||
<Arrow size={12} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function JobManageCard(props: IProps) {
|
||||
const { data = {} } = props;
|
||||
const { id, title, status } = data as JobManageInfo;
|
||||
@ -41,6 +68,7 @@ function JobManageCard(props: IProps) {
|
||||
</div>
|
||||
<div className={classNames(`${PREFIX}__status`, { [STATUS_CLASS_MAP[status]]: true })}>
|
||||
<div>{JOB_MANAGE_STATUS_TITLE_MAP[status]}</div>
|
||||
<GoBatchTag cityCode={props.data.cityCode} jobId={props.data.id} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user