ваше сообщение коммита
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import BaseLayout from '../../components/BaseLayout.vue';
|
||||
import axios from 'axios';
|
||||
import tablesService from '@/services/tablesService';
|
||||
const $route = useRoute();
|
||||
const router = useRouter();
|
||||
const name = ref('');
|
||||
@@ -32,14 +32,14 @@ const description = ref('');
|
||||
const isRagSourceId = ref(2);
|
||||
|
||||
onMounted(async () => {
|
||||
const { data } = await axios.get(`/tables/${$route.params.id}`);
|
||||
const data = await tablesService.getTable($route.params.id);
|
||||
name.value = data.name;
|
||||
description.value = data.description;
|
||||
isRagSourceId.value = data.is_rag_source_id || 2;
|
||||
});
|
||||
|
||||
async function save() {
|
||||
await axios.patch(`/api/tables/${$route.params.id}`, {
|
||||
await tablesService.updateTable($route.params.id, {
|
||||
name: name.value,
|
||||
description: description.value,
|
||||
isRagSourceId: isRagSourceId.value
|
||||
|
||||
@@ -14,7 +14,6 @@ import BaseLayout from '../../components/BaseLayout.vue';
|
||||
import UserTablesList from '../../components/tables/UserTablesList.vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useAuthContext } from '@/composables/useAuth';
|
||||
// import TagsTableView from '../../components/tables/TagsTableView.vue'; // больше не используется
|
||||
const router = useRouter();
|
||||
const { isAdmin } = useAuthContext();
|
||||
function goBack() {
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<template>
|
||||
<BaseLayout>
|
||||
<TagsTableView />
|
||||
</BaseLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import BaseLayout from '../../components/BaseLayout.vue';
|
||||
import TagsTableView from '../../components/tables/TagsTableView.vue';
|
||||
</script>
|
||||
Reference in New Issue
Block a user