[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 62/119: FOLLOWUP : generate doc. add new tag,
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 62/119: FOLLOWUP : generate doc. add new tag, DOCUMENT_ID, TITLE, DESCRIPTION, LABELOP, COMMENT |
Date: |
Mon, 26 Oct 2020 18:27:22 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit c7c480b34c826ddb6788f317a75368709124a6cc
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Thu Oct 8 18:14:21 2020 +0200
FOLLOWUP : generate doc. add new tag,
DOCUMENT_ID,TITLE,DESCRIPTION,LABELOP,COMMENT
---
include/ajax/ajax_add_concerned_card.php | 1 +
include/class/document.class.php | 62 +++++++++++++++++++++++++-------
2 files changed, 50 insertions(+), 13 deletions(-)
diff --git a/include/ajax/ajax_add_concerned_card.php
b/include/ajax/ajax_add_concerned_card.php
index a30f1cc..c8e7091 100644
--- a/include/ajax/ajax_add_concerned_card.php
+++ b/include/ajax/ajax_add_concerned_card.php
@@ -96,6 +96,7 @@ $r.=HtmlInput::request_to_hidden(array('ag_id'));
$r.=dossier::hidden().HtmlInput::hidden('op2',
'link_concerned_card').HtmlInput::hidden("op","card");
// element to update with the answer
$r.=HtmlInput::hidden("ctl","concerned_card_td");
+$array=[];
for ($i=0; $i<count($a); $i++)
{
$ic=new ICheckBox("selected_card[]");
diff --git a/include/class/document.class.php b/include/class/document.class.php
index a58f1de..2752d88 100644
--- a/include/class/document.class.php
+++ b/include/class/document.class.php
@@ -533,6 +533,10 @@ class Document
* - [TITLE]
* - [DESCRIPTION]
* - [COMM_PAYMENT]
+ * - [LABELOP]
+ * - [COMMENT]
+ * - [DESCRIPTION]
+ * - [DOCUMENT_ID]
*
* \param $p_tag TAG
* \param $p_array data from $_POST
@@ -789,6 +793,10 @@ class Document
case 'NUMBER':
$r=$this->d_number;
break;
+ case "DOCUMENT_ID":
+ if (isset($p_array['ag_id'])) return $p_array['ag_id'];
+ return "";
+ break;
case 'USER' :
return $_SESSION['use_name'].', '.$_SESSION['use_first_name'];
@@ -814,16 +822,17 @@ class Document
* - [DATE_LIMIT]
*/
case 'DATE_LIMIT_CALC':
- extract ($p_array, EXTR_SKIP);
- $id='e_ech' ;
- if ( !isset (${$id}) ) return "";
- $r=format_date(${$id},'DD.MM.YYYY','YYYY-MM-DD');
- break;
+ if ( isset ($p_array["e_ech"] ))
+ return
format_date($p_array["ech"],'DD.MM.YYYY','YYYY-MM-DD');
+ if ( isset ($p_array["ag_remind_date"] ))
+ return
format_date($p_array["ag_remind_date"],'DD.MM.YYYY','YYYY-MM-DD');
+
+ break;
case 'DATE_LIMIT':
- extract ($p_array, EXTR_SKIP);
- $id='e_ech' ;
- if ( !isset (${$id}) ) return "";
- $r=${$id};
+ if ( isset ($p_array["e_ech"] ))
+ return $p_array["ech"];
+ if ( isset ($p_array["ag_remind_date"] ))
+ return $p_array["ag_remind_date"];
break;
case 'MARCH_NEXT':
$this->counter++;
@@ -1130,7 +1139,7 @@ class Document
else
return "";
break;
- case 'COMMENT':
+ case 'LABELOP':
if ( isset($p_array['e_comm']))
return $p_array['e_comm'];
break;
@@ -1160,9 +1169,36 @@ class Document
$ret=$this->db->get_value('select r_phone from
public.stock_repository where r_id=$1',array($p_array['repo']));
return $ret;
case 'TITLE':
- $http=new HttpInput();
- $title=$http->request("ag_title","string", "");
- return $title;
+ if ( isset($p_array['ag_title'])) return
$p_array['ag_title'];
+ return "";
+ break;
+ case 'DESCRIPTION':
+ if ( isset($p_array['ag_id'])) {
+ // retrieve first comment
+ $description=$this->db->get_value("select agc_comment "
+ . " from action_gestion_comment "
+ . "where ag_id=$1 order by 1 asc limit 1"
+ ,[$p_array['ag_id']]);
+ return $description;
+ }
+ return "";
+ break;
+ case 'COMMENT':
+ if ( isset($p_array['ag_id'])) {
+ // retrieve first comment
+ $aComment=$this->db->get_array("select agc_comment "
+ . " from action_gestion_comment "
+ . "where ag_id=$1 order by 1"
+ ,[$p_array['ag_id']]);
+ $nb_comment=count($aComment);
+ $description="";
+ for ($i=0;$i< $nb_comment;$i++) {
+ $description.=$aComment[$i]['agc_comment']."\n";
+ }
+ return $description;
+ }
+ return "";
+ break;
case 'COMM_PAYMENT':
if ( isset($p_array["e_comm_paiement"])) {
return $p_array["e_comm_paiement"];
- [Noalyss-commit] [noalyss] 27/119: Bug : correct search remove ~, (continued)
- [Noalyss-commit] [noalyss] 27/119: Bug : correct search remove ~, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 42/119: Bug : cannot duplicate ACH, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 45/119: ManageTable : add tbody and thead , fix javascript error, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 44/119: Fix: predefined operation with overflow for details, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 49/119: tag - cosmetic, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 47/119: Tag and Group Tag, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 53/119: NEW Security : add tag, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 56/119: Cosmetic for cells for tag and contact, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 55/119: not used anymore javascript:void(0), Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 58/119: Missing file, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 62/119: FOLLOWUP : generate doc. add new tag, DOCUMENT_ID, TITLE, DESCRIPTION, LABELOP, COMMENT,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 72/119: Tag Limit column size , replace input_switch by check_box, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 61/119: Search Card Paginate, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 64/119: InPlace_Switch : do not echo , return a string instead, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 68/119: Add new type of attribute : check, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 81/119: Search card :typo, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 90/119: select_box cosmetic font, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 92/119: Follow-Up create doc new Tags COMMENTS, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 93/119: Follow-up new column "Status", Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 98/119: Follow up add followup action, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 103/119: Improve : Quick filter on history, Dany De Bontridder, 2020/10/26