Skip to content

Commit

Permalink
fix(client/skills): make skill level optional
Browse files Browse the repository at this point in the history
  • Loading branch information
AmruthPillai committed Mar 14, 2022
1 parent 4dc83c1 commit 02e396b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions client/modals/builder/sections/SkillModal.tsx
Expand Up @@ -29,7 +29,7 @@ const defaultState: FormData = {
const schema = Joi.object<FormData>().keys({
id: Joi.string(),
name: Joi.string().required(),
level: Joi.string().required(),
level: Joi.string().allow(''),
levelNum: Joi.number().min(0).max(10).required(),
keywords: Joi.array().items(Joi.string().optional()),
});
Expand Down Expand Up @@ -109,7 +109,6 @@ const SkillModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<TextField
required
label={t('builder.common.form.level.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
Expand Down
2 changes: 1 addition & 1 deletion schema/src/section.ts
Expand Up @@ -61,7 +61,7 @@ export type Publication = {
export type Skill = {
id?: string;
name: string;
level: string;
level?: string;
levelNum: number;
keywords?: string[];
};
Expand Down

0 comments on commit 02e396b

Please sign in to comment.