Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
227 commits
Select commit Hold shift + click to select a range
08ca724
Collect full and split bills with manually confirmed UPI QR payments
sridharkalaibala Sep 30, 2026
2b0fffc
Apply approved floor navigation and add editable Captain account screens
sridharkalaibala Sep 30, 2026
69c0ac4
Implement table and branch settings with resilient navigation
sridharkalaibala Sep 30, 2026
fcb827c
Disable unavailable destinations in the move-table picker
sridharkalaibala Sep 30, 2026
ef66088
Add explicit paid-order closure and table cleaning flow
sridharkalaibala Sep 30, 2026
66bfe43
Redesign seating with area filters, review and responsive layouts
sridharkalaibala Sep 30, 2026
d096661
Configure neighbouring tables for combined seating
sridharkalaibala Sep 30, 2026
c7c8423
Track desktop neighbour settings coverage
sridharkalaibala Sep 30, 2026
dfbbcc7
Track atomic seating claim prerequisite and remaining integration
sridharkalaibala Sep 30, 2026
9fc14b3
Record seating release and recovery verification
sridharkalaibala Sep 30, 2026
6241645
Review combined-table closure through the primary table
sridharkalaibala Sep 30, 2026
a4fdfd3
Track multi-order seating compatibility checks
sridharkalaibala Sep 30, 2026
57a8001
Track combined order submission integration
sridharkalaibala Sep 30, 2026
26c8f2a
Record grouped order edit safeguards
sridharkalaibala Sep 30, 2026
b65662d
Record grouped cancellation recovery checks
sridharkalaibala Sep 30, 2026
557d698
Track legacy Captain seating enrollment and rollout gate
sridharkalaibala Sep 30, 2026
028231d
Track desktop seating submission and stock retry checks
sridharkalaibala Sep 30, 2026
c0ccc0b
Track desktop request identity lifecycle
sridharkalaibala Sep 30, 2026
fdeb848
Track desktop retry payload integrity
sridharkalaibala Sep 30, 2026
d3bb70a
Give pending orders a dedicated responsive screen
sridharkalaibala Sep 30, 2026
7ed2ea4
Separate Captain account navigation into focused screens
sridharkalaibala Sep 30, 2026
64eab60
Add saved sound and vibration preferences for Captain
sridharkalaibala Sep 30, 2026
0a4aa56
Expose branch payment collection settings in Captain
sridharkalaibala Sep 30, 2026
237a8a1
Show selected items in the responsive menu basket
sridharkalaibala Sep 30, 2026
f376f67
Show branch-time serving periods on Captain menu items
sridharkalaibala Sep 30, 2026
93f0831
Add restaurant meal-period browsing to the Captain menu
sridharkalaibala Sep 30, 2026
28d3f1a
Add navigable connection help and keep settings usable offline
sridharkalaibala Sep 30, 2026
993780d
Protect unsaved Captain account edits on Back
sridharkalaibala Sep 30, 2026
8889449
Improve Captain table setup validation and responsive layout
sridharkalaibala Sep 30, 2026
51698a3
Protect preparation edits and use shared dialog theme
sridharkalaibala Sep 30, 2026
9d853c6
Preserve order context when updating kitchen rounds
sridharkalaibala Sep 30, 2026
01c4a86
Add translated common reasons for restricted order changes
sridharkalaibala Sep 30, 2026
5e94718
Make staff handover explicit and recoverable
sridharkalaibala Sep 30, 2026
fb2754e
Record POS handover retry verification
sridharkalaibala Sep 30, 2026
4b471ca
Keep kitchen delivery reports usable during connection failures
sridharkalaibala Sep 30, 2026
679f83f
Keep sales totals tied to their confirmed date
sridharkalaibala Sep 30, 2026
e78e475
Adapt sales summary layout and navigation for phones and tablets
sridharkalaibala Sep 30, 2026
9e5e029
Track sales summary accuracy fixes
sridharkalaibala Sep 30, 2026
2f12728
Show confirmed paid totals in Captain sales summary
sridharkalaibala Sep 30, 2026
55e7128
Record Captain sales ownership verification
sridharkalaibala Sep 30, 2026
32eed82
Ignore stale Help checks after changing server address
sridharkalaibala Sep 30, 2026
36db56a
Track phone verification backend groundwork
sridharkalaibala Sep 30, 2026
3508789
Track phone verification route and concurrency checks
sridharkalaibala Sep 30, 2026
a7fa715
Add verified phone change screens and translated recovery flows
sridharkalaibala Sep 30, 2026
9b9d033
Match phone verification to approved password confirmation flow
sridharkalaibala Sep 30, 2026
c4aaa09
Resume phone verification after Back without resending a code
sridharkalaibala Sep 30, 2026
8788114
Track verified email API and remaining profile screen work
sridharkalaibala Sep 30, 2026
0bd972b
Add translated email change and code verification screens
sridharkalaibala Sep 30, 2026
4be5bd6
Record email recovery invalidation checks
sridharkalaibala Sep 30, 2026
3dccd74
Keep translated contact details and change actions readable
sridharkalaibala Sep 30, 2026
d17b5f9
Protect table moves while saving and restore failed selections
sridharkalaibala Sep 30, 2026
86f09cc
Load current destination tables and remaining seats before moving
sridharkalaibala Sep 30, 2026
4c813ad
Track server destination validation and remaining seating protocol
sridharkalaibala Sep 30, 2026
ae45e53
Track internal group move reservation and remaining integration
sridharkalaibala Sep 30, 2026
6184793
Record group move completion and recovery coverage
sridharkalaibala Sep 30, 2026
3723dda
Record move retry and release-lock verification
sridharkalaibala Sep 30, 2026
c534726
Track group close intent locking and pending public integration
sridharkalaibala Sep 30, 2026
f87aa57
Record recoverable public table close integration
sridharkalaibala Sep 30, 2026
6b5198c
Track partial close payment-race recovery
sridharkalaibala Sep 30, 2026
09ba6e4
Track authenticated group move API integration
sridharkalaibala Sep 30, 2026
73a0fee
Verify history moves send the displayed order version
sridharkalaibala Sep 30, 2026
c332400
Preserve interrupted Captain table moves for retry
sridharkalaibala Sep 30, 2026
7c7f276
Recover cancellation of pending Captain table moves
sridharkalaibala Sep 30, 2026
e8bdf4f
Track server recovery for unprepared table moves
sridharkalaibala Sep 30, 2026
75b1912
Cancel saved table moves directly and verify conflict state
sridharkalaibala Sep 30, 2026
bd7867f
Select neighbouring tables when moving an existing seating group
sridharkalaibala Sep 30, 2026
d7df7dc
Improve table move readability and main-table selection on phones
sridharkalaibala Sep 30, 2026
24b49a9
Track desktop seating edit protection
sridharkalaibala Sep 30, 2026
f231058
Record database verification for concurrent desktop seating edits
sridharkalaibala Sep 30, 2026
642887d
Track customer seating protocol integration
sridharkalaibala Sep 30, 2026
13db3b3
Track authorized seating handover support
sridharkalaibala Sep 30, 2026
ebed86d
Track desktop network retry correction and remaining journal work
sridharkalaibala Sep 30, 2026
922d688
Track desktop submission journal foundation and integration gap
sridharkalaibala Sep 30, 2026
e72e9c5
Track desktop submission deduplication and remaining recovery work
sridharkalaibala Sep 30, 2026
6c3c727
Track desktop journal submission wiring
sridharkalaibala Sep 30, 2026
ca97821
Track desktop pending submission recovery screen
sridharkalaibala Sep 30, 2026
3fee841
Add general kitchen voice notes from active tables
sridharkalaibala Sep 30, 2026
6ba8a6a
Integrate released connection and cancellation fixes into full Captai…
sridharkalaibala Sep 30, 2026
35737a7
Unify Captain floor, history, bill, account and kitchen voice flows
sridharkalaibala Sep 30, 2026
b3fa30b
Preserve split bills across routes and complete account recovery navi…
sridharkalaibala Sep 30, 2026
bc8313a
Separate claimed order edits and retain issuer on uncertain retries
sridharkalaibala Sep 30, 2026
1a2a0bf
Unify discard confirmations and permission recovery across Captain
sridharkalaibala Sep 30, 2026
b15f182
Preserve table entry during refresh and cover every Captain page
sridharkalaibala Sep 30, 2026
0f2ca62
Record verified screen coverage and remaining transfer workflows
sridharkalaibala Sep 30, 2026
3d82be3
Track kitchen concurrency verification for remaining transfer work
sridharkalaibala Sep 30, 2026
60c66ec
Add pause preview resume and send controls to kitchen voice recording
sridharkalaibala Sep 30, 2026
03a8bdd
Track transfer service-state conservation and outstanding rollout
sridharkalaibala Sep 30, 2026
961dc4e
Connect occupied-table merge selection permission and retry flows
sridharkalaibala Sep 30, 2026
f374789
Record seating snapshot verification and remaining rollout work
sridharkalaibala Sep 30, 2026
8b0da3d
Record shared covers and takeaway edit verification
sridharkalaibala Sep 30, 2026
f3f1e5d
Track aggregate reservation capacity verification
sridharkalaibala Sep 30, 2026
291cf8b
Record existing-party edit compatibility checks
sridharkalaibala Sep 30, 2026
4734fad
Track durable cover service and required writer integration
sridharkalaibala Sep 30, 2026
63231cf
Record guest API verification and client rollout requirements
sridharkalaibala Sep 30, 2026
e872504
Save claimed guest changes with durable mobile recovery
sridharkalaibala Sep 30, 2026
de91a13
Record shared capacity writer protection and remaining legacy races
sridharkalaibala Sep 30, 2026
6d650a5
Record cover recovery fault-injection verification
sridharkalaibala Sep 30, 2026
a5fad1b
Record live-line transfer validation
sridharkalaibala Sep 30, 2026
d946bf4
Record complete affected editor browser regression
sridharkalaibala Sep 30, 2026
38edc81
Record legacy cover payment compatibility verification
sridharkalaibala Sep 30, 2026
627b99e
Track legacy enrollment service and pending flow integration
sridharkalaibala Sep 30, 2026
fc43246
Record legacy move recovery verification
sridharkalaibala Sep 30, 2026
ca6956e
Use recoverable table moves for older Captain orders
sridharkalaibala Sep 30, 2026
5206d27
Record legacy guest recovery verification
sridharkalaibala Sep 30, 2026
1e16514
Use durable guest saves for older Captain orders
sridharkalaibala Sep 30, 2026
b7abd20
Enable verified merges for older Captain checks
sridharkalaibala Sep 30, 2026
a362d43
Track stale legacy seating save verification
sridharkalaibala Sep 30, 2026
55a3edb
Record transfer kitchen history coverage
sridharkalaibala Sep 30, 2026
2b4fec2
Record verified transfer kitchen projection
sridharkalaibala Sep 30, 2026
89b473a
Track bill reader consistency verification
sridharkalaibala Sep 30, 2026
fe451ba
Record exact transfer financial projection verification
sridharkalaibala Sep 30, 2026
623a753
Record transfer financial and guest metadata verification
sridharkalaibala Sep 30, 2026
b9b3a31
Track desktop transfer amount verification
sridharkalaibala Sep 30, 2026
905d0e6
Bound Help recovery and isolate expired retries
sridharkalaibala Sep 30, 2026
c0e01c2
Recover stalled profile loads without losing navigation or drafts
sridharkalaibala Sep 30, 2026
ecec4e7
Recover stalled sales refresh and localize order times
sridharkalaibala Sep 30, 2026
fead345
Verify branch payee save acknowledgements before showing success
sridharkalaibala Sep 30, 2026
7188976
Require matching payment settings before confirming save
sridharkalaibala Sep 30, 2026
5d9c7e6
Recover stalled branch and payment settings reads
sridharkalaibala Sep 30, 2026
1c3cea3
Verify redesign unit and voice gesture flows with formatted viewport …
sridharkalaibala Sep 30, 2026
84dcd77
Record BSON transfer identity verification
sridharkalaibala Sep 30, 2026
e8fb39b
Track transfer financial alias integrity checks
sridharkalaibala Sep 30, 2026
69d8464
Track scoped transfer preview API progress
sridharkalaibala Sep 30, 2026
8380309
Record transfer reservation race and orchestration findings
sridharkalaibala Sep 30, 2026
9f01a35
Record transfer seating revision verification
sridharkalaibala Sep 30, 2026
d9d99ce
Record order and connection flow verification
sridharkalaibala Sep 30, 2026
9203287
Record transfer source reservation verification
sridharkalaibala Sep 30, 2026
9735243
Record destination transfer recovery verification
sridharkalaibala Sep 30, 2026
b28898a
Record transfer sale amount consistency verification
sridharkalaibala Sep 30, 2026
ea33d14
Record scoped transfer numbering verification
sridharkalaibala Sep 30, 2026
ba8d344
Record destination identity recovery checks
sridharkalaibala Sep 30, 2026
e883846
Record two-sale transfer projection recovery
sridharkalaibala Sep 30, 2026
6f90a88
Record transfer printer queue verification
sridharkalaibala Sep 30, 2026
02fab08
Record shared-table transfer release verification
sridharkalaibala Sep 30, 2026
6c86675
Record transfer finalization and cleanup recovery
sridharkalaibala Sep 30, 2026
873cda2
Record allocation-safe transferred metadata edits
sridharkalaibala Sep 30, 2026
f8b72b6
Record verified transferred quantity reduction handling
sridharkalaibala Sep 30, 2026
055321e
Record verified new preparations on transferred bills
sridharkalaibala Sep 30, 2026
4362df5
Record verified transfer numbering recovery
sridharkalaibala Sep 30, 2026
4762e33
Record verified transferred portion increases
sridharkalaibala Sep 30, 2026
c98634a
Record discount planner checks and legacy format blocker
sridharkalaibala Sep 30, 2026
fc2a24b
Record discount lineage validation
sridharkalaibala Sep 30, 2026
d36df0c
Record verified legacy discount normalization
sridharkalaibala Sep 30, 2026
304beb3
Record verified transferred bill discount editing
sridharkalaibala Sep 30, 2026
3672cd6
Preserve bill discounts during Captain item edits
sridharkalaibala Sep 30, 2026
86496a2
Add a reversible discount step to Captain order editing
sridharkalaibala Sep 30, 2026
6b8690a
Preview allocated discounts and preserve stored price precision
sridharkalaibala Sep 30, 2026
d6afcae
Record combined edit and read-only pricing preview checks
sridharkalaibala Sep 30, 2026
96c5918
Record scoped pricing preview and concurrency verification
sridharkalaibala Sep 30, 2026
99d1818
Record authenticated preview endpoint verification
sridharkalaibala Sep 30, 2026
645f4b4
Record paired-device screen access verification
sridharkalaibala Sep 30, 2026
78ea515
Show server-confirmed order edit totals with read recovery
sridharkalaibala Sep 30, 2026
3522a7c
Verify pricing timeout recovery and approval separation
sridharkalaibala Sep 30, 2026
8581285
Record full editor regression and transfer recovery status
sridharkalaibala Sep 30, 2026
044b3ae
Record paired transfer completion API verification
sridharkalaibala Sep 30, 2026
d581c17
Retain item transfer requests through uncertain responses
sridharkalaibala Sep 30, 2026
01d7806
Validate transfer selections by preparation and served quantity
sridharkalaibala Sep 30, 2026
e950100
Implement item transfer selection destination and review screens
sridharkalaibala Sep 30, 2026
e691f37
Clarify transfer destination and both table totals
sridharkalaibala Sep 30, 2026
6d795f0
Handle transfer Back navigation and cancelled recovery
sridharkalaibala Sep 30, 2026
e710fd0
Keep browser Back within transfer steps
sridharkalaibala Sep 30, 2026
c4d2fbe
Record cross-currency transfer bill acceptance
sridharkalaibala Sep 30, 2026
a98743b
Record transfer settlement and closed-check recovery checks
sridharkalaibala Sep 30, 2026
f898ddb
Record desktop transfer bill precision acceptance
sridharkalaibala Sep 30, 2026
0f5de51
Record validated desktop receipt data and remaining renderer work
sridharkalaibala Oct 1, 2026
1315ae5
Record transferred receipt renderer acceptance and remaining checks
sridharkalaibala Oct 1, 2026
4f29d33
Record expanded transferred receipt and GST verification
sridharkalaibala Oct 1, 2026
ce974b0
Record transfer payment summary acceptance
sridharkalaibala Oct 1, 2026
6143cfe
Record paid Captain transaction report verification
sridharkalaibala Oct 1, 2026
807b04f
Record full editor and desktop transaction regression results
sridharkalaibala Oct 1, 2026
199968b
Keep new portions separate on transferred orders
sridharkalaibala Oct 1, 2026
e768313
Keep new preparation notes isolated and clear legacy aliases
sridharkalaibala Oct 1, 2026
c29cde6
Undo new menu portions before changing existing preparations
sridharkalaibala Oct 1, 2026
3ab02aa
Discard transfer screens after session identity changes
sridharkalaibala Oct 1, 2026
1d6bd8f
Ignore late menu price answers after leaving an order
sridharkalaibala Oct 1, 2026
aece0cb
Ignore stale menu loads and preserve in-progress searches
sridharkalaibala Oct 1, 2026
48a3e61
Verify full order editor and record shared-capacity progress
sridharkalaibala Oct 1, 2026
2fb4a0b
Cancel server address verification when leaving setup
sridharkalaibala Oct 1, 2026
18b8601
Preserve saved routes when secure address storage fails
sridharkalaibala Oct 1, 2026
b0ecbdd
Record verified Android packaging of current implementation
sridharkalaibala Oct 1, 2026
5f4e09a
Record locally verified POS integration installer
sridharkalaibala Oct 1, 2026
91041d2
Record legacy table move validation and installer rebuild requirement
sridharkalaibala Oct 1, 2026
1355402
Record completed legacy transfer table cleanup
sridharkalaibala Oct 1, 2026
48ed003
Record activity report precision verification
sridharkalaibala Oct 1, 2026
bb50507
Record staff activity currency verification
sridharkalaibala Oct 1, 2026
a22558d
Record full POS regression and translation verification
sridharkalaibala Oct 1, 2026
8b8386e
Separate Wi-Fi server choice from staff sign-in
sridharkalaibala Oct 1, 2026
866f010
Record activity currency label verification
sridharkalaibala Oct 1, 2026
eadee73
Restore remembered usernames and password-manager sign-in form
sridharkalaibala Oct 1, 2026
058b235
Record refreshed internal Android and POS packages
sridharkalaibala Oct 1, 2026
87cd839
Record activity CSV currency verification
sridharkalaibala Oct 1, 2026
04816d7
Record paid neighbour seating verification
sridharkalaibala Oct 1, 2026
5dcde4d
Record complete customer activity verification
sridharkalaibala Oct 1, 2026
9924010
Record cancelled item activity verification
sridharkalaibala Oct 1, 2026
730821c
Record item and category currency verification
sridharkalaibala Oct 1, 2026
14c9bf3
Reconcile transfer coverage and record full POS regression
sridharkalaibala Oct 1, 2026
9eb734b
Keep Node unit suites out of browser test discovery
sridharkalaibala Oct 1, 2026
60b59f7
Exercise menu picker with a real order editing context
sridharkalaibala Oct 1, 2026
8302035
Record verified local POS 1.9.0 integration installer
sridharkalaibala Oct 1, 2026
e856a64
Verify server selection through the current connection card
sridharkalaibala Oct 1, 2026
091451b
Record shared seating transition verification
sridharkalaibala Oct 1, 2026
0fcec24
Restore saved voice draft after recording segment failures
sridharkalaibala Oct 1, 2026
f5024cb
Publish voice previews only after the draft is saved
sridharkalaibala Oct 1, 2026
94280dd
Record completed browser remainder and payment race verification
sridharkalaibala Oct 1, 2026
65a0837
Record desktop settlement conflict verification
sridharkalaibala Oct 1, 2026
a9c9738
Record legacy payment default compatibility check
sridharkalaibala Oct 1, 2026
a049d96
Record verified legacy capacity edit protocol and remaining rollout r…
sridharkalaibala Oct 1, 2026
be23af8
Record parked order capacity verification and dispatcher rollout gap
sridharkalaibala Oct 1, 2026
3c54bf1
Record production seating dispatch activation and verification
sridharkalaibala Oct 1, 2026
581955d
Record full integrated API pass and start final browser acceptance
sridharkalaibala Oct 1, 2026
aa5300d
Record POS integration PR, local installer and clean formatting gates
sridharkalaibala Oct 1, 2026
e6b81c2
Record verified POS integration merge into develop
sridharkalaibala Oct 1, 2026
cf00039
Track installer rebuild from merged POS integration
sridharkalaibala Oct 1, 2026
eeebfad
Record merged POS installer and signed Captain native build verification
sridharkalaibala Oct 1, 2026
82aaf14
Record preparation navigation recheck during full browser acceptance
sridharkalaibala Oct 1, 2026
3de97ef
Record missing gesture guide found in mockup comparison
sridharkalaibala Oct 1, 2026
1071692
Add translated Help gesture guide with accessible Back navigation
sridharkalaibala Oct 1, 2026
23b0210
Include offline gesture guide translations in language bundle
sridharkalaibala Oct 1, 2026
8b820aa
Record remaining printer routing visibility and offline language checks
sridharkalaibala Oct 1, 2026
adfaed2
Explain desktop printer routing in Captain preferences
sridharkalaibala Oct 1, 2026
574dfc9
Reconcile implementation coverage references with merged POS source
sridharkalaibala Oct 1, 2026
6359086
Verify automatic queued order delivery after reconnection
sridharkalaibala Oct 1, 2026
5341787
test: await completed order editor close lifecycle
sridharkalaibala Oct 1, 2026
95db683
test: finish editor navigation before opening transfer
sridharkalaibala Oct 1, 2026
c915cf8
fix: enable pending orders Back during page loading
sridharkalaibala Oct 1, 2026
ee56670
docs: record passing Tamil journey verification
sridharkalaibala Oct 1, 2026
512533c
Prepare Captain 1.3.30 after local acceptance
sridharkalaibala Oct 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 19 additions & 74 deletions access-denied.html
Original file line number Diff line number Diff line change
@@ -1,80 +1,25 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<title>Access Denied</title>
<style>
body {
margin: 0;
padding: 0;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
background-color: #f8f9fa;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
text-align: center;
}

