Правки фронта
Дополнительные адаптации для мобилки
This commit is contained in:
@@ -36,14 +36,7 @@
|
||||
|
||||
<!-- Мобильные фильтры -->
|
||||
<template #mobile-filters>
|
||||
<MobileSelect
|
||||
v-model="mobileProjectId"
|
||||
:options="projectOptions"
|
||||
title="Выберите проект"
|
||||
placeholder="Проект"
|
||||
variant="accent"
|
||||
@update:model-value="onMobileProjectChange"
|
||||
/>
|
||||
<ProjectSelector @change="onProjectChange" />
|
||||
<MobileSelect
|
||||
v-model="activeDepartment"
|
||||
:options="departmentOptions"
|
||||
@@ -152,33 +145,13 @@ const { isMobile } = useMobile()
|
||||
const store = useProjectsStore()
|
||||
|
||||
// ==================== MOBILE ====================
|
||||
const mobileProjectId = computed({
|
||||
get: () => store.currentProjectId,
|
||||
set: () => {}
|
||||
})
|
||||
|
||||
const projectOptions = computed(() => {
|
||||
return store.projects.map(p => ({
|
||||
id: p.id,
|
||||
label: p.name
|
||||
const departmentOptions = computed(() => [
|
||||
{ id: null, label: 'Все отделы' },
|
||||
...store.departments.map(d => ({
|
||||
id: d.id,
|
||||
label: d.name_departments
|
||||
}))
|
||||
})
|
||||
|
||||
const departmentOptions = computed(() => {
|
||||
return [
|
||||
{ id: null, label: 'Все отделы' },
|
||||
...store.departments.map(d => ({
|
||||
id: d.id,
|
||||
label: d.name_departments
|
||||
}))
|
||||
]
|
||||
})
|
||||
|
||||
const onMobileProjectChange = async (projectId) => {
|
||||
await store.setCurrentProject(projectId)
|
||||
activeDepartment.value = null
|
||||
await fetchCards()
|
||||
}
|
||||
])
|
||||
|
||||
// ==================== КАРТОЧКИ ====================
|
||||
const cards = ref([])
|
||||
|
||||
Reference in New Issue
Block a user