feat(medusa,dashboard): Tax settings pages and fixes to list tax rates endpoint (#6606)

**What**
- Adds pages for managing tax settings and tax rates for regions.
- Fixes `list` tax rates endpoint, which was missing pagination, search, order, and filters.

**Note**
The fix to the tax rate list endpoint is very rough, as I have had to reimplement most of the logic from our transformQuery middleware. This is because this endpoints does not follow normal convention for fields and expand and uses string arrays instead of strings separated by commas. Our middleware does not support this, and changing the endpoint to align with other endpoints on the expand and fields params would be a breaking change. Since this is very temporary until 2.0 I think it's okay for the time being.

CLOSES CORE-1654
This commit is contained in:
Kasper Fabricius Kristensen
2024-03-09 13:19:29 +00:00
committed by GitHub
parent 7109969874
commit c2d56ca12b
88 changed files with 3659 additions and 489 deletions
@@ -347,7 +347,7 @@
"removeCountriesWarning_one": "You are about to remove {{count}} country from the region. This action cannot be undone.",
"removeCountriesWarning_other": "You are about to remove {{count}} countries from the region. This action cannot be undone.",
"removeCountryWarning": "You are about to remove the country {{name}} from the region. This action cannot be undone.",
"taxInclusiveHint": "When enabled all prices in the region will be tax inclusive.",
"taxInclusiveHint": "When enabled prices in the region will be tax inclusive.",
"providersHint": " Add which fulfillment and payment providers should be available in this region.",
"shippingOptions": "Shipping Options",
"deleteShippingOptionWarning": "You are about to delete the shipping option {{name}}. This action cannot be undone.",
@@ -382,6 +382,50 @@
}
}
},
"taxes": {
"domain": "Taxes",
"countries": {
"taxCountriesHint": "Tax settings apply to the listed countries."
},
"settings": {
"editTaxSettings": "Edit Tax Settings",
"taxProviderLabel": "Tax provider",
"systemTaxProviderLabel": "System Tax Provider",
"calculateTaxesAutomaticallyLabel": "Calculate taxes automatically",
"calculateTaxesAutomaticallyHint": "When enabled, tax rates will be calculated automatically and applied to carts. When disabled, taxes must be manually computed at checkout. Manual taxes are recommended for usage with third-party tax providers.",
"applyTaxesOnGiftCardsLabel": "Apply taxes on gift cards",
"applyTaxesOnGiftCardsHint": "When enabled, taxes will be applied to gift cards at checkout. In some countries, tax regulations require the application of taxes to gift cards upon purchase.",
"defaultTaxRateLabel": "Default tax rate",
"defaultTaxCodeLabel": "Default tax code"
},
"defaultRate": {
"sectionTitle": "Default Tax Rate"
},
"taxRate": {
"sectionTitle": "Tax Rates",
"createTaxRate": "Create Tax Rate",
"createTaxRateHint": "Create a new tax rate for the region.",
"deleteRateDescription": "You are about to delete the tax rate {{name}}. This action cannot be undone.",
"editTaxRate": "Edit Tax Rate",
"editRateAction": "Edit rate",
"editOverridesAction": "Edit overrides",
"editOverridesTitle": "Edit Tax Rate Overrides",
"editOverridesHint": "Specify the overrides for the tax rate.",
"deleteTaxRateWarning": "You are about to delete the tax rate {{name}}. This action cannot be undone.",
"productOverridesLabel": "Product overrides",
"productOverridesHint": "Specify the product overrides for the tax rate.",
"addProductOverridesAction": "Add product overrides",
"productTypeOverridesLabel": "Product type overrides",
"productTypeOverridesHint": "Specify the product type overrides for the tax rate.",
"addProductTypeOverridesAction": "Add product type overrides",
"shippingOptionOverridesLabel": "Shipping option overrides",
"shippingOptionOverridesHint": "Specify the shipping option overrides for the tax rate.",
"addShippingOptionOverridesAction": "Add shipping option overrides",
"productOverridesHeader": "Products",
"productTypeOverridesHeader": "Product Types",
"shippingOptionOverridesHeader": "Shipping Options"
}
},
"locations": {
"domain": "Locations",
"createLocation": "Create location",
@@ -503,7 +547,7 @@
"availability": "Availability",
"inventory": "Inventory",
"optional": "Optional",
"taxInclusivePricing": "Tax Inclusive Pricing",
"taxInclusivePricing": "Tax inclusive pricing",
"taxRate": "Tax Rate",
"taxCode": "Tax Code",
"currency": "Currency",
@@ -568,9 +612,9 @@
"maxSubtotal": "Max. Subtotal",
"shippingProfile": "Shipping Profile",
"summary": "Summary",
"shippingProfile": "Shipping Profile"
"rate": "Rate"
},
"dateTime" : {
"dateTime": {
"years_one": "Year",
"years_other": "Years",
"months_one": "Month",