mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-06 01:37:42 +02:00
* feat(tracker): Gantt chart for the issue tracker Builds on the merged search/filter rework (#10998). Introduces @hcengineering/gantt, a dependency-free scheduling/zoom/drag/viewport engine package (with a neutral GanttDependency contract), and wires the tracker-specific adapter, Svelte UI, model schema, dependency-shift notifications and sanity coverage in tracker-resources. Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com> * fix(tracker): source Gantt holidays from HR and scope confirm-gate per view Follow-up to review feedback on #10992: - Confirm-gate: the module-global flag is replaced by a createConfirmGate() factory - one instance per mounted GanttView, so two Gantt views mounted at once in the same JS context no longer block each other's pointer input. A two-instance independence test guards the regression. - Sidebar sorting: the stale deadline cast is dropped and issue.deadline is read directly (the field was added to the Issue model in this PR). - HR holidays: the per-project WorkingDaysConfig.holidays field duplicated the workspace-wide hr.class.PublicHoliday concept and could drift from the real HR calendar. It is removed. WorkingDaysConfig now carries only the weekday mask and an optional holidayDepartment. The tracker adapter resolves holidays for the selected department plus all ancestors up to hr.ids.Head, matching HR's existing inheritance semantics (hr-resources ScheduleView). A missing or invalid reference falls back to company-wide (root) holidays; unrelated departments are never included. The ancestor walk is cycle/missing-parent safe. A small WorkingDaysEditor in the existing project create/edit dialog lets users with the existing project permission enable the mode, choose weekdays, and select an HR department (default: Company-wide). It persists through the existing project create/update transaction paths (createDoc on create, client.update on edit) and uses $unset when the mode is disabled. At least one working day must stay active. Calendar loading is explicit via a CalendarStateMachine: project-scoped drag, resize, cascade, keyboard-shift and auto-schedule mutations stay disabled until both the project config and the holiday data have loaded. A monotonic generation ticket (bumped synchronously on project switch) is re-checked immediately before every calendar-dependent date commit, so work started in one project can never persist after a switch to another. The all-projects view has no single project calendar, so calendar-dependent edits are read-only there; display, selection, the context menu and the manual date-picker (which does no calendar arithmetic and takes no mutation ticket) stay available. This depends on the lightweight @hcengineering/hr model package, but not on hr-resources; the tracker adapter uses hr.class.* and hr.ids.Head at runtime, and actual HR model presence is checked through the hierarchy - without the HR model, holidays resolve to an empty set. The @hcengineering/gantt engine package stays domain-neutral (no @hcengineering imports, no runtime deps). Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com> * fix(gantt): measure FS gap-preservation floor in working days The finish-to-start gap-preservation floor in the cascade scheduler mixed two time measures: the FS snap anchor is working-calendar aware, but the floor added a raw calendar-millisecond start-side delta. With an active working calendar the two diverge, so dragging a predecessor over a weekend over-shifted the successor across non-working days (a Fri->Mon body drag is 3 calendar days but only 1 working day, and could even land a successor on a Saturday). Measure the floor on the DUE side in working days instead: translate the predecessor's shift via the new workingDayDelta helper and advance the floor base with addWorkingDays over the calendar. A day-granular resize gate (utcMidnight comparison, not a raw === 0 test) arms the floor only on a start-DAY move, so a pure due-resize stays a pure snap even when the stored issue carries a time-of-day on the cascade-commit path. The floor base is normalized via utcMidnight(targetAnchor). The legacy path (cfg === undefined) stays byte-identical to today's raw-ms floor. A left-resize in working-days mode now correctly no-ops the floor (the due, and thus the FS gap, did not move) instead of shifting on the raw start delta. Engine: add workingDayDelta (signed, half-open from-exclusive/to-inclusive working-day step count) and export the previously-private utcMidnight from packages/gantt/src/working-days.ts. The engine stays domain-neutral (no @hcengineering imports, empty dependencies). Adds engine and adapter test coverage: workingDayDelta cases and the full FS floor matrix (right-resize no-push, weekend-spanner body drag, floor wins over snap, holiday in the floor path, floor-dominant multi-hop chain, negative delta, legacy no-cfg, SS pure-snap, raw time-of-day right-resize, direct left-resize). Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com> --------- Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com> Co-authored-by: Michael Uray <michaeluray@users.noreply.github.com>
168 lines
6.2 KiB
JSON
168 lines
6.2 KiB
JSON
{
|
|
"string": {
|
|
"Contains": "包含",
|
|
"NotContains": "不包含",
|
|
"MoveClass": "移动 {class}",
|
|
"SelectToMove": "选择要将 {class} 移动到的 {classLabel}。",
|
|
"Delete": "删除",
|
|
"Move": "移动",
|
|
"Cancel": "取消",
|
|
"LabelYes": "是",
|
|
"LabelNo": "否",
|
|
"LabelNA": "不适用",
|
|
"ChooseAColor": "选择颜色",
|
|
"Table": "表格",
|
|
"Role": "角色",
|
|
"DeleteObject": "删除对象",
|
|
"DeleteObjectConfirm": "您想要删除 {count, plural, =1 {这个对象} other {这些 # 个对象}} 吗?",
|
|
"NoCreatePermissionTitle": "没有足够的权限创建",
|
|
"DeletePopupNoPermissionTitle": "没有足够的权限删除。",
|
|
"DeletePopupNoPermissionLabel": "请联系以下列表中的人员以便他们执行此操作。",
|
|
"DeletePopupCreatorLabel": "创建者(只能删除他们创建的):",
|
|
"DeletePopupOwnerLabel": "所有者(可以删除所有的):",
|
|
"Archive": "归档",
|
|
"ArchiveConfirm": "您想要归档这个 {count, plural, =1 {对象} other {# 个对象}} 吗?",
|
|
"Open": "打开",
|
|
"OpenInNewTab": "在新标签页中打开",
|
|
"Assignees": "受托人",
|
|
"Labels": "标签",
|
|
"MoveLeft": "向左移动",
|
|
"MoveRight": "向右移动",
|
|
"MoveUp": "向上移动",
|
|
"MoveDown": "向下移动",
|
|
"RestoreDefaults": "恢复默认",
|
|
"SelectItem": "选择焦点项目",
|
|
"SelectItemAll": "选择所有项目",
|
|
"SelectItemNone": "取消选择所有项目",
|
|
"NumberItems": "{count, plural, =0 {没有项目} =1 {1 个项目} other {# 个项目}}",
|
|
|
|
"Assigned": "已分配",
|
|
"Created": "已创建",
|
|
"Subscribed": "已订阅",
|
|
|
|
"ShowPreview": "显示文档预览",
|
|
"ShowActions": "显示操作弹窗",
|
|
|
|
"ActionPlaceholder": "搜索或运行命令...",
|
|
"General": "常规",
|
|
"Navigation": "导航",
|
|
"Editor": "编辑器",
|
|
"MarkdownFormatting": "格式化",
|
|
"CustomizeView": "自定义视图",
|
|
"ConfigureColumns": "配置列",
|
|
"Filter": "筛选",
|
|
"ClearFilters": "清除筛选",
|
|
"FilterLessThan": "小于",
|
|
"FilterGreaterThan": "大于",
|
|
"FilterIsNot": "不是",
|
|
"FilterIsEither": "是",
|
|
"FilterIsEitherPlural": "是",
|
|
"FilterStatesCount": "{value, plural, =1 {1 个状态} other {# 个状态}}",
|
|
"FilterUpdated": "筛选已更新",
|
|
"FilterRemoved": "{count, plural, =1 {# 个不存在的值} other {# 个不存在的值}} 已从筛选中移除",
|
|
"Before": "之前",
|
|
"After": "之后",
|
|
"Apply": "应用",
|
|
"Save": "保存",
|
|
"IncludeItemsThatMatch": "包括符合条件的项目",
|
|
"AnyFilter": "任意筛选",
|
|
"AllFilters": "所有筛选",
|
|
"MatchCriteria": "匹配条件",
|
|
"DontMatchCriteria": "不匹配条件",
|
|
"View": "视图",
|
|
"MarkupEditor": "富文本编辑器",
|
|
"List": "列表",
|
|
"Grid": "网格",
|
|
"Timeline": "时间线",
|
|
"Select": "选择",
|
|
"NoGrouping": "无分组",
|
|
"Grouping": "分组",
|
|
"Ordering": "排序",
|
|
"Manual": "手动",
|
|
|
|
"FilteredViews": "筛选视图",
|
|
"NewFilteredView": "新筛选视图",
|
|
"FilteredViewName": "筛选视图名称",
|
|
"Then": "然后",
|
|
"ShowPreviewOnClick": "请点击显示文档索引预览...",
|
|
"Shown": "显示 {len} 结果 {total, plural, =-1 {} other {共筛选 # 个项目}}",
|
|
"Total": "总计: {total, plural, other {#}}",
|
|
"ShowEmptyGroups": "显示空组",
|
|
"Overdue": "逾期",
|
|
"Today": "今天",
|
|
"Yesterday": "昨天",
|
|
"ThisWeek": "本周",
|
|
"NextWeek": "下周",
|
|
"ThisMonth": "本月",
|
|
"NextMonth": "下月",
|
|
"NotSpecified": "未指定",
|
|
"ExactDate": "确切日期",
|
|
"BeforeDate": "日期之前",
|
|
"AfterDate": "日期之后",
|
|
"BetweenDates": "日期之间",
|
|
"AddSavedView": "添加保存的视图",
|
|
"Public": "公开",
|
|
"Hide": "隐藏",
|
|
"Rename": "重命名",
|
|
"SaveAs": "另存为",
|
|
"And": "和",
|
|
"Between": "之间",
|
|
"ShowColors": "使用颜色",
|
|
"Show": "显示",
|
|
"FilterArrayAll": "包括全部",
|
|
"FilterArrayAny": "包括任意",
|
|
"Or": "或",
|
|
"HyperlinkPlaceholder": "https://jappleseed.com",
|
|
"CopyToClipboard": "复制到剪贴板",
|
|
"CopyAll": "复制全部",
|
|
"CopyDocumentMarkdown": "复制为 Markdown",
|
|
"CopyAsMarkdownTable": "复制为 Markdown 表格",
|
|
"TableCopiedToClipboard": "表格已复制到剪贴板",
|
|
"TableCopyFailed": "复制表格到剪贴板失败",
|
|
"PublicView": "公开视图",
|
|
|
|
"ChooseIcon": "选择图标",
|
|
"IconColor": "选择图标颜色",
|
|
"IconCategory": "图标",
|
|
"EmojiCategory": "表情",
|
|
"Type": "类型",
|
|
"ToViewCommands": "查看可用命令",
|
|
"UnArchive": "取消归档",
|
|
"UnArchiveConfirm": "您想要取消归档这个 {count, plural, =1 {对象} other {# 个对象}} 吗?",
|
|
"Pin": "固定",
|
|
"Unpin": "取消固定",
|
|
"Archived": "已归档",
|
|
"MoreActions": "更多操作",
|
|
"Leave": "离开",
|
|
"Join": "加入",
|
|
"Copied": "已复制",
|
|
"Title": "标题",
|
|
"HideArchived": "隱藏已存檔",
|
|
"RemoveRelation": "移除关系",
|
|
"RemoveRelationConfirmation": "您要移除关系吗?",
|
|
"MasterDetail": "主要-详细",
|
|
"Tree": "树",
|
|
"Document": "文档",
|
|
"Loading": "加载中...",
|
|
"NoRelations": "无关系",
|
|
"ReadOnlyWarningTitle": "✨ 匿名访客演示",
|
|
"ReadOnlyWarningMessage": "您处于只读模式。选择您的路径:加入此工作区协作(作为访客)或创建您自己的空间来完全管理项目 — 任务、截止日期、团队!",
|
|
"ReadOnlyJoinWorkspace": "加入工作区",
|
|
"ReadOnlySignUp": "创建工作区",
|
|
"PermissionWarningTitle": "✨ 提升您的访问权限!",
|
|
"PermissionWarningMessage": "您当前角色的权限有限。要解锁此功能和其他高级功能,请让您的工作区管理员升级您的访问权限!",
|
|
"Icon": "图标",
|
|
"Color": "颜色",
|
|
"AutomationOnly": "仅限自动化",
|
|
"CopyLink": "复制链接",
|
|
"ValueIsSet": "值已设置",
|
|
"RoleLabel": "角色:{role}",
|
|
"ForbidAttributeChanges": "禁止更改属性: ",
|
|
"AllowAttributeChanges": "允许更改属性: ",
|
|
"RelationshipTable": "关系表",
|
|
"FilterOverflowBadge": "+{count}",
|
|
"AddFilter": "添加过滤器",
|
|
"HiddenFilters": "隐藏的过滤器"
|
|
}
|
|
}
|