Card Component implemented

This commit is contained in:
2025-04-29 20:44:39 +03:00
parent 113e43c7d7
commit 0052c92974
26 changed files with 2273 additions and 65 deletions

View File

@@ -525,22 +525,23 @@ def create_application_defaults(db_session):
sup_manager_employee.password_token = PasswordModule.generate_refresher_token()
with mongo_handler.collection(collection_name) as mongo_engine:
existing_record = mongo_engine.find_one({"user_uu_id": str(sup_manager_employee.uu_id)})
if not existing_record:
print('insert sup existing record',existing_record)
mongo_engine.insert_one(
document={
"user_uu_id": str(sup_manager_employee.uu_id),
"other_domains_list": [main_domain],
"other_domains_list": [main_domain, "management.com.tr"],
"main_domain": main_domain,
"modified_at": arrow.now().timestamp(),
}
)
else:
print('update sup existing record',existing_record)
# Optionally update the existing record if needed
mongo_engine.update_one(
{"user_uu_id": str(sup_manager_employee.uu_id)},
{"$set": {
"other_domains_list": [main_domain],
"other_domains_list": [main_domain, "management.com.tr"],
"main_domain": main_domain,
"modified_at": arrow.now().timestamp(),
}}