F-201 F-202 F-203: POS cash close report + email + PIN admin
F-201: GET /pos/reports/cash-close/:id with financial summary, sales by state, payments breakdown, items sold. Extended /pos/sessions/:id. F-202: Cash close email sent on session close to smtpReportEmail (best-effort). smtpReportEmail field added to admin SMTP settings. F-203: Admin POS terminal config: selfpayMode, closeSessionRequiresPin, closeSessionPin (4-6 digits) with dedicated settings section.
This commit is contained in:
@@ -37,6 +37,7 @@ const updateSettingsSchema = z.object({
|
||||
smtpUser: z.string().max(255).optional(),
|
||||
smtpPass: z.string().max(500).optional(),
|
||||
smtpFrom: z.string().email().optional().or(z.literal('')),
|
||||
smtpReportEmail: z.string().email().optional().or(z.literal('')),
|
||||
couriers: z.array(z.string().trim().min(1).max(60)).max(30).optional(),
|
||||
});
|
||||
|
||||
@@ -84,6 +85,7 @@ const SETTING_KEYS: Record<string, string> = {
|
||||
smtpUser: 'smtp_user',
|
||||
smtpPass: 'smtp_pass',
|
||||
smtpFrom: 'smtp_from',
|
||||
smtpReportEmail: 'smtp_report_email',
|
||||
};
|
||||
|
||||
export async function registerStoreSettingsRoutes(
|
||||
@@ -133,6 +135,7 @@ export async function registerStoreSettingsRoutes(
|
||||
smtpPass: '',
|
||||
smtpPassConfigured: Boolean(map['smtp_pass'] || process.env.SMTP_PASS),
|
||||
smtpFrom: map['smtp_from'] ?? process.env.SMTP_FROM ?? '',
|
||||
smtpReportEmail: map['smtp_report_email'] ?? '',
|
||||
couriers: parseCouriers(map['shipping_couriers']),
|
||||
});
|
||||
});
|
||||
@@ -221,6 +224,7 @@ export async function registerStoreSettingsRoutes(
|
||||
smtpPass: '',
|
||||
smtpPassConfigured: Boolean(map['smtp_pass'] || process.env.SMTP_PASS),
|
||||
smtpFrom: map['smtp_from'] ?? process.env.SMTP_FROM ?? '',
|
||||
smtpReportEmail: map['smtp_report_email'] ?? '',
|
||||
couriers: parseCouriers(map['shipping_couriers']),
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user