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