From 4a2db9b3579808a5a17bb478c3a285634e207050 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Thu, 31 Aug 2023 18:57:02 +0530 Subject: [PATCH 1/4] API Integration Stage 2 : ps --- app/Config/Constants.php | 6 +- app/Config/Routes.php | 4 +- app/Controllers/Books.php | 74 +++++++++++++++++++++++ app/Controllers/Customer.php | 113 +++++++++++++++++++++++++++++++++-- app/Controllers/Home.php | 69 --------------------- app/Models/CustomerModel.php | 12 +++- app/Views/book_list.php | 2 +- app/Views/customer_list.php | 1 + 8 files changed, 202 insertions(+), 79 deletions(-) diff --git a/app/Config/Constants.php b/app/Config/Constants.php index b9cb843e..4f636275 100644 --- a/app/Config/Constants.php +++ b/app/Config/Constants.php @@ -96,4 +96,8 @@ define('EVENT_PRIORITY_HIGH', 10); /** * Constants For Api Integration. */ -define('VPB_BOOK', 'https://vbp.venbait.in/wp-json/wc/v3/products'); +define('VB_APIURL', 'https://vbp.venbait.in/wp-json/wc/v3/'); +define('VB_BOOKS', VB_APIURL.'products'); +define('VB_CUSTOMERS', VB_APIURL.'customers'); + + diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 29aed9aa..f193f0a3 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -79,7 +79,9 @@ $routes->post("insert_scheme/", "Scheme::insert_scheme"); $routes->get("delete_scheme/(:any)", "Scheme::delete_scheme/$1"); # Api integration Routes -$routes->get("apiintegration", "Home::apiintegration"); +$routes->get("book_api_integration", "Book::apiintegration"); +$routes->get("customer_api_integration", "Customer::apiintegration"); + /* * -------------------------------------------------------------------- * Additional Routing diff --git a/app/Controllers/Books.php b/app/Controllers/Books.php index 00b1fd99..5eaeaa06 100755 --- a/app/Controllers/Books.php +++ b/app/Controllers/Books.php @@ -148,4 +148,78 @@ class Books extends BaseController $BooksModel->update($id, $data); return redirect()->route('book_list'); } + + ## ApiIntegration For Book. + public function apiintegration() { + helper('apiIntegration'); + helper('session'); + $session_role = get_user_role(); + $session_uid = get_logged_user_id(); + $response = perform_http_request('GET', VB_BOOKS); + $message = ""; + if(count($response['response'])>0){ + //$message = "Reponse Count : ".count($response['response'])."
"; + echo "Note : This For CrossCheck Purpose 1ly
"; + echo "Total Book API Reponse Count : " . count($response['response']) . "
"; + $BooksModel = new BooksModel(); + foreach($response['response'] as $row){ + if($row->status == "publish"){ + $publisher = ''; + $language = ''; + $attributes = $row->attributes; + if(count($attributes)>0){ + foreach ($attributes as $att){ + if($att->name == "Publisher"){ $publisher = implode(", ",$att->options); } + if($att->name == "Book Author"){ $publisher .= implode(", ",$att->options)."(Book Author)"; } + if($att->name == "Book Language"){ $language = implode(", ",$att->options); } + } + } + // echo $row->permalink ; + $insertion_data['title'] = $row->name ; + $insertion_data['publication_date'] = $row->date_created; + $insertion_data['publisher'] = $publisher; + $insertion_data['genre'] = $row->description; + $insertion_data['language'] = $language; + $insertion_data['description'] = $row->short_description; + $insertion_data['page_count']=''; + $insertion_data['price'] = $row->sale_price != '' ? $row->sale_price : $row->regular_price; + $insertion_data['created_by'] = $session_uid; + $insertion_data['isactive'] = 1; + $insertion_data['business_id'] = 1; + $images = $row->images; + $i = 0; + $BooksModel->insert($insertion_data); + $lastInsertId = $BooksModel->insertID(); + $insertion_img_data = []; + // $message .= "book ID : ".$lastInsertId." have Imgs".count($images)."
"; + echo "book ID : ".$lastInsertId." have Imgs".count($images)."
"; + if(count($images)>0){ + foreach ($images as $img){ + $insertion_img_data[$i]['img_name'] = $img->src; + $insertion_img_data[$i]['is_cover'] = 0; + $insertion_img_data[$i]['type'] = 2; + $insertion_img_data[$i]['book_id'] = $lastInsertId; + $insertion_img_data[$i]['created_by'] = $session_uid; + $insertion_img_data[$i]['isactive'] = 1; + $i++; + } // image loop closed + $BooksModel->insertImagesBatch($insertion_img_data); + //$message .= "book ID : ".$lastInsertId." Img. Batch Inserted Done
"; + echo "       Img Batch Inserted Done. ".$i. "
"; + }//image count closed + }//if cond. closed + }//reponse foreach closed + }//reponse count if closed + if(!empty($response['error'])){ + echo $response['error']; + echo $response['error_msg']; + $message .= $response['error'].$response['error_msg']; + echo $response['error'].$response['error_msg']; + echo "Error :".$response['error'] . $response['error_msg']; + }else{ + echo "Done"; + } + $go_to_list_page = base_url()."book_list"; + echo "
go to list page
"; + } } diff --git a/app/Controllers/Customer.php b/app/Controllers/Customer.php index f2ab8d4c..8728cb8d 100644 --- a/app/Controllers/Customer.php +++ b/app/Controllers/Customer.php @@ -11,12 +11,14 @@ class Customer extends BaseController public function index() { helper('session'); - if (is_session_active()) { + if (is_session_active()) { $session_role = get_user_role(); $session_bid = get_business_id(); if (!empty($session_role) && $session_role !== "sadmin") { - $where = ['isactive'=>1,'business_id'=>(int)$session_bid]; - }else{ $where = ['isactive != '=>NULL];} + $where = ['isactive' => 1, 'business_id' => (int)$session_bid]; + } else { + $where = ['isactive != ' => NULL]; + } $CustomerModel = new CustomerModel(); $data['page_name'] = 'Customer Listing'; @@ -25,10 +27,9 @@ class Customer extends BaseController // print_r($data); die(); $this->render_page('customer_list', $data); - }else{ + } else { return redirect()->to('login'); } - } ## To Load Customer Form (Add/Update) @@ -119,4 +120,104 @@ class Customer extends BaseController // return redirect()->to(base_url('Business/index'))->with('success', 'Business deleted successfully.'); return redirect()->route('customer_list'); } -} \ No newline at end of file + + ## ApiIntegration For Customer. + public function apiintegration() + { + helper('apiIntegration'); + helper('session'); + $session_bid = get_business_id(); + $session_uid = get_logged_user_id(); + $response = perform_http_request('GET', VB_CUSTOMERS); + $message = ""; + if (count($response['response']) > 0) { + //$message = "Reponse Count : ".count($response['response'])."
"; + echo "Note : This For CrossCheck Purpose 1ly
"; + echo "Total Customer API Reponse Count : " . count($response['response']) . "
"; + $CustomerModel = new CustomerModel(); + $x=0; + foreach ($response['response'] as $row) { + $insertion_data['first_name'] = $row->first_name; + $insertion_data['last_name'] = $row->last_name; + $insertion_data['type'] = $row->role; + $insertion_data['email'] = $row->email; + // $insertion_data['profile_picture'] = $row->avatar_url; + $insertion_data['mode'] = 'online'; + $insertion_data['created_by'] = $session_uid; + $insertion_data['business_id'] = $session_bid; + $billing = $row->billing; + $shipping = $row->shipping; + $CustomerModel->insert($insertion_data); + $lastInsertId = $CustomerModel->insertID(); + $insertion_baddress_data = [];$insertion_saddress_data = []; + $i = 0; $j = 0; + + if(isset($billing) && gettype($billing) === 'object') {$billing = [$billing];} + if(isset($shipping) && gettype($shipping) === 'object') {$shipping = [$shipping];} + echo "Customer ID : ".$lastInsertId." have Billing address = ".count($billing)." and Shipping address = ".count($shipping)."
"; + if (count($billing) > 0) { + foreach ($billing as $bill) { + if ($bill->first_name !== '') { + $insertion_baddress_data[$i]['first_name'] = $bill->first_name; + $insertion_baddress_data[$i]['last_name'] = $bill->last_name; + $insertion_baddress_data[$i]['company'] = $bill->company; + $insertion_baddress_data[$i]['address_1'] = $bill->address_1; + $insertion_baddress_data[$i]['address_2'] = $bill->address_2; + $insertion_baddress_data[$i]['city'] = $bill->city; + $insertion_baddress_data[$i]['state'] = $bill->state; + $insertion_baddress_data[$i]['country'] = $bill->country; + $insertion_baddress_data[$i]['postal_code'] = $bill->postcode; + $insertion_baddress_data[$i]['customer_id'] = $lastInsertId; + $insertion_baddress_data[$i]['address_type'] = 1; + $insertion_baddress_data[$i]['created_by'] = $session_uid; + $insertion_baddress_data[$i]['email'] = isset($bill->email) ? $bill->email : ''; + $insertion_baddress_data[$i]['mobile_no'] = isset($bill->phone) ? $bill->phone : ''; + $i++; + echo "       Billing address has a value and Inserted ".$i."
"; + }else{ + echo "       Keys are available but Billing address has no value;
"; + } + } + (!empty($insertion_baddress_data) ? $CustomerModel->insertAddressBatch($insertion_baddress_data) : ""); + } + if (count($shipping) > 0) { + foreach ($shipping as $ship) { + if ($ship->first_name !== '') { + $insertion_saddress_data[$j]['first_name'] = $ship->first_name; + $insertion_saddress_data[$j]['last_name'] = $ship->last_name; + $insertion_saddress_data[$j]['company'] = $ship->company; + $insertion_saddress_data[$j]['address_1'] = $ship->address_1; + $insertion_saddress_data[$j]['address_2'] = $ship->address_2; + $insertion_saddress_data[$j]['city'] = $ship->city; + $insertion_saddress_data[$j]['state'] = $ship->state; + $insertion_saddress_data[$j]['country'] = $ship->country; + $insertion_saddress_data[$j]['postal_code'] = $ship->postcode; + $insertion_saddress_data[$j]['email'] = isset($ship->email)?$ship->email:""; + $insertion_saddress_data[$j]['mobile_no'] = isset($ship->phone)?$ship->phone:""; + $insertion_saddress_data[$j]['customer_id'] = $lastInsertId; + $insertion_saddress_data[$j]['address_type'] = 2; + $insertion_saddress_data[$j]['created_by'] = $session_uid; + $j++; + echo "        Shipping address has a value and Inserted ".$j."
"; + } + else{ + echo "        Keys are available but Shipping address has no value
"; + } + } + (!empty($insertion_saddress_data) ? $CustomerModel->insertAddressBatch($insertion_saddress_data) : ""); + } + } //reponse foreach closed + } //reponse count if closed + if (!empty($response['error'])) { + echo $response['error']; + echo $response['error_msg']; + $message .= $response['error'] . $response['error_msg']; + echo "Error :".$response['error'] . $response['error_msg']; + }else{ + echo "Done"; + } + $go_to_list_page = base_url()."customer_list"; + echo "
go to list page
"; + // return $message; + } +} diff --git a/app/Controllers/Home.php b/app/Controllers/Home.php index 69c4838b..218308e7 100644 --- a/app/Controllers/Home.php +++ b/app/Controllers/Home.php @@ -14,73 +14,4 @@ class Home extends BaseController } - ## ApiIntegration. - public function apiintegration() { - helper('apiIntegration'); - helper('session'); - $session_role = get_user_role(); - $session_uid = get_logged_user_id(); - $response = perform_http_request('GET', VPB_BOOK); - $message = ""; - if(count($response['response'])>0){ - //$message = "Reponse Count : ".count($response['response'])."
"; - echo "Reponse Count : ".count($response['response'])."
"; - $BooksModel = new BooksModel(); - foreach($response['response'] as $row){ - if($row->status == "publish"){ - $publisher = ''; - $language = ''; - $attributes = $row->attributes; - if(count($attributes)>0){ - foreach ($attributes as $att){ - if($att->name == "Publisher"){ $publisher = implode(", ",$att->options); } - if($att->name == "Book Author"){ $publisher .= implode(", ",$att->options)."(Book Author)"; } - if($att->name == "Book Language"){ $language = implode(", ",$att->options); } - } - } - // echo $row->permalink ; - $insertion_data['title'] = $row->name ; - $insertion_data['publication_date'] = $row->date_created; - $insertion_data['publisher'] = $publisher; - $insertion_data['genre'] = $row->description; - $insertion_data['language'] = $language; - $insertion_data['description'] = $row->short_description; - $insertion_data['page_count']=''; - $insertion_data['price'] = $row->sale_price != '' ? $row->sale_price : $row->regular_price; - $insertion_data['created_by'] = $session_uid; - $insertion_data['isactive'] = 1; - $insertion_data['business_id'] = 1; - $images = $row->images; - $i = 0; - $BooksModel->insert($insertion_data); - $lastInsertId = $BooksModel->insertID(); - $insertion_img_data = []; - // $message .= "book ID : ".$lastInsertId." have Imgs".count($images)."
"; - echo "book ID : ".$lastInsertId." have Imgs".count($images)."
"; - if(count($images)>0){ - foreach ($images as $img){ - $insertion_img_data[$i]['img_name'] = $img->src; - $insertion_img_data[$i]['is_cover'] = 0; - $insertion_img_data[$i]['type'] = 2; - $insertion_img_data[$i]['book_id'] = $lastInsertId; - $insertion_img_data[$i]['created_by'] = $session_uid; - $insertion_img_data[$i]['isactive'] = 1; - $i++; - } // image loop closed - $BooksModel->insertImagesBatch($insertion_img_data); - //$message .= "book ID : ".$lastInsertId." Img. Batch Inserted Done
"; - echo "book ID : ".$lastInsertId." Img. Batch Inserted Done
"; - }//image count closed - }//if cond. closed - }//reponse foreach closed - }//reponse count if closed - if(!empty($response['error'])){ - echo $response['error']; - echo $response['error_msg']; - $message .= $response['error'].$response['error_msg']; - echo $response['error'].$response['error_msg']; - } - //return $message; - echo "Done"; - } } diff --git a/app/Models/CustomerModel.php b/app/Models/CustomerModel.php index 15e23421..71b07cc2 100644 --- a/app/Models/CustomerModel.php +++ b/app/Models/CustomerModel.php @@ -14,6 +14,16 @@ class CustomerModel extends Model public function insertCustomer($data) { return $this->insert($data); - } + } + + public function insertAddress($addressData) { + $this->db->table('customer_addresses')->insert($addressData); + return $this->db->insertID(); // Return the last inserted ID + } + + public function insertAddressBatch($addressesDataArray) { + $this->db->table('customer_addresses')->insertBatch($addressesDataArray); + return $this->db->insertID(); // Note: insertID() might not be applicable for batch inserts + } } ?> \ No newline at end of file diff --git a/app/Views/book_list.php b/app/Views/book_list.php index 30fc023a..8b9276db 100644 --- a/app/Views/book_list.php +++ b/app/Views/book_list.php @@ -4,7 +4,7 @@

