From 89fc2ecd0ad3f39c7a13f4752761c85941d14e8d Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 24 Oct 2019 14:49:17 +0200 Subject: [PATCH] Fixed: Corrected number of rows in CSV download The new line in concatinated groups was causing extra lines in excel file and messing the structure. Also adapted download status title to enable correct data import of csv text file. --- .../views/lehre/lehrauftrag/acceptLehrauftrag.php | 1 + .../lehre/lehrauftrag/acceptLehrauftragData.php | 8 ++++---- .../views/lehre/lehrauftrag/approveLehrauftrag.php | 1 + .../lehre/lehrauftrag/approveLehrauftragData.php | 8 ++++---- .../views/lehre/lehrauftrag/orderLehrauftrag.php | 13 +------------ .../lehre/lehrauftrag/orderLehrauftragData.php | 11 ++++------- 6 files changed, 15 insertions(+), 27 deletions(-) diff --git a/application/views/lehre/lehrauftrag/acceptLehrauftrag.php b/application/views/lehre/lehrauftrag/acceptLehrauftrag.php index b5a89681c..a00327872 100644 --- a/application/views/lehre/lehrauftrag/acceptLehrauftrag.php +++ b/application/views/lehre/lehrauftrag/acceptLehrauftrag.php @@ -227,6 +227,7 @@ $this->load->view( field: "status", width:40, align:"center", + downloadTitle: 'Status', formatter: status_formatter, tooltip: status_tooltip }, true diff --git a/application/views/lehre/lehrauftrag/acceptLehrauftragData.php b/application/views/lehre/lehrauftrag/acceptLehrauftragData.php index 17ae6f406..a615d19d3 100644 --- a/application/views/lehre/lehrauftrag/acceptLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/acceptLehrauftragData.php @@ -84,8 +84,8 @@ FROM SELECT *, /* concatinated and aggregated gruppen */ (SELECT - string_agg(concat(stg_typ_kurzbz, \'-\', semester, verband, gruppe, - \'\n\' || gruppe_kurzbz), \', \') + string_agg(concat(stg_typ_kurzbz, \'-\', semester, verband, gruppe + || gruppe_kurzbz), \', \') FROM lehre.tbl_lehreinheitgruppe WHERE @@ -181,8 +181,8 @@ FROM LIMIT 1) AS "mitarbeiter_uid", /* concatinated and aggregated gruppen */ (SELECT - string_agg(concat(stg_typ_kurzbz, \'-\', semester, verband, gruppe, - \'\n\' || gruppe_kurzbz), \', \') + string_agg(concat(stg_typ_kurzbz, \'-\', semester, verband, gruppe + || gruppe_kurzbz), \', \') FROM lehre.tbl_lehreinheitgruppe WHERE diff --git a/application/views/lehre/lehrauftrag/approveLehrauftrag.php b/application/views/lehre/lehrauftrag/approveLehrauftrag.php index 53842d1e4..8c593e354 100644 --- a/application/views/lehre/lehrauftrag/approveLehrauftrag.php +++ b/application/views/lehre/lehrauftrag/approveLehrauftrag.php @@ -272,6 +272,7 @@ $this->load->view( field: "status", width:40, align:"center", + downloadTitle: 'Status', formatter: status_formatter, tooltip: status_tooltip }, true diff --git a/application/views/lehre/lehrauftrag/approveLehrauftragData.php b/application/views/lehre/lehrauftrag/approveLehrauftragData.php index 09899fd8b..b6d792283 100644 --- a/application/views/lehre/lehrauftrag/approveLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/approveLehrauftragData.php @@ -86,8 +86,8 @@ FROM SELECT *, /* concatinated and aggregated gruppen */ (SELECT - string_agg(concat(stg_typ_kurzbz, \'-\', semester, verband, gruppe, - \'\n\' || gruppe_kurzbz), \', \') + string_agg(concat(stg_typ_kurzbz, \'-\', semester, verband, gruppe + || gruppe_kurzbz), \', \') FROM lehre.tbl_lehreinheitgruppe WHERE @@ -186,8 +186,8 @@ FROM LIMIT 1) AS "mitarbeiter_uid", /* concatinated and aggregated gruppen */ (SELECT - string_agg(concat(stg_typ_kurzbz, \'-\', semester, verband, gruppe, - \'\n\' || gruppe_kurzbz), \', \') + string_agg(concat(stg_typ_kurzbz, \'-\', semester, verband, gruppe + || gruppe_kurzbz), \', \') FROM lehre.tbl_lehreinheitgruppe WHERE diff --git a/application/views/lehre/lehrauftrag/orderLehrauftrag.php b/application/views/lehre/lehrauftrag/orderLehrauftrag.php index 8d81d1578..6319810d6 100644 --- a/application/views/lehre/lehrauftrag/orderLehrauftrag.php +++ b/application/views/lehre/lehrauftrag/orderLehrauftrag.php @@ -276,6 +276,7 @@ $this->load->view( field: "status", width:40, align:"center", + downloadTitle: 'Status', formatter: status_formatter, tooltip: status_tooltip }, true @@ -320,18 +321,6 @@ $this->load->view( }); } - function func_renderComplete(table){ - // console.log(table.getDataCount()); - // Display message if table is empty - // TODO: msg funktioniert, aber wenn beim filtern kein Ergebnis (0 rows), und man den filter nachher wegmacht, - // TODO: bleibt die msg. Ev gleich am anfang check: nur wenn nicht gefiltert. ODER ev besser: nicht in renderStarted, sondern tabelBuilt - // if (table.getRows( == 0) - // { - // table.element.childNodes.item(1).innerHTML = - // '
Es sind keine Lehraufträge vorhanden.
'; - // } - } - // Performes after row was updated function func_rowUpdated(row){ diff --git a/application/views/lehre/lehrauftrag/orderLehrauftragData.php b/application/views/lehre/lehrauftrag/orderLehrauftragData.php index 320cbeddc..7bf08193a 100644 --- a/application/views/lehre/lehrauftrag/orderLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/orderLehrauftragData.php @@ -88,8 +88,8 @@ FROM SELECT *, /* concatinated and aggregated gruppen */ (SELECT - string_agg(concat(stg_typ_kurzbz, \'-\', semester, verband, gruppe, - \'\n\' || gruppe_kurzbz), \', \') + string_agg(concat(stg_typ_kurzbz, \'-\', semester, verband, gruppe + || gruppe_kurzbz), \', \') FROM lehre.tbl_lehreinheitgruppe WHERE @@ -190,8 +190,8 @@ FROM LIMIT 1) AS "mitarbeiter_uid", /* concatinated and aggregated gruppen */ (SELECT - string_agg(concat(stg_typ_kurzbz, \'-\', semester, verband, gruppe, - \'\n\' || gruppe_kurzbz), \', \') + string_agg(concat(stg_typ_kurzbz, \'-\', semester, verband, gruppe + || gruppe_kurzbz), \', \') FROM lehre.tbl_lehreinheitgruppe WHERE @@ -364,9 +364,6 @@ $filterWidgetArray = array( renderStarted:function(){ func_renderStarted(this); }, - renderComplete:function(){ - func_renderComplete(this); - }, tableBuilt: function(){ func_tableBuilt(this); },