Commit graph

250 commits

Author SHA1 Message Date
dc8cd24c1d
make it smaller 2025-02-04 18:58:44 +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
bfde4eb601
fix bugs (#37)
### TL;DR
Reorganized booking service code and removed unused BookingRequest model

### What changed?
- Moved Payment model from payment.go to models.go
- Relocated payment-related service methods from service.go to payment.go
- Removed unused BookingRequest struct
- Updated dependencies to their latest versions

### How to test?
1. Run database migrations to verify removal of BookingRequest model
2. Test all payment-related endpoints to ensure functionality remains intact:
   - GET /payments/{id}
   - POST /payments
   - PUT /payments/{id}

### Why make this change?
- Improves code organization by grouping payment-related code together
- Removes unused BookingRequest model to reduce technical debt
- Keeps dependencies up to date for security and performance improvements
2025-01-25 00:41:32 +01:00
b8265cf80f
fix: only update the payments on payment creation 2025-01-25 00:21:30 +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
b4ffff3c67
improve header layout 2025-01-08 13:52:35 +01:00
cf7e1d4cb6
fix: parsing item name 2025-01-07 22:28:57 +01:00
8dcbd9679e
fix parsing 2025-01-05 17:13:17 +01:00
9b4063618c
change theme 2025-01-05 17:09:06 +01:00
2a417096f7
fix:test 2025-01-05 16:15:35 +01:00
a2ce003299
parsing (#28)
* test: add test for booking parsing

* improve error handling

* fix: booking parsing

fix: guest number

fix: item name

fix: parsing

* refactor tests

* test: more
2025-01-05 16:04:44 +01:00
9f0b6e71cb
change theme 2025-01-05 01:10:41 +01:00
04d9e8c284
chore: upgrade dependencies 2025-01-04 13:19:01 +01:00
041b77c205
fix: only report the non canceled bookings 2024-12-24 18:17:45 +01:00
106aa475d6
fix: the card total reporting 2024-12-24 18:13:19 +01:00
aa436542c4
style: Improve page layout with wider container and added margin 2024-12-24 18:03:04 +01:00
65f921cf5a
fix: loading items for booking details 2024-12-10 08:58:57 +01:00
9edad056c6
refactor: booking creation 2024-12-08 21:52:13 +01:00
c6ec3a3a97
fix: dependencies 2024-12-08 17:45:47 +01:00
150e8380e6
feat: Add justfile to replace Makefile with Just task runner 2024-12-08 12:08:54 +01:00
7b0d63855f
test: add test for All 2024-12-08 12:08:54 +01:00
d07dc199b7
clean the cron job 2024-12-07 12:49:05 +01:00
c9380481cf
create a booking repo 2024-12-07 12:48:43 +01:00
025f31f79d
update dependencies 2024-12-07 12:31:51 +01:00
6e8ef3d1eb
feat: add plausible tracking
fd
2024-12-01 20:43:27 +01:00
c2d0ddc67a
improve layout 2024-11-25 14:58:18 +01:00
148dba120f
improve accessibility 2024-11-16 19:35:44 +01:00
ffa7f140d1
use daisyUI (#25)
* use tailwind and daisyui

* split the layout in multiple components

* remove unused code

* footer compoonent

* login form

log

* booking table

fd

* cancel style

* header

* booking form

* new booking

* line items

* line item

* report

* uniform headings
2024-11-16 19:24:26 +01:00
c8490bd803
improve readme 2024-11-15 10:20:07 +01:00
6376fbd234
RE19 taxes only for booking (#24)
* create taxes only ofr booking platform

* also for sync

sync
2024-11-14 23:29:20 +01:00
42764ab6cc
improve th esorting per item (#23) 2024-11-14 22:45:45 +01:00
5d826c21da
RE18 translation (#22)
* translate the item for display in the invoice

* add documentation to the makefile
2024-11-14 22:35:35 +01:00
620465f206
RE20 github link footer (#21)
* add a github logo link to the repository in the footer

* update deps

* remove useless css loading
2024-11-14 22:14:20 +01:00
3e7a07dc2a
improve month sync again 2024-09-28 09:01:48 +02:00
d7e6b7891d
error message consistency 2024-09-15 11:03:40 +02:00
9c6e5ff76e
cleanup 2024-09-13 18:55:35 +02:00
abfbe1ff1b
refactor authentication service 2024-09-13 17:32:18 +02:00
34ce10ff86
move booking to service layer 2024-09-12 22:18:12 +02:00
b073844772
move auth to service layer 2024-09-12 22:11:01 +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
49dde76af6
hx boost helper 2024-09-09 22:34:29 +02:00
3c31b142f6
nosec 2024-09-09 22:09:43 +02:00
26c8996f0f
rename private handler 2024-09-09 22:01:43 +02:00
6fbac3ec39
fix linter 2024-09-09 21:15:28 +02:00
701a32671a
fix search bug introduce isHxRequest helper 2024-09-09 17:42:57 +02:00