feat(pos): add 5 quick improvements — dark mode, email quotes, barcode scan, returns, offline catalog
1. Auto dark mode: detect system prefers-color-scheme, auto-switch industrial/modern theme 2. Email quotation endpoint: POST /quotations/:id/email sends HTML email via SMTP 3. Camera barcode scanner: BarcodeDetector API with getUserMedia overlay in catalog 4. Returns with warranty: POST /returns endpoint with stock restoration and sale status tracking 5. Partial offline catalog: cache top 500 parts in IndexedDB, search when offline Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1005,6 +1005,20 @@
|
||||
}
|
||||
|
||||
// ─── EXPOSE GLOBALS (for backward compat) ───
|
||||
// ─── BARCODE CAMERA SCAN ───
|
||||
function startBarcodeScan() {
|
||||
if (!window.NexusNative) {
|
||||
alert('El modulo de escaneo no esta cargado.');
|
||||
return;
|
||||
}
|
||||
window.NexusNative.scanBarcode().then(function (code) {
|
||||
if (code) {
|
||||
searchInput.value = code;
|
||||
runSearch(code);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
window.CatalogApp = {
|
||||
toggleCart: toggleCart,
|
||||
goToCheckout: goToCheckout,
|
||||
@@ -1018,6 +1032,7 @@
|
||||
vsModelChanged: vsModelChanged,
|
||||
vsEngineChanged: vsEngineChanged,
|
||||
vsClear: vsClearAll,
|
||||
startBarcodeScan: startBarcodeScan,
|
||||
};
|
||||
|
||||
// ─── INIT ───
|
||||
|
||||
Reference in New Issue
Block a user