ваше сообщение коммита

This commit is contained in:
2025-07-03 14:30:23 +03:00
parent e9287be1ff
commit af80fa9540
33 changed files with 2833 additions and 223 deletions

View File

@@ -10,9 +10,10 @@
<p><strong>Кошелек:</strong> {{ contact.wallet || '-' }}</p>
<p><strong>Дата создания:</strong> {{ formatDate(contact.created_at) }}</p>
<div class="confirm-actions">
<button class="delete-btn" @click="deleteContact" :disabled="isDeleting">Удалить</button>
<button v-if="isAdmin" class="delete-btn" @click="deleteContact" :disabled="isDeleting">Удалить</button>
<button class="cancel-btn" @click="cancelDelete" :disabled="isDeleting">Отменить</button>
</div>
<div v-if="!isAdmin" class="empty-table-placeholder">Нет прав для удаления контакта</div>
<div v-if="error" class="error">{{ error }}</div>
</div>
</div>
@@ -22,6 +23,7 @@
import { ref, onMounted } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import contactsService from '../../services/contactsService.js';
import { useAuthContext } from '@/composables/useAuth';
const route = useRoute();
const router = useRouter();
@@ -29,6 +31,7 @@ const contact = ref(null);
const isLoading = ref(true);
const isDeleting = ref(false);
const error = ref('');
const { isAdmin } = useAuthContext();
function formatDate(date) {
if (!date) return '-';