forked from MapComplete/MapComplete
		
	Studio: Add message that overriden values cannot be changed
This commit is contained in:
		
							parent
							
								
									175d69870f
								
							
						
					
					
						commit
						2f16e73572
					
				
					 2 changed files with 7 additions and 1 deletions
				
			
		| 
						 | 
					@ -10519,6 +10519,7 @@
 | 
				
			||||||
        "name": "Tourism accomodation",
 | 
					        "name": "Tourism accomodation",
 | 
				
			||||||
        "presets": {
 | 
					        "presets": {
 | 
				
			||||||
            "0": {
 | 
					            "0": {
 | 
				
			||||||
 | 
					                "description": "A  hotel is an establishment that provides paid lodging, usually on a short-term basis. Rooms are not shared with strangers.",
 | 
				
			||||||
                "title": "a hotel"
 | 
					                "title": "a hotel"
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            "1": {
 | 
					            "1": {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -33,6 +33,8 @@
 | 
				
			||||||
    .getSchemaStartingWith(schema.path)
 | 
					    .getSchemaStartingWith(schema.path)
 | 
				
			||||||
    .filter((part) => part.path.length - 1 === schema.path.length)
 | 
					    .filter((part) => part.path.length - 1 === schema.path.length)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  let usesOverride = value["builtin"] !== undefined
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  function schemaForMultitype() {
 | 
					  function schemaForMultitype() {
 | 
				
			||||||
    const sch = { ...schema }
 | 
					    const sch = { ...schema }
 | 
				
			||||||
    sch.hints.typehint = undefined
 | 
					    sch.hints.typehint = undefined
 | 
				
			||||||
| 
						 | 
					@ -147,7 +149,10 @@
 | 
				
			||||||
    {/if}
 | 
					    {/if}
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
  <div class="normal-background p-2 border border-gray-300">
 | 
					  <div class="normal-background p-2 border border-gray-300">
 | 
				
			||||||
    {#if isTagRenderingBlock}
 | 
					    {#if usesOverride}
 | 
				
			||||||
 | 
					      This block uses an builtin/override construction and cannot be edited in Studio.
 | 
				
			||||||
 | 
					      Edit the code directly
 | 
				
			||||||
 | 
					    {:else if isTagRenderingBlock}
 | 
				
			||||||
      <QuestionPreview {state} {path} {schema}>
 | 
					      <QuestionPreview {state} {path} {schema}>
 | 
				
			||||||
        <button
 | 
					        <button
 | 
				
			||||||
          on:click={() => {
 | 
					          on:click={() => {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue