@burdenoff/microfe-timecampus 2026.626.2 → 2026.703.2
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/dist/generated/wspace-operations.js +996 -816
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.js +28 -0
- package/dist/generated/wspace-types.js.map +1 -0
- package/dist/index.js +4 -4
- package/dist/timecampus/TimeCampusRoutes.js +16 -12
- package/dist/timecampus/TimeCampusRoutes.js.map +1 -1
- package/dist/timecampus/components/Modal.js +65 -0
- package/dist/timecampus/components/Modal.js.map +1 -0
- package/dist/timecampus/components/StatusBadge.js +28 -0
- package/dist/timecampus/components/StatusBadge.js.map +1 -0
- package/dist/timecampus/components/Toast.js +87 -0
- package/dist/timecampus/components/Toast.js.map +1 -0
- package/dist/timecampus/index.js +1 -1
- package/dist/timecampus/pages/HomePage.js +143 -135
- package/dist/timecampus/pages/HomePage.js.map +1 -1
- package/dist/timecampus/pages/applets/AppletStorePage.js +14 -19
- package/dist/timecampus/pages/applets/AppletStorePage.js.map +1 -1
- package/dist/timecampus/pages/applets/InstalledAppletsPage.js +49 -37
- package/dist/timecampus/pages/applets/InstalledAppletsPage.js.map +1 -1
- package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js +315 -87
- package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js.map +1 -1
- package/dist/timecampus/pages/channels/ChannelsPage.js +340 -46
- package/dist/timecampus/pages/channels/ChannelsPage.js.map +1 -1
- package/dist/timecampus/pages/client-portal/ClientPortalPage.js +374 -92
- package/dist/timecampus/pages/client-portal/ClientPortalPage.js.map +1 -1
- package/dist/timecampus/pages/dashboard/ReportsPage.js +70 -37
- package/dist/timecampus/pages/dashboard/ReportsPage.js.map +1 -1
- package/dist/timecampus/pages/email-tracking/EmailTrackingPage.js +366 -60
- package/dist/timecampus/pages/email-tracking/EmailTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js +461 -87
- package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/geofencing/GeofencingPage.js +314 -55
- package/dist/timecampus/pages/geofencing/GeofencingPage.js.map +1 -1
- package/dist/timecampus/pages/industry-solutions/IndustrySolutionsPage.js +30 -27
- package/dist/timecampus/pages/industry-solutions/IndustrySolutionsPage.js.map +1 -1
- package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js +269 -74
- package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/meetings/ActionItemFormModal.js +127 -0
- package/dist/timecampus/pages/meetings/ActionItemFormModal.js.map +1 -0
- package/dist/timecampus/pages/meetings/MeetingCreatePage.js +62 -52
- package/dist/timecampus/pages/meetings/MeetingCreatePage.js.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingDetailPage.js +361 -74
- package/dist/timecampus/pages/meetings/MeetingDetailPage.js.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingFormModal.js +156 -0
- package/dist/timecampus/pages/meetings/MeetingFormModal.js.map +1 -0
- package/dist/timecampus/pages/meetings/MeetingsPage.js +175 -74
- package/dist/timecampus/pages/meetings/MeetingsPage.js.map +1 -1
- package/dist/timecampus/pages/meetings/ParticipantFormModal.js +105 -0
- package/dist/timecampus/pages/meetings/ParticipantFormModal.js.map +1 -0
- package/dist/timecampus/pages/pomodoro/PomodoroPage.js +307 -67
- package/dist/timecampus/pages/pomodoro/PomodoroPage.js.map +1 -1
- package/dist/timecampus/pages/projects/ProjectCreatePage.js +51 -48
- package/dist/timecampus/pages/projects/ProjectCreatePage.js.map +1 -1
- package/dist/timecampus/pages/projects/ProjectDetailPage.js +248 -51
- package/dist/timecampus/pages/projects/ProjectDetailPage.js.map +1 -1
- package/dist/timecampus/pages/projects/ProjectsPage.js +354 -87
- package/dist/timecampus/pages/projects/ProjectsPage.js.map +1 -1
- package/dist/timecampus/pages/projects/TasksPage.js +367 -65
- package/dist/timecampus/pages/projects/TasksPage.js.map +1 -1
- package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js +674 -104
- package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js.map +1 -1
- package/dist/timecampus/pages/team/TeamAnalyticsPage.js +46 -34
- package/dist/timecampus/pages/team/TeamAnalyticsPage.js.map +1 -1
- package/dist/timecampus/pages/team/TeamMembersPage.js +93 -69
- package/dist/timecampus/pages/team/TeamMembersPage.js.map +1 -1
- package/dist/timecampus/pages/team/TeamPage.js +4 -3
- package/dist/timecampus/pages/team/TeamPage.js.map +1 -1
- package/dist/timecampus/pages/templates/TemplateDetailPage.js +72 -53
- package/dist/timecampus/pages/templates/TemplateDetailPage.js.map +1 -1
- package/dist/timecampus/pages/templates/TemplatesPage.js +40 -35
- package/dist/timecampus/pages/templates/TemplatesPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimeEntriesPage.js +484 -97
- package/dist/timecampus/pages/time/TimeEntriesPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimeTrackingPage.js +210 -99
- package/dist/timecampus/pages/time/TimeTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimerPage.js +229 -97
- package/dist/timecampus/pages/time/TimerPage.js.map +1 -1
- package/dist/timecampus/pages/time-approval/TimeApprovalPage.js +315 -110
- package/dist/timecampus/pages/time-approval/TimeApprovalPage.js.map +1 -1
- package/dist/timecampus/pages/timeline/TimelinePage.js +250 -0
- package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -0
- package/dist/timecampus/pages/widgets/WidgetDetailPage.js +158 -76
- package/dist/timecampus/pages/widgets/WidgetDetailPage.js.map +1 -1
- package/dist/timecampus/pages/widgets/WidgetsPage.js +181 -52
- package/dist/timecampus/pages/widgets/WidgetsPage.js.map +1 -1
- package/dist/timecampus/pages/workflows/WorkflowsPage.js +212 -61
- package/dist/timecampus/pages/workflows/WorkflowsPage.js.map +1 -1
- package/dist/timecampus/store/timecampusStore.js +13 -1
- package/dist/timecampus/store/timecampusStore.js.map +1 -1
- package/dist/timecampus/utils/helpers.js +20 -10
- package/dist/timecampus/utils/helpers.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,100 +1,103 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { useTimeCampusNavigate as e } from "../../providers/TimeCampusProvider.js";
|
|
2
|
+
import { useCreateProjectMutation as t } from "../../../generated/wspace-operations.js";
|
|
3
|
+
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
|
+
import { useState as r } from "react";
|
|
5
|
+
import { ArrowLeft as i } from "lucide-react";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
import { GlassCard as s } from "@burdenoff/fe-libs/ui";
|
|
7
8
|
//#region src/timecampus/pages/projects/ProjectCreatePage.tsx
|
|
8
|
-
function
|
|
9
|
-
let
|
|
10
|
-
return /* @__PURE__ */
|
|
9
|
+
function c() {
|
|
10
|
+
let c = e(), [l, u] = r(""), [d, f] = r(""), [p, m] = r(""), [h, g] = r(""), [_, v] = r(""), [y, { loading: b, error: x }] = t();
|
|
11
|
+
return /* @__PURE__ */ a(n, {
|
|
11
12
|
title: "Create Project",
|
|
12
13
|
description: "Set up a new project for time tracking",
|
|
13
14
|
purpose: "Define a new project — its client, estimate and rate — so the time your team logs against it rolls up into accurate progress and billing from day one.",
|
|
14
|
-
actions: /* @__PURE__ */
|
|
15
|
+
actions: /* @__PURE__ */ o("button", {
|
|
16
|
+
onClick: () => c("/projects"),
|
|
15
17
|
className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
|
|
16
|
-
children: [/* @__PURE__ */ i
|
|
18
|
+
children: [/* @__PURE__ */ a(i, { className: "h-4 w-4" }), "Back to Projects"]
|
|
17
19
|
}),
|
|
18
|
-
children: /* @__PURE__ */
|
|
20
|
+
children: /* @__PURE__ */ o(s, {
|
|
19
21
|
treatment: "glass",
|
|
20
22
|
glow: !0,
|
|
21
23
|
className: "mx-auto max-w-2xl p-6",
|
|
22
|
-
children: [
|
|
24
|
+
children: [x && /* @__PURE__ */ a("div", {
|
|
23
25
|
className: "mb-4 rounded-lg border border-status-error-bg/40 bg-status-error-bg p-3 text-sm text-status-error-text",
|
|
24
26
|
children: "Failed to create project. Please try again."
|
|
25
|
-
}), /* @__PURE__ */
|
|
27
|
+
}), /* @__PURE__ */ o("div", {
|
|
26
28
|
className: "space-y-4",
|
|
27
29
|
children: [
|
|
28
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("label", {
|
|
29
31
|
className: "block text-sm font-medium text-text-primary",
|
|
30
32
|
children: "Project Name"
|
|
31
|
-
}), /* @__PURE__ */
|
|
33
|
+
}), /* @__PURE__ */ a("input", {
|
|
32
34
|
type: "text",
|
|
33
35
|
placeholder: "Enter project name",
|
|
34
|
-
value:
|
|
35
|
-
onChange: (e) =>
|
|
36
|
+
value: l,
|
|
37
|
+
onChange: (e) => u(e.target.value),
|
|
36
38
|
className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
|
|
37
39
|
})] }),
|
|
38
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("label", {
|
|
39
41
|
className: "block text-sm font-medium text-text-primary",
|
|
40
42
|
children: "Client"
|
|
41
|
-
}), /* @__PURE__ */
|
|
43
|
+
}), /* @__PURE__ */ a("input", {
|
|
42
44
|
type: "text",
|
|
43
45
|
placeholder: "Client name",
|
|
44
|
-
value:
|
|
45
|
-
onChange: (e) =>
|
|
46
|
+
value: d,
|
|
47
|
+
onChange: (e) => f(e.target.value),
|
|
46
48
|
className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
|
|
47
49
|
})] }),
|
|
48
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("label", {
|
|
49
51
|
className: "block text-sm font-medium text-text-primary",
|
|
50
52
|
children: "Description"
|
|
51
|
-
}), /* @__PURE__ */
|
|
53
|
+
}), /* @__PURE__ */ a("textarea", {
|
|
52
54
|
placeholder: "Project description",
|
|
53
55
|
rows: 3,
|
|
54
|
-
value:
|
|
55
|
-
onChange: (e) =>
|
|
56
|
+
value: p,
|
|
57
|
+
onChange: (e) => m(e.target.value),
|
|
56
58
|
className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
|
|
57
59
|
})] }),
|
|
58
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ o("div", {
|
|
59
61
|
className: "grid grid-cols-2 gap-4",
|
|
60
|
-
children: [/* @__PURE__ */
|
|
62
|
+
children: [/* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("label", {
|
|
61
63
|
className: "block text-sm font-medium text-text-primary",
|
|
62
64
|
children: "Estimated Hours"
|
|
63
|
-
}), /* @__PURE__ */
|
|
65
|
+
}), /* @__PURE__ */ a("input", {
|
|
64
66
|
type: "number",
|
|
65
67
|
placeholder: "0",
|
|
66
|
-
value:
|
|
67
|
-
onChange: (e) =>
|
|
68
|
+
value: h,
|
|
69
|
+
onChange: (e) => g(e.target.value),
|
|
68
70
|
className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
69
|
-
})] }), /* @__PURE__ */
|
|
71
|
+
})] }), /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("label", {
|
|
70
72
|
className: "block text-sm font-medium text-text-primary",
|
|
71
73
|
children: "Hourly Rate"
|
|
72
|
-
}), /* @__PURE__ */
|
|
74
|
+
}), /* @__PURE__ */ a("input", {
|
|
73
75
|
type: "number",
|
|
74
76
|
placeholder: "0.00",
|
|
75
|
-
value:
|
|
76
|
-
onChange: (e) =>
|
|
77
|
+
value: _,
|
|
78
|
+
onChange: (e) => v(e.target.value),
|
|
77
79
|
className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
78
80
|
})] })]
|
|
79
81
|
}),
|
|
80
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ o("div", {
|
|
81
83
|
className: "flex justify-end gap-2 pt-4",
|
|
82
|
-
children: [/* @__PURE__ */
|
|
84
|
+
children: [/* @__PURE__ */ a("button", {
|
|
85
|
+
onClick: () => c("/projects"),
|
|
83
86
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
|
|
84
87
|
children: "Cancel"
|
|
85
|
-
}), /* @__PURE__ */
|
|
88
|
+
}), /* @__PURE__ */ a("button", {
|
|
86
89
|
onClick: async () => {
|
|
87
|
-
|
|
88
|
-
name:
|
|
89
|
-
description:
|
|
90
|
-
clientId:
|
|
91
|
-
estimatedHours:
|
|
92
|
-
hourlyRate:
|
|
93
|
-
} } });
|
|
90
|
+
l.trim() && (await y({ variables: { input: {
|
|
91
|
+
name: l.trim(),
|
|
92
|
+
description: p.trim() || void 0,
|
|
93
|
+
clientId: d.trim() || void 0,
|
|
94
|
+
estimatedHours: h ? Number(h) : void 0,
|
|
95
|
+
hourlyRate: _ ? Number(_) : void 0
|
|
96
|
+
} } }), c("/projects"));
|
|
94
97
|
},
|
|
95
|
-
disabled:
|
|
98
|
+
disabled: b || !l.trim(),
|
|
96
99
|
className: "rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
|
|
97
|
-
children:
|
|
100
|
+
children: b ? "Creating..." : "Create Project"
|
|
98
101
|
})]
|
|
99
102
|
})
|
|
100
103
|
]
|
|
@@ -103,6 +106,6 @@ function s() {
|
|
|
103
106
|
});
|
|
104
107
|
}
|
|
105
108
|
//#endregion
|
|
106
|
-
export {
|
|
109
|
+
export { c as ProjectCreatePage };
|
|
107
110
|
|
|
108
111
|
//# sourceMappingURL=ProjectCreatePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectCreatePage.js","names":[],"sources":["../../../../src/timecampus/pages/projects/ProjectCreatePage.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport { ArrowLeft } from \"lucide-react\";\nimport { GlassCard } from \"@burdenoff/fe-libs/ui\";\nimport { PageLayout } from \"../../components/PageLayout\";\nimport { useCreateProjectMutation } from \"@/generated/wspace-operations\";\n\nexport function ProjectCreatePage() {\n const [name, setName] = useState(\"\");\n const [clientId, setClientId] = useState(\"\");\n const [description, setDescription] = useState(\"\");\n const [estimatedHours, setEstimatedHours] = useState(\"\");\n const [hourlyRate, setHourlyRate] = useState(\"\");\n\n const [createProject, { loading: creating, error }] =\n useCreateProjectMutation();\n\n const handleSubmit = async () => {\n if (!name.trim()) return;\n await createProject({\n variables: {\n input: {\n name: name.trim(),\n description: description.trim() || undefined,\n clientId: clientId.trim() || undefined,\n estimatedHours: estimatedHours ? Number(estimatedHours) : undefined,\n hourlyRate: hourlyRate ? Number(hourlyRate) : undefined,\n },\n },\n });\n };\n\n return (\n <PageLayout\n title=\"Create Project\"\n description=\"Set up a new project for time tracking\"\n purpose=\"Define a new project — its client, estimate and rate — so the time your team logs against it rolls up into accurate progress and billing from day one.\"\n actions={\n <button className=\"inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50\">\n <ArrowLeft className=\"h-4 w-4\" />\n Back to Projects\n </button>\n }\n >\n <GlassCard treatment=\"glass\" glow className=\"mx-auto max-w-2xl p-6\">\n {error && (\n <div className=\"mb-4 rounded-lg border border-status-error-bg/40 bg-status-error-bg p-3 text-sm text-status-error-text\">\n Failed to create project. Please try again.\n </div>\n )}\n <div className=\"space-y-4\">\n <div>\n <label className=\"block text-sm font-medium text-text-primary\">\n Project Name\n </label>\n <input\n type=\"text\"\n placeholder=\"Enter project name\"\n value={name}\n onChange={(e) => setName(e.target.value)}\n className=\"mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary\"\n />\n </div>\n <div>\n <label className=\"block text-sm font-medium text-text-primary\">\n Client\n </label>\n <input\n type=\"text\"\n placeholder=\"Client name\"\n value={clientId}\n onChange={(e) => setClientId(e.target.value)}\n className=\"mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary\"\n />\n </div>\n <div>\n <label className=\"block text-sm font-medium text-text-primary\">\n Description\n </label>\n <textarea\n placeholder=\"Project description\"\n rows={3}\n value={description}\n onChange={(e) => setDescription(e.target.value)}\n className=\"mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary\"\n />\n </div>\n <div className=\"grid grid-cols-2 gap-4\">\n <div>\n <label className=\"block text-sm font-medium text-text-primary\">\n Estimated Hours\n </label>\n <input\n type=\"number\"\n placeholder=\"0\"\n value={estimatedHours}\n onChange={(e) => setEstimatedHours(e.target.value)}\n className=\"mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n </div>\n <div>\n <label className=\"block text-sm font-medium text-text-primary\">\n Hourly Rate\n </label>\n <input\n type=\"number\"\n placeholder=\"0.00\"\n value={hourlyRate}\n onChange={(e) => setHourlyRate(e.target.value)}\n className=\"mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n </div>\n </div>\n <div className=\"flex justify-end gap-2 pt-4\">\n <button className=\"rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50\">\n Cancel\n </button>\n <button\n onClick={handleSubmit}\n disabled={creating || !name.trim()}\n className=\"rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50\"\n >\n {creating ? \"Creating...\" : \"Create Project\"}\n </button>\n </div>\n </div>\n </GlassCard>\n </PageLayout>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProjectCreatePage.js","names":[],"sources":["../../../../src/timecampus/pages/projects/ProjectCreatePage.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport { ArrowLeft } from \"lucide-react\";\nimport { GlassCard } from \"@burdenoff/fe-libs/ui\";\nimport { PageLayout } from \"../../components/PageLayout\";\nimport { useTimeCampusNavigate } from \"../../providers/TimeCampusProvider\";\nimport { useCreateProjectMutation } from \"@/generated/wspace-operations\";\n\nexport function ProjectCreatePage() {\n const navigate = useTimeCampusNavigate();\n const [name, setName] = useState(\"\");\n const [clientId, setClientId] = useState(\"\");\n const [description, setDescription] = useState(\"\");\n const [estimatedHours, setEstimatedHours] = useState(\"\");\n const [hourlyRate, setHourlyRate] = useState(\"\");\n\n const [createProject, { loading: creating, error }] =\n useCreateProjectMutation();\n\n const handleSubmit = async () => {\n if (!name.trim()) return;\n await createProject({\n variables: {\n input: {\n name: name.trim(),\n description: description.trim() || undefined,\n clientId: clientId.trim() || undefined,\n estimatedHours: estimatedHours ? Number(estimatedHours) : undefined,\n hourlyRate: hourlyRate ? Number(hourlyRate) : undefined,\n },\n },\n });\n navigate(\"/projects\");\n };\n\n return (\n <PageLayout\n title=\"Create Project\"\n description=\"Set up a new project for time tracking\"\n purpose=\"Define a new project — its client, estimate and rate — so the time your team logs against it rolls up into accurate progress and billing from day one.\"\n actions={\n <button\n onClick={() => navigate(\"/projects\")}\n className=\"inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50\"\n >\n <ArrowLeft className=\"h-4 w-4\" />\n Back to Projects\n </button>\n }\n >\n <GlassCard treatment=\"glass\" glow className=\"mx-auto max-w-2xl p-6\">\n {error && (\n <div className=\"mb-4 rounded-lg border border-status-error-bg/40 bg-status-error-bg p-3 text-sm text-status-error-text\">\n Failed to create project. Please try again.\n </div>\n )}\n <div className=\"space-y-4\">\n <div>\n <label className=\"block text-sm font-medium text-text-primary\">\n Project Name\n </label>\n <input\n type=\"text\"\n placeholder=\"Enter project name\"\n value={name}\n onChange={(e) => setName(e.target.value)}\n className=\"mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary\"\n />\n </div>\n <div>\n <label className=\"block text-sm font-medium text-text-primary\">\n Client\n </label>\n <input\n type=\"text\"\n placeholder=\"Client name\"\n value={clientId}\n onChange={(e) => setClientId(e.target.value)}\n className=\"mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary\"\n />\n </div>\n <div>\n <label className=\"block text-sm font-medium text-text-primary\">\n Description\n </label>\n <textarea\n placeholder=\"Project description\"\n rows={3}\n value={description}\n onChange={(e) => setDescription(e.target.value)}\n className=\"mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary\"\n />\n </div>\n <div className=\"grid grid-cols-2 gap-4\">\n <div>\n <label className=\"block text-sm font-medium text-text-primary\">\n Estimated Hours\n </label>\n <input\n type=\"number\"\n placeholder=\"0\"\n value={estimatedHours}\n onChange={(e) => setEstimatedHours(e.target.value)}\n className=\"mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n </div>\n <div>\n <label className=\"block text-sm font-medium text-text-primary\">\n Hourly Rate\n </label>\n <input\n type=\"number\"\n placeholder=\"0.00\"\n value={hourlyRate}\n onChange={(e) => setHourlyRate(e.target.value)}\n className=\"mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n </div>\n </div>\n <div className=\"flex justify-end gap-2 pt-4\">\n <button\n onClick={() => navigate(\"/projects\")}\n className=\"rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50\"\n >\n Cancel\n </button>\n <button\n onClick={handleSubmit}\n disabled={creating || !name.trim()}\n className=\"rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50\"\n >\n {creating ? \"Creating...\" : \"Create Project\"}\n </button>\n </div>\n </div>\n </GlassCard>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;AAOA,SAAgB,IAAoB;CAClC,IAAM,IAAW,GAAuB,EAClC,CAAC,GAAM,KAAW,EAAS,GAAG,EAC9B,CAAC,GAAU,KAAe,EAAS,GAAG,EACtC,CAAC,GAAa,KAAkB,EAAS,GAAG,EAC5C,CAAC,GAAgB,KAAqB,EAAS,GAAG,EAClD,CAAC,GAAY,KAAiB,EAAS,GAAG,EAE1C,CAAC,GAAe,EAAE,SAAS,GAAU,cACzC,GAA0B;AAkB5B,QACE,kBAAC,GAAD;EACE,OAAM;EACN,aAAY;EACZ,SAAQ;EACR,SACE,kBAAC,UAAD;GACE,eAAe,EAAS,YAAY;GACpC,WAAU;aAFZ,CAIE,kBAAC,GAAD,EAAW,WAAU,WAAY,CAAA,EAAA,mBAE1B;;YAGX,kBAAC,GAAD;GAAW,WAAU;GAAQ,MAAA;GAAK,WAAU;aAA5C,CACG,KACC,kBAAC,OAAD;IAAK,WAAU;cAAyG;IAElH,CAAA,EAER,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,SAAD;MAAO,WAAU;gBAA8C;MAEvD,CAAA,EACR,kBAAC,SAAD;MACE,MAAK;MACL,aAAY;MACZ,OAAO;MACP,WAAW,MAAM,EAAQ,EAAE,OAAO,MAAM;MACxC,WAAU;MACV,CAAA,CACE,EAAA,CAAA;KACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,SAAD;MAAO,WAAU;gBAA8C;MAEvD,CAAA,EACR,kBAAC,SAAD;MACE,MAAK;MACL,aAAY;MACZ,OAAO;MACP,WAAW,MAAM,EAAY,EAAE,OAAO,MAAM;MAC5C,WAAU;MACV,CAAA,CACE,EAAA,CAAA;KACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,SAAD;MAAO,WAAU;gBAA8C;MAEvD,CAAA,EACR,kBAAC,YAAD;MACE,aAAY;MACZ,MAAM;MACN,OAAO;MACP,WAAW,MAAM,EAAe,EAAE,OAAO,MAAM;MAC/C,WAAU;MACV,CAAA,CACE,EAAA,CAAA;KACN,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,SAAD;OAAO,WAAU;iBAA8C;OAEvD,CAAA,EACR,kBAAC,SAAD;OACE,MAAK;OACL,aAAY;OACZ,OAAO;OACP,WAAW,MAAM,EAAkB,EAAE,OAAO,MAAM;OAClD,WAAU;OACV,CAAA,CACE,EAAA,CAAA,EACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,SAAD;OAAO,WAAU;iBAA8C;OAEvD,CAAA,EACR,kBAAC,SAAD;OACE,MAAK;OACL,aAAY;OACZ,OAAO;OACP,WAAW,MAAM,EAAc,EAAE,OAAO,MAAM;OAC9C,WAAU;OACV,CAAA,CACE,EAAA,CAAA,CACF;;KACN,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,UAAD;OACE,eAAe,EAAS,YAAY;OACpC,WAAU;iBACX;OAEQ,CAAA,EACT,kBAAC,UAAD;OACE,SA5GS,YAAY;AAC1B,UAAK,MAAM,KAChB,MAAM,EAAc,EAClB,WAAW,EACT,OAAO;SACL,MAAM,EAAK,MAAM;SACjB,aAAa,EAAY,MAAM,IAAI,KAAA;SACnC,UAAU,EAAS,MAAM,IAAI,KAAA;SAC7B,gBAAgB,IAAiB,OAAO,EAAe,GAAG,KAAA;SAC1D,YAAY,IAAa,OAAO,EAAW,GAAG,KAAA;SAC/C,EACF,EACF,CAAC,EACF,EAAS,YAAY;;OAgGX,UAAU,KAAY,CAAC,EAAK,MAAM;OAClC,WAAU;iBAET,IAAW,gBAAgB;OACrB,CAAA,CACL;;KACF;MACI;;EACD,CAAA"}
|
|
@@ -2,38 +2,99 @@ import { useTimeCampusNavigate as e } from "../../providers/TimeCampusProvider.j
|
|
|
2
2
|
import { formatCurrency as t, formatHours as n } from "../../utils/helpers.js";
|
|
3
3
|
import { StatCard as r } from "../../components/StatCard.js";
|
|
4
4
|
import { LoadingSkeleton as i } from "../../components/LoadingSkeleton.js";
|
|
5
|
-
import {
|
|
6
|
-
import { PageLayout as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { useArchiveProjectMutation as a, useDeleteProjectMutation as o, useGetProjectQuery as s, useGetProjectStatsQuery as c, useUpdateProjectMutation as l } from "../../../generated/wspace-operations.js";
|
|
6
|
+
import { PageLayout as u } from "../../components/PageLayout.js";
|
|
7
|
+
import { Modal as d } from "../../components/Modal.js";
|
|
8
|
+
import { useState as f } from "react";
|
|
9
|
+
import { Archive as p, Clock as m, FolderOpen as h, Pencil as g, Trash2 as _, TrendingUp as v, Users as y } from "lucide-react";
|
|
10
|
+
import { useParams as b } from "react-router-dom";
|
|
11
|
+
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
12
|
+
import { NextSteps as w } from "@burdenoff/fe-libs/ui";
|
|
11
13
|
//#region src/timecampus/pages/projects/ProjectDetailPage.tsx
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}),
|
|
20
|
-
|
|
14
|
+
var T = [
|
|
15
|
+
"active",
|
|
16
|
+
"on-hold",
|
|
17
|
+
"completed",
|
|
18
|
+
"archived"
|
|
19
|
+
], E = "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary", D = "block text-sm font-medium text-text-primary";
|
|
20
|
+
function O() {
|
|
21
|
+
let { projectId: O } = b(), k = e(), { data: A, loading: j, error: M, refetch: N } = s({
|
|
22
|
+
variables: { id: O },
|
|
23
|
+
skip: !O
|
|
24
|
+
}), { data: P, loading: F } = c({
|
|
25
|
+
variables: { id: O },
|
|
26
|
+
skip: !O
|
|
27
|
+
}), I = A?.project, L = P?.projectStats, [R, z] = f(!1), [B, V] = f(!1), [H, U] = f({
|
|
28
|
+
name: "",
|
|
29
|
+
clientId: "",
|
|
30
|
+
description: "",
|
|
31
|
+
status: "active",
|
|
32
|
+
estimatedHours: "",
|
|
33
|
+
hourlyRate: ""
|
|
34
|
+
}), [W, { loading: G, error: K }] = l(), [q, { loading: J }] = a(), [Y, { loading: X, error: Z }] = o(), Q = () => {
|
|
35
|
+
I && (U({
|
|
36
|
+
name: I.name,
|
|
37
|
+
clientId: I.clientId ?? "",
|
|
38
|
+
description: I.description ?? "",
|
|
39
|
+
status: I.status,
|
|
40
|
+
estimatedHours: I.estimatedHours == null ? "" : String(I.estimatedHours),
|
|
41
|
+
hourlyRate: I.hourlyRate == null ? "" : String(I.hourlyRate)
|
|
42
|
+
}), z(!0));
|
|
43
|
+
}, $ = async () => {
|
|
44
|
+
!O || !H.name.trim() || (await W({ variables: {
|
|
45
|
+
id: O,
|
|
46
|
+
input: {
|
|
47
|
+
name: H.name.trim(),
|
|
48
|
+
description: H.description.trim() || void 0,
|
|
49
|
+
clientId: H.clientId.trim() || void 0,
|
|
50
|
+
status: H.status,
|
|
51
|
+
estimatedHours: H.estimatedHours ? Number(H.estimatedHours) : void 0,
|
|
52
|
+
hourlyRate: H.hourlyRate ? Number(H.hourlyRate) : void 0
|
|
53
|
+
}
|
|
54
|
+
} }), z(!1), await N());
|
|
55
|
+
}, ee = async () => {
|
|
56
|
+
O && (await q({ variables: { id: O } }), await N());
|
|
57
|
+
};
|
|
58
|
+
return M ? /* @__PURE__ */ S(u, {
|
|
21
59
|
title: "Project Details",
|
|
22
|
-
description: `Project ID: ${
|
|
23
|
-
children: /* @__PURE__ */
|
|
60
|
+
description: `Project ID: ${O}`,
|
|
61
|
+
children: /* @__PURE__ */ S("div", {
|
|
24
62
|
className: "rounded-xl border border-status-error-bg/40 bg-status-error-bg p-6 text-sm text-status-error-text",
|
|
25
63
|
children: "Failed to load project details. Please try again later."
|
|
26
64
|
})
|
|
27
|
-
}) :
|
|
65
|
+
}) : j || F ? /* @__PURE__ */ S(u, {
|
|
28
66
|
title: "Project Details",
|
|
29
|
-
description: `Project ID: ${
|
|
30
|
-
children: /* @__PURE__ */
|
|
31
|
-
}) : /* @__PURE__ */
|
|
32
|
-
title:
|
|
33
|
-
description:
|
|
67
|
+
description: `Project ID: ${O}`,
|
|
68
|
+
children: /* @__PURE__ */ S(i, { variant: "detail" })
|
|
69
|
+
}) : /* @__PURE__ */ C(u, {
|
|
70
|
+
title: I?.name ?? "Project Details",
|
|
71
|
+
description: I?.description ?? `Project ID: ${O}`,
|
|
34
72
|
purpose: "See everything happening on this project in one place — logged hours, task progress and budget burn — so you know whether it's on track and where the time is going before it overruns.",
|
|
73
|
+
actions: /* @__PURE__ */ C("div", {
|
|
74
|
+
className: "flex items-center gap-2",
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ C("button", {
|
|
77
|
+
onClick: Q,
|
|
78
|
+
disabled: !I,
|
|
79
|
+
className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50 disabled:opacity-50",
|
|
80
|
+
children: [/* @__PURE__ */ S(g, { className: "h-4 w-4" }), "Edit"]
|
|
81
|
+
}),
|
|
82
|
+
I?.status !== "archived" && /* @__PURE__ */ C("button", {
|
|
83
|
+
onClick: () => void ee(),
|
|
84
|
+
disabled: !I || J,
|
|
85
|
+
className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50 disabled:opacity-50",
|
|
86
|
+
children: [/* @__PURE__ */ S(p, { className: "h-4 w-4" }), J ? "Archiving…" : "Archive"]
|
|
87
|
+
}),
|
|
88
|
+
/* @__PURE__ */ C("button", {
|
|
89
|
+
onClick: () => V(!0),
|
|
90
|
+
disabled: !I,
|
|
91
|
+
className: "inline-flex items-center gap-1.5 rounded-md border border-status-error-bg/40 px-3 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg disabled:opacity-50",
|
|
92
|
+
children: [/* @__PURE__ */ S(_, { className: "h-4 w-4" }), "Delete"]
|
|
93
|
+
})
|
|
94
|
+
]
|
|
95
|
+
}),
|
|
35
96
|
children: [
|
|
36
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ S(w, {
|
|
37
98
|
storageKey: "timecampus-project-detail",
|
|
38
99
|
className: "mb-6",
|
|
39
100
|
steps: [
|
|
@@ -41,82 +102,218 @@ function g() {
|
|
|
41
102
|
id: "log-time",
|
|
42
103
|
label: "Log time to this project",
|
|
43
104
|
description: "Start the timer or add a manual entry for this work.",
|
|
44
|
-
onClick: () =>
|
|
105
|
+
onClick: () => k("/time/timer")
|
|
45
106
|
},
|
|
46
107
|
{
|
|
47
108
|
id: "view-tasks",
|
|
48
109
|
label: "Review tasks",
|
|
49
110
|
description: "Break the project into trackable tasks.",
|
|
50
|
-
onClick: () =>
|
|
111
|
+
onClick: () => k(`/projects/${O ?? ""}/tasks`)
|
|
51
112
|
},
|
|
52
113
|
{
|
|
53
114
|
id: "open-reports",
|
|
54
115
|
label: "Open reports",
|
|
55
116
|
description: "Analyse this project's time and budget over time.",
|
|
56
|
-
onClick: () =>
|
|
117
|
+
onClick: () => k("/reports")
|
|
57
118
|
}
|
|
58
119
|
]
|
|
59
120
|
}),
|
|
60
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ C("div", {
|
|
61
122
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
62
123
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ S(r, {
|
|
64
125
|
featured: !0,
|
|
65
126
|
title: "Tracked Hours",
|
|
66
|
-
value: n(
|
|
67
|
-
icon: /* @__PURE__ */
|
|
127
|
+
value: n(L?.totalHours ?? I?.trackedHours ?? 0),
|
|
128
|
+
icon: /* @__PURE__ */ S(m, { className: "h-5 w-5" })
|
|
68
129
|
}),
|
|
69
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ S(r, {
|
|
70
131
|
title: "Tasks",
|
|
71
|
-
value: `${
|
|
72
|
-
icon: /* @__PURE__ */
|
|
132
|
+
value: `${L?.completedTasks ?? 0} / ${L?.totalTasks ?? 0}`,
|
|
133
|
+
icon: /* @__PURE__ */ S(y, { className: "h-5 w-5" }),
|
|
73
134
|
description: "completed / total"
|
|
74
135
|
}),
|
|
75
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ S(r, {
|
|
76
137
|
title: "Progress",
|
|
77
|
-
value:
|
|
78
|
-
icon: /* @__PURE__ */
|
|
138
|
+
value: L?.totalTasks ? `${Math.round((L?.completedTasks ?? 0) / L.totalTasks * 100)}%` : "0%",
|
|
139
|
+
icon: /* @__PURE__ */ S(v, { className: "h-5 w-5" })
|
|
79
140
|
}),
|
|
80
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ S(r, {
|
|
81
142
|
title: "Budget Used",
|
|
82
|
-
value: t(
|
|
83
|
-
icon: /* @__PURE__ */
|
|
84
|
-
description:
|
|
143
|
+
value: t(L?.budgetUsed ?? 0, I?.currency ?? "USD"),
|
|
144
|
+
icon: /* @__PURE__ */ S(h, { className: "h-5 w-5" }),
|
|
145
|
+
description: L?.budgetRemaining == null ? void 0 : `${t(L.budgetRemaining, I?.currency ?? "USD")} remaining`
|
|
85
146
|
})
|
|
86
147
|
]
|
|
87
148
|
}),
|
|
88
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ C("div", {
|
|
89
150
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
|
|
90
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ C("div", {
|
|
91
152
|
className: "rounded-xl border border-border-seam bg-gloss-card shadow-pop p-6",
|
|
92
|
-
children: [/* @__PURE__ */
|
|
153
|
+
children: [/* @__PURE__ */ S("h3", {
|
|
93
154
|
className: "mb-4 text-sm font-semibold text-text-primary",
|
|
94
155
|
children: "Recent Activity"
|
|
95
|
-
}), /* @__PURE__ */
|
|
156
|
+
}), /* @__PURE__ */ S("div", {
|
|
96
157
|
className: "flex h-48 items-center justify-center rounded-lg border border-dashed border-border-subtle",
|
|
97
|
-
children: /* @__PURE__ */
|
|
158
|
+
children: /* @__PURE__ */ S("p", {
|
|
98
159
|
className: "text-sm text-text-secondary",
|
|
99
160
|
children: "Activity timeline will render here"
|
|
100
161
|
})
|
|
101
162
|
})]
|
|
102
|
-
}), /* @__PURE__ */
|
|
163
|
+
}), /* @__PURE__ */ C("div", {
|
|
103
164
|
className: "rounded-xl border border-border-seam bg-gloss-card shadow-pop p-6",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ S("h3", {
|
|
105
166
|
className: "mb-4 text-sm font-semibold text-text-primary",
|
|
106
167
|
children: "Time Distribution"
|
|
107
|
-
}), /* @__PURE__ */
|
|
168
|
+
}), /* @__PURE__ */ S("div", {
|
|
108
169
|
className: "flex h-48 items-center justify-center rounded-lg border border-dashed border-border-subtle",
|
|
109
|
-
children: /* @__PURE__ */
|
|
170
|
+
children: /* @__PURE__ */ S("p", {
|
|
110
171
|
className: "text-sm text-text-secondary",
|
|
111
172
|
children: "Chart will render here"
|
|
112
173
|
})
|
|
113
174
|
})]
|
|
114
175
|
})]
|
|
176
|
+
}),
|
|
177
|
+
/* @__PURE__ */ C(d, {
|
|
178
|
+
open: R,
|
|
179
|
+
onClose: () => z(!1),
|
|
180
|
+
title: "Edit Project",
|
|
181
|
+
size: "xl",
|
|
182
|
+
footer: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("button", {
|
|
183
|
+
onClick: () => z(!1),
|
|
184
|
+
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
|
|
185
|
+
children: "Cancel"
|
|
186
|
+
}), /* @__PURE__ */ S("button", {
|
|
187
|
+
onClick: $,
|
|
188
|
+
disabled: G || !H.name.trim(),
|
|
189
|
+
className: "rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
|
|
190
|
+
children: G ? "Saving…" : "Save Changes"
|
|
191
|
+
})] }),
|
|
192
|
+
children: [K && /* @__PURE__ */ S("div", {
|
|
193
|
+
className: "mb-4 rounded-lg border border-status-error-bg/40 bg-status-error-bg p-3 text-sm text-status-error-text",
|
|
194
|
+
children: "Failed to update project. Please try again."
|
|
195
|
+
}), /* @__PURE__ */ C("div", {
|
|
196
|
+
className: "space-y-4",
|
|
197
|
+
children: [
|
|
198
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
199
|
+
className: D,
|
|
200
|
+
children: "Project Name"
|
|
201
|
+
}), /* @__PURE__ */ S("input", {
|
|
202
|
+
type: "text",
|
|
203
|
+
value: H.name,
|
|
204
|
+
onChange: (e) => U({
|
|
205
|
+
...H,
|
|
206
|
+
name: e.target.value
|
|
207
|
+
}),
|
|
208
|
+
className: E
|
|
209
|
+
})] }),
|
|
210
|
+
/* @__PURE__ */ C("div", {
|
|
211
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
212
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
213
|
+
className: D,
|
|
214
|
+
children: "Client"
|
|
215
|
+
}), /* @__PURE__ */ S("input", {
|
|
216
|
+
type: "text",
|
|
217
|
+
value: H.clientId,
|
|
218
|
+
onChange: (e) => U({
|
|
219
|
+
...H,
|
|
220
|
+
clientId: e.target.value
|
|
221
|
+
}),
|
|
222
|
+
className: E
|
|
223
|
+
})] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
224
|
+
className: D,
|
|
225
|
+
children: "Status"
|
|
226
|
+
}), /* @__PURE__ */ S("select", {
|
|
227
|
+
value: H.status,
|
|
228
|
+
onChange: (e) => U({
|
|
229
|
+
...H,
|
|
230
|
+
status: e.target.value
|
|
231
|
+
}),
|
|
232
|
+
className: E,
|
|
233
|
+
children: T.map((e) => /* @__PURE__ */ S("option", {
|
|
234
|
+
value: e,
|
|
235
|
+
children: e
|
|
236
|
+
}, e))
|
|
237
|
+
})] })]
|
|
238
|
+
}),
|
|
239
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
240
|
+
className: D,
|
|
241
|
+
children: "Description"
|
|
242
|
+
}), /* @__PURE__ */ S("textarea", {
|
|
243
|
+
rows: 3,
|
|
244
|
+
value: H.description,
|
|
245
|
+
onChange: (e) => U({
|
|
246
|
+
...H,
|
|
247
|
+
description: e.target.value
|
|
248
|
+
}),
|
|
249
|
+
className: E
|
|
250
|
+
})] }),
|
|
251
|
+
/* @__PURE__ */ C("div", {
|
|
252
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
253
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
254
|
+
className: D,
|
|
255
|
+
children: "Estimated Hours"
|
|
256
|
+
}), /* @__PURE__ */ S("input", {
|
|
257
|
+
type: "number",
|
|
258
|
+
value: H.estimatedHours,
|
|
259
|
+
onChange: (e) => U({
|
|
260
|
+
...H,
|
|
261
|
+
estimatedHours: e.target.value
|
|
262
|
+
}),
|
|
263
|
+
className: E
|
|
264
|
+
})] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
265
|
+
className: D,
|
|
266
|
+
children: "Hourly Rate"
|
|
267
|
+
}), /* @__PURE__ */ S("input", {
|
|
268
|
+
type: "number",
|
|
269
|
+
value: H.hourlyRate,
|
|
270
|
+
onChange: (e) => U({
|
|
271
|
+
...H,
|
|
272
|
+
hourlyRate: e.target.value
|
|
273
|
+
}),
|
|
274
|
+
className: E
|
|
275
|
+
})] })]
|
|
276
|
+
})
|
|
277
|
+
]
|
|
278
|
+
})]
|
|
279
|
+
}),
|
|
280
|
+
/* @__PURE__ */ C(d, {
|
|
281
|
+
open: B,
|
|
282
|
+
onClose: () => V(!1),
|
|
283
|
+
title: "Delete Project",
|
|
284
|
+
size: "sm",
|
|
285
|
+
footer: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("button", {
|
|
286
|
+
onClick: () => V(!1),
|
|
287
|
+
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
|
|
288
|
+
children: "Cancel"
|
|
289
|
+
}), /* @__PURE__ */ S("button", {
|
|
290
|
+
onClick: async () => {
|
|
291
|
+
O && (await Y({ variables: { id: O } }), V(!1), k("/projects"));
|
|
292
|
+
},
|
|
293
|
+
disabled: X,
|
|
294
|
+
className: "rounded-md bg-status-error-bg px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/90 disabled:opacity-50",
|
|
295
|
+
children: X ? "Deleting…" : "Delete"
|
|
296
|
+
})] }),
|
|
297
|
+
children: [Z && /* @__PURE__ */ S("div", {
|
|
298
|
+
className: "mb-4 rounded-lg border border-status-error-bg/40 bg-status-error-bg p-3 text-sm text-status-error-text",
|
|
299
|
+
children: "Failed to delete project. Please try again."
|
|
300
|
+
}), /* @__PURE__ */ C("p", {
|
|
301
|
+
className: "text-sm text-text-secondary",
|
|
302
|
+
children: [
|
|
303
|
+
"Are you sure you want to delete",
|
|
304
|
+
" ",
|
|
305
|
+
/* @__PURE__ */ S("span", {
|
|
306
|
+
className: "font-semibold text-text-primary",
|
|
307
|
+
children: I?.name
|
|
308
|
+
}),
|
|
309
|
+
"? This action cannot be undone."
|
|
310
|
+
]
|
|
311
|
+
})]
|
|
115
312
|
})
|
|
116
313
|
]
|
|
117
314
|
});
|
|
118
315
|
}
|
|
119
316
|
//#endregion
|
|
120
|
-
export {
|
|
317
|
+
export { O as ProjectDetailPage };
|
|
121
318
|
|
|
122
319
|
//# sourceMappingURL=ProjectDetailPage.js.map
|