Commit f806212f authored by BojanSovticEngIT's avatar BojanSovticEngIT
Browse files

GPDR change

parent 69e2c8ff
......@@ -2,21 +2,19 @@
<div>
<DataTable v-if="businessModel" class="p-datatable-sm kn-table p-m-2" :value="businessModel.columns" :loading="loading" responsiveLayout="stack" breakpoint="960px" @rowReorder="onRowReorder">
<Column :rowReorder="true" :headerStyle="metawebAttributesTabDescriptor.reorderColumnStyle" :reorderableColumn="false" />
<template v-for="(column, index) in metawebAttributesTabDescriptor.columns" :key="index">
<Column class="kn-truncated" v-if="columnIsVisible(column)" :field="column.field" :header="$t(column.header)">
<template #body="slotProps">
<div class="p-d-flex p-flex-row">
<Checkbox v-if="column.field === 'identifier'" v-model="slotProps.data[slotProps.column.props.field]" :binary="true" @change="$emit('metaUpdated')"></Checkbox>
<Checkbox v-else-if="column.field === 'visible'" v-model="columnsVisibility[slotProps.data.uniqueName]" :binary="true" @change="onChange(slotProps.data, 'visibility')"></Checkbox>
<Checkbox v-else-if="column.field === 'personal' && columnsPersonal[slotProps.data.uniqueName] !== undefined" v-model="columnsPersonal[slotProps.data.uniqueName]" :binary="true" @change="onChange(slotProps.data, 'personal')"></Checkbox>
<Checkbox v-else-if="column.field === 'decrypt' && columnsDecrypt[slotProps.data.uniqueName] !== undefined" v-model="columnsDecrypt[slotProps.data.uniqueName]" :binary="true" @change="onChange(slotProps.data, 'decrypt')"></Checkbox>
<Checkbox v-else-if="column.field === 'subjectId' && columnsSubjectId[slotProps.data.uniqueName] !== undefined" v-model="columnsSubjectId[slotProps.data.uniqueName]" :binary="true" @change="onChange(slotProps.data, 'subjectId')"></Checkbox>
<span v-else-if="column.field === 'type'">{{ columnsType[slotProps.data.uniqueName] }}</span>
<span v-else>{{ slotProps.data[slotProps.column.props.field] }}</span>
</div>
</template>
</Column>
</template>
<Column class="kn-truncated" v-for="(column, index) in metawebAttributesTabDescriptor.columns" :key="index" :field="column.field" :header="$t(column.header)">
<template #body="slotProps">
<div class="p-d-flex p-flex-row">
<Checkbox v-if="column.field === 'identifier'" v-model="slotProps.data[slotProps.column.props.field]" :binary="true" @change="$emit('metaUpdated')"></Checkbox>
<Checkbox v-else-if="column.field === 'visible'" v-model="columnsVisibility[slotProps.data.uniqueName]" :binary="true" @change="onChange(slotProps.data, 'visibility')"></Checkbox>
<Checkbox v-else-if="column.field === 'personal' && columnsPersonal[slotProps.data.uniqueName] !== undefined" v-model="columnsPersonal[slotProps.data.uniqueName]" :binary="true" @change="onChange(slotProps.data, 'personal')"></Checkbox>
<Checkbox v-else-if="column.field === 'decrypt' && columnsDecrypt[slotProps.data.uniqueName] !== undefined" v-model="columnsDecrypt[slotProps.data.uniqueName]" :binary="true" @change="onChange(slotProps.data, 'decrypt')"></Checkbox>
<Checkbox v-else-if="column.field === 'subjectId' && columnsSubjectId[slotProps.data.uniqueName] !== undefined" v-model="columnsSubjectId[slotProps.data.uniqueName]" :binary="true" @change="onChange(slotProps.data, 'subjectId')"></Checkbox>
<span v-else-if="column.field === 'type'">{{ columnsType[slotProps.data.uniqueName] }}</span>
<span v-else>{{ slotProps.data[slotProps.column.props.field] }}</span>
</div>
</template>
</Column>
<Column :style="metawebAttributesTabDescriptor.iconColumnStyle">
<template #header>
<Button class="kn-button kn-button--primary p-button-link p-jc-center" @click="openUnusedFieldsDialog" data-test="add-button"> {{ $t('common.add') }}</Button>
......@@ -226,11 +224,6 @@ export default defineComponent({
.catch(() => {})
.finally(() => generate(this.observer))
this.loading = false
},
columnIsVisible(column: any) {
if ((column.field === 'personal' && !this.propertyKeys.includes('structural.personal')) || (column.field === 'decrypt' && !this.propertyKeys.includes('structural.decrypt')) || (column.field === 'subjectId' && !this.propertyKeys.includes('structural.subjectId'))) return false
return true
}
}
})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment