[openads-Commits] r17943 - branches/module_notif_auto/obj

0 views
Skip to first unread message

cga...@users.adullact.net

unread,
Jun 17, 2024, 8:22:50 AM (9 days ago) Jun 17
to openmairi...@googlegroups.com
Author: cgarcin
Date: 2024-06-17 14:22:47 +0200 (Mon, 17 Jun 2024)
New Revision: 17943

Modified:
branches/module_notif_auto/obj/instruction.class.php
Log:
feat : affichage du suivi des notifications independamment du parametrage de l'evenement


Modified: branches/module_notif_auto/obj/instruction.class.php
===================================================================
--- branches/module_notif_auto/obj/instruction.class.php 2024-06-17 12:09:59 UTC (rev 17942)
+++ branches/module_notif_auto/obj/instruction.class.php 2024-06-17 12:22:47 UTC (rev 17943)
@@ -1033,28 +1033,18 @@
* @return boolean
*/
function can_display_notification_demandeur() {
- // Le suivi des notification est affiché si l'événement est notifiable
- // et si des notifications ont été envoyées
- $evenement_id = $this->getVal("evenement");
- $inst_evenement = $this->get_inst_evenement($evenement_id);
- if ($inst_evenement->getVal('notification') != null &&
- $inst_evenement->getVal('notification') != '') {
- // Des notifications ont été envoyé si il existe au moins une notification
- // liées à l'instruction
- $idsNotifs = $this->get_instruction_notification(
- $this->getVal($this->clePrimaire),
- array(
- 'notification_recepisse',
- 'notification_instruction',
- 'notification_decision',
- ),
- true
- );
- if (isset($idsNotifs) && $idsNotifs !== array()) {
- return true;
- }
- }
- return false;
+ // Le suivi des notification est affiché si l'instruction a
+ // des notifications de demandeurs associées
+ $idsNotifs = $this->get_instruction_notification(
+ $this->getVal($this->clePrimaire),
+ array(
+ 'notification_recepisse',
+ 'notification_instruction',
+ 'notification_decision',
+ ),
+ true
+ );
+ return isset($idsNotifs) && $idsNotifs !== array();
}

/**
@@ -1092,22 +1082,13 @@
* @return boolean
*/
function can_display_notification_tiers() {
- // Le suivi des notification est affiché si l'événement est notifiable
- // et si des notifications ont été envoyées
- $evenement_id = $this->getVal("evenement");
- $inst_evenement = $this->get_inst_evenement($evenement_id);
- if (! empty($inst_evenement->getVal('notification_tiers'))) {
- // Des notifications ont été envoyé si il existe au moins une notification
- // de type notification_tiers_consulte liées à l'instruction
- $idsNotifs = $this->get_instruction_notification(
- $this->getVal($this->clePrimaire),
- 'notification_tiers_consulte'
- );
- if (isset($idsNotifs) && $idsNotifs !== array()) {
- return true;
- }
- }
- return false;
+ // Le suivi des notification est affiché si l'instruction a
+ // des notifications de tiers associées
+ $idsNotifs = $this->get_instruction_notification(
+ $this->getVal($this->clePrimaire),
+ 'notification_tiers_consulte'
+ );
+ return isset($idsNotifs) && $idsNotifs !== array();
}

/**

Reply all
Reply to author
Forward
0 new messages