This commit is contained in:
Nico Schottelius 2026-06-11 12:22:13 +02:00
commit 35ca9f8c49
2 changed files with 54 additions and 10 deletions

View file

@ -1,18 +1,22 @@
* Generally to be done for prod [44%]
** TODO Add description to product
* Define test workflows
** TODO As a user I can order Nextcloud [0%]
*** TODO I can find the nextcloud product on the listing page
*** TODO I can select everything and at some point I need to login
* Generally to be done for prod [55%]
** TODO [#B] Link orders to users
- might be somewhat independent
** TODO [#C] Add description to product
- Maybe markdown later
** TODO Link orders to users
** TODO Maybe i18n on everything
** TODO Show confirmation screen / final price
** PROGRESS Re-understand get_context_data
- gets additional context such as other models / related models
- Unsure when the context data is being used.
- Usually used in the Detailview of the thing
- so likely referenced by a template or View
** TODO Prevent a product or resource to be named "product"
** DONE Prevent a product or resource to be named "product"
CLOSED: [2025-03-08 Sat 12:32]
Because of initial['product'] = self.kwargs['product']
** DONE Add default values to resources
CLOSED: [2025-03-08 Sat 12:27]
** DONE Re-understand get_form_kwargs
@ -36,10 +40,50 @@ CLOSED: [2025-03-08 Sat 11:31]
- onetime price seems to be reasonable to be inside resource
- Price per timeframe must be separate
- Thus onetime price was also added separately
* Bills [0%]
* Payment [0%]
** PROGRESS Add support for payments
- Linked to user
** TODO Add support for stripe
** TODO Add support for post-pay / wire transfer booking
** TODO [#C] Maybe add support for paypal
* Bills / Dashboard / [0%]
** PROGRESS Design bill handling
- bills are independent of payments
- Might reference payments
- Might show a balance
- How essential is a user to a bill?
- In theory not at all
- Only if we want to allow them to list / see
** PROGRESS Define the timeframe for a bill
- always monthly bills
- if there is at least one item
** TODO Show bills
** TODO Allow to create / send bills
** PROGRESS Add customer/client
* OIDC integration [%]
** Write code
** Test with authentik
** TODO Allow to create / send bills / pdf maybe?
** TODO Allow cancelleation of product order
* OIDC integration [0%]
** TODO Find out which library to use
- https://djangopackages.org/grids/g/oidc/
** TODO Write code
** TODO Test with authentik
* k8s integration [0%]
** TODO Write yaml of products
** TODO Commit to git
** TODO Rebase git repo
** TODO Make git committer an async task (single task)
** TODO Lookup status in k8s for displaying (?)
** TODO Manage namespaces
- prevent double usage
- maybe use uncloud_<xyz>
- lengths <= 253 characters
* Making pretty / production ready [0%]
** TODO Ensure time frame cannot be set in product order if there are no resources with time frame
** TODO Verify that resource time frames are correctly extracted per product
- Need to use the union of time frames?
** TODO Define where to store translations of products (if at all)
** TODO Maybe i18n on everything

View file

@ -320,7 +320,7 @@ class Bill(models.Model):
# Date range for billing period (staff sets these)
period_start_date = models.DateField()
period_end_date = models.DateField()
# Automatically calculated datetime period (start of day to end of day)
period_start = models.DateTimeField(editable=False)
period_end = models.DateTimeField(editable=False)
@ -354,7 +354,7 @@ class Bill(models.Model):
self.period_start = timezone.make_aware(
timezone.datetime.combine(self.period_start_date, timezone.datetime.min.time())
)
if self.period_end_date:
# End of day (23:59:59.999999)
self.period_end = timezone.make_aware(