changes db types

This commit is contained in:
ogerly 2022-06-14 13:35:11 +02:00
parent b8f6d24991
commit 256c84d132
4 changed files with 5 additions and 34 deletions

View File

@ -131,7 +131,7 @@ export default {
validFrom: null, validFrom: null,
validTo: null, validTo: null,
cycle: 'ONCE', cycle: 'ONCE',
maxPerCycle: '1', maxPerCycle: 1,
maxAmountPerMonth: '0', maxAmountPerMonth: '0',
}, },
min: new Date(), min: new Date(),
@ -158,7 +158,7 @@ export default {
if (this.form.validFrom === null) if (this.form.validFrom === null)
return this.toastError(this.$t('contributionLink.noStartDate')) return this.toastError(this.$t('contributionLink.noStartDate'))
if (this.form.validTo === null) return this.toastError(this.$t('contributionLink.noEndDate')) if (this.form.validTo === null) return this.toastError(this.$t('contributionLink.noEndDate'))
alert(JSON.stringify(this.form)) // alert(JSON.stringify(this.form))
this.$apollo this.$apollo
.mutate({ .mutate({
mutation: createContributionLink, mutation: createContributionLink,

View File

@ -8,7 +8,7 @@ export const createContributionLink = gql`
$amount: Decimal! $amount: Decimal!
$memo: String! $memo: String!
$cycle: String! $cycle: String!
$maxPerCycle: String $maxPerCycle: Int! = 1
$maxAmountPerMonth: Decimal $maxAmountPerMonth: Decimal
) { ) {
createContributionLink( createContributionLink(

View File

@ -24,6 +24,6 @@ export default class ContributionLinkArgs {
@Field(() => Decimal, { nullable: true }) @Field(() => Decimal, { nullable: true })
maxAmountPerMonth: Decimal | null maxAmountPerMonth: Decimal | null
@Field(() => Int, { nullable: true }) @Field(() => Int)
maxPerCycle: number | null maxPerCycle: number
} }

View File

@ -1,29 +0,0 @@
import { ArgsType, Field, InputType } from 'type-graphql'
@InputType()
@ArgsType()
export default class CreateContributionLinkArgs {
@Field(() => String)
validFrom: string
@Field(() => String, { nullable: true })
validTo: string | null
@Field(() => String)
name: string
@Field(() => String)
amount: string
@Field(() => String)
memo: string
@Field(() => String)
cycle: string
@Field(() => String, { nullable: true })
maxPerCycle: string | null
@Field(() => String, { nullable: true })
maxAmountPerMonth: string | null
}