mirror of
https://github.com/supabase/supabase.git
synced 2026-10-13 05:09:12 +03:00
2 files changed
+2
-8
No files matched your search
@@ -188,7 +188,7 @@ const TaxID = () => {
|
||||
<div className="w-full space-y-2">
|
||||
{taxIdValues.map((taxId, idx: number) => {
|
||||
const selectedTaxId = TAX_IDS.find(
|
||||
(option) => option.code === taxId.type
|
||||
(option) => option.name === taxId.name
|
||||
)
|
||||
return (
|
||||
<div key={`tax-id-${idx}`} className="flex items-center space-x-2">
|
||||
|
||||
@@ -2,16 +2,10 @@ import { TaxIdValue } from 'data/organizations/organization-tax-ids-update-mutat
|
||||
import { TAX_IDS } from './TaxID.constants'
|
||||
import { isEqual, sortBy } from 'lodash'
|
||||
|
||||
/**
|
||||
* Sanitize EU VAT ids so they get prepended with the country code
|
||||
*
|
||||
* Ex: Belgium's VAT ID should be BE0123456789 not 0123456789
|
||||
* Only EU VAT ids are affected
|
||||
*/
|
||||
export const sanitizeTaxID = (taxId: TaxIdValue) => {
|
||||
let newID = taxId
|
||||
|
||||
const selectedTaxId = TAX_IDS.find((option) => option.code === taxId.type)
|
||||
const selectedTaxId = TAX_IDS.find((option) => option.name === taxId.name)
|
||||
|
||||
const vatIdPrefix = selectedTaxId?.vatPrefix
|
||||
|
||||
|
||||
Reference in new issue
Block a user