Commit Graph

12 Commits

Author SHA1 Message Date
jordi fita mas 97831668e5 Add the number of maximum nights that tourist tax applies
This is required by law.

I do not know why i have this value and the tax amount in the database,
but the payment percent and the number of days are hardcoded. I guess i
am such an inconsistent mess.
2024-02-27 20:06:28 +01:00
jordi fita mas 92dba96b29 Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs.  I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.

A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 06:18:30 +01:00
jordi fita mas 4adad7fa7d Replace min_nights from campsite_type_costs to range in campsite_type
Customer told us that the minimum number of nights is per campsite type,
not per season.  And he wants this, along with the maximum number of
nights, in order to limit the range of departure dates that guests can
choose when booking.
2024-01-31 23:06:45 +01:00
jordi fita mas 1f2ab494dd Add check_in and check_out fields to campsite_type
Apparently, each campsite type could have different check-in and
check-out times, thus i need them in the database.

I thought about using an integer or a datetime field, but customer seems
to want a text field to maybe add “before” and “after” there as well.
Translatable text it is.
2024-01-22 20:19:19 +01:00
jordi fita mas dabd197f02 Add additional information field to campsite types
This is actually just to have a fourth column in order to “balance”
lists for types that have a long descriptions.
2024-01-15 00:28:34 +01:00
jordi fita mas 79df1736f2 Add tourist tax to company
Not used anywhere yet, but i will need it when computing the booking’s
total.
2024-01-14 02:09:17 +01:00
jordi fita mas 27af39b296 Add the Catalonia’s Tourism Registry number to company
It is required to be displayed on the website of tourism companies of
Catalonia.
2023-10-14 21:59:36 +02:00
jordi fita mas 7fc87b5cb5 Add the info and facilities fields to campsite type
I wish CKEditor would have support for <dl>, but it is unlikely that
they will add any time soon[0], specially when in 2018 they already
“forgotten”[1] that this was requested back in 2007[2].

Therefore, in the demo i did it more or less like in the original
design, with “extra” <h4>, although i added them under a <h3>, to avoid
“gaps” in the outline.

[0]: https://github.com/ckeditor/ckeditor5/issues/775
[1]: https://github.com/ckeditor/ckeditor5/issues/775#issuecomment-358591747
[2]: https://dev.ckeditor.com/ticket/1333
2023-10-13 18:09:28 +02:00
jordi fita mas ebf47b5d75 Add the “spiel” for campsite types
This is the text that introduces the carousel; it is not a spiel, but
this is what i call it.

It turns out that this text needs to have paragraphs and headings, much
like home’s slider, rather than the one in services page, thus no need
to change its font size or to align all items in the carousel in the
middle.
2023-10-12 18:47:08 +02:00
jordi fita mas 680d51e704 Add max campers and dogs allowed fields to campsite types 2023-09-29 20:17:39 +02:00
jordi fita mas 97cf117da3 Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.

A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.

I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used.  And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.

I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-21 01:56:44 +02:00
jordi fita mas d08fa31c81 Add translate_campsite_type SQL function
It makes sense that, if i have it for the home page sliders, i should
also have it for the campsite type, for consistence, at least.
2023-09-15 01:23:51 +02:00