feat: add Selenium Settings page to configure paymentGroupId per office
Adds a new Settings → Advanced → Selenium Settings page where the office name (paymentGroupId) used in United/DentalHub portal dropdowns can be configured without touching code. Previously hardcoded as "Summit Dental Care"; now injected from DB into the three United workers at job dispatch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@ import { storage } from "../storage";
|
||||
import { enqueueSeleniumJob } from "../queue/jobRunner";
|
||||
import { forwardOtpToSeleniumUnitedDHPreAuthAgent } from "../services/seleniumUnitedDHPreAuthClient";
|
||||
import { io } from "../socket";
|
||||
import { prisma as db } from "@repo/db/client";
|
||||
|
||||
const router = Router();
|
||||
|
||||
@@ -40,11 +41,14 @@ router.post("/uniteddh-preauth", async (req: Request, res: Response): Promise<an
|
||||
});
|
||||
}
|
||||
|
||||
const seleniumSettings = await db.seleniumSettings.findUnique({ where: { userId: req.user.id } });
|
||||
|
||||
const enrichedPayload = {
|
||||
claim: {
|
||||
...claimData,
|
||||
uniteddhUsername: credentials.username,
|
||||
uniteddhPassword: credentials.password,
|
||||
paymentGroupId: seleniumSettings?.paymentGroupId ?? "",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user