noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 02/02: FOLLOWUP Card: show 20 last action, ev


From: dwm
Subject: [Noalyss-commit] [noalyss] 02/02: FOLLOWUP Card: show 20 last action, even closed
Date: Thu, 29 Feb 2024 16:38:33 -0500 (EST)

sparkyx pushed a commit to branch unstable
in repository noalyss.

commit e7d52dded9ed11c2e9aec98f1e784bd5704daac2
Author: Dany wm <danydb@noalyss.eu>
AuthorDate: Wed Feb 28 21:08:17 2024 +0100

    FOLLOWUP Card: show 20 last action, even closed
---
 include/ajax/ajax_follow_up.php   | 5 +++--
 include/class/follow_up.class.php | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/ajax/ajax_follow_up.php b/include/ajax/ajax_follow_up.php
index 31552014d..3fc05737d 100644
--- a/include/ajax/ajax_follow_up.php
+++ b/include/ajax/ajax_follow_up.php
@@ -149,9 +149,10 @@ if ($op =="view_followup_card")
     $div=$http->get("div");
     $card=new Fiche($cn,$http->get("f_id","number"));
     echo HtmlInput::title_box("Suivi 
".h($card->strAttribut(ATTR_DEF_NAME)),$div);
-    
$query=Follow_Up::create_query($cn,["qcode"=>$card->strAttribut(ATTR_DEF_QUICKCODE)]);
+    
$query=Follow_Up::create_query($cn,["qcode"=>$card->strAttribut(ATTR_DEF_QUICKCODE),
+        'closed_action'=>true]);
     $followup=new Follow_Up($cn);
-    echo $followup->view_list($query);
+    echo $followup->view_list($query,' limit 25');
     echo \HtmlInput::button_close($div);
     return;
 }
diff --git a/include/class/follow_up.class.php 
b/include/class/follow_up.class.php
index 78ba17393..882a50933 100644
--- a/include/class/follow_up.class.php
+++ b/include/class/follow_up.class.php
@@ -855,12 +855,13 @@ class Follow_Up
     /**
      * @brief display list of followup , used with card
      * @param $query string SQL query
+     * @param $extra_sql string extra to add to the query , example "limit 20"
      * @return void
      */
-    function view_list($query)
+    function view_list($query,$extra_sql="")
     {
         $sql=Follow_Up::SQL_list_action();
-        $sql = " $sql $query";
+        $sql = " $sql $query order by ag_timestamp desc  $extra_sql";
         require_once NOALYSS_TEMPLATE."/follow_up-view_list.php";
     }
     //----------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]