fix(dashboard): tax regions UI polish (#12437)
This commit is contained in:
1 parent
fcee6003d8
commit
e4d196e522
5 files changed
+39
-31
No files matched your search
@@ -1589,6 +1589,11 @@ export function getRouteMap({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
|
{
|
||||||
|
path: "edit",
|
||||||
|
lazy: () =>
|
||||||
|
import("../../routes/tax-regions/tax-region-edit"),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "provinces/create",
|
path: "provinces/create",
|
||||||
lazy: () =>
|
lazy: () =>
|
||||||
@@ -1626,11 +1631,6 @@ export function getRouteMap({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: "edit",
|
|
||||||
lazy: () =>
|
|
||||||
import("../../routes/tax-regions/tax-region-edit"),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: "provinces/:province_id",
|
path: "provinces/:province_id",
|
||||||
lazy: async () => {
|
lazy: async () => {
|
||||||
|
|||||||
@@ -6482,11 +6482,17 @@
|
|||||||
"edit": {
|
"edit": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"header": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"hint": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"successToast": {
|
"successToast": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": ["successToast"],
|
"required": ["header", "hint", "successToast"],
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
},
|
},
|
||||||
"province": {
|
"province": {
|
||||||
|
|||||||
@@ -1724,6 +1724,8 @@
|
|||||||
"successToast": "The tax region was successfully created."
|
"successToast": "The tax region was successfully created."
|
||||||
},
|
},
|
||||||
"edit": {
|
"edit": {
|
||||||
|
"header": "Edit Tax Region",
|
||||||
|
"hint": "Edit the tax region details.",
|
||||||
"successToast": "The tax region was successfully updated."
|
"successToast": "The tax region was successfully updated."
|
||||||
},
|
},
|
||||||
"province": {
|
"province": {
|
||||||
|
|||||||
+23
-23
@@ -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>
|
</div>
|
||||||
<div className="flex flex-col gap-4">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ export const TaxRegionEdit = () => {
|
|||||||
<RouteDrawer>
|
<RouteDrawer>
|
||||||
<RouteDrawer.Header>
|
<RouteDrawer.Header>
|
||||||
<RouteDrawer.Title asChild>
|
<RouteDrawer.Title asChild>
|
||||||
<Heading>{t("taxRegions.taxRates.edit.header")}</Heading>
|
<Heading>{t("taxRegions.edit.header")}</Heading>
|
||||||
</RouteDrawer.Title>
|
</RouteDrawer.Title>
|
||||||
<RouteDrawer.Description className="sr-only">
|
<RouteDrawer.Description className="sr-only">
|
||||||
{t("taxRegions.taxRates.edit.hint")}
|
{t("taxRegions.edit.hint")}
|
||||||
</RouteDrawer.Description>
|
</RouteDrawer.Description>
|
||||||
</RouteDrawer.Header>
|
</RouteDrawer.Header>
|
||||||
{ready && <TaxRegionEditForm taxRegion={tax_region} />}
|
{ready && <TaxRegionEditForm taxRegion={tax_region} />}
|
||||||
|
|||||||
Reference in new issue
Block a user