@burdenoff/microfe-timecampus 2026.1031.14 → 2026.1102.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.d.ts +71 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +861 -817
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/timecampus/TimeCampusRoot.d.ts.map +1 -1
- package/dist/timecampus/TimeCampusRoot.js +116 -96
- package/dist/timecampus/TimeCampusRoot.js.map +1 -1
- package/dist/timecampus/TimeCampusRoutes.d.ts.map +1 -1
- package/dist/timecampus/TimeCampusRoutes.js +22 -14
- package/dist/timecampus/TimeCampusRoutes.js.map +1 -1
- package/dist/timecampus/components/ToggleSwitch.d.ts +12 -0
- package/dist/timecampus/components/ToggleSwitch.d.ts.map +1 -0
- package/dist/timecampus/components/ToggleSwitch.js +19 -0
- package/dist/timecampus/components/ToggleSwitch.js.map +1 -0
- package/dist/timecampus/components/index.d.ts +1 -0
- package/dist/timecampus/components/index.d.ts.map +1 -1
- package/dist/timecampus/components/index.js +11 -10
- package/dist/timecampus/index.js +7 -7
- package/dist/timecampus/pages/dashboard/ServerReportExports.d.ts.map +1 -1
- package/dist/timecampus/pages/dashboard/ServerReportExports.js +99 -99
- package/dist/timecampus/pages/dashboard/ServerReportExports.js.map +1 -1
- package/dist/timecampus/pages/dashboard/reportTemplates.d.ts +8 -0
- package/dist/timecampus/pages/dashboard/reportTemplates.d.ts.map +1 -1
- package/dist/timecampus/pages/dashboard/reportTemplates.js +29 -19
- package/dist/timecampus/pages/dashboard/reportTemplates.js.map +1 -1
- package/dist/timecampus/pages/lifetime/PersonalCorporatePage.d.ts.map +1 -1
- package/dist/timecampus/pages/lifetime/PersonalCorporatePage.js +147 -162
- package/dist/timecampus/pages/lifetime/PersonalCorporatePage.js.map +1 -1
- package/dist/timecampus/pages/settings/PrivacySettingsPage.d.ts +2 -0
- package/dist/timecampus/pages/settings/PrivacySettingsPage.d.ts.map +1 -0
- package/dist/timecampus/pages/settings/PrivacySettingsPage.js +268 -0
- package/dist/timecampus/pages/settings/PrivacySettingsPage.js.map +1 -0
- package/dist/timecampus/pages/settings/SettingsPage.d.ts +2 -0
- package/dist/timecampus/pages/settings/SettingsPage.d.ts.map +1 -0
- package/dist/timecampus/pages/settings/SettingsPage.js +175 -0
- package/dist/timecampus/pages/settings/SettingsPage.js.map +1 -0
- package/dist/timecampus/pages/settings/ThemePreferenceSync.d.ts +15 -0
- package/dist/timecampus/pages/settings/ThemePreferenceSync.d.ts.map +1 -0
- package/dist/timecampus/pages/settings/ThemePreferenceSync.js +80 -0
- package/dist/timecampus/pages/settings/ThemePreferenceSync.js.map +1 -0
- package/dist/timecampus/pages/settings/retention.d.ts +25 -0
- package/dist/timecampus/pages/settings/retention.d.ts.map +1 -0
- package/dist/timecampus/pages/settings/retention.js +34 -0
- package/dist/timecampus/pages/settings/retention.js.map +1 -0
- package/dist/timecampus/pages/settings/themePreference.d.ts +45 -0
- package/dist/timecampus/pages/settings/themePreference.d.ts.map +1 -0
- package/dist/timecampus/pages/settings/themePreference.js +49 -0
- package/dist/timecampus/pages/settings/themePreference.js.map +1 -0
- package/dist/timecampus/utils/helpers.d.ts +2 -0
- package/dist/timecampus/utils/helpers.d.ts.map +1 -1
- package/dist/timecampus/utils/helpers.js +5 -1
- package/dist/timecampus/utils/helpers.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerReportExports.js","names":[],"sources":["../../../../src/timecampus/pages/dashboard/ServerReportExports.tsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport { Download, FileDown, Loader2 } from \"lucide-react\";\nimport { GlassCard } from \"@burdenoff/fe-libs/ui\";\nimport { StatusBadge, ProgressMeter } from \"../../components\";\nimport { TimeCampusExportFormat } from \"@/generated/wspace-types\";\nimport {\n useExportTimeCampusEntitiesMutation,\n useTimeCampusExportJobQuery,\n type TimeCampusExportJobFieldsFragment,\n} from \"@/generated/wspace-operations\";\nimport {\n REPORT_PERIODS,\n REPORT_TEMPLATES,\n buildReportName,\n exportStatusLabel,\n exportStatusTone,\n findReportTemplate,\n isTerminalExportStatus,\n resolveReportDateRange,\n type ReportPeriodId,\n type ReportTemplateId,\n} from \"./reportTemplates\";\n\nconst POLL_INTERVAL_MS = 3000;\n/**\n * Stop polling a job that has not settled after this long, so a stuck job\n * cannot keep the page firing requests forever. The user can resume.\n */\nconst MAX_POLL_DURATION_MS = 15 * 60 * 1000;\n\ninterface StartedReport {\n jobId: string;\n name: string;\n initial: TimeCampusExportJobFieldsFragment;\n}\n\nfunction formatTimestamp(value: string | null | undefined): string {\n if (!value) return \"\";\n const date = new Date(value);\n return Number.isNaN(date.getTime()) ? \"\" : date.toLocaleString();\n}\n\n/**\n * One generated report. Polls `timeCampusExportJob` until the job reaches a\n * terminal status, then offers the archive download.\n */\nfunction ReportJobRow({ report }: { report: StartedReport }) {\n const [settled, setSettled] = useState(\n isTerminalExportStatus(report.initial.status),\n );\n const [timedOut, setTimedOut] = useState(false);\n const [pollEpoch, setPollEpoch] = useState(0);\n const { data, error, stopPolling, startPolling, refetch } =\n useTimeCampusExportJobQuery({\n variables: { id: report.jobId },\n pollInterval: settled || timedOut ? 0 : POLL_INTERVAL_MS,\n fetchPolicy: \"network-only\",\n });\n\n const job = data?.timeCampusExportJob ?? report.initial;\n const status = job.status;\n\n useEffect(() => {\n if (isTerminalExportStatus(status) || data?.timeCampusExportJob === null) {\n stopPolling();\n setSettled(true);\n setTimedOut(false);\n }\n }, [status, data, stopPolling]);\n\n // Cap how long one job is polled. pollEpoch restarts the window when the\n // user resumes checking.\n useEffect(() => {\n if (settled) return undefined;\n const timer = window.setTimeout(() => {\n stopPolling();\n setTimedOut(true);\n }, MAX_POLL_DURATION_MS);\n return () => window.clearTimeout(timer);\n }, [settled, pollEpoch, stopPolling]);\n\n const handleResume = () => {\n setTimedOut(false);\n setPollEpoch((n) => n + 1);\n startPolling(POLL_INTERVAL_MS);\n void refetch();\n };\n\n const missing = data !== undefined && data.timeCampusExportJob === null;\n const tone = missing ? \"warning\" : exportStatusTone(status);\n const label = missing ? \"Unavailable\" : exportStatusLabel(status);\n const inFlight = !missing && !isTerminalExportStatus(status);\n\n return (\n <li\n className=\"flex flex-col gap-3 rounded-lg border border-border-subtle bg-bg-surface p-3 sm:flex-row sm:items-center sm:justify-between\"\n data-testid=\"report-export-job\"\n data-status={missing ? \"MISSING\" : status}\n >\n <div className=\"min-w-0 flex-1 space-y-1\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <p className=\"truncate text-sm font-medium text-text-primary\">\n {report.name}\n </p>\n <StatusBadge variant={tone} label={label} dot />\n <span className=\"text-xs text-text-secondary\">{job.format}</span>\n </div>\n <p className=\"text-xs text-text-secondary\">\n Started {formatTimestamp(job.createdAt)}\n {job.completedAt\n ? ` · finished ${formatTimestamp(job.completedAt)}`\n : \"\"}\n </p>\n {inFlight && (\n <ProgressMeter\n value={job.progress ?? 0}\n max={100}\n higherIsWorse={false}\n label=\"Progress\"\n format={(v) => `${Math.round(v)}%`}\n size=\"sm\"\n />\n )}\n {status === \"FAILED\" && (\n <p className=\"text-xs text-status-error-text\">\n {job.errorMessage || \"The export failed. Try generating it again.\"}\n </p>\n )}\n {missing && (\n <p className=\"text-xs text-text-secondary\">\n This export is no longer available.\n </p>\n )}\n {timedOut && !settled && (\n <p className=\"text-xs text-text-secondary\">\n Still generating. Status checks paused to save requests; the export\n keeps running on the server.{\" \"}\n <button\n type=\"button\"\n onClick={handleResume}\n className=\"font-medium text-text-primary underline underline-offset-2\"\n >\n Check again\n </button>\n </p>\n )}\n {error && !missing && (\n <p className=\"text-xs text-status-error-text\">\n Could not refresh the export status: {error.message}\n </p>\n )}\n </div>\n <div className=\"flex shrink-0 items-center gap-2\">\n {inFlight && !timedOut && (\n <Loader2\n className=\"h-4 w-4 text-text-secondary motion-safe:animate-spin\"\n aria-hidden\n />\n )}\n {status === \"COMPLETED\" && job.downloadUrl && (\n <a\n href={job.downloadUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90\"\n title={\n job.downloadExpiresAt\n ? `Link expires ${formatTimestamp(job.downloadExpiresAt)}`\n : undefined\n }\n >\n <Download className=\"h-4 w-4\" />\n Download\n </a>\n )}\n </div>\n </li>\n );\n}\n\n/**\n * Server-side report builder: pick a template, a period and a format, and\n * wspace-export-svc builds the full dataset asynchronously.\n */\nexport function ServerReportExports() {\n const [templateId, setTemplateId] =\n useState<ReportTemplateId>(\"time-entries\");\n const [period, setPeriod] = useState<ReportPeriodId>(\"30d\");\n const [format, setFormat] = useState<TimeCampusExportFormat>(\n TimeCampusExportFormat.Csv,\n );\n const [reports, setReports] = useState<StartedReport[]>([]);\n const [startError, setStartError] = useState<string | null>(null);\n const [exportEntities, { loading }] = useExportTimeCampusEntitiesMutation();\n\n const template = findReportTemplate(templateId);\n\n const handleGenerate = async () => {\n setStartError(null);\n const name = buildReportName(template, period);\n try {\n const result = await exportEntities({\n variables: {\n input: {\n entityTypes: template.entityTypes,\n format,\n includeMetadata: true,\n name,\n ...resolveReportDateRange(period),\n },\n },\n });\n const job = result.data?.exportTimeCampusEntities;\n if (!job) {\n setStartError(\"The export could not be started. Please try again.\");\n return;\n }\n setReports((prev) => [{ jobId: job.id, name, initial: job }, ...prev]);\n } catch (err) {\n setStartError(\n err instanceof Error\n ? err.message\n : \"The export could not be started. Please try again.\",\n );\n }\n };\n\n const fieldClass =\n \"mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\";\n\n return (\n <section\n data-testid=\"server-report-exports\"\n aria-label=\"Generate a full report\"\n >\n <GlassCard treatment=\"glass\" className=\"p-4 sm:p-5\">\n <div className=\"flex items-start gap-3\">\n <div className=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-status-info-bg text-status-info-text\">\n <FileDown className=\"h-5 w-5\" />\n </div>\n <div className=\"min-w-0\">\n <h2 className=\"text-sm font-semibold text-text-primary\">\n Generate a full report\n </h2>\n <p className=\"mt-1 text-xs text-text-secondary\">\n Built on the server from your complete records, not just what this\n page has loaded. Large reports keep generating in the background;\n the download appears here when it is ready.\n </p>\n </div>\n </div>\n\n <div className=\"mt-4 grid grid-cols-1 gap-3 sm:grid-cols-3\">\n <label className=\"block text-xs font-medium text-text-secondary\">\n Report\n <select\n value={templateId}\n onChange={(e) =>\n setTemplateId(e.target.value as ReportTemplateId)\n }\n className={fieldClass}\n aria-label=\"Report template\"\n >\n {REPORT_TEMPLATES.map((t) => (\n <option key={t.id} value={t.id}>\n {t.label}\n </option>\n ))}\n </select>\n </label>\n <label className=\"block text-xs font-medium text-text-secondary\">\n Period\n <select\n value={period}\n onChange={(e) => setPeriod(e.target.value as ReportPeriodId)}\n className={fieldClass}\n aria-label=\"Report period\"\n >\n {REPORT_PERIODS.map((p) => (\n <option key={p.id} value={p.id}>\n {p.label}\n </option>\n ))}\n </select>\n </label>\n <label className=\"block text-xs font-medium text-text-secondary\">\n Format\n <select\n value={format}\n onChange={(e) =>\n setFormat(e.target.value as TimeCampusExportFormat)\n }\n className={fieldClass}\n aria-label=\"Report format\"\n >\n <option value={TimeCampusExportFormat.Csv}>CSV</option>\n <option value={TimeCampusExportFormat.Json}>JSON</option>\n </select>\n </label>\n </div>\n <p className=\"mt-2 text-xs text-text-secondary\">\n {template.description}\n </p>\n\n <div className=\"mt-4 flex flex-wrap items-center gap-3\">\n <button\n type=\"button\"\n onClick={handleGenerate}\n disabled={loading}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-70\"\n >\n {loading ? (\n <Loader2 className=\"h-4 w-4 motion-safe:animate-spin\" />\n ) : (\n <FileDown className=\"h-4 w-4\" />\n )}\n {loading ? \"Starting…\" : \"Generate report\"}\n </button>\n {startError && (\n <p role=\"alert\" className=\"text-sm text-status-error-text\">\n {startError}\n </p>\n )}\n </div>\n\n {reports.length > 0 && (\n <div className=\"mt-5 border-t border-border-subtle pt-4\">\n <h3 className=\"text-xs font-semibold uppercase tracking-wide text-text-secondary\">\n Generated this session\n </h3>\n <ul className=\"mt-2 space-y-2\">\n {reports.map((report) => (\n <ReportJobRow key={report.jobId} report={report} />\n ))}\n </ul>\n </div>\n )}\n </GlassCard>\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;AAuBA,IAAM,IAAmB,KAKnB,IAAuB;AAQ7B,SAAS,EAAgB,GAA0C;CACjE,IAAI,CAAC,GAAO,OAAO;CACnB,IAAM,IAAO,IAAI,KAAK,CAAK;CAC3B,OAAO,OAAO,MAAM,EAAK,QAAQ,CAAC,IAAI,KAAK,EAAK,eAAe;AACjE;AAMA,SAAS,EAAa,EAAE,aAAqC;CAC3D,IAAM,CAAC,GAAS,KAAc,EAC5B,EAAuB,EAAO,QAAQ,MAAM,CAC9C,GACM,CAAC,GAAU,KAAe,EAAS,EAAK,GACxC,CAAC,GAAW,KAAgB,EAAS,CAAC,GACtC,EAAE,SAAM,UAAO,gBAAa,iBAAc,eAC9C,EAA4B;EAC1B,WAAW,EAAE,IAAI,EAAO,MAAM;EAC9B,cAAc,KAAW,IAAW,IAAI;EACxC,aAAa;CACf,CAAC,GAEG,IAAM,GAAM,uBAAuB,EAAO,SAC1C,IAAS,EAAI;CAYnB,AAVA,QAAgB;EACd,CAAI,EAAuB,CAAM,KAAK,GAAM,wBAAwB,UAClE,EAAY,GACZ,EAAW,EAAI,GACf,EAAY,EAAK;CAErB,GAAG;EAAC;EAAQ;EAAM;CAAW,CAAC,GAI9B,QAAgB;EACd,IAAI,GAAS;EACb,IAAM,IAAQ,OAAO,iBAAiB;GAEpC,AADA,EAAY,GACZ,EAAY,EAAI;EAClB,GAAG,CAA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ACX,cAAW;QANb,UAAA,CAQE,kBAAC,UAAD;SAAQ,OAAO,EAAuB;SAAK,UAAA;QAAW,CAAA,GACtD,kBAAC,UAAD;SAAQ,OAAO,EAAuB;SAAM,UAAA;QAAY,CAAA,CAClD;OACH,CAAA,CAAA;;KACJ;;IACL,kBAAC,KAAD;KAAG,WAAU;KACV,UAAA,EAAS;IACT,CAAA;IAEH,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,kBAAC,UAAD;MACE,MAAK;MACL,SAAS;MACT,UAAU;MACV,WAAU;MAJZ,UAAA,CAMG,IACC,kBAAC,GAAD,EAAS,WAAU,mCAAoC,CAAA,IAEvD,kBAAC,GAAD,EAAU,WAAU,UAAW,CAAA,GAEhC,IAAU,cAAc,iBACnB;KACP,CAAA,GAAA,KACC,kBAAC,KAAD;MAAG,MAAK;MAAQ,WAAU;MACvB,UAAA;KACA,CAAA,CAEF;;IAEJ,EAAQ,SAAS,KAChB,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,kBAAC,MAAD;MAAI,WAAU;MAAoE,UAAA;KAE9E,CAAA,GACJ,kBAAC,MAAD;MAAI,WAAU;MACX,UAAA,EAAQ,KAAK,MACZ,kBAAC,GAAD,EAAyC,UAAS,GAA/B,EAAO,KAAwB,CACnD;KACC,CAAA,CACD;;GAEE;;CACJ,CAAA;AAEb"}
|
|
1
|
+
{"version":3,"file":"ServerReportExports.js","names":[],"sources":["../../../../src/timecampus/pages/dashboard/ServerReportExports.tsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport { Download, FileDown, Loader2 } from \"lucide-react\";\nimport { GlassCard } from \"@burdenoff/fe-libs/ui\";\nimport { StatusBadge, ProgressMeter } from \"../../components\";\nimport { TimeCampusExportFormat } from \"@/generated/wspace-types\";\nimport {\n useExportTimeCampusEntitiesMutation,\n useTimeCampusExportJobQuery,\n type TimeCampusExportJobFieldsFragment,\n} from \"@/generated/wspace-operations\";\nimport {\n EXPORT_START_FALLBACK_MESSAGE,\n REPORT_PERIODS,\n REPORT_TEMPLATES,\n buildReportName,\n describeExportStartError,\n exportStatusLabel,\n exportStatusTone,\n findReportTemplate,\n isTerminalExportStatus,\n resolveReportDateRange,\n type ReportPeriodId,\n type ReportTemplateId,\n} from \"./reportTemplates\";\n\nconst POLL_INTERVAL_MS = 3000;\n/**\n * Stop polling a job that has not settled after this long, so a stuck job\n * cannot keep the page firing requests forever. The user can resume.\n */\nconst MAX_POLL_DURATION_MS = 15 * 60 * 1000;\n\ninterface StartedReport {\n jobId: string;\n name: string;\n initial: TimeCampusExportJobFieldsFragment;\n}\n\nfunction formatTimestamp(value: string | null | undefined): string {\n if (!value) return \"\";\n const date = new Date(value);\n return Number.isNaN(date.getTime()) ? \"\" : date.toLocaleString();\n}\n\n/**\n * One generated report. Polls `timeCampusExportJob` until the job reaches a\n * terminal status, then offers the archive download.\n */\nfunction ReportJobRow({ report }: { report: StartedReport }) {\n const [settled, setSettled] = useState(\n isTerminalExportStatus(report.initial.status),\n );\n const [timedOut, setTimedOut] = useState(false);\n const [pollEpoch, setPollEpoch] = useState(0);\n const { data, error, stopPolling, startPolling, refetch } =\n useTimeCampusExportJobQuery({\n variables: { id: report.jobId },\n pollInterval: settled || timedOut ? 0 : POLL_INTERVAL_MS,\n fetchPolicy: \"network-only\",\n });\n\n const job = data?.timeCampusExportJob ?? report.initial;\n const status = job.status;\n\n useEffect(() => {\n if (isTerminalExportStatus(status) || data?.timeCampusExportJob === null) {\n stopPolling();\n setSettled(true);\n setTimedOut(false);\n }\n }, [status, data, stopPolling]);\n\n // Cap how long one job is polled. pollEpoch restarts the window when the\n // user resumes checking.\n useEffect(() => {\n if (settled) return undefined;\n const timer = window.setTimeout(() => {\n stopPolling();\n setTimedOut(true);\n }, MAX_POLL_DURATION_MS);\n return () => window.clearTimeout(timer);\n }, [settled, pollEpoch, stopPolling]);\n\n const handleResume = () => {\n setTimedOut(false);\n setPollEpoch((n) => n + 1);\n startPolling(POLL_INTERVAL_MS);\n void refetch();\n };\n\n const missing = data !== undefined && data.timeCampusExportJob === null;\n const tone = missing ? \"warning\" : exportStatusTone(status);\n const label = missing ? \"Unavailable\" : exportStatusLabel(status);\n const inFlight = !missing && !isTerminalExportStatus(status);\n\n return (\n <li\n className=\"flex flex-col gap-3 rounded-lg border border-border-subtle bg-bg-surface p-3 sm:flex-row sm:items-center sm:justify-between\"\n data-testid=\"report-export-job\"\n data-status={missing ? \"MISSING\" : status}\n >\n <div className=\"min-w-0 flex-1 space-y-1\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <p className=\"truncate text-sm font-medium text-text-primary\">\n {report.name}\n </p>\n <StatusBadge variant={tone} label={label} dot />\n <span className=\"text-xs text-text-secondary\">{job.format}</span>\n </div>\n <p className=\"text-xs text-text-secondary\">\n Started {formatTimestamp(job.createdAt)}\n {job.completedAt\n ? ` · finished ${formatTimestamp(job.completedAt)}`\n : \"\"}\n </p>\n {inFlight && (\n <ProgressMeter\n value={job.progress ?? 0}\n max={100}\n higherIsWorse={false}\n label=\"Progress\"\n format={(v) => `${Math.round(v)}%`}\n size=\"sm\"\n />\n )}\n {status === \"FAILED\" && (\n <p className=\"text-xs text-status-error-text\">\n {job.errorMessage || \"The export failed. Try generating it again.\"}\n </p>\n )}\n {missing && (\n <p className=\"text-xs text-text-secondary\">\n This export is no longer available.\n </p>\n )}\n {timedOut && !settled && (\n <p className=\"text-xs text-text-secondary\">\n Still generating. Status checks paused to save requests; the export\n keeps running on the server.{\" \"}\n <button\n type=\"button\"\n onClick={handleResume}\n className=\"font-medium text-text-primary underline underline-offset-2\"\n >\n Check again\n </button>\n </p>\n )}\n {error && !missing && (\n <p className=\"text-xs text-status-error-text\">\n Could not refresh the export status: {error.message}\n </p>\n )}\n </div>\n <div className=\"flex shrink-0 items-center gap-2\">\n {inFlight && !timedOut && (\n <Loader2\n className=\"h-4 w-4 text-text-secondary motion-safe:animate-spin\"\n aria-hidden\n />\n )}\n {status === \"COMPLETED\" && job.downloadUrl && (\n <a\n href={job.downloadUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90\"\n title={\n job.downloadExpiresAt\n ? `Link expires ${formatTimestamp(job.downloadExpiresAt)}`\n : undefined\n }\n >\n <Download className=\"h-4 w-4\" />\n Download\n </a>\n )}\n </div>\n </li>\n );\n}\n\n/**\n * Server-side report builder: pick a template, a period and a format, and\n * wspace-export-svc builds the full dataset asynchronously.\n */\nexport function ServerReportExports() {\n const [templateId, setTemplateId] =\n useState<ReportTemplateId>(\"time-entries\");\n const [period, setPeriod] = useState<ReportPeriodId>(\"30d\");\n const [format, setFormat] = useState<TimeCampusExportFormat>(\n TimeCampusExportFormat.Csv,\n );\n const [reports, setReports] = useState<StartedReport[]>([]);\n const [startError, setStartError] = useState<string | null>(null);\n const [exportEntities, { loading }] = useExportTimeCampusEntitiesMutation();\n\n const template = findReportTemplate(templateId);\n\n const handleGenerate = async () => {\n setStartError(null);\n const name = buildReportName(template, period);\n try {\n const result = await exportEntities({\n variables: {\n input: {\n entityTypes: template.entityTypes,\n format,\n includeMetadata: true,\n name,\n ...resolveReportDateRange(period),\n },\n },\n });\n const job = result.data?.exportTimeCampusEntities;\n if (!job) {\n setStartError(\n result.error\n ? describeExportStartError(result.error)\n : EXPORT_START_FALLBACK_MESSAGE,\n );\n return;\n }\n setReports((prev) => [{ jobId: job.id, name, initial: job }, ...prev]);\n } catch (err) {\n setStartError(describeExportStartError(err));\n }\n };\n\n const fieldClass =\n \"mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\";\n\n return (\n <section\n data-testid=\"server-report-exports\"\n aria-label=\"Generate a full report\"\n >\n <GlassCard treatment=\"glass\" className=\"p-4 sm:p-5\">\n <div className=\"flex items-start gap-3\">\n <div className=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-status-info-bg text-status-info-text\">\n <FileDown className=\"h-5 w-5\" />\n </div>\n <div className=\"min-w-0\">\n <h2 className=\"text-sm font-semibold text-text-primary\">\n Generate a full report\n </h2>\n <p className=\"mt-1 text-xs text-text-secondary\">\n Built on the server from your complete records, not just what this\n page has loaded. Large reports keep generating in the background;\n the download appears here when it is ready.\n </p>\n </div>\n </div>\n\n <div className=\"mt-4 grid grid-cols-1 gap-3 sm:grid-cols-3\">\n <label className=\"block text-xs font-medium text-text-secondary\">\n Report\n <select\n value={templateId}\n onChange={(e) =>\n setTemplateId(e.target.value as ReportTemplateId)\n }\n className={fieldClass}\n aria-label=\"Report template\"\n >\n {REPORT_TEMPLATES.map((t) => (\n <option key={t.id} value={t.id}>\n {t.label}\n </option>\n ))}\n </select>\n </label>\n <label className=\"block text-xs font-medium text-text-secondary\">\n Period\n <select\n value={period}\n onChange={(e) => setPeriod(e.target.value as ReportPeriodId)}\n className={fieldClass}\n aria-label=\"Report period\"\n >\n {REPORT_PERIODS.map((p) => (\n <option key={p.id} value={p.id}>\n {p.label}\n </option>\n ))}\n </select>\n </label>\n <label className=\"block text-xs font-medium text-text-secondary\">\n Format\n <select\n value={format}\n onChange={(e) =>\n setFormat(e.target.value as TimeCampusExportFormat)\n }\n className={fieldClass}\n aria-label=\"Report format\"\n >\n <option value={TimeCampusExportFormat.Csv}>CSV</option>\n <option value={TimeCampusExportFormat.Json}>JSON</option>\n </select>\n </label>\n </div>\n <p className=\"mt-2 text-xs text-text-secondary\">\n {template.description}\n </p>\n\n <div className=\"mt-4 flex flex-wrap items-center gap-3\">\n <button\n type=\"button\"\n onClick={handleGenerate}\n disabled={loading}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-70\"\n >\n {loading ? (\n <Loader2 className=\"h-4 w-4 motion-safe:animate-spin\" />\n ) : (\n <FileDown className=\"h-4 w-4\" />\n )}\n {loading ? \"Starting…\" : \"Generate report\"}\n </button>\n {startError && (\n <p role=\"alert\" className=\"text-sm text-status-error-text\">\n {startError}\n </p>\n )}\n </div>\n\n {reports.length > 0 && (\n <div className=\"mt-5 border-t border-border-subtle pt-4\">\n <h3 className=\"text-xs font-semibold uppercase tracking-wide text-text-secondary\">\n Generated this session\n </h3>\n <ul className=\"mt-2 space-y-2\">\n {reports.map((report) => (\n <ReportJobRow key={report.jobId} report={report} />\n ))}\n </ul>\n </div>\n )}\n </GlassCard>\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;AAyBA,IAAM,IAAmB,KAKnB,IAAuB;AAQ7B,SAAS,EAAgB,GAA0C;CACjE,IAAI,CAAC,GAAO,OAAO;CACnB,IAAM,IAAO,IAAI,KAAK,CAAK;CAC3B,OAAO,OAAO,MAAM,EAAK,QAAQ,CAAC,IAAI,KAAK,EAAK,eAAe;AACjE;AAMA,SAAS,EAAa,EAAE,aAAqC;CAC3D,IAAM,CAAC,GAAS,KAAc,EAC5B,EAAuB,EAAO,QAAQ,MAAM,CAC9C,GACM,CAAC,GAAU,KAAe,EAAS,EAAK,GACxC,CAAC,GAAW,KAAgB,EAAS,CAAC,GACtC,EAAE,SAAM,UAAO,gBAAa,iBAAc,eAC9C,EAA4B;EAC1B,WAAW,EAAE,IAAI,EAAO,MAAM;EAC9B,cAAc,KAAW,IAAW,IAAI;EACxC,aAAa;CACf,CAAC,GAEG,IAAM,GAAM,uBAAuB,EAAO,SAC1C,IAAS,EAAI;CAYnB,AAVA,QAAgB;EACd,CAAI,EAAuB,CAAM,KAAK,GAAM,wBAAwB,UAClE,EAAY,GACZ,EAAW,EAAI,GACf,EAAY,EAAK;CAErB,GAAG;EAAC;EAAQ;EAAM;CAAW,CAAC,GAI9B,QAAgB;EACd,IAAI,GAAS;EACb,IAAM,IAAQ,OAAO,iBAAiB;GAEpC,AADA,EAAY,GACZ,EAAY,EAAI;EAClB,GAAG,CAAoB;EACvB,aAAa,OAAO,aAAa,CAAK;CACxC,GAAG;EAAC;E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,kBAAC,UAAD;SAAQ,OAAO,EAAuB;SAAK,UAAA;QAAW,CAAA,GACtD,kBAAC,UAAD;SAAQ,OAAO,EAAuB;SAAM,UAAA;QAAY,CAAA,CAClD;OACH,CAAA,CAAA;;KACJ;;IACL,kBAAC,KAAD;KAAG,WAAU;KACV,UAAA,EAAS;IACT,CAAA;IAEH,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,kBAAC,UAAD;MACE,MAAK;MACL,SAAS;MACT,UAAU;MACV,WAAU;MAJZ,UAAA,CAMG,IACC,kBAAC,GAAD,EAAS,WAAU,mCAAoC,CAAA,IAEvD,kBAAC,GAAD,EAAU,WAAU,UAAW,CAAA,GAEhC,IAAU,cAAc,iBACnB;KACP,CAAA,GAAA,KACC,kBAAC,KAAD;MAAG,MAAK;MAAQ,WAAU;MACvB,UAAA;KACA,CAAA,CAEF;;IAEJ,EAAQ,SAAS,KAChB,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,kBAAC,MAAD;MAAI,WAAU;MAAoE,UAAA;KAE9E,CAAA,GACJ,kBAAC,MAAD;MAAI,WAAU;MACX,UAAA,EAAQ,KAAK,MACZ,kBAAC,GAAD,EAAyC,UAAS,GAA/B,EAAO,KAAwB,CACnD;KACC,CAAA,CACD;;GAEE;;CACJ,CAAA;AAEb"}
|
|
@@ -30,4 +30,12 @@ export declare function isTerminalExportStatus(status: string | null | undefined
|
|
|
30
30
|
export type ExportStatusTone = "info" | "success" | "warning" | "error";
|
|
31
31
|
export declare function exportStatusTone(status: string): ExportStatusTone;
|
|
32
32
|
export declare function exportStatusLabel(status: string): string;
|
|
33
|
+
export declare const EXPORT_START_FALLBACK_MESSAGE = "The export could not be started. Please try again.";
|
|
34
|
+
/**
|
|
35
|
+
* User-facing message for a failed `exportTimeCampusEntities` call. The
|
|
36
|
+
* TimeCampus Apollo client uses `errorPolicy: "all"`, so a GraphQL error
|
|
37
|
+
* arrives on `result.error` rather than as a thrown exception; both shapes
|
|
38
|
+
* are accepted here.
|
|
39
|
+
*/
|
|
40
|
+
export declare function describeExportStartError(error: unknown): string;
|
|
33
41
|
//# sourceMappingURL=reportTemplates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reportTemplates.d.ts","sourceRoot":"","sources":["../../../../src/timecampus/pages/dashboard/reportTemplates.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"reportTemplates.d.ts","sourceRoot":"","sources":["../../../../src/timecampus/pages/dashboard/reportTemplates.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,MAAM,gBAAgB,GAC1B,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;AAE3E,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,gBAAgB,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EA0DrD,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAElE,eAAO,MAAM,cAAc,EAAE,aAAa,CAAC;IACzC,EAAE,EAAE,cAAc,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAMA,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAID,4EAA4E;AAC5E,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,cAAc,EACtB,GAAG,GAAE,IAAiB,GACrB,eAAe,CAYjB;AAED,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,gBAAgB,GAAG,cAAc,CAIvE;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,cAAc,EACxB,MAAM,EAAE,cAAc,GACrB,MAAM,CAIR;AAUD,4DAA4D;AAC5D,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,WAEvE;AAED,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAExE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAKjE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAoBxD;AAED,eAAO,MAAM,6BAA6B,uDACY,CAAC;AAiBvD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAQ/D"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { extractBackendError as e } from "@burdenoff/fe-libs/shared/utils";
|
|
1
2
|
//#region src/timecampus/pages/dashboard/reportTemplates.ts
|
|
2
|
-
var
|
|
3
|
+
var t = [
|
|
3
4
|
{
|
|
4
5
|
id: "time-entries",
|
|
5
6
|
label: "Time entries",
|
|
@@ -53,7 +54,7 @@ var e = [
|
|
|
53
54
|
"timecampus_meeting_action_items"
|
|
54
55
|
]
|
|
55
56
|
}
|
|
56
|
-
],
|
|
57
|
+
], n = [
|
|
57
58
|
{
|
|
58
59
|
id: "7d",
|
|
59
60
|
label: "Last 7 days"
|
|
@@ -74,43 +75,43 @@ var e = [
|
|
|
74
75
|
id: "all",
|
|
75
76
|
label: "All time"
|
|
76
77
|
}
|
|
77
|
-
],
|
|
78
|
-
function
|
|
78
|
+
], r = 864e5;
|
|
79
|
+
function i(e, t = /* @__PURE__ */ new Date()) {
|
|
79
80
|
if (e === "all") return {};
|
|
80
|
-
let
|
|
81
|
+
let n = t.toISOString();
|
|
81
82
|
if (e === "ytd") return {
|
|
82
83
|
dateRangeStart: new Date(t.getFullYear(), 0, 1).toISOString(),
|
|
83
|
-
dateRangeEnd:
|
|
84
|
+
dateRangeEnd: n
|
|
84
85
|
};
|
|
85
86
|
let i = e === "7d" ? 7 : e === "30d" ? 30 : 90;
|
|
86
87
|
return {
|
|
87
|
-
dateRangeStart: (/* @__PURE__ */ new Date(t.getTime() - i *
|
|
88
|
-
dateRangeEnd:
|
|
88
|
+
dateRangeStart: (/* @__PURE__ */ new Date(t.getTime() - i * r)).toISOString(),
|
|
89
|
+
dateRangeEnd: n
|
|
89
90
|
};
|
|
90
91
|
}
|
|
91
|
-
function
|
|
92
|
-
let n =
|
|
93
|
-
if (!n) throw Error(`Unknown report template: ${
|
|
92
|
+
function a(e) {
|
|
93
|
+
let n = t.find((t) => t.id === e);
|
|
94
|
+
if (!n) throw Error(`Unknown report template: ${e}`);
|
|
94
95
|
return n;
|
|
95
96
|
}
|
|
96
|
-
function
|
|
97
|
-
let r =
|
|
97
|
+
function o(e, t) {
|
|
98
|
+
let r = n.find((e) => e.id === t)?.label ?? "All time";
|
|
98
99
|
return `${e.label} report — ${r}`;
|
|
99
100
|
}
|
|
100
|
-
var
|
|
101
|
+
var s = /* @__PURE__ */ new Set([
|
|
101
102
|
"COMPLETED",
|
|
102
103
|
"FAILED",
|
|
103
104
|
"CANCELLED",
|
|
104
105
|
"EXPIRED",
|
|
105
106
|
"DELETED"
|
|
106
107
|
]);
|
|
107
|
-
function s(e) {
|
|
108
|
-
return !!e && o.has(e);
|
|
109
|
-
}
|
|
110
108
|
function c(e) {
|
|
111
|
-
return e
|
|
109
|
+
return !!e && s.has(e);
|
|
112
110
|
}
|
|
113
111
|
function l(e) {
|
|
112
|
+
return e === "COMPLETED" ? "success" : e === "FAILED" ? "error" : s.has(e) ? "warning" : "info";
|
|
113
|
+
}
|
|
114
|
+
function u(e) {
|
|
114
115
|
switch (e) {
|
|
115
116
|
case "CREATED":
|
|
116
117
|
case "QUEUED": return "Queued";
|
|
@@ -123,7 +124,16 @@ function l(e) {
|
|
|
123
124
|
default: return e;
|
|
124
125
|
}
|
|
125
126
|
}
|
|
127
|
+
var d = "The export could not be started. Please try again.", f = {
|
|
128
|
+
QUOTA_NOT_PROVISIONED: "Full reports are not included in this workspace's TimeCampus plan. Upgrade the plan in Billing to generate them.",
|
|
129
|
+
QUOTA_EXHAUSTED: "This workspace has used all of its full reports for this month. Upgrade the plan in Billing or try again next month.",
|
|
130
|
+
QUOTA_EXCEEDED: "This workspace has used all of its full reports for this month. Upgrade the plan in Billing or try again next month."
|
|
131
|
+
};
|
|
132
|
+
function p(t) {
|
|
133
|
+
let n = e(t);
|
|
134
|
+
return n ? (n.code ? f[n.code] : void 0) || n.message || "The export could not be started. Please try again." : d;
|
|
135
|
+
}
|
|
126
136
|
//#endregion
|
|
127
|
-
export {
|
|
137
|
+
export { d as EXPORT_START_FALLBACK_MESSAGE, n as REPORT_PERIODS, t as REPORT_TEMPLATES, o as buildReportName, p as describeExportStartError, u as exportStatusLabel, l as exportStatusTone, a as findReportTemplate, c as isTerminalExportStatus, i as resolveReportDateRange };
|
|
128
138
|
|
|
129
139
|
//# sourceMappingURL=reportTemplates.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reportTemplates.js","names":[],"sources":["../../../../src/timecampus/pages/dashboard/reportTemplates.ts"],"sourcesContent":["/**\n * Server-side report templates for the Reports page (BOFF-4043).\n *\n * Each template maps to TimeCampus entity types that wspace-export-svc can\n * export; the backend (`exportTimeCampusEntities`) rejects anything else.\n */\n\nexport type ReportTemplateId =\n \"time-entries\" | \"projects\" | \"expenses\" | \"team\" | \"focus\" | \"meetings\";\n\nexport interface ReportTemplate {\n id: ReportTemplateId;\n label: string;\n description: string;\n entityTypes: string[];\n}\n\nexport const REPORT_TEMPLATES: readonly ReportTemplate[] = [\n {\n id: \"time-entries\",\n label: \"Time entries\",\n description:\n \"Every logged entry with project, task, duration and billable flag.\",\n entityTypes: [\"timecampus_time_entries\"],\n },\n {\n id: \"projects\",\n label: \"Projects & tasks\",\n description: \"Projects, their tasks and the clients they belong to.\",\n entityTypes: [\n \"timecampus_projects\",\n \"timecampus_tasks\",\n \"timecampus_clients\",\n ],\n },\n {\n id: \"expenses\",\n label: \"Expenses\",\n description:\n \"Expense entries with amounts, categories and approval status.\",\n entityTypes: [\"timecampus_expense_entries\"],\n },\n {\n id: \"team\",\n label: \"Team & resourcing\",\n description:\n \"Resource plans, allocations and timesheet approval requests for the team.\",\n entityTypes: [\n \"timecampus_resource_plans\",\n \"timecampus_resource_allocations\",\n \"timecampus_time_approval_requests\",\n ],\n },\n {\n id: \"focus\",\n label: \"Focus & productivity\",\n description:\n \"Pomodoro sessions, focus scores, work patterns and application usage.\",\n entityTypes: [\n \"timecampus_pomodoro_sessions\",\n \"timecampus_focus_scores\",\n \"timecampus_work_patterns\",\n \"timecampus_application_usages\",\n ],\n },\n {\n id: \"meetings\",\n label: \"Meetings\",\n description: \"Meetings with participants and action items.\",\n entityTypes: [\n \"timecampus_meeting_metas\",\n \"timecampus_meeting_participants\",\n \"timecampus_meeting_action_items\",\n ],\n },\n];\n\nexport type ReportPeriodId = \"7d\" | \"30d\" | \"90d\" | \"ytd\" | \"all\";\n\nexport const REPORT_PERIODS: ReadonlyArray<{\n id: ReportPeriodId;\n label: string;\n}> = [\n { id: \"7d\", label: \"Last 7 days\" },\n { id: \"30d\", label: \"Last 30 days\" },\n { id: \"90d\", label: \"Last 90 days\" },\n { id: \"ytd\", label: \"This year\" },\n { id: \"all\", label: \"All time\" },\n];\n\nexport interface ReportDateRange {\n dateRangeStart?: string;\n dateRangeEnd?: string;\n}\n\nconst DAY_MS = 24 * 60 * 60 * 1000;\n\n/** Resolve a period into the ISO date range sent to the export mutation. */\nexport function resolveReportDateRange(\n period: ReportPeriodId,\n now: Date = new Date(),\n): ReportDateRange {\n if (period === \"all\") return {};\n const end = now.toISOString();\n if (period === \"ytd\") {\n const start = new Date(now.getFullYear(), 0, 1);\n return { dateRangeStart: start.toISOString(), dateRangeEnd: end };\n }\n const days = period === \"7d\" ? 7 : period === \"30d\" ? 30 : 90;\n return {\n dateRangeStart: new Date(now.getTime() - days * DAY_MS).toISOString(),\n dateRangeEnd: end,\n };\n}\n\nexport function findReportTemplate(id: ReportTemplateId): ReportTemplate {\n const template = REPORT_TEMPLATES.find((t) => t.id === id);\n if (!template) throw new Error(`Unknown report template: ${id}`);\n return template;\n}\n\nexport function buildReportName(\n template: ReportTemplate,\n period: ReportPeriodId,\n): string {\n const periodLabel =\n REPORT_PERIODS.find((p) => p.id === period)?.label ?? \"All time\";\n return `${template.label} report — ${periodLabel}`;\n}\n\nconst TERMINAL_STATUSES = new Set([\n \"COMPLETED\",\n \"FAILED\",\n \"CANCELLED\",\n \"EXPIRED\",\n \"DELETED\",\n]);\n\n/** True once an export job will not change status again. */\nexport function isTerminalExportStatus(status: string | null | undefined) {\n return !!status && TERMINAL_STATUSES.has(status);\n}\n\nexport type ExportStatusTone = \"info\" | \"success\" | \"warning\" | \"error\";\n\nexport function exportStatusTone(status: string): ExportStatusTone {\n if (status === \"COMPLETED\") return \"success\";\n if (status === \"FAILED\") return \"error\";\n if (TERMINAL_STATUSES.has(status)) return \"warning\";\n return \"info\";\n}\n\nexport function exportStatusLabel(status: string): string {\n switch (status) {\n case \"CREATED\":\n case \"QUEUED\":\n return \"Queued\";\n case \"RUNNING\":\n return \"Generating\";\n case \"COMPLETED\":\n return \"Ready\";\n case \"FAILED\":\n return \"Failed\";\n case \"CANCELLED\":\n return \"Cancelled\";\n case \"EXPIRED\":\n return \"Link expired\";\n case \"DELETED\":\n return \"Deleted\";\n default:\n return status;\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"reportTemplates.js","names":[],"sources":["../../../../src/timecampus/pages/dashboard/reportTemplates.ts"],"sourcesContent":["/**\n * Server-side report templates for the Reports page (BOFF-4043).\n *\n * Each template maps to TimeCampus entity types that wspace-export-svc can\n * export; the backend (`exportTimeCampusEntities`) rejects anything else.\n */\n\nimport { extractBackendError } from \"@burdenoff/fe-libs/shared/utils\";\n\nexport type ReportTemplateId =\n \"time-entries\" | \"projects\" | \"expenses\" | \"team\" | \"focus\" | \"meetings\";\n\nexport interface ReportTemplate {\n id: ReportTemplateId;\n label: string;\n description: string;\n entityTypes: string[];\n}\n\nexport const REPORT_TEMPLATES: readonly ReportTemplate[] = [\n {\n id: \"time-entries\",\n label: \"Time entries\",\n description:\n \"Every logged entry with project, task, duration and billable flag.\",\n entityTypes: [\"timecampus_time_entries\"],\n },\n {\n id: \"projects\",\n label: \"Projects & tasks\",\n description: \"Projects, their tasks and the clients they belong to.\",\n entityTypes: [\n \"timecampus_projects\",\n \"timecampus_tasks\",\n \"timecampus_clients\",\n ],\n },\n {\n id: \"expenses\",\n label: \"Expenses\",\n description:\n \"Expense entries with amounts, categories and approval status.\",\n entityTypes: [\"timecampus_expense_entries\"],\n },\n {\n id: \"team\",\n label: \"Team & resourcing\",\n description:\n \"Resource plans, allocations and timesheet approval requests for the team.\",\n entityTypes: [\n \"timecampus_resource_plans\",\n \"timecampus_resource_allocations\",\n \"timecampus_time_approval_requests\",\n ],\n },\n {\n id: \"focus\",\n label: \"Focus & productivity\",\n description:\n \"Pomodoro sessions, focus scores, work patterns and application usage.\",\n entityTypes: [\n \"timecampus_pomodoro_sessions\",\n \"timecampus_focus_scores\",\n \"timecampus_work_patterns\",\n \"timecampus_application_usages\",\n ],\n },\n {\n id: \"meetings\",\n label: \"Meetings\",\n description: \"Meetings with participants and action items.\",\n entityTypes: [\n \"timecampus_meeting_metas\",\n \"timecampus_meeting_participants\",\n \"timecampus_meeting_action_items\",\n ],\n },\n];\n\nexport type ReportPeriodId = \"7d\" | \"30d\" | \"90d\" | \"ytd\" | \"all\";\n\nexport const REPORT_PERIODS: ReadonlyArray<{\n id: ReportPeriodId;\n label: string;\n}> = [\n { id: \"7d\", label: \"Last 7 days\" },\n { id: \"30d\", label: \"Last 30 days\" },\n { id: \"90d\", label: \"Last 90 days\" },\n { id: \"ytd\", label: \"This year\" },\n { id: \"all\", label: \"All time\" },\n];\n\nexport interface ReportDateRange {\n dateRangeStart?: string;\n dateRangeEnd?: string;\n}\n\nconst DAY_MS = 24 * 60 * 60 * 1000;\n\n/** Resolve a period into the ISO date range sent to the export mutation. */\nexport function resolveReportDateRange(\n period: ReportPeriodId,\n now: Date = new Date(),\n): ReportDateRange {\n if (period === \"all\") return {};\n const end = now.toISOString();\n if (period === \"ytd\") {\n const start = new Date(now.getFullYear(), 0, 1);\n return { dateRangeStart: start.toISOString(), dateRangeEnd: end };\n }\n const days = period === \"7d\" ? 7 : period === \"30d\" ? 30 : 90;\n return {\n dateRangeStart: new Date(now.getTime() - days * DAY_MS).toISOString(),\n dateRangeEnd: end,\n };\n}\n\nexport function findReportTemplate(id: ReportTemplateId): ReportTemplate {\n const template = REPORT_TEMPLATES.find((t) => t.id === id);\n if (!template) throw new Error(`Unknown report template: ${id}`);\n return template;\n}\n\nexport function buildReportName(\n template: ReportTemplate,\n period: ReportPeriodId,\n): string {\n const periodLabel =\n REPORT_PERIODS.find((p) => p.id === period)?.label ?? \"All time\";\n return `${template.label} report — ${periodLabel}`;\n}\n\nconst TERMINAL_STATUSES = new Set([\n \"COMPLETED\",\n \"FAILED\",\n \"CANCELLED\",\n \"EXPIRED\",\n \"DELETED\",\n]);\n\n/** True once an export job will not change status again. */\nexport function isTerminalExportStatus(status: string | null | undefined) {\n return !!status && TERMINAL_STATUSES.has(status);\n}\n\nexport type ExportStatusTone = \"info\" | \"success\" | \"warning\" | \"error\";\n\nexport function exportStatusTone(status: string): ExportStatusTone {\n if (status === \"COMPLETED\") return \"success\";\n if (status === \"FAILED\") return \"error\";\n if (TERMINAL_STATUSES.has(status)) return \"warning\";\n return \"info\";\n}\n\nexport function exportStatusLabel(status: string): string {\n switch (status) {\n case \"CREATED\":\n case \"QUEUED\":\n return \"Queued\";\n case \"RUNNING\":\n return \"Generating\";\n case \"COMPLETED\":\n return \"Ready\";\n case \"FAILED\":\n return \"Failed\";\n case \"CANCELLED\":\n return \"Cancelled\";\n case \"EXPIRED\":\n return \"Link expired\";\n case \"DELETED\":\n return \"Deleted\";\n default:\n return status;\n }\n}\n\nexport const EXPORT_START_FALLBACK_MESSAGE =\n \"The export could not be started. Please try again.\";\n\n/**\n * Plan-limit codes the gateway's `@usage` check returns for\n * `exportTimeCampusEntities`. Each needs its own wording: \"please try again\"\n * is wrong for both, because retrying cannot succeed until the plan changes\n * (or, for an exhausted monthly allowance, the month rolls over).\n */\nconst EXPORT_QUOTA_MESSAGES: Readonly<Record<string, string>> = {\n QUOTA_NOT_PROVISIONED:\n \"Full reports are not included in this workspace's TimeCampus plan. Upgrade the plan in Billing to generate them.\",\n QUOTA_EXHAUSTED:\n \"This workspace has used all of its full reports for this month. Upgrade the plan in Billing or try again next month.\",\n QUOTA_EXCEEDED:\n \"This workspace has used all of its full reports for this month. Upgrade the plan in Billing or try again next month.\",\n};\n\n/**\n * User-facing message for a failed `exportTimeCampusEntities` call. The\n * TimeCampus Apollo client uses `errorPolicy: \"all\"`, so a GraphQL error\n * arrives on `result.error` rather than as a thrown exception; both shapes\n * are accepted here.\n */\nexport function describeExportStartError(error: unknown): string {\n const display = extractBackendError(error);\n if (!display) return EXPORT_START_FALLBACK_MESSAGE;\n const quotaMessage = display.code\n ? EXPORT_QUOTA_MESSAGES[display.code]\n : undefined;\n if (quotaMessage) return quotaMessage;\n return display.message || EXPORT_START_FALLBACK_MESSAGE;\n}\n"],"mappings":";;AAmBA,IAAa,IAA8C;CACzD;EACE,IAAI;EACJ,OAAO;EACP,aACE;EACF,aAAa,CAAC,yBAAyB;CACzC;CACA;EACE,IAAI;EACJ,OAAO;EACP,aAAa;EACb,aAAa;GACX;GACA;GACA;EACF;CACF;CACA;EACE,IAAI;EACJ,OAAO;EACP,aACE;EACF,aAAa,CAAC,4BAA4B;CAC5C;CACA;EACE,IAAI;EACJ,OAAO;EACP,aACE;EACF,aAAa;GACX;GACA;GACA;EACF;CACF;CACA;EACE,IAAI;EACJ,OAAO;EACP,aACE;EACF,aAAa;GACX;GACA;GACA;GACA;EACF;CACF;CACA;EACE,I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,YACnC;AACT;AAEA,SAAgB,EAAkB,GAAwB;CACxD,QAAQ,GAAR;EACE,KAAK;EACL,KAAK,UACH,OAAO;EACT,KAAK,WACH,OAAO;EACT,KAAK,aACH,OAAO;EACT,KAAK,UACH,OAAO;EACT,KAAK,aACH,OAAO;EACT,KAAK,WACH,OAAO;EACT,KAAK,WACH,OAAO;EACT,SACE,OAAO;CACX;AACF;AAEA,IAAa,IACX,sDAQI,IAA0D;CAC9D,uBACE;CACF,iBACE;CACF,gBACE;AACJ;AAQA,SAAgB,EAAyB,GAAwB;CAC/D,IAAM,IAAU,EAAoB,CAAK;CAMzC,OALK,KACgB,EAAQ,OACzB,EAAsB,EAAQ,QAC9B,KAAA,MAEG,EAAQ,WAAA,uDALM;AAMvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonalCorporatePage.d.ts","sourceRoot":"","sources":["../../../../src/timecampus/pages/lifetime/PersonalCorporatePage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PersonalCorporatePage.d.ts","sourceRoot":"","sources":["../../../../src/timecampus/pages/lifetime/PersonalCorporatePage.tsx"],"names":[],"mappings":"AAwEA,wBAAgB,qBAAqB,gCAijBpC"}
|