File tree Expand file tree Collapse file tree 5 files changed +35
-23
lines changed
Expand file tree Collapse file tree 5 files changed +35
-23
lines changed Original file line number Diff line number Diff line change 1+ import {
2+ ProjectType ,
3+ PROJECT_TYPE_BUILD_AREA ,
4+ PROJECT_TYPE_FOOTPRINT ,
5+ PROJECT_TYPE_CHANGE_DETECTION ,
6+ PROJECT_TYPE_COMPLETENESS ,
7+ } from '#utils/common' ;
8+
9+ const PROJECT_CONFIG_NAME = process . env . REACT_APP_PROJECT_CONFIG_NAME as string ;
10+
11+ const mapswipeProjectTypeOptions : {
12+ value : ProjectType ;
13+ label : string ;
14+ } [ ] = [
15+ { value : PROJECT_TYPE_BUILD_AREA , label : 'Build Area' } ,
16+ { value : PROJECT_TYPE_FOOTPRINT , label : 'Footprint' } ,
17+ { value : PROJECT_TYPE_CHANGE_DETECTION , label : 'Change Detection' } ,
18+ { value : PROJECT_TYPE_COMPLETENESS , label : 'Completeness' } ,
19+ ] ;
20+
21+ const crowdmapProjectTypeOptions : {
22+ value : ProjectType ;
23+ label : string ;
24+ } [ ] = [
25+ { value : PROJECT_TYPE_BUILD_AREA , label : 'Build Area' } ,
26+ { value : PROJECT_TYPE_COMPLETENESS , label : 'Completeness' } ,
27+ ] ;
28+
29+ const projectTypeOptions = PROJECT_CONFIG_NAME === 'crowdmap' ? crowdmapProjectTypeOptions : mapswipeProjectTypeOptions ;
30+
31+ export default projectTypeOptions ;
Original file line number Diff line number Diff line change @@ -62,7 +62,6 @@ import {
6262 projectFormSchema ,
6363 ProjectFormType ,
6464 PartialProjectFormType ,
65- projectTypeOptions ,
6665 projectInputTypeOptions ,
6766 filterOptions ,
6867 PROJECT_INPUT_TYPE_UPLOAD ,
@@ -78,6 +77,8 @@ import {
7877import useProjectOptions from './useProjectOptions' ;
7978import styles from './styles.css' ;
8079
80+ import projectTypeOptions from '#base/configs/projectTypes' ;
81+
8182const defaultProjectFormValue : PartialProjectFormType = {
8283 projectType : PROJECT_TYPE_BUILD_AREA ,
8384 projectNumber : 1 ,
Original file line number Diff line number Diff line change @@ -58,16 +58,6 @@ export interface ProjectFormType {
5858 tileServerB ?: TileServer ;
5959}
6060
61- export const projectTypeOptions : {
62- value : ProjectType ;
63- label : string ;
64- } [ ] = [
65- { value : PROJECT_TYPE_BUILD_AREA , label : 'Build Area' } ,
66- { value : PROJECT_TYPE_FOOTPRINT , label : 'Footprint' } ,
67- { value : PROJECT_TYPE_CHANGE_DETECTION , label : 'Change Detection' } ,
68- { value : PROJECT_TYPE_COMPLETENESS , label : 'Completeness' } ,
69- ] ;
70-
7161export const PROJECT_INPUT_TYPE_UPLOAD = 'aoi_file' ;
7262export const PROJECT_INPUT_TYPE_LINK = 'link' ;
7363export const PROJECT_INPUT_TYPE_TASKING_MANAGER_ID = 'TMId' ;
Original file line number Diff line number Diff line change @@ -55,10 +55,11 @@ import {
5555 tutorialFormSchema ,
5656 TutorialFormType ,
5757 PartialTutorialFormType ,
58- projectTypeOptions ,
5958} from './utils' ;
6059import styles from './styles.css' ;
6160
61+ import projectTypeOptions from '#base/configs/projectTypes' ;
62+
6263const defaultTutorialFormValue : PartialTutorialFormType = {
6364 projectType : PROJECT_TYPE_BUILD_AREA ,
6465 zoomLevel : 18 ,
Original file line number Diff line number Diff line change @@ -17,21 +17,10 @@ import {
1717 getNoMoreThanNCharacterCondition ,
1818 ProjectType ,
1919 PROJECT_TYPE_BUILD_AREA ,
20- PROJECT_TYPE_FOOTPRINT ,
2120 PROJECT_TYPE_CHANGE_DETECTION ,
2221 PROJECT_TYPE_COMPLETENESS ,
2322} from '#utils/common' ;
2423
25- export const projectTypeOptions : {
26- value : ProjectType ;
27- label : string ;
28- } [ ] = [
29- { value : PROJECT_TYPE_BUILD_AREA , label : 'Build Area' } ,
30- { value : PROJECT_TYPE_FOOTPRINT , label : 'Footprint' } ,
31- { value : PROJECT_TYPE_CHANGE_DETECTION , label : 'Change Detection' } ,
32- { value : PROJECT_TYPE_COMPLETENESS , label : 'Completeness' } ,
33- ] ;
34-
3524// FIXME: include here
3625export interface TutorialFormType {
3726 lookFor : string ;
You can’t perform that action at this time.
0 commit comments