mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-05 11:27:11 +00:00
feat: allow modifying custom sync
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
const {
|
||||
formState,
|
||||
syncConfigForm,
|
||||
syncConfigEditForm,
|
||||
selectedIntegrationIndex,
|
||||
deleteSync,
|
||||
changeIntegration,
|
||||
@@ -13,6 +14,17 @@ const {
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
const destinationSchemaModalVisible = ref(false)
|
||||
|
||||
const onUpdateSync = async () => {
|
||||
if (syncConfigEditForm.value?.sync_category === 'custom') {
|
||||
destinationSchemaModalVisible.value = true
|
||||
return
|
||||
}
|
||||
|
||||
await updateSync()
|
||||
}
|
||||
|
||||
const onDeleteSync = async () => {
|
||||
Modal.confirm({
|
||||
title: 'Do you want to delete this integration?',
|
||||
@@ -53,9 +65,29 @@ const onDeleteSync = async () => {
|
||||
<NcButton class="!px-4" type="danger" size="small" disabled> Delete Integration </NcButton>
|
||||
</NcTooltip>
|
||||
<NcButton v-else class="!px-4" type="danger" size="small" @click="onDeleteSync"> Delete Integration </NcButton>
|
||||
<NcButton class="!px-4" type="primary" size="small" :disabled="!editModeModified" @click="updateSync">
|
||||
<NcButton
|
||||
v-if="syncConfigEditForm?.sync_category === 'custom'"
|
||||
class="!px-4"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="onUpdateSync"
|
||||
>
|
||||
Table Mapping
|
||||
</NcButton>
|
||||
<NcButton v-else class="!px-4" type="primary" size="small" :disabled="!editModeModified" @click="onUpdateSync">
|
||||
Update Integration
|
||||
</NcButton>
|
||||
</div>
|
||||
<GeneralModal
|
||||
v-if="destinationSchemaModalVisible"
|
||||
v-model:visible="destinationSchemaModalVisible"
|
||||
size="large"
|
||||
:mask-closable="false"
|
||||
closable
|
||||
>
|
||||
<div class="h-[80vh] overflow-y-auto">
|
||||
<DashboardSettingsSyncDestinationSchema @update:sync="destinationSchemaModalVisible = false" />
|
||||
</div>
|
||||
</GeneralModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user