Customer group,notify template creation 2 : ps
This commit is contained in:
parent
602b165d90
commit
6b0066c732
@ -21,7 +21,7 @@ class Business extends BaseController
|
|||||||
$where = ['isactive !=' => NULL];
|
$where = ['isactive !=' => NULL];
|
||||||
}
|
}
|
||||||
$BusinessModel = new BusinessModel();
|
$BusinessModel = new BusinessModel();
|
||||||
$data['page_name'] = 'Buiness Listing';
|
$data['page_name'] = 'Buiness Details';
|
||||||
$data['businesses'] = $BusinessModel->where($where)->findAll();
|
$data['businesses'] = $BusinessModel->where($where)->findAll();
|
||||||
// $data['lastQuery'] = $BusinessModel->getLastQuery();
|
// $data['lastQuery'] = $BusinessModel->getLastQuery();
|
||||||
// print_r($data);die;
|
// print_r($data);die;
|
||||||
|
|||||||
@ -24,7 +24,7 @@ class Customer extends BaseController
|
|||||||
}
|
}
|
||||||
$CustomerModel = new CustomerModel();
|
$CustomerModel = new CustomerModel();
|
||||||
|
|
||||||
$data['page_name'] = 'Customer Listing';
|
$data['page_name'] = 'Customer Details';
|
||||||
$data['customer'] = $CustomerModel->where($where)->orderBy('customer_id', 'DESC')->findAll();
|
$data['customer'] = $CustomerModel->where($where)->orderBy('customer_id', 'DESC')->findAll();
|
||||||
|
|
||||||
// print_r($data); die();
|
// print_r($data); die();
|
||||||
@ -43,7 +43,7 @@ class Customer extends BaseController
|
|||||||
|
|
||||||
if ($id === '0') {
|
if ($id === '0') {
|
||||||
// Add Customer
|
// Add Customer
|
||||||
$data['page_name'] = 'Add Customer';
|
$data['page_name'] = 'Add Customer Details';
|
||||||
$data['customer'] = [];
|
$data['customer'] = [];
|
||||||
$data['customer_billing'] = [];
|
$data['customer_billing'] = [];
|
||||||
$data['customer_shipping'] = [];
|
$data['customer_shipping'] = [];
|
||||||
@ -51,7 +51,7 @@ class Customer extends BaseController
|
|||||||
$data['invoices'] = [];
|
$data['invoices'] = [];
|
||||||
} else if ($id !== '0') {
|
} else if ($id !== '0') {
|
||||||
// Edit Customer
|
// Edit Customer
|
||||||
$data['page_name'] = 'Edit Customer';
|
$data['page_name'] = 'Edit Customer Details';
|
||||||
|
|
||||||
// Load your Customer Model
|
// Load your Customer Model
|
||||||
$customerModel = new CustomerModel();
|
$customerModel = new CustomerModel();
|
||||||
@ -292,7 +292,7 @@ class Customer extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function customer_group(){
|
public function customer_group(){
|
||||||
$data['page_name'] = 'Customer Group';
|
$data['page_name'] = 'Customer Group Details';
|
||||||
$model = new CustomerModel();
|
$model = new CustomerModel();
|
||||||
$data['customer_group'] = $model->getGroupDetails();
|
$data['customer_group'] = $model->getGroupDetails();
|
||||||
$this->render_page('customer_group', $data);
|
$this->render_page('customer_group', $data);
|
||||||
@ -303,33 +303,35 @@ class Customer extends BaseController
|
|||||||
|
|
||||||
$data['field'] = [
|
$data['field'] = [
|
||||||
'' => 'Choose the Field',
|
'' => 'Choose the Field',
|
||||||
'city' => 'City',
|
'C.type' => 'Type',
|
||||||
'state' => 'State',
|
'CA.city' => 'City',
|
||||||
'type' => 'Type',
|
'CA.state' => 'State',
|
||||||
'postal code' => 'Postal Code',
|
'CM.name' => 'Category',
|
||||||
'schemes' => 'Schemes',
|
'I.invoice_date' => 'Invoice Date',
|
||||||
'category' => 'Category'
|
'S.to_subscription' => 'Due Date',
|
||||||
];
|
];
|
||||||
$data['operator'] = [
|
$data['operator'] = [
|
||||||
'' => 'Choose the operator',
|
'' => 'Choose the operator',
|
||||||
'equal' => 'equal to (=)',
|
'equal' => 'Equal to (=)',
|
||||||
'not equal' => 'not equal (!=)',
|
'not equal' => 'Not Equal (!=)',
|
||||||
'like' => 'like (%)',
|
'like' => 'Like (%)',
|
||||||
'contain' => 'contain (in)',
|
'greater than' => 'Greater than (>)',
|
||||||
'not contain' => 'not contain (not in)',
|
'greater than or equal to' => 'Greater than or Equal to (>=)',
|
||||||
'between' => 'between (between)',
|
'less than' => 'Less than (<)',
|
||||||
'greater than' => 'greater than (>)',
|
'less than or equal to' => 'Less than or Equal to (<=)',
|
||||||
'greater than or equal to' => 'greater than or equal to (>=)',
|
'contain' => 'Contain (in)',
|
||||||
'less than' => 'lesser than (<)',
|
'not contain' => 'Not Contain (not in)',
|
||||||
'less than or equal to' => 'greater than or equal to (<=)'
|
'between' => 'Between',
|
||||||
|
'is null' => 'Is NULL',
|
||||||
|
'is not null' => 'Is Not NULL',
|
||||||
];
|
];
|
||||||
$data['customer_group'] = [];
|
$data['customer_group'] = [];
|
||||||
if ($id === '0') {
|
if ($id === '0') {
|
||||||
// Add Customer
|
// Add Customer
|
||||||
$data['page_name'] = 'Customer Group From';
|
$data['page_name'] = 'Add Customer Group';
|
||||||
} else if ($id !== '0') {
|
} else if ($id !== '0') {
|
||||||
// Edit Customer
|
// Edit Customer
|
||||||
$data['page_name'] = 'Customer Group From';
|
$data['page_name'] = 'Edit Customer Group';
|
||||||
|
|
||||||
// Load your Customer Model
|
// Load your Customer Model
|
||||||
$model = new CustomerModel();
|
$model = new CustomerModel();
|
||||||
@ -339,9 +341,9 @@ class Customer extends BaseController
|
|||||||
|
|
||||||
if (!empty($result)) {
|
if (!empty($result)) {
|
||||||
$data['customer_group']['groupname'] = $result[0]['group_name'];
|
$data['customer_group']['groupname'] = $result[0]['group_name'];
|
||||||
$data['customer_group']['column'] = unserialize($result[0]['column']);
|
$data['customer_group']['column'] = $result[0]['column'] ? unserialize($result[0]['column']) : [];
|
||||||
$data['customer_group']['operator'] = unserialize($result[0]['operator']);
|
$data['customer_group']['operator'] = $result[0]['operator'] ? unserialize($result[0]['operator']) : [];
|
||||||
$data['customer_group']['values'] = unserialize($result[0]['value']);
|
$data['customer_group']['values'] = $result[0]['value'] ? unserialize($result[0]['value']) : [];
|
||||||
$data['customer_group']['group_id'] = $result[0]['group_id'];
|
$data['customer_group']['group_id'] = $result[0]['group_id'];
|
||||||
$data['customer_group']['isactive'] = $result[0]['isactive'];
|
$data['customer_group']['isactive'] = $result[0]['isactive'];
|
||||||
}
|
}
|
||||||
@ -349,6 +351,7 @@ class Customer extends BaseController
|
|||||||
$this->render_page('customer_group_form', $data);
|
$this->render_page('customer_group_form', $data);
|
||||||
}
|
}
|
||||||
public function preview_customer_group($id){
|
public function preview_customer_group($id){
|
||||||
|
try {
|
||||||
helper('session');
|
helper('session');
|
||||||
$model = new CustomerModel();
|
$model = new CustomerModel();
|
||||||
$model->setTable('customer_groups');
|
$model->setTable('customer_groups');
|
||||||
@ -356,9 +359,22 @@ class Customer extends BaseController
|
|||||||
$result = $model->where($where)->findAll();
|
$result = $model->where($where)->findAll();
|
||||||
$db = \Config\Database::connect();
|
$db = \Config\Database::connect();
|
||||||
$sql = (string)$result[0]['group_query'];
|
$sql = (string)$result[0]['group_query'];
|
||||||
$query = $db->query($sql);
|
if($sql){
|
||||||
$results = $query->getResultArray();
|
$query = $db->query($sql);
|
||||||
return $this->response->setJSON($results);
|
$results = $query->getResultArray();
|
||||||
|
if(empty($results)){
|
||||||
|
throw new \Exception("Data Not Available");
|
||||||
|
}else{
|
||||||
|
return $this->response->setJSON($results);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return $this->response->setJSON([]);
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error("Customer Group: Err Occur = ".$e->getMessage()." File = ". $e->getFile() . " Line = " . $e->getLine());
|
||||||
|
session()->setFlashdata('error', 'Message: ' . $e->getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public function delete_customer_group($id){
|
public function delete_customer_group($id){
|
||||||
try {
|
try {
|
||||||
@ -419,23 +435,23 @@ class Customer extends BaseController
|
|||||||
// Handle different operators and build corresponding conditions
|
// Handle different operators and build corresponding conditions
|
||||||
switch ($operator) {
|
switch ($operator) {
|
||||||
case 'equal':
|
case 'equal':
|
||||||
$conditionStrings[] = "$column = '$value'";
|
$conditionStrings[] = "LOWER($column) = LOWER('$value') ";
|
||||||
break;
|
break;
|
||||||
case 'not equal':
|
case 'not equal':
|
||||||
$conditionStrings[] = "$column <> '$value'";
|
$conditionStrings[] = "LOWER($column) <> LOWER('$value') ";
|
||||||
break;
|
break;
|
||||||
case 'like':
|
case 'like':
|
||||||
$conditionStrings[] = "$column LIKE '%$value%'";
|
$conditionStrings[] = "LOWER($column) LIKE '%$value%'";
|
||||||
break;
|
break;
|
||||||
case 'contain':
|
case 'contain':
|
||||||
case 'where in':
|
case 'in':
|
||||||
$values = explode(',', $value);
|
$values = explode(',', $value);
|
||||||
$conditions[] = "$column IN ('" . implode("', '", $values) . "')";
|
$conditionStrings[] = "LOWER($column) IN ('" . implode("', '", $values) . "')";
|
||||||
break;
|
break;
|
||||||
case 'not contain':
|
case 'not contain':
|
||||||
case 'where not in':
|
case 'not in':
|
||||||
$values = explode(',', $value);
|
$values = explode(',', $value);
|
||||||
$conditions[] = "$column NOT IN ('" . implode("', '", $values) . "')";
|
$conditionStrings[] = "LOWER($column) NOT IN ('" . implode("', '", $values) . "')";
|
||||||
break;
|
break;
|
||||||
case 'between':
|
case 'between':
|
||||||
$dates = explode(',', $value);
|
$dates = explode(',', $value);
|
||||||
@ -453,6 +469,12 @@ class Customer extends BaseController
|
|||||||
case 'less than or equal to':
|
case 'less than or equal to':
|
||||||
$conditionStrings[] = "$column <= $value";
|
$conditionStrings[] = "$column <= $value";
|
||||||
break;
|
break;
|
||||||
|
case 'is null':
|
||||||
|
$conditionStrings[] = "$column IS NULL";
|
||||||
|
break;
|
||||||
|
case 'is not null':
|
||||||
|
$conditionStrings[] = "$column IS NOT NULL";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -467,20 +489,28 @@ class Customer extends BaseController
|
|||||||
|
|
||||||
// Now you can use $whereCondition in your SQL query
|
// Now you can use $whereCondition in your SQL query
|
||||||
$db = \Config\Database::connect();
|
$db = \Config\Database::connect();
|
||||||
$sql = "SELECT customer_id,CONCAT(first_name,'',last_name) as customer_name,email,mobile_no FROM customers WHERE ".$whereCondition;
|
// $sql = "SELECT customer_id,CONCAT(first_name,'',last_name) as customer_name,email,mobile_no FROM customers WHERE ".$whereCondition;
|
||||||
|
$sql = "SELECT CA.city,CA.state,I.invoice_date,C.customer_id,CONCAT(C.first_name,'',C.last_name) as customer_name,C.email,C.mobile_no ,S.to_subscription as due_date, C.isactive ,count(I.invoice_id) as invoice_count_raised_by_customer, S.scheme_id , CM.name
|
||||||
|
FROM customers as C
|
||||||
|
LEFT JOIN invoice I on I.customer_id = C.customer_id and I.isactive = 1
|
||||||
|
LEFT JOIN customer_addresses CA on CA.customer_id = C.customer_id and CA.address_type = 1 and CA.isactive = 1
|
||||||
|
LEFT JOIN subscription S on S.customer_id = C.customer_id
|
||||||
|
LEFT JOIN category CM on CM.id = S.scheme_id
|
||||||
|
WHERE C.isactive = 1 AND ".$whereCondition." GROUP BY C.customer_id";
|
||||||
|
$this->logger->info("Customer Group: SQL = ".$sql);
|
||||||
// echo $sql;
|
// echo $sql;
|
||||||
// Execute the query
|
// Execute the query
|
||||||
$query = $db->query($sql);
|
$query = $db->query($sql);
|
||||||
|
|
||||||
// Get the result
|
// Get the result
|
||||||
$results = $query->getResult();
|
$results = $query->getResult();
|
||||||
|
$this->logger->info("Customer Group: ".json_encode($results));
|
||||||
$group_id = $request_data['group_id']; // Get the ID for update
|
$group_id = $request_data['group_id']; // Get the ID for update
|
||||||
$isactive = $request_data['isactive'];
|
$isactive = $group_id != "" ? $request_data['isactive'] : 'on';
|
||||||
if($string_flag == "save"){
|
if($string_flag == "save"){
|
||||||
$data['group_query'] = $sql;
|
$data['group_query'] = $sql;
|
||||||
$data['group_id'] = $group_id;
|
$data['group_id'] = $group_id;
|
||||||
$data['isactive'] = $group_id ? (($isactive == 'on') ? 1 : 0) : 1;
|
$data['isactive'] = (($isactive == 'on') ? 1 : 0);
|
||||||
$data['created_by'] = $session_uid;
|
$data['created_by'] = $session_uid;
|
||||||
$data['updated_by'] = $session_uid;
|
$data['updated_by'] = $session_uid;
|
||||||
$statement = $model->saveGroupDetails($data);
|
$statement = $model->saveGroupDetails($data);
|
||||||
|
|||||||
@ -141,7 +141,7 @@ class Notifications extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function template_creation(){
|
public function template_creation(){
|
||||||
$data['page_name'] = 'Template';
|
$data['page_name'] = 'Template Details';
|
||||||
$model = new NotificationModel();
|
$model = new NotificationModel();
|
||||||
$data['template'] = $model->getTemplateDetails();
|
$data['template'] = $model->getTemplateDetails();
|
||||||
$this->render_page('template_creation', $data);
|
$this->render_page('template_creation', $data);
|
||||||
@ -221,15 +221,14 @@ class Notifications extends BaseController
|
|||||||
$session_uid = get_logged_user_id();
|
$session_uid = get_logged_user_id();
|
||||||
$id = $this->request->getPost('template_id');
|
$id = $this->request->getPost('template_id');
|
||||||
$subject = $this->request->getPost('subject') ? $this->request->getPost('subject') : NULL;
|
$subject = $this->request->getPost('subject') ? $this->request->getPost('subject') : NULL;
|
||||||
$isactive = $this->request->getPost('isactive');
|
$isactive = $id != "" ? $this->request->getPost('isactive') : 'on';
|
||||||
$data = [
|
$data = [
|
||||||
'template_id' => $id,
|
'template_id' => $id,
|
||||||
'template_name' => $this->request->getPost('templatename'),
|
'template_name' => $this->request->getPost('templatename'),
|
||||||
'subject' => $subject,
|
'subject' => $subject,
|
||||||
'message' => $this->request->getPost('templatemessage'),
|
'message' => $this->request->getPost('templatemessage'),
|
||||||
'mode' => $this->request->getPost('mode'),
|
'mode' => $this->request->getPost('mode'),
|
||||||
'group_id' => $this->request->getPost('group_id'),
|
'isactive' => (($isactive == 'on') ? 1 : 0),
|
||||||
'isactive' => $id ? (($isactive == 'on') ? 1 : 0) : 1,
|
|
||||||
'created_by' => $session_uid,
|
'created_by' => $session_uid,
|
||||||
'updated_by' => $session_uid
|
'updated_by' => $session_uid
|
||||||
];
|
];
|
||||||
@ -243,8 +242,6 @@ class Notifications extends BaseController
|
|||||||
}else{
|
}else{
|
||||||
throw new \Exception("Template: Err Occur");
|
throw new \Exception("Template: Err Occur");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}catch(\Exception $e) {
|
}catch(\Exception $e) {
|
||||||
$this->logger->error("Template: Err Occur =".$e->getMessage());
|
$this->logger->error("Template: Err Occur =".$e->getMessage());
|
||||||
session()->setFlashdata('error', 'Message: ' .$e->getMessage());
|
session()->setFlashdata('error', 'Message: ' .$e->getMessage());
|
||||||
@ -253,7 +250,7 @@ class Notifications extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function campaign_creation(){
|
public function campaign_creation(){
|
||||||
$data['page_name'] = 'Campaign';
|
$data['page_name'] = 'Campaign Details';
|
||||||
$model = new NotificationModel();
|
$model = new NotificationModel();
|
||||||
$data['campaign'] = $model->getCampaignDetails();
|
$data['campaign'] = $model->getCampaignDetails();
|
||||||
$this->render_page('campaign_creation', $data);
|
$this->render_page('campaign_creation', $data);
|
||||||
|
|||||||
@ -22,7 +22,7 @@ class Scheme extends BaseController
|
|||||||
}
|
}
|
||||||
$SchemeModel = new SchemeModel();
|
$SchemeModel = new SchemeModel();
|
||||||
|
|
||||||
$data['page_name'] = 'Scheme Listing';
|
$data['page_name'] = 'Scheme Details';
|
||||||
$data['scheme'] = $SchemeModel->getSchemeNamesAndDurationsByBusiness($session_bid);
|
$data['scheme'] = $SchemeModel->getSchemeNamesAndDurationsByBusiness($session_bid);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -41,8 +41,7 @@ class NotificationModel extends Model
|
|||||||
return $this->db->table('templates as T' )
|
return $this->db->table('templates as T' )
|
||||||
->join('users as U1', 'U1.user_id = T.created_by', 'left')
|
->join('users as U1', 'U1.user_id = T.created_by', 'left')
|
||||||
->join('users as U2', 'U2.user_id = T.updated_by', 'left')
|
->join('users as U2', 'U2.user_id = T.updated_by', 'left')
|
||||||
->join('customer_groups as CG', 'CG.group_id = T.group_id', 'left')
|
->select('T.template_id,T.template_name,T.mode,T.created_on,T.created_by,T.updated_on,T.updated_by,DATE_FORMAT(T.created_on, "%d-%m-%Y %h:%i %p") AS formatted_created_on,concat(U1.first_name," ",U1.last_name) as created_by_name,concat(U2.first_name," ",U2.last_name) as updated_by_name,T.isactive')
|
||||||
->select('T.template_id,T.template_name,T.mode,CG.group_id,CG.group_name,T.created_on,T.created_by,T.updated_on,T.updated_by,DATE_FORMAT(T.created_on, "%d-%m-%Y %h:%i %p") AS formatted_created_on,concat(U1.first_name," ",U1.last_name) as created_by_name,concat(U2.first_name," ",U2.last_name) as updated_by_name,T.isactive')
|
|
||||||
->get()->getResultArray();
|
->get()->getResultArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="float-right">
|
<div class="float-right">
|
||||||
<a href="<?= base_url() . "book_page/0"; ?>" class="btn btn-primary waves-effect"> <span> <i class="mdi mdi-book-plus"></i></span> Add New </a>
|
<a href="<?= base_url() . "book_page/0"; ?>" class="btn btn-primary waves-effect"> <span> <i class="mdi mdi-book-plus"></i></span> Add Book </a>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
||||||
@ -66,7 +66,7 @@
|
|||||||
<td>
|
<td>
|
||||||
|
|
||||||
<a href="<?php echo $edit_page_route; ?>" class="edit-button"> <i class="ri-pencil-line"></i></a>
|
<a href="<?php echo $edit_page_route; ?>" class="edit-button"> <i class="ri-pencil-line"></i></a>
|
||||||
<a href="<?php echo "delete_books/" . $row['book_id']; ?>" class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
<a href="<?= base_url() . "delete_books/" . $row['book_id']; ?>" class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
<h4 class="header-title"><?= $page_name; ?></h4>
|
<h4 class="header-title"><?= $page_name; ?></h4>
|
||||||
<p class="sub-header"> </p>
|
<p class="sub-header"> </p>
|
||||||
|
|
||||||
<form class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?php echo base_url(); ?>insert_business">
|
<form class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?= base_url() . "insert_business"; ?>" >
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
|
|||||||
@ -39,9 +39,9 @@
|
|||||||
<td><?= $business['postal_code']; ?></td>
|
<td><?= $business['postal_code']; ?></td>
|
||||||
<td><?= $business['business_logo']; ?></td>
|
<td><?= $business['business_logo']; ?></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="<?= "new_bussiness/" . $business['business_id']; ?>" class="edit-button" title="Click to Edit Business"><i class="ri-pencil-line"></i></a>
|
<a href="<?= base_url() . "new_bussiness/" . $business['business_id']; ?>" class="edit-button" title="Click to Edit Business"><i class="ri-pencil-line"></i></a>
|
||||||
<?php if($loggedin_person_role === 'sadmin'): ?>
|
<?php if($loggedin_person_role === 'sadmin'): ?>
|
||||||
<a href="<?= "delete_business/" . $business['business_id']; ?>" class="delete-button" title="Click to Delete Business"><i class="ri-delete-bin-line"></i></a>
|
<a href="<?= base_url() . "delete_business/" . $business['business_id']; ?>" class="delete-button" title="Click to Delete Business"><i class="ri-delete-bin-line"></i></a>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -62,7 +62,7 @@
|
|||||||
<td><span class="<?php echo $class; ?>"><?php echo $message; ?></span></td>
|
<td><span class="<?php echo $class; ?>"><?php echo $message; ?></span></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="<?= base_url()."campaign_creation_form/".$c['campaign_id']; ?>" class="edit-button" title="Click to Edit Campaign" ><i class="ri-pencil-line"></i></a>
|
<a href="<?= base_url()."campaign_creation_form/".$c['campaign_id']; ?>" class="edit-button" title="Click to Edit Campaign" ><i class="ri-pencil-line"></i></a>
|
||||||
<?php if ($c['isactive']) { ?> <a href="<?php echo "campaign_creation_delete/".$c['campaign_id']; ?>" class="delete-button" title="Click to Delete Campaign" ><i class="ri-delete-bin-line"></i></a> <?php } ?>
|
<?php if ($c['isactive']) { ?> <a href="<?= base_url() . "campaign_creation_delete/".$c['campaign_id']; ?>" class="delete-button" title="Click to Delete Campaign" ><i class="ri-delete-bin-line"></i></a> <?php } ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|||||||
@ -24,16 +24,6 @@
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-12">
|
|
||||||
<label for="template_id" class="col-form-label">Template<span class="text-danger"></span></label>
|
|
||||||
<select id="template_id" name="template_id" class="form-control" onchange="changeFields(this)" required>
|
|
||||||
<option value="">Choose the Template</option>
|
|
||||||
<?php foreach ($template_details as $value) { ?>
|
|
||||||
<option value="<?php echo $value['template_id']; ?>" <?php if (isset($campaign_details['template_id']) && ($campaign_details['template_id'] === $value['template_id'])) echo "selected"; ?>>
|
|
||||||
<?php echo $value['template_name']; ?></option>
|
|
||||||
<?php } ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="mode" class="col-form-label col-md-3">Mode<span class="text-danger"></span></label>
|
<label for="mode" class="col-form-label col-md-3">Mode<span class="text-danger"></span></label>
|
||||||
<div class="col-md-9 mt-1">
|
<div class="col-md-9 mt-1">
|
||||||
@ -48,7 +38,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-8">
|
<div class="form-group col-md-8">
|
||||||
<label for="scheduled" class="col-form-label">Scheduled date/Time<span class="text-danger"></span></label>
|
<label for="scheduled" class="col-form-label">Scheduled Date/Time<span class="text-danger"></span></label>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<input class="form-control" type="date" name="scheduled_date" id="example-date" value="<?= isset($campaign_details['scheduled_date']) ? $campaign_details['scheduled_date'] : '' ?>">
|
<input class="form-control" type="date" name="scheduled_date" id="example-date" value="<?= isset($campaign_details['scheduled_date']) ? $campaign_details['scheduled_date'] : '' ?>">
|
||||||
@ -58,6 +48,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group col-md-12">
|
||||||
|
<label for="load_templateid" class="col-form-label">Template<span class="text-danger"></span></label>
|
||||||
|
<select id="load_templateid" name="template_id" class="form-control" required>
|
||||||
|
<option value="">Choose the Template</option>
|
||||||
|
<!-- <?php foreach ($template_details as $value) { ?>
|
||||||
|
<option value="<?php echo $value['template_id']; ?>" <?php if (isset($campaign_details['template_id']) && ($campaign_details['template_id'] === $value['template_id'])) echo "selected"; ?>>
|
||||||
|
<?php echo $value['template_name']; ?></option>
|
||||||
|
<?php } ?> -->
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
<!-- <div class="form-group col-md-12">
|
<!-- <div class="form-group col-md-12">
|
||||||
<label for="templatemessage" class="col-form-label">Template Message<span class="text-danger"> *</span></label>
|
<label for="templatemessage" class="col-form-label">Template Message<span class="text-danger"> *</span></label>
|
||||||
<textarea id="summernote-basic" name="templatemessage" class="form-control" rows="7">
|
<textarea id="summernote-basic" name="templatemessage" class="form-control" rows="7">
|
||||||
@ -95,45 +95,45 @@
|
|||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// Listen for changes in the radio buttons
|
// Listen for changes in the radio buttons
|
||||||
// $('input[name="mode"]').on('change', function() {
|
|
||||||
// var selectedValue = $(this).val();
|
|
||||||
// if (selectedValue === 'Email') {
|
|
||||||
// $('#emailSubject').show();
|
|
||||||
// } else {
|
|
||||||
// $('#emailSubject').hide();
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
var mode = "<?= isset($campaign_details['mode']) ? $campaign_details['mode'] : ""; ?>";
|
var mode = "<?= isset($campaign_details['mode']) ? $campaign_details['mode'] : ""; ?>";
|
||||||
|
var template = "<?= isset($campaign_details['template_id']) ? $campaign_details['template_id'] : ""; ?>";
|
||||||
|
load_details(mode,template);
|
||||||
|
|
||||||
|
$('input[name="mode"]').on('change', function() {
|
||||||
|
var selectedValue = $(this).val();
|
||||||
|
console.log('selectedValue',selectedValue);
|
||||||
|
load_details(selectedValue,template);
|
||||||
|
});
|
||||||
|
|
||||||
if(mode != ""){
|
if(mode != ""){
|
||||||
var emailRadio = document.getElementById("emailRadio");
|
var emailRadio = document.getElementById("emailRadio");
|
||||||
var whatsappRadio = document.getElementById("whatsappRadio");
|
var whatsappRadio = document.getElementById("whatsappRadio");
|
||||||
if(mode == 'Email'){
|
if(mode == 'Email'){
|
||||||
emailRadio.checked = true;
|
emailRadio.checked = true;
|
||||||
whatsappRadio.checked = false;
|
whatsappRadio.checked = false;
|
||||||
|
}
|
||||||
}else if(mode == 'Whatsapp'){
|
if(mode == 'Whatsapp'){
|
||||||
emailRadio.checked = false;
|
emailRadio.checked = false;
|
||||||
whatsappRadio.checked = true;
|
whatsappRadio.checked = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
load_details(mode,template);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
|
||||||
<script>
|
function load_details(mode,template) {
|
||||||
function changeFields(element) {
|
var mode = (mode != "") ? mode : 'Email';
|
||||||
var selectedValue = $(element).val();
|
var temp_arr = <?php echo json_encode($template_details); ?>;
|
||||||
var emailRadio = document.getElementById("emailRadio");
|
var filtered_data = $.grep(temp_arr, function(item) {
|
||||||
var whatsappRadio = document.getElementById("whatsappRadio");
|
return item['mode'] === mode;
|
||||||
if(mode == 'Email'){
|
});
|
||||||
emailRadio.checked = true;
|
$('#load_templateid').empty();
|
||||||
whatsappRadio.checked = false;
|
$('#load_templateid').append($('<option>', { value: "", text: "Choose the Template" }));
|
||||||
$('#emailSubject').show();
|
$.each(filtered_data, function(k, v) {
|
||||||
}else if(mode == 'Whatsapp'){
|
$('#load_templateid').append($('<option>', {
|
||||||
emailRadio.checked = false;
|
value: v.template_id,
|
||||||
whatsappRadio.checked = true;
|
text: v.template_name,
|
||||||
$('#emailSubject').hide();
|
selected: (v.template_id == template) ? true : false
|
||||||
}
|
}));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -24,7 +24,7 @@
|
|||||||
<!-- Customer Details Tab -->
|
<!-- Customer Details Tab -->
|
||||||
<div class="tab-pane fade show active" id="customerDetails" role="tabpanel" aria-labelledby="customerDetails-tab">
|
<div class="tab-pane fade show active" id="customerDetails" role="tabpanel" aria-labelledby="customerDetails-tab">
|
||||||
<!-- Customer details form fields -->
|
<!-- Customer details form fields -->
|
||||||
<form class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?php echo base_url(); ?>insert_customer">
|
<form class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?= base_url() . "insert_customer"; ?>" >
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -52,9 +52,9 @@
|
|||||||
<td><?= $group['created_by_name']; ?></td>
|
<td><?= $group['created_by_name']; ?></td>
|
||||||
<td><span class="<?php echo $class; ?>"><?php echo $message; ?></span></td>
|
<td><span class="<?php echo $class; ?>"><?php echo $message; ?></span></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="<?= "view_customer_group/" . $group['group_id']; ?>" class="edit-button" title="Edit" ><i class="ri-pencil-line"></i></a>
|
<a href="<?= base_url() . "view_customer_group/" . $group['group_id']; ?>" class="edit-button" title="Edit" ><i class="ri-pencil-line"></i></a>
|
||||||
<a class="preview-button" title="Preview" data-toggle="modal" data-target="#scrollable-modal" data-primary-key="<?php echo $group['group_id']; ?>" data-group-name="<?php echo $group['group_name']; ?>"><i class="ri-pages-line"></i></a>
|
<a class="preview-button" title="Preview" data-toggle="modal" data-target="#scrollable-modal" data-primary-key="<?php echo $group['group_id']; ?>" data-group-name="<?php echo $group['group_name']; ?>"><i class="ri-pages-line"></i></a>
|
||||||
<?php if ($group['isactive']) { ?> <a href="<?= "delete_customer_group/" . $group['group_id']; ?>" class="delete-button" title="Delete" ><i class="ri-delete-bin-line"></i></a> <?php } ?>
|
<?php if ($group['isactive']) { ?> <a href="<?= base_url() . "delete_customer_group/" . $group['group_id']; ?>" class="delete-button" title="Delete" ><i class="ri-delete-bin-line"></i></a> <?php } ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
@ -75,10 +75,11 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" id="ajax-content">
|
<div class="modal-body" id="ajax-content">
|
||||||
<table id="data-table">
|
<table class="table table-bordered" id="data-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width:40%;">Name</th>
|
<th style="width:10%;">#</th>
|
||||||
|
<th style="width:30%;">Name</th>
|
||||||
<th style="width:30%;">Email</th>
|
<th style="width:30%;">Email</th>
|
||||||
<th style="width:30%;">Mobile</th>
|
<th style="width:30%;">Mobile</th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -110,28 +111,26 @@ $(document).ready(function() {
|
|||||||
$('#scrollable-modal').on('show.bs.modal', function(event) {
|
$('#scrollable-modal').on('show.bs.modal', function(event) {
|
||||||
// Get the data-primary-key attribute from the modal trigger
|
// Get the data-primary-key attribute from the modal trigger
|
||||||
var primaryKey = $(event.relatedTarget).data('primary-key');
|
var primaryKey = $(event.relatedTarget).data('primary-key');
|
||||||
console.log(primaryKey);
|
|
||||||
var groupName = $(event.relatedTarget).data('group-name');
|
var groupName = $(event.relatedTarget).data('group-name');
|
||||||
$('#scrollableModalTitle').text(groupName + ' - Data Preview');
|
$('#scrollableModalTitle').text(groupName + ' - Data Preview');
|
||||||
console.log(groupName);
|
|
||||||
|
|
||||||
var route = "<?= base_url().'preview_customer_group/'?>"+primaryKey;
|
// Get the table reference
|
||||||
console.log(route);
|
var table = $("#data-table tbody");
|
||||||
|
var route = "<?= base_url().'preview_customer_group/'?>"+primaryKey;
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: route,
|
url: route,
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
if (response.length > 0) {
|
if (response.length > 0) {
|
||||||
// Get the table reference
|
|
||||||
var table = $("#data-table tbody");
|
|
||||||
|
|
||||||
// Clear existing rows
|
// Clear existing rows
|
||||||
table.empty();
|
table.empty();
|
||||||
|
$x=0;
|
||||||
// Loop through the response and create table rows
|
// Loop through the response and create table rows
|
||||||
$.each(response, function (index, item) {
|
$.each(response, function (index, item) {
|
||||||
var row = $("<tr>");
|
var row = $("<tr>");
|
||||||
row.append($("<td style='width:40%;'>").text(item.customer_name));
|
row.append($("<td style='width:10%;'>").text(++$x));
|
||||||
|
row.append($("<td style='width:30%;'>").text(item.customer_name));
|
||||||
row.append($("<td style='width:30%;'>").text(item.email));
|
row.append($("<td style='width:30%;'>").text(item.email));
|
||||||
row.append($("<td style='width:30%;'>").text(item.mobile_no));
|
row.append($("<td style='width:30%;'>").text(item.mobile_no));
|
||||||
table.append(row);
|
table.append(row);
|
||||||
@ -139,11 +138,14 @@ $(document).ready(function() {
|
|||||||
} else {
|
} else {
|
||||||
// Handle the case where there is no data
|
// Handle the case where there is no data
|
||||||
table.empty();
|
table.empty();
|
||||||
table.append("<tr><td colspan='3' style='width:100%;'>No data available</td></tr>");
|
table.append("<tr><td colspan='4' style='width:100%; text-align: center; vertical-align: middle;'>No data available</td></tr>");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function () {
|
error: function () {
|
||||||
alert("An error occurred.");
|
// alert("An error occurred.");
|
||||||
|
console.log("CG Preview List - An error occurred.");
|
||||||
|
table.empty();
|
||||||
|
table.append("<tr><td colspan='4' style='width:100%; text-align: center; vertical-align: middle;'>No data available</td></tr>");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="header-title"><?= $page_name; ?></h4>
|
<h4 class="header-title"><?= $page_name; ?></h4>
|
||||||
<p class="sub-header"></p>
|
<p class="sub-header"></p>
|
||||||
<form id="myForm" class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?php echo base_url(); ?>insert_customer_group">
|
<form id="myForm" class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?= base_url() . "insert_customer_group"; ?>" >
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
<label for="groupname" class="col-form-label">Group Name<span class="text-danger"> *</span></label>
|
<label for="groupname" class="col-form-label">Group Name<span class="text-danger"> *</span></label>
|
||||||
@ -15,8 +15,8 @@
|
|||||||
<br />
|
<br />
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
<h4>Select Criteria</h4>
|
<h4 class="header-title">Select Criteria</h4>
|
||||||
<br />
|
|
||||||
<table class="table table-borderless" id="itemTable">
|
<table class="table table-borderless" id="itemTable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -27,7 +27,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php if(!empty($customer_group)){ for ($i = 0; $i < count($customer_group['column']); $i++) { ?>
|
<?php if(!empty($customer_group) && !empty($customer_group['column'])){ for ($i = 0; $i < count($customer_group['column']); $i++) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:30%;">
|
<td style="width:30%;">
|
||||||
<select class="form-control" data-toggle="select2" id="column" name="column[]">
|
<select class="form-control" data-toggle="select2" id="column" name="column[]">
|
||||||
@ -90,9 +90,6 @@
|
|||||||
</table>
|
</table>
|
||||||
<div class="form-group text-right m-b-0">
|
<div class="form-group text-right m-b-0">
|
||||||
<button type="button" id="addItem" class="btn btn-soft-dark btn-rounded waves-effect waves-light mr-3 add-item"> + Add New Criteria</button>
|
<button type="button" id="addItem" class="btn btn-soft-dark btn-rounded waves-effect waves-light mr-3 add-item"> + Add New Criteria</button>
|
||||||
<!-- <a class="btn" id="addItem">
|
|
||||||
<h4><i class="fa fa-plus" aria-hidden="true"></i> Add More Item</h4>
|
|
||||||
</a> -->
|
|
||||||
</div>
|
</div>
|
||||||
<?php if (!empty($customer_group)) { ?>
|
<?php if (!empty($customer_group)) { ?>
|
||||||
<div class="form-group text-right checkbox checkbox-purple mr-3">
|
<div class="form-group text-right checkbox checkbox-purple mr-3">
|
||||||
@ -121,10 +118,11 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" id="ajax-content">
|
<div class="modal-body" id="ajax-content">
|
||||||
<table id="data-table">
|
<table class="table table-bordered" id="data-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width:40%;">Name</th>
|
<th style="width:10%;">#</th>
|
||||||
|
<th style="width:30%;">Name</th>
|
||||||
<th style="width:30%;">Email</th>
|
<th style="width:30%;">Email</th>
|
||||||
<th style="width:30%;">Mobile</th>
|
<th style="width:30%;">Mobile</th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -151,58 +149,93 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> -->
|
<!-- <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> -->
|
||||||
<script>
|
<script>
|
||||||
document.getElementById("addItem").addEventListener("click", function() {
|
document.getElementById("addItem").addEventListener("click", function() {
|
||||||
var fieldArray = <?php echo json_encode($field); ?>;
|
var fieldArray = <?php echo json_encode($field); ?>;
|
||||||
var operatorArray = <?php echo json_encode($operator); ?>;
|
var operatorArray = <?php echo json_encode($operator); ?>;
|
||||||
// <select class="form-control" data-toggle="select2" id="operator" name="operator[]">
|
|
||||||
// <select class="form-control" data-toggle="select2" id="column" name="column[]">
|
|
||||||
|
|
||||||
var table = document.getElementById("itemTable").getElementsByTagName("tbody")[0];
|
var table = document.getElementById("itemTable").getElementsByTagName("tbody")[0];
|
||||||
var newRow = table.insertRow(table.rows.length);
|
var rows = table.getElementsByTagName("tr");
|
||||||
|
var hasValue = false;
|
||||||
|
|
||||||
var cell1 = newRow.insertCell(0);
|
// Check if any existing fields are empty
|
||||||
var cell2 = newRow.insertCell(1);
|
for (var i = 0; i < rows.length; i++) {
|
||||||
var cell3 = newRow.insertCell(2);
|
var cells = rows[i].getElementsByTagName("td");
|
||||||
var cell4 = newRow.insertCell(3);
|
for (var j = 0; j < cells.length; j++) {
|
||||||
|
var input = cells[j].querySelector('input, select');
|
||||||
|
if (input && input.value.trim() === "") {
|
||||||
const select1 = document.createElement('select');
|
alert("Field in row " + (i + 1) + " is empty.");
|
||||||
select1.className = 'form-control';
|
return; // Exit the loop after the first empty field is found.
|
||||||
select1.id = 'column';
|
}else {
|
||||||
select1.name = 'column[]';
|
hasValue = true;
|
||||||
|
}
|
||||||
const select2 = document.createElement('select');
|
|
||||||
select2.className = 'form-control';
|
|
||||||
select2.id = 'operator';
|
|
||||||
select2.name = 'operator[]';
|
|
||||||
|
|
||||||
for (const fieldvalue in fieldArray) {
|
|
||||||
const fieldoption = document.createElement('option');
|
|
||||||
fieldoption.value = fieldvalue;
|
|
||||||
fieldoption.text = fieldArray[fieldvalue];
|
|
||||||
select1.appendChild(fieldoption);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (const value in operatorArray) {
|
if (!hasValue) {
|
||||||
const optionElement = document.createElement('option');
|
alert("At least one row should contain a value.");
|
||||||
optionElement.value = value;
|
return; // Exit the function to prevent adding a new row.
|
||||||
optionElement.text = operatorArray[value];
|
}
|
||||||
select2.appendChild(optionElement);
|
|
||||||
}
|
|
||||||
|
|
||||||
cell1.appendChild(select1);
|
var newRow = table.insertRow(table.rows.length);
|
||||||
cell2.appendChild(select2);
|
|
||||||
cell3.innerHTML = '<input type="text" class="form-control" id="values" name="values[]" placeholder="Enter the Values" />';
|
|
||||||
cell4.innerHTML = '<button type="button" class="btn btn-soft-danger btn-rounded waves-effect waves-light mr-1 remove-item"><i class="fa fa-trash"></i></button>';
|
|
||||||
|
|
||||||
});
|
var cell1 = newRow.insertCell(0);
|
||||||
|
var cell2 = newRow.insertCell(1);
|
||||||
|
var cell3 = newRow.insertCell(2);
|
||||||
|
var cell4 = newRow.insertCell(3);
|
||||||
|
|
||||||
|
const select1 = document.createElement('select');
|
||||||
|
select1.className = 'form-control';
|
||||||
|
select1.name = 'column[]';
|
||||||
|
select1.setAttribute("data-toggle", "select2");
|
||||||
|
|
||||||
|
|
||||||
|
const select2 = document.createElement('select');
|
||||||
|
select2.className = 'form-control';
|
||||||
|
select2.name = 'operator[]';
|
||||||
|
select2.setAttribute("data-toggle", "select2");
|
||||||
|
|
||||||
|
|
||||||
|
for (const fieldvalue in fieldArray) {
|
||||||
|
const fieldoption = document.createElement('option');
|
||||||
|
fieldoption.value = fieldvalue;
|
||||||
|
fieldoption.text = fieldArray[fieldvalue];
|
||||||
|
select1.appendChild(fieldoption);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const value in operatorArray) {
|
||||||
|
const optionElement = document.createElement('option');
|
||||||
|
optionElement.value = value;
|
||||||
|
optionElement.text = operatorArray[value];
|
||||||
|
select2.appendChild(optionElement);
|
||||||
|
}
|
||||||
|
|
||||||
|
const inputElement = document.createElement('input');
|
||||||
|
inputElement.type = 'text';
|
||||||
|
inputElement.className = 'form-control';
|
||||||
|
inputElement.name = 'values[]';
|
||||||
|
inputElement.placeholder = 'Enter the Values';
|
||||||
|
|
||||||
|
cell1.appendChild(select1);
|
||||||
|
cell2.appendChild(select2);
|
||||||
|
cell3.appendChild(inputElement);
|
||||||
|
cell4.innerHTML = '<button type="button" class="btn btn-soft-danger btn-rounded waves-effect waves-light mr-1 remove-item"><i class="fa fa-trash"></i></button>';
|
||||||
|
|
||||||
|
$(select1).select2();
|
||||||
|
$(select2).select2();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// Function to remove a row from the table
|
// Function to remove a row from the table
|
||||||
function removeItem(row) {
|
function removeItem(row) {
|
||||||
var table = document.getElementById("itemTable").getElementsByTagName("tbody")[0];
|
var table = document.getElementById("itemTable").getElementsByTagName("tbody")[0];
|
||||||
table.removeChild(row);
|
var rows = table.getElementsByTagName("tr");
|
||||||
|
if (rows.length > 1) {
|
||||||
|
table.removeChild(row);
|
||||||
|
} else {
|
||||||
|
alert('At least one row should contain a value.');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Attach the removeItem function to the Remove buttons using event delegation
|
// Attach the removeItem function to the Remove buttons using event delegation
|
||||||
@ -213,6 +246,27 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
<!-- function removeItem(row) {
|
||||||
|
var table = document.getElementById("itemTable").getElementsByTagName("tbody")[0];
|
||||||
|
var rows = table.getElementsByTagName("tr");
|
||||||
|
var hasValue = false; // Flag to track if the row to be removed has a value.
|
||||||
|
|
||||||
|
// Check if the row to be removed has values
|
||||||
|
var cells = row.getElementsByTagName("td");
|
||||||
|
for (var j = 0; j < cells.length; j++) {
|
||||||
|
var input = cells[j].querySelector('input, select');
|
||||||
|
if (input && input.value.trim() !== "") {
|
||||||
|
hasValue = true;
|
||||||
|
break; // Exit the loop after the first value is found in the row.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hasValue || rows.length > 1) {
|
||||||
|
table.removeChild(row);
|
||||||
|
} else {
|
||||||
|
alert('At least one row should contain a value.');
|
||||||
|
}
|
||||||
|
} -->
|
||||||
|
|
||||||
<!-- <script>
|
<!-- <script>
|
||||||
document.getElementById('previewButton').addEventListener('click', function() {
|
document.getElementById('previewButton').addEventListener('click', function() {
|
||||||
@ -247,6 +301,8 @@
|
|||||||
var formData = $("#myForm").serialize();
|
var formData = $("#myForm").serialize();
|
||||||
var groupName = $("#groupname").val();
|
var groupName = $("#groupname").val();
|
||||||
// Use AJAX to load content into the modal
|
// Use AJAX to load content into the modal
|
||||||
|
// Get the table reference
|
||||||
|
var table = $("#data-table tbody");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "<?= base_url() . 'insert_customer_group' ?>",
|
url: "<?= base_url() . 'insert_customer_group' ?>",
|
||||||
@ -254,17 +310,15 @@
|
|||||||
dataType: "json", // Expect JSON response
|
dataType: "json", // Expect JSON response
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
if (response.length > 0) {
|
if (response.length > 0) {
|
||||||
// Get the table reference
|
|
||||||
var table = $("#data-table tbody");
|
|
||||||
|
|
||||||
$('#scrollableModalTitle').text(groupName + ' - Data Preview');
|
$('#scrollableModalTitle').text(groupName + ' - Data Preview');
|
||||||
// Clear existing rows
|
// Clear existing rows
|
||||||
table.empty();
|
table.empty();
|
||||||
|
$x=0;
|
||||||
// Loop through the response and create table rows
|
// Loop through the response and create table rows
|
||||||
$.each(response, function (index, item) {
|
$.each(response, function (index, item) {
|
||||||
var row = $("<tr>");
|
var row = $("<tr>");
|
||||||
row.append($("<td style='width:40%;'>").text(item.customer_name));
|
row.append($("<td style='width:10%;'>").text(++$x));
|
||||||
|
row.append($("<td style='width:30%;'>").text(item.customer_name));
|
||||||
row.append($("<td style='width:30%;'>").text(item.email));
|
row.append($("<td style='width:30%;'>").text(item.email));
|
||||||
row.append($("<td style='width:30%;'>").text(item.mobile_no));
|
row.append($("<td style='width:30%;'>").text(item.mobile_no));
|
||||||
table.append(row);
|
table.append(row);
|
||||||
@ -272,11 +326,14 @@
|
|||||||
} else {
|
} else {
|
||||||
// Handle the case where there is no data
|
// Handle the case where there is no data
|
||||||
table.empty();
|
table.empty();
|
||||||
table.append("<tr><td colspan='3' style='width:100%;'>No data available</td></tr>");
|
table.append("<tr><td colspan='4' style='width:100%; text-align: center; vertical-align: middle;'>No data available</td></tr>");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function () {
|
error: function () {
|
||||||
alert("An error occurred.");
|
// alert("An error occurred.");
|
||||||
|
console.log("CG Preview Form - An error occurred.");
|
||||||
|
table.empty();
|
||||||
|
table.append("<tr><td colspan='4' style='width:100%; text-align: center; vertical-align: middle;'>No data available</td></tr>");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -286,7 +343,7 @@
|
|||||||
$("#save").on("click", function () {
|
$("#save").on("click", function () {
|
||||||
$("#string_flag").val("save");
|
$("#string_flag").val("save");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="float-right">
|
<div class="float-right">
|
||||||
<a href="new_customer/0" class="btn btn-primary"><i class="ri-map-pin-user-fill"></i> Add New </a>
|
<a href="<?= base_url() . "new_customer/0"; ?>" class="btn btn-primary"><i class="ri-map-pin-user-fill"></i> Add Customer </a>
|
||||||
</div><!-- end col-->
|
</div><!-- end col-->
|
||||||
<br>
|
<br>
|
||||||
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="header-title"><?= $page_name; ?></h4>
|
<h4 class="header-title"><?= $page_name; ?></h4>
|
||||||
<p class="sub-header"> </p>
|
<p class="sub-header"> </p>
|
||||||
<form class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?php echo base_url(); ?>insert_event">
|
<form class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?= base_url() . "insert_event"; ?>" >
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="float-right">
|
<div class="float-right">
|
||||||
<a href="new_event/0" class="btn btn-primary"><i class="fe-shopping-bag"></i> Add New </a>
|
<a href="new_event/0" class="btn btn-primary"><i class="fe-shopping-bag"></i> Add Event </a>
|
||||||
</div><!-- end col-->
|
</div><!-- end col-->
|
||||||
<br>
|
<br>
|
||||||
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="header-title"><?= $page_name; ?></h4>
|
<h4 class="header-title"><?= $page_name; ?></h4>
|
||||||
<!-- <p class="sub-header"><?php print_r($invoice_details); ?> </p> -->
|
<!-- <p class="sub-header"><?php print_r($invoice_details); ?> </p> -->
|
||||||
<form method="POST" enctype="multipart/form-data" action="<?php echo base_url(); ?>save_invoice">
|
<form method="POST" enctype="multipart/form-data" action="<?= base_url() . "save_invoice";?>" >
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="float-right">
|
<div class="float-right">
|
||||||
<a href="new_book_invoice/0" class="btn btn-primary"><i class="ri-currency-line"></i> Add New </a>
|
<a href="<?= base_url() . "new_book_invoice/0"; ?> class="btn btn-primary"><i class="ri-currency-line"></i> Add Invoice </a>
|
||||||
<!-- HTML for the "Add New" button -->
|
<!-- HTML for the "Add New" button -->
|
||||||
|
|
||||||
<!-- <div id="standard-modal" >
|
<!-- <div id="standard-modal" >
|
||||||
@ -82,12 +82,12 @@
|
|||||||
<td><?= $row['customer_name']; ?></td>
|
<td><?= $row['customer_name']; ?></td>
|
||||||
<td><?= $row['status']; ?></td>
|
<td><?= $row['status']; ?></td>
|
||||||
<td>₹ <span data-plugin="counterup"><?= $row['total_amount']; ?></span></td>
|
<td>₹ <span data-plugin="counterup"><?= $row['total_amount']; ?></span></td>
|
||||||
<td><a href="<?= "approve_invoice/" . $row['invoice_id']; ?>" class="approve-button" title="Approve the Invoice"><i class="ri-checkbox-circle-fill"></i></a>
|
<td><a href="<?= base_url() . "approve_invoice/" . $row['invoice_id']; ?>" class="approve-button" title="Approve the Invoice"><i class="ri-checkbox-circle-fill"></i></a>
|
||||||
|
|
||||||
<?php if ($row['invoice_type'] == 1): ?>
|
<?php if ($row['invoice_type'] == 1): ?>
|
||||||
<a href="<?= "new_subscription_invoice/" . $row['invoice_id']; ?>" class="edit-button" title="Edit the Invoice"><i class="ri-pencil-line" title="Edit the Invoice"></i></a>
|
<a href="<?= base_url() . "new_subscription_invoice/" . $row['invoice_id']; ?>" class="edit-button" title="Edit the Invoice"><i class="ri-pencil-line" title="Edit the Invoice"></i></a>
|
||||||
<?php elseif ($row['invoice_type'] == 2): ?>
|
<?php elseif ($row['invoice_type'] == 2): ?>
|
||||||
<a href="<?= "new_book_invoice/" . $row['invoice_id']; ?>" class="edit-button" title="Edit the Invoice"><i class="ri-pencil-line" title="Edit the Invoice"></i></a>
|
<a href="<?= base_url() . "new_book_invoice/" . $row['invoice_id']; ?>" class="edit-button" title="Edit the Invoice"><i class="ri-pencil-line" title="Edit the Invoice"></i></a>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<a href="<?= base_url("generate_invoice_pdf/{$row['invoice_id']}") ?>" class="download-pdf-button" title="Download the Invoice"><i class="ri-file-download-line"></i></a>
|
<a href="<?= base_url("generate_invoice_pdf/{$row['invoice_id']}") ?>" class="download-pdf-button" title="Download the Invoice"><i class="ri-file-download-line"></i></a>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="header-title"><?= $page_name; ?></h4>
|
<h4 class="header-title"><?= $page_name; ?></h4>
|
||||||
<p class="sub-header"> </p>
|
<p class="sub-header"> </p>
|
||||||
<form class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?php echo base_url(); ?>insert_scheme">
|
<form class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?= base_url() . "insert_scheme";?>">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="float-right">
|
<div class="float-right">
|
||||||
<a href="new_scheme/0" class="btn btn-primary"><i class="ri-currency-line"></i> Add New </a>
|
<a href="new_scheme/0" class="btn btn-primary"><i class="ri-currency-line"></i> Add Scheme </a>
|
||||||
</div><!-- end col-->
|
</div><!-- end col-->
|
||||||
<br>
|
<br>
|
||||||
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
||||||
@ -46,8 +46,8 @@
|
|||||||
<td><?= $row['duration']; ?></td>
|
<td><?= $row['duration']; ?></td>
|
||||||
<td hidden><?= $row['category_name']; ?></td>
|
<td hidden><?= $row['category_name']; ?></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="<?= "new_scheme/" . $row['book_id']; ?>" class="edit-button"><i class="ri-pencil-line"></i></a>
|
<a href="<?= base_url() . "new_scheme/" . $row['book_id']; ?>" class="edit-button"><i class="ri-pencil-line"></i></a>
|
||||||
<a href="<?php echo "delete_scheme/" . $row['book_id']; ?>" class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
<a href="<?= base_url() . "delete_scheme/" . $row['book_id']; ?>" class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="float-right">
|
<div class="float-right">
|
||||||
<a href="<?= base_url()."sitesetting_page/0"; ?>" class="btn btn-primary"><i class="mdi mdi-playlist-plus"></i> Add New </a>
|
<a href="<?= base_url()."sitesetting_page/0"; ?>" class="btn btn-primary"><i class="mdi mdi-playlist-plus"></i> Add Setting </a>
|
||||||
</div><!-- end col-->
|
</div><!-- end col-->
|
||||||
<br>
|
<br>
|
||||||
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
<!-- Add a "Print Addresses" button -->
|
<!-- Add a "Print Addresses" button -->
|
||||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#printAddressesModal">Print Addresses</button>
|
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#printAddressesModal">Print Addresses</button>
|
||||||
|
|
||||||
<a href="<?= base_url()."new_subscription_invoice/0"; ?>" class="btn btn-primary"><i class="ri-shield-user-line"></i> Add New</a>
|
<a href="<?= base_url()."new_subscription_invoice/0"; ?>" class="btn btn-primary"><i class="ri-shield-user-line"></i> Add Subscription</a>
|
||||||
|
|
||||||
</div><!-- end col-->
|
</div><!-- end col-->
|
||||||
<br>
|
<br>
|
||||||
@ -44,12 +44,12 @@
|
|||||||
<td><?= $row['customer_name']; ?></td>
|
<td><?= $row['customer_name']; ?></td>
|
||||||
<td><?= $row['status']; ?></td>
|
<td><?= $row['status']; ?></td>
|
||||||
<td>₹ <span data-plugin="counterup"><?= $row['total_amount']; ?></span></td>
|
<td>₹ <span data-plugin="counterup"><?= $row['total_amount']; ?></span></td>
|
||||||
<td><a href="<?= "approve_invoice/" . $row['invoice_id']; ?>" class="approve-button" title="Approve the Invoice"><i class="ri-checkbox-circle-fill"></i></a>
|
<td><a href="<?= base_url() . "approve_invoice/" . $row['invoice_id']; ?>" class="approve-button" title="Approve the Invoice"><i class="ri-checkbox-circle-fill"></i></a>
|
||||||
|
|
||||||
<?php if ($row['invoice_type'] == 1): ?>
|
<?php if ($row['invoice_type'] == 1): ?>
|
||||||
<a href="<?= "new_subscription_invoice/" . $row['invoice_id']; ?>" class="edit-button" title="Edit the Invoice"><i class="ri-pencil-line" title="Edit the Invoice"></i></a>
|
<a href="<?= base_url() . "new_subscription_invoice/" . $row['invoice_id']; ?>" class="edit-button" title="Edit the Invoice"><i class="ri-pencil-line" title="Edit the Invoice"></i></a>
|
||||||
<?php elseif ($row['invoice_type'] == 2): ?>
|
<?php elseif ($row['invoice_type'] == 2): ?>
|
||||||
<a href="<?= "new_book_invoice/" . $row['invoice_id']; ?>" class="edit-button" title="Edit the Invoice"><i class="ri-pencil-line" title="Edit the Invoice"></i></a>
|
<a href="<?= base_url() . "new_book_invoice/" . $row['invoice_id']; ?>" class="edit-button" title="Edit the Invoice"><i class="ri-pencil-line" title="Edit the Invoice"></i></a>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<a href="<?= base_url("generate_invoice_pdf/{$row['invoice_id']}") ?>" class="download-pdf-button" title="Download the Invoice"><i class="ri-file-download-line"></i></a>
|
<a href="<?= base_url("generate_invoice_pdf/{$row['invoice_id']}") ?>" class="download-pdf-button" title="Download the Invoice"><i class="ri-file-download-line"></i></a>
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<!-- < -->
|
<!-- < -->
|
||||||
<p class="sub-header"> </p>
|
<p class="sub-header"> </p>
|
||||||
<form class="needs-validation" method="POST" enctype="multipart/form-data"
|
<form class="needs-validation" method="POST" enctype="multipart/form-data"
|
||||||
action="<?php echo base_url(); ?>add_subscription">
|
action="<?= base_url() . "add_subscription";?>" >
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
|
|||||||
@ -784,11 +784,11 @@
|
|||||||
|
|
||||||
<!-- Summernote js -->
|
<!-- Summernote js -->
|
||||||
<script src="<?= base_url() . "public/assets/libs/summernote/summernote-bs4.min.js" ?>"></script>
|
<script src="<?= base_url() . "public/assets/libs/summernote/summernote-bs4.min.js" ?>"></script>
|
||||||
<!-- <script src="<?= base_url() . "public/assets/libs/select2/js/select2.min.js" ?>"></script> -->
|
<script src="<?= base_url() . "public/assets/libs/select2/js/select2.min.js" ?>"></script>
|
||||||
<!-- <script src="<?= base_url() . "public/assets/libs/bootstrap-maxlength/bootstrap-maxlength.min.js" ?>"></script> -->
|
<script src="<?= base_url() . "public/assets/libs/bootstrap-maxlength/bootstrap-maxlength.min.js" ?>"></script>
|
||||||
<!-- Init js -->
|
<!-- Init js -->
|
||||||
<script src="<?= base_url() . "public/assets/js/pages/form-summernote.init.js" ?>"></script>
|
<script src="<?= base_url() . "public/assets/js/pages/form-summernote.init.js" ?>"></script>
|
||||||
<!-- <script src="<?= base_url() . "public/assets/js/pages/form-advanced.init.js" ?>"></script> -->
|
<script src="<?= base_url() . "public/assets/js/pages/form-advanced.init.js" ?>"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// Automatically close both success and error messages after 5 seconds (5000 milliseconds)
|
// Automatically close both success and error messages after 5 seconds (5000 milliseconds)
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
<!-- plugin css -->
|
<!-- plugin css -->
|
||||||
<link href="<?= base_url()."public/assets/libs/multiselect/css/multi-select.css" ?>" rel="stylesheet" type="text/css" />
|
<link href="<?= base_url()."public/assets/libs/multiselect/css/multi-select.css" ?>" rel="stylesheet" type="text/css" />
|
||||||
<link href="<?= base_url()."public/assets/libs/select2/css/select2.min.css" ?>" rel="stylesheet" type="text/css" />
|
<link href="<?= base_url()."public/assets/libs/select2/css/select2.min.css" ?>" rel="stylesheet" type="text/css" />
|
||||||
<link href="<?= base_url()."public/assets/libs/selectize/css/selectize.bootstrap3.css" ?>" rel="stylesheet" type="text/css" />
|
<!-- <link href="<?= base_url()."public/assets/libs/selectize/css/selectize.bootstrap3.css" ?>" rel="stylesheet" type="text/css" /> -->
|
||||||
|
|
||||||
<!-- third party css -->
|
<!-- third party css -->
|
||||||
<link href="<?= base_url()."public/assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css" ?>" rel="stylesheet" type="text/css" />
|
<link href="<?= base_url()."public/assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css" ?>" rel="stylesheet" type="text/css" />
|
||||||
|
|||||||
@ -4,75 +4,6 @@
|
|||||||
|
|
||||||
<ul class="list-unstyled topnav-menu float-right mb-0">
|
<ul class="list-unstyled topnav-menu float-right mb-0">
|
||||||
|
|
||||||
<li class="d-none d-lg-block">
|
|
||||||
<form class="app-search">
|
|
||||||
<div class="app-search-box dropdown">
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="search" class="form-control" placeholder="Search..." id="top-search">
|
|
||||||
<div class="input-group-append">
|
|
||||||
<button class="btn" type="submit">
|
|
||||||
<i class="fe-search"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="dropdown-menu dropdown-lg" id="search-dropdown">
|
|
||||||
<!-- item-->
|
|
||||||
<div class="dropdown-header noti-title">
|
|
||||||
<h5 class="text-overflow mb-2">Found <span class="text-danger">09</span> results</h5>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- item-->
|
|
||||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
|
||||||
<i class="fe-home mr-1"></i>
|
|
||||||
<span>Analytics Report</span>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<!-- item-->
|
|
||||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
|
||||||
<i class="fe-aperture mr-1"></i>
|
|
||||||
<span>How can I help you?</span>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<!-- item-->
|
|
||||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
|
||||||
<i class="fe-settings mr-1"></i>
|
|
||||||
<span>User profile settings</span>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<!-- item-->
|
|
||||||
<div class="dropdown-header noti-title">
|
|
||||||
<h6 class="text-overflow mb-2 text-uppercase">Users</h6>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="notification-list">
|
|
||||||
<!-- item-->
|
|
||||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
|
||||||
<div class="media">
|
|
||||||
<img class="d-flex mr-2 rounded-circle" src="<?= base_url()."public/assets/images/users/avatar-2.jpg" ?>" alt="Generic placeholder image" height="32">
|
|
||||||
<div class="media-body">
|
|
||||||
<h5 class="m-0 font-14">Erwin E. Brown</h5>
|
|
||||||
cat<span class="font-12 mb-0">UI Designer</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<!-- item-->
|
|
||||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
|
||||||
<div class="media">
|
|
||||||
<img class="d-flex mr-2 rounded-circle" src="<?= base_url()."public/assets/images/users/avatar-5.jpg" ?>" alt="Generic placeholder image" height="32">
|
|
||||||
<div class="media-body">
|
|
||||||
<h5 class="m-0 font-14">Jacob Deo</h5>
|
|
||||||
<span class="font-12 mb-0">Developer</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dropdown d-inline-block d-lg-none">
|
<li class="dropdown d-inline-block d-lg-none">
|
||||||
<a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
|
<a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
|
||||||
<i class="fe-search noti-icon"></i>
|
<i class="fe-search noti-icon"></i>
|
||||||
@ -125,100 +56,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="dropdown notification-list topbar-dropdown">
|
|
||||||
<a class="nav-link dropdown-toggle waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
|
|
||||||
<i class="fe-bell noti-icon"></i>
|
|
||||||
<span class="badge badge-danger rounded-circle noti-icon-badge">5</span>
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-menu dropdown-menu-right dropdown-lg">
|
|
||||||
|
|
||||||
<!-- item-->
|
|
||||||
<div class="dropdown-item noti-title">
|
|
||||||
<h5 class="m-0">
|
|
||||||
<span class="float-right">
|
|
||||||
<a href="" class="text-dark">
|
|
||||||
<small>Clear All</small>
|
|
||||||
</a>
|
|
||||||
</span>Notification
|
|
||||||
</h5>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="noti-scroll" data-simplebar>
|
|
||||||
|
|
||||||
<!-- item-->
|
|
||||||
<a href="javascript:void(0);" class="dropdown-item notify-item active">
|
|
||||||
<div class="notify-icon bg-soft-primary text-primary">
|
|
||||||
<i class="mdi mdi-comment-account-outline"></i>
|
|
||||||
</div>
|
|
||||||
<p class="notify-details">Doug Dukes commented on Admin Dashboard
|
|
||||||
<small class="text-muted">1 min ago</small>
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<!-- item-->
|
|
||||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
|
||||||
<div class="notify-icon">
|
|
||||||
<img src="<?= base_url()."public/assets/images/users/avatar-2.jpg" ?>" class="img-fluid rounded-circle" alt="" />
|
|
||||||
</div>
|
|
||||||
<p class="notify-details">Mario Drummond</p>
|
|
||||||
<p class="text-muted mb-0 user-msg">
|
|
||||||
<small>Hi, How are you? What about our next Next Edition of "The big bull" </small>
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<!-- item-->
|
|
||||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
|
||||||
<div class="notify-icon">
|
|
||||||
<img src="<?= base_url()."public/assets/images/users/avatar-4.jpg" ?>" class="img-fluid rounded-circle" alt="" />
|
|
||||||
</div>
|
|
||||||
<p class="notify-details">Rory Dalyell</p>
|
|
||||||
<p class="text-muted mb-0 user-msg">
|
|
||||||
<small>Wow ! this 'Reinforced Concrete Design' 7th Edt. looks good and awesome interior designers also </small>
|
|
||||||
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<!-- item-->
|
|
||||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
|
||||||
<div class="notify-icon bg-soft-warning text-warning">
|
|
||||||
<i class="mdi mdi-account-plus"></i>
|
|
||||||
</div>
|
|
||||||
<p class="notify-details">New Customer registered.
|
|
||||||
<small class="text-muted">5 hours ago</small>
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<!-- item-->
|
|
||||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
|
||||||
<div class="notify-icon bg-info">
|
|
||||||
<i class="mdi mdi-comment-account-outline"></i>
|
|
||||||
</div>
|
|
||||||
<p class="notify-details">Caleb Flakelar commented on Whatsapp
|
|
||||||
<small class="text-muted">4 days ago</small>
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<!-- item-->
|
|
||||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
|
||||||
<div class="notify-icon bg-secondary">
|
|
||||||
<i class="mdi mdi-heart"></i>
|
|
||||||
</div>
|
|
||||||
<p class="notify-details">Carlos Crouch liked "The big bull" book
|
|
||||||
<b>Admin</b>
|
|
||||||
<small class="text-muted">13 days ago</small>
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- All-->
|
|
||||||
<a href="javascript:void(0);" class="dropdown-item text-center text-primary notify-item notify-all">
|
|
||||||
View all
|
|
||||||
<i class="fe-arrow-right"></i>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dropdown notification-list topbar-dropdown">
|
<li class="dropdown notification-list topbar-dropdown">
|
||||||
<a class="nav-link dropdown-toggle nav-user mr-0 waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
|
<a class="nav-link dropdown-toggle nav-user mr-0 waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
|
||||||
<img src="<?= $profile_picture; ?>" alt="user-image" class="rounded-circle">
|
<img src="<?= $profile_picture; ?>" alt="user-image" class="rounded-circle">
|
||||||
|
|||||||
@ -31,7 +31,6 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th hidden></th>
|
<th hidden></th>
|
||||||
<th>Template Name</th>
|
<th>Template Name</th>
|
||||||
<th>Group Name</th>
|
|
||||||
<th>Mode</th>
|
<th>Mode</th>
|
||||||
<th>Created at</th>
|
<th>Created at</th>
|
||||||
<th>Created by</th>
|
<th>Created by</th>
|
||||||
@ -50,7 +49,6 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td hidden><?= $temp['template_id']; ?></td>
|
<td hidden><?= $temp['template_id']; ?></td>
|
||||||
<td><?= $temp['template_name']; ?></td>
|
<td><?= $temp['template_name']; ?></td>
|
||||||
<td><?= $temp['group_name']; ?></td>
|
|
||||||
<td><?= $temp['mode']; ?></td>
|
<td><?= $temp['mode']; ?></td>
|
||||||
<td><?= $temp['formatted_created_on']; ?></td>
|
<td><?= $temp['formatted_created_on']; ?></td>
|
||||||
<td><?= $temp['created_by_name']; ?></td>
|
<td><?= $temp['created_by_name']; ?></td>
|
||||||
|
|||||||
@ -6,22 +6,12 @@
|
|||||||
<form class="parsley-examples" action="<?= base_url() . "template_creation_insert"; ?>" method="post" enctype="multipart/form-data">
|
<form class="parsley-examples" action="<?= base_url() . "template_creation_insert"; ?>" method="post" enctype="multipart/form-data">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-12">
|
||||||
<label for="templatename" class="col-form-label">Template Name<span class="text-danger"> *</span></label>
|
<label for="templatename" class="col-form-label">Template Name<span class="text-danger"> *</span></label>
|
||||||
<input type="text" class="form-control" id="templatename" name="templatename" value="<?= isset($template_details['template_name']) ? $template_details['template_name'] : '' ?>" placeholder="Template Name" required />
|
<input type="text" class="form-control" id="templatename" name="templatename" value="<?= isset($template_details['template_name']) ? $template_details['template_name'] : '' ?>" placeholder="Template Name" required />
|
||||||
<div class="invalid-feedback"> Please provide. </div>
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="group_id" class="col-form-label">Group<span class="text-danger"></span></label>
|
|
||||||
<select id="group_id" name="group_id" class="form-control" required>
|
|
||||||
<option value="">Choose the Group</option>
|
|
||||||
<?php foreach ($group_details as $value) { ?>
|
|
||||||
<option value="<?php echo $value['group_id']; ?>" <?php if (isset($template_details['group_id']) && ($template_details['group_id'] === $value['group_id'])) echo "selected"; ?>>
|
|
||||||
<?php echo $value['group_name']; ?></option>
|
|
||||||
<?php } ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-12">
|
|
||||||
<label for="mode" class="col-form-label col-md-3">Mode<span class="text-danger"></span></label>
|
<label for="mode" class="col-form-label col-md-3">Mode<span class="text-danger"></span></label>
|
||||||
<div class="col-md-9 mt-1">
|
<div class="col-md-9 mt-1">
|
||||||
<div class="custom-control custom-radio custom-control-inline">
|
<div class="custom-control custom-radio custom-control-inline">
|
||||||
@ -35,10 +25,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-12" id="emailSubject" style="display: block;">
|
<div class="form-group col-md-6" id="emailSubject" style="display: block;">
|
||||||
<label for="templatename" class="col-form-label">subject</label>
|
<label for="templatename" class="col-form-label">subject</label>
|
||||||
<input type="text" class="form-control" id="subject" name="subject" value="<?= isset($template_details['subject']) ? $template_details['subject'] : '' ?>" placeholder="Subject" />
|
<input type="text" class="form-control" id="subject" name="subject" value="<?= isset($template_details['subject']) ? $template_details['subject'] : '' ?>" placeholder="Subject" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
<label for="templatemessage" class="col-form-label">Template Message<span class="text-danger"> *</span></label>
|
<label for="templatemessage" class="col-form-label">Template Message<span class="text-danger"> *</span></label>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user