Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:adjust value of options (#86) #87

Merged
merged 1 commit into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/Group/Form/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ export default function GroupForm({
placeholder="想找什麼類型的夥伴?"
/>
<Fields.Select
label="適合的教育階段"
label="適合的學習階段"
name="partnerEducationStep"
control={control}
value={values.partnerEducationStep}
error={errors.partnerEducationStep}
placeholder="活動適合什麼教育階段的夥伴?"
placeholder="活動適合什麼學習階段的夥伴?"
options={eduOptions}
multiple
required
Expand Down
4 changes: 2 additions & 2 deletions components/Group/Form/useGroupForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { BASE_URL } from '@/constants/common';
const _eduOptions = EDUCATION_STEP.filter(
(edu) => !['master', 'doctor', 'other'].includes(edu.value),
);
_eduOptions.push({ key: 'noLimit', value: 'noLimit', label: '不限' });
_eduOptions.push({ key: 'noLimit', value: 'noLimit', label: '終生學習' });

export const categoriesOptions = CATEGORIES;
export const areasOptions = AREAS.filter((area) => area.label !== '線上');
Expand Down Expand Up @@ -47,7 +47,7 @@ const rules = {
partnerStyle: z.string().max(50, '請勿輸入超過 50 字'),
partnerEducationStep: z
.array(z.enum(eduOptions.map(({ label }) => label)))
.min(1, '請選擇教育階段'),
.min(1, '請選擇的學習階段'),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
typo?

description: z
.string()
.min(1, '請輸入揪團描述')
Expand Down
2 changes: 1 addition & 1 deletion components/Group/SearchField/SelectedEducationStep.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function SelectedEducationStep() {
itemLabel="label"
itemValue="label"
renderValue={(selected) =>
selected.length === 0 ? '適合的教育階段' : selected.join('、')
selected.length === 0 ? '適合的學習階段' : selected.join('、')
}
sx={{
'@media (max-width: 767px)': {
Expand Down
82 changes: 41 additions & 41 deletions constants/member.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const GENDER = [
value: 'female',
},
{
label: '其他',
label: '保持神秘',
value: 'other',
},
];
Expand Down Expand Up @@ -46,46 +46,46 @@ export const ROLE = [
image: 'https://i.imgur.com/cXZXfBL.png',
},
{
label: '其他',
label: '終生學習',
key: 'other',
value: 'other',
image: 'https://i.imgur.com/Z7oGEnb.png',
},
];

export const EDUCATION_STEP = [
{
label: '學齡前',
key: 'preschool',
value: 'preschool',
},
{
label: '國小低年級',
key: 'elementary-junior',
value: 'elementary-junior',
},
{
label: '國小中年級',
key: 'elementary-middle',
value: 'elementary-middle',
},
{
label: '國小高年級',
key: 'elementary-senior',
value: 'elementary-senior',
},
{
label: '國中',
key: 'junior-high',
value: 'junior-high',
},
// {
// label: '學齡前',
// key: 'preschool',
// value: 'preschool',
// },
// {
// label: '國小低年級',
// key: 'elementary-junior',
// value: 'elementary-junior',
// },
// {
// label: '國小中年級',
// key: 'elementary-middle',
// value: 'elementary-middle',
// },
// {
// label: '國小高年級',
// key: 'elementary-senior',
// value: 'elementary-senior',
// },
// {
// label: '國中',
// key: 'junior-high',
// value: 'junior-high',
// },
{
label: '高中',
key: 'high',
value: 'high',
},
{
label: '大學',
label: '大學以上',
key: 'university',
value: 'university',
},
Expand All @@ -100,7 +100,7 @@ export const EDUCATION_STEP = [
value: 'doctor',
},
{
label: '其他',
label: '終生學習',
key: 'other',
value: 'other',
},
Expand All @@ -111,30 +111,30 @@ export const EDUCATION_STAGE = EDUCATION_STEP.filter(
);

export const WANT_TO_DO_WITH_PARTNER = [
{
label: '交朋友',
key: 'make-friends',
value: 'make-friends',
},
{
label: '學習交流',
key: 'interaction',
value: 'interaction',
},
{
label: '找老師',
key: 'find-teacher',
value: 'find-teacher',
label: '做專案/競賽',
key: 'do-project',
value: 'do-project',
},
{
label: '揪團組課',
label: '自組課程',
key: 'make-group-class',
value: 'make-group-class',
},
{
label: '做專案/競賽',
key: 'do-project',
value: 'do-project',
label: '找揪團',
key: 'find-group',
value: 'find-group',
},
{
label: '找老師',
key: 'find-teacher',
value: 'find-teacher',
},
{
label: '找學生',
Expand Down
Loading