mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-13 00:03:27 +10:00
fix(client/skills): make skill level optional
This commit is contained in:
@ -29,7 +29,7 @@ const defaultState: FormData = {
|
|||||||
const schema = Joi.object<FormData>().keys({
|
const schema = Joi.object<FormData>().keys({
|
||||||
id: Joi.string(),
|
id: Joi.string(),
|
||||||
name: Joi.string().required(),
|
name: Joi.string().required(),
|
||||||
level: Joi.string().required(),
|
level: Joi.string().allow(''),
|
||||||
levelNum: Joi.number().min(0).max(10).required(),
|
levelNum: Joi.number().min(0).max(10).required(),
|
||||||
keywords: Joi.array().items(Joi.string().optional()),
|
keywords: Joi.array().items(Joi.string().optional()),
|
||||||
});
|
});
|
||||||
@ -109,7 +109,6 @@ const SkillModal: React.FC = () => {
|
|||||||
control={control}
|
control={control}
|
||||||
render={({ field, fieldState }) => (
|
render={({ field, fieldState }) => (
|
||||||
<TextField
|
<TextField
|
||||||
required
|
|
||||||
label={t('builder.common.form.level.label')}
|
label={t('builder.common.form.level.label')}
|
||||||
error={!!fieldState.error}
|
error={!!fieldState.error}
|
||||||
helperText={fieldState.error?.message}
|
helperText={fieldState.error?.message}
|
||||||
|
|||||||
@ -61,7 +61,7 @@ export type Publication = {
|
|||||||
export type Skill = {
|
export type Skill = {
|
||||||
id?: string;
|
id?: string;
|
||||||
name: string;
|
name: string;
|
||||||
level: string;
|
level?: string;
|
||||||
levelNum: number;
|
levelNum: number;
|
||||||
keywords?: string[];
|
keywords?: string[];
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user