fix(dashboard): use order version 1 for the initial node of activity timeline (#13997)

* Add preprocess to version param to validate as number

* Add changeset

* Use the first version of the order as the starting node of activity to show correct total

* Add changeset

* Fetch first order version only if it's not the current version

* Remove conditionally rendered hook, use enable config
This commit is contained in:
Nicolas Gorga
2025-11-12 11:11:47 -03:00
committed by GitHub
parent efed4d7346
commit 4bbf0d2367
4 changed files with 38 additions and 10 deletions

View File

@@ -9,7 +9,15 @@ import {
export const AdminGetOrdersOrderParams = createSelectParams().merge(
z.object({
version: z.number().optional(),
version: z.preprocess(
(val) => {
if (val && typeof val === "string") {
return parseInt(val)
}
return val
},
z.number().optional()
)
})
)