feat(dashboard) admin 3.0 return creation (#6713)

**What**
- request return flow

Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com>
This commit is contained in:
Frane Polić
2024-03-22 16:57:18 +00:00
committed by GitHub
co-authored by Kasper Fabricius Kristensen
parent d24c819e7d
commit 2ae8eaa779
19 changed files with 1567 additions and 8 deletions
@@ -0,0 +1,6 @@
/**
* Helper function to cast a z.union([z.number(), z.string()]) to a number
*/
export const castNumber = (number: number | string) => {
return typeof number === "string" ? Number(number.replace(",", ".")) : number
}