.container {
padding: 2rem;
background-color: #fff;
border-radius: 16px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
max-width: 90%;
}

.container h1 {
font-size: 2rem;
color: #dc3545;
margin-bottom: 1rem;
}

.container p {
font-size: 1rem;
color: #555;
margin-bottom: 2rem;
}

.btn {
display: inline-block;
padding: 0.75rem 1.5rem;
font-size: 1rem;
color: white;
background-color: #007bff;
border: none;
border-radius: 8px;
text-decoration: none;
}

.btn:hover {
background-color: #0056b3;
}

@media (max-width: 480px) {
.container h1 {
font-size: 1.5rem;
}

.container p {
font-size: 0.9rem;
}
}
</style>
<link href="assets/common/ui-theme.css" rel="stylesheet">
<script src="assets/common/i18n.js"></script>
<script src="assets/common/languages.js"></script>
<link rel="stylesheet" href="assets/common/i18n.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>Access Denied</title>
<link rel="stylesheet" href="assets/common/design.css">
<link rel="stylesheet" href="assets/common/ui-theme.css">
<link rel="stylesheet" href="assets/common/i18n.css">
<link rel="stylesheet" href="assets/common/app-design.css">
<link rel="stylesheet" href="assets/common/access-denied.css">
<script src="assets/common/i18n.js"></script>
<script src="assets/common/languages.js"></script>
<script src="assets/common/access-denied.js" defer></script>
</head>

