|
|
@ -62,50 +62,37 @@ function openQuickImportDialog(type: string) { |
|
|
|
<NcSubMenu class="py-0" data-testid="nc-sidebar-base-import"> |
|
|
|
<NcSubMenu class="py-0" data-testid="nc-sidebar-base-import"> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
<GeneralIcon icon="download" /> |
|
|
|
<GeneralIcon icon="download" /> |
|
|
|
|
|
|
|
|
|
|
|
{{ $t('labels.importData') }} |
|
|
|
{{ $t('labels.importData') }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<template #expandIcon></template> |
|
|
|
<template #expandIcon></template> |
|
|
|
|
|
|
|
|
|
|
|
<NcMenuItem |
|
|
|
<template v-if="isUIAllowed('airtableImport', { roles: baseRole })" v-e="['c:import:airtable']"> |
|
|
|
v-if="isUIAllowed('airtableImport', { roles: baseRole })" |
|
|
|
<NcMenuItem key="quick-import-airtable" @click="openAirtableImportDialog(source.base_id, source.id)"> |
|
|
|
key="quick-import-airtable" |
|
|
|
<GeneralIcon icon="airtable" class="max-w-3.75 group-hover:text-black" /> |
|
|
|
v-e="['c:import:airtable']" |
|
|
|
<div class="ml-0.5">{{ $t('labels.airtable') }}</div> |
|
|
|
@click="openAirtableImportDialog(source.base_id, source.id)" |
|
|
|
</NcMenuItem> |
|
|
|
> |
|
|
|
</template> |
|
|
|
<GeneralIcon icon="airtable" class="max-w-3.75 group-hover:text-black" /> |
|
|
|
|
|
|
|
<div class="ml-0.5">{{ $t('labels.airtable') }}</div> |
|
|
|
<template v-if="isUIAllowed('csvImport', { roles: baseRole })" key="quick-import-csv" v-e="['c:import:csv']"> |
|
|
|
</NcMenuItem> |
|
|
|
<NcMenuItem @click="openQuickImportDialog('csv')"> |
|
|
|
|
|
|
|
<GeneralIcon icon="csv" class="w-4 group-hover:text-black" /> |
|
|
|
<NcMenuItem |
|
|
|
{{ $t('labels.csvFile') }} |
|
|
|
v-if="isUIAllowed('csvImport', { roles: baseRole })" |
|
|
|
</NcMenuItem> |
|
|
|
key="quick-import-csv" |
|
|
|
</template> |
|
|
|
v-e="['c:import:csv']" |
|
|
|
|
|
|
|
@click="openQuickImportDialog('csv')" |
|
|
|
<template v-if="isUIAllowed('jsonImport', { roles: baseRole })" v-e="['c:import:json']"> |
|
|
|
> |
|
|
|
<NcMenuItem key="quick-import-json" @click="openQuickImportDialog('json')"> |
|
|
|
<GeneralIcon icon="csv" class="w-4 group-hover:text-black" /> |
|
|
|
<GeneralIcon icon="code" class="w-4 group-hover:text-black" /> |
|
|
|
{{ $t('labels.csvFile') }} |
|
|
|
{{ $t('labels.jsonFile') }} |
|
|
|
</NcMenuItem> |
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
</template> |
|
|
|
<NcMenuItem |
|
|
|
|
|
|
|
v-if="isUIAllowed('jsonImport', { roles: baseRole })" |
|
|
|
<template v-if="isUIAllowed('excelImport', { roles: baseRole })" v-e="['c:import:excel']"> |
|
|
|
key="quick-import-json" |
|
|
|
<NcMenuItem key="quick-import-excel" @click="openQuickImportDialog('excel')"> |
|
|
|
v-e="['c:import:json']" |
|
|
|
<GeneralIcon icon="excel" class="max-w-4 group-hover:text-black" /> |
|
|
|
@click="openQuickImportDialog('json')" |
|
|
|
{{ $t('labels.microsoftExcel') }} |
|
|
|
> |
|
|
|
</NcMenuItem> |
|
|
|
<GeneralIcon icon="code" class="w-4 group-hover:text-black" /> |
|
|
|
</template> |
|
|
|
{{ $t('labels.jsonFile') }} |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<NcMenuItem |
|
|
|
|
|
|
|
v-if="isUIAllowed('excelImport', { roles: baseRole })" |
|
|
|
|
|
|
|
key="quick-import-excel" |
|
|
|
|
|
|
|
v-e="['c:import:excel']" |
|
|
|
|
|
|
|
@click="openQuickImportDialog('excel')" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<GeneralIcon icon="excel" class="max-w-4 group-hover:text-black" /> |
|
|
|
|
|
|
|
{{ $t('labels.microsoftExcel') }} |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
</NcSubMenu> |
|
|
|
</NcSubMenu> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|