project menu updates
This commit is contained in:
@@ -34,9 +34,12 @@ export const dashboardRouter = createTRPCRouter({
|
||||
|
||||
let originalDataIndex = periods.length - 1;
|
||||
// *SLAMS DOWN GLASS OF WHISKEY* timezones, amirite?
|
||||
let dayToMatch = dayjs(input.startDate || new Date())
|
||||
let dayToMatch = dayjs(input.startDate || new Date());
|
||||
// Ensure that the initial date we're matching against is never before the first period
|
||||
if (periods[originalDataIndex] && dayToMatch.isBefore(periods[originalDataIndex]?.period, "day")) {
|
||||
if (
|
||||
periods[originalDataIndex] &&
|
||||
dayToMatch.isBefore(periods[originalDataIndex]?.period, "day")
|
||||
) {
|
||||
dayToMatch = dayjs(periods[originalDataIndex]?.period);
|
||||
}
|
||||
const backfilledPeriods: typeof periods = [];
|
||||
|
||||
@@ -16,7 +16,7 @@ fs.writeFileSync(schemaPath, JSON.stringify(openApiDocument, null, 2), "utf-8");
|
||||
|
||||
console.log("Generating Typescript client");
|
||||
|
||||
const tsClientPath = path.join(clientLibsPath, "js/codegen");
|
||||
const tsClientPath = path.join(clientLibsPath, "typescript/codegen");
|
||||
|
||||
fs.rmSync(tsClientPath, { recursive: true, force: true });
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type Prisma } from "@prisma/client";
|
||||
import { JsonValue, type JsonObject } from "type-fest";
|
||||
import { type JsonValue, type JsonObject } from "type-fest";
|
||||
import modelProviders from "~/modelProviders/modelProviders";
|
||||
import { prisma } from "~/server/db";
|
||||
import { wsConnection } from "~/utils/wsConnection";
|
||||
|
||||
Reference in New Issue
Block a user