<body>
<div class="container">
<h1>Access Denied</h1>
<p>You are not authorized to view this page.</p>
<a href="index.html" class="btn">Go to Home</a>
</div>
<body class="permission-screen">
<header><button type="button" data-permission-back aria-label="Back"><span class="permission-back-arrow" aria-hidden="true">←</span><span>Back</span></button></header>
<main>
<div class="permission-icon" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7"><rect x="5" y="10" width="14" height="11" rx="3"/><path d="M8 10V7a4 4 0 0 1 8 0v3M12 14v3"/></svg></div>
<h1>Permission is required.</h1>
<p>You are not authorized to view this page.</p>
<div class="permission-actions"><button type="button" data-permission-back>Back</button><a href="kot-management.html">Go to Home</a></div>
</main>
</body>

</html>
3 changes: 3 additions & 0 deletions assets/cart/notes-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ $(document).ready(function () {
// Set product name and existing notes
$("#cart-notes-product-name").text(productName);
$("#cart-notes-text").val(currentNotes);
buildNoteChips("#cart-notes-chips");
markChips("#cart-notes-text");
window.I18N?.apply(document.getElementById("cart-notes-modal"));

// Show modal
$("#cart-notes-modal").css("display", "flex");
Expand Down
14 changes: 14 additions & 0 deletions assets/common/access-denied.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.permission-screen{min-height:100dvh;box-sizing:border-box;padding:env(safe-area-inset-top,0px) 20px max(24px,env(safe-area-inset-bottom));display:flex;flex-direction:column}
.permission-screen header{width:min(960px,100%);margin:0 auto;padding:12px 0}
.permission-screen button,.permission-screen a{display:inline-flex;gap:8px;align-items:center;justify-content:center;min-height:48px;padding:12px 20px;box-sizing:border-box;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:12px;font:inherit;font-weight:600;text-decoration:none}
.permission-screen header button{border:0;padding-inline:0}
.permission-screen main{width:min(460px,100%);margin:auto;box-sizing:border-box;padding:32px 0;text-align:center}
.permission-screen h1{font-size:26px;line-height:1.3;margin:20px 0 12px;overflow-wrap:anywhere}
.permission-screen p{color:var(--ink-soft);line-height:1.6;margin:0 0 28px}
.permission-icon{display:grid;place-items:center;width:64px;height:64px;border-radius:20px;margin:auto;color:var(--ink-soft);background:var(--surface-sunk)}
.permission-icon svg{width:30px;height:30px}
.permission-actions{display:flex;gap:12px;flex-wrap:wrap}
.permission-actions>*{flex:1 1 130px}
.permission-actions a{background:var(--accent);border-color:var(--accent);color:var(--accent-ink,#fff)}

[dir=rtl] .permission-back-arrow{transform:rotate(180deg)}
16 changes: 16 additions & 0 deletions assets/common/access-denied.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(function () {
'use strict';
function back() {
// Never return to the rejected receipt page or trust a cross-origin referrer.
let destination = 'kot-management.html';
try {
const previous = new URL(document.referrer);
const allowed = ['kot-management.html', 'products.html', 'cart.html', 'order-history.html', 'me.html', 'my-sales.html', 'pending.html'];
if (previous.origin === location.origin && allowed.includes(previous.pathname.split('/').pop()))
destination = previous.href;
} catch {}
location.href = destination;
}
document.querySelectorAll('[data-permission-back]').forEach(button => button.addEventListener('click', back));
window.addEventListener('captain:back', event => { event.preventDefault(); back(); });
})();
55 changes: 37 additions & 18 deletions assets/common/access.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,13 @@
return null;
}
};
async function prove(base, credential = state, remember = true) {
async function prove(base, credential = state, remember = true, signal) {
const nonce = random();
const answer = await post(
base,
"/captain/v1/route-proof",
{ sessionId: credential.sessionId, nonce },
null,
signal,
2000,
);
const key = await cryptoApi.subtle.importKey(
Expand Down Expand Up @@ -552,6 +552,13 @@
get user() {
return state.user || profile?.user || null;
},
async updateProfile(value) {
await ready;
if (locked || !state.user || String(value.id) !== String(state.user.id || state.user._id)) return false;
state.user = { ...state.user, name: value.name };
await persist();
return true;
},
get shopKey() {
return state.shopKey || profile?.shopKey || null;
},
Expand Down Expand Up @@ -630,30 +637,42 @@
return [state, ...(state.connections || [])].some(credential =>
credential.routeKey && [credential.base, ...(credential.routes || [])].some(base => local(base)));
},
async addAddress(base) {
await session.whenReady();
async addAddress(base, signal) {
const started = generation;
await session.whenReady();
if (signal?.aborted || generation !== started) throw new Error("Connection cancelled.");
const clean = safeRoute(base);
if (!clean || locked) throw new Error("Unlock this phone first.");
for (const credential of [state, ...(state.connections || [])]) {
if (generation !== started) throw new Error("Connection cancelled.");
if (signal?.aborted || generation !== started) throw new Error("Connection cancelled.");
if (!credential.routeKey) continue;
try {
await prove(clean, credential, false);
if (generation !== started) throw new Error("Connection cancelled.");
verified.add(clean);
credential.routes = [
...new Set([...(credential.routes || []), clean]),
];
await persist();
if (generation !== started) throw new Error("Connection cancelled.");
host.POSNIC?.server.remember({
[local(clean) ? "lan" : "cloud"]: clean,
});
return;
await prove(clean, credential, false, signal);
} catch {
/* A candidate must prove the existing session before use. */
if (signal?.aborted || generation !== started) throw new Error("Connection cancelled.");
// Only proof failures can try another credential. A secure-storage
// failure must not be presented as the wrong shop or as success.
continue;
}
if (signal?.aborted || generation !== started) throw new Error("Connection cancelled.");
const previousRoutes = credential.routes;
const nextRoutes = [...new Set([...(previousRoutes || []), clean])];
credential.routes = nextRoutes;
try {
await persist();
} catch (error) {
if (generation === started && credential.routes === nextRoutes) {
if (previousRoutes === undefined) delete credential.routes;
else credential.routes = previousRoutes;
}
throw error;
}
if (signal?.aborted || generation !== started) throw new Error("Connection cancelled.");
verified.add(clean);
host.POSNIC?.server.remember({
[local(clean) ? "lan" : "cloud"]: clean,
});
return;
}
throw new Error(
"This address is not the server that approved this phone.",
Expand Down
77 changes: 68 additions & 9 deletions assets/common/account.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,56 @@
(function () {
let changing = false;
const t = (text) => window.I18N?.t(text) || text;
function confirmChange(hasCart) {
return new Promise((resolve) => {
const previous = document.activeElement;
const dialog = document.createElement("dialog");
dialog.id = "account-signout";
dialog.setAttribute("aria-labelledby", "account-signout-title");
const title = document.createElement("h2");
title.id = "account-signout-title";
title.textContent = t("Sign out");
const who = document.createElement("p");
who.translate = false;
who.textContent =
POSNIC.session.user?.name || POSNIC.session.user?.email || "";
const info = document.createElement("p");
info.textContent = t(
hasCart
? "Discard changes?"
: "Signing out clears this phone's menu, tables and cart, and asks for the shop password next time.",
);
const actions = document.createElement("footer");
const cancel = document.createElement("button");
cancel.type = "button";
cancel.textContent = t("Cancel");
const confirm = document.createElement("button");
confirm.type = "button";
confirm.dataset.confirmSignout = "";
confirm.textContent = t("Sign out");
const finish = (value) => {
window.removeEventListener("captain:back", back, true);
dialog.close();
dialog.remove();
previous?.focus();
resolve(value);
};
const back = (event) => {
event.preventDefault();
event.stopImmediatePropagation();
finish(false);
};
cancel.onclick = () => finish(false);
confirm.onclick = () => finish(true);
dialog.addEventListener("cancel", back);
window.addEventListener("captain:back", back, true);
actions.append(cancel, confirm);
dialog.append(title, who, info, actions);
document.body.append(dialog);
dialog.showModal();
cancel.focus();
});
}
async function change(mode = "staff") {
if (changing) return;
const say = (text) =>
Expand All @@ -12,17 +63,25 @@
);
return;
}
const cart =
typeof getData === "function"
? await getData("cart").catch(() => [])
: [];
if (
cart.length &&
!confirm(window.I18N ? I18N.t("Discard changes?") : "Discard changes?")
)
return;
changing = true;
const owner = JSON.stringify([
POSNIC.session.shopKey,
POSNIC.session.user?.id,
]);
try {
const cart = typeof getData === "function" ? await getData("cart") : [];
if (!(await confirmChange(cart.length > 0))) return;
if (
JSON.stringify([POSNIC.session.shopKey, POSNIC.session.user?.id]) !==
owner
)
return;
if (window.OrderQueue?.all().length) {
say(
"Send saved orders before switching accounts. Connection settings remain available.",
);
return;
}
await POSNIC.session.end();
localStorage.removeItem("user_id");
sessionStorage.removeItem("posnic_editing_server");
Expand Down
Loading
Loading