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:
@@ -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()
|
||||
)
|
||||
})
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user