feat: vylepšení funkce objednávání
CI / Generate TypeScript types (push) Successful in 1m24s
CI / Build server (push) Successful in 26s
CI / Build client (push) Successful in 41s
CI / Server unit tests (push) Successful in 3m25s
CI / Playwright E2E tests (push) Has been cancelled
CI / Build and push Docker image (push) Has been cancelled
CI / Notify (push) Has been cancelled

This commit is contained in:
2026-05-10 08:24:01 +02:00
parent 03f4e438a3
commit 3ba5fdd086
8 changed files with 88 additions and 28 deletions
+2 -4
View File
@@ -56,10 +56,8 @@ function createStorageKey(customerName: string, id: string): string {
* @param id unikátní identifikátor (UUID) tohoto QR kódu
*/
export async function generateQr(customerName: string, bankAccountNumber: string, bankAccountHolder: string, amount: number, message: string, id: string): Promise<void> {
// Zpráva pro příjemce nesmí dle standardu obsahovat '*' a být delší než 60 znaků
if (message.indexOf('*') >= 0) {
message = message.replace(/\*/g, '');
}
// Zpráva nesmí obsahovat '*' a znaky mimo ISO 8859-1; délka max. 60 znaků
message = message.replace(/[^\x00-\xff]/g, '').replace(/\*/g, '');
if (message.length > 60) {
message = message.substring(0, 60);
}