diff --git a/app/Views/customer_list.php b/app/Views/customer_list.php index f3c14b6a..70a37e4b 100644 --- a/app/Views/customer_list.php +++ b/app/Views/customer_list.php @@ -4,6 +4,7 @@

From afb56f06b0fb9efea3ee0437c0ac2763965fd3a2 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Sat, 2 Sep 2023 17:02:45 +0530 Subject: [PATCH 2/4] Customer Add more address : ps --- app/Controllers/Customer.php | 84 ++++++++++- app/Controllers/Home.php | 19 ++- app/Models/CustomerModel.php | 27 +++- app/Models/HomeModel.php | 27 ++++ app/Views/customer_form.php | 271 +++++++++++++++++++++++++++++----- app/Views/dashboard.php | 14 +- app/Views/template/header.php | 2 +- 7 files changed, 391 insertions(+), 53 deletions(-) create mode 100644 app/Models/HomeModel.php diff --git a/app/Controllers/Customer.php b/app/Controllers/Customer.php index 8728cb8d..c5e0c06e 100644 --- a/app/Controllers/Customer.php +++ b/app/Controllers/Customer.php @@ -40,15 +40,17 @@ class Customer extends BaseController if ($id === '0') { $data['page_name'] = 'Add Customer'; $data['customer'] = []; + $data['customer_billing'] = []; + $data['customer_shipping'] = []; } else if ($id !== '0') { $data['page_name'] = 'Edit Customer'; $model = new CustomerModel(); $model->setTable('customers'); $edit_user_details = $model->where(['customer_id' => $id])->first(); - $data['customer'] = $edit_user_details; + $data['customer_billing'] = $this->get_customer_address($id,1); + $data['customer_shipping'] = $this->get_customer_address($id,2); } - $data['session_bid'] = $session_bid; $this->render_page('customer_form', $data); } @@ -59,7 +61,7 @@ class Customer extends BaseController helper('session'); $session_bid = get_business_id(); $session_uid = get_logged_user_id(); - $model = new CustomerModel(); + $model = new CustomerModel(); $data = [ 'first_name' => $this->request->getPost('cfname'), 'last_name' => $this->request->getPost('csname'), @@ -76,27 +78,88 @@ class Customer extends BaseController 'profile_picture' => $this->request->getPost('cfile'), 'mode' => $this->request->getPost('cmode'), 'business_id' => $this->request->getPost('business_id') - ]; $customer_id = $this->request->getPost('customer_id'); // Get the business ID for update - if (empty($customer_id)) { // It's an insert operation $data['isactive'] = 1; $data['created_by'] = $session_uid; //print_r($data);die; $model->insert($data); + $FK_CID = $model->insertID(); // for Customer ADDRESS Table } else { // It's an update operation - $isactive = $this->request->getPost('isactivce'); + $isactive = $this->request->getPost('isactive'); $data['isactive'] = ($isactive == 'on') ? 1 : 0; $data['updated_by'] = $session_uid; - $model->update($customer_id, $data); + // $model->update($customer_id, $data); + $FK_CID = $customer_id; // for Customer ADDRESS Table } + $requestData = $this->request->getPost(); + $this->save_customer_addresses($FK_CID,$requestData,'b'); + $this->save_customer_addresses($FK_CID,$requestData,'s'); return redirect()->route('customer_list'); } + public function save_customer_addresses($id,$requestData,$letteringflag){ + + $addressType = ($letteringflag == 'b') ? 1 : 2; + $getAddressdetails = $this->get_customer_address($id,$addressType); + $CAid = $requestData[$letteringflag.'customer_address_id']; // Available Address IDS in Form Fields. + $model = new CustomerModel(); + + // Compare Address Input Field PKIDS With Existing PKIDS + // IF Any Missing value Means that values are Inactive here.... + if(!empty($CAid)){ + $filteringAddressIds = []; + for ($y = 0; $y < count($getAddressdetails); $y++) { + $filteringAddressIds[$y] = $getAddressdetails[$y]['customer_address_id']; + } + if(!empty($filteringAddressIds)){ + $A = $filteringAddressIds; + $B = $CAid; + $missingValues = array_diff($A,$B); + if(!empty($missingValues)){ + $where = ['isactive'=>1,'customer_id'=>(int)$id,'address_type'=>$addressType]; + $model->inactiveMissingAddressDetails($where,$missingValues); + } + } + } + $session_uid = get_logged_user_id(); + + $baddress1 = $requestData[$letteringflag.'address1']; + $baddress2 = $requestData[$letteringflag.'address2']; + $bcountry = $requestData[$letteringflag.'country']; + $bcity = $requestData[$letteringflag.'city']; + $bstate = $requestData[$letteringflag.'state']; + $bzip = $requestData[$letteringflag.'zip']; + $count = count($CAid); + $address_array = []; + if($count > 0){ + for ($x = 0; $x < $count; $x++) { + $address_array[$x]['first_name'] = $requestData['cfname']; + $address_array[$x]['last_name'] = $requestData['csname']; + // $address_array[$x]['company'] = ""; + $address_array[$x]['email'] = $requestData['cmail']; + $address_array[$x]['mobile_no'] = $requestData['cmobile']; + $address_array[$x]['address_1'] = $baddress1[$x]; + $address_array[$x]['address_2'] = $baddress2[$x]; + $address_array[$x]['city'] = $bcity[$x]; + $address_array[$x]['state'] = $bstate[$x]; + $address_array[$x]['country'] = $bcountry[$x]; + $address_array[$x]['postal_code'] = $bzip[$x]; + $address_array[$x]['customer_id'] = $id; + $address_array[$x]['address_type'] = $addressType; + $address_array[$x]['created_by'] = $session_uid; + $address_array[$x]['updated_by'] = $CAid[$x] ? $session_uid : null; + $address_array[$x]['customer_address_id'] = $CAid[$x]; + } + $statement = $model->saveAddressDetails($address_array); + } + return $statement; + } + ## For delete the customer details (Which means inactive the details) public function delete_customer($id) { @@ -121,6 +184,13 @@ class Customer extends BaseController return redirect()->route('customer_list'); } + public function get_customer_address($id,$type){ + $model = new CustomerModel(); + $model->setTable('customer_addresses'); + $where = ['isactive' => 1, 'customer_id' => (int)$id,'address_type'=>(int)$type]; + $address_details = $model->where($where)->findAll(); + return $address_details; + } ## ApiIntegration For Customer. public function apiintegration() { diff --git a/app/Controllers/Home.php b/app/Controllers/Home.php index 218308e7..0cbf639b 100644 --- a/app/Controllers/Home.php +++ b/app/Controllers/Home.php @@ -1,17 +1,28 @@ 1, 'business_id' => (int)$session_bid]; + } else if (!empty($session_role) && $session_role !== "admin") { + $where = ['isactive != ' => NULL]; + } else { + $where = []; + } + $model = new HomeModel(); + $data['customer'] = $model->customers($where); + $data['customer']['label'] = "Customer"; $this->render_page('dashboard', $data); - } } diff --git a/app/Models/CustomerModel.php b/app/Models/CustomerModel.php index 71b07cc2..780986b6 100644 --- a/app/Models/CustomerModel.php +++ b/app/Models/CustomerModel.php @@ -9,7 +9,7 @@ class CustomerModel extends Model { protected $table = 'customers'; protected $primaryKey = 'customer_id '; - protected $allowedFields = ['customer_id ','first_name','last_name','email','mobile_no','country','state','postal_code' ,'address','profile_picture','date_of_birth','gender','mode','type','isactive','business_id']; + protected $allowedFields = ['customer_id ','first_name','city','last_name','email','mobile_no','country','state','postal_code' ,'address','profile_picture','date_of_birth','gender','mode','type','isactive','business_id']; public function insertCustomer($data) { @@ -25,5 +25,30 @@ class CustomerModel extends Model $this->db->table('customer_addresses')->insertBatch($addressesDataArray); return $this->db->insertID(); // Note: insertID() might not be applicable for batch inserts } + + public function saveAddressDetails($data){ + $i = 0; + $statement = []; + foreach ($data as $row) { + $id = $row['customer_address_id']; + if($id != ''){ + unset($row['customer_address_id']); // Remove the id from the data to avoid updating it + unset($row['created_by']); // bcoz here data Updating here. + $this->db->table('customer_addresses')->where('customer_address_id', $id)->update($row);// Update the row with the specified id + $affectedRows = $this->db->affectedRows(); + $statement[$i] = "address - ".$id." ".$affectedRows ? " Updated":" Not Updated"; + }else{ + + $this->db->table('customer_addresses')->insert($row); + $insertID = $this->db->insertID(); + $statement[$i] = "address - ".$insertID." Inserted"; + } + } + return $statement; + } + public function inactiveMissingAddressDetails($where,$missingValues){ + $dataToUpdate = ['isactive' => 0]; + $this->db->table('customer_addresses')->where($where)->whereIn('customer_address_id',$missingValues)->update($dataToUpdate); + } } ?> \ No newline at end of file diff --git a/app/Models/HomeModel.php b/app/Models/HomeModel.php new file mode 100644 index 00000000..1b774092 --- /dev/null +++ b/app/Models/HomeModel.php @@ -0,0 +1,27 @@ +db->table('customers'); + + $totalCustomers = $query->where($where)->countAll(); + $activeCustomers = $query->where($where)->countAllResults(); + + $where['DATE(created_on)'] = date('Y-m-d'); + $todayCustomers = $query->where($where)->countAllResults(); + + if ($totalCustomers > 0) { + $customer['percentage'] = ($activeCustomers / $totalCustomers) * 100; + } else { + $customer['percentage'] = 0; + } + + $customer['total'] = $totalCustomers; + $customer['active'] = $activeCustomers; + $customer['today'] = $todayCustomers; + return $customer; + } +} diff --git a/app/Views/customer_form.php b/app/Views/customer_form.php index eedbb3c2..31c223ab 100644 --- a/app/Views/customer_form.php +++ b/app/Views/customer_form.php @@ -7,85 +7,74 @@
- -
+
Please provide.
-
+
Please provide.
-
- -
-
+
Please provide.
- -
- - -
Please provide.
-
-
-
+
+ +
+
+
+91
+
+ +
Please provide.
+
+
+
Please provide.
-
+
Please provide.
-
- -
+
Please provide.
- - - -
+
+
+
Please provide.
-
- -
-
+
Please provide.
- - -
+
Please provide.
-
-
-
+
- +
Please provide.
- - +
+
@@ -97,8 +86,141 @@
Please provide.
- + + +
+
Billing Address
+
+
+
+ + + +
+
+ + +
Please provide.
+
+
+ + +
Please provide.
+
+
+
+
+ + +
Please provide.
+
+
+ + +
Please provide.
+
+
+ + +
Please provide.
+
+
+ + +
Please provide.
+
+
+
+
+ +
+
+
+
+
+ +
+
Shipping Address
+
+
+
+
+
+ + +
Please provide.
+
+
+ + +
Please provide.
+
+
+
+
+ + +
Please provide.
+
+
+ + +
Please provide.
+
+
+ + +
Please provide.
+
+
+ + +
Please provide.
+
+ +
+
+
+ +
+
+
+
+
+ + -
-
\ No newline at end of file +
+ \ No newline at end of file diff --git a/app/Views/dashboard.php b/app/Views/dashboard.php index 6ec2854f..157cc6c0 100644 --- a/app/Views/dashboard.php +++ b/app/Views/dashboard.php @@ -5,13 +5,25 @@
+ +
+

