Skip to content

Commit

Permalink
Merge branch 'pr/708' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasjuhrich committed Apr 5, 2024
2 parents f25dc1f + 941ac68 commit 3170a78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/blueprints/facilities/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ def room_show(room_id: int) -> ResponseReturnValue:
page_title=f"Raum {room.short_name}",
room=room,
ports=room.patch_ports,
user_buttons=[user_button(user).model_dump() for user in room.users],
user_buttons=[user_button(user) for user in room.users],
user_histories=[
(
user_button(room_history_entry.user).model_dump(),
Expand Down Expand Up @@ -617,6 +617,7 @@ def room_tenancies_json(room_id: int) -> ResponseReturnValue:
items=[
RoomTenanciesRow(
inhabitant=user_button(tenancy.user) if tenancy.user else None,
swdd_person_id=tenancy.person_id if tenancy.person_id else None,
begins_at=date_format(tenancy.mietbeginn, formatter=date_filter),
ends_at=date_format(tenancy.mietende, formatter=date_filter),
status=tenancy.status.name,
Expand Down
2 changes: 2 additions & 0 deletions web/blueprints/facilities/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ class RoomTenanciesTable(BootstrapTable):
_render_toolbar = False

inhabitant = BtnColumn("Bewohner")
swdd_person_id = Column("Debitorennummer")
begins_at = DateColumn("Von")
ends_at = DateColumn("Bis")
status = Column("Status")
Expand All @@ -121,6 +122,7 @@ class Meta:

class RoomTenanciesRow(BaseModel):
inhabitant: BtnColResponse | None = None
swdd_person_id: int | None = None
begins_at: DateColResponse
ends_at: DateColResponse
status: str

0 comments on commit 3170a78

Please sign in to comment.