|
|
@ -19,8 +19,10 @@ const { setAdditionalValidations, validateInfos, onDataTypeChange, sqlUi, isXcdb |
|
|
|
const projectStore = useProject() |
|
|
|
const projectStore = useProject() |
|
|
|
const { tables } = storeToRefs(projectStore) |
|
|
|
const { tables } = storeToRefs(projectStore) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { t } = useI18n() |
|
|
|
|
|
|
|
|
|
|
|
setAdditionalValidations({ |
|
|
|
setAdditionalValidations({ |
|
|
|
childId: [{ required: true, message: 'Required' }], |
|
|
|
childId: [{ required: true, message: t('general.required') }], |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const onUpdateDeleteOptions = sqlUi === MssqlUi ? ['NO ACTION'] : ['NO ACTION', 'CASCADE', 'RESTRICT', 'SET NULL', 'SET DEFAULT'] |
|
|
|
const onUpdateDeleteOptions = sqlUi === MssqlUi ? ['NO ACTION'] : ['NO ACTION', 'CASCADE', 'RESTRICT', 'SET NULL', 'SET DEFAULT'] |
|
|
@ -110,7 +112,14 @@ const isLinks = computed(() => vModel.value.uidt === UITypes.Links) |
|
|
|
@change="onDataTypeChange" |
|
|
|
@change="onDataTypeChange" |
|
|
|
> |
|
|
|
> |
|
|
|
<a-select-option v-for="(option, i) of onUpdateDeleteOptions" :key="i" :value="option"> |
|
|
|
<a-select-option v-for="(option, i) of onUpdateDeleteOptions" :key="i" :value="option"> |
|
|
|
{{ option }} |
|
|
|
<template v-if="option === 'NO ACTION'">{{ $t('title.links.noAction') }}</template> |
|
|
|
|
|
|
|
<template v-else-if="option === 'CASCADE'">{{ $t('title.links.cascade') }}</template> |
|
|
|
|
|
|
|
<template v-else-if="option === 'RESTRICT'">{{ $t('title.links.restrict') }}</template> |
|
|
|
|
|
|
|
<template v-else-if="option === 'SET NULL'">{{ $t('title.links.setNull') }}</template> |
|
|
|
|
|
|
|
<template v-else-if="option === 'SET DEFAULT'">{{ $t('title.links.setDefault') }}</template> |
|
|
|
|
|
|
|
<template v-else> |
|
|
|
|
|
|
|
{{ option }} |
|
|
|
|
|
|
|
</template> |
|
|
|
</a-select-option> |
|
|
|
</a-select-option> |
|
|
|
</a-select> |
|
|
|
</a-select> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
@ -124,7 +133,14 @@ const isLinks = computed(() => vModel.value.uidt === UITypes.Links) |
|
|
|
@change="onDataTypeChange" |
|
|
|
@change="onDataTypeChange" |
|
|
|
> |
|
|
|
> |
|
|
|
<a-select-option v-for="(option, i) of onUpdateDeleteOptions" :key="i" :value="option"> |
|
|
|
<a-select-option v-for="(option, i) of onUpdateDeleteOptions" :key="i" :value="option"> |
|
|
|
{{ option }} |
|
|
|
<template v-if="option === 'NO ACTION'">{{ $t('title.links.noAction') }}</template> |
|
|
|
|
|
|
|
<template v-else-if="option === 'CASCADE'">{{ $t('title.links.cascade') }}</template> |
|
|
|
|
|
|
|
<template v-else-if="option === 'RESTRICT'">{{ $t('title.links.restrict') }}</template> |
|
|
|
|
|
|
|
<template v-else-if="option === 'SET NULL'">{{ $t('title.links.setNull') }}</template> |
|
|
|
|
|
|
|
<template v-else-if="option === 'SET DEFAULT'">{{ $t('title.links.setDefault') }}</template> |
|
|
|
|
|
|
|
<template v-else> |
|
|
|
|
|
|
|
{{ option }} |
|
|
|
|
|
|
|
</template> |
|
|
|
</a-select-option> |
|
|
|
</a-select-option> |
|
|
|
</a-select> |
|
|
|
</a-select> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|