How to use the named-urls.reverse function in named-urls

To help you get started, we’ve selected a few named-urls examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CLOSER-Cohorts / archivist / react / src / pages / AdminDatasetImportMappings.js View on Github external
const actions = (row) => {
      return (
          
            <button>
                  
                    View logs
                  
            </button>
          
      )
    }
github CLOSER-Cohorts / archivist / react / src / pages / InstrumentBuildResponseDomains.js View on Github external
const handleResponseDomainSelection = (type, id) => {
    const path = url(routes.instruments.instrument.build.responseDomains.show, { instrument_id: instrumentId, responseDomainType: type, responseDomainId: id })
    history.push(path);
  }
github CLOSER-Cohorts / archivist / react / src / pages / InstrumentBuildQuestionGrids.js View on Github external
const handleQuestionSelection = (id) => {
    const path = url(routes.instruments.instrument.build.questionGrids.show, { instrument_id: instrumentId, questionGridId: id })
    history.push(path);
    setquestionGridId(id)
  }
github CLOSER-Cohorts / archivist / react / src / pages / AdminInstruments.js View on Github external
const actions = (row) =&gt; {
    return (
      &lt;&gt;
        
          <button>
            Edit
          </button>
          <button>
            
              Import Mappings
            
          </button>
          <button>
            
              View Imports
            
          </button>
          <button>
            Clear Cache
          </button>
          <button>
            Delete</button>
github CLOSER-Cohorts / archivist / react / src / components / CreateNewBuildObjectButtons.js View on Github external
const ObjectTypeLookup = (objectType, instrumentId) => {
    switch(objectType) {
      case('ResponseDomainNumeric'):
        return {
          path: url(routes.instruments.instrument.build.responseDomains.show, { instrument_id: instrumentId, responseDomainType: objectType, responseDomainId: 'new' }),
          text: 'Numeric'
        }
      case('ResponseDomainText'):
        return {
          path: url(routes.instruments.instrument.build.responseDomains.show, { instrument_id: instrumentId, responseDomainType: objectType, responseDomainId: 'new' }),
          text: 'Text'
        }
      case('ResponseDomainDatetime'):
        return {
          path: url(routes.instruments.instrument.build.responseDomains.show, { instrument_id: instrumentId, responseDomainType: objectType, responseDomainId: 'new' }),
          text: 'Datetime'
        }
      case('CodeList'):
        return {
          path: url(routes.instruments.instrument.build.codeLists.show, { instrument_id: instrumentId, codeListId: 'new' }),
          text: 'New CodeList'
        }
      case('QuestionItem'):
        return {
          path: url(routes.instruments.instrument.build.questionItems.show, { instrument_id: instrumentId, questionItemId: 'new' }),
          text: 'Question Item'
github CLOSER-Cohorts / archivist / react / src / components / BreadcrumbBar.js View on Github external
text: 'Question Items',
                        link: url(routes.instruments.instrument.build.questionItems.all, { instrument_id: instrumentId })
                      }
                    )
              }else if(params.subtype === 'question_grids'){
                  crumbs.push(
                      {
                        text: 'Question Grids',
                        link: url(routes.instruments.instrument.build.questionGrids.all, { instrument_id: instrumentId })
                      }
                    )
              }else if(params.subtype === 'code_lists'){
                  crumbs.push(
                      {
                        text: 'CodeLists',
                        link: url(routes.instruments.instrument.build.codeLists.all, { instrument_id: instrumentId })
                      }
                    )
              }else if(params.subtype === 'response_domains'){
                  crumbs.push(
                      {
                        text: 'Response Domains',
                        link: url(routes.instruments.instrument.build.responseDomains.all, { instrument_id: instrumentId })
                      }
                    )
              }else if(params.subtype === 'constructs'){
                  crumbs.push(
                      {
                        text: 'Constructs',
                        link: url(routes.instruments.instrument.build.constructs.show, { instrument_id: instrumentId })
                      }
                    )
github CLOSER-Cohorts / archivist / react / src / pages / InstrumentBuild.js View on Github external
<h2>ResponseDomains</h2>
              
                  
                  
                  
              
            
          
          
            
              <h2>Questions</h2>
              
                  
                  
                  
              
            
          
          
            
              <h2>Constructs</h2>
github CLOSER-Cohorts / archivist / react / src / pages / InstrumentBuildQuestionGrids.js View on Github external
)
  }

  const handleQuestionSelection = (id) =&gt; {
    const path = url(routes.instruments.instrument.build.questionGrids.show, { instrument_id: instrumentId, questionGridId: id })
    history.push(path);
    setquestionGridId(id)
  }

  return (
    <div style="{{">
      
        
          
            
              <h2>Question Grids Question Items</h2>
              
              
                {Object.values(questionGrids).map((questionGrid) =&gt; {
                  return 
                })}
              
            
          
          
            {!isNil(selectedQuestion) &amp;&amp; (
              
            )}
          
        
      
    </div>
github CLOSER-Cohorts / archivist / react / src / pages / AdminInstruments.js View on Github external
Delete
          
        
      
    )
  }

  const headers = ["ID", "Prefix", "Study"]
  const rowRenderer = (row) =&gt; {
    return [row.id, row.prefix, row.study]
  }
  return (
    <div style="{{">
      
        <button color="primary">
           Add new Instrument
        </button>
        
      
    </div>
  );
}
github CLOSER-Cohorts / archivist / react / src / components / CodeListForm.js View on Github external
{codeList.used_by.map((question) =&gt; (
                                  
                                    
                                      <button>
                                        {question.id}
                                      </button>
                                    
                                    
                                      {question.type}
                                    
                                    
                                      {question.label}
                                    
                                  
                                ))
                              }

named-urls

Simple named url patterns in Javascript

MIT
Latest version published 3 years ago

Package Health Score

48 / 100
Full package analysis

Popular named-urls functions

Similar packages