@@ -271,8 +271,7 @@ export const projectFormSchema: ProjectFormSchema = {
271271 validations : [ getNoMoreThanNCharacterCondition ( XL_TEXT_MAX_LENGTH ) ] ,
272272 } ,
273273 tutorialId : {
274- // TODO(tnagorra): we need to make this required later
275- // required: true,
274+ required : true ,
276275 } ,
277276 projectImage : {
278277 required : true ,
@@ -342,31 +341,6 @@ export const projectFormSchema: ProjectFormSchema = {
342341 } ,
343342 ) ;
344343
345- baseSchema = addCondition (
346- baseSchema ,
347- value ,
348- [ 'projectType' ] ,
349- [ 'tileServer' ] ,
350- ( v ) => {
351- const projectType = v ?. projectType ;
352- if (
353- projectType === PROJECT_TYPE_BUILD_AREA
354- || projectType === PROJECT_TYPE_COMPLETENESS
355- || projectType === PROJECT_TYPE_CHANGE_DETECTION
356- || projectType === PROJECT_TYPE_FOOTPRINT
357- ) {
358- return {
359- tileServer : {
360- fields : tileServerFieldsSchema ,
361- } ,
362- } ;
363- }
364- return {
365- tileServer : { forceValue : nullValue } ,
366- } ;
367- } ,
368- ) ;
369-
370344 baseSchema = addCondition (
371345 baseSchema ,
372346 value ,
@@ -476,6 +450,31 @@ export const projectFormSchema: ProjectFormSchema = {
476450 } ,
477451 ) ;
478452
453+ baseSchema = addCondition (
454+ baseSchema ,
455+ value ,
456+ [ 'projectType' ] ,
457+ [ 'tileServer' ] ,
458+ ( v ) => {
459+ const projectType = v ?. projectType ;
460+ if (
461+ projectType === PROJECT_TYPE_BUILD_AREA
462+ || projectType === PROJECT_TYPE_COMPLETENESS
463+ || projectType === PROJECT_TYPE_CHANGE_DETECTION
464+ || projectType === PROJECT_TYPE_FOOTPRINT
465+ ) {
466+ return {
467+ tileServer : {
468+ fields : tileServerFieldsSchema ,
469+ } ,
470+ } ;
471+ }
472+ return {
473+ tileServer : { forceValue : nullValue } ,
474+ } ;
475+ } ,
476+ ) ;
477+
479478 // Validate
480479
481480 baseSchema = addCondition (
0 commit comments