CHANGE_CHANGE_ADMIN_AND_STAFF_VIEW_CLIENT_CREATE_BRANCH_NOTIFICATION : AADHAVAN
This commit is contained in:
parent
b639e5ff4b
commit
38620c9c65
@ -65,6 +65,8 @@ use CodeIgniter\Router\RouteCollection;
|
||||
$routes->match(['get','post'],'/template_preview','MasterController::template_preview');
|
||||
|
||||
$routes->match(['get','post'],'/shared_docs_list','MasterController::shared_docs_list');
|
||||
$routes->match(['get','post'],'/shared_doc_non_financial_year_to','MasterController::shared_doc_non_financial_year_to');
|
||||
$routes->match(['get','post'],'/set_include_archived_session/(:any)','MasterController::set_include_archived_session/$1');
|
||||
$routes->match(['get','post'],'/get_templates','MasterController::get_templates');
|
||||
$routes->match(['get','post'],'/create_docs','MasterController::create_docs');
|
||||
$routes->match(['get','post'],'/client_docs_preview','MasterController::client_docs_preview');
|
||||
|
||||
@ -302,11 +302,31 @@ class MasterController extends BaseController
|
||||
public function shared_docs_list()
|
||||
{
|
||||
|
||||
if(!$this->session->has('is_staff_logged_in')){ return redirect()->to(base_url().'staff'); }
|
||||
|
||||
|
||||
if(!$this->session->has('is_staff_logged_in')){ return redirect()->to(base_url().'staff'); }
|
||||
$currentDate = new \DateTime();
|
||||
|
||||
// Determine the start and end dates of the current financial year
|
||||
if ($currentDate->format('n') >= 4) {
|
||||
// If the current month is April (4) or later, the financial year started this year
|
||||
$financialYearStart = new \DateTime($currentDate->format('Y') . '-04-01');
|
||||
$financialYearEnd = new \DateTime(($currentDate->format('Y') + 1) . '-03-31');
|
||||
} else {
|
||||
// If the current month is before April, the financial year started last year
|
||||
$financialYearStart = new \DateTime(($currentDate->format('Y') - 1) . '-04-01');
|
||||
$financialYearEnd = new \DateTime($currentDate->format('Y') . '-03-31');
|
||||
}
|
||||
|
||||
// Convert to the format suitable for your database (assuming MySQL)
|
||||
$financialYearStart = $financialYearStart->format('Y-m-d');
|
||||
$financialYearEnd = $financialYearEnd->format('Y-m-d');
|
||||
$staffdata = $this->StaffModel->where('staff_id',$this->session->get('is_staff_logged_in'))->get()->getRow();
|
||||
if($this->session->get('logged_in_staff_role') == 'Admin'){
|
||||
$data['doc_list'] = $this->ClientDocsModel->select('client_docs.* , services.service_name , service_group.group_name , client_branch.name as client_branch_name , client.name as client_name')
|
||||
|
||||
if($this->session->get('logged_in_staff_role') == 'Admin'){
|
||||
$includeArchived = $this->session->get('include_archived');
|
||||
if (isset($includeArchived) && $includeArchived == 'false') {
|
||||
$data['doc_list'] = $this->ClientDocsModel->select('client_docs.* , services.service_name , service_group.group_name , client_branch.name as client_branch_name , client.name as client_name')
|
||||
->join('template', 'template.template_id = client_docs.template_id', 'left')
|
||||
->join('services', 'services.service_id = template.service_id', 'left')
|
||||
->join('service_group', 'service_group.service_group_id = template.service_group_id', 'left')
|
||||
@ -314,13 +334,24 @@ class MasterController extends BaseController
|
||||
->join('client', 'client.client_id = client_branch.client_id', 'left')
|
||||
->orderBy('client_docs.id','DESC')
|
||||
->findAll();
|
||||
|
||||
|
||||
// print_r($data['doc_list']);die;
|
||||
$data['clientdata'] = $this->ClientBranchModel->select('client.name as client_name , client_branch.name as client_branch_name , client_branch.id as client_branch_id')
|
||||
->join('client', 'client_branch.client_id = client.client_id', 'left')
|
||||
// ->where('client.business_id',$this->session->get('logged_in_staff_business_id'))
|
||||
}else{
|
||||
$data['doc_list'] = $this->ClientDocsModel->select('client_docs.* , services.service_name , service_group.group_name , client_branch.name as client_branch_name , client.name as client_name')
|
||||
->join('template', 'template.template_id = client_docs.template_id', 'left')
|
||||
->join('services', 'services.service_id = template.service_id', 'left')
|
||||
->join('service_group', 'service_group.service_group_id = template.service_group_id', 'left')
|
||||
->join('client_branch', 'client_branch.id = client_docs.client_branch_id', 'left')
|
||||
->join('client', 'client.client_id = client_branch.client_id', 'left')
|
||||
->where('client_docs.created_at >=', $financialYearStart)
|
||||
->where('client_docs.created_at <=', $financialYearEnd)
|
||||
->orderBy('client_docs.id','DESC')
|
||||
->findAll();
|
||||
|
||||
}
|
||||
// print_r($data['doc_list']);die;
|
||||
$data['clientdata'] = $this->ClientBranchModel->select('client.name as client_name , client_branch.name as client_branch_name , client_branch.id as client_branch_id')
|
||||
->join('client', 'client_branch.client_id = client.client_id', 'left')
|
||||
// ->where('client.business_id',$this->session->get('logged_in_staff_business_id'))
|
||||
->findAll();
|
||||
$data['serviceGroupData'] = $this->ServiceGroupModel->findAll();
|
||||
|
||||
}else{
|
||||
@ -337,7 +368,8 @@ class MasterController extends BaseController
|
||||
->join('client_branch', 'client_branch.id = client_docs.client_branch_id', 'left')
|
||||
->join('client', 'client.client_id = client_branch.client_id ' , 'left')
|
||||
// ->where('client.business_id', $business_id)
|
||||
// ->where('service_group.business_id', $business_id )
|
||||
->where('client_docs.created_at >=', $financialYearStart)
|
||||
->where('client_docs.created_at <=', $financialYearEnd)
|
||||
// ->where("JSON_CONTAINS(service_group.business_id, '" . $business_id . "')")
|
||||
->orderBy('client_docs.id', 'DESC')
|
||||
->get()
|
||||
@ -368,30 +400,44 @@ class MasterController extends BaseController
|
||||
|
||||
|
||||
// Fetch all doc_status entries and group them by client_docs_id
|
||||
foreach ($data['doc_list'] as $doc) {
|
||||
// print_r($doc['id']);die;
|
||||
$doc_id_temp = $doc['id'];
|
||||
$docStatusByClientId[$doc_id_temp] = $this->db->table('docs_status')
|
||||
->where('client_docs_id', $doc_id_temp)
|
||||
->where('status', "Approved")
|
||||
->get()
|
||||
->getResultArray();
|
||||
}
|
||||
// Assign doc_status arrays to each document in doc_list
|
||||
foreach ($data['doc_list'] as &$doc) {
|
||||
$doc['doc_status'] = isset($docStatusByClientId[$doc['id']]) ? $docStatusByClientId[$doc['id']] : [];
|
||||
}
|
||||
|
||||
|
||||
|
||||
$data['clientdata'] = $this->ClientBranchModel->select('client.name as client_name , client_branch.name as client_branch_name , client_branch.id as client_branch_id')
|
||||
->join('client', 'client_branch.client_id = client.client_id', 'left')
|
||||
// ->where('client.business_id',$this->session->get('logged_in_staff_business_id'))
|
||||
->findAll();
|
||||
|
||||
$data['serviceGroupData'] = $this->ServiceGroupModel->findAll();
|
||||
|
||||
foreach ($data['serviceGroupData'] as $key => $value) {
|
||||
$check_its_okay = 0;
|
||||
foreach (json_decode($value['business_id']) as $values) {
|
||||
if($values == $business_id){
|
||||
$check_its_okay =1;
|
||||
}
|
||||
}
|
||||
|
||||
if($check_its_okay == 0){
|
||||
unset($data['serviceGroupData'][$key]);
|
||||
}
|
||||
$check_its_okay = 0;
|
||||
}
|
||||
|
||||
}
|
||||
foreach ($data['doc_list'] as $doc) {
|
||||
// print_r($doc['id']);die;
|
||||
$doc_id_temp = $doc['id'];
|
||||
$docStatusByClientId[$doc_id_temp] = $this->db->table('docs_status')
|
||||
->select('created_at as doc_created_date')
|
||||
->where('client_docs_id', $doc_id_temp)
|
||||
->where('status', "Approved")
|
||||
->get()
|
||||
->getResultArray();
|
||||
}
|
||||
// Assign doc_status arrays to each document in doc_list
|
||||
foreach ($data['doc_list'] as &$doc) {
|
||||
$doc['doc_status'] = isset($docStatusByClientId[$doc['id']]) ? $docStatusByClientId[$doc['id']] : [];
|
||||
}
|
||||
$data['business_list'] = [];
|
||||
foreach (json_decode($staffdata->business_id) as $key => $value) {
|
||||
$business = $this->BusinessModel->where('business_id', $value)->first();
|
||||
@ -407,6 +453,85 @@ class MasterController extends BaseController
|
||||
|
||||
}
|
||||
|
||||
public function set_include_archived_session($checked_or_not) {
|
||||
// print_r($checked_or_not);die;
|
||||
if($checked_or_not == true){
|
||||
// $includeArchived = $this->request->getGet('include_archived');
|
||||
$this->session->set('include_archived', $checked_or_not);
|
||||
}else{
|
||||
$this->session->set('include_archived', $checked_or_not);
|
||||
}
|
||||
print_r($this->session->get('include_archived'));die;
|
||||
return $this->response->setJSON(['status' => 'success']);
|
||||
}
|
||||
|
||||
|
||||
public function shared_doc_non_financial_year_to(){
|
||||
if(!$this->session->has('is_staff_logged_in')){ return redirect()->to(base_url().'staff'); }
|
||||
$currentDate = new \DateTime();
|
||||
|
||||
// Determine the start and end dates of the current financial year
|
||||
if ($currentDate->format('n') >= 4) {
|
||||
// If the current month is April (4) or later, the financial year started this year
|
||||
$financialYearStart = new \DateTime($currentDate->format('Y') . '-04-01');
|
||||
$financialYearEnd = new \DateTime(($currentDate->format('Y') + 1) . '-03-31');
|
||||
} else {
|
||||
// If the current month is before April, the financial year started last year
|
||||
$financialYearStart = new \DateTime(($currentDate->format('Y') - 1) . '-04-01');
|
||||
$financialYearEnd = new \DateTime($currentDate->format('Y') . '-03-31');
|
||||
}
|
||||
|
||||
// Convert to the format suitable for your database (assuming MySQL)
|
||||
$financialYearStart = $financialYearStart->format('Y-m-d');
|
||||
$financialYearEnd = $financialYearEnd->format('Y-m-d');
|
||||
$staffdata = $this->StaffModel->where('staff_id',$this->session->get('is_staff_logged_in'))->get()->getRow();
|
||||
if($this->session->get('logged_in_staff_role') == 'Admin'){
|
||||
$data['doc_list'] = $this->ClientDocsModel->select('client_docs.* , services.service_name , service_group.group_name , client_branch.name as client_branch_name , client.name as client_name')
|
||||
->join('template', 'template.template_id = client_docs.template_id', 'left')
|
||||
->join('services', 'services.service_id = template.service_id', 'left')
|
||||
->join('service_group', 'service_group.service_group_id = template.service_group_id', 'left')
|
||||
->join('client_branch', 'client_branch.id = client_docs.client_branch_id', 'left')
|
||||
->join('client', 'client.client_id = client_branch.client_id', 'left')
|
||||
->orderBy('client_docs.id','DESC')
|
||||
->findAll();
|
||||
|
||||
|
||||
// print_r($data['doc_list']);die;
|
||||
$data['clientdata'] = $this->ClientBranchModel->select('client.name as client_name , client_branch.name as client_branch_name , client_branch.id as client_branch_id')
|
||||
->join('client', 'client_branch.client_id = client.client_id', 'left')
|
||||
// ->where('client.business_id',$this->session->get('logged_in_staff_business_id'))
|
||||
->findAll();
|
||||
$data['serviceGroupData'] = $this->ServiceGroupModel->findAll();
|
||||
|
||||
}
|
||||
foreach ($data['doc_list'] as $doc) {
|
||||
// print_r($doc['id']);die;
|
||||
$doc_id_temp = $doc['id'];
|
||||
$docStatusByClientId[$doc_id_temp] = $this->db->table('docs_status')
|
||||
->select('created_at as doc_created_date')
|
||||
->where('client_docs_id', $doc_id_temp)
|
||||
->where('status', "Approved")
|
||||
->get()
|
||||
->getResultArray();
|
||||
}
|
||||
// Assign doc_status arrays to each document in doc_list
|
||||
foreach ($data['doc_list'] as &$doc) {
|
||||
$doc['doc_status'] = isset($docStatusByClientId[$doc['id']]) ? $docStatusByClientId[$doc['id']] : [];
|
||||
}
|
||||
$data['business_list'] = [];
|
||||
foreach (json_decode($staffdata->business_id) as $key => $value) {
|
||||
$business = $this->BusinessModel->where('business_id', $value)->first();
|
||||
if ($business) {
|
||||
$data['business_list'][] = $business;
|
||||
}
|
||||
}
|
||||
// echo"<pre>";
|
||||
// print_r($data);die;
|
||||
echo view('layout/header', ['Data'=>$staffdata]);
|
||||
echo view('share_docs',$data);
|
||||
echo view('layout/footer');
|
||||
}
|
||||
|
||||
public function shared_document_edit()
|
||||
{
|
||||
if(!$this->session->has('is_staff_logged_in')){ return redirect()->to(base_url().'staff'); }
|
||||
@ -648,7 +773,8 @@ class MasterController extends BaseController
|
||||
|
||||
$businessData = $this->BranchModel->select('branches.* , business.business_name ')
|
||||
->join('business', 'branches.business_id = business.business_id', 'left')
|
||||
->where('branches.branch_id',$this->session->get('logged_in_staff_branch_id'))
|
||||
// ->where('branches.branch_id',$this->session->get('logged_in_staff_branch_id'))
|
||||
->where('branches.branch_id',1)
|
||||
->get()->getRow();
|
||||
$subject = 'BB-Sign Verify Document';
|
||||
$message = "Dear " . $clientData->name . ",<br>" . $businessData->business_name . " has requested your approval for a document. Please click the link below to preview and approve.<br><br>" . $url;
|
||||
|
||||
@ -220,6 +220,12 @@ class StaffController extends BaseController
|
||||
$data['clientList'] = $this->ClientModel->findAll();
|
||||
|
||||
$staffdata = $this->StaffModel->where('staff_id',$this->session->get('is_staff_logged_in'))->get()->getRow();
|
||||
foreach (json_decode($staffdata->business_id) as $key => $value) {
|
||||
$business = $this->BusinessModel->where('business_id', $value)->first();
|
||||
if ($business) {
|
||||
$data['business_list'][] = $business;
|
||||
}
|
||||
}
|
||||
echo view('layout/header', ['Data'=>$staffdata]);
|
||||
echo view('client_list',$data);
|
||||
echo view('layout/footer');
|
||||
@ -265,12 +271,15 @@ class StaffController extends BaseController
|
||||
{
|
||||
$clientData = $this->request->getVar();
|
||||
$clientData['created_by'] = $this->session->get('is_staff_logged_in');
|
||||
$clientData['branch_id'] = $this->session->get('logged_in_staff_branch_id');
|
||||
$business= $this->BranchModel->select('*')
|
||||
->join('business' , 'branches.business_id = business.business_id', 'left')
|
||||
->where('branches.branch_id ',$clientData['branch_id'])
|
||||
->first();
|
||||
$clientData['business_id'] = $business['business_id'];
|
||||
// $clientData['business_id'] = $this->session->get('logged_in_staff_business_id');
|
||||
// $business= $this->BranchModel->select('*')
|
||||
// ->join('business' , 'branches.business_id = business.business_id', 'left')
|
||||
// ->where('branches.branch_id ',$clientData['branch_id'])
|
||||
// ->first();
|
||||
// $business= $this->BusinessModel->select('*')
|
||||
// ->where('business_id ',$clientData['business_id'])
|
||||
// ->first();
|
||||
// $clientData['business_id'] = $business['business_id'];
|
||||
// $insert = $this->ClientModel->save($clientData);
|
||||
$insert = $this->ClientModel->insert($clientData);
|
||||
if($insert)
|
||||
@ -285,6 +294,8 @@ class StaffController extends BaseController
|
||||
$data['pin_code'] = $clientData['pin_code'];
|
||||
$data['mobile_no'] = $clientData['branch_mobile_no'];
|
||||
$data['gst_no'] = $clientData['gst_no'];
|
||||
$data['sms'] = $clientData['sms'];
|
||||
$data['whatsapp'] = $clientData['whatsapp'];
|
||||
|
||||
$branch_insert = $this->ClientBranchModel->insert($data);
|
||||
|
||||
@ -321,8 +332,15 @@ class StaffController extends BaseController
|
||||
echo true;
|
||||
}else{
|
||||
$staffdata = $this->StaffModel->where('staff_id',$this->session->get('is_staff_logged_in'))->get()->getRow();
|
||||
$business_list = [];
|
||||
foreach (json_decode($staffdata->business_id) as $key => $value) {
|
||||
$business = $this->BusinessModel->where('business_id', $value)->first();
|
||||
if ($business) {
|
||||
$business_list[] = $business;
|
||||
}
|
||||
}
|
||||
echo view('layout/header', ['Data'=>$staffdata]);
|
||||
echo view('staff_profile',['staff'=>$staffdata]);
|
||||
echo view('staff_profile',['staff'=>$staffdata, 'business_list'=> $business_list]);
|
||||
echo view('layout/footer');
|
||||
}
|
||||
}
|
||||
|
||||
@ -210,10 +210,10 @@
|
||||
datatable_bikeModel = $('#business_branch_table').DataTable({
|
||||
"order": [[0, 'asc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [{extend: 'pdfHtml5',title: 'Products', text: 'PDF',},
|
||||
{extend: 'print',title: 'Products',text: 'Print',},
|
||||
"buttons": [{extend: 'pdfHtml5',title: 'Branches', text: 'PDF',},
|
||||
{extend: 'print',title: 'Branches',text: 'Print',},
|
||||
{extend: 'copy',text: 'Copy', titleAttr: 'Copy',},
|
||||
{extend: 'csv',text: 'CSV', title: 'Products', }],
|
||||
{extend: 'csv',text: 'CSV', title: 'Branches', }],
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
|
||||
@ -108,10 +108,10 @@
|
||||
datatable_bikeModel = $('#business_table').DataTable({
|
||||
"order": [[0, 'asc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [{extend: 'pdfHtml5',title: 'Products', text: 'PDF',},
|
||||
{extend: 'print',title: 'Products',text: 'Print',},
|
||||
"buttons": [{extend: 'pdfHtml5',title: 'Business', text: 'PDF',},
|
||||
{extend: 'print',title: 'Business',text: 'Print',},
|
||||
{extend: 'copy',text: 'Copy', titleAttr: 'Copy',},
|
||||
{extend: 'csv',text: 'CSV', title: 'Products', }],
|
||||
{extend: 'csv',text: 'CSV', title: 'Business', }],
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
|
||||
|
||||
<div id="client_branch_modal" aria-hidden="true" aria-modal="true" data-backdrop="static" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-dialog modal-xg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 id="branch_type">Add Branch </h4>
|
||||
@ -153,25 +153,25 @@
|
||||
<input class="form-control" name="address" type="text" id="address" required="" placeholder="Address">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="city">City</label>
|
||||
<input class="form-control" name="city" type="text" id="city" required="" placeholder="City">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="state">State</label>
|
||||
<input class="form-control" name="state" type="text" id="state" value="Tamil Nadu" required="" placeholder="State">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="country">Country</label>
|
||||
<input class="form-control" name="country" type="text" value="India" id="country" required="" placeholder="Country">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="postalcode">Pin Code</label>
|
||||
<input class="form-control" name="pin_code" type="text" id="pin_code" required="" placeholder="Pin Code">
|
||||
@ -187,17 +187,17 @@
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label for="sms">SMS</label>
|
||||
<input style="float:right" name="sms" type="checkbox" id="sms" required="">
|
||||
</div>
|
||||
<input style="float:right;width: 20px;height: 20px;" name="sms" type="checkbox" id="sms" required="" checked>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<div class="col-md-2">
|
||||
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label for="whatsapp">WhatsApp</label>
|
||||
<input style="float:right" name="whatsapp" type="checkbox" id="whatsapp" required="">
|
||||
</div>
|
||||
<input style="float:right;width: 20px;height: 20px;" name="whatsapp" type="checkbox" id="whatsapp" required="" checked>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -221,10 +221,10 @@
|
||||
datatable_bikeModel = $('#client_branch_table').DataTable({
|
||||
"order": [[0, 'asc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [{extend: 'pdfHtml5',title: 'Products', text: 'PDF',},
|
||||
{extend: 'print',title: 'Products',text: 'Print',},
|
||||
"buttons": [{extend: 'pdfHtml5',title: 'Client_Branches', text: 'PDF',},
|
||||
{extend: 'print',title: 'Client_Branches',text: 'Print',},
|
||||
{extend: 'copy',text: 'Copy', titleAttr: 'Copy',},
|
||||
{extend: 'csv',text: 'CSV', title: 'Products', }],
|
||||
{extend: 'csv',text: 'CSV', title: 'Client_Branches', }],
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
|
||||
@ -59,7 +59,8 @@
|
||||
</a>
|
||||
</h4>
|
||||
<div class="page-title-right">
|
||||
<a onclick="window.history.back()" class="btn btn-secondary waves-effect waves-light"> Close </a>
|
||||
<!-- <a onclick="window.history.back()" class="btn btn-secondary waves-effect waves-light" > Close </a> -->
|
||||
<a onclick="window.history.back()" class="btn waves-effect waves-light" style="color: #fff;background-color: #6c757d;border-color: #6c757d;" > Close </a>
|
||||
|
||||
<?php if(isset($_SESSION['is_staff_logged_in']) && $_SESSION['is_staff_logged_in']) {
|
||||
if( $docData->is_active == 1 && $docData->is_approved == 0){ ?>
|
||||
|
||||
@ -107,8 +107,9 @@
|
||||
</div> <!-- content -->
|
||||
|
||||
|
||||
|
||||
<div id="bike_make_login-modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-dialog modal-xg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 id="branch_action_type">Add Client</h4>
|
||||
@ -123,26 +124,26 @@
|
||||
<input type="text" id="branch_id" hidden>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="name">Name</label>
|
||||
<input class="form-control" name="name" type="text" id="name" required="" placeholder="Name">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="panno">Pan No</label>
|
||||
<input class="form-control" parsley-trigger="change" name="pan_no" type="text" id="pan_no" required="" placeholder="PAN No" pattern="[A-Z]{5}[0-9]{4}[A-Z]{1}" title="Please enter a valid PAN in the format ABCDE1234F">
|
||||
<span id="error-message" style="color:red;display:none;">Invalid PAN Number.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="email">Email</label>
|
||||
<input class="form-control" name="email" type="email" id="email" required="" placeholder="Email">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="mobile_no">Mobile No</label>
|
||||
<input class="form-control" name="mobile_no" type="text" id="mobile_no" required placeholder="Mobile No" pattern="[0-9]{6,16}" minlength="6" maxlength="16" title="Please enter a valid mobile number between 6 and 16 digits">
|
||||
@ -156,58 +157,58 @@
|
||||
</h5>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="branchname">Branch Name</label>
|
||||
<input class="form-control" name="branch_name" type="text" id="branch_name" required="true" placeholder="Branch Name">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="gstno">GST No</label>
|
||||
<input class="form-control" name="gst_no" type="text" id="gst_no" required="" placeholder="GST No" pattern="[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[0-9]{1}[Z]{1}[0-9A-Z]{1}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-5">
|
||||
<div class="form-group">
|
||||
<label for="branch_email">Email</label>
|
||||
<input class="form-control" name="branch_email" type="email" id="branch_email" required="" placeholder="Email">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="branch_mobile_no">Mobile No</label>
|
||||
<input class="form-control" name="branch_mobile_no" type="text" id="branch_mobile_no" required="" minlength="6" maxlength="16" placeholder="Mobile No">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- </div> -->
|
||||
<!-- <div class="row"> -->
|
||||
<div class="col-md-9">
|
||||
<div class="form-group">
|
||||
<label for="address">Address</label>
|
||||
<input class="form-control" name="address" type="text" id="address" required="" placeholder="Address">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="city">City</label>
|
||||
<input class="form-control" name="city" type="text" id="city" required="" placeholder="City">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="state">State</label>
|
||||
<input class="form-control" name="state" type="text" id="state" value="Tamil Nadu" required="" placeholder="State">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="country">Country</label>
|
||||
<input class="form-control" name="country" type="text" value="India" id="country" required="" placeholder="Country">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="postalcode">Pin Code</label>
|
||||
<input class="form-control" name="pin_code" type="text" id="pin_code" required="" placeholder="Pin Code">
|
||||
@ -215,8 +216,30 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<h5 class="mb-3 text-uppercase bg-light p-2"><i class="fas fa-bell mr-1"></i> Notification</h5>
|
||||
|
||||
<div class="row">
|
||||
<!-- </div> -->
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label for="sms">SMS</label>
|
||||
<input style="float:right;width: 20px;height: 20px;" name="sms" type="checkbox" id="sms" required="" checked>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label for="whatsapp">WhatsApp</label>
|
||||
<input style="float:right;width: 20px;height: 20px;" name="whatsapp" type="checkbox" id="whatsapp" required="" checked>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group text-right">
|
||||
<button class="btn btn-info waves-effect waves-light" type="submit" id="client_submit_button" onclick="submitBranch(this)">Submit</button>
|
||||
</div>
|
||||
@ -251,6 +274,8 @@
|
||||
$('#state').prop('required', false);
|
||||
$('#pin_code').prop('required', false);
|
||||
$('#branch_mobile_no').prop('required', false);
|
||||
$('#sms').prop('required', false);
|
||||
$('#whatsapp').prop('required', false);
|
||||
})
|
||||
|
||||
$('#add_client_button').click(function (params) {
|
||||
@ -273,16 +298,18 @@
|
||||
$('#state').prop('required', true);
|
||||
$('#pin_code').prop('required', true);
|
||||
$('#branch_mobile_no').prop('required', true);
|
||||
$('#sms').prop('required', true);
|
||||
$('#whatsapp').prop('required', true);
|
||||
})
|
||||
|
||||
|
||||
datatable_bikeModel = $('#client_table').DataTable({
|
||||
"order": [[0, 'asc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [{extend: 'pdfHtml5',title: 'Products', text: 'PDF',},
|
||||
{extend: 'print',title: 'Products',text: 'Print',},
|
||||
"buttons": [{extend: 'pdfHtml5',title: 'Clients', text: 'PDF',},
|
||||
{extend: 'print',title: 'Clients',text: 'Print',},
|
||||
{extend: 'copy',text: 'Copy', titleAttr: 'Copy',},
|
||||
{extend: 'csv',text: 'CSV', title: 'Products', }],
|
||||
{extend: 'csv',text: 'CSV', title: 'Clients', }],
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
@ -333,6 +360,8 @@
|
||||
formData.state = $('#state').val();
|
||||
formData.pin_code = $('#pin_code').val();
|
||||
formData.branch_mobile_no = $('#branch_mobile_no').val();
|
||||
formData.sms = $('#sms').val();
|
||||
formData.whatsapp = $('#whatsapp').val();
|
||||
}
|
||||
|
||||
var form = $(params).parent().parent();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>BB - Sign Client Login</title>
|
||||
<title>Dox 2 Approve Client Login</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description" />
|
||||
<meta content="Coderthemes" name="author" />
|
||||
|
||||
@ -176,7 +176,7 @@
|
||||
<div class="col-sm-8 append-text-button">%FY%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">Accessment Year</div>
|
||||
<div class="col-sm-4 font-weight-bold">Assessment Year</div>
|
||||
<div class="col-sm-8 append-text-button">%AY%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<script>document.write(new Date().getFullYear())</script> © BB-Sign
|
||||
<script>document.write(new Date().getFullYear())</script> © Dox 2 Approve
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<!-- <div class="text-md-right footer-links d-none d-sm-block">
|
||||
@ -24,28 +24,48 @@
|
||||
|
||||
<!-- Right bar overlay-->
|
||||
<!-- <div class="rightbar-overlay"></div> -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
<?php if (isset($business_list) && isset($_SESSION['logged_in_staff_business_id'])) { ?>
|
||||
var business_list = <?php echo json_encode($business_list); ?>;
|
||||
var selectElement = document.getElementById('business_list_header');
|
||||
function handleBusinessClick(businessId) {
|
||||
// console.log("Business ID:", businessId.id);
|
||||
|
||||
var session_business_id = <?php echo $_SESSION['logged_in_staff_business_id'] ?>;
|
||||
$.ajax({
|
||||
url: '<?= base_url("set_business_in_session/") ?>' + businessId.id,
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
window.location.reload();
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
// Handle error
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
$(document).ready(function() {
|
||||
<?php if (isset($business_list) && isset($_SESSION['logged_in_staff_business_id'])) { ?>
|
||||
var business_list = <?php echo json_encode($business_list); ?>;
|
||||
var dropdownMenu = document.querySelector('.dropdown-menu.busines_menu_header_staff_view[aria-labelledby="topnav-Service"]');
|
||||
|
||||
// Loop through business_list and create options
|
||||
business_list.forEach(function(business) {
|
||||
var option = document.createElement('option');
|
||||
option.value = business.business_id; // Set the value attribute
|
||||
option.textContent = business.business_name; // Set the text content
|
||||
selectElement.appendChild(option); // Append the option to <select>
|
||||
if (business.business_id == session_business_id) {
|
||||
option.selected = true;
|
||||
}
|
||||
});
|
||||
<?php } ?>
|
||||
})
|
||||
</script>
|
||||
var session_business_id = '<?php echo $_SESSION['logged_in_staff_business_id'] ?>';
|
||||
|
||||
// Loop through business_list and create <a> tags
|
||||
business_list.forEach(function(business) {
|
||||
var aTag = document.createElement('a');
|
||||
aTag.className = 'dropdown-item business_list_header';
|
||||
aTag.href = '#'; // You can set the URL you need here
|
||||
aTag.textContent = business.business_name; // Set the text content
|
||||
aTag.id = business.business_id; // Set the text content
|
||||
aTag.setAttribute('onclick', 'handleBusinessClick(this)');
|
||||
if (business.business_id == session_business_id) {
|
||||
aTag.classList.add('active'); // Add a class to indicate the selected business
|
||||
document.getElementById('dropdown-selected-text').textContent = business.business_name; // Set initial text
|
||||
}
|
||||
dropdownMenu.appendChild(aTag); // Append the <a> tag to <div>
|
||||
});
|
||||
<?php } ?>
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- Vendor js -->
|
||||
<script src="<?= base_url()."public"; ?>/assets/js/vendor.min.js"></script>
|
||||
|
||||
@ -2,13 +2,13 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>BB - Sign</title>
|
||||
<title>Dox 2 Approve</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description" />
|
||||
<meta content="Coderthemes" name="author" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<!-- App favicon -->
|
||||
<link rel="shortcut icon" href="<?= base_url()."public"; ?>/assets/images/favicon.ico">
|
||||
<link rel="shortcut icon" href="<?= base_url()."public"; ?>/assets/images/dox2apprv-fav.png">
|
||||
|
||||
<!-- App css -->
|
||||
<link href="<?= base_url()."public"; ?>/assets/css/bootstrap-creative.min.css" rel="stylesheet" type="text/css" id="bs-default-stylesheet" />
|
||||
@ -44,9 +44,9 @@
|
||||
|
||||
<style>
|
||||
.select2-container .select2-selection--multiple .select2-selection__choice {
|
||||
padding: 5px 7px 5px 0 !important;
|
||||
color: #000000;
|
||||
}
|
||||
padding: 5px 7px 5px 0 !important;
|
||||
color: #000000;
|
||||
}
|
||||
#business_list_header option{
|
||||
background-color: white;
|
||||
color:black;
|
||||
@ -160,7 +160,11 @@
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.modal-xg {
|
||||
max-width: 70%; /* Adjust the percentage as needed */
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
@ -175,11 +179,23 @@
|
||||
|
||||
<ul class="list-unstyled topnav-menu float-right mb-0">
|
||||
|
||||
<li class="nav-item dropdown" >
|
||||
<?php if(isset($_SESSION['logged_in_staff_business_id']) && $_SESSION['logged_in_staff_business_id']) { ?>
|
||||
|
||||
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-Service" role="button"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span id="dropdown-selected-text">Business</span> <div class="arrow-down"></div>
|
||||
</a>
|
||||
<div class="dropdown-menu busines_menu_header_staff_view" aria-labelledby="topnav-Service">
|
||||
|
||||
</div>
|
||||
<?php } ?>
|
||||
</li>
|
||||
<li>
|
||||
<?php if(isset($_SESSION['logged_in_staff_business_id']) && $_SESSION['logged_in_staff_business_id']) { ?>
|
||||
|
||||
<select name="business" class="form-control" id="business_list_header" style="width: 213px;margin-top: 13px;background-color: #85a7c9;border: none;color:white;">
|
||||
</select>
|
||||
<!-- <select name="business" class="form-control" id="business_list_header" style="width: 213px;margin-top: 13px;background-color: #85a7c9;border: none;color:white;">
|
||||
</select> -->
|
||||
<?php } ?>
|
||||
</li>
|
||||
|
||||
@ -258,15 +274,19 @@
|
||||
<!-- <span class="logo-lg-text-light">M</span> -->
|
||||
</span>
|
||||
</a>
|
||||
<a>teeeeeeeeeeee</a>
|
||||
<!-- <a class="logo logo-light text-center">
|
||||
<a class="logo logo-light text-center">
|
||||
<span class="logo-sm">
|
||||
<img src="?= base_url()."public"; ?>/assets/images/logo_white_sm.png" alt="" height="24">
|
||||
<!-- Dox 2 Approve -->
|
||||
<!-- <img src="?= base_url()."public"; ?>/assets/images/logo_white_sm.png" alt="" height="24"> -->
|
||||
<img src="<?= base_url()."public"; ?>/assets/images/dox2apprv-fav.png" alt="" height="24">
|
||||
</span>
|
||||
<span class="logo-lg">
|
||||
<img src="?= base_url()."public"; ?>/assets/images/logo_white.png" alt="" height="20">
|
||||
<h3 style="color: white;margin-top: 16px;"> Dox 2 Approve </h3>
|
||||
<!-- <img src="?= base_url()."public"; ?>/assets/images/logo_white.png" alt="" height="20"> -->
|
||||
<!-- <img src="<?= base_url()."public"; ?>/assets/images/image.png" alt="" height="20"> -->
|
||||
</span>
|
||||
</a> -->
|
||||
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
@ -286,6 +306,7 @@
|
||||
<span></span>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<!-- End mobile menu toggle-->
|
||||
</li>
|
||||
|
||||
@ -309,6 +330,8 @@
|
||||
<a class="nav-link" href="<?= base_url()."shared_docs_list"; ?>">
|
||||
<i class="ri-share-line"></i> Share Docs </a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if($_SESSION['logged_in_staff_role'] == 'Admin' ) { ?>
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-Service" role="button"
|
||||
@ -324,9 +347,7 @@
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if($_SESSION['logged_in_staff_role'] == 'Admin' ) { ?>
|
||||
|
||||
|
||||
|
||||
@ -367,4 +388,7 @@
|
||||
</div> <!-- end .collapsed-->
|
||||
</nav>
|
||||
</div> <!-- end container-fluid -->
|
||||
</div> <!-- end topnav-->
|
||||
</div> <!-- end topnav-->
|
||||
|
||||
|
||||
|
||||
@ -185,10 +185,10 @@
|
||||
datatable_bikeModel = $('#service_group_table').DataTable({
|
||||
"order": [[0, 'asc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [{extend: 'pdfHtml5',title: 'Products', text: 'PDF',},
|
||||
{extend: 'print',title: 'Products',text: 'Print',},
|
||||
{extend: 'copy',text: 'Copy', titleAttr: 'Copy',},
|
||||
{extend: 'csv',text: 'CSV', title: 'Products', }],
|
||||
"buttons": [{extend: 'pdfHtml5',title: 'Service_Group', text: 'PDF',},
|
||||
{extend: 'print',title: 'Service_Group',text: 'Print',},
|
||||
{extend: 'copy',text: 'Copy', titleAttr: 'Service_Group',},
|
||||
{extend: 'csv',text: 'CSV', title: 'Service_Group', }],
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
|
||||
@ -207,10 +207,10 @@ $(document).ready(function() {
|
||||
datatable_bikeModel = $('#service_table').DataTable({
|
||||
"order": [[0, 'asc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [{extend: 'pdfHtml5',title: 'Products', text: 'PDF',},
|
||||
{extend: 'print',title: 'Products',text: 'Print',},
|
||||
"buttons": [{extend: 'pdfHtml5',title: 'Service_List', text: 'PDF',},
|
||||
{extend: 'print',title: 'Service_List',text: 'Print',},
|
||||
{extend: 'copy',text: 'Copy', titleAttr: 'Copy',},
|
||||
{extend: 'csv',text: 'CSV', title: 'Products', }],
|
||||
{extend: 'csv',text: 'CSV', title: 'Service_List', }],
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
|
||||
@ -16,7 +16,11 @@
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div class="loader-mask modal-loader-mask" style="display:none;">
|
||||
<div class="loader modal-loader" style="display:none;">
|
||||
Please Wait <img src="<?= base_url() . "public" ?>/assets/images/simple_loader.gif" height="30" width="30" alt="Loading...">
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-page">
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
@ -44,7 +48,7 @@
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
<table id="share_docs_table" class="table table-striped dt-responsive nowrap w-100 display">
|
||||
<thead>
|
||||
<tr >
|
||||
@ -76,7 +80,7 @@
|
||||
<th>Service Name</th>
|
||||
<th>Document Name</th>
|
||||
<th>Doc Status</th>
|
||||
<!-- <th>Approve Date</th> -->
|
||||
<th>Approve Date</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -108,6 +112,11 @@
|
||||
<?php } ?>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<?php if(count($value['doc_status']) > 0){ ?>
|
||||
<span><?php echo $value['doc_status'][0]['doc_created_date'] ?></span>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group dropdown">
|
||||
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
||||
@ -116,10 +125,11 @@
|
||||
<a class="dropdown-item" href="<?php echo base_url().'client_docs_preview?doc_id='.$value['id']; ?>" >
|
||||
<i class='mdi mdi-eye-outline mr-1' style="margin-right: 16px !important;margin-left: 5px;"></i>Preview
|
||||
</a>
|
||||
|
||||
<?php if ($value['is_approved'] != 1){ ?>
|
||||
<a class="dropdown-item" href="<?= base_url()."shared_document_edit?doc_id=".md5($value['id']); ?>">
|
||||
<i class="mdi mdi-pencil-outline mr-2 text-muted font-18 vertical-middle"></i> Edit
|
||||
</a>
|
||||
<?php } ?>
|
||||
|
||||
<a id="doc_history_button" data-id="<?php echo $value['id']; ?>" class="dropdown-item" data-toggle="modal" data-target="#bike_make_login-modal" data-title="Share">
|
||||
<i class="mdi mdi-history" style="margin-right: 16px !important;"></i>History
|
||||
@ -291,27 +301,43 @@
|
||||
<!-- End Page content -->
|
||||
<!-- ============================================================== -->
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.1.0/js/select2.min.js"></script>
|
||||
<script>
|
||||
|
||||
$('#business_list_header').change(function () {
|
||||
var businessId = $(this).val();
|
||||
|
||||
function fetchDataAndRedirect(selectedOption) {
|
||||
// var selectedOption = $('#add_30days_old_dispatched_data').val();
|
||||
console.log("-------------------");
|
||||
console.log(selectedOption);
|
||||
if(selectedOption == 'all_years'){
|
||||
selectedOption = false;
|
||||
}else{
|
||||
selectedOption = true;
|
||||
}
|
||||
$('.loader').fadeIn();
|
||||
$('.loader-mask').fadeIn();
|
||||
$.ajax({
|
||||
url: '<?= base_url("set_business_in_session/") ?>' + businessId,
|
||||
url: '<?= base_url("set_include_archived_session/") ?>' + selectedOption,
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
data: { include_archived: selectedOption },
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
window.location.reload();
|
||||
// Redirect based on the selected option
|
||||
setTimeout(() => {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').fadeOut('slow');
|
||||
}, 2000);
|
||||
if (selectedOption == false) {
|
||||
console.log("Redirecting to shared_doc_non_financial_year_to");
|
||||
window.location.href = '<?= base_url("shared_doc_non_financial_year_to") ?>';
|
||||
} else {
|
||||
console.log("Redirecting to shared_docs_list");
|
||||
window.location.href = '<?= base_url("shared_docs_list") ?>';
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
// Handle error
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
$('input[type="text"]').on('input', function() {
|
||||
var searchTextSKU = $('#searchClientName').val().toLowerCase();
|
||||
@ -345,23 +371,19 @@
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
// $('#business_list_header').
|
||||
|
||||
|
||||
datatable_bikeModel = $('#share_docs_table').DataTable({
|
||||
"order": [[0, 'asc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [{extend: 'pdfHtml5',title: 'Products', text: 'PDF',},
|
||||
{extend: 'print',title: 'Products',text: 'Print',},
|
||||
"buttons": [{extend: 'pdfHtml5',title: 'Shared_Documents', text: 'PDF',},
|
||||
{extend: 'print',title: 'Shared_Documents',text: 'Print',},
|
||||
{extend: 'copy',text: 'Copy', titleAttr: 'Copy',},
|
||||
{extend: 'csv',text: 'CSV', title: 'Products', }],
|
||||
{extend: 'csv',text: 'CSV', title: 'Shared_Documents', }],
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
});
|
||||
|
||||
$('.select2-dropdown').select2({ });
|
||||
$('.select2-dropdown').select2();
|
||||
|
||||
$("#service_group_id").on("change", function()
|
||||
{
|
||||
@ -430,10 +452,58 @@
|
||||
});
|
||||
});
|
||||
|
||||
var role= '<?php echo isset($_SESSION['logged_in_staff_role']) ? $_SESSION['logged_in_staff_role'] : ''; ?>';
|
||||
|
||||
|
||||
|
||||
// Initialize includeArchived based on PHP variable
|
||||
var includeArchived = <?= isset($includeArchived) && $includeArchived ? 'true' : 'false' ?>;
|
||||
|
||||
// Create select element with options
|
||||
var selectElement = $('<select class="form-control" id="financial_year_data_or_not" style="margin-left: 5px;">' +
|
||||
'<option value="current_year">Current Financial Year</option>' +
|
||||
'<option value="all_years">All Years</option>' +
|
||||
'</select>');
|
||||
|
||||
// Set initial selected option based on includeArchived
|
||||
if (includeArchived) {
|
||||
selectElement.val('all_years');
|
||||
} else {
|
||||
selectElement.val('current_year');
|
||||
}
|
||||
|
||||
// Create label element wrapping the select element
|
||||
var newElement = $('<label class="dt-buttons btn-group flex-wrap" style="border: 1px solid white; display: flex;"></label>').append(selectElement);
|
||||
|
||||
// Check role and append newElement accordingly
|
||||
if (role == 'Admin') {
|
||||
$('#share_docs_table_wrapper').children().first().after(newElement);
|
||||
|
||||
var includeArchived = <?php echo isset($_SESSION['include_archived']) ? json_encode($_SESSION['include_archived']) : 'false'; ?>;
|
||||
|
||||
if (includeArchived) {
|
||||
|
||||
if(includeArchived == 'true'){
|
||||
$('#financial_year_data_or_not').val('current_year');
|
||||
}else{
|
||||
$('#financial_year_data_or_not').val('all_years');
|
||||
}
|
||||
}else{
|
||||
$('#financial_year_data_or_not').val('current_year');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Handle change event of select element
|
||||
selectElement.on('change', function() {
|
||||
var selectedValue = $(this).val();
|
||||
|
||||
// Call fetchDataAndRedirect() function with selected value
|
||||
fetchDataAndRedirect(selectedValue);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$('#share-docs').submit(function(e) {
|
||||
|
||||
|
||||
@ -178,10 +178,10 @@
|
||||
datatable_bikeModel = $('#staff_table').DataTable({
|
||||
"order": [[0, 'asc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [{extend: 'pdfHtml5',title: 'Products', text: 'PDF',},
|
||||
{extend: 'print',title: 'Products',text: 'Print',},
|
||||
"buttons": [{extend: 'pdfHtml5',title: 'Staff_List', text: 'PDF',},
|
||||
{extend: 'print',title: 'Staff_List',text: 'Print',},
|
||||
{extend: 'copy',text: 'Copy', titleAttr: 'Copy',},
|
||||
{extend: 'csv',text: 'CSV', title: 'Products', }],
|
||||
{extend: 'csv',text: 'CSV', title: 'Staff_List', }],
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>BB-Sign</title>
|
||||
<title>Dox 2 Approve</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description" />
|
||||
<meta content="Coderthemes" name="author" />
|
||||
|
||||
@ -207,7 +207,7 @@
|
||||
<div class="col-sm-8 append-text-button">%FY%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">Accessment Year</div>
|
||||
<div class="col-sm-4 font-weight-bold">Assessment Year</div>
|
||||
<div class="col-sm-8 append-text-button">%AY%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
|
||||
@ -128,10 +128,10 @@ $(document).ready(function() {
|
||||
datatable_bikeModel = $('#template_list_table').DataTable({
|
||||
"order": [[1, 'asc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [{extend: 'pdfHtml5',title: 'Products', text: 'PDF',},
|
||||
{extend: 'print',title: 'Products',text: 'Print',},
|
||||
"buttons": [{extend: 'pdfHtml5',title: 'Template_List', text: 'PDF',},
|
||||
{extend: 'print',title: 'Template_List',text: 'Print',},
|
||||
{extend: 'copy',text: 'Copy', titleAttr: 'Copy',},
|
||||
{extend: 'csv',text: 'CSV', title: 'Products', }],
|
||||
{extend: 'csv',text: 'CSV', title: 'Template_List', }],
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
|
||||
BIN
public/assets/images/dox2apprv-fav.png
Normal file
BIN
public/assets/images/dox2apprv-fav.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
BIN
public/assets/images/image.png
Normal file
BIN
public/assets/images/image.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
Loading…
Reference in New Issue
Block a user