Skip to content

Commit

Permalink
formatting code lists
Browse files Browse the repository at this point in the history
  • Loading branch information
dragos-eu committed Nov 22, 2024
1 parent aed4eb4 commit 643a251
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 23 deletions.
12 changes: 6 additions & 6 deletions src/js/codelists.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ Vue.component("codelists", {
</b-form-row>
<!-- Display read only data as static HTML -->
<b>Short Name: </b>{{crt_list.ShortName}}
<b> Long Name: </b>{{crt_list.LongName}}<br/>
<b>List ID: </b>{{crt_list.ListID}}
<b> Version: </b>{{crt_list.Version}}<br/>
<b>Short Name: </b>{{crt_list.ShortName}}&nbsp;&nbsp;
<b>Long Name: </b>{{crt_list.LongName}}<br/>
<b>Agency Long Name: </b>{{crt_list.AgencyLongName}}&nbsp;&nbsp;
<b>Agency Identifier: </b>{{crt_list.AgencyIdentifier}}<br/>
<b>List ID: </b>{{crt_list.ListID}}&nbsp;&nbsp;
<b>Version: </b>{{crt_list.Version}}<br/>
<b>Canonical URI: </b>{{crt_list.CanonicalUri}}<br/>
<b>Canonical Version URI: </b>{{crt_list.CanonicalVersionUri}}<br/>
<b>Location URI: </b>{{crt_list.LocationUri}}<br/>
<b>Agency Long Name: </b>{{crt_list.AgencyLongName}}<br/>
<b>Agency Identifier: </b>{{crt_list.AgencyIdentifier}}<br/>
<b-table class="mt-2" striped hover responsive :items="crt_list.table" :fields="details_fields" :no-local-sorting=true>
<template #cell(show_details)="row">
Expand Down
20 changes: 3 additions & 17 deletions src/js/espd.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,21 +615,7 @@ function json2ESPD_v4(fragment, result = { sel_count: 0, template: ''}) {

case 'SUBCRITERION':
result.template += `<div>`
/*
if (fragment[el].cardinality.toString().trim().endsWith('..n')) {
result.data_part += `"html_${stringToProperty(fragment[el].requestpath)}": '', \n`
result.template += `<div v-html="html_${stringToProperty(fragment[el].requestpath)}"></div><b-card footer-tag="footer">`
}
*/
if (Object.hasOwn(fragment[el], 'components')) result = json2ESPD_v4(fragment[el].components, result)
/*
if (fragment[el].cardinality.toString().trim().endsWith('..n')) {
result.template += `<template #footer>
<b-button variant="success" @click="html_${stringToProperty(fragment[el].requestpath)} = renderHTML('${fragment[el].requestpath}', exp)"><b-icon icon="plus-square-fill" aria-hidden="true"></b-icon></b-button>
</template>
</b-card>`
}
*/
if (Object.hasOwn(fragment[el], 'components')) result = json2ESPD_v4(fragment[el].components, result)
result.template += `</div>`
break;

Expand Down Expand Up @@ -744,7 +730,7 @@ function json2ESPD_v4(fragment, result = { sel_count: 0, template: ''}) {
//local_indicator = (result.sel_count + '').padStart(2, '0')
local_indicator = `${stringToProperty(fragment[el].requestpath)}`
result.template += `
<b-form-checkbox v-if="window.espd_doc.role == 'eo'" v-model="exp['${local_indicator}']" name="check-button" inline="true" switch>
<b-form-checkbox v-model="exp['${local_indicator}']" name="check-button" inline="true" switch>
[Q] ${tmp_cmp.description} <b>[{{ exp['${local_indicator}']?'Yes':'No' }}]</b>
</b-form-checkbox>
`
Expand Down Expand Up @@ -809,7 +795,7 @@ function json2ESPD_v4(fragment, result = { sel_count: 0, template: ''}) {
result.exp[`${stringToProperty(tmp_cmp.responsepath)}`] = false
local_indicator_qsg = `${stringToProperty(tmp_cmp.responsepath)}`
result.template += `
<b-form-checkbox v-if="window.espd_doc.role == 'eo'" v-model="exp['${local_indicator_qsg}']" name="check-button" inline="true" switch>
<b-form-checkbox v-model="exp['${local_indicator_qsg}']" name="check-button" inline="true" switch>
[Q] ${tmp_cmp.description} <b>[{{ exp['${local_indicator_qsg}']?'Yes':'No' }}]</b>
</b-form-checkbox>
`
Expand Down

0 comments on commit 643a251

Please sign in to comment.