forked from MapComplete/MapComplete
		
	Studio: Add message that overriden values cannot be changed
This commit is contained in:
		
							parent
							
								
									96143cb7bb
								
							
						
					
					
						commit
						4dd3e99ce2
					
				
					 2 changed files with 7 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -10519,6 +10519,7 @@
 | 
			
		|||
        "name": "Tourism accomodation",
 | 
			
		||||
        "presets": {
 | 
			
		||||
            "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"
 | 
			
		||||
            },
 | 
			
		||||
            "1": {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -33,6 +33,8 @@
 | 
			
		|||
    .getSchemaStartingWith(schema.path)
 | 
			
		||||
    .filter((part) => part.path.length - 1 === schema.path.length)
 | 
			
		||||
 | 
			
		||||
  let usesOverride = value["builtin"] !== undefined
 | 
			
		||||
 | 
			
		||||
  function schemaForMultitype() {
 | 
			
		||||
    const sch = { ...schema }
 | 
			
		||||
    sch.hints.typehint = undefined
 | 
			
		||||
| 
						 | 
				
			
			@ -147,7 +149,10 @@
 | 
			
		|||
    {/if}
 | 
			
		||||
  </div>
 | 
			
		||||
  <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}>
 | 
			
		||||
        <button
 | 
			
		||||
          on:click={() => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue