ваше сообщение коммита
This commit is contained in:
@@ -22,13 +22,20 @@
|
||||
</div>
|
||||
<ContactTable v-if="showContacts" :contacts="contacts" @close="showContacts = false" @show-details="openContactDetails" />
|
||||
<ContactDetails v-if="showContactDetails" :contact="selectedContact" @close="showContactDetails = false" @contact-deleted="onContactDeleted" />
|
||||
<div class="crm-tables-block">
|
||||
<h2>Таблицы</h2>
|
||||
<button class="btn btn-info" @click="showTables = true">
|
||||
<i class="fas fa-table"></i> Подробнее
|
||||
</button>
|
||||
</div>
|
||||
<DynamicTablesModal v-if="showTables" @close="showTables = false" />
|
||||
</div>
|
||||
</BaseLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, onBeforeUnmount, defineProps, defineEmits, computed, watch } from 'vue';
|
||||
import { useAuth } from '../composables/useAuth';
|
||||
import { useAuthContext } from '../composables/useAuth';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { setToStorage } from '../utils/storage';
|
||||
import BaseLayout from '../components/BaseLayout.vue';
|
||||
@@ -38,6 +45,7 @@ import ContactTable from '../components/ContactTable.vue';
|
||||
import contactsService from '../services/contactsService.js';
|
||||
import DleManagement from '../components/DleManagement.vue';
|
||||
import ContactDetails from '../components/ContactDetails.vue';
|
||||
import DynamicTablesModal from '../components/tables/DynamicTablesModal.vue';
|
||||
|
||||
// Определяем props
|
||||
const props = defineProps({
|
||||
@@ -50,7 +58,7 @@ const props = defineProps({
|
||||
// Определяем emits
|
||||
const emit = defineEmits(['auth-action-completed']);
|
||||
|
||||
const auth = useAuth();
|
||||
const auth = useAuthContext();
|
||||
const router = useRouter();
|
||||
const isLoading = ref(true);
|
||||
const dleList = ref([]);
|
||||
@@ -62,6 +70,7 @@ const contacts = ref([]);
|
||||
const isLoadingContacts = ref(false);
|
||||
const selectedContact = ref(null);
|
||||
const showContactDetails = ref(false);
|
||||
const showTables = ref(false);
|
||||
|
||||
// Функция для перехода на домашнюю страницу и открытия боковой панели
|
||||
const goToHomeAndShowSidebar = () => {
|
||||
@@ -281,4 +290,24 @@ strong {
|
||||
font-size: 1rem;
|
||||
padding: 8px 18px;
|
||||
}
|
||||
|
||||
.crm-tables-block {
|
||||
margin: 32px 0 24px 0;
|
||||
padding: 24px;
|
||||
background: #f8fafc;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.crm-tables-block h2 {
|
||||
margin: 0;
|
||||
font-size: 1.4rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
.crm-tables-block .btn {
|
||||
font-size: 1rem;
|
||||
padding: 8px 18px;
|
||||
}
|
||||
</style>
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, watch, onBeforeUnmount, defineProps, defineEmits } from 'vue';
|
||||
import { useAuth } from '../composables/useAuth';
|
||||
import { useAuthContext } from '../composables/useAuth';
|
||||
import { useChat } from '../composables/useChat';
|
||||
import { connectWithWallet } from '../services/wallet';
|
||||
import eventBus from '../utils/eventBus';
|
||||
@@ -44,7 +44,7 @@
|
||||
// 1. ИСПОЛЬЗОВАНИЕ COMPOSABLES
|
||||
// =====================================================================
|
||||
|
||||
const auth = useAuth();
|
||||
const auth = useAuthContext();
|
||||
|
||||
// =====================================================================
|
||||
// 2. СОСТОЯНИЯ КОМПОНЕНТА
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, watch, onBeforeUnmount, computed, defineProps, defineEmits } from 'vue';
|
||||
import { useAuth } from '../composables/useAuth';
|
||||
import { useAuthContext } from '../composables/useAuth';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { getFromStorage, setToStorage } from '../utils/storage';
|
||||
import BaseLayout from '../components/BaseLayout.vue';
|
||||
@@ -48,7 +48,7 @@ const props = defineProps({
|
||||
// Определяем emits
|
||||
const emit = defineEmits(['auth-action-completed']);
|
||||
|
||||
const auth = useAuth();
|
||||
const auth = useAuthContext();
|
||||
const router = useRouter();
|
||||
const isLoading = ref(true);
|
||||
|
||||
|
||||
@@ -316,12 +316,12 @@
|
||||
<script setup>
|
||||
import { reactive, onMounted, computed, ref, watch } from 'vue';
|
||||
import axios from 'axios'; // Предполагаем, что axios доступен
|
||||
import { useAuth } from '@/composables/useAuth'; // Импортируем composable useAuth
|
||||
import { useAuthContext } from '@/composables/useAuth'; // Импортируем composable useAuth
|
||||
import dleService from '@/services/dleService';
|
||||
import useBlockchainNetworks from '@/composables/useBlockchainNetworks'; // Импортируем composable для работы с сетями
|
||||
// TODO: Импортировать API
|
||||
|
||||
const { address, isAdmin, auth, user } = useAuth(); // Получаем объект адреса и статус админа
|
||||
const { address, isAdmin, auth, user } = useAuthContext(); // Получаем объект адреса и статус админа
|
||||
|
||||
// Инициализация composable для работы с сетями блокчейн
|
||||
const {
|
||||
|
||||
Reference in New Issue
Block a user