Add kimai "visible" field, moar kimai screens
This commit is contained in:
@ -22,7 +22,14 @@ def sync() -> None:
|
||||
customers = KimaiAPICustomer.list(api)
|
||||
with db.atomic():
|
||||
KimaiCustomer.insert_many(
|
||||
[{"id": customer.id, "name": customer.name} for customer in customers]
|
||||
[
|
||||
{
|
||||
"id": customer.id,
|
||||
"name": customer.name,
|
||||
"visible": customer.visible,
|
||||
}
|
||||
for customer in customers
|
||||
]
|
||||
).execute()
|
||||
|
||||
projects = KimaiAPIProject.list(api)
|
||||
@ -34,6 +41,7 @@ def sync() -> None:
|
||||
"name": project.name,
|
||||
"customer_id": project.customer.id,
|
||||
"allow_global_activities": project.allow_global_activities,
|
||||
"visible": project.visible,
|
||||
}
|
||||
for project in projects
|
||||
]
|
||||
@ -46,7 +54,8 @@ def sync() -> None:
|
||||
{
|
||||
"id": activity.id,
|
||||
"name": activity.name,
|
||||
"project_id": (activity.project and activity.project.id or None),
|
||||
"project_id": (activity.project.id if activity.project else None),
|
||||
"visible": activity.visible,
|
||||
}
|
||||
for activity in activities
|
||||
]
|
||||
|
Reference in New Issue
Block a user