Feat: Add tax inclusivity to admin (#8003)

* feat: Add price preference to sdk

* feat: Plug tax inclusivity settings for region in UI

* feat: Add price inclusivity indicator to variant and shipping price table columns

* fix: Rename price title to correct variable name

* feat: Add support for tax inclusive crud on region

* fix: Use the region endpoint for updating tax inclusivity

* chore: Factor out price columns from hooks
This commit is contained in:
Stevche Radevski
2024-07-09 09:26:20 +02:00
committed by GitHub
parent 4b391fc3cf
commit cbf2fcd559
34 changed files with 920 additions and 433 deletions

View File

@@ -1,5 +1,5 @@
import { BuildingTax } from "@medusajs/icons"
import { Tooltip } from "@medusajs/ui"
import { Tooltip, clx } from "@medusajs/ui"
import { useTranslation } from "react-i18next"
type IncludesTaxTooltipProps = {
@@ -11,13 +11,15 @@ export const IncludesTaxTooltip = ({
}: IncludesTaxTooltipProps) => {
const { t } = useTranslation()
if (!includesTax) {
return null
}
return (
<Tooltip content={t("general.includesTaxTooltip")}>
<BuildingTax className="text-ui-fg-muted" />
<Tooltip
content={
includesTax
? t("general.includesTaxTooltip")
: t("general.excludesTaxTooltip")
}
>
<BuildingTax className={clx({ "text-ui-fg-muted": !includesTax })} />
</Tooltip>
)
}