Replace the mock test-payment button with a real manual Swish flow where the user sends a Swish payment with the order ID as message and confirms via a button. Admin verifies Swish and processes manually. Backend - Rename OrderStatus LOOKUP_STARTED to PROCESSING (Swedish: Hanteras) - Update V5 migration CHECK constraint from lookup_started to processing - Rename OrderService.markAsPaid() to confirmPayment(), sets PROCESSING instead of PAID, stop hardcoding amountPaid - Add GET /api/payment/swish-info endpoint returning swish number and letter price from app.payment config - Permit /api/payment/swish-info without authentication - Update UpdateStatusRequest regex to accept processing - Update PaymentControllerTest for renamed method, new status, and public swish-info endpoint test Frontend - Rewrite PaymentRedirect.vue: Swish number, order ID as message, Jag har betalat button with confirmation dialog - Add fetchSwishInfo() to api/payment.ts - AdminPage: rename Skickade stat to Att göra (processing orders), highlight processing rows with admin__row--todo - OrdersPage: update status labels/badge classes for new flow - Refactor ApiError in client.ts to property declaration syntax - Exclude __tests__ from tsconfig.app.json and Docker builds Tests - Rewrite PaymentRedirect.spec.ts for Swish info, confirmation dialog, cancel flow, and processing status - Update OrdersPage.spec.ts with processing status test - Update AdminDashboard.spec.ts with Att göra stat and row highlight - Add amountPaid to ComposePage.spec.ts mock Config - Add SWISH_NUMBER to .env.example and docker-compose.yml
63 lines
1.6 KiB
YAML
63 lines
1.6 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16
|
|
container_name: bilhej-postgres
|
|
ports:
|
|
- "5432:5432"
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
backend:
|
|
build:
|
|
dockerfile: docker/backend.Dockerfile
|
|
context: .
|
|
container_name: bilhej-backend
|
|
ports:
|
|
- "8080:8080"
|
|
environment:
|
|
SPRING_PROFILES_ACTIVE: docker
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
JWT_SECRET: ${JWT_SECRET}
|
|
SWISH_NUMBER: ${SWISH_NUMBER}
|
|
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY}
|
|
STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET}
|
|
STRIPE_PRICE_ID: ${STRIPE_PRICE_ID}
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
volumes:
|
|
- .:/app
|
|
- backend-gradle-project:/app/.gradle
|
|
- backend-build:/app/backend/build
|
|
- gradle-cache:/root/.gradle
|
|
|
|
frontend:
|
|
build:
|
|
dockerfile: docker/frontend.Dockerfile
|
|
context: .
|
|
container_name: bilhej-frontend
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
- backend
|
|
volumes:
|
|
- ./frontend/src:/app/src
|
|
- ./frontend/public:/app/public
|
|
- ./frontend/index.html:/app/index.html
|
|
|
|
volumes:
|
|
pgdata:
|
|
gradle-cache:
|
|
backend-gradle-project:
|
|
backend-build:
|