Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
27b77b1b56
@ -566,6 +566,7 @@ $routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) {
|
|||||||
$routes->post("ticketConversationSave", "ThzController::ticketConversationSave");
|
$routes->post("ticketConversationSave", "ThzController::ticketConversationSave");
|
||||||
$routes->get("ticketConversationList", "ThzController::ticketConversationList");
|
$routes->get("ticketConversationList", "ThzController::ticketConversationList");
|
||||||
$routes->get("ticketHistoryList", "ThzController::ticketHistoryList");
|
$routes->get("ticketHistoryList", "ThzController::ticketHistoryList");
|
||||||
|
$routes->match(['get','post','put'], 'ticketType', 'ThzController::ticketType');
|
||||||
|
|
||||||
$routes->get("hrFileList", "EmployeeRestController::hrFileList");
|
$routes->get("hrFileList", "EmployeeRestController::hrFileList");
|
||||||
$routes->get("hrFileUploadMasters", "EmployeeRestController::hrFileUploadMasters");
|
$routes->get("hrFileUploadMasters", "EmployeeRestController::hrFileUploadMasters");
|
||||||
|
|||||||
@ -31,6 +31,7 @@ class ThzController extends BaseController
|
|||||||
protected $clientModel;
|
protected $clientModel;
|
||||||
|
|
||||||
protected $ticketMailTemplateModel;
|
protected $ticketMailTemplateModel;
|
||||||
|
protected $myLogger;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
@ -43,6 +44,7 @@ class ThzController extends BaseController
|
|||||||
$this->clientPolicyModel = new ClientPolicyModel();
|
$this->clientPolicyModel = new ClientPolicyModel();
|
||||||
$this->clientModel = new ClientModel();
|
$this->clientModel = new ClientModel();
|
||||||
$this->ticketMailTemplateModel = new TicketMailTemplateModel();
|
$this->ticketMailTemplateModel = new TicketMailTemplateModel();
|
||||||
|
$this->myLogger = \Config\Services::mylogger();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
@ -51,7 +53,8 @@ class ThzController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function ticketSave(){
|
public function ticketSave(){
|
||||||
|
try
|
||||||
|
{
|
||||||
$data = $this->request->getPost();
|
$data = $this->request->getPost();
|
||||||
|
|
||||||
if (!empty($data['thz_id'])) {
|
if (!empty($data['thz_id'])) {
|
||||||
@ -99,11 +102,27 @@ class ThzController extends BaseController
|
|||||||
'message' => $result ? "Ticket {$text}d successfully " : "Unable to {$text} ticket. Please try again." ,
|
'message' => $result ? "Ticket {$text}d successfully " : "Unable to {$text} ticket. Please try again." ,
|
||||||
'notification' => $emailNotificationResult ? 'Email Notification Success..!!' : 'Email Notification Failed..!!'
|
'notification' => $emailNotificationResult ? 'Email Notification Success..!!' : 'Email Notification Failed..!!'
|
||||||
])->setStatusCode($result ? 200 : 400);
|
])->setStatusCode($result ? 200 : 400);
|
||||||
|
} catch (\Throwable $e) {
|
||||||
|
$code = ($e->getCode() && $e->getCode() >= 100 && $e->getCode() < 600) ? $e->getCode() : 500;
|
||||||
|
|
||||||
|
$isDbError = $e instanceof \CodeIgniter\Database\Exceptions\DatabaseException
|
||||||
|
|| $e instanceof \mysqli_sql_exception
|
||||||
|
|| $e instanceof \PDOException;
|
||||||
|
|
||||||
|
$context = ['title' => get_class($e),'type' => get_class($e),'code' => $code,'message' => $e->getMessage(),'file' => $e->getFile(),'line' => $e->getLine()];
|
||||||
|
|
||||||
|
$this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0);
|
||||||
|
|
||||||
|
return $this->response->setJSON([ 'status' => 'error', 'message' => $isDbError ? 'Data Access Error' : $e->getMessage(),
|
||||||
|
'ref' => $isDbError ? 'database' : 'application' . $code . ' / ' . $e->getLine()
|
||||||
|
])->setStatusCode($code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ticketList()
|
public function ticketList()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
try{
|
||||||
$returnType = strtolower($this->request->getGet('return_type') ?? 'api');
|
$returnType = strtolower($this->request->getGet('return_type') ?? 'api');
|
||||||
|
|
||||||
|
|
||||||
@ -117,7 +136,8 @@ class ThzController extends BaseController
|
|||||||
|
|
||||||
if ($returnType === 'api') {
|
if ($returnType === 'api') {
|
||||||
if (empty($tickets)) {
|
if (empty($tickets)) {
|
||||||
return $this->response->setJSON([ 'status' => 'error','message' => 'No tickets found'])->setStatusCode(404);
|
// return $this->response->setJSON([ 'status' => 'error','message' => 'No tickets found'])->setStatusCode(404);
|
||||||
|
throw new \RuntimeException('No tickets found', 400);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
@ -126,18 +146,37 @@ class ThzController extends BaseController
|
|||||||
$data['assignee'] = $this->userModel->where('is_active', 1)->whereIn('role', ['2', '3','4'])->findAll(); // enga 5-"head" and 1-"admin" assign pannvaga so dropdown la varakudhathu
|
$data['assignee'] = $this->userModel->where('is_active', 1)->whereIn('role', ['2', '3','4'])->findAll(); // enga 5-"head" and 1-"admin" assign pannvaga so dropdown la varakudhathu
|
||||||
// 2,3,4 remain person varannum.
|
// 2,3,4 remain person varannum.
|
||||||
$data['client_list'] = $this->clientModel->getCreatedByUserName();
|
$data['client_list'] = $this->clientModel->getCreatedByUserName();
|
||||||
|
$data['ticket_type'] = $this->thzTypeModel->where('is_active', 1)->findAll();
|
||||||
|
|
||||||
return $this->loadLayout('thz_list', $data);
|
return $this->loadLayout('thz_list', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return $this->response->setJSON([
|
return $this->response->setJSON([
|
||||||
'status' => 'success',
|
'status' => 'success',
|
||||||
'data' => $tickets,
|
'data' => $tickets,
|
||||||
])->setStatusCode(200);
|
])->setStatusCode(200);
|
||||||
|
}
|
||||||
|
catch (\Throwable $e) {
|
||||||
|
$code = ($e->getCode() && $e->getCode() >= 100 && $e->getCode() < 600) ? $e->getCode() : 500;
|
||||||
|
|
||||||
|
$isDbError = $e instanceof \CodeIgniter\Database\Exceptions\DatabaseException
|
||||||
|
|| $e instanceof \mysqli_sql_exception
|
||||||
|
|| $e instanceof \PDOException;
|
||||||
|
|
||||||
|
$context = ['title' => get_class($e),'type' => get_class($e),'code' => $code,'message' => $e->getMessage(),'file' => $e->getFile(),'line' => $e->getLine()];
|
||||||
|
|
||||||
|
$this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0);
|
||||||
|
|
||||||
|
return $this->response->setJSON([ 'status' => 'error', 'message' => $isDbError ? 'Data Access Error' : $e->getMessage(),
|
||||||
|
'ref' => $isDbError ? 'database' : 'application' . $code . ' / ' . $e->getLine()
|
||||||
|
])->setStatusCode($code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ticketConversationSave(){
|
public function ticketConversationSave(){
|
||||||
|
|
||||||
|
try {
|
||||||
$data = $this->request->getPost();
|
$data = $this->request->getPost();
|
||||||
|
|
||||||
$data['notes_type'] = $data['notes_type'] ?? 'External' ;
|
$data['notes_type'] = $data['notes_type'] ?? 'External' ;
|
||||||
@ -145,7 +184,8 @@ class ThzController extends BaseController
|
|||||||
$result = $this->thzMasterNotesModel->insert($data);
|
$result = $this->thzMasterNotesModel->insert($data);
|
||||||
|
|
||||||
if(empty($result)){
|
if(empty($result)){
|
||||||
return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(404);
|
// return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(404);
|
||||||
|
throw new \RuntimeException('No tickets found', 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($data['notes_type'] == "External"){
|
if($data['notes_type'] == "External"){
|
||||||
@ -161,41 +201,72 @@ class ThzController extends BaseController
|
|||||||
'message' => $result ? "Ticket Notes created successfully" : "Unable to create ticket notes. Please try again." ,
|
'message' => $result ? "Ticket Notes created successfully" : "Unable to create ticket notes. Please try again." ,
|
||||||
'notification' => $emailNotificationResult ? 'Email Notification Success..!!' : 'Email Notification Failed Or No Need..!!'
|
'notification' => $emailNotificationResult ? 'Email Notification Success..!!' : 'Email Notification Failed Or No Need..!!'
|
||||||
])->setStatusCode($result ? 200 : 400);
|
])->setStatusCode($result ? 200 : 400);
|
||||||
|
}
|
||||||
|
catch (\Throwable $e) {
|
||||||
|
$code = ($e->getCode() && $e->getCode() >= 100 && $e->getCode() < 600) ? $e->getCode() : 500;
|
||||||
|
|
||||||
|
$isDbError = $e instanceof \CodeIgniter\Database\Exceptions\DatabaseException
|
||||||
|
|| $e instanceof \mysqli_sql_exception
|
||||||
|
|| $e instanceof \PDOException;
|
||||||
|
|
||||||
|
$context = ['title' => get_class($e),'type' => get_class($e),'code' => $code,'message' => $e->getMessage(),'file' => $e->getFile(),'line' => $e->getLine()];
|
||||||
|
|
||||||
|
$this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0);
|
||||||
|
|
||||||
|
return $this->response->setJSON([ 'status' => 'error', 'message' => $isDbError ? 'Data Access Error' : $e->getMessage(),
|
||||||
|
'ref' => $isDbError ? 'database' : 'application' . $code . ' / ' . $e->getLine()
|
||||||
|
])->setStatusCode($code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ticketAutoFetchDetails(){
|
public function ticketAutoFetchDetails()
|
||||||
|
{
|
||||||
|
try {
|
||||||
$data = $this->request->getPost();
|
$data = $this->request->getPost();
|
||||||
|
|
||||||
$client_id = $data['client_id'];
|
$client_id = $data['client_id'] ?? null;
|
||||||
$mobile = $data['mobile'];
|
$mobile = $data['mobile'] ?? null;
|
||||||
|
|
||||||
if($client_id && $mobile){
|
if ($client_id && $mobile) {
|
||||||
|
$details = $this->thzMasterModel->ticketAutoFetchDetails($client_id, $mobile);
|
||||||
$details = $this->thzMasterModel->ticketAutoFetchDetails($client_id ,$mobile);
|
|
||||||
|
|
||||||
if(empty($details)){
|
|
||||||
return $this->response->setJSON((['status' => 'error', 'message' => 'No Data found']))->setStatusCode(400);
|
|
||||||
}else{
|
|
||||||
|
|
||||||
$policyIds = array_column($details, 'policy_id');
|
|
||||||
$policyIds = array_filter($policyIds);
|
|
||||||
$clientPolicy = $this->clientPolicyModel->whereIn('id', $policyIds)->where('is_active', 1)->get()->getResultArray();
|
|
||||||
$result['client_details'] = $details;
|
|
||||||
$result['policy_details'] = empty($clientPolicy) ? [] : $clientPolicy ;
|
|
||||||
|
|
||||||
|
if (empty($details)) {
|
||||||
|
throw new \RuntimeException('No Data found', 400);
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
return $this->response->setJSON((['status' => 'error', 'message' => 'Client and Mobile Not found']))->setStatusCode(400);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->response->setJSON((['status' => 'success', 'data' => $result]))->setStatusCode(200);
|
|
||||||
|
|
||||||
|
|
||||||
|
$policyIds = array_filter(array_column($details, 'policy_id'));
|
||||||
|
$clientPolicy = !empty($policyIds)
|
||||||
|
? $this->clientPolicyModel->whereIn('id', $policyIds)->where('is_active', 1)->get()->getResultArray()
|
||||||
|
: [];
|
||||||
|
|
||||||
|
$result['client_details'] = $details;
|
||||||
|
$result['policy_details'] = $clientPolicy ?? [];
|
||||||
|
} else {
|
||||||
|
throw new \RuntimeException('Client and Mobile Not found', 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->response->setJSON(['status' => 'success', 'data' => $result])->setStatusCode(200);
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (\Throwable $e) {
|
||||||
|
$code = ($e->getCode() && $e->getCode() >= 100 && $e->getCode() < 600) ? $e->getCode() : 500;
|
||||||
|
|
||||||
|
$isDbError = $e instanceof \CodeIgniter\Database\Exceptions\DatabaseException
|
||||||
|
|| $e instanceof \mysqli_sql_exception
|
||||||
|
|| $e instanceof \PDOException;
|
||||||
|
|
||||||
|
$context = ['title' => get_class($e),'type' => get_class($e),'code' => $code,'message' => $e->getMessage(),'file' => $e->getFile(),'line' => $e->getLine()];
|
||||||
|
|
||||||
|
$this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0);
|
||||||
|
|
||||||
|
return $this->response->setJSON([ 'status' => 'error', 'message' => $isDbError ? 'Data Access Error' : $e->getMessage(),
|
||||||
|
'ref' => $isDbError ? 'database' : 'application' . $code . ' / ' . $e->getLine()
|
||||||
|
])->setStatusCode($code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ticketConversationList(){
|
public function ticketConversationList()
|
||||||
|
{
|
||||||
$data = $this->request->getGet();
|
$data = $this->request->getGet();
|
||||||
|
|
||||||
$returnType = strtolower($this->request->getGet('return_type') ?? 'api');
|
$returnType = strtolower($this->request->getGet('return_type') ?? 'api');
|
||||||
@ -215,16 +286,32 @@ class ThzController extends BaseController
|
|||||||
$notes = $this->thzMasterNotesModel->ticketConversationList($thz_id, $returnType );
|
$notes = $this->thzMasterNotesModel->ticketConversationList($thz_id, $returnType );
|
||||||
$result['notes'] = !empty($notes) ? $notes : [];
|
$result['notes'] = !empty($notes) ? $notes : [];
|
||||||
}else{
|
}else{
|
||||||
return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(400);
|
// return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(400);
|
||||||
|
throw new \RuntimeException('No tickets found', 400);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(404);
|
// return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(404);
|
||||||
|
throw new \RuntimeException('No tickets found', 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($returnType === 'api') {
|
if ($returnType === 'api') {
|
||||||
return $this->response->setJSON((['status' => 'success', 'data' => $result]))->setStatusCode(200);
|
try {
|
||||||
|
return $this->response->setJSON((['status' => 'success', 'data' => $result]))->setStatusCode(200);
|
||||||
|
} catch (\Throwable $e) {
|
||||||
|
$code = ($e->getCode() && $e->getCode() >= 100 && $e->getCode() < 600) ? $e->getCode() : 500;
|
||||||
|
|
||||||
|
$isDbError = $e instanceof \CodeIgniter\Database\Exceptions\DatabaseException
|
||||||
|
|| $e instanceof \mysqli_sql_exception
|
||||||
|
|| $e instanceof \PDOException;
|
||||||
|
|
||||||
|
$context = ['title' => get_class($e),'type' => get_class($e),'code' => $code,'message' => $e->getMessage(),'file' => $e->getFile(),'line' => $e->getLine()];
|
||||||
|
|
||||||
|
$this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0);
|
||||||
|
|
||||||
|
return $this->response->setJSON([ 'status' => 'error', 'message' => $isDbError ? 'Data Access Error' : $e->getMessage(),
|
||||||
|
'ref' => $isDbError ? 'database' : 'application' . $code . ' / ' . $e->getLine()
|
||||||
|
])->setStatusCode($code);
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
$assign_to = $result['master'][0]['assign_to'];
|
$assign_to = $result['master'][0]['assign_to'];
|
||||||
@ -247,24 +334,24 @@ class ThzController extends BaseController
|
|||||||
$result['assignee'] = $this->userModel->where('is_active', 1)->whereIn('role', ['2', '3','4'])->findAll(); // enga 5-"head" and 1-"admin" assign pannvaga so dropdown la varakudhathu
|
$result['assignee'] = $this->userModel->where('is_active', 1)->whereIn('role', ['2', '3','4'])->findAll(); // enga 5-"head" and 1-"admin" assign pannvaga so dropdown la varakudhathu
|
||||||
// 2,3,4 remain person varannum.
|
// 2,3,4 remain person varannum.
|
||||||
$result['policy_terms'] = $toGetPolicyId ? $this->getPolicyTerms($toGetPolicyId) : '';
|
$result['policy_terms'] = $toGetPolicyId ? $this->getPolicyTerms($toGetPolicyId) : '';
|
||||||
|
|
||||||
|
$result['ticket_type'] = $this->thzTypeModel->where('is_active', 1)->findAll();
|
||||||
|
|
||||||
return $this->loadLayout('thz_notes', $result);
|
return $this->loadLayout('thz_notes', $result);
|
||||||
}
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ticketType()
|
public function ticketType()
|
||||||
{
|
{
|
||||||
$method = $this->request->getMethod(); // get, post
|
$method = $this->request->getMethod(); // get, post
|
||||||
|
try{
|
||||||
if ($method === 'get') {
|
if ($method === 'get') {
|
||||||
|
$types = $this->thzTypeModel->select('id,name,is_active')->where('is_active', 1)->findAll();
|
||||||
$types = $this->thzTypeModel->where('is_active', 1)->findAll();
|
|
||||||
if (empty($types)) {
|
if (empty($types)) {
|
||||||
return $this->response->setJSON(['status' => 'error','message' => 'No ticket types found'])->setStatusCode(404);
|
return $this->response->setJSON(['status' => 'error','message' => 'No ticket types found'])->setStatusCode(404);
|
||||||
}
|
}
|
||||||
return $this->response->setJSON(['status' => 'success','data' => $types])->setStatusCode(200);
|
return $this->response->setJSON(['status' => 'success','data' => $types])->setStatusCode(200);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($method === 'post') {
|
if ($method === 'post') {
|
||||||
@ -280,20 +367,37 @@ class ThzController extends BaseController
|
|||||||
$result = true;
|
$result = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$id = isset($insertID) && !empty($insertID) ? $insertID : $updateID ;
|
$id = isset($insertID) && !empty($insertID) ? $insertID : ($updateID ?? null);
|
||||||
|
|
||||||
return $this->response->setJSON([
|
return $this->response->setJSON([
|
||||||
'status' => $id ? 'success' : 'error',
|
'status' => $id ? 'success' : 'error',
|
||||||
'message' => $id ? "Ticket Type {$text}d successfully " : "Unable to {$text} ticket type. Please try again." ,
|
'message' => $id ? "Ticket Type {$text}d successfully" : "Unable to {$text} ticket type. Please try again.",
|
||||||
'id' => $id
|
'id' => $id
|
||||||
])->setStatusCode($id ? 200 : 400);
|
])->setStatusCode($id ? 200 : 400);
|
||||||
}
|
}
|
||||||
return $this->response->setJSON(['status' => 'error','message' => 'No ticket types found'])->setStatusCode(404);
|
return $this->response->setJSON([ 'status' => 'error', 'message' => 'Invalid request method' ])->setStatusCode(405);
|
||||||
|
}
|
||||||
|
catch (\Throwable $e) {
|
||||||
|
$code = ($e->getCode() && $e->getCode() >= 100 && $e->getCode() < 600) ? $e->getCode() : 500;
|
||||||
|
|
||||||
|
$isDbError = $e instanceof \CodeIgniter\Database\Exceptions\DatabaseException
|
||||||
|
|| $e instanceof \mysqli_sql_exception
|
||||||
|
|| $e instanceof \PDOException;
|
||||||
|
|
||||||
|
$context = ['title' => get_class($e),'type' => get_class($e),'code' => $code,'message' => $e->getMessage(),'file' => $e->getFile(),'line' => $e->getLine()];
|
||||||
|
|
||||||
|
$this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0);
|
||||||
|
|
||||||
|
return $this->response->setJSON([ 'status' => 'error', 'message' => $isDbError ? 'Data Access Error' : $e->getMessage(),
|
||||||
|
'ref' => $isDbError ? 'database' : 'application' . $code . ' / ' . $e->getLine()
|
||||||
|
])->setStatusCode($code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ticketHistoryList()
|
public function ticketHistoryList()
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
$data = $this->request->getGet();
|
$data = $this->request->getGet();
|
||||||
$thz_id = $data['thz_id'];
|
$thz_id = $data['thz_id'];
|
||||||
// $details = $this->thzHistoryModal->whereIn('thz_id', $thz_id)->where('is_active', 1)->get()->getResultArray();
|
// $details = $this->thzHistoryModal->whereIn('thz_id', $thz_id)->where('is_active', 1)->get()->getResultArray();
|
||||||
@ -306,11 +410,27 @@ class ThzController extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
if (empty($details)) {
|
if (empty($details)) {
|
||||||
return $this->response->setJSON([ 'status' => 'error','message' => 'No History found'])->setStatusCode(404);
|
// return $this->response->setJSON([ 'status' => 'error','message' => 'No History found'])->setStatusCode(404);
|
||||||
|
throw new \RuntimeException('No History found', 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return $this->response->setJSON(['status' => 'success','data' => $details])->setStatusCode(200);
|
return $this->response->setJSON(['status' => 'success','data' => $details])->setStatusCode(200);
|
||||||
|
} catch (\Throwable $e) {
|
||||||
|
$code = ($e->getCode() && $e->getCode() >= 100 && $e->getCode() < 600) ? $e->getCode() : 500;
|
||||||
|
|
||||||
|
$isDbError = $e instanceof \CodeIgniter\Database\Exceptions\DatabaseException
|
||||||
|
|| $e instanceof \mysqli_sql_exception
|
||||||
|
|| $e instanceof \PDOException;
|
||||||
|
|
||||||
|
$context = ['title' => get_class($e),'type' => get_class($e),'code' => $code,'message' => $e->getMessage(),'file' => $e->getFile(),'line' => $e->getLine()];
|
||||||
|
|
||||||
|
$this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0);
|
||||||
|
|
||||||
|
return $this->response->setJSON([ 'status' => 'error', 'message' => $isDbError ? 'Data Access Error' : $e->getMessage(),
|
||||||
|
'ref' => $isDbError ? 'database / ' : 'application / ' . $code . ' / ' . $e->getLine()
|
||||||
|
])->setStatusCode($code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -97,17 +97,7 @@
|
|||||||
<!-- <script src="<?= base_url('public/unlayer/js/embed.js') . '' ?>"></script> -->
|
<!-- <script src="<?= base_url('public/unlayer/js/embed.js') . '' ?>"></script> -->
|
||||||
<!-- srinivas -->
|
<!-- srinivas -->
|
||||||
<style>
|
<style>
|
||||||
body[data-sidebar-size=condensed]:not([data-layout=compact]):not(.auth-fluid-pages) {
|
|
||||||
min-height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
body[data-sidebar-size=condensed] .navbar-custom {
|
|
||||||
left: 155px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
body[data-sidebar-size=condensed] .logo-box {
|
|
||||||
width: 155px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-custom {
|
.navbar-custom {
|
||||||
top: -10px !important;
|
top: -10px !important;
|
||||||
@ -671,39 +661,39 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
|
|||||||
outline: 0;
|
outline: 0;
|
||||||
box-shadow: 0 0 0 0.15rem rgba(226, 103, 40, 0.5); }
|
box-shadow: 0 0 0 0.15rem rgba(226, 103, 40, 0.5); }
|
||||||
|
|
||||||
thead th {
|
table[data-custom-table-css="table"] thead th {
|
||||||
background-color: #00999E;
|
background-color: #00999E;
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
border-top: 0px solid #fff !important;
|
border-top: 0px solid #fff !important;
|
||||||
border-bottom: 0px solid #fff !important;
|
border-bottom: 0px solid #fff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
tbody td {
|
table[data-custom-table-css="table"] tbody td {
|
||||||
background: #F5FFFF;
|
background: #F5FFFF;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
border-top: 0px solid #fff !important;
|
border-top: 0px solid #fff !important;
|
||||||
border-bottom: 2px solid #C3EDEE !important;
|
border-bottom: 2px solid #C3EDEE !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
thead th:first-child {
|
table[data-custom-table-css="table"] thead th:first-child {
|
||||||
border-top-left-radius: 15px !important;
|
border-top-left-radius: 15px !important;
|
||||||
border-bottom-left-radius: 15px !important;
|
border-bottom-left-radius: 15px !important;
|
||||||
}
|
}
|
||||||
thead th:last-child {
|
table[data-custom-table-css="table"] thead th:last-child {
|
||||||
border-top-right-radius: 15px !important;
|
border-top-right-radius: 15px !important;
|
||||||
border-bottom-right-radius: 15px !important;
|
border-bottom-right-radius: 15px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
tbody tr td:first-child {
|
table[data-custom-table-css="table"] tbody tr td:first-child {
|
||||||
border-top-left-radius: 15px !important;
|
border-top-left-radius: 15px !important;
|
||||||
border-bottom-left-radius: 15px !important;
|
border-bottom-left-radius: 15px !important;
|
||||||
}
|
}
|
||||||
tbody tr td:last-child {
|
table[data-custom-table-css="table"] tbody tr td:last-child {
|
||||||
border-top-right-radius: 15px !important;
|
border-top-right-radius: 15px !important;
|
||||||
border-bottom-right-radius: 15px !important;
|
border-bottom-right-radius: 15px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
tbody tr:hover td {
|
table[data-custom-table-css="table"] tbody tr:hover td {
|
||||||
background-color: #e0e0e0;
|
background-color: #e0e0e0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,8 +7,17 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* .table thead th {
|
||||||
|
vertical-align: bottom;
|
||||||
|
border-bottom: 2px solid #fff;
|
||||||
|
} */
|
||||||
|
|
||||||
|
|
||||||
|
/* Add shadow + spacing row "card" effect */
|
||||||
|
tbody tr {
|
||||||
|
/* box-shadow: 0 2px 5px rgba(0,0,0,0.08); */
|
||||||
|
}
|
||||||
|
|
||||||
/* Search input with icon */
|
/* Search input with icon */
|
||||||
.dataTables_filter {
|
.dataTables_filter {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -196,7 +205,7 @@ table thead th {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap text-custom-black text-custom app-font-family app-datatable">
|
<table id="scroll-horizontal-datatable" class="table w-100 nowrap text-custom-black text-custom app-font-family app-datatable">
|
||||||
<thead class="app-table-head">
|
<thead class="app-table-head">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Ticket ID</th>
|
<th>Ticket ID</th>
|
||||||
@ -341,17 +350,17 @@ table thead th {
|
|||||||
<label for="ticket_type">Ticket Type<span class="text-danger">*</span></label>
|
<label for="ticket_type">Ticket Type<span class="text-danger">*</span></label>
|
||||||
<select class="form-control" id="ticket_type" name="ticket_type" required onchange="hideandshowpolicy()">
|
<select class="form-control" id="ticket_type" name="ticket_type" required onchange="hideandshowpolicy()">
|
||||||
<option value="">Select Ticket Type</option>
|
<option value="">Select Ticket Type</option>
|
||||||
<option value="Sales" selected >Sales</option>
|
<!-- <option value="Sales" selected >Sales</option> -->
|
||||||
<option value="Service">Service</option>
|
<!-- <option value="Service">Service</option> -->
|
||||||
<!-- <option value="0">+ Add New</option>
|
<!-- <option value="0">+ Add New</option> -->
|
||||||
<?php if (!empty($ticket_type)): ?>
|
<?php if (!empty($ticket_type)): ?>
|
||||||
<?php foreach ($ticket_type as $t): ?>
|
<?php foreach ($ticket_type as $t): ?>
|
||||||
<option value="<?= esc($t['name']) ?>"
|
<option value="<?= esc($t['name']) ?>"
|
||||||
<?= ($t['name'] === "Sales") ? 'selected' : '' ?>>
|
<?= (strtolower($t['name']) === "sales") ? 'selected' : '' ?>>
|
||||||
<?= esc($t['name']) ?>
|
<?= esc($t['name']) ?>
|
||||||
</option>
|
</option>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php endif; ?> -->
|
<?php endif; ?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -725,15 +734,14 @@ $(document).ready(function() {
|
|||||||
hideandshowpolicy();
|
hideandshowpolicy();
|
||||||
|
|
||||||
var ticketsTable = $('#scroll-horizontal-datatable');
|
var ticketsTable = $('#scroll-horizontal-datatable');
|
||||||
$('#scroll-horizontal-datatable_filter').prepend('<i class="mdi mdi-magnify"></i>');
|
|
||||||
|
|
||||||
if (ticketsTable.length) {
|
if (ticketsTable.length) {
|
||||||
|
|
||||||
ticketsTable.DataTable({
|
ticketsTable.DataTable({
|
||||||
scrollX: true,
|
scrollX: true,
|
||||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
dom: "<'row'<'col-sm-2'f><'col-sm-10 text-right'B>>" +
|
||||||
"<'row'<'col-sm-12'tr>>" +
|
"<'row'<'col-sm-12'tr>>" +
|
||||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text: '<i class="mdi mdi-plus" ></i><span class="app-font-family btn-custom"> Create New Ticket </span>',
|
text: '<i class="mdi mdi-plus" ></i><span class="app-font-family btn-custom"> Create New Ticket </span>',
|
||||||
@ -775,7 +783,6 @@ $(document).ready(function() {
|
|||||||
},
|
},
|
||||||
paging: true,
|
paging: true,
|
||||||
pageLength: 25,
|
pageLength: 25,
|
||||||
ordering: false,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -347,8 +347,15 @@ hr{
|
|||||||
<label for="ticket_type" class="sub-title-text app-font-family">Ticket Type<span class="text-danger">*</span></label>
|
<label for="ticket_type" class="sub-title-text app-font-family">Ticket Type<span class="text-danger">*</span></label>
|
||||||
<select class="form-control" id="ticket_type" name="ticket_type" required>
|
<select class="form-control" id="ticket_type" name="ticket_type" required>
|
||||||
<option value="">Select Ticket Type</option>
|
<option value="">Select Ticket Type</option>
|
||||||
<option value="Sales">Sales</option>
|
<!-- <option value="Sales">Sales</option>
|
||||||
<option value="Service">Service</option>
|
<option value="Service">Service</option> -->
|
||||||
|
<?php if (!empty($ticket_type)): ?>
|
||||||
|
<?php foreach ($ticket_type as $t): ?>
|
||||||
|
<option value="<?= esc($t['name']) ?>" >
|
||||||
|
<?= esc($t['name']) ?>
|
||||||
|
</option>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php endif; ?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,9 @@
|
|||||||
<style>
|
<style>
|
||||||
/* Custom CSS */
|
|
||||||
body {
|
|
||||||
background-color: #f4f4f4;
|
|
||||||
color: #333;
|
|
||||||
/* padding: 20px; */
|
|
||||||
font-size: small;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-container {
|
.table-container {
|
||||||
overflow-x: auto;
|
overflow-x: auto !important;
|
||||||
/* margin-top: 20px; */
|
/* margin-top: 20px; */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -19,9 +14,9 @@
|
|||||||
|
|
||||||
.table th,
|
.table th,
|
||||||
.table td {
|
.table td {
|
||||||
vertical-align: middle;
|
vertical-align: middle!important;
|
||||||
text-align: center;
|
text-align: center!important;
|
||||||
text-wrap: pretty;
|
text-wrap: pretty!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table th,
|
.table th,
|
||||||
@ -37,18 +32,18 @@
|
|||||||
|
|
||||||
#rfqTable th:nth-child(-n+3),
|
#rfqTable th:nth-child(-n+3),
|
||||||
#rfqTable td:nth-child(-n+3) {
|
#rfqTable td:nth-child(-n+3) {
|
||||||
border: none;
|
border: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#rfqTable th:nth-child(-n+3),
|
#rfqTable th:nth-child(-n+3),
|
||||||
#rfqTable td:nth-child(-n+3) {
|
#rfqTable td:nth-child(-n+3) {
|
||||||
border: 2px solid #007bff;
|
border: 2px solid #007bff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#rfqTable th:nth-child(n+4),
|
#rfqTable th:nth-child(n+4),
|
||||||
#rfqTable td:nth-child(n+4) {
|
#rfqTable td:nth-child(n+4) {
|
||||||
border: 2px solid #007bff;
|
border: 2px solid #007bff !important;
|
||||||
outline: none;
|
outline: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#rfqTable thead th {
|
#rfqTable thead th {
|
||||||
@ -58,7 +53,7 @@
|
|||||||
/* Apply border to all columns */
|
/* Apply border to all columns */
|
||||||
#rfqTable_for_calc th,
|
#rfqTable_for_calc th,
|
||||||
#rfqTable_for_calc td {
|
#rfqTable_for_calc td {
|
||||||
border: 2px solid #007bff;
|
border: 2px solid #007bff !important;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,18 +62,18 @@
|
|||||||
#rfqTable_for_calc td:nth-child(-n+2),
|
#rfqTable_for_calc td:nth-child(-n+2),
|
||||||
#rfqTable_for_calc th:last-child,
|
#rfqTable_for_calc th:last-child,
|
||||||
#rfqTable_for_calc td:last-child {
|
#rfqTable_for_calc td:last-child {
|
||||||
border: none;
|
border: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table th,
|
.table th,
|
||||||
.table td {
|
.table td {
|
||||||
min-width: 150px;
|
min-width: 150px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table th.sno,
|
.table th.sno,
|
||||||
.table td.sno {
|
.table td.sno {
|
||||||
width: 10px;
|
width: 10px;
|
||||||
background-color: #bfe0e2;
|
background-color: #bfe0e2 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table th.action,
|
.table th.action,
|
||||||
@ -88,11 +83,11 @@
|
|||||||
|
|
||||||
.table th.sticky,
|
.table th.sticky,
|
||||||
.table td.sticky {
|
.table td.sticky {
|
||||||
position: sticky;
|
position: sticky !important;
|
||||||
left: 0;
|
left: 0 !important;
|
||||||
background-color: #bfe0e2;
|
background-color: #bfe0e2 !important;
|
||||||
z-index: 2;
|
z-index: 2 !important;
|
||||||
width: 10px;
|
width: 10px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.suggestion-box {
|
.suggestion-box {
|
||||||
@ -239,8 +234,58 @@
|
|||||||
|
|
||||||
.no-border {
|
.no-border {
|
||||||
border: none !important;
|
border: none !important;
|
||||||
|
color:black !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.display_name{
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
|
||||||
|
#rfqTable{
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#rfqTable th , #rfqTable td{
|
||||||
|
border-radius: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#rfqTable thead th{
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#rfqTable_for_calc,
|
||||||
|
#rfqTable_for_calc th,
|
||||||
|
#rfqTable_for_calc td {
|
||||||
|
border: 2px solid blue;
|
||||||
|
border-collapse: collapse; /* ensures borders don't double */
|
||||||
|
}
|
||||||
|
|
||||||
|
#rfqTable_for_calc {
|
||||||
|
background-color: white;
|
||||||
|
color:black;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#rfqTable_for_calc th , #rfqTable_for_calc td{
|
||||||
|
border-radius: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#rfqTable_for_calc thead th{
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#rfqTable_for_calc .sticky{
|
||||||
|
background-color: white !important;
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#rfqTable_for_calc .disableborder{
|
||||||
|
background-color: white !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.save-indicator {
|
.save-indicator {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
@ -301,24 +346,24 @@
|
|||||||
|
|
||||||
<div class="save-indicator" id="saveIndicator">Saved</div>
|
<div class="save-indicator" id="saveIndicator">Saved</div>
|
||||||
<div class="table-container" id="first_table">
|
<div class="table-container" id="first_table">
|
||||||
<table data-custom-table-css="table" id="rfqTable" class="table table-bordered mt-3">
|
<table id="rfqTable" class="table table-bordered mt-3">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="sticky no-border" style="border-right: 2px solid rgb(0, 123, 255) !important; border-left: 2px solid rgb(0, 123, 255) !important; border-top: 2px solid rgb(0, 123, 255) !important; min-width: 72px !important;"><span class="key_name" style="display: none;">Sno</span><span class="display_name">S.No.</span></th>
|
<th class="sticky no-border" style="border-right: 2px solid rgb(0, 123, 255) !important; border-left: 2px solid rgb(0, 123, 255) !important; border-top: 2px solid rgb(0, 123, 255) !important; min-width: 72px !important;"><span class="key_name" style="display: none;">Sno</span><span class="display_name">S.No.</span></th>
|
||||||
<th class="hidden no-border" style="border-right: 2px solid rgb(0, 123, 255) !important;">Item Key</th>
|
<th class="hidden no-border" style="border-right: 2px solid rgb(0, 123, 255) !important;">Item Key</th>
|
||||||
<th class="sticky no-border" style="border-top: 2px solid rgb(0, 123, 255) !important; border-right: 2px solid rgb(0, 123, 255) !important;">Particulars</th>
|
<th class="sticky no-border" style="border-top: 2px solid rgb(0, 123, 255) !important; border-right: 2px solid rgb(0, 123, 255) !important;">Particulars</th>
|
||||||
<th contenteditable="false" id="first_proposel_title" ><span class="key_name" style="display: none;">Proposal 1</span><span class="display_name">Proposal Coverage 1</span>
|
<th class="sticky no-border" style="background-color: white !important;" contenteditable="false" id="first_proposel_title" ><span class="key_name" style="display: none;">Proposal 1</span><span class="display_name">Proposal Coverage 1</span>
|
||||||
<span class="dropdown" onclick="showThreeDottedMenu(event)">
|
<span class="dropdown" onclick="showThreeDottedMenu(event)">
|
||||||
<button class="dropbtn">⋮</button>
|
<button class="dropbtn">⋮</button>
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<a href="#" class="addInsurer">Add Insurer</a>
|
<a href="#" class="addInsurer">Add Insurer</a>
|
||||||
<a href="#" class="qcrProposal"
|
<a href="#" class="qcrProposal"
|
||||||
style="background-color: rgb(221, 221, 221);">QCR <i
|
style="background-color: rgb(221, 221, 221);">QCR <i
|
||||||
class="fa fa-check-square"
|
class="mdi mdi-checkbox-marked"
|
||||||
style="color: green; margin-left: 8px;"></i></a>
|
style="color: green; margin-left: 8px;"></i></a>
|
||||||
<a href="#" class="sendClientProposal"
|
<a href="#" class="sendClientProposal"
|
||||||
style="background-color: rgb(221, 221, 221);">Send to Client <i
|
style="background-color: rgb(221, 221, 221);">Send to Client <i
|
||||||
class="fa fa-check-square"
|
class="mdi mdi-checkbox-marked"
|
||||||
style="color: green; margin-left: 8px;"></i></a>
|
style="color: green; margin-left: 8px;"></i></a>
|
||||||
<a href="#" class="removeProposal">Remove</a>
|
<a href="#" class="removeProposal">Remove</a>
|
||||||
</div>
|
</div>
|
||||||
@ -355,7 +400,7 @@
|
|||||||
<!-- <button id="getjson" class="btn btn-primary" onclick="generateJSONFromTable()">getjson</button> -->
|
<!-- <button id="getjson" class="btn btn-primary" onclick="generateJSONFromTable()">getjson</button> -->
|
||||||
|
|
||||||
<div class="table-container" id="second_table" style="display: none;">
|
<div class="table-container" id="second_table" style="display: none;">
|
||||||
<table data-custom-table-css="table" id="rfqTable_for_calc" class="table table-bordered mt-3">
|
<table id="rfqTable_for_calc" class="table table-bordered mt-3">
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -370,7 +415,7 @@
|
|||||||
<!-- Suggestion Box -->
|
<!-- Suggestion Box -->
|
||||||
<div id="suggestionBox" class="suggestion-box">
|
<div id="suggestionBox" class="suggestion-box">
|
||||||
<div class="text-right" style="padding-right: 10px;">
|
<div class="text-right" style="padding-right: 10px;">
|
||||||
<i class="fa fa-times remove-icon" aria-hidden="true" style="color: black;text-align: right;"
|
<i class="mdi mdi-close remove-icon" aria-hidden="true" style="color: black;text-align: right;"
|
||||||
onclick="hideSuggestionBox()"></i>
|
onclick="hideSuggestionBox()"></i>
|
||||||
</div>
|
</div>
|
||||||
<ul id="suggestionList"></ul>
|
<ul id="suggestionList"></ul>
|
||||||
@ -381,8 +426,13 @@
|
|||||||
|
|
||||||
<!-- familiy floater dialog -->
|
<!-- familiy floater dialog -->
|
||||||
<div class="dialog" id="familyFloaterDialog">
|
<div class="dialog" id="familyFloaterDialog">
|
||||||
<div class="dialog-header">Family Members <i class="fa fa-times remove-icon" id="closeDialogBtn" aria-hidden="true"
|
<div class="dialog-header ">
|
||||||
style="color: black;text-align: right;margin-left: 99px;"></i></div>
|
<span style="color:black;" >Family Members </span>
|
||||||
|
<span>
|
||||||
|
<i class="mdi mdi-close remove-icon" id="closeDialogBtn" aria-hidden="true"
|
||||||
|
style="color: black;text-align: right;margin-left: 80px;margin-top:10px;"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<div class="dialog-content">
|
<div class="dialog-content">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" id="family_self" checked>
|
<input type="checkbox" id="family_self" checked>
|
||||||
@ -1313,10 +1363,10 @@ function addSuggestionsToTable() {
|
|||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<a href="#" class="addInsurer">Add Insurer</a>
|
<a href="#" class="addInsurer">Add Insurer</a>
|
||||||
<a href="#" class="qcrProposal" style="background-color: rgb(221, 221, 221);">
|
<a href="#" class="qcrProposal" style="background-color: rgb(221, 221, 221);">
|
||||||
QCR <i class="fa fa-check-square" style="color: green; margin-left: 8px;"></i>
|
QCR <i class="mdi mdi-checkbox-marked" style="color: green; margin-left: 8px;"></i>
|
||||||
</a>
|
</a>
|
||||||
<a href="#" class="sendClientProposal" style="background-color: rgb(221, 221, 221);">
|
<a href="#" class="sendClientProposal" style="background-color: rgb(221, 221, 221);">
|
||||||
Send to Client <i class="fa fa-check-square" style="color: green; margin-left: 8px;"></i>
|
Send to Client <i class="mdi mdi-checkbox-marked" style="color: green; margin-left: 8px;"></i>
|
||||||
</a>
|
</a>
|
||||||
<a href="#" class="removeProposal">Remove</a>
|
<a href="#" class="removeProposal">Remove</a>
|
||||||
</div>
|
</div>
|
||||||
@ -1606,8 +1656,8 @@ addQuoteButton.addEventListener('click', function() {
|
|||||||
<button class="dropbtn">⋮</button>
|
<button class="dropbtn">⋮</button>
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<!-- <a href="#" class="addInsurer">Add Insurer</a> -->
|
<!-- <a href="#" class="addInsurer">Add Insurer</a> -->
|
||||||
<a href="#" class="qcrProposal" style="background-color: rgb(221, 221, 221);">QCR <i class="fa fa-check-square" style="color: green; margin-left: 8px;"></i></a>
|
<a href="#" class="qcrProposal" style="background-color: rgb(221, 221, 221);">QCR <i class="mdi mdi-checkbox-marked" style="color: green; margin-left: 8px;"></i></a>
|
||||||
<a href="#" class="sendClientProposal" style="background-color: rgb(221, 221, 221);">Send to Client <i class="fa fa-check-square" style="color: green; margin-left: 8px;"></i></a>
|
<a href="#" class="sendClientProposal" style="background-color: rgb(221, 221, 221);">Send to Client <i class="mdi mdi-checkbox-marked" style="color: green; margin-left: 8px;"></i></a>
|
||||||
<a href="#" class="removeProposal">Remove</a>
|
<a href="#" class="removeProposal">Remove</a>
|
||||||
</div>
|
</div>
|
||||||
</span>`;
|
</span>`;
|
||||||
@ -2155,8 +2205,8 @@ function addInsurerData(event, insurerName, dataId, nextIndex = null) {
|
|||||||
<button class="dropbtn">⋮</button>
|
<button class="dropbtn">⋮</button>
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<a href="#" class="changeInsurer">Change Insurer</a>
|
<a href="#" class="changeInsurer">Change Insurer</a>
|
||||||
<a href="#" class="qcrInsurer" style="background-color: rgb(221, 221, 221);">QCR <i class="fa fa-check-square" style="color: green; margin-left: 8px;"></i></a>
|
<a href="#" class="qcrInsurer" style="background-color: rgb(221, 221, 221);">QCR <i class="mdi mdi-checkbox-marked" style="color: green; margin-left: 8px;"></i></a>
|
||||||
<a href="#" class="sendClientInsurer" style="background-color: rgb(221, 221, 221);">Send to Client <i class="fa fa-check-square" style="color: green; margin-left: 8px;"></i></a>
|
<a href="#" class="sendClientInsurer" style="background-color: rgb(221, 221, 221);">Send to Client <i class="mdi mdi-checkbox-marked" style="color: green; margin-left: 8px;"></i></a>
|
||||||
<a href="#" class="removeInsurer">Remove</a>
|
<a href="#" class="removeInsurer">Remove</a>
|
||||||
<!-- <a href="#" class="copyInsurerLast">Copy</a> -->
|
<!-- <a href="#" class="copyInsurerLast">Copy</a> -->
|
||||||
</div>
|
</div>
|
||||||
@ -2376,8 +2426,8 @@ function copyInsurerData(event, insurerName, dataId){
|
|||||||
<button class="dropbtn">⋮</button>
|
<button class="dropbtn">⋮</button>
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<a href="#" class="changeInsurer">Change Insurer</a>
|
<a href="#" class="changeInsurer">Change Insurer</a>
|
||||||
<a href="#" class="qcrInsurer" style="background-color: rgb(221, 221, 221);">QCR <i class="fa fa-check-square" style="color: green; margin-left: 8px;"></i></a>
|
<a href="#" class="qcrInsurer" style="background-color: rgb(221, 221, 221);">QCR <i class="mdi mdi-checkbox-marked" style="color: green; margin-left: 8px;"></i></a>
|
||||||
<a href="#" class="sendClientInsurer" style="background-color: rgb(221, 221, 221);">Send to Client <i class="fa fa-check-square" style="color: green; margin-left: 8px;"></i></a>
|
<a href="#" class="sendClientInsurer" style="background-color: rgb(221, 221, 221);">Send to Client <i class="mdi mdi-checkbox-marked" style="color: green; margin-left: 8px;"></i></a>
|
||||||
<a href="#" class="removeInsurer">Remove</a>
|
<a href="#" class="removeInsurer">Remove</a>
|
||||||
<!-- <a href="#" class="copyInsurerNext">Copy to next</a> -->
|
<!-- <a href="#" class="copyInsurerNext">Copy to next</a> -->
|
||||||
<!-- <a href="#" class="copyInsurerLast">Copy</a> -->
|
<!-- <a href="#" class="copyInsurerLast">Copy</a> -->
|
||||||
@ -2902,9 +2952,9 @@ function changeState(event) {
|
|||||||
let type = event.target.className;
|
let type = event.target.className;
|
||||||
console.log('1 : ', type);
|
console.log('1 : ', type);
|
||||||
|
|
||||||
// if (type.includes('sendClientProposal') && type.includes('fa fa-check-square')) {
|
// if (type.includes('sendClientProposal') && type.includes('mdi mdi-checkbox-marked')) {
|
||||||
// type = 'sendClientProposal';
|
// type = 'sendClientProposal';
|
||||||
// } else if (type.includes('qcrProposal') && type.includes('fa fa-check-square')) {
|
// } else if (type.includes('qcrProposal') && type.includes('mdi mdi-checkbox-marked')) {
|
||||||
// type = 'qcrProposal';
|
// type = 'qcrProposal';
|
||||||
// }
|
// }
|
||||||
// console.log('2 : ',type);
|
// console.log('2 : ',type);
|
||||||
@ -2963,7 +3013,7 @@ function changeState(event) {
|
|||||||
|
|
||||||
if (!icon) {
|
if (!icon) {
|
||||||
icon = $('<i></i>')
|
icon = $('<i></i>')
|
||||||
.addClass('fa fa-check-square')
|
.addClass('mdi mdi-checkbox-marked')
|
||||||
.css('color', 'green')
|
.css('color', 'green')
|
||||||
.css('margin-left', '8px');
|
.css('margin-left', '8px');
|
||||||
sendClientProposal.append(icon);
|
sendClientProposal.append(icon);
|
||||||
@ -4628,9 +4678,9 @@ function jsonToTable(json) {
|
|||||||
'style="background-color: rgb(221, 221, 221);"' : '';
|
'style="background-color: rgb(221, 221, 221);"' : '';
|
||||||
|
|
||||||
const check_icon_qcr = proposels[header.parentHeader]?.qcr == 1 ?
|
const check_icon_qcr = proposels[header.parentHeader]?.qcr == 1 ?
|
||||||
`<i class="fa fa-check-square" style="color: green; margin-left: 8px;"></i>` : '';
|
`<i class="mdi mdi-checkbox-marked" style="color: green; margin-left: 8px;"></i>` : '';
|
||||||
const check_icon_stc = proposels[header.parentHeader]?.stc == 1 ?
|
const check_icon_stc = proposels[header.parentHeader]?.stc == 1 ?
|
||||||
`<i class="fa fa-check-square" style="color: green; margin-left: 8px;"></i>` : '';
|
`<i class="mdi mdi-checkbox-marked" style="color: green; margin-left: 8px;"></i>` : '';
|
||||||
|
|
||||||
|
|
||||||
let renewal_or_rollover = header.parentHeader;
|
let renewal_or_rollover = header.parentHeader;
|
||||||
@ -4768,10 +4818,10 @@ function jsonToTable(json) {
|
|||||||
'style="background-color: rgb(221, 221, 221);"' : '';
|
'style="background-color: rgb(221, 221, 221);"' : '';
|
||||||
|
|
||||||
checkDropdownDataQCRForInsurer = insurerData.qcr == 1 ?
|
checkDropdownDataQCRForInsurer = insurerData.qcr == 1 ?
|
||||||
`<i class="fa fa-check-square" style="color: green; margin-left: 8px;"></i>` :
|
`<i class="mdi mdi-checkbox-marked" style="color: green; margin-left: 8px;"></i>` :
|
||||||
'';
|
'';
|
||||||
checkDropdownDataSTCForInsurer = insurerData.stc == 1 ?
|
checkDropdownDataSTCForInsurer = insurerData.stc == 1 ?
|
||||||
`<i class="fa fa-check-square" style="color: green; margin-left: 8px;"></i>` :
|
`<i class="mdi mdi-checkbox-marked" style="color: green; margin-left: 8px;"></i>` :
|
||||||
'';
|
'';
|
||||||
|
|
||||||
// console.log('Proposal data for insurer (insurerData):', insurerData);
|
// console.log('Proposal data for insurer (insurerData):', insurerData);
|
||||||
|
|||||||
@ -1144,11 +1144,11 @@
|
|||||||
<span class="three-dot-menu" onclick="showDropdown(event)">⋮</span>
|
<span class="three-dot-menu" onclick="showDropdown(event)">⋮</span>
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<button id="isQCR" onclick="addOrRemoveIcon(this,event)" class="qcrProposal" style="background-color: rgb(221, 221, 221);">QCR <i
|
<button id="isQCR" onclick="addOrRemoveIcon(this,event)" class="qcrProposal" style="background-color: rgb(221, 221, 221);">QCR <i
|
||||||
class="fa fa-check-square"
|
class="mdi mdi-checkbox-marked"
|
||||||
style="color: green; margin-left: 8px;"></i></button>
|
style="color: green; margin-left: 8px;"></i></button>
|
||||||
<button id="isSTC" class="sendClientProposal" onclick="addOrRemoveIcon(this,event)"
|
<button id="isSTC" class="sendClientProposal" onclick="addOrRemoveIcon(this,event)"
|
||||||
style="background-color: rgb(221, 221, 221);">Send to Client <i
|
style="background-color: rgb(221, 221, 221);">Send to Client <i
|
||||||
class="fa fa-check-square"
|
class="mdi mdi-checkbox-marked"
|
||||||
style="color: green; margin-left: 8px;"></i></button>
|
style="color: green; margin-left: 8px;"></i></button>
|
||||||
<button class = "removeProposal" onclick="removeProposal(${proposalCount})">Remove Proposal</button>
|
<button class = "removeProposal" onclick="removeProposal(${proposalCount})">Remove Proposal</button>
|
||||||
<button class="newInsurer" onclick="addNewQuote(${proposalCount})">Add New Insurer</button>
|
<button class="newInsurer" onclick="addNewQuote(${proposalCount})">Add New Insurer</button>
|
||||||
@ -1519,7 +1519,7 @@
|
|||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<button id="isInsurerSTC" class="sendInsurerClientProposal" onclick="addOrRemoveIconInsurer(this,event)"
|
<button id="isInsurerSTC" class="sendInsurerClientProposal" onclick="addOrRemoveIconInsurer(this,event)"
|
||||||
style="background-color: rgb(221, 221, 221;">
|
style="background-color: rgb(221, 221, 221;">
|
||||||
Send to Client <i class="fa fa-check-square" style="color: green; margin-left: 8px;"></i>
|
Send to Client <i class="mdi mdi-checkbox-marked" style="color: green; margin-left: 8px;"></i>
|
||||||
</button>
|
</button>
|
||||||
<button onclick="changeInsurer(event, ${proposalNumber}, '${newQuote}')">Change Insurer</button>
|
<button onclick="changeInsurer(event, ${proposalNumber}, '${newQuote}')">Change Insurer</button>
|
||||||
<button onclick="removeQuote(event, ${proposalNumber}, '${newQuote}')">Remove Quote</button>
|
<button onclick="removeQuote(event, ${proposalNumber}, '${newQuote}')">Remove Quote</button>
|
||||||
@ -1708,8 +1708,8 @@
|
|||||||
Proposal ${proposal}
|
Proposal ${proposal}
|
||||||
<span class="three-dot-menu" onclick="showDropdown(event)">⋮</span>
|
<span class="three-dot-menu" onclick="showDropdown(event)">⋮</span>
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<button id="isQCR" onclick="addOrRemoveIcon(this,event)" class="qcrProposal" style="background-color: rgb(221, 221, 221);">QCR <i class="fa fa-check-square" style="color: green; margin-left: 8px;"></i></button>
|
<button id="isQCR" onclick="addOrRemoveIcon(this,event)" class="qcrProposal" style="background-color: rgb(221, 221, 221);">QCR <i class="mdi mdi-checkbox-marked" style="color: green; margin-left: 8px;"></i></button>
|
||||||
<button id="isSTC" class="sendClientProposal" onclick="addOrRemoveIcon(this,event)" style="background-color: rgb(221, 221, 221);">Send to Client <i class="fa fa-check-square" style="color: green; margin-left: 8px;"></i></button>
|
<button id="isSTC" class="sendClientProposal" onclick="addOrRemoveIcon(this,event)" style="background-color: rgb(221, 221, 221);">Send to Client <i class="mdi mdi-checkbox-marked" style="color: green; margin-left: 8px;"></i></button>
|
||||||
<button class = "removeProposal" onclick="removeProposal(${proposal})">Remove Proposal</button>
|
<button class = "removeProposal" onclick="removeProposal(${proposal})">Remove Proposal</button>
|
||||||
<button class="newInsurer" onclick="addNewQuote(${proposal})">Add New Insurer</button>
|
<button class="newInsurer" onclick="addNewQuote(${proposal})">Add New Insurer</button>
|
||||||
</div>
|
</div>
|
||||||
@ -3455,11 +3455,11 @@
|
|||||||
<span class="three-dot-menu" >⋮</span>
|
<span class="three-dot-menu" >⋮</span>
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<button id = "isQCR" onclick = "addOrRemoveIcon(this,event)" class="qcrProposal" style="background-color: rgb(221, 221, 221);">QCR ${headerCheckBoxProperties['qcr'] == 1 ? `<i
|
<button id = "isQCR" onclick = "addOrRemoveIcon(this,event)" class="qcrProposal" style="background-color: rgb(221, 221, 221);">QCR ${headerCheckBoxProperties['qcr'] == 1 ? `<i
|
||||||
class="fa fa-check-square"
|
class="mdi mdi-checkbox-marked"
|
||||||
style="color: green; margin-left: 8px; "></i> `:"" }</button>
|
style="color: green; margin-left: 8px; "></i> `:"" }</button>
|
||||||
<button id = "isSTC" class="sendClientProposal" onclick = "addOrRemoveIcon(this,event)"
|
<button id = "isSTC" class="sendClientProposal" onclick = "addOrRemoveIcon(this,event)"
|
||||||
style="background-color: rgb(221, 221, 221);">Send to Client ${headerCheckBoxProperties['stc'] == 1 ? `<i
|
style="background-color: rgb(221, 221, 221);">Send to Client ${headerCheckBoxProperties['stc'] == 1 ? `<i
|
||||||
class="fa fa-check-square"
|
class="mdi mdi-checkbox-marked"
|
||||||
style="color: green; margin-left: 8px; "></i> `:"" }</button>
|
style="color: green; margin-left: 8px; "></i> `:"" }</button>
|
||||||
<button class = "removeProposal" onclick="removeProposal(${proposalHTMLNumber})">Remove Proposal</button>
|
<button class = "removeProposal" onclick="removeProposal(${proposalHTMLNumber})">Remove Proposal</button>
|
||||||
<button class = "newInsurer" onclick="addNewQuote(${proposalHTMLNumber})">Add New Insurer</button>
|
<button class = "newInsurer" onclick="addNewQuote(${proposalHTMLNumber})">Add New Insurer</button>
|
||||||
@ -3498,7 +3498,7 @@
|
|||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<button id = "isInsurerSTC" class="sendInsurerClientProposal" onclick = "addOrRemoveIconInsurer(this,event)"
|
<button id = "isInsurerSTC" class="sendInsurerClientProposal" onclick = "addOrRemoveIconInsurer(this,event)"
|
||||||
style="background-color: rgb(221, 221, 221);">Send to Client ${matchedInsurer.stc == 1 ? `<i
|
style="background-color: rgb(221, 221, 221);">Send to Client ${matchedInsurer.stc == 1 ? `<i
|
||||||
class="fa fa-check-square"
|
class="mdi mdi-checkbox-marked"
|
||||||
style="color: green; margin-left: 8px; "></i>`: ""} </button>
|
style="color: green; margin-left: 8px; "></i>`: ""} </button>
|
||||||
<button onclick="changeInsurer(event, ${proposalHTMLNumber}, '${subHeader}')">Change Insurer</button>
|
<button onclick="changeInsurer(event, ${proposalHTMLNumber}, '${subHeader}')">Change Insurer</button>
|
||||||
<button onclick="removeQuote(event, ${proposalHTMLNumber}, '${subHeader}')">Remove Quote</button>
|
<button onclick="removeQuote(event, ${proposalHTMLNumber}, '${subHeader}')">Remove Quote</button>
|
||||||
@ -3603,7 +3603,7 @@
|
|||||||
|
|
||||||
function createCheckIcon() {
|
function createCheckIcon() {
|
||||||
const icon = document.createElement('i');
|
const icon = document.createElement('i');
|
||||||
icon.className = 'fa fa-check-square';
|
icon.className = 'mdi mdi-checkbox-marked';
|
||||||
icon.style.color = 'green';
|
icon.style.color = 'green';
|
||||||
icon.style.marginLeft = '8px';
|
icon.style.marginLeft = '8px';
|
||||||
return icon;
|
return icon;
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
$(window).on("load",function(){$("#demo-foo-row-toggler").footable(),$("#demo-foo-accordion").footable().on("footable_row_expanded",function(o){$("#demo-foo-accordion tbody tr.footable-detail-show").not(o.row).each(function(){$("#demo-foo-accordion").data("footable").toggleDetail(this)})}),$("#demo-foo-pagination").footable(),$("#demo-show-entries").change(function(o){o.preventDefault();var t=$(this).val();$("#demo-foo-pagination").data("page-size",t),$("#demo-foo-pagination").trigger("footable_initialized")});var t=$("#demo-foo-filtering");t.footable().on("footable_filtering",function(o){var t=$("#demo-foo-filter-status").find(":selected").val();o.filter+=o.filter&&0<o.filter.length?" "+t:t,o.clear=!o.filter}),$("#demo-foo-filter-status").change(function(o){o.preventDefault(),t.trigger("footable_filter",{filter:$(this).val()})}),$("#demo-foo-search").on("input",function(o){o.preventDefault(),t.trigger("footable_filter",{filter:$(this).val()})});var e=$("#demo-foo-addrow");e.footable().on("click",".demo-delete-row",function(){var o=e.data("footable"),t=$(this).parents("tr:first");o.removeRow(t)}),$("#demo-input-search2").on("input",function(o){o.preventDefault(),e.trigger("footable_filter",{filter:$(this).val()})}),$("#demo-btn-addrow").click(function(){e.data("footable").appendRow('<tr><td style="text-align: center;"><button class="demo-delete-row btn btn-danger btn-xs btn-icon"><i class="fa fa-times"></i></button></td><td>Adam</td><td>Doe</td><td>Traffic Court Referee</td><td>22 Jun 1972</td><td><span class="badge label-table badge-success ">Active</span></td></tr>')})});
|
$(window).on("load",function(){$("#demo-foo-row-toggler").footable(),$("#demo-foo-accordion").footable().on("footable_row_expanded",function(o){$("#demo-foo-accordion tbody tr.footable-detail-show").not(o.row).each(function(){$("#demo-foo-accordion").data("footable").toggleDetail(this)})}),$("#demo-foo-pagination").footable(),$("#demo-show-entries").change(function(o){o.preventDefault();var t=$(this).val();$("#demo-foo-pagination").data("page-size",t),$("#demo-foo-pagination").trigger("footable_initialized")});var t=$("#demo-foo-filtering");t.footable().on("footable_filtering",function(o){var t=$("#demo-foo-filter-status").find(":selected").val();o.filter+=o.filter&&0<o.filter.length?" "+t:t,o.clear=!o.filter}),$("#demo-foo-filter-status").change(function(o){o.preventDefault(),t.trigger("footable_filter",{filter:$(this).val()})}),$("#demo-foo-search").on("input",function(o){o.preventDefault(),t.trigger("footable_filter",{filter:$(this).val()})});var e=$("#demo-foo-addrow");e.footable().on("click",".demo-delete-row",function(){var o=e.data("footable"),t=$(this).parents("tr:first");o.removeRow(t)}),$("#demo-input-search2").on("input",function(o){o.preventDefault(),e.trigger("footable_filter",{filter:$(this).val()})}),$("#demo-btn-addrow").click(function(){e.data("footable").appendRow('<tr><td style="text-align: center;"><button class="demo-delete-row btn btn-danger btn-xs btn-icon"><i class="mdi mdi-close"></i></button></td><td>Adam</td><td>Doe</td><td>Traffic Court Referee</td><td>22 Jun 1972</td><td><span class="badge label-table badge-success ">Active</span></td></tr>')})});
|
||||||
Loading…
Reference in New Issue
Block a user