File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
src/apps/admin/src/skills-manager/components/skill-modal Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ const SkillModal: FC<SkillModalProps> = props => {
6868
6969 const formValue = useMemo ( ( ) => ( {
7070 ...( props . skill as any ) ,
71- categoryId : props . skill . category . id ,
71+ categoryId : props . skill . category ? .id ,
7272 } as FormValue ) , [ props . skill ] )
7373
7474 function renderForm ( ) : ReactNode {
Original file line number Diff line number Diff line change @@ -21,20 +21,21 @@ export const skillFormDef = (
2121 buttons : {
2222 primaryGroup : [
2323 {
24- buttonStyle : 'secondary' ,
24+ buttonLight : true ,
25+ buttonStyle : 'primary' ,
2526 isSubmit : false ,
2627 label : 'Cancel' ,
2728 onClick : onCancelClick ,
2829 size : 'lg' ,
2930 type : 'button' ,
3031 } ,
31- {
32+ ... ( action === 'add' ? [ {
3233 buttonStyle : 'secondary' ,
3334 isSubmit : true ,
3435 label : 'Save and add another' ,
3536 size : 'lg' ,
3637 type : 'submit' ,
37- } ,
38+ } ] : [ ] ) ,
3839 {
3940 buttonStyle : 'primary' ,
4041 isSubmit : true ,
@@ -80,6 +81,7 @@ export const skillFormDef = (
8081 ] ,
8182 } ,
8283 {
84+ creatable : true ,
8385 label : 'Skill Category' ,
8486 name : SkillFormField . category ,
8587 options : mapCategoryToSelectOption ( categories ?? [ ] ) ,
You can’t perform that action at this time.
0 commit comments