Skip to content

Commit

Permalink
BYOR conditional feature rendering added (#826)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkjang authored Dec 19, 2024
1 parent 1b5f4e4 commit 5efae8a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/components/researchPortal/ResearchDataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,14 @@
</template>
<td v-if="tableFormat['features'] != undefined">
<span
v-if="!tableFormat['features required column']"
href="javascript:;"
@click="showHideFeature('feature_' + sectionId + index)"
class="show-evidence-btn btn"
>View</span
>
<span
v-else-if="checkFeatureExist(value,tableFormat['features required column'])"
href="javascript:;"
@click="showHideFeature('feature_' + sectionId + index)"
class="show-evidence-btn btn"
Expand Down Expand Up @@ -735,6 +743,22 @@ export default Vue.component("research-data-table", {
},
},
methods: {
checkFeatureExist(DATA,PATH) {
let ifExist = true;
let value = DATA;
PATH.map(step => {
value = value[step];
if(!value) {
ifExist = false
} else if (value=="" || value == undefined) {
ifExist = false
}
})
return ifExist;
},
getRowID(TEXT) {
return TEXT.replace(/[^a-zA-Z0-9]/g, '_');
},
Expand Down

0 comments on commit 5efae8a

Please sign in to comment.