feat: /objednani – skupinové objednávky s QR platbou #55

Merged
mates merged 2 commits from feat/vecerexd into master 2026-05-07 11:15:09 +02:00
4 changed files with 148065 additions and 12 deletions
Showing only changes of commit d8714b2086 - Show all commits
+148049
View File
File diff suppressed because one or more lines are too long
+5
View File
@@ -0,0 +1,5 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
yarn-path ".yarn/releases/yarn-1.22.22.cjs"
@@ -56,18 +56,16 @@ export default function EditGroupFeesModal({ isOpen, onClose, group, onSaved }:
setError(null); setError(null);
setLoading(true); setLoading(true);
try { try {
const body: Record<string, any> = { id: group.id }; const res = await updateGroupFees({
body.fees = feesNum; body: {
body.shipping = shippingNum; id: group.id,
body.tip = tipNum; fees: feesNum,
if (discountNum > 0) { shipping: shippingNum,
body.discountType = discountType; tip: tipNum,
body.discountValue = discountNum; discountType: discountNum > 0 ? discountType : undefined,
} else { discountValue: discountNum > 0 ? discountNum : undefined,
body.discountType = ''; },
body.discountValue = 0; });
}
const res = await updateGroupFees({ body });
if (res.error) { if (res.error) {
setError((res.error as any).error || 'Nastala chyba'); setError((res.error as any).error || 'Nastala chyba');
} else { } else {
+1
View File
@@ -32,5 +32,6 @@ export const getWebsocket = () => io;
/** Pošle event konkrétnímu přihlášenému uživateli (pokud je připojen). */ /** Pošle event konkrétnímu přihlášenému uživateli (pokud je připojen). */
export const emitToUser = (login: string, event: string, data: unknown) => { export const emitToUser = (login: string, event: string, data: unknown) => {
if (!io) return;
io.to(`user:${login}`).emit(event, data); io.to(`user:${login}`).emit(event, data);
} }