Commit graph

26 commits

Author SHA1 Message Date
e8bfcf26f3
feat(pdf): improve invoice PDF layout and style
Some checks failed
CI / checks (push) Has been cancelled
Redesigned the invoice PDF with a more modern, modular layout. Updated
colors, spacing, and section organization for better readability and
visual appeal. Added a summary block, improved table formatting, and
refined header/footer presentation. Also updated dependencies in go.mod
and go.sum to support new features.
2026-03-27 14:48:41 +01:00
24f289b767
feat(pdf): redesign invoice PDF layout and structure
Refactored the invoice PDF generation to use a modular, visually
improved
layout. Extracted header, details, items, payments, summary, and notes
sections into dedicated functions for clarity and maintainability.
Introduced color constants and improved table formatting for better
readability. Updated labels and formatting to enhance the overall
appearance and user experience of generated invoices.
2026-03-27 14:35:52 +01:00
0f327c814a
fix: normalize minio endpoints
Some checks failed
CI / checks (push) Has been cancelled
2026-03-21 10:19:33 +01:00
9b2510460a
feat: store invoice PDFs in minio
Some checks are pending
CI / checks (push) Waiting to run
2026-03-20 23:58:57 +01:00
df1cd66cf1
chore: wire APP_OPENAI_MODEL and upgrade Go/deps 2026-02-18 18:32:01 +01:00
508de01116
feat(stripe): add booking_id metadata to payment links
Some checks failed
CI / checks (push) Has been cancelled
Refactored payment link creation to ensure booking_id is set in both the
PaymentLink and PaymentIntent metadata. Extracted parameter building
logic
into a helper for improved testability. Added a unit test to verify
metadata propagation.
2025-11-10 20:23:33 +01:00
91a9a74750
feat(stripe): add payment link creation for bookings
Some checks are pending
CI / checks (push) Waiting to run
Introduce backend and frontend support for generating Stripe payment
links
for outstanding booking balances. Adds a new POST endpoint to create
payment
links, updates booking view to include a Stripe button, and integrates
error handling and feedback for payment link creation. Refactors view
models and templates to support the new feature.
2025-11-01 17:22:13 +01:00
5cfe9b4169
refactor(stripe): remove support for Stripe Connect account
Eliminated all references to the Stripe Connect account configuration
and
option handling. This includes removing the related environment
variable,
config struct field, client option, and usage in Stripe client setup.
Stripe integration now only uses the main secret key and webhook secret.
2025-10-30 17:03:55 +01:00
aa9f46a222
feat/stripe integration (#48) 2025-10-19 15:48:59 +02:00
5d42a5aefe
refactor: simplify main entry and improve logging
Refactors main.go to streamline context and logger initialization.
Moves signal handling directly into main, sets up a base logger for
early errors, and updates error handling to use structured logging.
No functional changes to application logic.
2025-10-03 20:09:27 +02:00
ac94faedb0
refactor: unify ID and API key naming conventions
This commit standardizes the naming of identifier and API key fields
across the codebase to use consistent camel case (e.g., `ID`, `APIKey`,
`DatabaseURL`). This includes updates to struct fields, method names,
function parameters, and environment variable references. The changes
improve code clarity and maintainability by reducing ambiguity and
aligning with Go naming conventions. No functional behavior is changed.
2025-10-03 19:47:41 +02:00
40d2338c0f
feat(logging): add slog-based structured logging
Introduce slog-based structured logging throughout the booking service
and
server handlers. Add configurable log level via LOG_LEVEL environment
variable. Replace legacy log usage with slog and propagate logger to
booking service for improved observability.
2025-09-12 12:17:22 -04:00
f836822ff0
upgrade dependencies and remove dead code 2025-05-04 23:48:12 +02:00
9e2cef07e1
feat(parser): refactor BookingAgentParser to use OpenAI client and add parsing tests
- Update BookingAgentParser to utilize OpenAI's client for parsing booking data.
- Remove base URL dependency and streamline the initialization process.
- Introduce ResponseData struct to define expected JSON structure from the LLM.
- Add unit tests for BookingAgentParser to validate parsing logic and expected output.
2025-05-04 23:18:42 +02:00
9a6b6ef0c3
fix cronjob (#45)
fixes #32
2025-02-23 22:38:32 +01:00
44cf04bac7
update report template (#43) 2025-02-22 12:28:56 +01:00
b0198f7f9a
translate platform and payment method in invoices (#42) 2025-02-22 09:24:34 +01:00
bddc4bb0fc
embed html template (#40)
### TL;DR

Implemented embedded file system for static assets using Go's `embed` package.

### What changed?

- Created a new `assets.go` file to define an embedded filesystem for static assets
- Moved all static assets (HTML, icons, images, JS) under a nested `assets` directory
- Updated PDF generation to use the embedded filesystem when parsing HTML templates
- Modified main application to use the embedded filesystem for serving static files
- Added logging statements for invoice generation

### How to test?

1. Run the application and verify static assets are served correctly
2. Generate a PDF invoice and confirm it renders properly
3. Check that all HTML error pages (400, 401, 403, 404, 500) are accessible
4. Verify images and icons load correctly throughout the application

### Why make this change?

Using an embedded filesystem ensures all static assets are compiled into the binary, making deployment simpler and more reliable. This eliminates the need to manage separate asset files and ensures the application has all required resources available at runtime.
2025-02-04 18:49:20 +01:00
cf1620592a
create invoice (#39)
### TL;DR

Enhanced invoice generation with improved formatting and Euro symbol display

### What changed?

- Added Euro symbol (€) to monetary values in the invoice template
- Implemented new invoice data structure with dedicated types for lines and payments
- Created ToInvoice method to properly format booking data for invoice generation
- Added HTML template parsing and rendering functionality
- Improved date formatting for consistency
- Added new API endpoint for booking creation

### How to test?

1. Create a new booking through the API
2. Navigate to the PDF generation endpoint
3. Verify that monetary values display with Euro symbol
4. Check that dates are properly formatted
5. Confirm that payment history and totals are correctly calculated
6. Validate that the generated HTML maintains proper formatting

### Why make this change?

To improve invoice readability and consistency by standardizing monetary value display and providing better data structure for invoice generation. This change also makes the system more maintainable by separating concerns between data transformation and presentation.
2025-02-04 11:34:14 +01:00
541c813be0
Raw 34 enable payments (#35)
Closes #34
2025-01-24 17:30:35 +01:00
49c49f4098
feat: add client parser to get response from LLM 2025-01-12 21:29:59 +01:00
9c6e5ff76e
cleanup 2024-09-13 18:55:35 +02:00
876d54d7bb
move pdf to driver layer 2024-09-11 11:04:34 +02:00
916f2b1c47
move database to driver layer 2024-09-11 09:40:39 +02:00
78ca637807
call calendar driver from the booking service 2024-09-11 09:38:22 +02:00
4c209da0f6
move calendar to driver layer 2024-09-11 09:09:23 +02:00