@@ -17,6 +17,7 @@ import GraphQLJSON from 'graphql-type-json';
1717import { cloneDeep , has , isArray , isEmpty , omit } from 'lodash' ;
1818import { Types } from 'mongoose' ;
1919import { StepType } from '../types' ;
20+ import { NavBarSettingsInputType } from '@schema/inputs/navBarSettings.input' ;
2021
2122/** Simple form permission change type */
2223type SimplePermissionChange =
@@ -38,6 +39,10 @@ type EditStepArgs = {
3839 id : string | Types . ObjectId ;
3940 name ?: string ;
4041 showName ?: boolean ;
42+ navBar ?: {
43+ showName ?: boolean ;
44+ showIcon ?: boolean ;
45+ } ;
4146 type ?: string ;
4247 content ?: string | Types . ObjectId ;
4348 permissions ?: any ;
@@ -55,6 +60,7 @@ export default {
5560 id : { type : new GraphQLNonNull ( GraphQLID ) } ,
5661 name : { type : GraphQLString } ,
5762 showName : { type : GraphQLBoolean } ,
63+ navBar : { type : NavBarSettingsInputType } ,
5864 icon : { type : GraphQLString } ,
5965 type : { type : GraphQLString } ,
6066 content : { type : GraphQLID } ,
@@ -105,10 +111,11 @@ export default {
105111 // Create update
106112 const update = {
107113 ...( args . name && { name : args . name } ) ,
108- ...( args . icon && { icon : args . icon } ) ,
114+ ...( has ( args , ' icon' ) && { icon : args . icon } ) ,
109115 ...( args . type && { type : args . type } ) ,
110116 ...( args . content && { content : args . content } ) ,
111117 ...( has ( args , 'showName' ) && { showName : args . showName } ) ,
118+ ...( args . navBar && { navBar : args . navBar } ) ,
112119 } as any ;
113120 // Update buttons
114121 if ( args . buttons ) {
0 commit comments