diff --git a/apps/web/package.json b/apps/web/package.json index bf89bcc3e..1ba724ed6 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -127,6 +127,7 @@ "@tiptap/react": "^3.5.0", "@tiptap/starter-kit": "^3.5.0", "@tiptap/suggestion": "^3.5.0", + "@types/qs": "^6.14.0", "@udecode/cn": "^49.0.15", "@uploadthing/react": "^7.3.3", "axios": "catalog:", @@ -157,6 +158,7 @@ "platejs": "49.2.21", "pluralize": "^8.0.0", "posthog-js": "^1.268.1", + "qs": "^6.14.0", "react": "catalog:", "react-colorful": "^5.6.1", "react-day-picker": "^8.10.1", diff --git a/apps/web/src/api/buster_rest/search/requests.ts b/apps/web/src/api/buster_rest/search/requests.ts index 248095260..fe9efb9d4 100644 --- a/apps/web/src/api/buster_rest/search/requests.ts +++ b/apps/web/src/api/buster_rest/search/requests.ts @@ -1,4 +1,5 @@ import type { SearchTextRequest, SearchTextResponse } from '@buster/server-shared/search'; +import qs from 'qs'; import { mainApiV2 } from '../instances'; export const search = async (params: SearchTextRequest) => { diff --git a/apps/web/src/api/createAxiosInstance.ts b/apps/web/src/api/createAxiosInstance.ts index 30d49d40c..a4cb571ef 100644 --- a/apps/web/src/api/createAxiosInstance.ts +++ b/apps/web/src/api/createAxiosInstance.ts @@ -1,6 +1,7 @@ import { isServer } from '@tanstack/react-query'; import type { AxiosRequestHeaders } from 'axios'; import axios, { type AxiosError, type InternalAxiosRequestConfig } from 'axios'; +import qs from 'qs'; import { getSupabaseSession } from '@/integrations/supabase/getSupabaseUserClient'; import { Route as AuthRoute } from '@/routes/auth.login'; import { BASE_URL_V2 } from './config'; @@ -15,6 +16,9 @@ export const createAxiosInstance = (baseURL = BASE_URL_V2) => { headers: { 'Content-Type': 'application/json', }, + paramsSerializer: (params) => { + return qs.stringify(params, { arrayFormat: 'repeat' }); //💰 + }, }); // Response interceptor with retry logic for auth errors diff --git a/apps/web/src/components/features/dashboard/AddMetricModal.tsx b/apps/web/src/components/features/dashboard/AddMetricModal.tsx index 52bbc61b7..e2e8c98d1 100644 --- a/apps/web/src/components/features/dashboard/AddMetricModal.tsx +++ b/apps/web/src/components/features/dashboard/AddMetricModal.tsx @@ -9,6 +9,7 @@ import { import { useDebounce } from '@/hooks/useDebounce'; import { useMemoizedFn } from '@/hooks/useMemoizedFn'; import { formatDate } from '@/lib/date'; +import { assetTypeToIcon } from '../icons/assetIcons'; export const AddMetricModal: React.FC<{ open: boolean; @@ -58,22 +59,30 @@ export const AddMetricModal: React.FC<{ { title: 'Title', dataIndex: 'title', - render: (value) => { - // biome-ignore lint/security/noDangerouslySetInnerHtml: - return ; + render: (value, record) => { + const Icon = assetTypeToIcon(record.assetType); + return ( +
+ + + + {/* biome-ignore lint/security/noDangerouslySetInnerHtml: this endpoint is sanitized */} + +
+ ); + }, + }, + { + title: 'Updated at', + dataIndex: 'updatedAt', + width: 140, + render: (value) => { + return formatDate({ + date: value, + format: 'lll', + }); }, }, - // { - // title: 'Updated', - // dataIndex: 'updated_at', - // width: 140, - // render: (value) => { - // return formatDate({ - // date: value, - // format: 'lll', - // }); - // }, - // }, ], [] ); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a9b36c0ef..6dbd03272 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -703,6 +703,9 @@ importers: '@tiptap/suggestion': specifier: ^3.5.0 version: 3.5.0(@tiptap/core@3.5.0(@tiptap/pm@3.5.0))(@tiptap/pm@3.5.0) + '@types/qs': + specifier: ^6.14.0 + version: 6.14.0 '@udecode/cn': specifier: ^49.0.15 version: 49.0.15(@types/react@19.1.13)(class-variance-authority@0.7.1)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(tailwind-merge@3.3.1) @@ -793,6 +796,9 @@ importers: posthog-js: specifier: ^1.268.1 version: 1.268.1 + qs: + specifier: ^6.14.0 + version: 6.14.0 react: specifier: 'catalog:' version: 19.1.1 @@ -6356,6 +6362,9 @@ packages: '@types/prismjs@1.26.5': resolution: {integrity: sha512-AUZTa7hQ2KY5L7AmtSiqxlhWxb4ina0yd8hNbl4TWuqnv/pFP0nDMb3YrfSBf4hJVGLh2YEIBfKaBW/9UEl6IQ==} + '@types/qs@6.14.0': + resolution: {integrity: sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==} + '@types/react-dom@19.1.9': resolution: {integrity: sha512-qXRuZaOsAdXKFyOhRBg6Lqqc0yay13vN7KrIg4L7N4aaHN68ma9OK3NE1BoDFgFOTfM7zg+3/8+2n8rLUH3OKQ==} peerDependencies: @@ -19323,6 +19332,8 @@ snapshots: '@types/prismjs@1.26.5': {} + '@types/qs@6.14.0': {} + '@types/react-dom@19.1.9(@types/react@19.1.13)': dependencies: '@types/react': 19.1.13 @@ -19591,7 +19602,7 @@ snapshots: sirv: 3.0.1 tinyglobby: 0.2.14 tinyrainbow: 2.0.0 - vitest: 3.2.4(@edge-runtime/vm@3.2.0)(@types/debug@4.1.12)(@types/node@22.18.1)(@vitest/browser@3.2.4)(@vitest/ui@3.2.4)(jiti@2.5.1)(jsdom@27.0.0(postcss@8.5.6))(lightningcss@1.30.1)(msw@2.11.3(@types/node@22.18.1)(typescript@5.9.2))(sass@1.93.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) + vitest: 3.2.4(@edge-runtime/vm@3.2.0)(@types/debug@4.1.12)(@types/node@24.3.1)(@vitest/browser@3.2.4)(@vitest/ui@3.2.4)(jiti@2.5.1)(jsdom@27.0.0(postcss@8.5.6))(lightningcss@1.30.1)(msw@2.11.3(@types/node@24.3.1)(typescript@5.9.2))(sass@1.93.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) '@vitest/utils@3.2.4': dependencies: