From 06e225096b6e8c4d9a2fdc31ecd47d6dc5254f96 Mon Sep 17 00:00:00 2001 From: leonnicolas Date: Fri, 11 Dec 2020 14:03:37 +0100 Subject: [PATCH] bugs and no $ in money --- src/model/Workshop.ts | 2 +- src/resolvers/cargoBikeResolver.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/model/Workshop.ts b/src/model/Workshop.ts index 91e6b11..d44b415 100644 --- a/src/model/Workshop.ts +++ b/src/model/Workshop.ts @@ -60,7 +60,7 @@ export class Workshop implements Lockable { @JoinColumn({ name: 'trainer2Id' }) - trainer2: Participant; + trainer2Id: number; @Column({ nullable: true, diff --git a/src/resolvers/cargoBikeResolver.ts b/src/resolvers/cargoBikeResolver.ts index bbbc1e5..47894db 100644 --- a/src/resolvers/cargoBikeResolver.ts +++ b/src/resolvers/cargoBikeResolver.ts @@ -230,6 +230,11 @@ export default { isLockedByMe: (parent: any, __: any, { req }: { req: any }) => isLockedByMe(parent, { req }), isLocked: (parent: any, __: any, { req }: { req: any }) => isLocked(parent, { req }) }, + InsuranceData: { + projectAllowance: (parent: any): any => { + return (parent as string)?.replace(/€\$/, ''); + } + }, Mutation: { createCargoBike: (_: any, { cargoBike }: { cargoBike: any }, { dataSources, req }: { dataSources: any, req: any }) => { if (req.permissions.includes(Permission.WriteBike)) {