From 38687905e166042ea815735efbf4343c9ea16d9e Mon Sep 17 00:00:00 2001 From: bitbucket Date: Fri, 31 May 2024 09:50:27 +0530 Subject: [PATCH] CHANGE_ template CRUD:GWM --- app/Controllers/MasterController.php | 12 +- app/Views/service_list.php | 2 +- app/Views/template_form.php | 24 +++- app/Views/template_list.php | 116 ++++++++++++------ app/Views/template_preview.php | 78 ++---------- .../debugbar/debugbar_1717052666.547989.json | 1 - .../debugbar/debugbar_1717052671.679911.json | 1 - .../debugbar/debugbar_1717052866.912336.json | 1 - .../debugbar/debugbar_1717052870.470063.json | 1 - .../debugbar/debugbar_1717052920.860652.json | 1 - 10 files changed, 122 insertions(+), 115 deletions(-) delete mode 100644 writable/debugbar/debugbar_1717052666.547989.json delete mode 100644 writable/debugbar/debugbar_1717052671.679911.json delete mode 100644 writable/debugbar/debugbar_1717052866.912336.json delete mode 100644 writable/debugbar/debugbar_1717052870.470063.json delete mode 100644 writable/debugbar/debugbar_1717052920.860652.json diff --git a/app/Controllers/MasterController.php b/app/Controllers/MasterController.php index 0de7f95..1eb3304 100644 --- a/app/Controllers/MasterController.php +++ b/app/Controllers/MasterController.php @@ -40,7 +40,10 @@ class MasterController extends BaseController public function service_list() { if(!$this->session->has('is_staff_logged_in')){ return redirect()->to(base_url().'staff'); } - $data['serviceList'] = $this->ServiceModel->findAll(); + // $data['serviceList'] = $this->ServiceModel->findAll(); + $data['serviceList'] = $this->ServiceModel->select('services.* , COUNT(template.template_id) as template_count') + ->join('template', 'services.service_id = template.service_id', 'left') + ->findAll(); $staffdata = $this->StaffModel->where('staff_id',$this->session->get('is_staff_logged_in'))->get()->getRow(); echo view('layout/header', ['Data'=>$staffdata]); @@ -180,12 +183,15 @@ class MasterController extends BaseController $data['serviceData'] = $this->ServiceModel->where('service_id',$data['templateData']->service_id)->get()->getRow(); $staffdata = $this->StaffModel->where('staff_id',$this->session->get('is_staff_logged_in'))->get()->getRow(); - echo view('layout/header', ['Data'=>$staffdata]); + $data['body_html'] = $data['templateData']->body_html; + // echo view('layout/header', ['Data'=>$staffdata]); echo view('template_preview',$data); - echo view('layout/footer'); + // echo view('layout/footer'); } + // str_replace("%name%","Gowtham",$data['templateData']->body_html); + diff --git a/app/Views/service_list.php b/app/Views/service_list.php index 7bf2671..5c47c79 100644 --- a/app/Views/service_list.php +++ b/app/Views/service_list.php @@ -43,7 +43,7 @@ - + diff --git a/app/Views/template_form.php b/app/Views/template_form.php index 7612dff..86a79f2 100644 --- a/app/Views/template_form.php +++ b/app/Views/template_form.php @@ -110,6 +110,26 @@
Email
%email%
+
+
Address
+
%address%
+
+
+
Country
+
%country%
+
+
+
State
+
%state%
+
+
+
City
+
%city%
+
+
+
PIN
+
%pin_code%
+
@@ -185,9 +205,9 @@ $(document).ready(function() { ['font', ['bold', 'italic', 'underline', 'clear']], ['fontname', ['fontname']], ['color', ['color']], - ['para', ['ul', 'ol', 'paragraph']], + ['para', ['ul', 'ol', 'paragraph' , 'height']], ['table', ['table']], - ['insert', ['link', 'picture', 'video']], + // ['insert', ['link', 'picture', 'video']], ['view', ['fullscreen', 'codeview', 'help']], ['mybutton', ['customButton']] // Custom button group ], diff --git a/app/Views/template_list.php b/app/Views/template_list.php index fd6d801..04bde6c 100644 --- a/app/Views/template_list.php +++ b/app/Views/template_list.php @@ -9,7 +9,7 @@
-

Templates

+

Service And Templates

Create New @@ -35,7 +35,7 @@

notes; ?>

- +
@@ -58,7 +58,11 @@ @@ -79,51 +83,66 @@ - - -
Template Name
<\/th>template_id<\/th>service_id<\/th>template_name<\/th>header_type<\/th>body_text<\/th>body_html<\/th>created_at<\/th>created_by<\/th>updated_at<\/th>updated_by<\/th>is_active<\/th><\/tr><\/thead>
0<\/th>11<\/td>4<\/td>edit test <\/td>Normal<\/td>Dear %name% ,                       contenthhhhhhhhhhhhhhhhhhhhhhbbbbbbbbbbbb...<\/td><p><b>Dear&nbsp;<\/b><span style=\"font-size: 0.875rem;\">%name% ,&nbsp;<br>&nbs...<\/td>2024-05-30 11:58:07<\/td>0<\/td>2024-05-30 12:10:10<\/td>0<\/td>1<\/td><\/tr>
1<\/th>12<\/td>4<\/td>STRIKE OFF OF THE COMPANY<\/td>Normal<\/td>Sir(s), <\/td><p>Sir(s),&nbsp;<\/p><p style=\"text-align: center; \"><b><u>CORPORATE SECRETARI...<\/td>2024-05-30 12:06:51<\/td>0<\/td>2024-05-30 12:06:51<\/td>0<\/td>1<\/td><\/tr>
2<\/th>13<\/td>4<\/td>ava<\/td>ava<\/td>avav avav aevav<\/td><p>avav avav aevav<\/p><\/td>2024-05-30 12:11:13<\/td>0<\/td>2024-05-30 12:11:13<\/td>0<\/td>1<\/td><\/tr><\/tbody><\/table><\/pre><\/li>
  • ⇄<\/span>⧉<\/span>