mirror of
https://git.hiabuto.net/C3MA/CCMA.git
synced 2026-09-06 03:20:49 +02:00
Fix ruff lint violations
This commit is contained in:
@@ -5,7 +5,7 @@ from collections.abc import Callable
|
||||
from datetime import datetime
|
||||
from tkinter import messagebox, ttk
|
||||
|
||||
from ccma.domain.models import ASSET_STATUS_LABELS, Asset, Event
|
||||
from ccma.domain.models import ASSET_STATUS_LABELS, Event
|
||||
from ccma.storage.repository import MemberRepository, RepositoryError
|
||||
from ccma.ui.dialogs import AssetClaimDialog, IntegrityWarningDialog
|
||||
from ccma.ui.messages import MessageAction, MessageBannerList, TabMessage
|
||||
@@ -196,8 +196,16 @@ class AssetTab(ttk.Frame):
|
||||
ttk.Button(finance_actions, text="Verlustforderung", command=self._create_loss_claim).pack(
|
||||
side="left", padx=(0, 8)
|
||||
)
|
||||
ttk.Button(finance_actions, text="Reparaturforderung", command=self._create_repair_claim).pack(side="left")
|
||||
self.asset_claims = ttk.Treeview(finance_tab, columns=("title", "due", "amount", "member"), show="headings")
|
||||
ttk.Button(
|
||||
finance_actions,
|
||||
text="Reparaturforderung",
|
||||
command=self._create_repair_claim,
|
||||
).pack(side="left")
|
||||
self.asset_claims = ttk.Treeview(
|
||||
finance_tab,
|
||||
columns=("title", "due", "amount", "member"),
|
||||
show="headings",
|
||||
)
|
||||
for key, title, width in (
|
||||
("title", "Forderung", 240),
|
||||
("due", "Fällig", 110),
|
||||
@@ -429,7 +437,14 @@ class AssetTab(ttk.Frame):
|
||||
claim_type="asset_repair",
|
||||
)
|
||||
|
||||
def _open_claim_dialog(self, *, preset_title: str, preset_amount: str, preset_description: str, claim_type: str) -> None:
|
||||
def _open_claim_dialog(
|
||||
self,
|
||||
*,
|
||||
preset_title: str,
|
||||
preset_amount: str,
|
||||
preset_description: str,
|
||||
claim_type: str,
|
||||
) -> None:
|
||||
member_id = self.asset.current_holder_member_id
|
||||
if not member_id:
|
||||
messagebox.showerror(
|
||||
|
||||
Reference in New Issue
Block a user