fix: v2 filter out ooo days out of slots (#20303)
* refactor: slots input service rely on eventTypeId and set start hours if none set * fix: filter out ooo slots * test: ooo days filtered out of slots * revert changes
This commit is contained in:
1 parent
e76bb37f78
commit
0965fad72a
4 files changed
+196
-71
No files matched your search
@@ -0,0 +1,32 @@
|
||||
import { PrismaReadService } from "@/modules/prisma/prisma-read.service";
|
||||
import { PrismaWriteService } from "@/modules/prisma/prisma-write.service";
|
||||
import { TestingModule } from "@nestjs/testing";
|
||||
import { PlatformOAuthClient, Prisma } from "@prisma/client";
|
||||
|
||||
import { CreateOAuthClientInput } from "@calcom/platform-types";
|
||||
|
||||
export class OOORepositoryFixture {
|
||||
private prismaReadClient: PrismaReadService["prisma"];
|
||||
private prismaWriteClient: PrismaWriteService["prisma"];
|
||||
|
||||
constructor(private readonly module: TestingModule) {
|
||||
this.prismaReadClient = module.get(PrismaReadService).prisma;
|
||||
this.prismaWriteClient = module.get(PrismaWriteService).prisma;
|
||||
}
|
||||
|
||||
async create(data: Prisma.OutOfOfficeEntryCreateInput) {
|
||||
return this.prismaWriteClient.outOfOfficeEntry.create({
|
||||
data: {
|
||||
...data,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async delete(id: number) {
|
||||
return this.prismaWriteClient.outOfOfficeEntry.delete({
|
||||
where: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user