forked from MapComplete/MapComplete
		
	Add id to tagRenderingConfig
This commit is contained in:
		
							parent
							
								
									3780c5d380
								
							
						
					
					
						commit
						1d6102f6de
					
				
					 2 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
					@ -5,6 +5,13 @@ import {AndOrTagConfigJson} from "./TagConfigJson";
 | 
				
			||||||
 * If the desired tags are missing and a question is defined, a question will be shown instead.
 | 
					 * If the desired tags are missing and a question is defined, a question will be shown instead.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export interface TagRenderingConfigJson {
 | 
					export interface TagRenderingConfigJson {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * The id of the tagrendering, should be an unique string.
 | 
				
			||||||
 | 
					     * Used to keep the translations in sync
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    id?: string,
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Renders this value. Note that "{key}"-parts are substituted by the corresponding values of the element.
 | 
					     * Renders this value. Note that "{key}"-parts are substituted by the corresponding values of the element.
 | 
				
			||||||
     * If neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.
 | 
					     * If neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,6 +13,7 @@ import {Utils} from "../../Utils";
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export default class TagRenderingConfig {
 | 
					export default class TagRenderingConfig {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    readonly id?: string;
 | 
				
			||||||
    readonly render?: Translation;
 | 
					    readonly render?: Translation;
 | 
				
			||||||
    readonly question?: Translation;
 | 
					    readonly question?: Translation;
 | 
				
			||||||
    readonly condition?: TagsFilter;
 | 
					    readonly condition?: TagsFilter;
 | 
				
			||||||
| 
						 | 
					@ -56,6 +57,7 @@ export default class TagRenderingConfig {
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        this.id = json.id ?? "";
 | 
				
			||||||
        this.render = Translations.T(json.render, context + ".render");
 | 
					        this.render = Translations.T(json.render, context + ".render");
 | 
				
			||||||
        this.question = Translations.T(json.question, context + ".question");
 | 
					        this.question = Translations.T(json.question, context + ".question");
 | 
				
			||||||
        this.roaming = json.roaming ?? false;
 | 
					        this.roaming = json.roaming ?? false;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue