@@ -1,5 +1,6 @@
|
||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { router } from '@inertiajs/react';
|
||||
import CountrySelect, { type Country } from '@/components/country-select';
|
||||
import { Frame, Field, input, button, card, api } from './shared';
|
||||
import type { Business } from './business-types';
|
||||
import { businessModalities } from './business-types';
|
||||
@@ -27,6 +28,7 @@ export type FormSchema = Record<
|
||||
}
|
||||
>;
|
||||
type Props = {
|
||||
countries: Country[];
|
||||
record: Business;
|
||||
modalities: string[];
|
||||
formSchema: FormSchema;
|
||||
@@ -207,6 +209,7 @@ function opportunityTypeFor(modality: string): string {
|
||||
}
|
||||
|
||||
export default function BusinessWizard({
|
||||
countries,
|
||||
record,
|
||||
formSchema,
|
||||
objects,
|
||||
@@ -706,6 +709,18 @@ export default function BusinessWizard({
|
||||
*
|
||||
</span>
|
||||
</span>
|
||||
) : field.type === 'country' ? (
|
||||
<CountrySelect
|
||||
countries={countries}
|
||||
value={payload[key] ?? ''}
|
||||
allowLegacyValue={key === 'country'}
|
||||
onChange={(value) =>
|
||||
update(key, value)
|
||||
}
|
||||
label={
|
||||
english ? field.en : field.pt
|
||||
}
|
||||
/>
|
||||
) : field.type === 'territory' ? (
|
||||
<TerritoryField
|
||||
name={english ? field.en : field.pt}
|
||||
|
||||
Reference in New Issue
Block a user