Add invoice SMS notifications and customer intake kiosk
Invoice SMS:
- Send Invoice modal now prompts Email/SMS/Both based on customer contact data
- New /invoice/{token} customer-facing view page with full line items and pay button
- PublicViewToken (permanent) added to Invoice; separate from expiring PaymentLinkToken
- InvoiceSent SMS default template added; customizable via Notification Templates settings
- {{viewUrl}} placeholder documented in template editor
Customer Intake Kiosk:
- Tablet kiosk flow: Contact → Job → Terms/Signature → Confirmation
- Remote link mode for off-site customers (lighter form, no signature)
- KioskHub (AllowAnonymous SignalR) for staff-to-tablet push without login
- Staff activates tablet via cookie; sends remote link manually
- Submitted sessions create Customer + Job automatically; fires in-app notification
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
"use strict";
|
||||
|
||||
(function () {
|
||||
const el = document.getElementById("kiosk-welcome-root");
|
||||
if (!el) return;
|
||||
|
||||
const companyId = el.dataset.companyId;
|
||||
if (!companyId) return;
|
||||
|
||||
const connection = new signalR.HubConnectionBuilder()
|
||||
.withUrl(`/hubs/kiosk?companyId=${companyId}`)
|
||||
.withAutomaticReconnect([2000, 5000, 10000, 30000])
|
||||
.configureLogging(signalR.LogLevel.Warning)
|
||||
.build();
|
||||
|
||||
connection.on("StartIntake", function (sessionToken) {
|
||||
window.location.href = `/Kiosk/Intake/${sessionToken}/Contact`;
|
||||
});
|
||||
|
||||
async function startConnection() {
|
||||
try {
|
||||
await connection.start();
|
||||
} catch (err) {
|
||||
console.warn("Kiosk SignalR connect failed, retrying in 10s...", err);
|
||||
setTimeout(startConnection, 10000);
|
||||
}
|
||||
}
|
||||
|
||||
startConnection();
|
||||
|
||||
// Show connection status indicator
|
||||
connection.onreconnecting(() => {
|
||||
const dot = document.getElementById("kiosk-conn-dot");
|
||||
if (dot) dot.style.background = "#f59e0b";
|
||||
});
|
||||
|
||||
connection.onreconnected(() => {
|
||||
const dot = document.getElementById("kiosk-conn-dot");
|
||||
if (dot) dot.style.background = "#16a34a";
|
||||
});
|
||||
|
||||
connection.onclose(() => {
|
||||
const dot = document.getElementById("kiosk-conn-dot");
|
||||
if (dot) dot.style.background = "#ef4444";
|
||||
// Keep retrying
|
||||
setTimeout(startConnection, 10000);
|
||||
});
|
||||
})();
|
||||
Reference in New Issue
Block a user