feat: add Auto Check MH Payment toggle with weekly schedule
Adds a toggle behind the Go button on the Payments page to automatically run the MH batch payment check on a user-selected day of week and hour. Default is off. - Schema: added autoMhCheckEnabled, autoMhCheckDayOfWeek, autoMhCheckHour to User model - Backend: new mhBatchPaymentService (shared logic), GET/PUT /auto-mh-check-setting routes, hourly cron job that fires on matching day+hour - Frontend: toggle + day select (Mon–Sun) + time select (hourly) that persist immediately to DB Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import * as z from 'zod';
|
||||
import type { Prisma } from '../../../generated/prisma';
|
||||
import { Prisma } from '../../../generated/prisma';
|
||||
import Decimal from 'decimal.js';
|
||||
import { ProcedureSourceSchema } from '../enums/ProcedureSource.schema'
|
||||
|
||||
import { DecimalJSLikeSchema, isValidDecimalInput } from '../../helpers/decimal-helpers';
|
||||
|
||||
import Decimal from "decimal.js";
|
||||
const makeSchema = () => z.object({
|
||||
id: z.number().int().optional(),
|
||||
appointmentId: z.number().int(),
|
||||
@@ -16,7 +15,7 @@ const makeSchema = () => z.object({
|
||||
z.number(),
|
||||
z.string(),
|
||||
z.instanceof(Decimal),
|
||||
z.instanceof(Decimal),
|
||||
z.instanceof(Prisma.Decimal),
|
||||
DecimalJSLikeSchema,
|
||||
]).refine((v) => isValidDecimalInput(v), {
|
||||
message: "Field 'fee' must be a Decimal",
|
||||
|
||||
Reference in New Issue
Block a user