mbu-dev-shared-components 0.4.2__tar.gz → 0.4.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/PKG-INFO +1 -1
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/getorganized/objects.py +8 -1
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/msoffice365/sharepoint_api/files.py +38 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/solteqtand/app_handler.py +2 -2
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components.egg-info/PKG-INFO +1 -1
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/pyproject.toml +1 -1
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/LICENSE +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/README.md +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/getorganized/__init__.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/getorganized/auth.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/getorganized/cases.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/getorganized/contacts.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/getorganized/documents.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/google/__init__.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/google/api/__init__.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/google/api/auth.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/google/workspace/__init__.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/google/workspace/alerts.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/msoffice365/__init__.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/msoffice365/excel/__init__.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/msoffice365/excel/excel_reader.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/msoffice365/sharepoint_api/__init__.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/os2forms/__init__.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/os2forms/documents.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/os2forms/forms.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/romexis/__init__.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/romexis/db_handler.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/sap/__init__.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/sap/create_invoice.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/solteqtand/__init__.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/solteqtand/db_handler.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/solteqtand/helper_functions.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/utils/__init__.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/utils/db_stored_procedure_executor.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/utils/fernet_encryptor.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/utils/file_handler.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components/utils/json_handler.py +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components.egg-info/SOURCES.txt +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components.egg-info/dependency_links.txt +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components.egg-info/requires.txt +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/mbu_dev_shared_components.egg-info/top_level.txt +0 -0
- {mbu_dev_shared_components-0.4.2 → mbu_dev_shared_components-0.4.3}/setup.cfg +0 -0
|
@@ -73,7 +73,14 @@ class CaseDataJson:
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
if case_title is not None:
|
|
76
|
-
#
|
|
76
|
+
# Change the value of the existing case category to "Standard"
|
|
77
|
+
for field in search_case_folder_data["FieldProperties"]:
|
|
78
|
+
if field["InternalName"] == "ows_CaseCategory":
|
|
79
|
+
field["Value"] = "Standard"
|
|
80
|
+
|
|
81
|
+
break
|
|
82
|
+
|
|
83
|
+
# Optionally add the case title property
|
|
77
84
|
search_case_folder_data["FieldProperties"].append({
|
|
78
85
|
"InternalName": "ows_CaseTitle",
|
|
79
86
|
"Value": case_title,
|
|
@@ -35,6 +35,8 @@ import os
|
|
|
35
35
|
from office365.runtime.auth.user_credential import UserCredential
|
|
36
36
|
from office365.sharepoint.client_context import ClientContext
|
|
37
37
|
|
|
38
|
+
from office365.sharepoint.files.file import File
|
|
39
|
+
|
|
38
40
|
|
|
39
41
|
class Sharepoint:
|
|
40
42
|
"""
|
|
@@ -124,6 +126,22 @@ class Sharepoint:
|
|
|
124
126
|
return None
|
|
125
127
|
return None
|
|
126
128
|
|
|
129
|
+
def fetch_file_using_open_binary(self, file_name: str, folder_name: str) -> Optional[bytes]:
|
|
130
|
+
"""
|
|
131
|
+
Downloads a file using the open_binary method from SharePoint.
|
|
132
|
+
"""
|
|
133
|
+
if self.ctx:
|
|
134
|
+
try:
|
|
135
|
+
file_url = f"/teams/{self.site_name}/{self.document_library}/{folder_name}/{file_name}"
|
|
136
|
+
file_content = File.open_binary(self.ctx, file_url)
|
|
137
|
+
return file_content.content
|
|
138
|
+
except Exception:
|
|
139
|
+
import traceback
|
|
140
|
+
print("Failed to download file:")
|
|
141
|
+
traceback.print_exc()
|
|
142
|
+
return None
|
|
143
|
+
return None
|
|
144
|
+
|
|
127
145
|
def _write_file(self, folder_destination: str, file_name: str, file_content: bytes):
|
|
128
146
|
"""
|
|
129
147
|
Saves the binary content of a file to a specified local destination.
|
|
@@ -211,3 +229,23 @@ class Sharepoint:
|
|
|
211
229
|
self.upload_file(folder_name, file_path, file_name)
|
|
212
230
|
except Exception as e:
|
|
213
231
|
print(f"Failed to upload file '{file_path}': {e}")
|
|
232
|
+
|
|
233
|
+
def upload_file_from_bytes(self, binary_content: bytes, file_name: str, folder_name: str):
|
|
234
|
+
"""
|
|
235
|
+
Uploads a file to SharePoint directly from a bytes object.
|
|
236
|
+
|
|
237
|
+
Args:
|
|
238
|
+
binary_content (bytes): The binary content of the file.
|
|
239
|
+
file_name (str): The name to give the file in SharePoint.
|
|
240
|
+
folder_name (str): The folder in the document library where the file will be uploaded.
|
|
241
|
+
"""
|
|
242
|
+
|
|
243
|
+
if self.ctx:
|
|
244
|
+
try:
|
|
245
|
+
folder_url = f"/teams/{self.site_name}/{self.document_library}/{folder_name}"
|
|
246
|
+
target_folder = self.ctx.web.get_folder_by_server_relative_url(folder_url)
|
|
247
|
+
|
|
248
|
+
target_folder.upload_file(file_name, binary_content).execute_query()
|
|
249
|
+
print(f"File '{file_name}' uploaded successfully to '{folder_url}'.")
|
|
250
|
+
except Exception as e:
|
|
251
|
+
print(f"Failed to upload file '{file_name}': {e}")
|
|
@@ -805,7 +805,7 @@ class SolteqTandApp:
|
|
|
805
805
|
# End with raise error where resulting dates are printed
|
|
806
806
|
print("Dates after insert not matching input")
|
|
807
807
|
print((
|
|
808
|
-
f"'From' input: {from_date.strftime(format=
|
|
808
|
+
f"'From' input: {from_date.strftime(format='%d. %B %Y')} " +
|
|
809
809
|
f"Current value: {dt_picker_from.Name}"))
|
|
810
810
|
|
|
811
811
|
dt_picker_to = self.wait_for_control(
|
|
@@ -831,7 +831,7 @@ class SolteqTandApp:
|
|
|
831
831
|
except Exception:
|
|
832
832
|
print("Dates after insert not matching input")
|
|
833
833
|
print((
|
|
834
|
-
f"'To' input: {to_date.strftime(format=
|
|
834
|
+
f"'To' input: {to_date.strftime(format='%d. %B %Y')} " +
|
|
835
835
|
f"Current value: {dt_picker_to.Name}"))
|
|
836
836
|
|
|
837
837
|
def pick_appointment_types_aftalebog(self, appointment_types: str | list):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|