@ehfuse/taskbox 0.5.142 → 0.5.144

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import type { TaskBoxBugDevice, TaskBoxBugRepro, TaskBoxChecklistItem, TaskBoxPriority, TaskBoxReminder } from "./item";
1
+ import type { TaskBoxBugDevice, TaskBoxBugRepro, TaskBoxChecklistItem, TaskBoxPriority, TaskBoxReminder, TaskBoxVisibility } from "./item";
2
2
  /** 새 업무 등록 폼 값이다. */
3
3
  export interface TaskBoxForm {
4
4
  title: string;
@@ -11,7 +11,8 @@ export interface TaskBoxForm {
11
11
  is_notice: boolean;
12
12
  is_event: boolean;
13
13
  is_bug: boolean;
14
- is_open: boolean;
14
+ visibility: TaskBoxVisibility;
15
+ visibility_group_seq: number;
15
16
  bug_repro: TaskBoxBugRepro | "";
16
17
  bug_device: TaskBoxBugDevice | "";
17
18
  bug_where: string;
@@ -78,6 +78,8 @@ export interface TaskBoxComment {
78
78
  */
79
79
  export type TaskBoxReminder = "none" | "min30_before" | "hour1_before" | "hour2_before" | "same_day" | "day_before" | "two_days_before" | "three_days_before" | "week_before";
80
80
  /** 업무함 목록 한 건이다. */
81
+ /** 공개 범위다 — involved=비공개(관여자만)/group=부서공개/all=전체공개. */
82
+ export type TaskBoxVisibility = "involved" | "group" | "all";
81
83
  export interface TaskBoxItem {
82
84
  seq: number;
83
85
  title: string;
@@ -96,6 +98,8 @@ export interface TaskBoxItem {
96
98
  sprint_seq?: number;
97
99
  story_points?: number;
98
100
  is_open?: boolean;
101
+ visibility?: TaskBoxVisibility;
102
+ visibility_group_seq?: number;
99
103
  bug_repro?: TaskBoxBugRepro | "";
100
104
  bug_device?: TaskBoxBugDevice | "";
101
105
  bug_where?: string;
@@ -1,13 +1,21 @@
1
1
  /** 업무 가시성 판정 유틸이다 — 서버 bootstrap 필터(canViewTask)와 같은 규칙을 프런트에서 재현한다(realtime 수신 반영용). */
2
- import type { TaskBoxItem } from "../types";
2
+ import type { TaskBoxItem, TaskBoxVisibility } from "../types";
3
3
  /**
4
- * 내가 이 업무를 볼 수 있는지 판정한다.
5
- * 일반 업무 = 관여자(작성자/책임자/참조자), 공지 = 작성자 + 대상자(대상 미지정이면 전 직원).
4
+ * 공개 범위를 정규화한다 — 값 없는 옛 행은 is_open(구 접수함 공개)에서 유도한다(AS normalizeVisibility 동일).
6
5
  */
7
- export declare function canViewTaskItem(item: TaskBoxItem, myAccountSeq: number): boolean;
6
+ export declare function taskVisibilityOf(item: Pick<TaskBoxItem, "visibility" | "is_open">): TaskBoxVisibility;
7
+ /**
8
+ * 내가 이 업무를 볼 수 있는지 판정한다(AS canViewTask 동일 규칙).
9
+ * 일반 업무 = 관여자(작성자/책임자/참조자) + 공개 범위(부서공개=내 부서 일치, 전체공개=전 직원),
10
+ * 공지 = 작성자 + 대상자(대상 미지정이면 전 직원).
11
+ * myGroupSeq 는 부서공개 판정용(내 직원행의 hr_group seq — 없으면 0). 화면에 이미 그려진 행은
12
+ * 서버가 걸러 내려준 것이라 생략해도 되지만, realtime 수신처럼 걸러지지 않은 데이터에는 반드시 넘긴다.
13
+ */
14
+ export declare function canViewTaskItem(item: TaskBoxItem, myAccountSeq: number, myGroupSeq?: number): boolean;
8
15
  /**
9
16
  * 접수함(미배정 공개) 업무인지 판정한다 — AS isOpenPoolTask 와 같은 규칙이다.
10
- * 담당자가 정해지거나 완료·보관되면 접수함에서 내려간다.
17
+ * 공개 범위(부서/전체)가 열려 있고 담당자가 없으면 열람자 누구나 "가져가기" 할 수 있다.
18
+ * 담당자가 정해지거나 완료·보관되면 접수함(가져가기)에서만 내려간다(가시성은 유지).
11
19
  */
12
20
  export declare function isOpenPoolTaskItem(item: TaskBoxItem): boolean;
13
21
  /** 내가 이 업무를 "가져가기" 할 수 있는지 판정한다(접수함 공개 + 내가 담당이 아님). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ehfuse/taskbox",
3
- "version": "0.5.142",
3
+ "version": "0.5.144",
4
4
  "description": "A React/MUI task inbox component with notices, per-user assignments, read tracking, and mobile card UI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",