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

View File

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

View File

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