-
'use client'
import React, { useState } from 'react'
import { Button } from "@medusajs/ui"
import { useCreateSolarPropertyOwner } from '../../../lib/hooks/solar-property-owners'
import { useCompany } from '../../../lib/hooks/companies'
interface SolarPropertyOwnerRegistrationFormProps {
onSuccess?: () => void
onCancel?: () => void
}
const SolarPropertyOwnerRegistrationForm: React.FC<SolarPropertyOwnerRegistrationFormProps> = ({
onSuccess,
onCancel
}) => {
const [formData, setFormData] = useState({
company_id: '',
property_type: 'RESIDENTIAL_SINGLE_FAMILY',
monthly_consumption: '',
consumption_profile: 'MEDIUM',
roof_area: '',
roof_type: 'FLAT',
roof_orientation: 'SOUTH',
roof_age: 0,
roof_condition: 'good',
shading_issues: 'none',
electrical_capacity: '',
current_energy_rate: '',
preferred_installation_timeline: '3_months',
budget_range: '20k-50k',
financing_interest: 'loan',
property_address: '',
property_city: '',
… -
'use client'
import React, { useState } from 'react'
import { Button } from "@medusajs/ui"
import { useCreateSolarPropertyOwner } from '../../../lib/hooks/solar-property-owners'
import { useCompany } from '../../../lib/hooks/companies'
interface SolarPropertyOwnerRegistrationFormProps {
onSuccess?: () => void
onCancel?: () => void
}
const SolarPropertyOwnerRegistrationForm: React.FC<SolarPropertyOwnerRegistrationFormProps> = ({
onSuccess,
onCancel
}) => {
const [formData, setFormData] = useState({
company_id: '',
property_type: 'RESIDENTIAL_SINGLE_FAMILY',
monthly_consumption: '',
consumption_profile: 'MEDIUM',
roof_area: '',
roof_type: 'FLAT',
roof_orientation: 'SOUTH',
roof_age: 0,
roof_condition: 'good',
shading_issues: 'none',
electrical_capacity: '',
current_energy_rate: '',
preferred_installation_timeline: '3_months',
budget_range: '20k-50k',
financing_interest: 'loan',
property_address: '',
property_city: '',
… -
Conclua