Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions quasar.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ export default configure(function (ctx) {
chunkSizeWarningLimit: 1000,

extendViteConf(viteConf) {
viteConf.esbuild = {
drop: ['console'],
};
// viteConf.esbuild = {
// drop: ['console'],
// };

// Добавляем оптимизацию chunks
if (viteConf.build && viteConf.build.rollupOptions) {
Expand Down
288 changes: 0 additions & 288 deletions src/components/forms/dialogs/FormDialog.vue

This file was deleted.

21 changes: 10 additions & 11 deletions src/components/forms/pages/FormPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ import {
} from 'quasar';
import { useRoute } from 'vue-router';
//stores
import { useFormStore } from 'src/stores/form-store';
import { useFormStore } from 'src/modules/ai-forms/stores/form-store';
import { api } from 'src/modules/ai-forms/services/api';
import { useUserStore } from 'src/stores/user-store';
import { useNotificationStore } from 'src/stores/notification-store';
import { useUtilsStore } from 'src/stores/utils-store';
Expand Down Expand Up @@ -390,11 +391,12 @@ const submitForm = async () => {
}
});
try {
await formStore.sendForm(
route.params.slug,
res,
useAuth.value ? true : false,
);
if (useAuth.value) {
await api.createAnswerNoAuth(route.params.slug, res);
} else {
await api.createAnswerNoAuth(route.params.slug, res);
}

setNotificationView({
open: true,
type: 'success',
Expand Down Expand Up @@ -484,14 +486,11 @@ onMounted(async () => {
useAuth.value = false;
} finally {
if (useAuth.value) {
const { data } = await formStore.getSettingsForm(route.params.slug, true);
const data = await api.getFormAuth(route.params.slug);
validateReq(data);
} else {
try {
const { data } = await formStore.getSettingsForm(
route.params.slug,
false,
);
const data = await api.getFormNoAuth(route.params.slug);
validateReq(data);
} catch (e) {
onlyAuth.value = true;
Expand Down
13 changes: 6 additions & 7 deletions src/components/forms/pages/FormsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,13 @@ import aiplan from 'src/utils/aiplan';
import { parseText } from 'src/utils/helpers';
import { formatDateTime } from 'src/utils/time';
//stores
import { useFormStore } from 'src/stores/form-store';
import { useFormStore } from 'src/modules/ai-forms/stores/form-store';
import { api } from 'src/modules/ai-forms/services/api';
//components
import AvatarImage from 'src/components/AvatarImage.vue';
import DocumentIcon from 'src/components/icons/DocumentIcon.vue';
import DefaultLoader from 'src/components/loaders/DefaultLoader.vue';
import FormAnswers from 'src/components/forms/dialogs/FormAnswers.vue';
import FormAnswers from 'src/modules/ai-forms/dialogs/FormAnswers.vue';
import PaginationDefault from 'src/components/pagination/PaginationDefault.vue';

//stores
Expand Down Expand Up @@ -142,15 +143,13 @@ const refresh = async (props) => {

loading.value = true;

const { data } = await formStore
.getFormAnswers(
const data = await api
.getAnswers(
route.params.workspace as string,
route.params.formSlug as string,
{
offset: offset,
limit: limit,
order_by: sortBy,
desc: descending,
},
)
.finally(() => (loading.value = false));
Expand All @@ -164,7 +163,7 @@ const refresh = async (props) => {
};

const getCurrentForm = async () => {
const { data } = await formStore.getSettingsForm(route.params.formSlug, true);
const data = await api.getFormAuth(route.params.formSlug as string);
form.value = data;
};

Expand Down
Loading