commit working state
Too many changes to split them up. This commit contains roughly two months worth of work. This commit introduces the first aggregate and rewrites the ticket system to follow DDD patterns. It adds Spartan NG as the new component library. TanStack Query to replace GraphQL. Oh and Prisma is almost over as well.
This commit is contained in:
+21
-7
@@ -1,12 +1,22 @@
|
||||
import { Args, Parent, Query, ResolveField, Resolver } from '@nestjs/graphql';
|
||||
import {
|
||||
Args,
|
||||
Int,
|
||||
Parent,
|
||||
Query,
|
||||
ResolveField,
|
||||
Resolver,
|
||||
} from '@nestjs/graphql';
|
||||
import { TicketObjectType } from '../app-ticket-system/ticket.object-type';
|
||||
import {
|
||||
AccountingTourArgs,
|
||||
TourStateMetaObjectType,
|
||||
AccountingFilterArgs
|
||||
} from './accounting-arg.types';
|
||||
import { AccountingState } from './accounting-state';
|
||||
import { AccountingValidationService } from './accounting-validation.service';
|
||||
import { PaginatedTourObjectType, TourCostBreakdownObjectType } from './accounting.object-type';
|
||||
import {
|
||||
PaginatedTourObjectType,
|
||||
TourCostBreakdownObjectType,
|
||||
TourStateMetaObjectType,
|
||||
} from './accounting.object-type';
|
||||
import { TourObjectType } from './tour.object-type';
|
||||
|
||||
@Resolver(() => TourObjectType)
|
||||
@@ -15,9 +25,13 @@ export class AccountingValidationResolver {
|
||||
|
||||
@Query(() => PaginatedTourObjectType)
|
||||
accountingTours(
|
||||
@Args() { state, filters, cursor, take }: AccountingTourArgs,
|
||||
@Args('state', { type: () => AccountingState }) state: AccountingState,
|
||||
@Args('filters', { type: () => AccountingFilterArgs, nullable: true })
|
||||
filters: AccountingFilterArgs,
|
||||
@Args('cursor', { nullable: true }) cursor: string,
|
||||
@Args('take', { type: () => Int, nullable: true }) take: number = 10,
|
||||
) {
|
||||
return this.service.paginateToursByState(state, filters, take, cursor);
|
||||
return this.service.paginateToursByState(state, take, cursor);
|
||||
}
|
||||
|
||||
@Query(() => TourStateMetaObjectType)
|
||||
@@ -30,7 +44,7 @@ export class AccountingValidationResolver {
|
||||
|
||||
@Query(() => TourCostBreakdownObjectType)
|
||||
tourCostBreakdown(@Args('operationId') operationId: string) {
|
||||
return this.service.getTourCostBreakdown(operationId)
|
||||
return this.service.getTourCostBreakdown(operationId);
|
||||
}
|
||||
|
||||
@ResolveField(() => TicketObjectType, { nullable: true })
|
||||
|
||||
Reference in New Issue
Block a user