|
1 | 1 | <template> |
2 | | - <div class="q-px-md q-pb-xs"> |
3 | | - <div class="row q-col-gutter-sm"> |
4 | | - <q-banner class="bg-info text-black q-mx-sm q-ml-md" rounded dense> |
5 | | - <template v-slot:avatar> <q-icon name="info" color="primary" /> </template>{{ $t('dashboard.generalSettings.aiSettingsHint') }} |
6 | | - </q-banner> |
7 | | - <q-select v-if="datasets.length > 0" filled :options="datasets" v-model="selectedDataset" option-label="dsLabel" label="Select Dataset" class="col-md-6 col-sm-12 q-ml-sm" @update:model-value="updateDatasetColumns" /> |
8 | | - <q-banner v-else class="bg-warning text-black q-mx-sm q-ml-md q-mt-sm" rounded dense> |
9 | | - <template v-slot:avatar> <q-icon name="warning" color="primary" /> </template>{{ $t('dashboard.generalSettings.aiSettingsError') }} |
10 | | - </q-banner> |
11 | | - <q-table dense v-if="datasets.length > 0 && selectedDataset && datasetColumns" flat :rows="datasetColumns" :columns="columns" class="col-12" :pagination="{ rowsPerPage: 20 }" row-key="name"> |
12 | | - <template #header-cell="slotProps"> |
13 | | - <q-th :props="slotProps"> |
14 | | - <span class="kn-capitalize">{{ $t(slotProps.col.label) }}</span> |
15 | | - </q-th> |
16 | | - </template> |
17 | | - <template #header-cell-meaningful="slotProps"> |
18 | | - <q-th align="right"> |
19 | | - <span |
20 | | - >{{ $t(slotProps.col.label) }} |
21 | | - <q-icon name="help" size="xs"> |
22 | | - <q-tooltip :delay="500">{{ $t('dashboard.generalSettings.meaningfulHint') }}</q-tooltip> |
23 | | - </q-icon> |
24 | | - </span> |
25 | | - </q-th> |
26 | | - </template> |
| 2 | + <div class="q-px-md q-pb-md"> |
| 3 | + <div class="row q-col-gutter-sm items-center"> |
| 4 | + <div class="col-12"> |
| 5 | + <q-banner class="bg-info text-black" rounded dense> |
| 6 | + <template v-slot:avatar> <q-icon name="info" color="primary" /> </template>{{ $t('dashboard.generalSettings.aiSettingsHint') }} |
| 7 | + </q-banner> |
| 8 | + </div> |
| 9 | + <div class="col-6"> |
| 10 | + <q-select v-if="datasets.length > 0" filled :options="datasets" v-model="selectedDataset" option-label="dsLabel" :label="$t('dashboard.generalSettings.selectDataset')" @update:model-value="updateDatasetColumns" /> |
| 11 | + <q-banner v-else class="bg-warning text-black" rounded dense> |
| 12 | + <template v-slot:avatar> <q-icon name="warning" color="primary" /> </template>{{ $t('dashboard.generalSettings.aiSettingsError') }} |
| 13 | + </q-banner> |
| 14 | + </div> |
| 15 | + <div v-if="datasets.length > 0 && selectedDataset && datasetColumns" class="col-12"> |
| 16 | + <q-table dense flat :rows="datasetColumns" :columns="columns" :pagination="{ rowsPerPage: 20 }" row-key="name"> |
| 17 | + <template #header-cell="slotProps"> |
| 18 | + <q-th :props="slotProps"> |
| 19 | + <span class="kn-capitalize">{{ $t(slotProps.col.label) }}</span> |
| 20 | + </q-th> |
| 21 | + </template> |
| 22 | + <template #header-cell-meaningful="slotProps"> |
| 23 | + <q-th align="right"> |
| 24 | + <span |
| 25 | + >{{ $t(slotProps.col.label) }} |
| 26 | + <q-icon name="help" size="xs"> |
| 27 | + <q-tooltip :delay="500">{{ $t('dashboard.generalSettings.meaningfulHint') }}</q-tooltip> |
| 28 | + </q-icon> |
| 29 | + </span> |
| 30 | + </q-th> |
| 31 | + </template> |
27 | 32 |
|
28 | | - <template #body-cell-meaningful="slotProps"> |
29 | | - <q-td align="right"> |
30 | | - <q-checkbox indeterminate-value="not answered" size="xs" v-model="slotProps.row.meaningful" @update:model-value="updateRow(slotProps.rowIndex, slotProps.row.meaningful)" /> |
31 | | - </q-td> |
32 | | - </template> |
33 | | - <template #body-cell-dataType="slotProps"> |
34 | | - <q-td> |
35 | | - <span>{{ getDataType(slotProps.value) }}</span> |
36 | | - </q-td> |
37 | | - </template> |
38 | | - <template #body-cell-description="slotProps"> |
39 | | - <q-td :props="slotProps"> |
40 | | - <q-btn size="sm" :flat="!slotProps.row.description || slotProps.row.description == ''" round color="primary" icon="info" @click="openDescriptionDialog(slotProps.rowIndex)"> |
41 | | - <q-tooltip v-if="slotProps.row.description && slotProps.row.description !== ''" anchor="top middle" self="bottom middle" :offset="[0, 10]"> |
42 | | - {{ slotProps.row.description }} |
43 | | - </q-tooltip> |
44 | | - </q-btn> |
45 | | - </q-td> |
46 | | - </template> |
47 | | - <template #body-cell-buttons="slotProps"> |
48 | | - <q-td :props="slotProps"> |
49 | | - <q-btn size="sm" flat round color="primary" icon="delete" @click="deleteColumn(slotProps.rowIndex)"> |
50 | | - <q-tooltip :delay="500"> |
51 | | - {{ $t('common.delete') }} |
52 | | - </q-tooltip> |
53 | | - </q-btn> |
54 | | - </q-td> |
55 | | - </template> |
56 | | - </q-table> |
| 33 | + <template #body-cell-meaningful="slotProps"> |
| 34 | + <q-td align="right"> |
| 35 | + <q-checkbox indeterminate-value="not answered" size="xs" v-model="slotProps.row.meaningful" @update:model-value="updateRow(slotProps.rowIndex, slotProps.row.meaningful)" /> |
| 36 | + </q-td> |
| 37 | + </template> |
| 38 | + <template #body-cell-dataType="slotProps"> |
| 39 | + <q-td> |
| 40 | + <span>{{ getDataType(slotProps.value) }}</span> |
| 41 | + </q-td> |
| 42 | + </template> |
| 43 | + <template #body-cell-description="slotProps"> |
| 44 | + <q-td :props="slotProps"> |
| 45 | + <q-btn size="sm" :flat="!slotProps.row.description || slotProps.row.description == ''" round color="primary" icon="info" @click="openDescriptionDialog(slotProps.rowIndex)"> |
| 46 | + <q-tooltip v-if="slotProps.row.description && slotProps.row.description !== ''" anchor="top middle" self="bottom middle" :offset="[0, 10]"> |
| 47 | + {{ slotProps.row.description }} |
| 48 | + </q-tooltip> |
| 49 | + </q-btn> |
| 50 | + </q-td> |
| 51 | + </template> |
| 52 | + <template #body-cell-buttons="slotProps"> |
| 53 | + <q-td :props="slotProps"> |
| 54 | + <q-btn size="sm" flat round color="primary" icon="delete" @click="deleteColumn(slotProps.rowIndex)"> |
| 55 | + <q-tooltip :delay="500"> |
| 56 | + {{ $t('common.delete') }} |
| 57 | + </q-tooltip> |
| 58 | + </q-btn> |
| 59 | + </q-td> |
| 60 | + </template> |
| 61 | + </q-table> |
| 62 | + </div> |
57 | 63 | </div> |
58 | 64 | </div> |
59 | 65 | <q-dialog v-model="descriptionDialog"> |
|
0 commit comments