aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/pos.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-21 08:46:46 -0700
committerAdam Soltys <[email protected]>2026-09-21 08:46:46 -0700
commit9a03fafbb0a49c87fd9e6269f7db020caf62e0c6 (patch)
treedb772c88c412e66ad999299c297f59df4137dcc8 /src/features/pos.js
parente32e34ee218013616257882d701dedc98d7a5edc (diff)
downloadcoinosv3-9a03fafbb0a49c87fd9e6269f7db020caf62e0c6.tar.gz
coinosv3-9a03fafbb0a49c87fd9e6269f7db020caf62e0c6.zip
Point of sale: the tip screen shows an invoice error, and both screens say when the invoice is being made.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to 'src/features/pos.js')
-rw-r--r--src/features/pos.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/features/pos.js b/src/features/pos.js
index c7e5882..e6a2abf 100644
--- a/src/features/pos.js
+++ b/src/features/pos.js
@@ -85,7 +85,8 @@ export function posFeature(ctx) {
p.sale = sale; p.step = 'invoice';
hook('arkLnWatch', inv.id, (a) => settle(sale, a));
} catch (e) {
- p.error = e.message || String(e);
+ console.warn('pos: invoice failed', e);
+ p.error = (e && e.message) || String(e);
}
p.busy = false; render();
}
@@ -137,7 +138,8 @@ export function posFeature(ctx) {
getUnit() !== 'fiat' && billSat() && fiatLine(billSat()) ? h('div', { class: 'small muted', style: 'text-align:right' }, fiatLine(billSat())) : null,
h('input', { type: 'text', placeholder: t('posNoteHint'), value: p.note, maxlength: '80', onInput: (e) => { p.note = e.target.value; } }),
p.error ? h('div', { class: 'notice error small' }, p.error) : null,
- h('button', { class: 'btn-primary btn-block', disabled: !!p.busy, onClick: charge }, p.busy ? h('span', { class: 'spinner sm' }) : t('posCharge'))),
+ h('button', { class: 'btn-primary btn-block', disabled: !!p.busy, onClick: charge }, p.busy ? h('span', { class: 'spinner sm' }) : t('posCharge')),
+ p.busy ? h('div', { class: 'small muted', style: 'text-align:center' }, t('posMakingInvoice')) : null),
tipSettingsCard(s),
salesCard(s),
back());
@@ -202,9 +204,11 @@ export function posFeature(ctx) {
h('input', { type: 'text', inputmode: 'decimal', placeholder: '0', value: p.tipCustom, autofocus: true, onInput: (e) => { p.tipCustom = e.target.value; render(); } }),
h('span', { class: 'small muted', style: 'align-self:center;padding:0 8px' }, unitLabel())) : null,
p.tipMode != null ? h('div', { class: 'small muted' }, t('posTotalLine', { n: fmtAmount(bill + tip) + ' ' + unitLabel() })) : null,
+ p.error ? h('div', { class: 'notice error small', style: 'width:100%' }, p.error) : null,
h('button', { class: 'btn-primary btn-block', disabled: p.tipMode == null || !!p.busy,
onClick: () => makeSale(bill, tip, p.tipMode === 'custom' || p.tipMode === 'none' ? 0 : p.tipMode) },
- p.busy ? h('span', { class: 'spinner sm' }) : t('posContinue'))),
+ p.busy ? h('span', { class: 'spinner sm' }) : t('posContinue')),
+ p.busy ? h('div', { class: 'small muted' }, t('posMakingInvoice')) : null),
h('button', { class: 'btn-ghost btn-block', onClick: () => { p.step = 'amount'; render(); } }, t('back')));
}
function invoiceScreen(p) {