Add desk-style task workflow on Activities and Project boards.

Managers can switch my desk vs team, reassign activities, and filter project cards to their work; assignees can see and move cards.
This commit is contained in:
2026-09-28 12:28:14 +03:30
parent 8effd4cbc6
commit 32e27d45f7
13 changed files with 303 additions and 50 deletions
+39 -2
View File
@@ -44,6 +44,7 @@ const boards = ref<ProjectBoardDto[]>([]);
const currentBoardId = ref('');
const viewMode = ref<PipelineViewMode>('kanban');
const search = ref('');
const mineOnly = ref(route.query.mine === '1');
const showCreate = ref(false);
const newName = ref('');
const cardModal = ref<{ cardId?: string; stageId?: string } | null>(null);
@@ -80,9 +81,21 @@ const selectedBoardId = computed({
});
const visibleStages = computed(() =>
filterStages(stages.value, { query: search.value }),
filterStages(stages.value, {
query: search.value,
mineUserId: mineOnly.value ? auth.user?.id ?? null : null,
}),
);
watch(mineOnly, (on) => {
const current = route.query.mine === '1';
if (on === current) return;
const query = { ...route.query } as Record<string, string | undefined>;
if (on) query.mine = '1';
else delete query.mine;
void router.replace({ name: 'projects', query });
});
function formatCardDate(iso: string) {
const d = new Date(iso);
if (Number.isNaN(d.getTime())) return iso;
@@ -445,7 +458,7 @@ onBeforeUnmount(() => {
<template>
<section class="page" dir="rtl">
<PipelineToolbar
pipeline-name="کاریز پروژه"
pipeline-name="کاریز پروژه — کارهای تیمی"
icon="grid"
create-option-label="برد جدید…"
:pipeline-options="boardOptions"
@@ -457,6 +470,10 @@ onBeforeUnmount(() => {
@create="showCreate = true"
>
<template #excel>
<label class="mine-toggle">
<input v-model="mineOnly" type="checkbox" />
<span>فقط کارهای من</span>
</label>
<button class="btn-ghost-sm" type="button" :disabled="loading || busy" @click="exportExcel">
خروجی اکسل
</button>
@@ -619,6 +636,26 @@ onBeforeUnmount(() => {
container-name: pipeline;
}
.mine-toggle {
display: inline-flex;
align-items: center;
gap: 0.4rem;
margin-inline-end: 0.35rem;
padding: 0.4rem 0.7rem;
border: 1px solid #e2e8f0;
border-radius: 10px;
background: #fff;
color: #0f172a;
font-size: 0.82rem;
font-weight: 700;
cursor: pointer;
user-select: none;
}
.mine-toggle input {
accent-color: #0f766e;
}
.btn-ghost-sm {
border: 1px solid #e2e8f0;
background: #fff;