| 123456789101112131415161718192021222324252627282930313233343536373839 |
- // app/pages/Admin/Clients/index.pug
- div
- .flex.justify-between.items-center.mb-6
- h1(class="text-2xl font-bold text-gray-900 dark:text-white") Управление клиентами
- .flex.space-x-4
- input(
- v-model="clientSearch"
- type="text"
- placeholder="Поиск клиентов..."
- class="px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500 dark:bg-gray-700 dark:border-gray-600"
- )
-
- .overflow-x-auto
- table(class="min-w-full divide-y divide-gray-200 dark:divide-gray-700")
- thead(class="bg-gray-50 dark:bg-gray-700")
- tr
- th(class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider") Имя
- th(class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider") Email
- th(class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider") Телефон
- th(class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider") Заказов
- th(class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider") Дата регистрации
- th(class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider") Действия
- tbody(class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700")
- tr(v-for="user in filteredUsers" :key="user._id")
- td(class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-white")
- | {{ user.profile?.firstName }} {{ user.profile?.lastName }}
- td(class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-300") {{ user.email }}
- td(class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-300") {{ user.profile?.phone || '-' }}
- td(class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-300") {{ user.orders?.length || 0 }}
- td(class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-300") {{ formatDate(user.createdAt) }}
- td(class="px-6 py-4 whitespace-nowrap text-sm font-medium")
- button(
- @click="viewUser(user)"
- class="text-blue-600 hover:text-blue-900 mr-3"
- ) Просмотр
- button(
- @click="editUser(user)"
- class="text-green-600 hover:text-green-900"
- ) Редактировать
|