@wealthx/shadcn 1.5.6 → 1.5.8
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/.turbo/turbo-build.log +177 -171
- package/CHANGELOG.md +12 -0
- package/dist/{chunk-XHGISOX5.mjs → chunk-33VT74R4.mjs} +1 -1
- package/dist/{chunk-M4LTX3MH.mjs → chunk-3C4DZTGA.mjs} +1 -1
- package/dist/{chunk-ODO6BUOF.mjs → chunk-3CGM3QXQ.mjs} +3 -5
- package/dist/{chunk-QBPNYXTI.mjs → chunk-3NJPNSJG.mjs} +1 -1
- package/dist/{chunk-6SR4K5T5.mjs → chunk-3S6KVFF5.mjs} +1 -1
- package/dist/{chunk-7KT5HPYM.mjs → chunk-3VZ6CYY2.mjs} +1 -1
- package/dist/chunk-3Z75IKFO.mjs +34 -0
- package/dist/{chunk-DFL5CV75.mjs → chunk-4BHDDLWK.mjs} +2 -2
- package/dist/{chunk-KLJLDNCA.mjs → chunk-4LLTZ45R.mjs} +1 -1
- package/dist/{chunk-RAKBWNQH.mjs → chunk-54MTIKNC.mjs} +27 -66
- package/dist/{chunk-JTG5R5YV.mjs → chunk-54TRNCID.mjs} +287 -61
- package/dist/{chunk-KCKYGQVQ.mjs → chunk-5DAQU3B6.mjs} +1 -1
- package/dist/{chunk-CKPEFZNH.mjs → chunk-5LZZYODG.mjs} +2 -2
- package/dist/{chunk-2A53WPEC.mjs → chunk-5YVJSKFH.mjs} +2 -2
- package/dist/{chunk-JUBUN65Q.mjs → chunk-5YWUGE6F.mjs} +1 -1
- package/dist/chunk-65PZNG4Y.mjs +129 -0
- package/dist/{chunk-K7WSRWOU.mjs → chunk-6LWCFAB4.mjs} +1 -1
- package/dist/{chunk-Q5SGEIJV.mjs → chunk-6MDNL5I2.mjs} +3 -3
- package/dist/{chunk-AUEUTZIC.mjs → chunk-6U4NQGVM.mjs} +3 -3
- package/dist/{chunk-V4CUTCHS.mjs → chunk-77L3UPBW.mjs} +1 -1
- package/dist/{chunk-CW32WTZU.mjs → chunk-7UIL5UN3.mjs} +1 -1
- package/dist/{chunk-2LLFNGJZ.mjs → chunk-AANINK2B.mjs} +3 -3
- package/dist/{chunk-UEREFDAE.mjs → chunk-AZGLSIHF.mjs} +1 -1
- package/dist/{chunk-XN37434W.mjs → chunk-B3CTBLIY.mjs} +2 -2
- package/dist/{chunk-XTWAJWCQ.mjs → chunk-BAONSY54.mjs} +1 -1
- package/dist/{chunk-XIY5DJXI.mjs → chunk-BXL74CM2.mjs} +1 -1
- package/dist/{chunk-OYBIUEGE.mjs → chunk-BZGFW6L7.mjs} +1 -1
- package/dist/chunk-CEEVYRQA.mjs +61 -0
- package/dist/{chunk-BD3DWDT4.mjs → chunk-CEYEK3TI.mjs} +1 -1
- package/dist/{chunk-I3UDLWQ7.mjs → chunk-D3HKFRQO.mjs} +1 -1
- package/dist/{chunk-3AREQTZU.mjs → chunk-DCKT635J.mjs} +1 -1
- package/dist/{chunk-VLELWBEW.mjs → chunk-E2BNCA6L.mjs} +1 -1
- package/dist/{chunk-QRVEI6J3.mjs → chunk-E5EDZQ5J.mjs} +1 -3
- package/dist/{chunk-QHJDGB54.mjs → chunk-EAKRTKHJ.mjs} +2 -2
- package/dist/{chunk-Q35PNFJ7.mjs → chunk-FBNEIYSE.mjs} +1 -1
- package/dist/{chunk-KB7MZMED.mjs → chunk-FGMDBJCF.mjs} +1 -1
- package/dist/{chunk-S4CTM3UE.mjs → chunk-FRCTOAKZ.mjs} +35 -4
- package/dist/{chunk-K7TWMLLW.mjs → chunk-FW4U543X.mjs} +4 -4
- package/dist/{chunk-PGR53HMH.mjs → chunk-G2W754UJ.mjs} +1 -1
- package/dist/{chunk-46Q4335I.mjs → chunk-GS47ZSSA.mjs} +12 -22
- package/dist/{chunk-AHKHVBWR.mjs → chunk-GYWOD2YI.mjs} +1 -1
- package/dist/{chunk-HNDTLT5X.mjs → chunk-H5DTKPJ2.mjs} +1 -1
- package/dist/{chunk-C6SWS7OW.mjs → chunk-HB5BKRMH.mjs} +1 -1
- package/dist/{chunk-WUA546RX.mjs → chunk-IFSQWDRN.mjs} +1 -1
- package/dist/{chunk-KAD26MCC.mjs → chunk-IRZWYTGV.mjs} +1 -1
- package/dist/{chunk-AL6GOL2Y.mjs → chunk-IW33VLL5.mjs} +1 -1
- package/dist/{chunk-A6ER36CW.mjs → chunk-JGBV3XMQ.mjs} +1 -1
- package/dist/{chunk-Y6UM3VTN.mjs → chunk-JUMEIPII.mjs} +1 -1
- package/dist/{chunk-VFH632TB.mjs → chunk-K4WDPVFY.mjs} +3 -3
- package/dist/{chunk-PV3Y7QGK.mjs → chunk-LHWJQNLG.mjs} +3 -3
- package/dist/{chunk-NCUH54IZ.mjs → chunk-LI2CTS5O.mjs} +1 -1
- package/dist/{chunk-F24U4QQQ.mjs → chunk-LPVXO3TD.mjs} +1 -1
- package/dist/{chunk-VJ3GC7W3.mjs → chunk-MNMSHB2J.mjs} +5 -5
- package/dist/{chunk-J5NW5NCT.mjs → chunk-NCMV3LTP.mjs} +1 -1
- package/dist/{chunk-IXR4BQSQ.mjs → chunk-O5CP6VP6.mjs} +3 -3
- package/dist/{chunk-TGVXRD53.mjs → chunk-OZ2R6ERP.mjs} +1 -1
- package/dist/{chunk-D447W45Z.mjs → chunk-PCULNQWA.mjs} +42 -50
- package/dist/{chunk-CDVG7SFT.mjs → chunk-PGJRZHN7.mjs} +1 -1
- package/dist/{chunk-IKDTOCSY.mjs → chunk-RSEVIQEO.mjs} +1 -1
- package/dist/{chunk-GNER6MCO.mjs → chunk-SSUK6C2K.mjs} +1 -1
- package/dist/{chunk-6TX73WG7.mjs → chunk-TCE5L44O.mjs} +3 -2
- package/dist/{chunk-OECGKCVF.mjs → chunk-TLLD5IU6.mjs} +1 -1
- package/dist/{chunk-BFB3UH7V.mjs → chunk-TRM3KIHT.mjs} +2 -2
- package/dist/{chunk-TLYSVRSK.mjs → chunk-TUC2BNUR.mjs} +3 -3
- package/dist/{chunk-HXU5JGLQ.mjs → chunk-UBHBIWIA.mjs} +3 -3
- package/dist/{chunk-TXUBGKB7.mjs → chunk-UJMVXREM.mjs} +2 -2
- package/dist/{chunk-TAX3KL66.mjs → chunk-USOVLDGS.mjs} +1 -1
- package/dist/{chunk-HF4FUBCY.mjs → chunk-UTCW5YUX.mjs} +1 -1
- package/dist/{chunk-OL65UQHQ.mjs → chunk-UYRHYJPX.mjs} +27 -61
- package/dist/{chunk-BDESHD25.mjs → chunk-VLVEZHFE.mjs} +1 -1
- package/dist/{chunk-EUYPMDQG.mjs → chunk-VWZS32ZQ.mjs} +1 -1
- package/dist/{chunk-HROG643K.mjs → chunk-W5QJ57PU.mjs} +1 -1
- package/dist/{chunk-F4O2YPXJ.mjs → chunk-WHIW6KOB.mjs} +1 -1
- package/dist/{chunk-TOIVHWNC.mjs → chunk-WWIWRNBK.mjs} +1 -1
- package/dist/{chunk-2QNOPXMQ.mjs → chunk-XMP24PWA.mjs} +1 -1
- package/dist/{chunk-HO6S3ECM.mjs → chunk-XUCDPAVI.mjs} +2 -2
- package/dist/{chunk-EW72FINW.mjs → chunk-XVZGXPIX.mjs} +1 -1
- package/dist/{chunk-WDTXHLYM.mjs → chunk-XYSRRDBH.mjs} +17 -11
- package/dist/{chunk-QAX6HCUH.mjs → chunk-ZAXZBOWI.mjs} +1 -1
- package/dist/{chunk-E3PQDBYI.mjs → chunk-ZFKAYRFQ.mjs} +1 -1
- package/dist/components/ui/about-you-form.mjs +6 -6
- package/dist/components/ui/add-column-modal.js +56 -227
- package/dist/components/ui/add-column-modal.mjs +4 -5
- package/dist/components/ui/add-lead-modal.mjs +6 -6
- package/dist/components/ui/ai-assistant-drawer.mjs +4 -4
- package/dist/components/ui/ai-builder.mjs +4 -4
- package/dist/components/ui/ai-conversations.js +278 -58
- package/dist/components/ui/ai-conversations.mjs +6 -6
- package/dist/components/ui/alert-dialog.mjs +3 -3
- package/dist/components/ui/appointment-action-dialogs.mjs +7 -7
- package/dist/components/ui/appointment-availability-settings.js +1 -1
- package/dist/components/ui/appointment-availability-settings.mjs +9 -9
- package/dist/components/ui/appointment-book-dialog.js +11 -21
- package/dist/components/ui/appointment-book-dialog.mjs +7 -7
- package/dist/components/ui/appointment-calendar-view.mjs +2 -2
- package/dist/components/ui/appointment-detail-sheet.mjs +9 -9
- package/dist/components/ui/appointment-upcoming-card.mjs +6 -6
- package/dist/components/ui/assets-liabilities-side-card.mjs +3 -3
- package/dist/components/ui/backoffice-alert-history-chart.mjs +3 -3
- package/dist/components/ui/backoffice-alert-matching-chart.mjs +3 -3
- package/dist/components/ui/backoffice-alerts-chart.mjs +3 -3
- package/dist/components/ui/backoffice-connections-chart.mjs +3 -3
- package/dist/components/ui/backoffice-contact-history-chart.mjs +3 -3
- package/dist/components/ui/backoffice-contact-matching-chart.mjs +3 -3
- package/dist/components/ui/backoffice-signup-steps.mjs +9 -9
- package/dist/components/ui/bank-statement-generate-dialog.mjs +9 -9
- package/dist/components/ui/bank-statement-pdf-viewer.mjs +4 -4
- package/dist/components/ui/borrowing-capacity-card.mjs +3 -3
- package/dist/components/ui/borrowing-capacity-line-chart.mjs +3 -3
- package/dist/components/ui/calculator-section.mjs +4 -4
- package/dist/components/ui/calendar.mjs +2 -2
- package/dist/components/ui/cash-balance-line-chart.mjs +3 -3
- package/dist/components/ui/cashflow-bar-chart.mjs +3 -3
- package/dist/components/ui/category-edit-dialog.mjs +4 -4
- package/dist/components/ui/color-picker.mjs +4 -4
- package/dist/components/ui/contact-alert-dialog/index.mjs +5 -5
- package/dist/components/ui/create-contact-modal.mjs +5 -5
- package/dist/components/ui/csv-import-modal.mjs +4 -4
- package/dist/components/ui/dashboard-transactions-table.mjs +5 -5
- package/dist/components/ui/data-table.mjs +6 -6
- package/dist/components/ui/date-picker.mjs +6 -6
- package/dist/components/ui/delete-contact-component.mjs +4 -4
- package/dist/components/ui/dialog.mjs +3 -3
- package/dist/components/ui/document-checklist-template.mjs +4 -4
- package/dist/components/ui/drawer.mjs +3 -3
- package/dist/components/ui/dropdown-menu.mjs +3 -3
- package/dist/components/ui/dynamic-tabs.mjs +3 -3
- package/dist/components/ui/editable-money-item.mjs +4 -4
- package/dist/components/ui/expense-bar-chart.mjs +3 -3
- package/dist/components/ui/expense-work-details.mjs +4 -4
- package/dist/components/ui/file-preview-dialog.mjs +6 -6
- package/dist/components/ui/financial-cards.mjs +2 -2
- package/dist/components/ui/financial-drawers.mjs +4 -4
- package/dist/components/ui/financial-sections.mjs +3 -3
- package/dist/components/ui/frontend-signup-steps.mjs +7 -7
- package/dist/components/ui/income-bar-chart.mjs +3 -3
- package/dist/components/ui/income-work-details.mjs +4 -4
- package/dist/components/ui/integration-card.js +326 -0
- package/dist/components/ui/integration-card.mjs +11 -0
- package/dist/components/ui/kanban-column.js +151 -243
- package/dist/components/ui/kanban-column.mjs +6 -7
- package/dist/components/ui/loan-application-cards.mjs +1 -1
- package/dist/components/ui/money-item-with-color-indicator.mjs +4 -4
- package/dist/components/ui/onboarding-layout.js +65 -4
- package/dist/components/ui/onboarding-layout.mjs +6 -4
- package/dist/components/ui/opportunity-card.js +126 -216
- package/dist/components/ui/opportunity-card.mjs +5 -6
- package/dist/components/ui/opportunity-edit-modals.mjs +9 -9
- package/dist/components/ui/opportunity-summary-tab.mjs +11 -11
- package/dist/components/ui/pagination.mjs +4 -4
- package/dist/components/ui/password-strength-tooltip.mjs +4 -4
- package/dist/components/ui/pipeline-board.js +167 -261
- package/dist/components/ui/pipeline-board.mjs +7 -8
- package/dist/components/ui/pipeline-chart.js +128 -55
- package/dist/components/ui/pipeline-chart.mjs +4 -3
- package/dist/components/ui/pipeline-dialogs.mjs +9 -9
- package/dist/components/ui/popover.mjs +3 -3
- package/dist/components/ui/property-cashflow-doughnut-chart.mjs +3 -3
- package/dist/components/ui/property-debt-equity-doughnut-chart.mjs +3 -3
- package/dist/components/ui/property-mobile-estimate-line-chart.mjs +3 -3
- package/dist/components/ui/property-report-dialog.mjs +4 -4
- package/dist/components/ui/resource-center.mjs +4 -4
- package/dist/components/ui/review-alerts-dialog.mjs +4 -4
- package/dist/components/ui/savings-goal-modal.mjs +7 -7
- package/dist/components/ui/scenario-drawer.mjs +3 -3
- package/dist/components/ui/scenario-item.mjs +4 -4
- package/dist/components/ui/scenario-list.mjs +4 -4
- package/dist/components/ui/select.mjs +3 -3
- package/dist/components/ui/selectable-card.js +163 -0
- package/dist/components/ui/selectable-card.mjs +9 -0
- package/dist/components/ui/share-details-dialog.mjs +4 -4
- package/dist/components/ui/sheet.mjs +3 -3
- package/dist/components/ui/sidebar-nav.mjs +4 -4
- package/dist/components/ui/signup-form-primitives.mjs +6 -6
- package/dist/components/ui/signup-shell.js +3 -2
- package/dist/components/ui/signup-shell.mjs +2 -2
- package/dist/components/ui/stepper.js +3 -2
- package/dist/components/ui/stepper.mjs +1 -1
- package/dist/components/ui/tooltip.mjs +3 -3
- package/dist/components/ui/transactions-expense-categories-doughnut-chart.mjs +3 -3
- package/dist/components/ui/transactions-income-expense-bar-chart.mjs +3 -3
- package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.mjs +3 -3
- package/dist/index.js +2144 -1875
- package/dist/index.mjs +105 -95
- package/dist/lib/colors.js +36 -3
- package/dist/lib/colors.mjs +5 -1
- package/dist/lib/theme-provider.js +60 -13
- package/dist/lib/theme-provider.mjs +2 -2
- package/dist/styles.css +1 -1
- package/package.json +11 -1
- package/src/components/index.tsx +13 -1
- package/src/components/ui/add-column-modal.tsx +9 -58
- package/src/components/ui/ai-conversations.tsx +308 -42
- package/src/components/ui/appointment-availability-settings.tsx +1 -1
- package/src/components/ui/appointment-book-dialog.tsx +25 -48
- package/src/components/ui/integration-card.tsx +88 -0
- package/src/components/ui/kanban-column.tsx +0 -7
- package/src/components/ui/onboarding-layout.tsx +102 -1
- package/src/components/ui/opportunity-card.tsx +5 -53
- package/src/components/ui/pipeline-board.tsx +0 -3
- package/src/components/ui/pipeline-chart.tsx +47 -53
- package/src/components/ui/selectable-card.tsx +37 -0
- package/src/components/ui/stepper.tsx +3 -2
- package/src/lib/colors.ts +73 -5
- package/src/lib/format-date.ts +6 -6
- package/src/lib/theme-provider.tsx +13 -8
- package/src/styles/globals.css +37 -9
- package/src/styles/styles-css.ts +1 -1
- package/tsup.config.ts +2 -0
- package/dist/chunk-2P7HP7LR.mjs +0 -68
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wealthx/shadcn",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.8",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -448,6 +448,16 @@
|
|
|
448
448
|
"import": "./dist/components/ui/opportunity-card.mjs",
|
|
449
449
|
"require": "./dist/components/ui/opportunity-card.js"
|
|
450
450
|
},
|
|
451
|
+
"./selectable-card": {
|
|
452
|
+
"types": "./src/components/ui/selectable-card.tsx",
|
|
453
|
+
"import": "./dist/components/ui/selectable-card.mjs",
|
|
454
|
+
"require": "./dist/components/ui/selectable-card.js"
|
|
455
|
+
},
|
|
456
|
+
"./integration-card": {
|
|
457
|
+
"types": "./src/components/ui/integration-card.tsx",
|
|
458
|
+
"import": "./dist/components/ui/integration-card.mjs",
|
|
459
|
+
"require": "./dist/components/ui/integration-card.js"
|
|
460
|
+
},
|
|
451
461
|
"./kanban-column": {
|
|
452
462
|
"types": "./src/components/ui/kanban-column.tsx",
|
|
453
463
|
"import": "./dist/components/ui/kanban-column.mjs",
|
package/src/components/index.tsx
CHANGED
|
@@ -47,6 +47,8 @@ export type {
|
|
|
47
47
|
AiConvFieldConfidence,
|
|
48
48
|
AiConvFilterTab,
|
|
49
49
|
AiConvMode,
|
|
50
|
+
AiConvChannel,
|
|
51
|
+
AiConvChannelFilter,
|
|
50
52
|
AiConvMeetingType,
|
|
51
53
|
AiConvContact,
|
|
52
54
|
AiConvAdvisor,
|
|
@@ -813,16 +815,26 @@ export type {
|
|
|
813
815
|
InputOTPSeparatorProps,
|
|
814
816
|
} from "./ui/input-otp";
|
|
815
817
|
|
|
818
|
+
export { IntegrationCard } from "./ui/integration-card";
|
|
819
|
+
export type { IntegrationCardProps } from "./ui/integration-card";
|
|
820
|
+
|
|
821
|
+
export { SelectableCard } from "./ui/selectable-card";
|
|
822
|
+
export type { SelectableCardProps } from "./ui/selectable-card";
|
|
823
|
+
|
|
816
824
|
export { KanbanColumn } from "./ui/kanban-column";
|
|
817
825
|
export type { KanbanColumnProps, KanbanColumnStage } from "./ui/kanban-column";
|
|
818
826
|
|
|
819
827
|
export { Label } from "./ui/label";
|
|
820
828
|
export type { LabelProps } from "./ui/label";
|
|
821
829
|
|
|
822
|
-
export {
|
|
830
|
+
export {
|
|
831
|
+
OnboardingLayout,
|
|
832
|
+
OnboardingPanelLayout,
|
|
833
|
+
} from "./ui/onboarding-layout";
|
|
823
834
|
export type {
|
|
824
835
|
OnboardingStep,
|
|
825
836
|
OnboardingLayoutProps,
|
|
837
|
+
OnboardingPanelLayoutProps,
|
|
826
838
|
} from "./ui/onboarding-layout";
|
|
827
839
|
|
|
828
840
|
export { OpportunityCard, LeadCard } from "./ui/opportunity-card";
|
|
@@ -12,21 +12,13 @@ import { Button } from "@/components/ui/button";
|
|
|
12
12
|
import { Input } from "@/components/ui/input";
|
|
13
13
|
import { Label } from "@/components/ui/label";
|
|
14
14
|
import { Separator } from "@/components/ui/separator";
|
|
15
|
-
import {
|
|
16
|
-
Select,
|
|
17
|
-
SelectContent,
|
|
18
|
-
SelectItem,
|
|
19
|
-
SelectTrigger,
|
|
20
|
-
SelectValue,
|
|
21
|
-
} from "@/components/ui/select";
|
|
22
|
-
|
|
23
15
|
/**
|
|
24
16
|
* AddColumnModal — WealthX DS (L4 Dialog)
|
|
25
17
|
*
|
|
26
18
|
* Create or edit a Pipeline stage (column). Supports:
|
|
27
19
|
* - Column title (optionally locked for system stages)
|
|
28
20
|
* - Time-based alert thresholds (warning days, priority days)
|
|
29
|
-
* - Task template list (up to 20 tasks
|
|
21
|
+
* - Task template list (up to 20 tasks)
|
|
30
22
|
*
|
|
31
23
|
* Data source: `listColumns()` → `Stage` in `loan-crm.ts`
|
|
32
24
|
*/
|
|
@@ -37,16 +29,10 @@ const MAX_TASKS = 20;
|
|
|
37
29
|
// Types
|
|
38
30
|
// ---------------------------------------------------------------------------
|
|
39
31
|
|
|
40
|
-
export interface AiAgent {
|
|
41
|
-
id: string;
|
|
42
|
-
name: string;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
32
|
export interface ColumnTask {
|
|
46
33
|
/** Temp numeric ID for new tasks; persisted string ID for existing ones. */
|
|
47
34
|
id: string | number;
|
|
48
35
|
name: string;
|
|
49
|
-
aiAgentId?: string | null;
|
|
50
36
|
}
|
|
51
37
|
|
|
52
38
|
export interface AddColumnEditData {
|
|
@@ -66,8 +52,6 @@ export interface AddColumnModalProps {
|
|
|
66
52
|
onSave: (data: AddColumnEditData) => void;
|
|
67
53
|
/** Pre-populate for edit mode. Omit (or pass null) for create mode. */
|
|
68
54
|
editData?: AddColumnEditData | null;
|
|
69
|
-
/** Available AI agents for task assignment. Pass [] to hide agent selects. */
|
|
70
|
-
aiAgents?: AiAgent[];
|
|
71
55
|
loading?: boolean;
|
|
72
56
|
className?: string;
|
|
73
57
|
}
|
|
@@ -81,7 +65,6 @@ export function AddColumnModal({
|
|
|
81
65
|
onOpenChange,
|
|
82
66
|
onSave,
|
|
83
67
|
editData,
|
|
84
|
-
aiAgents = [],
|
|
85
68
|
loading = false,
|
|
86
69
|
className,
|
|
87
70
|
}: AddColumnModalProps) {
|
|
@@ -90,10 +73,10 @@ export function AddColumnModal({
|
|
|
90
73
|
|
|
91
74
|
const [name, setName] = React.useState(editData?.name ?? "");
|
|
92
75
|
const [warningDays, setWarningDays] = React.useState(
|
|
93
|
-
editData?.warningDays != null ? String(editData.warningDays) : ""
|
|
76
|
+
editData?.warningDays != null ? String(editData.warningDays) : ""
|
|
94
77
|
);
|
|
95
78
|
const [priorityDays, setPriorityDays] = React.useState(
|
|
96
|
-
editData?.priorityDays != null ? String(editData.priorityDays) : ""
|
|
79
|
+
editData?.priorityDays != null ? String(editData.priorityDays) : ""
|
|
97
80
|
);
|
|
98
81
|
const [tasks, setTasks] = React.useState<ColumnTask[]>(editData?.tasks ?? []);
|
|
99
82
|
|
|
@@ -102,10 +85,10 @@ export function AddColumnModal({
|
|
|
102
85
|
if (open) {
|
|
103
86
|
setName(editData?.name ?? "");
|
|
104
87
|
setWarningDays(
|
|
105
|
-
editData?.warningDays != null ? String(editData.warningDays) : ""
|
|
88
|
+
editData?.warningDays != null ? String(editData.warningDays) : ""
|
|
106
89
|
);
|
|
107
90
|
setPriorityDays(
|
|
108
|
-
editData?.priorityDays != null ? String(editData.priorityDays) : ""
|
|
91
|
+
editData?.priorityDays != null ? String(editData.priorityDays) : ""
|
|
109
92
|
);
|
|
110
93
|
setTasks(editData?.tasks ?? []);
|
|
111
94
|
}
|
|
@@ -131,10 +114,7 @@ export function AddColumnModal({
|
|
|
131
114
|
|
|
132
115
|
function addTask() {
|
|
133
116
|
if (tasks.length >= MAX_TASKS) return;
|
|
134
|
-
setTasks((prev) => [
|
|
135
|
-
...prev,
|
|
136
|
-
{ id: nextId.current++, name: "", aiAgentId: null },
|
|
137
|
-
]);
|
|
117
|
+
setTasks((prev) => [...prev, { id: nextId.current++, name: "" }]);
|
|
138
118
|
}
|
|
139
119
|
|
|
140
120
|
function removeTask(id: string | number) {
|
|
@@ -143,7 +123,7 @@ export function AddColumnModal({
|
|
|
143
123
|
|
|
144
124
|
function updateTask(
|
|
145
125
|
id: string | number,
|
|
146
|
-
patch: Partial<Pick<ColumnTask, "name"
|
|
126
|
+
patch: Partial<Pick<ColumnTask, "name">>
|
|
147
127
|
) {
|
|
148
128
|
setTasks((prev) => prev.map((t) => (t.id === id ? { ...t, ...patch } : t)));
|
|
149
129
|
}
|
|
@@ -274,35 +254,6 @@ export function AddColumnModal({
|
|
|
274
254
|
<Trash2 className="size-4" />
|
|
275
255
|
</Button>
|
|
276
256
|
</div>
|
|
277
|
-
|
|
278
|
-
{aiAgents.length > 0 && (
|
|
279
|
-
<Select
|
|
280
|
-
value={task.aiAgentId ?? undefined}
|
|
281
|
-
onValueChange={(v) =>
|
|
282
|
-
updateTask(task.id, { aiAgentId: v || null })
|
|
283
|
-
}
|
|
284
|
-
>
|
|
285
|
-
<SelectTrigger size="sm" className="w-full">
|
|
286
|
-
<span
|
|
287
|
-
className={cn(
|
|
288
|
-
!task.aiAgentId && "text-muted-foreground",
|
|
289
|
-
)}
|
|
290
|
-
>
|
|
291
|
-
{task.aiAgentId
|
|
292
|
-
? (aiAgents.find((a) => a.id === task.aiAgentId)
|
|
293
|
-
?.name ?? task.aiAgentId)
|
|
294
|
-
: "Select agent"}
|
|
295
|
-
</span>
|
|
296
|
-
</SelectTrigger>
|
|
297
|
-
<SelectContent>
|
|
298
|
-
{aiAgents.map((agent) => (
|
|
299
|
-
<SelectItem key={agent.id} value={agent.id}>
|
|
300
|
-
{agent.name}
|
|
301
|
-
</SelectItem>
|
|
302
|
-
))}
|
|
303
|
-
</SelectContent>
|
|
304
|
-
</Select>
|
|
305
|
-
)}
|
|
306
257
|
</div>
|
|
307
258
|
))}
|
|
308
259
|
</div>
|
|
@@ -329,8 +280,8 @@ export function AddColumnModal({
|
|
|
329
280
|
? "Saving…"
|
|
330
281
|
: "Adding…"
|
|
331
282
|
: isEdit
|
|
332
|
-
|
|
333
|
-
|
|
283
|
+
? "Save changes"
|
|
284
|
+
: "Add column"}
|
|
334
285
|
</Button>
|
|
335
286
|
</DialogFooter>
|
|
336
287
|
</DialogContent>
|