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

feat: 移除面試整體評分 #1461

Merged
merged 2 commits into from
Dec 20, 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
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
DATA_KEY_DATE,
DATA_KEY_REGION,
DATA_KEY_RESULT,
DATA_KEY_RATING,
DATA_KEY_COURSE,
DATA_KEY_SUGGESTIONS,
DATA_KEY_JOB_TENURE,
Expand All @@ -34,7 +33,6 @@ import {
createInterviewDateQuestion,
createInterviewRegionQuestion,
createInterviewResultQuestion,
createInterviewRatingQuestion,
createInterviewCourseQuestion,
createInterviewSuggestionsQuestion,
createJobTenureQuestion,
Expand Down Expand Up @@ -65,7 +63,6 @@ const questions = [
createInterviewDateQuestion(),
createInterviewRegionQuestion(),
createInterviewResultQuestion(),
createInterviewRatingQuestion(),
createInterviewCourseQuestion(),
createInterviewSuggestionsQuestion(),
createJobTenureQuestion(),
Expand Down Expand Up @@ -130,7 +127,7 @@ const bodyFromDraft = evolve({
amount: parseSalaryAmount(amount),
};
},
overall_rating: draft => draft[DATA_KEY_RATING],
overall_rating: draft => 5,
});

const TypeForm = ({ open, onClose }) => {
Expand Down
1 change: 0 additions & 1 deletion src/components/ShareExperience/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export const DATA_KEY_GENDER = 'gender';
export const DATA_KEY_DATE = 'interviewTime';
export const DATA_KEY_REGION = 'region';
export const DATA_KEY_RESULT = 'interviewResult';
export const DATA_KEY_RATING = 'overallRating';
export const DATA_KEY_COURSE = 'interviewContent';
export const DATA_KEY_SUGGESTIONS = 'suggestions';
export const DATA_KEY_JOB_TENURE = 'experienceInYear';
Expand Down
11 changes: 0 additions & 11 deletions src/components/ShareExperience/questionCreators.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
DATA_KEY_DATE,
DATA_KEY_REGION,
DATA_KEY_RESULT,
DATA_KEY_RATING,
DATA_KEY_COURSE,
DATA_KEY_SUGGESTIONS,
DATA_KEY_JOB_TENURE,
Expand Down Expand Up @@ -232,16 +231,6 @@ export const createInterviewResultQuestion = () => ({
placeholder: '輸入面試結果',
});

export const createInterviewRatingQuestion = () => ({
title: '為這次的面試經驗評個分吧!',
type: QUESTION_TYPE.RATING,
dataKey: DATA_KEY_RATING,
defaultValue: 0,
required: true,
validateOrWarn: value => equals(0, value) && '需選取面試滿意程度',
ratingLabels: RATING_LABELS,
});

export const createInterviewCourseQuestion = () => ({
title: '面試過程',
type: QUESTION_TYPE.TEXTAREA,
Expand Down
4 changes: 4 additions & 0 deletions src/components/common/FormBuilder/QuestionBuilder/TextArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ const Textarea = ({
defaultValue,
value,
onChange,
onConfirm,
footnote,
warning,
setShowsNavigation,
...props
}) => (
<div className={className}>
Expand Down Expand Up @@ -58,8 +60,10 @@ Textarea.propTypes = {
PropTypes.func,
]),
onChange: PropTypes.func.isRequired,
onConfirm: PropTypes.func.isRequired,
page: PropTypes.number.isRequired,
required: PropTypes.bool,
setShowsNavigation: PropTypes.func.isRequired,
title: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).isRequired,
value: PropTypes.string.isRequired,
warning: PropTypes.string,
Expand Down
Loading