fix(dashboard): tax regions UI polish (#12437)

This commit is contained in:
Frane Polić
2025-05-11 16:06:11 +02:00
committed by GitHub
parent fcee6003d8
commit e4d196e522
5 changed files with 39 additions and 31 deletions
@@ -129,6 +129,29 @@ export const TaxRegionCreateForm = ({ parentId }: TaxRegionCreateFormProps) => {
)
}}
/>
<Form.Field
control={form.control}
name="provider_id"
render={({ field }) => (
<Form.Item>
<Form.Label>
{t("taxRegions.fields.taxProvider")}
</Form.Label>
<Form.Control>
<Combobox
{...field}
options={taxProviders.options}
searchValue={taxProviders.searchValue}
onSearchValueChange={
taxProviders.onSearchValueChange
}
fetchNextPage={taxProviders.fetchNextPage}
/>
</Form.Control>
<Form.ErrorMessage />
</Form.Item>
)}
/>
</div>
</div>
<div className="flex flex-col gap-4">
@@ -209,29 +232,6 @@ export const TaxRegionCreateForm = ({ parentId }: TaxRegionCreateFormProps) => {
)
}}
/>
<Form.Field
control={form.control}
name="provider_id"
render={({ field }) => (
<Form.Item>
<Form.Label>
{t("taxRegions.fields.taxProvider")}
</Form.Label>
<Form.Control>
<Combobox
{...field}
options={taxProviders.options}
searchValue={taxProviders.searchValue}
onSearchValueChange={
taxProviders.onSearchValueChange
}
fetchNextPage={taxProviders.fetchNextPage}
/>
</Form.Control>
<Form.ErrorMessage />
</Form.Item>
)}
/>
</div>
</div>
</div>
@@ -21,10 +21,10 @@ export const TaxRegionEdit = () => {
<RouteDrawer>
<RouteDrawer.Header>
<RouteDrawer.Title asChild>
<Heading>{t("taxRegions.taxRates.edit.header")}</Heading>
<Heading>{t("taxRegions.edit.header")}</Heading>
</RouteDrawer.Title>
<RouteDrawer.Description className="sr-only">
{t("taxRegions.taxRates.edit.hint")}
{t("taxRegions.edit.hint")}
</RouteDrawer.Description>
</RouteDrawer.Header>
{ready && <TaxRegionEditForm taxRegion={tax_region} />}