This commit is contained in:
Jake Kasper
2025-08-28 08:22:09 -05:00
parent cb5ef5fb1c
commit 89d4be510d

View File

@@ -142,13 +142,13 @@ const Products = () => {
const productData = {
productId: sharedProduct.id, // Link to the shared product
customName: sharedProduct.name, // Use the shared product's name as default
customBrand: sharedProduct.brand,
brand: sharedProduct.brand,
categoryId: null, // Will use the shared product's category
customProductType: sharedProduct.productType,
customActiveIngredients: sharedProduct.activeIngredients,
customDescription: sharedProduct.description,
productType: sharedProduct.productType,
activeIngredients: sharedProduct.activeIngredients,
description: sharedProduct.description,
// Set default rate if available
customRateAmount: sharedProduct.rates?.[0]?.rateAmount || '',
customRateAmount: sharedProduct.rates?.[0]?.rateAmount || null,
customRateUnit: sharedProduct.rates?.[0]?.rateUnit || (sharedProduct.productType === 'granular' ? 'lbs/1000 sq ft' : 'oz/1000 sq ft'),
notes: `Added from shared product: ${sharedProduct.name}`
};