turash/bugulma/frontend/components/add-organization/steps/Step1.tsx
Damir Mukimov 6347f42e20
Consolidate repositories: Remove nested frontend .git and merge into main repository
- Remove nested git repository from bugulma/frontend/.git
- Add all frontend files to main repository tracking
- Convert from separate frontend/backend repos to unified monorepo
- Preserve all frontend code and development history as tracked files
- Eliminate nested repository complexity for simpler development workflow

This creates a proper monorepo structure with frontend and backend
coexisting in the same repository for easier development and deployment.
2025-11-25 06:02:57 +01:00

83 lines
2.5 KiB
TypeScript

import { Control, FieldErrors, UseFormSetValue, UseFormWatch } from 'react-hook-form';
import { OrganizationFormData } from '@/types.ts';
import FormField from '@/components/form/FormField.tsx';
import ImageGallery from '@/components/ui/ImageGallery.tsx';
import ImageUpload from '@/components/ui/ImageUpload.tsx';
import { BasicInfoSection } from '@/components/add-organization/steps/BasicInfoSection.tsx';
import { LocationSection } from '@/components/add-organization/steps/LocationSection.tsx';
import { TagsSection } from '@/components/add-organization/steps/TagsSection.tsx';
interface Step1Props {
control: Control<OrganizationFormData>;
errors: FieldErrors<OrganizationFormData>;
watch: UseFormWatch<OrganizationFormData>;
setValue: UseFormSetValue<OrganizationFormData>;
generateDescription: (payload: [string, string, string]) => void;
isGenerating: boolean;
}
const Step1 = ({
control,
errors,
watch,
setValue,
generateDescription,
isGenerating,
}: Step1Props) => {
return (
<div className="space-y-8">
{/* Basic Information */}
<BasicInfoSection
control={control}
errors={errors}
watch={watch}
generateDescription={generateDescription}
isGenerating={isGenerating}
/>
{/* Location */}
<LocationSection control={control} errors={errors} watch={watch} setValue={setValue} />
{/* Tags and Business Focus */}
<TagsSection control={control} errors={errors} setValue={setValue} />
{/* Logo Upload */}
<div>
<h3 className="text-lg font-semibold mb-4">Logo</h3>
<FormField
control={control}
errors={errors}
name="logoUrl"
label="Logo"
component={ImageUpload}
/>
</div>
{/* Gallery Images */}
<div>
<h3 className="text-lg font-semibold mb-4">Gallery Images</h3>
<FormField
control={control}
errors={errors}
name="galleryImages"
label="Gallery Images"
component={(props: any) => (
<ImageGallery
images={props.value || []}
onChange={props.onChange}
maxImages={10}
editable={true}
className="w-full"
/>
)}
/>
<p className="text-sm text-muted-foreground mt-2">
Upload additional images to showcase your organization (optional)
</p>
</div>
</div>
);
};
export default Step1;