Remove completed personal shares from the assignee desk view.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -444,7 +444,7 @@ async function runAction() {
|
||||
const { data } = await api.patch<ActivityDto>(`/activities/${id}/complete`, undefined, {
|
||||
params: undo ? { undo: '1' } : undefined,
|
||||
});
|
||||
if (data.status === 'done') {
|
||||
if (data.status === 'done' || (!undo && data.completionMode === 'all')) {
|
||||
emit('changed');
|
||||
emit('close');
|
||||
return;
|
||||
|
||||
@@ -336,7 +336,8 @@ const sharedParams = computed<Record<string, string | undefined>>(() => ({
|
||||
boardId: board.value || undefined,
|
||||
filter: filter.value,
|
||||
q: typeof route.query.q === 'string' && route.query.q.trim() ? route.query.q.trim() : undefined,
|
||||
desk: showDeskTabs.value ? desk.value : undefined,
|
||||
// همیشه desk بفرست تا سهمِ انجامشده از میز «من» حذف شود (حتی بدون تب تیم/من)
|
||||
desk: desk.value,
|
||||
typeDefId: typeof route.query.typeDefId === 'string' && route.query.typeDefId.trim()
|
||||
? route.query.typeDefId.trim()
|
||||
: undefined,
|
||||
@@ -456,7 +457,7 @@ function deskDetailQuery(columnStageId?: string): Record<string, string> {
|
||||
filter: filter.value,
|
||||
};
|
||||
if (board.value) query.board = board.value;
|
||||
if (showDeskTabs.value) query.desk = desk.value;
|
||||
query.desk = desk.value;
|
||||
const search = typeof route.query.q === 'string' ? route.query.q.trim() : '';
|
||||
if (search) query.q = search;
|
||||
if (typeFilter.value !== 'all') query.typeDefId = typeFilter.value;
|
||||
|
||||
@@ -842,7 +842,8 @@ function moveToStage(stageId: string) {
|
||||
message.info(
|
||||
'سهم شما ثبت شد. فعالیت وقتی انجامشده میشود که همهٔ مسئولها سهم خود را بزنند.',
|
||||
);
|
||||
await load();
|
||||
discardDrafts();
|
||||
await advanceAfterLeavingColumn(leftId);
|
||||
return;
|
||||
}
|
||||
discardDrafts();
|
||||
@@ -938,6 +939,12 @@ async function complete(kind: 'share' | 'force' | 'undo' = 'share') {
|
||||
await advanceAfterLeavingColumn(leftId);
|
||||
return;
|
||||
}
|
||||
// سهم شخصی ثبت شد ولی فعالیت هنوز باز است — از میزکار این نفر خارج شو
|
||||
if (kind === 'share' && data.completionMode === 'all') {
|
||||
discardDrafts();
|
||||
await advanceAfterLeavingColumn(leftId);
|
||||
return;
|
||||
}
|
||||
activity.value = data;
|
||||
} catch {
|
||||
error.value =
|
||||
|
||||
Reference in New Issue
Block a user