v6
This commit is contained in:
@@ -63,11 +63,11 @@
|
||||
<div class="flex items-center column">
|
||||
<div class="flex items-center">
|
||||
<q-icon name="mdi-chat-outline"/>
|
||||
<span>{{ item.chats }} </span>
|
||||
<span>{{ item.chat_count }} </span>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<q-icon name="mdi-account-outline"/>
|
||||
<span>{{ item.persons }}</span>
|
||||
<span>{{ item.user_count }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</q-item-section>
|
||||
@@ -113,10 +113,16 @@
|
||||
class="flex w100 column q-pt-xl q-pa-md"
|
||||
>
|
||||
<div class="flex column justify-center col-grow items-center text-grey">
|
||||
<q-icon name="mdi-briefcase-plus-outline" size="160px" class="q-pb-md"/>
|
||||
<div class="text-h6">
|
||||
{{$t('projects__lets_start')}}
|
||||
</div>
|
||||
<q-btn flat no-caps @click="createNewProject">
|
||||
<div class="flex column justify-center col-grow items-center">
|
||||
<q-icon name="mdi-briefcase-plus-outline" size="160px" class="q-pb-md"/>
|
||||
<div class="text-h6 text-brand">
|
||||
{{$t('projects__lets_start')}}
|
||||
</div>
|
||||
</div>
|
||||
</q-btn>
|
||||
|
||||
|
||||
<div class="text-caption" align="center">
|
||||
{{$t('projects__lets_start_description')}}
|
||||
</div>
|
||||
@@ -169,9 +175,12 @@
|
||||
import { ref, computed, watch, onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useProjectsStore } from 'stores/projects'
|
||||
import { useSettingsStore } from 'stores/settings'
|
||||
import type { Project } from 'types/Project'
|
||||
|
||||
const router = useRouter()
|
||||
const projectsStore = useProjectsStore()
|
||||
const settingsStore = useSettingsStore()
|
||||
const projects = projectsStore.projects
|
||||
|
||||
const searchProject = ref('')
|
||||
@@ -197,20 +206,14 @@
|
||||
}
|
||||
|
||||
function restoreFromArchive () {
|
||||
if (archiveProjectId.value) {
|
||||
const projectTemp = projectsStore.projectById(archiveProjectId.value)
|
||||
if (projectTemp) {
|
||||
projectTemp.is_archive = false
|
||||
projectsStore.updateProject(archiveProjectId.value, projectTemp)
|
||||
}
|
||||
}
|
||||
if (archiveProjectId.value) projectsStore.restore(archiveProjectId.value)
|
||||
}
|
||||
|
||||
const displayProjects = computed(() => {
|
||||
if (!searchProject.value || !(searchProject.value && searchProject.value.trim())) return projects
|
||||
const searchChatValue = searchProject.value.trim().toLowerCase()
|
||||
const arrOut = projects
|
||||
.filter(el =>
|
||||
.filter((el: Project) =>
|
||||
el.name.toLowerCase().includes(searchChatValue) ||
|
||||
el.description && el.description.toLowerCase().includes(searchProject.value)
|
||||
)
|
||||
@@ -218,17 +221,20 @@
|
||||
})
|
||||
|
||||
const activeProjects = computed(() => {
|
||||
return displayProjects.value.filter(el => !el.is_archive)
|
||||
return displayProjects.value.filter((el: Project) => !el.is_archived)
|
||||
})
|
||||
|
||||
const archiveProjects = computed(() => {
|
||||
return displayProjects.value.filter(el => el.is_archive)
|
||||
return displayProjects.value.filter((el: Project) => el.is_archived)
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
if (!projectsStore.isInit) {
|
||||
await projectsStore.init()
|
||||
}
|
||||
if (!settingsStore.isInit) {
|
||||
await settingsStore.init()
|
||||
}
|
||||
})
|
||||
|
||||
watch(showDialogArchive, (newD :boolean) => {
|
||||
|
||||
Reference in New Issue
Block a user