feat: add text & numeric filters to insights routing responses (#18016)
* feat: improve text filters (WIP) * move function to bottom * apply some styles * fix selection of TextFilterOptions * rename value to operand * remove unused file * merge filters/filters into filters/utils * fix regression of not putting url params correctly * move makeWhereClause to filters/utils * fix negative, empty, and not empty operators * fix initial filtering from search state (url) * fix type errors * do not send an empty array to query * update yarn.lock * i18n for text filter operators * extract logic as useColumnFilters() * add missing import * fix type error * revert yarn.lock * use i18n * insensitive text match * move data-table to @calcom/features * fix type errors * fix type errors * fix type errors * feat: support DataTable filters for Insights Routing WIP * remove unused filters * remove additionalFilters and fix types * clean up filter components * support icons for ActiveFilters * support filters on json * fix filter ui * fix type error and clean up * revert changes * revert change * clean up * revert change * fix compatibility with insights booking page * remove unused params * fix type errors * update yarn.lock * fix field filter and adjust ui * chore: update yarn.lock * fix text filter * add Clear Filters button * add more test data * feat: support numeric filter WIP * feat: support numeric filter * feat: move People to an external filter * fixing query states * rename state to activeFilters * add useDataTable * fix ResponseCellValue bug and enable resizing for RoutingFormResponsesTable * fix response values * truncate attribute text * seed booking attendees * fix accessor (no actual change though) * add a gap * rename * use pathname as default identifier for DataTable * fix type error * support text filter for assignment reason * Apply suggestions from code review Co-authored-by: Alex van Andel <[email protected]> * rename fields to headers * use safeParse * fix type error * push yarn.lock with faker * fix MemberList --------- Co-authored-by: Udit Takkar <[email protected]> Co-authored-by: Alex van Andel <[email protected]> Co-authored-by: sean-brydon <[email protected]>
This commit is contained in:
36 files changed
+1162
-482
No files matched your search
@@ -1,35 +1,19 @@
|
||||
"use client";
|
||||
|
||||
import {
|
||||
FailedBookingsByField,
|
||||
RoutingFormResponsesTable,
|
||||
RoutingKPICards,
|
||||
RoutedToPerPeriod,
|
||||
} from "@calcom/features/insights/components";
|
||||
import { FailedBookingsByField, RoutingFormResponsesTable, RoutedToPerPeriod } from "@calcom/features/insights/components";
|
||||
import { FiltersProvider } from "@calcom/features/insights/context/FiltersProvider";
|
||||
import { RoutingInsightsFilters } from "@calcom/features/insights/filters/routing/FilterBar";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
|
||||
import InsightsLayout from "./layout";
|
||||
|
||||
export default function InsightsPage() {
|
||||
export default function InsightsRoutingFormResponsesPage() {
|
||||
const { t } = useLocale();
|
||||
|
||||
return (
|
||||
<InsightsLayout>
|
||||
<FiltersProvider>
|
||||
<div className="mb-4 space-y-4">
|
||||
<RoutingFormResponsesTable>
|
||||
{/* We now render the "filters and KPI as a children of the table but we still need to pass the table instance to it so we can access column status in the toolbar.*/}
|
||||
{(table) => (
|
||||
<div className="header mb-4">
|
||||
<div className="flex items-center justify-between">
|
||||
<RoutingInsightsFilters table={table} />
|
||||
</div>
|
||||
<RoutingKPICards />
|
||||
</div>
|
||||
)}
|
||||
</RoutingFormResponsesTable>
|
||||
<RoutingFormResponsesTable />
|
||||
|
||||
<RoutedToPerPeriod />
|
||||
|
||||
|
||||
@@ -51,6 +51,14 @@
|
||||
<path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9" ></path>
|
||||
<path d="M10.3 21a1.94 1.94 0 0 0 3.4 0" ></path>
|
||||
</symbol>
|
||||
<symbol class="lucide lucide-binary" viewBox="0 0 24 24" fill="inherit" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="binary">
|
||||
<rect x="14" y="14" width="4" height="6" rx="2" ></rect>
|
||||
<rect x="6" y="4" width="4" height="6" rx="2" ></rect>
|
||||
<path d="M6 20h4" ></path>
|
||||
<path d="M14 10h4" ></path>
|
||||
<path d="M6 14h2v6" ></path>
|
||||
<path d="M14 4h2v6" ></path>
|
||||
</symbol>
|
||||
<symbol class="lucide lucide-blocks" viewBox="0 0 24 24" fill="inherit" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="blocks">
|
||||
<rect width="7" height="7" x="14" y="3" rx="1" ></rect>
|
||||
<path d="M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3" ></path>
|
||||
|
||||
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Reference in new issue
Block a user