36 lines
832 B
Vue
36 lines
832 B
Vue
<script setup>
|
|
import BasicTable from '@/Components/BasicTable.vue';
|
|
import { LinkOptions as C_LINK, TableColumn as C_TD, TableRow as C_TR} from '@/Shared/AppObjects';
|
|
|
|
const props = defineProps({
|
|
actions: Array
|
|
});
|
|
|
|
const header = [
|
|
C_TD.make('#', 'header'),
|
|
C_TD.make('Name', 'header'),
|
|
C_TD.make('Color tag', 'header'),
|
|
C_TD.make('Decisions', 'header')
|
|
];
|
|
|
|
const createBody = (data) => {
|
|
let content = [];
|
|
|
|
data.forEach((a) => {
|
|
const cols = [
|
|
C_TD.make(a.id, 'body'),
|
|
C_TD.make(a.name, 'body'),
|
|
C_TD.make(a.color_tag, 'body'),
|
|
C_TD.make(a.decisions.length, 'body')
|
|
];
|
|
|
|
content.push(C_TR.make(cols));
|
|
});
|
|
|
|
return content;
|
|
}
|
|
|
|
</script>
|
|
<template>
|
|
<BasicTable :header="header" :body="createBody(actions)" />
|
|
</template> |