bug fixes, schema updates

This commit is contained in:
2025-02-06 15:33:47 +05:30
parent 42d68615d2
commit f4a6aaab46
6 changed files with 166 additions and 25 deletions

View File

@@ -9,7 +9,7 @@ import {
UpdatePermitInput,
} from "./permit.schema";
import { ChangeEvent, dbEvents } from "../realtime";
import { pipeline } from "../utils/pipeline";
import { permitPipeline } from "../utils/pipeline";
import { AuthenticatedUser } from "../auth";
export async function createPermit(
@@ -18,7 +18,7 @@ export async function createPermit(
) {
if (!input.stage) {
input.stage = {
pipeline: pipeline,
pipeline: permitPipeline,
currentStage: 0,
};
}
@@ -297,6 +297,8 @@ export async function searchPermit(params: PageQueryParams, tenantId: string) {
permitDate: 1,
stage: 1,
status: 1,
address: 1,
description: 1,
county: {
$let: {
vars: { county: { $arrayElemAt: ["$countyRec", 0] } },