master
cherif 2024-08-24 13:13:09 +02:00
parent 74bc2fe20b
commit 89a59f490b
5 changed files with 4216 additions and 17 deletions

View File

@ -1,15 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="21/08/2024 - 13h55">
<change afterPath="$PROJECT_DIR$/base_partner_catalog_config.py" afterDir="false" />
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="ss">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Log/log_file.log" beforeDir="false" afterPath="$PROJECT_DIR$/Log/log_file.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lms_chamilo/mysy_lms.py" beforeDir="false" afterPath="$PROJECT_DIR$/lms_chamilo/mysy_lms.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/base_partner_catalog_config.py" beforeDir="false" afterPath="$PROJECT_DIR$/base_partner_catalog_config.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/partner_document_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_document_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/prj_common.py" beforeDir="false" afterPath="$PROJECT_DIR$/prj_common.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/wrapper.py" beforeDir="false" afterPath="$PROJECT_DIR$/wrapper.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -79,13 +76,6 @@
<option name="presentableId" value="Default" />
<updated>1680804787304</updated>
</task>
<task id="LOCAL-00330" summary="11/06/2024 - 23h30">
<created>1718141094205</created>
<option name="number" value="00330" />
<option name="presentableId" value="LOCAL-00330" />
<option name="project" value="LOCAL" />
<updated>1718141094207</updated>
</task>
<task id="LOCAL-00331" summary="12/06/2024 - 21h30">
<created>1718220447607</created>
<option name="number" value="00331" />
@ -422,7 +412,14 @@
<option name="project" value="LOCAL" />
<updated>1724240924910</updated>
</task>
<option name="localTasksCounter" value="379" />
<task id="LOCAL-00379" summary="ss">
<created>1724424786372</created>
<option name="number" value="00379" />
<option name="presentableId" value="LOCAL-00379" />
<option name="project" value="LOCAL" />
<updated>1724424786373</updated>
</task>
<option name="localTasksCounter" value="380" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -464,7 +461,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="23/07/2024 - 12h" />
<MESSAGE value="26/07/2024 - 12h" />
<MESSAGE value="29/07/2024 - 12h" />
<MESSAGE value="29/07/2024 - 21h" />
@ -489,6 +485,7 @@
<MESSAGE value="20/08/2024 - 13h55" />
<MESSAGE value="20/08/2024 - 21h55" />
<MESSAGE value="21/08/2024 - 13h55" />
<option name="LAST_COMMIT_MESSAGE" value="21/08/2024 - 13h55" />
<MESSAGE value="ss" />
<option name="LAST_COMMIT_MESSAGE" value="ss" />
</component>
</project>

File diff suppressed because it is too large Load Diff

View File

@ -106,7 +106,7 @@ def Add_Update_Partner_Catalog_Pub_Config(diction):
"""
Verification des input acceptés
"""
field_list = ['token', '_id',]
field_list = ['token', '_id','logo', 'message_1_txt', 'theme_id', 'banniere_img', 'message_2_txt']
incom_keys = diction.keys()
for val in incom_keys:
@ -139,6 +139,24 @@ def Add_Update_Partner_Catalog_Pub_Config(diction):
if (local_status is not True):
return local_status, my_partner
my_id = diction['_id']
del diction['_id']
del diction['token']
result = MYSY_GV.dbname['config_partner_catalog'].find_one_and_update(
{'_id': ObjectId(str(my_id)),
'partner_owner_recid': str(my_partner['recid'])},
{"$set": diction},
upsert=True,
return_document=ReturnDocument.AFTER
)
if (result is None or "_id" not in result.keys()):
mycommon.myprint(
" Impossible d'ajouter ou mettre à jour la configuration du catalogue public (2) ")
return False, " Impossible d'ajouter ou mettre à jour la configuration du catalogue public (2) "
return True, " La configuration du catalogue a été correctement mis à jour"
except Exception as e:
@ -207,6 +225,22 @@ def Get_Partner_Catalog_Pub_Config(diction):
user['id'] = str(val_tmp)
val_tmp = val_tmp + 1
"""
Recuperer les données (preview) du
config_partner_catalog_theme
"""
user['theme_preview'] = ""
config_partner_catalog_theme_data = MYSY_GV.dbname['config_partner_catalog_theme'].find_one({'_id':ObjectId(str(retval['theme_id'])),
'valide':'1',
'locked':'0',
'partner_owner_recid':"default"})
if( config_partner_catalog_theme_data and "theme_preview" in config_partner_catalog_theme_data.keys() ):
user['theme_preview'] = config_partner_catalog_theme_data['theme_preview']
RetObject.append(mycommon.JSONEncoder().encode(user))
#print(" ### RetObject = ", RetObject);

View File

@ -10943,7 +10943,7 @@ partenaire
def Add_Update_Partner_Catalog_Pub_Config():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### Add_Update_Partner_Catalog_Pub_Config payload = ",payload)
#print(" ### Add_Update_Partner_Catalog_Pub_Config payload = ",payload)
status, retval = base_partner_catalog_config.Add_Update_Partner_Catalog_Pub_Config(payload)
return jsonify(status=status, message=retval)

View File

@ -6405,6 +6405,21 @@ def Get_Partner_Data_From_Subdomain(diction):
if (config_partner_catalog_data and "theme_id" in config_partner_catalog_data.keys()):
user['catalog_pub_banniere_theme_id'] = config_partner_catalog_data['theme_id']
"""
Recuperer les données (preview) du
config_partner_catalog_theme
"""
user['theme_code'] = ""
config_partner_catalog_theme_data = MYSY_GV.dbname['config_partner_catalog_theme'].find_one(
{'_id': ObjectId(str(config_partner_catalog_data['theme_id'])),
'valide': '1',
'locked': '0',
'partner_owner_recid': "default"})
if (config_partner_catalog_theme_data and "code" in config_partner_catalog_theme_data.keys()):
user['theme_code'] = config_partner_catalog_theme_data['code']
RetObject.append(JSONEncoder().encode(user))