Fixes : ps
This commit is contained in:
parent
dbc9e7a397
commit
9a9bd8536c
@ -301,7 +301,9 @@ class Customer extends BaseController
|
|||||||
['value'=>'','fieldflag'=>1,'text'=> 'Choose the Field','disable' => false],
|
['value'=>'','fieldflag'=>1,'text'=> 'Choose the Field','disable' => false],
|
||||||
['value'=>'C.type','fieldflag'=>1,'text'=> 'Type','disable' => false],
|
['value'=>'C.type','fieldflag'=>1,'text'=> 'Type','disable' => false],
|
||||||
['value'=>'CA.city','fieldflag'=>1,'text'=> 'City','disable' => false],
|
['value'=>'CA.city','fieldflag'=>1,'text'=> 'City','disable' => false],
|
||||||
['value'=>'CA.state','fieldflag'=>1,'text'=> 'State','disable' => false],
|
// ['value'=>'CA.state','fieldflag'=>1,'text'=> 'State','disable' => false],
|
||||||
|
['value'=>'CA.postal_code','fieldflag'=>1,'text'=> 'Postal Code','disable' => false],
|
||||||
|
['value'=>'C.mode','fieldflag'=>3,'text'=> 'Mode','disable' => false],
|
||||||
['value'=>'CM.name','fieldflag'=>1,'text'=> 'Category','disable' => false],
|
['value'=>'CM.name','fieldflag'=>1,'text'=> 'Category','disable' => false],
|
||||||
['value'=>'I.invoice_date','fieldflag'=>2,'text'=> 'Invoice Date','disable' => false],
|
['value'=>'I.invoice_date','fieldflag'=>2,'text'=> 'Invoice Date','disable' => false],
|
||||||
['value'=>'S.to_subscription','fieldflag'=>2,'text'=> 'Expiry Date','disable' => false]];
|
['value'=>'S.to_subscription','fieldflag'=>2,'text'=> 'Expiry Date','disable' => false]];
|
||||||
@ -355,7 +357,7 @@ 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'];
|
||||||
// print_r($sql);die;
|
print_r($sql);die;
|
||||||
if($sql){
|
if($sql){
|
||||||
$query = $db->query($sql);
|
$query = $db->query($sql);
|
||||||
$results = $query->getResultArray();
|
$results = $query->getResultArray();
|
||||||
@ -428,7 +430,6 @@ class Customer extends BaseController
|
|||||||
$column = $request_data['column'][$i];
|
$column = $request_data['column'][$i];
|
||||||
$operator = $request_data['operator'][$i];
|
$operator = $request_data['operator'][$i];
|
||||||
$value = $request_data['values'][$i];
|
$value = $request_data['values'][$i];
|
||||||
|
|
||||||
// Handle different operators and build corresponding conditions
|
// Handle different operators and build corresponding conditions
|
||||||
switch ($operator) {
|
switch ($operator) {
|
||||||
case 'equal':
|
case 'equal':
|
||||||
|
|||||||
@ -77,7 +77,7 @@ class NotificationHelper
|
|||||||
$this->logger->info('Helper : Whatsapp');
|
$this->logger->info('Helper : Whatsapp');
|
||||||
$curl = curl_init();
|
$curl = curl_init();
|
||||||
$headers = array('Content-Type:application/json');
|
$headers = array('Content-Type:application/json');
|
||||||
$jsonencoded = json_encode($data, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP | JSON_UNESCAPED_UNICODE);
|
$jsonencoded = json_encode($data);
|
||||||
curl_setopt( $curl,CURLOPT_URL, $url);
|
curl_setopt( $curl,CURLOPT_URL, $url);
|
||||||
$this->logger->info('Helper : Whatsapp url = '.$url);
|
$this->logger->info('Helper : Whatsapp url = '.$url);
|
||||||
switch ($method) {
|
switch ($method) {
|
||||||
|
|||||||
@ -64,6 +64,12 @@
|
|||||||
<input type="text" class="form-control" id=<?= "values".$i; ?> name="values[]" placeholder="Enter the Multiple Values with comma Seprator" onkeypress="return restriction(event,'M')" value="<?= (isset($customer_group['values'][$i]) && $customer_group['values'][$i] != "" ) ? $customer_group['values'][$i] : '' ?>" />
|
<input type="text" class="form-control" id=<?= "values".$i; ?> name="values[]" placeholder="Enter the Multiple Values with comma Seprator" onkeypress="return restriction(event,'M')" value="<?= (isset($customer_group['values'][$i]) && $customer_group['values'][$i] != "" ) ? $customer_group['values'][$i] : '' ?>" />
|
||||||
<?php }else if($customer_group['operator'][$i] === 'is null' || $customer_group['operator'][$i] == 'is not null') { ?>
|
<?php }else if($customer_group['operator'][$i] === 'is null' || $customer_group['operator'][$i] == 'is not null') { ?>
|
||||||
<input type="hidden" class="form-control" id=<?= "values".$i; ?> name="values[]" placeholder="Enter the Values" value="<?= (isset($customer_group['values'][$i]) && $customer_group['values'][$i] != "" ) ? $customer_group['values'][$i] : '' ?>" />
|
<input type="hidden" class="form-control" id=<?= "values".$i; ?> name="values[]" placeholder="Enter the Values" value="<?= (isset($customer_group['values'][$i]) && $customer_group['values'][$i] != "" ) ? $customer_group['values'][$i] : '' ?>" />
|
||||||
|
<?php }else if($customer_group['column'][$i] == 'C.mode' && ($customer_group['operator'][$i] === 'equal' || $customer_group['operator'][$i] == 'not equal' || $customer_group['operator'][$i] == 'like' )) { ?>
|
||||||
|
<select class="form-control" id=<?= "values".$i; ?> name="values[]">
|
||||||
|
<option value="">Choose the mode</option>
|
||||||
|
<option value="Online" <?= (isset($customer_group['values'][$i]) && $customer_group['values'][$i] == "Online") ? 'selected' : '' ?>>Online</option>
|
||||||
|
<option value="Offline" <?= (isset($customer_group['values'][$i]) && $customer_group['values'][$i] == "Offline") ? 'selected' : '' ?>>Offline</option>
|
||||||
|
</select>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<input type="text" class="form-control" id=<?= "values".$i; ?> name="values[]" placeholder="Enter the Values" onkeypress="return restriction(event,2)"
|
<input type="text" class="form-control" id=<?= "values".$i; ?> name="values[]" placeholder="Enter the Values" onkeypress="return restriction(event,2)"
|
||||||
value="<?= (isset($customer_group['values'][$i]) && $customer_group['values'][$i] != "" ) ? $customer_group['values'][$i] : '' ?>" />
|
value="<?= (isset($customer_group['values'][$i]) && $customer_group['values'][$i] != "" ) ? $customer_group['values'][$i] : '' ?>" />
|
||||||
@ -485,6 +491,8 @@ function FieldChange(selectElement, rowCounter) {
|
|||||||
$('#' + inputId).replaceWith('<input type="text" class="form-control" id="' + inputId + '" name="values[]" placeholder="Enter the Multiple Values with comma Seprator" onkeypress="return restriction(event,2)" />');
|
$('#' + inputId).replaceWith('<input type="text" class="form-control" id="' + inputId + '" name="values[]" placeholder="Enter the Multiple Values with comma Seprator" onkeypress="return restriction(event,2)" />');
|
||||||
}else if(selectedOperator === 'is null' || selectedOperator == 'is not null') {
|
}else if(selectedOperator === 'is null' || selectedOperator == 'is not null') {
|
||||||
$('#' + inputId).replaceWith('<input type="hidden" class="form-control" id="' + inputId + '" name="values[]" placeholder="Enter the Values" value="0" />');
|
$('#' + inputId).replaceWith('<input type="hidden" class="form-control" id="' + inputId + '" name="values[]" placeholder="Enter the Values" value="0" />');
|
||||||
|
}else if(column == 3 && (selectedOperator === 'equal' || selectedOperator == 'not equal' || selectedOperator == 'like' )){
|
||||||
|
$('#' + inputId).replaceWith('<select class="form-control" id="' + inputId + '" name="values[]" ><option value="">Choose the mode</option><option value="Online">Online</option><option value="Offline">Offline</option></select>');
|
||||||
}else{
|
}else{
|
||||||
$('#' + inputId).replaceWith('<input type="text" class="form-control" id="' + inputId + '" name="values[]" placeholder="Enter the Values" onkeypress="return restriction(event,1)" />');
|
$('#' + inputId).replaceWith('<input type="text" class="form-control" id="' + inputId + '" name="values[]" placeholder="Enter the Values" onkeypress="return restriction(event,1)" />');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -119,7 +119,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group text-right m-b-0">
|
<div class="form-group text-right m-b-0">
|
||||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1">
|
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="submitBtn">
|
||||||
Send
|
Send
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -180,7 +180,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group text-right m-b-0">
|
<div class="form-group text-right m-b-0">
|
||||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1">
|
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="submitBtn">
|
||||||
Send
|
Send
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user