@tuturuuu/ui 0.8.0 → 0.9.0
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.
- package/CHANGELOG.md +40 -0
- package/biome.json +1 -1
- package/package.json +73 -71
- package/src/components/ui/accordion.tsx +1 -1
- package/src/components/ui/breadcrumb.tsx +1 -1
- package/src/components/ui/calendar-app/calendar-page-shell.tsx +4 -0
- package/src/components/ui/calendar-app/components/calendar-connections-settings-content.tsx +239 -33
- package/src/components/ui/calendar-app/components/load-smart-scheduling-tasks.tsx +143 -0
- package/src/components/ui/calendar-app/components/priority-view.tsx +10 -3
- package/src/components/ui/calendar-app/components/tasks-sidebar.tsx +4 -116
- package/src/components/ui/calendar-app/components/use-calendar-connections-manager.ts +67 -2
- package/src/components/ui/calendar.tsx +1 -1
- package/src/components/ui/carousel.tsx +1 -1
- package/src/components/ui/chat/chat-agent-details-external-thread-panel.test.tsx +1 -1
- package/src/components/ui/chat/chat-agent-details-external-thread-panel.tsx +1 -1
- package/src/components/ui/chat/chat-agent-details-operations-panel.test.tsx +1 -1
- package/src/components/ui/chat/chat-agent-details-operations-panel.tsx +1 -1
- package/src/components/ui/chat/chat-agent-details-setup-panel.tsx +1 -1
- package/src/components/ui/chat/chat-agent-details-sidebar.test.tsx +1 -1
- package/src/components/ui/chat/chat-agent-details-sidebar.tsx +2 -2
- package/src/components/ui/chat/chat-agent-details-utils.test.ts +1 -1
- package/src/components/ui/chat/chat-agent-details-utils.tsx +1 -1
- package/src/components/ui/chat/chat-agent-details-zalo-personal-panel.tsx +2 -2
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/color-picker.tsx +1 -1
- package/src/components/ui/command.tsx +1 -1
- package/src/components/ui/context-menu.tsx +5 -1
- package/src/components/ui/custom/__tests__/settings-dialog-shell.test.tsx +3 -0
- package/src/components/ui/custom/__tests__/workspace-select-helpers.test.ts +19 -0
- package/src/components/ui/custom/combobox.test.tsx +195 -0
- package/src/components/ui/custom/combobox.tsx +273 -156
- package/src/components/ui/custom/education/modules/youtube/delete-link-button.tsx +5 -13
- package/src/components/ui/custom/facebook-mockup/facebook-mockup.tsx +7 -1
- package/src/components/ui/custom/facebook-mockup/form.tsx +1 -1
- package/src/components/ui/custom/facebook-mockup/image-upload-field.tsx +1 -1
- package/src/components/ui/custom/facebook-mockup/preview.tsx +1 -1
- package/src/components/ui/custom/settings-dialog-shell.tsx +2 -1
- package/src/components/ui/custom/theme-toggle.tsx +1 -1
- package/src/components/ui/custom/workspace-select.tsx +8 -3
- package/src/components/ui/dialog.test.tsx +52 -0
- package/src/components/ui/dialog.tsx +6 -2
- package/src/components/ui/dropdown-menu.tsx +5 -1
- package/src/components/ui/finance/debts/debt-loan-form.tsx +12 -5
- package/src/components/ui/finance/debts/debt-loan-summary.tsx +3 -2
- package/src/components/ui/finance/debts/debts-page.test.tsx +54 -5
- package/src/components/ui/finance/debts/debts-page.tsx +15 -2
- package/src/components/ui/finance/invoices/components/subscription-group-selector.tsx +3 -5
- package/src/components/ui/finance/invoices/new-invoice-page.test.tsx +25 -5
- package/src/components/ui/finance/invoices/new-invoice-page.tsx +7 -2
- package/src/components/ui/finance/invoices/standard-invoice.tsx +4 -2
- package/src/components/ui/finance/invoices/subscription-invoice.tsx +4 -2
- package/src/components/ui/finance/invoices/utils.ts +3 -1
- package/src/components/ui/finance/transactions/form-content-dialog.tsx +3 -0
- package/src/components/ui/finance/transactions/form-types.ts +1 -0
- package/src/components/ui/finance/transactions/form.tsx +2 -0
- package/src/components/ui/finance/transactions/infinite-transactions-list.tsx +2 -0
- package/src/components/ui/finance/transactions/period-charts/category-breakdown-dialog.tsx +1 -1
- package/src/components/ui/finance/transactions/transaction-edit-dialog.tsx +1 -4
- package/src/components/ui/finance/transactions/transactions-create-summary.tsx +3 -0
- package/src/components/ui/finance/transactions/transactions-page.tsx +4 -1
- package/src/components/ui/finance/wallets/form.test.tsx +51 -3
- package/src/components/ui/finance/wallets/form.tsx +15 -4
- package/src/components/ui/finance/wallets/walletId/wallet-details-actions.tsx +4 -0
- package/src/components/ui/finance/wallets/walletId/wallet-details-page.tsx +4 -2
- package/src/components/ui/finance/wallets/wallets-data-table.tsx +1 -0
- package/src/components/ui/finance/wallets/wallets-page.tsx +5 -2
- package/src/components/ui/input-otp.tsx +1 -1
- package/src/components/ui/legacy/calendar/all-day-event-bar.tsx +28 -39
- package/src/components/ui/legacy/calendar/calendar-cell.tsx +2 -0
- package/src/components/ui/legacy/calendar/calendar-content.tsx +10 -6
- package/src/components/ui/legacy/calendar/calendar-header.tsx +23 -3
- package/src/components/ui/legacy/calendar/calendar-loading-skeleton.tsx +135 -0
- package/src/components/ui/legacy/calendar/calendar-matrix.tsx +175 -237
- package/src/components/ui/legacy/calendar/event-card.test.tsx +177 -0
- package/src/components/ui/legacy/calendar/event-card.tsx +220 -131
- package/src/components/ui/legacy/calendar/event-modal.tsx +17 -17
- package/src/components/ui/legacy/calendar/event-provider-display.tsx +69 -0
- package/src/components/ui/legacy/calendar/smart-calendar.test.tsx +86 -4
- package/src/components/ui/legacy/calendar/smart-calendar.tsx +32 -2
- package/src/components/ui/legacy/meet/create-plan-dialog.tsx +19 -10
- package/src/components/ui/navigation-menu.tsx +1 -1
- package/src/components/ui/pagination.tsx +1 -1
- package/src/components/ui/radio-group.tsx +1 -1
- package/src/components/ui/select.tsx +5 -1
- package/src/components/ui/sheet.tsx +1 -1
- package/src/components/ui/sidebar.tsx +1 -1
- package/src/components/ui/storefront/cart-popover.tsx +61 -0
- package/src/components/ui/storefront/cart-summary-parts.tsx +290 -0
- package/src/components/ui/storefront/cart-summary.tsx +93 -154
- package/src/components/ui/storefront/checkout-overlay.tsx +4 -5
- package/src/components/ui/storefront/listing-card.tsx +1 -1
- package/src/components/ui/storefront/merch-sections.tsx +70 -0
- package/src/components/ui/storefront/product-detail.tsx +1 -1
- package/src/components/ui/storefront/storefront-surface.test.tsx +106 -11
- package/src/components/ui/storefront/storefront-surface.tsx +101 -166
- package/src/components/ui/storefront/types.ts +4 -0
- package/src/components/ui/storefront/utils.ts +6 -0
- package/src/components/ui/text-editor/__tests__/extensions.test.ts +123 -0
- package/src/components/ui/text-editor/background-color-extension.ts +62 -0
- package/src/components/ui/text-editor/color-controls.tsx +284 -0
- package/src/components/ui/text-editor/editor.tsx +69 -14
- package/src/components/ui/text-editor/extensions.ts +8 -2
- package/src/components/ui/text-editor/highlight-extension.ts +22 -0
- package/src/components/ui/text-editor/tool-bar.tsx +9 -16
- package/src/components/ui/toast.tsx +1 -1
- package/src/components/ui/tu-do/boards/__tests__/board-share-dialog.test.tsx +270 -0
- package/src/components/ui/tu-do/boards/board-public-link-section.tsx +231 -0
- package/src/components/ui/tu-do/boards/board-share-dialog.tsx +222 -109
- package/src/components/ui/tu-do/boards/boardId/board-column.tsx +112 -43
- package/src/components/ui/tu-do/boards/boardId/kanban/bulk/bulk-mutations-clear-delete.ts +2 -0
- package/src/components/ui/tu-do/boards/boardId/kanban/bulk/bulk-mutations-move.ts +5 -0
- package/src/components/ui/tu-do/boards/boardId/kanban/bulk/bulk-mutations-updates.ts +3 -0
- package/src/components/ui/tu-do/boards/boardId/kanban/data/kanban-deadline-query.ts +50 -2
- package/src/components/ui/tu-do/boards/boardId/kanban/dnd/__tests__/column-reorder.test.ts +17 -0
- package/src/components/ui/tu-do/boards/boardId/kanban/dnd/column-reorder.ts +4 -1
- package/src/components/ui/tu-do/boards/boardId/kanban/dnd/task-drag-cache.ts +38 -9
- package/src/components/ui/tu-do/boards/boardId/kanban/dnd/task-drag-order.ts +2 -8
- package/src/components/ui/tu-do/boards/boardId/kanban/dnd/task-sort-key.ts +47 -0
- package/src/components/ui/tu-do/boards/boardId/kanban/dnd/use-kanban-dnd.ts +81 -30
- package/src/components/ui/tu-do/boards/boardId/kanban/planner/__tests__/kanban-planner-island.test.tsx +380 -0
- package/src/components/ui/tu-do/boards/boardId/kanban/planner/kanban-planner-dialog.tsx +204 -0
- package/src/components/ui/tu-do/boards/boardId/kanban/planner/planner-digest-panel.tsx +61 -0
- package/src/components/ui/tu-do/boards/boardId/kanban/planner/planner-item-strip.tsx +54 -0
- package/src/components/ui/tu-do/boards/boardId/kanban/planner/planner-plan-toolbar.tsx +251 -0
- package/src/components/ui/tu-do/boards/boardId/kanban/planner/planner-scope-badge.tsx +27 -0
- package/src/components/ui/tu-do/boards/boardId/kanban/planner/planner-section.tsx +58 -0
- package/src/components/ui/tu-do/boards/boardId/kanban/planner/planner-share-dialog.tsx +238 -0
- package/src/components/ui/tu-do/boards/boardId/kanban/planner/planner-target-controls.tsx +143 -0
- package/src/components/ui/tu-do/boards/boardId/kanban/planner/planner-utils.ts +65 -0
- package/src/components/ui/tu-do/boards/boardId/kanban/planner/use-kanban-planner-state.ts +234 -0
- package/src/components/ui/tu-do/boards/boardId/kanban/rendering/kanban-columns.test.tsx +397 -2
- package/src/components/ui/tu-do/boards/boardId/kanban/rendering/kanban-columns.tsx +103 -13
- package/src/components/ui/tu-do/boards/boardId/kanban/rendering/kanban-deadline-panels.tsx +443 -19
- package/src/components/ui/tu-do/boards/boardId/kanban/rendering/kanban-skeleton.tsx +94 -32
- package/src/components/ui/tu-do/boards/boardId/kanban.tsx +213 -106
- package/src/components/ui/tu-do/boards/boardId/task-board-server-page.test.tsx +26 -4
- package/src/components/ui/tu-do/boards/boardId/task-board-server-page.tsx +5 -2
- package/src/components/ui/tu-do/boards/boardId/task-card/measured-task-card.tsx +3 -0
- package/src/components/ui/tu-do/boards/boardId/task-card/task-card-comparator.ts +3 -0
- package/src/components/ui/tu-do/boards/boardId/task-card/task-card.tsx +191 -28
- package/src/components/ui/tu-do/boards/boardId/task-filter.test.tsx +152 -0
- package/src/components/ui/tu-do/boards/boardId/task-filter.tsx +555 -545
- package/src/components/ui/tu-do/boards/boardId/task-list.tsx +7 -0
- package/src/components/ui/tu-do/boards/share-section.tsx +100 -0
- package/src/components/ui/tu-do/drafts/draft-convert-dialog.tsx +10 -12
- package/src/components/ui/tu-do/drafts/drafts-page.tsx +33 -16
- package/src/components/ui/tu-do/initiatives/task-initiatives-client.tsx +56 -88
- package/src/components/ui/tu-do/my-tasks/my-tasks-content.tsx +26 -2
- package/src/components/ui/tu-do/my-tasks/use-my-tasks-state.ts +55 -8
- package/src/components/ui/tu-do/notes/note-edit-dialog.tsx +1 -4
- package/src/components/ui/tu-do/shared/__tests__/board-client.test.tsx +25 -0
- package/src/components/ui/tu-do/shared/__tests__/board-header.test.tsx +341 -38
- package/src/components/ui/tu-do/shared/__tests__/board-switcher.test.tsx +253 -0
- package/src/components/ui/tu-do/shared/__tests__/board-views.test.tsx +203 -2
- package/src/components/ui/tu-do/shared/__tests__/task-board-loading-state.test.tsx +17 -0
- package/src/components/ui/tu-do/shared/__tests__/task-legacy-route-recovery.test.tsx +16 -0
- package/src/components/ui/tu-do/shared/board-client.tsx +2 -7
- package/src/components/ui/tu-do/shared/board-config-storage.ts +7 -1
- package/src/components/ui/tu-do/shared/board-header.tsx +464 -975
- package/src/components/ui/tu-do/shared/board-layout-settings.tsx +165 -136
- package/src/components/ui/tu-do/shared/board-switcher.tsx +209 -217
- package/src/components/ui/tu-do/shared/board-views.tsx +587 -75
- package/src/components/ui/tu-do/shared/list-view.tsx +227 -1
- package/src/components/ui/tu-do/shared/recycle-bin-panel.tsx +142 -94
- package/src/components/ui/tu-do/shared/special-task-list-pins.ts +51 -0
- package/src/components/ui/tu-do/shared/task-board-loading-state.tsx +28 -0
- package/src/components/ui/tu-do/shared/task-edit-dialog/field-diff-viewer.tsx +3 -2
- package/src/components/ui/tu-do/shared/task-edit-dialog/selective-revert-panel.test.tsx +91 -0
- package/src/components/ui/tu-do/shared/task-edit-dialog/selective-revert-panel.tsx +123 -78
- package/src/components/ui/tu-do/shared/task-edit-dialog/task-activity-section.tsx +7 -1
- package/src/components/ui/tu-do/shared/task-edit-dialog/task-snapshot-dialog.tsx +8 -3
- package/src/components/ui/tu-do/shared/task-edit-dialog.tsx +2 -1
- package/src/components/ui/tu-do/shared/task-legacy-route-recovery.tsx +2 -9
- package/src/declarations.d.ts +1 -0
- package/src/hooks/__tests__/use-calendar-readonly.test.tsx +322 -2
- package/src/hooks/__tests__/use-calendar-sync.test.tsx +446 -0
- package/src/hooks/use-calendar-sync.tsx +247 -243
- package/src/hooks/use-calendar.tsx +323 -138
- package/src/hooks/use-task-actions.ts +24 -0
- package/src/hooks/use-user-workspace-config.ts +75 -0
- package/src/hooks/use-workspace-currency.ts +8 -3
- package/src/hooks/useBoardRealtimeEventHandler.ts +11 -0
|
@@ -76,13 +76,13 @@ import { EditListDialog } from './edit-list-dialog';
|
|
|
76
76
|
import { isTaskListNameExistsError } from './task-board-errors';
|
|
77
77
|
import { translateTaskListNameForDisplay } from './utils/translate-task-list-display-name';
|
|
78
78
|
|
|
79
|
-
interface
|
|
80
|
-
open: boolean;
|
|
81
|
-
onOpenChange: (open: boolean) => void;
|
|
79
|
+
interface BoardLayoutSettingsContentProps {
|
|
82
80
|
boardId: string;
|
|
83
81
|
wsId?: string;
|
|
84
82
|
lists: WorkspaceTaskList[];
|
|
85
83
|
onUpdate: () => void;
|
|
84
|
+
disableScrollArea?: boolean;
|
|
85
|
+
scrollAreaClassName?: string;
|
|
86
86
|
translations?: {
|
|
87
87
|
boardLayoutSettings?: string;
|
|
88
88
|
boardLayoutSettingsDescription?: string;
|
|
@@ -136,6 +136,11 @@ interface BoardLayoutSettingsProps {
|
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
interface BoardLayoutSettingsProps extends BoardLayoutSettingsContentProps {
|
|
140
|
+
open: boolean;
|
|
141
|
+
onOpenChange: (open: boolean) => void;
|
|
142
|
+
}
|
|
143
|
+
|
|
139
144
|
const statusConfig = {
|
|
140
145
|
not_started: {
|
|
141
146
|
icon: CircleDashed,
|
|
@@ -458,15 +463,15 @@ function SortableListItem({
|
|
|
458
463
|
);
|
|
459
464
|
}
|
|
460
465
|
|
|
461
|
-
export function
|
|
462
|
-
open,
|
|
463
|
-
onOpenChange,
|
|
466
|
+
export function BoardLayoutSettingsContent({
|
|
464
467
|
boardId,
|
|
465
468
|
wsId,
|
|
466
469
|
lists,
|
|
467
470
|
onUpdate,
|
|
471
|
+
disableScrollArea = false,
|
|
472
|
+
scrollAreaClassName,
|
|
468
473
|
translations,
|
|
469
|
-
}:
|
|
474
|
+
}: BoardLayoutSettingsContentProps) {
|
|
470
475
|
const t = useMemo(
|
|
471
476
|
() => ({
|
|
472
477
|
boardLayoutSettings:
|
|
@@ -895,139 +900,127 @@ export function BoardLayoutSettings({
|
|
|
895
900
|
setCreatingList(true);
|
|
896
901
|
}, []);
|
|
897
902
|
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
{/* Lists by Status */}
|
|
911
|
-
<ScrollArea className="h-125 pr-4">
|
|
912
|
-
<DndContext
|
|
913
|
-
sensors={sensors}
|
|
914
|
-
collisionDetection={closestCenter}
|
|
915
|
-
onDragEnd={handleDragEnd}
|
|
916
|
-
>
|
|
917
|
-
<div className="space-y-6">
|
|
918
|
-
{statuses.map((status) => {
|
|
919
|
-
const StatusIcon = statusConfig[status].icon;
|
|
920
|
-
const statusLists = (groupedLists[status] || []).sort(
|
|
921
|
-
(a, b) => (a?.position || 0) - (b?.position || 0)
|
|
922
|
-
);
|
|
903
|
+
const listGroups = (
|
|
904
|
+
<DndContext
|
|
905
|
+
sensors={sensors}
|
|
906
|
+
collisionDetection={closestCenter}
|
|
907
|
+
onDragEnd={handleDragEnd}
|
|
908
|
+
>
|
|
909
|
+
<div className="space-y-6">
|
|
910
|
+
{statuses.map((status) => {
|
|
911
|
+
const StatusIcon = statusConfig[status].icon;
|
|
912
|
+
const statusLists = (groupedLists[status] || []).sort(
|
|
913
|
+
(a, b) => (a?.position || 0) - (b?.position || 0)
|
|
914
|
+
);
|
|
923
915
|
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
{t.addNewList}
|
|
956
|
-
</Button>
|
|
957
|
-
</div>
|
|
916
|
+
return (
|
|
917
|
+
<div key={status} className="space-y-3">
|
|
918
|
+
<div className="flex items-center justify-between gap-3">
|
|
919
|
+
<div className="flex items-center gap-2">
|
|
920
|
+
<div
|
|
921
|
+
className={cn(
|
|
922
|
+
'flex h-6 w-6 items-center justify-center rounded',
|
|
923
|
+
statusConfig[status].bgColor
|
|
924
|
+
)}
|
|
925
|
+
>
|
|
926
|
+
<StatusIcon
|
|
927
|
+
className={cn('h-3.5 w-3.5', statusConfig[status].color)}
|
|
928
|
+
/>
|
|
929
|
+
</div>
|
|
930
|
+
<h3 className="font-semibold text-sm">
|
|
931
|
+
{statusLabels[status]}
|
|
932
|
+
</h3>
|
|
933
|
+
<Badge variant="secondary" className="text-[10px]">
|
|
934
|
+
{statusLists.length}
|
|
935
|
+
</Badge>
|
|
936
|
+
</div>
|
|
937
|
+
<Button
|
|
938
|
+
variant="ghost"
|
|
939
|
+
size="sm"
|
|
940
|
+
className="h-8 gap-1.5 px-2 text-muted-foreground hover:text-foreground"
|
|
941
|
+
onClick={() => openCreateListDialog(status)}
|
|
942
|
+
>
|
|
943
|
+
<Plus className="h-3.5 w-3.5" />
|
|
944
|
+
{t.addNewList}
|
|
945
|
+
</Button>
|
|
946
|
+
</div>
|
|
958
947
|
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
</div>
|
|
974
|
-
) : (
|
|
975
|
-
<SortableContext
|
|
976
|
-
items={statusLists.map((l) => l.id)}
|
|
977
|
-
strategy={verticalListSortingStrategy}
|
|
978
|
-
>
|
|
979
|
-
<div className="space-y-2">
|
|
980
|
-
{statusLists.map((list) => (
|
|
981
|
-
<SortableListItem
|
|
982
|
-
key={list.id}
|
|
983
|
-
list={list}
|
|
984
|
-
taskCount={0}
|
|
985
|
-
onEdit={setEditingList}
|
|
986
|
-
onDelete={setDeletingList}
|
|
987
|
-
onColorChange={handleColorChange}
|
|
988
|
-
translations={{
|
|
989
|
-
task: t.task,
|
|
990
|
-
tasks: t.tasks,
|
|
991
|
-
changeColor: t.changeColor,
|
|
992
|
-
editList: t.editList,
|
|
993
|
-
deleteList: t.deleteList,
|
|
994
|
-
backlog: t.backlog,
|
|
995
|
-
active: t.active,
|
|
996
|
-
review: t.review,
|
|
997
|
-
doneStatus: t.doneStatus,
|
|
998
|
-
closed: t.closed,
|
|
999
|
-
documents: t.documents,
|
|
1000
|
-
gray: t.gray,
|
|
1001
|
-
red: t.red,
|
|
1002
|
-
blue: t.blue,
|
|
1003
|
-
green: t.green,
|
|
1004
|
-
yellow: t.yellow,
|
|
1005
|
-
orange: t.orange,
|
|
1006
|
-
purple: t.purple,
|
|
1007
|
-
pink: t.pink,
|
|
1008
|
-
indigo: t.indigo,
|
|
1009
|
-
cyan: t.cyan,
|
|
1010
|
-
}}
|
|
1011
|
-
/>
|
|
1012
|
-
))}
|
|
1013
|
-
</div>
|
|
1014
|
-
</SortableContext>
|
|
1015
|
-
)}
|
|
1016
|
-
</div>
|
|
1017
|
-
);
|
|
1018
|
-
})}
|
|
948
|
+
{statusLists.length === 0 ? (
|
|
949
|
+
<div className="rounded-lg border-2 border-dashed p-4 text-center">
|
|
950
|
+
<p className="text-muted-foreground text-sm">
|
|
951
|
+
{t.noListsInStatus}
|
|
952
|
+
</p>
|
|
953
|
+
<Button
|
|
954
|
+
variant="outline"
|
|
955
|
+
size="sm"
|
|
956
|
+
className="mt-3 gap-1.5"
|
|
957
|
+
onClick={() => openCreateListDialog(status)}
|
|
958
|
+
>
|
|
959
|
+
<Plus className="h-3.5 w-3.5" />
|
|
960
|
+
{t.addNewList}
|
|
961
|
+
</Button>
|
|
1019
962
|
</div>
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
963
|
+
) : (
|
|
964
|
+
<SortableContext
|
|
965
|
+
items={statusLists.map((l) => l.id)}
|
|
966
|
+
strategy={verticalListSortingStrategy}
|
|
967
|
+
>
|
|
968
|
+
<div className="space-y-2">
|
|
969
|
+
{statusLists.map((list) => (
|
|
970
|
+
<SortableListItem
|
|
971
|
+
key={list.id}
|
|
972
|
+
list={list}
|
|
973
|
+
taskCount={0}
|
|
974
|
+
onEdit={setEditingList}
|
|
975
|
+
onDelete={setDeletingList}
|
|
976
|
+
onColorChange={handleColorChange}
|
|
977
|
+
translations={{
|
|
978
|
+
task: t.task,
|
|
979
|
+
tasks: t.tasks,
|
|
980
|
+
changeColor: t.changeColor,
|
|
981
|
+
editList: t.editList,
|
|
982
|
+
deleteList: t.deleteList,
|
|
983
|
+
backlog: t.backlog,
|
|
984
|
+
active: t.active,
|
|
985
|
+
review: t.review,
|
|
986
|
+
doneStatus: t.doneStatus,
|
|
987
|
+
closed: t.closed,
|
|
988
|
+
documents: t.documents,
|
|
989
|
+
gray: t.gray,
|
|
990
|
+
red: t.red,
|
|
991
|
+
blue: t.blue,
|
|
992
|
+
green: t.green,
|
|
993
|
+
yellow: t.yellow,
|
|
994
|
+
orange: t.orange,
|
|
995
|
+
purple: t.purple,
|
|
996
|
+
pink: t.pink,
|
|
997
|
+
indigo: t.indigo,
|
|
998
|
+
cyan: t.cyan,
|
|
999
|
+
}}
|
|
1000
|
+
/>
|
|
1001
|
+
))}
|
|
1002
|
+
</div>
|
|
1003
|
+
</SortableContext>
|
|
1004
|
+
)}
|
|
1005
|
+
</div>
|
|
1006
|
+
);
|
|
1007
|
+
})}
|
|
1008
|
+
</div>
|
|
1009
|
+
</DndContext>
|
|
1010
|
+
);
|
|
1023
1011
|
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1012
|
+
return (
|
|
1013
|
+
<>
|
|
1014
|
+
<div className="space-y-6">
|
|
1015
|
+
{/* Lists by Status */}
|
|
1016
|
+
{disableScrollArea ? (
|
|
1017
|
+
<div className={scrollAreaClassName}>{listGroups}</div>
|
|
1018
|
+
) : (
|
|
1019
|
+
<ScrollArea className={cn('h-125 pr-4', scrollAreaClassName)}>
|
|
1020
|
+
{listGroups}
|
|
1021
|
+
</ScrollArea>
|
|
1022
|
+
)}
|
|
1023
|
+
</div>
|
|
1031
1024
|
|
|
1032
1025
|
{/* Create List Dialog */}
|
|
1033
1026
|
<CreateListDialog
|
|
@@ -1103,3 +1096,39 @@ export function BoardLayoutSettings({
|
|
|
1103
1096
|
</>
|
|
1104
1097
|
);
|
|
1105
1098
|
}
|
|
1099
|
+
|
|
1100
|
+
export function BoardLayoutSettings({
|
|
1101
|
+
open,
|
|
1102
|
+
onOpenChange,
|
|
1103
|
+
translations,
|
|
1104
|
+
...contentProps
|
|
1105
|
+
}: BoardLayoutSettingsProps) {
|
|
1106
|
+
const title = translations?.boardLayoutSettings ?? 'Board Layout Settings';
|
|
1107
|
+
const description =
|
|
1108
|
+
translations?.boardLayoutSettingsDescription ??
|
|
1109
|
+
'Manage your board columns and organize them by status. Drag to reorder within each status group.';
|
|
1110
|
+
const done = translations?.done ?? 'Done';
|
|
1111
|
+
|
|
1112
|
+
return (
|
|
1113
|
+
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
1114
|
+
<DialogContent className="max-w-3xl">
|
|
1115
|
+
<DialogHeader>
|
|
1116
|
+
<DialogTitle>{title}</DialogTitle>
|
|
1117
|
+
<DialogDescription>{description}</DialogDescription>
|
|
1118
|
+
</DialogHeader>
|
|
1119
|
+
|
|
1120
|
+
<BoardLayoutSettingsContent
|
|
1121
|
+
{...contentProps}
|
|
1122
|
+
scrollAreaClassName="h-125 pr-4"
|
|
1123
|
+
translations={translations}
|
|
1124
|
+
/>
|
|
1125
|
+
|
|
1126
|
+
<DialogFooter>
|
|
1127
|
+
<Button variant="outline" onClick={() => onOpenChange(false)}>
|
|
1128
|
+
{done}
|
|
1129
|
+
</Button>
|
|
1130
|
+
</DialogFooter>
|
|
1131
|
+
</DialogContent>
|
|
1132
|
+
</Dialog>
|
|
1133
|
+
);
|
|
1134
|
+
}
|