From 862c63604da38a3f47bc0046dc550d652a8b637f Mon Sep 17 00:00:00 2001 From: Djery-Tom Date: Mon, 14 Feb 2022 19:14:45 +0100 Subject: [PATCH] Add history of expired insurance --- application/controllers/Hyperviseur_dash.php | 2 + application/language/english/message_lang.php | 1 + application/language/french/message_lang.php | 1 + .../nano_health/hyper/infos_insurance.php | 4 +- .../hyper/insurances_expired_insured.php | 245 ++++++++++++++++++ .../nano_health/hyper/insurances_insured.php | 27 +- 6 files changed, 269 insertions(+), 11 deletions(-) create mode 100755 application/views/nano_health/hyper/insurances_expired_insured.php diff --git a/application/controllers/Hyperviseur_dash.php b/application/controllers/Hyperviseur_dash.php index 0005f7aa..f06c8899 100755 --- a/application/controllers/Hyperviseur_dash.php +++ b/application/controllers/Hyperviseur_dash.php @@ -625,6 +625,8 @@ class Hyperviseur_dash extends CI_Controller $this->load->view('nano_health/hyper/insurances_subscriptions.php'); else if ($type == 'insurance-insured') $this->load->view('nano_health/hyper/insurances_insured.php'); + else if ($type == 'insurance-expired-insured') + $this->load->view('nano_health/hyper/insurances_expired_insured.php'); else if ($type == 'insurance-health_care_sheets') $this->load->view('nano_health/hyper/insurances_health_care_sheets.php'); else if ($type == 'insurance-invoices') diff --git a/application/language/english/message_lang.php b/application/language/english/message_lang.php index a591ab54..cddf6f44 100755 --- a/application/language/english/message_lang.php +++ b/application/language/english/message_lang.php @@ -866,4 +866,5 @@ $lang['beneficiaries_deletion_history'] = "Deletion history of beneficiaries"; $lang['deletion_date'] = "Date of deletion"; $lang['STOP_INSURANCE'] = "Stopping insurance"; $lang['RENEWAL'] = "Insurance renewal"; +$lang['expired_insurance'] = "Insurance expired"; ?> diff --git a/application/language/french/message_lang.php b/application/language/french/message_lang.php index e9044d25..d9f2fd31 100755 --- a/application/language/french/message_lang.php +++ b/application/language/french/message_lang.php @@ -877,4 +877,5 @@ $lang['beneficiaries_deletion_history'] = "Historique de suppression des ayants $lang['deletion_date'] = "Date de suppression"; $lang['STOP_INSURANCE'] = "Arrêt de l'assurance"; $lang['RENEWAL'] = "Renouvellement de l'assurance"; +$lang['expired_insurance'] = "Assurances arrivées à échéance"; ?> diff --git a/application/views/nano_health/hyper/infos_insurance.php b/application/views/nano_health/hyper/infos_insurance.php index 84664390..58b699af 100755 --- a/application/views/nano_health/hyper/infos_insurance.php +++ b/application/views/nano_health/hyper/infos_insurance.php @@ -494,8 +494,8 @@ toastr.options.closeEasing = 'swing'; $(document).ready(function () { - $('#start_at').text(moment("start_at?>", 'YYYY-MM-DD HH:mm:ss').format('D MMMM YYYY HH:mm:s')); - $('#end_at').text(moment("end_at?>", 'YYYY-MM-DD HH:mm:ss').format('D MMMM YYYY HH:mm:s')); + $('#start_at').text(moment("start_at?>", 'YYYY-MM-DD').format('D MMMM YYYY')); + $('#end_at').text(moment("end_at?>", 'YYYY-MM-DD').format('D MMMM YYYY')); }); diff --git a/application/views/nano_health/hyper/insurances_expired_insured.php b/application/views/nano_health/hyper/insurances_expired_insured.php new file mode 100755 index 00000000..bfe7a7b6 --- /dev/null +++ b/application/views/nano_health/hyper/insurances_expired_insured.php @@ -0,0 +1,245 @@ + + + + + +
+ + +
+

+ lang->line('expired_insurance') ?> + + +

+
+
+
+
+
+ +
+ lang->line('Période') ?> + + + + + Format : session->userdata('site_lang') === 'french' ? 'Jour - Mois - Année ' : 'Year - Month - Day' ?> +
+
+
+ + +
+
+
+
+
+

lang->line('export_insured_list') ?>

+
+
+
+
+ + + + + + + + + + + + + + + + +
lang->line('insured_id') ?>lang->line('Nom') ?>lang->line('Contact') ?>lang->line('number_of_months') ?>lang->line('number_of_beneficiaries') ?>lang->line('bonus_amount') ?>lang->line('start_at') ?>lang->line('end_at') ?>lang->line('subscription_date') ?>Action
+
+
+
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/views/nano_health/hyper/insurances_insured.php b/application/views/nano_health/hyper/insurances_insured.php index 69f68359..0777181e 100755 --- a/application/views/nano_health/hyper/insurances_insured.php +++ b/application/views/nano_health/hyper/insurances_insured.php @@ -44,7 +44,9 @@

lang->line('export_insured_list') ?>

@@ -134,11 +136,18 @@ "type": "POST" }, "aaSorting": [[8, "desc"]], - "columnDefs": [{ - "targets": [6,7,8], + "columnDefs": [ + { + "targets": [6,7], // "orderable": false, - render: $.fn.dataTable.render.moment('YYYY-MM-DD HH:mm:ss', 'D MMMM YYYY HH:mm:ss', format) - }], + render: $.fn.dataTable.render.moment('YYYY-MM-DD', 'D MMMM YYYY', format) + }, + { + "targets": [8], + // "orderable": false, + render: $.fn.dataTable.render.moment('YYYY-MM-DD HH:mm:ss', 'D MMMM YYYY HH:mm:ss', format) + } + ], dom: 'Bfrtip', "buttons": [ 'pageLength', @@ -220,9 +229,9 @@ const debut = start.format('YYYY-MM-DD'); const fin = end.format('YYYY-MM-DD'); if(category) - window.location = "" + "?history=insurance-subscriptions" + "&d=" + debut + "&f=" + fin; + window.location = "" + "?history=insurance-insured" + "&d=" + debut + "&f=" + fin; else - window.location = "" + "?id="+id_network+"&history=insurance-subscriptions" + "&d=" + debut + "&f=" + fin; + window.location = "" + "?id="+id_network+"&history=insurance-insured" + "&d=" + debut + "&f=" + fin; }); @@ -230,9 +239,9 @@ //do something, like clearing an input $('#daterange').val(''); if(category) - window.location = "" + "?history=insurance-subscriptions"; + window.location = "" + "?history=insurance-insured"; else - window.location = "" + "?id="+id_network+"&history=insurance-subscriptions"; + window.location = "" + "?id="+id_network+"&history=insurance-insured"; }); });