DEAD_CODE_CLEAN #6
4 changed files with 18 additions and 4 deletions
|
|
@ -12,6 +12,10 @@
|
||||||
"distribution": "internal",
|
"distribution": "internal",
|
||||||
"channel": "dev"
|
"channel": "dev"
|
||||||
},
|
},
|
||||||
|
"shafi-dev": {
|
||||||
|
"distribution": "internal",
|
||||||
|
"channel": "shafi-dev"
|
||||||
|
},
|
||||||
"preview": {
|
"preview": {
|
||||||
"distribution": "internal",
|
"distribution": "internal",
|
||||||
"channel": "preview"
|
"channel": "preview"
|
||||||
|
|
|
||||||
|
|
@ -216,6 +216,11 @@ const ProductForm = forwardRef<ProductFormRef, ProductFormProps>(({
|
||||||
...values,
|
...values,
|
||||||
variants: values.variants.map((v) => ({
|
variants: values.variants.map((v) => ({
|
||||||
...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) => ({
|
features: v.features.map((a) => ({
|
||||||
...a,
|
...a,
|
||||||
featureName: isQuantityFeature(a) ? 'quantity' : (a.featureName ?? '').trim() || null,
|
featureName: isQuantityFeature(a) ? 'quantity' : (a.featureName ?? '').trim() || null,
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@ routes = [
|
||||||
|
|
||||||
[[d1_databases]]
|
[[d1_databases]]
|
||||||
binding = "DB"
|
binding = "DB"
|
||||||
#database_name = "freshyo-backend-dev"
|
database_name = "freshyo-backend-dev"
|
||||||
#database_id = "b2528bdb-0ec0-478e-8765-b118918153c0"
|
database_id = "b2528bdb-0ec0-478e-8765-b118918153c0"
|
||||||
database_name = "freshyo-dev"
|
#database_name = "freshyo-dev"
|
||||||
database_id = "3cad440f-dc14-4baa-ab05-04eb08e206de"
|
#database_id = "3cad440f-dc14-4baa-ab05-04eb08e206de"
|
||||||
migrations_dir="../../packages/db_helper_sqlite/drizzle"
|
migrations_dir="../../packages/db_helper_sqlite/drizzle"
|
||||||
migrations_pattern="migration.sql"
|
migrations_pattern="migration.sql"
|
||||||
[durable_objects]
|
[durable_objects]
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,11 @@
|
||||||
"channel": "dev",
|
"channel": "dev",
|
||||||
"autoIncrement": true
|
"autoIncrement": true
|
||||||
},
|
},
|
||||||
|
"shafi-dev": {
|
||||||
|
"distribution": "internal",
|
||||||
|
"channel": "shafi-dev",
|
||||||
|
"autoIncrement": true
|
||||||
|
},
|
||||||
"production": {
|
"production": {
|
||||||
"autoIncrement": true,
|
"autoIncrement": true,
|
||||||
"channel": "production"
|
"channel": "production"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue