|
|
@ -53,9 +53,10 @@ onMounted(() => { |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<a-modal v-model:visible="dialogShow" width="max(30vw, 600px)" :mask-closable="false" @keydown.esc="dialogShow = false"> |
|
|
|
<a-modal v-model:visible="dialogShow" width="max(30vw, 600px)" @keydown.esc="dialogShow = false"> |
|
|
|
<template #footer> |
|
|
|
<template #footer> |
|
|
|
<a-button key="back" size="large" @click="dialogShow = false">{{ $t('general.cancel') }}</a-button> |
|
|
|
<a-button key="back" size="large" @click="dialogShow = false">{{ $t('general.cancel') }}</a-button> |
|
|
|
|
|
|
|
|
|
|
|
<a-button key="submit" size="large" type="primary" @click="createTable()">{{ $t('general.submit') }}</a-button> |
|
|
|
<a-button key="submit" size="large" type="primary" @click="createTable()">{{ $t('general.submit') }}</a-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
@ -63,8 +64,10 @@ onMounted(() => { |
|
|
|
<a-form :model="table" name="create-new-table-form" @keydown.enter="createTable"> |
|
|
|
<a-form :model="table" name="create-new-table-form" @keydown.enter="createTable"> |
|
|
|
<!-- Create A New Table --> |
|
|
|
<!-- Create A New Table --> |
|
|
|
<div class="prose-xl font-bold self-center my-4">{{ $t('activity.createTable') }}</div> |
|
|
|
<div class="prose-xl font-bold self-center my-4">{{ $t('activity.createTable') }}</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- hint="Enter table name" --> |
|
|
|
<!-- hint="Enter table name" --> |
|
|
|
<div class="mb-2">Table Name</div> |
|
|
|
<div class="mb-2">Table Name</div> |
|
|
|
|
|
|
|
|
|
|
|
<a-form-item v-bind="validateInfos.title"> |
|
|
|
<a-form-item v-bind="validateInfos.title"> |
|
|
|
<a-input |
|
|
|
<a-input |
|
|
|
ref="inputEl" |
|
|
|
ref="inputEl" |
|
|
@ -74,25 +77,29 @@ onMounted(() => { |
|
|
|
:placeholder="$t('msg.info.enterTableName')" |
|
|
|
:placeholder="$t('msg.info.enterTableName')" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<div class="flex justify-end"> |
|
|
|
<div class="flex justify-end"> |
|
|
|
<div class="pointer" @click="isAdvanceOptVisible = !isAdvanceOptVisible"> |
|
|
|
<div class="pointer" @click="isAdvanceOptVisible = !isAdvanceOptVisible"> |
|
|
|
{{ isAdvanceOptVisible ? 'Hide' : 'Show' }} more |
|
|
|
{{ isAdvanceOptVisible ? 'Hide' : 'Show' }} more |
|
|
|
<v-icon x-small color="grey"> |
|
|
|
|
|
|
|
{{ isAdvanceOptVisible ? 'mdi-minus-circle-outline' : 'mdi-plus-circle-outline' }} |
|
|
|
<MdiMinusCircleOutline v-if="isAdvanceOptVisible" class="text-gray-500" /> |
|
|
|
</v-icon> |
|
|
|
<MdiPlusCircleOutline v-else class="text-gray-500" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="nc-table-advanced-options" :class="{ active: isAdvanceOptVisible }"> |
|
|
|
<div class="nc-table-advanced-options" :class="{ active: isAdvanceOptVisible }"> |
|
|
|
<!-- hint="Table name as saved in database" --> |
|
|
|
<!-- hint="Table name as saved in database" --> |
|
|
|
<div v-if="!project.prefix" class="mb-2">{{ $t('msg.info.tableNameInDb') }}</div> |
|
|
|
<div v-if="!project.prefix" class="mb-2">{{ $t('msg.info.tableNameInDb') }}</div> |
|
|
|
|
|
|
|
|
|
|
|
<a-form-item v-if="!project.prefix" v-bind="validateInfos.table_name"> |
|
|
|
<a-form-item v-if="!project.prefix" v-bind="validateInfos.table_name"> |
|
|
|
<a-input v-model:value="table.table_name" size="large" hide-details :placeholder="$t('msg.info.tableNameInDb')" /> |
|
|
|
<a-input v-model:value="table.table_name" size="large" hide-details :placeholder="$t('msg.info.tableNameInDb')" /> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<div class="mb-5"> |
|
|
|
<div class="mb-5"> |
|
|
|
<!-- Add Default Columns --> |
|
|
|
<!-- Add Default Columns --> |
|
|
|
{{ $t('msg.info.addDefaultColumns') }} |
|
|
|
{{ $t('msg.info.addDefaultColumns') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<a-row> |
|
|
|
<a-row> |
|
|
|
<a-col :span="6"> |
|
|
|
<a-col :span="6"> |
|
|
|
<a-tooltip placement="top"> |
|
|
|
<a-tooltip placement="top"> |
|
|
@ -102,12 +109,15 @@ onMounted(() => { |
|
|
|
<a-checkbox v-model:checked="table.columns.id" disabled>ID</a-checkbox> |
|
|
|
<a-checkbox v-model:checked="table.columns.id" disabled>ID</a-checkbox> |
|
|
|
</a-tooltip> |
|
|
|
</a-tooltip> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
|
|
|
|
|
|
|
|
|
<a-col :span="6"> |
|
|
|
<a-col :span="6"> |
|
|
|
<a-checkbox v-model:checked="table.columns.title"> title </a-checkbox> |
|
|
|
<a-checkbox v-model:checked="table.columns.title"> title </a-checkbox> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
|
|
|
|
|
|
|
|
|
<a-col :span="6"> |
|
|
|
<a-col :span="6"> |
|
|
|
<a-checkbox v-model:checked="table.columns.created_at"> created_at </a-checkbox> |
|
|
|
<a-checkbox v-model:checked="table.columns.created_at"> created_at </a-checkbox> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
|
|
|
|
|
|
|
|
|
<a-col :span="6"> |
|
|
|
<a-col :span="6"> |
|
|
|
<a-checkbox v-model:checked="table.columns.updated_at"> updated_at </a-checkbox> |
|
|
|
<a-checkbox v-model:checked="table.columns.updated_at"> updated_at </a-checkbox> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
@ -120,23 +130,6 @@ onMounted(() => { |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
<style scoped lang="scss"> |
|
|
|
::v-deep { |
|
|
|
|
|
|
|
.v-text-field__details { |
|
|
|
|
|
|
|
padding: 0 2px !important; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.v-messages:not(.error--text) { |
|
|
|
|
|
|
|
.v-messages__message { |
|
|
|
|
|
|
|
color: grey; |
|
|
|
|
|
|
|
font-size: 0.65rem; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.add-default-title { |
|
|
|
|
|
|
|
font-size: 0.65rem; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.nc-table-advanced-options { |
|
|
|
.nc-table-advanced-options { |
|
|
|
max-height: 0; |
|
|
|
max-height: 0; |
|
|
|
transition: 0.3s max-height; |
|
|
|
transition: 0.3s max-height; |
|
|
|