rename(phase 1): CapaKraken → Nexus across code, UI, docs, CI (#61)
CI / Architecture Guardrails (push) Successful in 2m38s
CI / Assistant Split Regression (push) Successful in 3m33s
CI / Typecheck (push) Successful in 3m51s
CI / Lint (push) Successful in 5m2s
CI / E2E Tests (push) Has been cancelled
CI / Fresh-Linux Docker Deploy (push) Has been cancelled
CI / Release Images (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Architecture Guardrails (push) Successful in 2m38s
CI / Assistant Split Regression (push) Successful in 3m33s
CI / Typecheck (push) Successful in 3m51s
CI / Lint (push) Successful in 5m2s
CI / E2E Tests (push) Has been cancelled
CI / Fresh-Linux Docker Deploy (push) Has been cancelled
CI / Release Images (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
rename(phase 1): CapaKraken → Nexus across code, UI, docs, CI (#61) Co-authored-by: Hartmut Nörenberg <hn@hartmut-noerenberg.com> Co-committed-by: Hartmut Nörenberg <hn@hartmut-noerenberg.com>
This commit was merged in pull request #61.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { Prisma, PrismaClient, VacationStatus, VacationType } from "@capakraken/db";
|
||||
import type { Prisma, PrismaClient, VacationStatus, VacationType } from "@nexus/db";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
type DbClient = PrismaClient;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PrismaClient, VacationStatus } from "@capakraken/db";
|
||||
import type { PrismaClient, VacationStatus } from "@nexus/db";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
type DbClient = Pick<PrismaClient, "vacation" | "resource">;
|
||||
@@ -40,8 +40,7 @@ export async function cancelVacation(
|
||||
// Only fetch the linked resource when the actor is not a manager and didn't
|
||||
// originally request the vacation — we need to check resource ownership.
|
||||
const needsResourceCheck =
|
||||
!deps.isVacationManagerRole(input.actorRole) &&
|
||||
existing.requestedById !== input.actorId;
|
||||
!deps.isVacationManagerRole(input.actorRole) && existing.requestedById !== input.actorId;
|
||||
|
||||
const resource = needsResourceCheck
|
||||
? await db.resource.findUnique({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Prisma, PrismaClient, VacationStatus } from "@capakraken/db";
|
||||
import type { Prisma, PrismaClient, VacationStatus } from "@nexus/db";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
type DbClient = Pick<PrismaClient, "vacation">;
|
||||
@@ -62,11 +62,10 @@ export async function batchRejectVacations(
|
||||
input: BatchRejectVacationInput,
|
||||
deps: BatchRejectVacationDeps,
|
||||
): Promise<BatchRejectVacationResult> {
|
||||
const vacations: Array<{ id: string; resourceId: string }> =
|
||||
await db.vacation.findMany({
|
||||
where: { id: { in: input.ids }, status: "PENDING" },
|
||||
select: { id: true, resourceId: true },
|
||||
});
|
||||
const vacations: Array<{ id: string; resourceId: string }> = await db.vacation.findMany({
|
||||
where: { id: { in: input.ids }, status: "PENDING" },
|
||||
select: { id: true, resourceId: true },
|
||||
});
|
||||
|
||||
await db.vacation.updateMany({
|
||||
where: { id: { in: vacations.map((v) => v.id) } },
|
||||
|
||||
Reference in New Issue
Block a user