$html
+
+EOF;
+?>
\ No newline at end of file
diff --git a/include/ajax/ajax_action_remove_concerned.php b/include/ajax/ajax_action_remove_concerned.php
index 00d389490..08251710e 100644
--- a/include/ajax/ajax_action_remove_concerned.php
+++ b/include/ajax/ajax_action_remove_concerned.php
@@ -45,22 +45,30 @@ if ( ! $g_user->can_read_action($ag_id) ) {
return;
}
-require_once 'class/follow_up.class.php';
-$follow=new Follow_Up($cn,$ag_id);
+require_once 'class/follow_up_other_concerned.class.php';
+$follow=new Follow_Up_Other_Concerned($cn,$ag_id);
ob_start();
+$action_person_id=$cn->get_value(" select ap_id from action_person where ag_id =$1 and f_id =$2 ",[$ag_id,$f_id]);
+
+// row id to update
+$ctl= "other_".$action_person_id;
+
$follow->remove_linked_card($f_id);
-echo $follow->display_linked();
-echo HtmlInput::button_action_add_concerned_card( $follow->ag_id);
+$follow->display_linked_count();
+echo $follow->button_action_add_concerned_card( );
$response = ob_get_clean();
+if (headers_sent() && DEBUG) {
+ echo $response;
+}
$html = escape_xml($response);
header('Content-type: text/xml; charset=UTF-8');
echo <<$html
EOF;
diff --git a/include/ajax/ajax_action_save_concerned.php b/include/ajax/ajax_action_save_concerned.php
index 25baf3008..4500c5b59 100644
--- a/include/ajax/ajax_action_save_concerned.php
+++ b/include/ajax/ajax_action_save_concerned.php
@@ -46,8 +46,8 @@ if ( ! $g_user->can_write_action($ag_id) ) {
return;
}
-require_once 'class/follow_up.class.php';
-$follow=new Follow_Up($cn,$ag_id);
+require_once 'class/follow_up_other_concerned.class.php';
+$follow=new Follow_Up_Other_Concerned($cn,$ag_id);
$nb_card=count($selected_card);
for ($i=0;$i< $nb_card;$i++)
{
@@ -61,8 +61,8 @@ for ($i=0;$i< $nb_card;$i++)
*/
ob_start();
-$follow->display_linked();
-echo HtmlInput::button_action_add_concerned_card( $ag_id);
+$follow->display_linked_count();
+echo $follow->button_action_add_concerned_card( );
$response = ob_get_clean();
$html = escape_xml($response);
header('Content-type: text/xml; charset=UTF-8');
diff --git a/include/ajax/ajax_card.php b/include/ajax/ajax_card.php
index 7b065898b..62e88de20 100644
--- a/include/ajax/ajax_card.php
+++ b/include/ajax/ajax_card.php
@@ -776,6 +776,13 @@ case 'upr':
return;
break;
+ // ----------------------------------------------------------------------------------------------------------------
+ // Display a list of other card linked to the event / followup
+ // ----------------------------------------------------------------------------------------------------------------
+ case 'action_concerned_list':
+ require_once NOALYSS_INCLUDE.'/ajax/ajax_action_concerned_list.php';
+ return ;
+ break;
} // switch
$xml=escape_xml($html);
diff --git a/include/ajax/ajax_save_card_option.php b/include/ajax/ajax_save_card_option.php
index 931f07ed3..58457d431 100644
--- a/include/ajax/ajax_save_card_option.php
+++ b/include/ajax/ajax_save_card_option.php
@@ -21,7 +21,7 @@
if (!defined('ALLOWED'))
die('Appel direct ne sont pas permis');
-
+require_once NOALYSS_INCLUDE."/class/follow_up_other_concerned.class.php";
/**
* @file
* @brief save option of card into action_person_option
@@ -52,4 +52,7 @@ for ($i=0;$i<$nb; $i++) {
$cn->exec_sql("UPDATE public.action_person_option SET ap_value=$1 WHERE ap_id=$2",
[$ap_value[$i],$ap_id[$i]]);
-}
\ No newline at end of file
+}
+$follow=new Follow_Up_Other_Concerned($cn,$ag_id);
+$aColumn = $follow->get_option();
+echo $follow->display_row($fiche_id, 0, $aColumn);
\ No newline at end of file
diff --git a/include/class/follow_up.class.php b/include/class/follow_up.class.php
index 03a748536..380743a15 100644
--- a/include/class/follow_up.class.php
+++ b/include/class/follow_up.class.php
@@ -1670,65 +1670,7 @@ class Follow_Up
$this->f_id_dest=null;
}
- /**
- * Add another concerned (tiers, supplier...)
- * @remark type $g_user
- * @param type $p_fiche_id
- */
- function insert_linked_card($p_fiche_id)
- {
- global $g_user;
- if ($g_user->can_write_action($this->ag_id))
- {
- /**
- * insert into action_person
- */
- $count=$this->db->get_value('select count(*) from action_person where f_id=$1 and ag_id=$2', array($p_fiche_id, $this->ag_id));
- if ($count==0)
- {
- $this->db->exec_sql('insert into action_person (ag_id,f_id) values ($1,$2)', array($this->ag_id, $p_fiche_id));
- }
- }
- }
-
- /**
- * Remove another concerned (tiers, supplier...)
- * @remark type $g_user
- * @param type $p_fiche_id
- */
- function remove_linked_card($p_fiche_id)
- {
- global $g_user;
- if ($g_user->can_write_action($this->ag_id))
- {
- $this->db->exec_sql('delete from action_person where ag_id = $1 and f_id = $2', array($this->ag_id, $p_fiche_id));
- }
- }
-
- /**
- * Display the other concerned (tiers, supplier...)
- * @return string
- */
- function display_linked()
- {
- $a_linked=$this->db->get_array('select ap_id,f_id from action_person where ag_id=$1', array($this->ag_id));
- if (count($a_linked)==0)
- return "";
- $dossier_id=Dossier::id();
- for ($i=0; $i| + =_("Code")?> + | ++ =_("Nom")?> + | ++ =_("Prénom")?> + | + + db->get_array(" + select (select ad_value from fiche_detail fd1 where fd1.f_id=ap.f_id and ad_id=23) as qcode , + f_id + ,ap.ap_id + from action_person ap + join action_gestion on (ap.ag_id=action_gestion.ag_id) + where ap.ag_id=$1 order by 1",[$this->ag_id]); + $nb_other=count($aOther); + for ($x=0;$x<$nb_other;$x++) { + + echo $this->display_row($aOther[$x]['f_id'],$x,$aColumn); + } + ?> +
|---|