Add tags to commssion types and custom types. Add button for example images to cards
This commit is contained in:
@ -25,6 +25,9 @@ export async function createCommissionCustomCard(
|
||||
referenceImageUrl: data.referenceImageUrl ?? null,
|
||||
isVisible: data.isVisible ?? true,
|
||||
isSpecialOffer: data.isSpecialOffer ?? false,
|
||||
tags: data.tagIds?.length
|
||||
? { connect: data.tagIds.map((id) => ({ id })) }
|
||||
: undefined,
|
||||
options: {
|
||||
create:
|
||||
data.options?.map((opt, index) => ({
|
||||
|
||||
@ -20,6 +20,12 @@ export async function updateCommissionCustomCard(
|
||||
referenceImageUrl: data.referenceImageUrl ?? null,
|
||||
isVisible: data.isVisible ?? true,
|
||||
isSpecialOffer: data.isSpecialOffer ?? false,
|
||||
tags: data.tagIds
|
||||
? {
|
||||
set: [],
|
||||
connect: data.tagIds.map((id) => ({ id })),
|
||||
}
|
||||
: undefined,
|
||||
options: {
|
||||
deleteMany: {},
|
||||
create: data.options?.map((opt, index) => ({
|
||||
|
||||
Reference in New Issue
Block a user