fix(dashboard): Adds routes for handling tax overrides for provinces (#9549)
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
:root {
|
||||
@apply bg-ui-bg-subtle text-ui-fg-base antialiased;
|
||||
text-rendering: optimizeLegibility;
|
||||
color-scheme: light dark;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1347,6 +1347,20 @@ export const RouteMap: RouteObject[] = [
|
||||
"../../routes/tax-regions/tax-region-tax-rate-edit"
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "overrides/create",
|
||||
lazy: () =>
|
||||
import(
|
||||
"../../routes/tax-regions/tax-region-tax-override-create"
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "overrides/:tax_rate_id/edit",
|
||||
lazy: () =>
|
||||
import(
|
||||
"../../routes/tax-regions/tax-region-tax-override-edit"
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -64,6 +64,8 @@ export const ThemeProvider = ({ children }: PropsWithChildren) => {
|
||||
|
||||
html.classList.remove(value === "light" ? "dark" : "light")
|
||||
html.classList.add(value)
|
||||
// Ensures that native elements respect the theme, e.g. the scrollbar.
|
||||
html.style.colorScheme = value
|
||||
|
||||
/**
|
||||
* Re-enable transitions after the theme has been set,
|
||||
|
||||
+4
-2
@@ -4,9 +4,11 @@ import { useTaxRegion } from "../../../hooks/api/tax-regions"
|
||||
import { TaxRegionCreateTaxOverrideForm } from "./components/tax-region-override-create-form"
|
||||
|
||||
export const TaxRegionCreateTaxOverride = () => {
|
||||
const { id } = useParams()
|
||||
const { id, province_id } = useParams()
|
||||
|
||||
const { tax_region, isPending, isError, error } = useTaxRegion(id!)
|
||||
const { tax_region, isPending, isError, error } = useTaxRegion(
|
||||
province_id || id!
|
||||
)
|
||||
|
||||
const ready = !isPending && !!tax_region
|
||||
|
||||
|
||||
Reference in New Issue
Block a user