Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const actions = (row) => {
return (
<button>
View logs
</button>
)
}
const handleResponseDomainSelection = (type, id) => {
const path = url(routes.instruments.instrument.build.responseDomains.show, { instrument_id: instrumentId, responseDomainType: type, responseDomainId: id })
history.push(path);
}
const handleQuestionSelection = (id) => {
const path = url(routes.instruments.instrument.build.questionGrids.show, { instrument_id: instrumentId, questionGridId: id })
history.push(path);
setquestionGridId(id)
}
const actions = (row) => {
return (
<>
<button>
Edit
</button>
<button>
Import Mappings
</button>
<button>
View Imports
</button>
<button>
Clear Cache
</button>
<button>
Delete</button>
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'
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 })
}
)
<h2>ResponseDomains</h2>
<h2>Questions</h2>
<h2>Constructs</h2>
)
}
const handleQuestionSelection = (id) => {
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) => {
return
})}
{!isNil(selectedQuestion) && (
)}
</div>
Delete
)
}
const headers = ["ID", "Prefix", "Study"]
const rowRenderer = (row) => {
return [row.id, row.prefix, row.study]
}
return (
<div style="{{">
<button color="primary">
Add new Instrument
</button>
</div>
);
}
{codeList.used_by.map((question) => (
<button>
{question.id}
</button>
{question.type}
{question.label}
))
}