fix(admin): resolve notification and cash-close 500s

This commit is contained in:
Deploy
2026-08-25 22:16:08 +02:00
parent ed031f8a94
commit ae42bae61e
13 changed files with 22 additions and 23 deletions

View File

@@ -1 +1 @@
0.2.0
0.2.1

View File

@@ -1,12 +1,12 @@
{
"name": "@mercadodevida/admin",
"version": "0.2.0",
"version": "0.2.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@mercadodevida/admin",
"version": "0.2.0",
"version": "0.2.1",
"dependencies": {
"@lexical/history": "^0.49.0",
"@lexical/html": "^0.49.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@mercadodevida/admin",
"version": "0.2.0",
"version": "0.2.1",
"private": true,
"scripts": {
"dev": "next dev --port 3001",

View File

@@ -1,12 +1,12 @@
{
"name": "mercadodevida-pos",
"version": "0.2.0",
"version": "0.2.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "mercadodevida-pos",
"version": "0.2.0",
"version": "0.2.1",
"dependencies": {
"next": "^16.3.1",
"react": "^19.2.8",

View File

@@ -1,6 +1,6 @@
{
"name": "mercadodevida-pos",
"version": "0.2.0",
"version": "0.2.1",
"private": true,
"scripts": {
"dev": "next dev --port 3002",

View File

@@ -1,12 +1,12 @@
{
"name": "frontend",
"version": "0.2.0",
"version": "0.2.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "frontend",
"version": "0.2.0",
"version": "0.2.1",
"dependencies": {
"next": "16.3.1",
"react": "19.2.8",

View File

@@ -1,6 +1,6 @@
{
"name": "frontend",
"version": "0.2.0",
"version": "0.2.1",
"private": true,
"scripts": {
"dev": "next dev",

View File

@@ -1,12 +1,12 @@
{
"name": "mercadodevida-backend",
"version": "0.2.0",
"version": "0.2.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "mercadodevida-backend",
"version": "0.2.0",
"version": "0.2.1",
"dependencies": {
"@fastify/cookie": "^11.1.2",
"@fastify/cors": "^11.3.0",

View File

@@ -1,6 +1,6 @@
{
"name": "mercadodevida-backend",
"version": "0.2.0",
"version": "0.2.1",
"private": true,
"type": "module",
"description": "mercadodevida vNext backend - modular monolith skeleton",

View File

@@ -547,7 +547,6 @@ export async function registerOrdersRoutes(
FROM orders_orders o
LEFT JOIN identity_users u ON u.id = o.user_id
WHERE o.state = 'AWAITING_PAYMENT'
AND o.deleted_at IS NULL
ORDER BY o.created_at ASC
LIMIT 20`,
);

View File

@@ -698,15 +698,15 @@ export async function registerPosRoutes(app: FastifyInstance, deps: PosRouteDeps
[id],
),
pool.query<{ method_code: string; method_name: string; total: string; count: string }>(
`SELECT pm.code AS method_code, pm.name AS method_name,
`SELECT pm.code AS method_code, pm.label AS method_name,
COALESCE(SUM(pt.amount_cents), 0)::bigint AS total,
COUNT(*)::int AS count
FROM payments_transactions pt
JOIN orders_orders o ON o.id = pt.order_id
LEFT JOIN pos_payment_methods pm ON pm.id = pt.provider_event_id
LEFT JOIN pos_payment_methods pm ON pm.id::text = pt.provider_event_id
AND pm.store_id = o.store_id
WHERE o.cash_session_id = $1 AND o.source = 'pos' AND pt.status = 'succeeded'
GROUP BY pm.code, pm.name`,
GROUP BY pm.code, pm.label`,
[id],
),
pool.query<{ items_count: string; unique_products: string }>(
@@ -770,15 +770,15 @@ export async function registerPosRoutes(app: FastifyInstance, deps: PosRouteDeps
[id],
),
pool.query<{ method_code: string; method_name: string; total: string; count: string }>(
`SELECT pm.code AS method_code, pm.name AS method_name,
`SELECT pm.code AS method_code, pm.label AS method_name,
COALESCE(SUM(pt.amount_cents), 0)::bigint AS total,
COUNT(*)::int AS count
FROM payments_transactions pt
JOIN orders_orders o ON o.id = pt.order_id
LEFT JOIN pos_payment_methods pm ON pm.id = pt.provider_event_id
LEFT JOIN pos_payment_methods pm ON pm.id::text = pt.provider_event_id
AND pm.store_id = o.store_id
WHERE o.cash_session_id = $1 AND o.source = 'pos' AND pt.status = 'succeeded'
GROUP BY pm.code, pm.name`,
GROUP BY pm.code, pm.label`,
[id],
),
pool.query<{ items_count: string; unique_products: string }>(

View File

@@ -1,12 +1,12 @@
{
"name": "mercadodevida-storefront",
"version": "0.2.0",
"version": "0.2.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "mercadodevida-storefront",
"version": "0.2.0",
"version": "0.2.1",
"dependencies": {
"@tailwindcss/postcss": "^4.1.17",
"next": "^16.0.5",

View File

@@ -1,6 +1,6 @@
{
"name": "mercadodevida-storefront",
"version": "0.2.0",
"version": "0.2.1",
"private": true,
"type": "module",
"description": "mercadodevida customer storefront shell",