2
0

(billing) Add HU VAT option

This commit is contained in:
Baptiste Arnaud
2023-03-29 16:33:06 +02:00
parent 3ef4efab4e
commit 70416c0d14
3 changed files with 44 additions and 20 deletions

View File

@ -340,7 +340,14 @@ export const taxIdTypes = [
code: 'HU TIN', code: 'HU TIN',
name: 'Hungary', name: 'Hungary',
emoji: '🇭🇺', emoji: '🇭🇺',
placeholder: '12345678', placeholder: '13804079-2-13',
},
{
type: 'hu_vat',
code: 'HU VAT',
name: 'Hungary',
emoji: '🇭🇺',
placeholder: 'HU12345678',
}, },
{ {
type: 'id_npwp', type: 'id_npwp',

View File

@ -24,24 +24,27 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
if (!workspaceId) return badRequest(res) if (!workspaceId) return badRequest(res)
const typebotIds = req.query.typebotIds as string[] const typebotIds = req.query.typebotIds as string[]
const typebots = await prisma.typebot.findMany({ const typebots = await prisma.typebot.findMany({
where: { where:
OR: [ process.env.ADMIN_EMAIL === user.email
{ ? undefined
workspace: { members: { some: { userId: user.id } } }, : {
id: { in: typebotIds }, OR: [
isArchived: { not: true }, {
}, workspace: { members: { some: { userId: user.id } } },
{ id: { in: typebotIds },
id: { in: typebotIds }, isArchived: { not: true },
collaborators: { },
some: { {
userId: user.id, id: { in: typebotIds },
}, collaborators: {
some: {
userId: user.id,
},
},
isArchived: { not: true },
},
],
}, },
isArchived: { not: true },
},
],
},
orderBy: { createdAt: 'desc' }, orderBy: { createdAt: 'desc' },
select: { name: true, id: true, groups: true, variables: true }, select: { name: true, id: true, groups: true, variables: true },
}) })

View File

@ -826,6 +826,9 @@
"additionalInformation": { "additionalInformation": {
"type": "object", "type": "object",
"properties": { "properties": {
"description": {
"type": "string"
},
"name": { "name": {
"type": "string" "type": "string"
}, },
@ -1146,9 +1149,13 @@
"Equal to", "Equal to",
"Not equal", "Not equal",
"Contains", "Contains",
"Does not contain",
"Greater than", "Greater than",
"Less than", "Less than",
"Is set" "Is set",
"Is empty",
"Starts with",
"Ends with"
] ]
}, },
"value": { "value": {
@ -1584,9 +1591,13 @@
"Equal to", "Equal to",
"Not equal", "Not equal",
"Contains", "Contains",
"Does not contain",
"Greater than", "Greater than",
"Less than", "Less than",
"Is set" "Is set",
"Is empty",
"Starts with",
"Ends with"
] ]
}, },
"value": { "value": {
@ -3521,6 +3532,9 @@
"additionalInformation": { "additionalInformation": {
"type": "object", "type": "object",
"properties": { "properties": {
"description": {
"type": "string"
},
"name": { "name": {
"type": "string" "type": "string"
}, },