+

diff --git a/app/Views/template/header.php b/app/Views/template/header.php index cca79f69..bf1b543f 100644 --- a/app/Views/template/header.php +++ b/app/Views/template/header.php @@ -112,7 +112,7 @@
" method="post"> diff --git a/app/Views/auth_logout.php b/app/Views/auth_logout.php index 3938b9af..0b3c1d0a 100755 --- a/app/Views/auth_logout.php +++ b/app/Views/auth_logout.php @@ -2,23 +2,23 @@ - Logout | Minton - Responsive Admin Dashboard Template + Logout - + "> - - + " rel="stylesheet" type="text/css" id="bs-default-stylesheet" /> + " rel="stylesheet" type="text/css" id="app-default-stylesheet" /> - - + " rel="stylesheet" type="text/css" id="bs-dark-stylesheet" /> + " rel="stylesheet" type="text/css" id="app-dark-stylesheet" /> - + " rel="stylesheet" type="text/css" /> @@ -34,16 +34,18 @@ @@ -78,7 +80,7 @@
-

Back to Sign In

+

Back to Sign In

@@ -92,14 +94,14 @@
- © Minton theme by Coderthemes +

© .

- + - + \ No newline at end of file diff --git a/app/Views/auth_reset_password.php b/app/Views/auth_reset_password.php index 6187474d..ced9118b 100644 --- a/app/Views/auth_reset_password.php +++ b/app/Views/auth_reset_password.php @@ -37,7 +37,7 @@

Enter your email address and we'll send you an email with instructions to reset your password.

- " method="post" role="form" class="parsley-examples"> + " method="post" role="form" class="parsley-examples">
diff --git a/app/Views/template/topbar.php b/app/Views/template/topbar.php index 38733909..7a5ad2c8 100644 --- a/app/Views/template/topbar.php +++ b/app/Views/template/topbar.php @@ -232,7 +232,7 @@
- + " class="dropdown-item notify-item"> My Account @@ -244,7 +244,7 @@ --> - + " class="dropdown-item notify-item"> Lock Screen From dbcaf1347806b97e3fd79ada598c7cd7d1aa7f0b Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Mon, 4 Sep 2023 14:49:50 +0530 Subject: [PATCH 4/4] spelling mistake : ps --- app/Config/Routes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index c67e141b..709ed250 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -84,7 +84,7 @@ $routes->post("insert_scheme/", "Scheme::insert_scheme"); $routes->get("delete_scheme/(:any)", "Scheme::delete_scheme/$1"); # Api integration Routes -$routes->get("book_api_integration", "Book::apiintegration"); +$routes->get("book_api_integration", "Books::apiintegration"); $routes->get("customer_api_integration", "Customer::apiintegration"); /*