DEAD_CODE_CLEAN #6
4 changed files with 18 additions and 4 deletions
|
|
@ -12,6 +12,10 @@
|
|||
"distribution": "internal",
|
||||
"channel": "dev"
|
||||
},
|
||||
"shafi-dev": {
|
||||
"distribution": "internal",
|
||||
"channel": "shafi-dev"
|
||||
},
|
||||
"preview": {
|
||||
"distribution": "internal",
|
||||
"channel": "preview"
|
||||
|
|
|
|||
|
|
@ -216,6 +216,11 @@ const ProductForm = forwardRef<ProductFormRef, ProductFormProps>(({
|
|||
...values,
|
||||
variants: values.variants.map((v) => ({
|
||||
...v,
|
||||
// TextInputs emit strings — coerce to the numeric types the
|
||||
// backend zod schema requires (price required; market/flash nullable).
|
||||
price: v.price == null || v.price === '' ? undefined : Number(v.price),
|
||||
marketPrice: v.marketPrice == null || v.marketPrice === '' ? null : Number(v.marketPrice),
|
||||
flashPrice: v.flashPrice == null || v.flashPrice === '' ? null : Number(v.flashPrice),
|
||||
features: v.features.map((a) => ({
|
||||
...a,
|
||||
featureName: isQuantityFeature(a) ? 'quantity' : (a.featureName ?? '').trim() || null,
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ routes = [
|
|||
|
||||
[[d1_databases]]
|
||||
binding = "DB"
|
||||
#database_name = "freshyo-backend-dev"
|
||||
#database_id = "b2528bdb-0ec0-478e-8765-b118918153c0"
|
||||
database_name = "freshyo-dev"
|
||||
database_id = "3cad440f-dc14-4baa-ab05-04eb08e206de"
|
||||
database_name = "freshyo-backend-dev"
|
||||
database_id = "b2528bdb-0ec0-478e-8765-b118918153c0"
|
||||
#database_name = "freshyo-dev"
|
||||
#database_id = "3cad440f-dc14-4baa-ab05-04eb08e206de"
|
||||
migrations_dir="../../packages/db_helper_sqlite/drizzle"
|
||||
migrations_pattern="migration.sql"
|
||||
[durable_objects]
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@
|
|||
"channel": "dev",
|
||||
"autoIncrement": true
|
||||
},
|
||||
"shafi-dev": {
|
||||
"distribution": "internal",
|
||||
"channel": "shafi-dev",
|
||||
"autoIncrement": true
|
||||
},
|
||||
"production": {
|
||||
"autoIncrement": true,
|
||||
"channel": "production"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue