diff --git a/app/Http/Controllers/CampaignController.php b/app/Http/Controllers/CampaignController.php
index 4d2df561..a939b458 100644
--- a/app/Http/Controllers/CampaignController.php
+++ b/app/Http/Controllers/CampaignController.php
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests\LambdaRequest;
use DB;
+use Auth;
class CampaignController extends Controller
{
@@ -123,7 +124,20 @@ class CampaignController extends Controller
$post = $request->except('_token');
$response = LambdaRequest::signedrequest('post', $this->_service, $this->_module.'/view', $post, 60);
//echo '
'; print_r($response); exit;
- return $this->view('report')->with(['periods' => $response->data->periods, 'users' => $response->data->users, 'metrics' => $response->data->metrics, 'post' => $response->data->post ]);
+ return $this->view('report')->with(['periods' => $response->data->periods, 'users' => $response->data->users, 'metrics' => $response->data->metrics, 'post' => $response->data->post, 'base_level' => $response->data->base_level ]);
+
+ }
+ public function dashboard(Request $request) {
+ $post = $request->except('_token');
+ $response = LambdaRequest::signedrequest('post', $this->_service, $this->_module.'/view', $post, 60);
+ $user = false;
+ foreach($response->data->users as $u) {
+ if($u->user_id == Auth::user()->user_id) {
+ $user = $u;
+ }
+ }
+ //echo ''; print_r($response); exit;
+ return $this->view('dashboard')->with(['periods' => $response->data->periods, 'user' => $user, 'metrics' => $response->data->metrics, 'post' => $response->data->post ]);
}
}
diff --git a/app/Http/Controllers/CampaignreportController.php b/app/Http/Controllers/CampaignreportController.php
index 5bf19d97..ce4f1847 100644
--- a/app/Http/Controllers/CampaignreportController.php
+++ b/app/Http/Controllers/CampaignreportController.php
@@ -186,10 +186,26 @@ class CampaignreportController extends Controller
}
} else {
- return $this->view('appreport')->with(['periods' => $response->data->periods, 'users' => $response->data->users, 'metrics' => $response->data->metrics, 'post' => $response->data->post ]);
+ return $this->view('appreport')->with(['periods' => $response->data->periods, 'users' => $response->data->users, 'metrics' => $response->data->metrics, 'post' => $response->data->post, 'base_level' => $response->data->base_level ]);
}
}
+ public function dashboard(Request $request) {
+ $post = $request->except('_token');
+ $token = $request->header('Authorization');
+ if($token != '') {
+ $request->session()->put('metric_access_key', $token);
+ } else {
+ $token = $request->session()->get('metric_access_key');
+ }
+ $post['type'] = 'leaderboard';
+ $post['chart'] = 'leaderboard';
+ $response = LambdaRequest::postrequest($this->_service, $this->_module.'/view', $post, $token);
+ //echo ''; print_r($response); exit;
+ return $this->view('appdashboard')->with(['periods' => $response->data->periods, 'user' => $response->data->user, 'metrics' => $response->data->metrics, 'post' => $response->data->post ]);
+ }
+
+
public function metriclist(Request $request) {
$post = $request->input();
$token = $request->header('Authorization');
diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php
index 008f7926..489bfae1 100644
--- a/app/Http/Controllers/DashboardController.php
+++ b/app/Http/Controllers/DashboardController.php
@@ -24,8 +24,14 @@ class DashboardController extends Controller
$reports = $this->getlambda('get', 'metric', 'metric_report', 'list', $params);
$widgets = $this->getlambda('get', 'wall', 'widgets', 'list');
$campaigns = $this->getlambda('get', 'competition', 'campaign', 'list', $params);
+ if($campaigns->statusCode == 200) {
+ $campaigns = $campaigns->data->campaigns;
+ } else {
+ $campaigns = [];
+ }
//echo ''; print_r($campaigns); exit;
- return view('index')->with(['metrics' => isset($reports->data->metrics) ? $reports->data->metrics : [], 'widgets' => $widgets->data->widgets, 'campaigns' => $campaigns->data->campaigns]);
+
+ return view('index')->with(['metrics' => isset($reports->data->metrics) ? $reports->data->metrics : [], 'widgets' => $widgets->data->widgets, 'campaigns' => $campaigns]);
}
diff --git a/app/Http/Controllers/DomainController.php b/app/Http/Controllers/DomainController.php
index 4ceadd77..cb7ae140 100644
--- a/app/Http/Controllers/DomainController.php
+++ b/app/Http/Controllers/DomainController.php
@@ -41,6 +41,7 @@ class DomainController extends Controller
'PM' => 'PM',
'MM' => 'MM',
'BH' => 'BH',
+ 'HO' => 'HO',
'DSH' => 'DSH',
'NSM' => 'NSM',
'ZBM' => 'ZBM',
diff --git a/app/Http/Controllers/FormController.php b/app/Http/Controllers/FormController.php
index d2cd7a78..71bc1347 100644
--- a/app/Http/Controllers/FormController.php
+++ b/app/Http/Controllers/FormController.php
@@ -183,7 +183,7 @@ class FormController extends Controller
if(isset($formdata) && !empty($formdata) && $formdata->user_id != '') {
$post = $this->processformdata($formdata->form_id, $post, $formdata->user_id, $formdata->partition);
- //Log::debug(print_r($post, true));
+ Log::debug(print_r($post, true));
$finfo = LambdaRequest::postrequest('form', 'formentity/submitform', ['formdata' => $post, 'entity_id' => $formdata->form_id, 'user_id' => $formdata->user_id, 'partition' => $formdata->partition ]);
if($finfo->status == 'success') {
return response()->json(['status' => 'success']);
@@ -346,6 +346,19 @@ class FormController extends Controller
case '1669979081-e991fc27-e8c1-4120-9883-b42af09244d3':
$post[$post['activity_type']] = 1;
break;
+
+ case '1672032315-9b267137-4b81-425c-afb4-a4c0fa701372':
+ if($post['powerof5'] == 'Yes') {
+ $post['powerof5_duova_rx'] = $post['duova_rx'];
+ $post['powerof5_glycohale_fb_rx'] = $post['glycohale_fb_rx'];
+ $post['powerof5_maxiflo_rx'] = $post['maxiflo_rx'];
+ $post['powerof5_maxiflo_sb_rx'] = $post['maxiflo_sb_rx'];
+ $post['powerof5_nistami_rx'] = $post['nistami_rx'];
+ $post['powerof5_tiova_rx'] = $post['tiova_rx'];
+ $post['powerof5_tiova_sb_rx'] = $post['tiova_sb_rx'];
+ $post['powerof5_triohale_rx'] = $post['triohale_rx'];
+ }
+ break;
}
diff --git a/app/Http/Controllers/HierarchyController.php b/app/Http/Controllers/HierarchyController.php
index c14f0a95..a8e5b651 100644
--- a/app/Http/Controllers/HierarchyController.php
+++ b/app/Http/Controllers/HierarchyController.php
@@ -147,7 +147,7 @@ class HierarchyController extends Controller
$response = LambdaRequest::signedrequest('get', $this->_service, $this->_module.'/get_all', ['positions' => true, 'export' => true]);
//$users = LambdaRequest::signedrequest('get', $this->_service, 'users/get_all', ['raw' => true]);
- //echo ''; print_r($response->data->hierarchys); exit;
+ //echo ''; print_r($response); exit;
$headers = ['Sub Department Name', 'Employee Code', 'Business Email', 'Display Name', 'Mobile 1 Phone', 'Position Code', 'Position Title', 'Designation', 'Zone', 'Region', 'Area', 'Territory', 'Manager 1 Employee Code', 'Manager 1 Name', 'Manager\'s 1 Email', 'Manager 2 Employee Code', 'Manager 2 Name', 'Manager\'s 2 Email'];
// foreach($response->data->graph->values->metrics as $metric) {
diff --git a/app/Http/Controllers/SurveyController.php b/app/Http/Controllers/SurveyController.php
index d21f624a..25eabdec 100644
--- a/app/Http/Controllers/SurveyController.php
+++ b/app/Http/Controllers/SurveyController.php
@@ -44,6 +44,7 @@ class SurveyController extends Controller
return [
'title' => ['title' => 'Title', 'type' => 'text', 'required' => true],
+ 'description' => ['title' => 'Description', 'type' => 'textarea', 'required' => true, 'fullwidth' => true],
'status' => ['title' => 'Status', 'type' => 'select', 'required' => true, 'values' => ['active' => 'Active', 'disabled' => 'Disabled'] ],
];
}
diff --git a/app/Http/Controllers/SurveyquestionController.php b/app/Http/Controllers/SurveyquestionController.php
index 6dfe07b0..40750648 100644
--- a/app/Http/Controllers/SurveyquestionController.php
+++ b/app/Http/Controllers/SurveyquestionController.php
@@ -56,7 +56,7 @@ class SurveyquestionController extends Controller
return [
'question' => ['title' => 'Question', 'type' => 'text', 'required' => true, 'fullwidth' => true],
'code' => ['title' => 'Code (small caps without spaces and special chars except "_")', 'type' => 'text', 'required' => true],
- 'type' => ['title' => 'Question Type', 'type' => 'select', 'required' => true, 'values' => ['text' => 'Text', 'number' => 'Number', 'date' => 'Date', 'email' => 'Email', 'url' => 'Url', 'dropdown' => 'Dropdown', 'checkbox' => 'Checkbox', 'radio' => 'Radio', 'multitextbox' => 'Multi Text Boxes', 'contacts' => 'Contacts', 'file' => 'File Upload'] ],
+ 'type' => ['title' => 'Question Type', 'type' => 'select', 'required' => true, 'values' => ['text' => 'Text', 'number' => 'Number', 'date' => 'Date', 'email' => 'Email', 'url' => 'Url', 'dropdown' => 'Dropdown', 'checkbox' => 'Checkbox', 'radio' => 'Radio', 'radiometrix' => 'RadioMetrix', 'multitextbox' => 'Multi Text Boxes', 'contacts' => 'Contacts', 'file' => 'File Upload'] ],
'required' => ['title' => 'Is Required', 'type' => 'yesno', 'required' => true],
'status' => ['title' => 'Status', 'type' => 'select', 'required' => true, 'values' => ['active' => 'Active', 'disabled' => 'Disabled'] ],
'options' => ['title' => 'Options', 'type' => 'mapping', 'fullwidth' => true ],
diff --git a/resources/views/campaign/appdashboard.blade.php b/resources/views/campaign/appdashboard.blade.php
new file mode 100644
index 00000000..4e9c5037
--- /dev/null
+++ b/resources/views/campaign/appdashboard.blade.php
@@ -0,0 +1,194 @@
+
+
+
+ @include('layouts.shared/title-meta', ['title' => "Report"])
+ @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
+
+
+
+
+
+
}})
+
+
+
+
+
+
+
+
+
Campaign Dashboard
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@include('layouts.shared/footer-script')
+
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/campaign/appreport.blade.php b/resources/views/campaign/appreport.blade.php
index 32ae3f07..6118e587 100644
--- a/resources/views/campaign/appreport.blade.php
+++ b/resources/views/campaign/appreport.blade.php
@@ -7,8 +7,8 @@
-
-
Loading
+
+
@@ -24,93 +24,187 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
- @switch(true)
- @case($post->type == 'details')
-
-
- @if(isset($users))
-
-
-
- | User |
- Employee Code |
- Zone |
- Region |
- Area |
- Territory |
- Rank |
- Total Units |
- Total Points |
- @foreach($metrics as $metric)
- {{$metric->name}} Units |
- {{$metric->name}} Points |
- @endforeach
-
-
-
- @foreach($users as $user)
-
-  ? $user->user_info->avatar : ''}}) |
- {{ $user->user_info->name }} {{$user->user_info->designation}} |
- {{ isset($user->user_info->employee_code) ? $user->user_info->employee_code:''}} |
- {{ isset($user->user_info->positions->Zone) ? $user->user_info->positions->Zone : '-' }} |
- {{ isset($user->user_info->positions->Region) ? $user->user_info->positions->Region : '-' }} |
- {{ isset($user->user_info->positions->Area) ? $user->user_info->positions->Area : '-' }} |
- {{ isset($user->user_info->positions->Territory) ? $user->user_info->positions->Territory : '-' }} |
- {{ $user->rank }} |
- {{ $user->units }} |
- {{ $user->total }} |
- @foreach($metrics as $metric)
- {{ $user->metrics->{$metric->id} }} |
- {{ $user->metric_points->{$metric->id} }} |
- @endforeach
-
- @endforeach
-
-
- @endif
-
-
- @break
- @endswitch
-
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+ @switch(true)
+ @case($post->type == 'leaderboard')
+
+
+
+
+
+
+
+
+ @if(isset($users))
+
+
+
+ | Rank |
+ User |
+ Employee Code |
+ Zone |
+ Region |
+ Area |
+ Territory |
+
+ Total Units |
+ Total Points |
+
+
+
+
+ @foreach($users as $user)
+
+  |
+  ? $user->user_info->avatar : ''}}) |
+ {{ $user->user_info->name }} {{$user->user_info->designation}} |
+ {{ isset($user->user_info->employee_code) ? $user->user_info->employee_code:''}} |
+ {{ isset($user->user_info->positions->Zone) ? $user->user_info->positions->Zone : '-' }} |
+ {{ isset($user->user_info->positions->Region) ? $user->user_info->positions->Region : '-' }} |
+ {{ isset($user->user_info->positions->Area) ? $user->user_info->positions->Area : '-' }} |
+ {{ isset($user->user_info->positions->Territory) ? $user->user_info->positions->Territory : '-' }} |
+ {{ $user->units }} |
+ {{ $user->total }} |
+
+
+ @endforeach
+
+
+ @endif
+
+
+ @break
+ @case($post->type == 'details')
+
+
+ @if(isset($users))
+
+
+
+ | User |
+ Employee Code |
+ Zone |
+ Region |
+ Area |
+ Territory |
+ Rank |
+ Total Units |
+ Total Points |
+ @foreach($metrics as $metric)
+ {{$metric->name}} Units |
+ {{$metric->name}} Points |
+ @endforeach
+
+
+
+ @foreach($users as $user)
+
+  ? $user->user_info->avatar : ''}}) |
+ {{ $user->user_info->name }} {{$user->user_info->designation}} |
+ {{ isset($user->user_info->employee_code) ? $user->user_info->employee_code:''}} |
+ {{ isset($user->user_info->positions->Zone) ? $user->user_info->positions->Zone : '-' }} |
+ {{ isset($user->user_info->positions->Region) ? $user->user_info->positions->Region : '-' }} |
+ {{ isset($user->user_info->positions->Area) ? $user->user_info->positions->Area : '-' }} |
+ {{ isset($user->user_info->positions->Territory) ? $user->user_info->positions->Territory : '-' }} |
+ {{ $user->rank }} |
+ {{ $user->units }} |
+ {{ $user->total }} |
+ @foreach($metrics as $metric)
+ {{ isset($user->metrics->{$metric->id}) ? $user->metrics->{$metric->id} : '-' }} |
+ {{ isset($user->metric_points->{$metric->id}) ? $user->metric_points->{$metric->id} : '-' }} |
+ @endforeach
+
+ @endforeach
+
+
+ @endif
+
+
+ @break
+ @case($post->type == 'myteam')
+
+
+
+
+
+
+
+
+ @if(isset($users))
+
+
+
+ | Rank |
+ User |
+ Employee Code |
+ Zone |
+ Region |
+ Area |
+ Territory |
+
+ Total Units |
+ Total Points |
+
+
+
+
+ @foreach($users as $user)
+
+  |
+  ? $user->user_info->avatar : ''}}) |
+ {{ $user->user_info->name }} {{$user->user_info->designation}} |
+ {{ isset($user->user_info->employee_code) ? $user->user_info->employee_code:''}} |
+ {{ isset($user->user_info->positions->Zone) ? $user->user_info->positions->Zone : '-' }} |
+ {{ isset($user->user_info->positions->Region) ? $user->user_info->positions->Region : '-' }} |
+ {{ isset($user->user_info->positions->Area) ? $user->user_info->positions->Area : '-' }} |
+ {{ isset($user->user_info->positions->Territory) ? $user->user_info->positions->Territory : '-' }} |
+ {{ $user->units }} |
+ {{ $user->total }} |
+
+
+ @endforeach
+
+
+ @endif
+
+
+ @break
+ @endswitch
+
+
+
-
-
+
@@ -175,7 +285,22 @@
window.location.href = href.toString()
});
-
+ @if($post->type == 'leaderboard' || $post->type == 'myteam')
+ $('.leaderboard-next').click(function(){
+ $("#pageloader").fadeIn();
+ let href = new URL(window.location.href);
+ href.searchParams.delete('refresh')
+ href.searchParams.set('level', {{$users[0]->level}}-1 );
+ window.location.href = href.toString()
+ })
+ $('.leaderboard-prev').click(function(){
+ $("#pageloader").fadeIn();
+ let href = new URL(window.location.href);
+ href.searchParams.delete('refresh')
+ href.searchParams.set('level', {{$users[0]->level}}+1 );
+ window.location.href = href.toString()
+ })
+ @endif
$('#export').click(function(){
//$("#pageloader").fadeIn();
diff --git a/resources/views/campaign/dashboard.blade.php b/resources/views/campaign/dashboard.blade.php
new file mode 100644
index 00000000..4067795b
--- /dev/null
+++ b/resources/views/campaign/dashboard.blade.php
@@ -0,0 +1,193 @@
+@extends('layouts.vertical', ["page_title"=> "Dashboard", "mode" => $mode ?? "", "demo" => $demo ?? ""])
+
+@section('css')
+
+
+
+
+@endsection
+
+@section('content')
+
+
}})
+
+
+
+
+
+
+
+
+
Campaign Dashboard
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@endsection
+
+@section('script')
+
+
+
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/campaign/report.blade.php b/resources/views/campaign/report.blade.php
index 318a5073..c8e8a893 100644
--- a/resources/views/campaign/report.blade.php
+++ b/resources/views/campaign/report.blade.php
@@ -30,6 +30,13 @@
+
@@ -55,6 +62,54 @@
@switch(true)
+ @case($post->type == 'leaderboard')
+
+
+
+
+
+
+
+
+ @if(isset($users))
+
+
+
+ | Rank |
+ User |
+ Employee Code |
+ Zone |
+ Region |
+ Area |
+ Territory |
+
+ Total Units |
+ Total Points |
+
+
+
+
+ @foreach($users as $user)
+
+  |
+  ? $user->user_info->avatar : ''}}) |
+ {{ $user->user_info->name }} {{$user->user_info->designation}} |
+ {{ isset($user->user_info->employee_code) ? $user->user_info->employee_code:''}} |
+ {{ isset($user->user_info->positions->Zone) ? $user->user_info->positions->Zone : '-' }} |
+ {{ isset($user->user_info->positions->Region) ? $user->user_info->positions->Region : '-' }} |
+ {{ isset($user->user_info->positions->Area) ? $user->user_info->positions->Area : '-' }} |
+ {{ isset($user->user_info->positions->Territory) ? $user->user_info->positions->Territory : '-' }} |
+ {{ $user->units }} |
+ {{ $user->total }} |
+
+
+ @endforeach
+
+
+ @endif
+
+
+ @break
@case($post->type == 'details')
@@ -91,8 +146,8 @@
{{ $user->units }} |
{{ $user->total }} |
@foreach($metrics as $metric)
- {{ $user->metrics->{$metric->id} }} |
- {{ $user->metric_points->{$metric->id} }} |
+ {{ isset($user->metrics->{$metric->id}) ? $user->metrics->{$metric->id} : '-' }} |
+ {{ isset($user->metric_points->{$metric->id}) ? $user->metric_points->{$metric->id} : '-' }} |
@endforeach
@endforeach
@@ -102,6 +157,54 @@
@break
+ @case($post->type == 'myteam')
+
+
+
+
+
+
+
+
+ @if(isset($users))
+
+
+
+ | Rank |
+ User |
+ Employee Code |
+ Zone |
+ Region |
+ Area |
+ Territory |
+
+ Total Units |
+ Total Points |
+
+
+
+
+ @foreach($users as $user)
+
+  |
+  ? $user->user_info->avatar : ''}}) |
+ {{ $user->user_info->name }} {{$user->user_info->designation}} |
+ {{ isset($user->user_info->employee_code) ? $user->user_info->employee_code:''}} |
+ {{ isset($user->user_info->positions->Zone) ? $user->user_info->positions->Zone : '-' }} |
+ {{ isset($user->user_info->positions->Region) ? $user->user_info->positions->Region : '-' }} |
+ {{ isset($user->user_info->positions->Area) ? $user->user_info->positions->Area : '-' }} |
+ {{ isset($user->user_info->positions->Territory) ? $user->user_info->positions->Territory : '-' }} |
+ {{ $user->units }} |
+ {{ $user->total }} |
+
+
+ @endforeach
+
+
+ @endif
+
+
+ @break
@endswitch
@@ -180,7 +283,22 @@
window.location.href = href.toString()
});
-
+ @if($post->type == 'leaderboard' || $post->type == 'myteam')
+ $('.leaderboard-next').click(function(){
+ $("#pageloader").fadeIn();
+ let href = new URL(window.location.href);
+ href.searchParams.delete('refresh')
+ href.searchParams.set('level', {{$users[0]->level}}-1 );
+ window.location.href = href.toString()
+ })
+ $('.leaderboard-prev').click(function(){
+ $("#pageloader").fadeIn();
+ let href = new URL(window.location.href);
+ href.searchParams.delete('refresh')
+ href.searchParams.set('level', {{$users[0]->level}}+1 );
+ window.location.href = href.toString()
+ })
+ @endif
$('#export').click(function(){
//$("#pageloader").fadeIn();
diff --git a/resources/views/form/rapport-copd/1672032315-9b267137-4b81-425c-afb4-a4c0fa701372.blade.php b/resources/views/form/rapport-copd/1672032315-9b267137-4b81-425c-afb4-a4c0fa701372.blade.php
new file mode 100644
index 00000000..31deee2d
--- /dev/null
+++ b/resources/views/form/rapport-copd/1672032315-9b267137-4b81-425c-afb4-a4c0fa701372.blade.php
@@ -0,0 +1,295 @@
+
+
+
+ @include('layouts.shared/title-meta', ['title' => "Form"])
+ @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
+
+
+
+

+
+
+
+
+
+
+
+
+
+ @if(Session::has('error'))
{{Session::get('error')}}
+
@endif
+ @if(session('success'))
{{ session('success') }}
+
+
@endif
+
+
{{$form->title}}
+
+ @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
+
+ @endif
+
+ @php
+ $start = $month = strtotime('2023-01-01');
+ $end = strtotime('now');
+ $months = [];
+ while($month < $end)
+ {
+ $months[date('Y-m', $month)] = date('F Y', $month);
+ $month = strtotime("+1 month", $month);
+ }
+ krsort($months);
+
+ if( request()->get('month') ) {
+ $target = strtotime(request()->get('month').'-01');
+ } else {
+ $target = strtotime("now");
+ }
+ $history = Formhelper::getMultiformData($form->partition, $form->form_id, $form->user_id, date("m-01-Y", $target) , date("m-t-Y", $target) );
+
+ $contacts = [];
+ foreach($questions as $question) {
+ if($question->code == 'contact_id') {
+ $contacts = $question->options;
+ }
+ }
+ foreach($contacts as &$contact) {
+ $contact->duova_rx = 0;
+ $contact->glycohale_fb_rx = 0;
+ $contact->maxiflo_rx = 0;
+ $contact->maxiflo_sb_rx = 0;
+ $contact->nistami_rx = 0;
+ $contact->tiova_rx = 0;
+ $contact->tiova_sb_rx = 0;
+ $contact->triohale_rx = 0;
+
+ if(sizeof($history->data->submissions) > 0) {
+ foreach($history->data->submissions as $sub){
+ if($contact->display == $sub->formdata->contact_id) {
+ $contact->duova_rx += (int)$sub->formdata->duova_rx;
+ $contact->glycohale_fb_rx += (int)$sub->formdata->glycohale_fb_rx;
+ $contact->maxiflo_rx += (int)$sub->formdata->maxiflo_rx;
+ $contact->maxiflo_sb_rx += (int)$sub->formdata->maxiflo_sb_rx;
+ $contact->nistami_rx += (int)$sub->formdata->nistami_rx;
+ $contact->tiova_rx += (int)$sub->formdata->tiova_rx;
+ $contact->tiova_sb_rx += (int)$sub->formdata->tiova_sb_rx;
+ $contact->triohale_rx += (int)$sub->formdata->triohale_rx;
+ }
+ }
+ }
+ }
+ //echo '
'; print_r($contacts); exit;
+ @endphp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | Action |
+ Doctor |
+ Powerof5 ? |
+ Duova Rx |
+ Glycohale FB Rx |
+ Maxiflo Rx |
+ Maxiflo SB Rx |
+ Nistami Rx |
+ Tiova Rx |
+ Tiova SB Rx |
+ Triohale Rx |
+
+
+
+ @foreach($contacts as $contact)
+
+ |
+
+ |
+ {{$contact->display}} |
+ {{isset($contact->contact->powerof5) ? $contact->contact->powerof5 : 'No'}} |
+ {{$contact->duova_rx}} |
+ {{$contact->glycohale_fb_rx}} |
+ {{$contact->maxiflo_rx}} |
+ {{$contact->maxiflo_sb_rx}} |
+ {{$contact->nistami_rx}} |
+ {{$contact->tiova_rx}} |
+ {{$contact->tiova_sb_rx}} |
+ {{$contact->triohale_rx}} |
+
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@include('layouts.shared/footer-script')
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/form/1655458548-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac8.blade.php b/resources/views/form/rapport-copd/1672036604-d4ed0839-6516-4aba-89c9-3bd4d01aa26f.blade copy.php
similarity index 68%
rename from resources/views/form/1655458548-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac8.blade.php
rename to resources/views/form/rapport-copd/1672036604-d4ed0839-6516-4aba-89c9-3bd4d01aa26f.blade copy.php
index 48a3a77c..3ebd5154 100644
--- a/resources/views/form/1655458548-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac8.blade.php
+++ b/resources/views/form/rapport-copd/1672036604-d4ed0839-6516-4aba-89c9-3bd4d01aa26f.blade copy.php
@@ -27,67 +27,30 @@
@if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
@endif
-
- @php
- $history = Formhelper::getMultiformData( $form->partition, $form_id, $form->user_id);
- $histories = [];
- $date = '';
- foreach($history->data->submissions as $sub) {
- $sub->formdata->id = $sub->id;
- $histories[] = $sub->formdata;
- }
- @endphp
-
-
-
-
-
-
-
-
- | Action |
- Plan Date |
- Team Name |
- Type of meeting |
- Execution Date |
- Name of speaker |
- MSL Code |
- No. og Doctors/Paramedics attended |
-
-
-
- @foreach($histories as $his)
-
- |
-
- |
- {{$his->record_date}} |
- {{$his->team_name}} |
- {{$his->type_of_meeting}} |
- {{$his->execution_date}} |
- {{$his->name_of_the_speaker}} |
- {{$his->msl_code}} |
- {{$his->attendence}} |
-
- @endforeach
-
-
-
-
-
-
-
-
-
@endforeach
@@ -168,9 +144,31 @@
diff --git a/resources/views/form/rapport-copd/1672036604-d4ed0839-6516-4aba-89c9-3bd4d01aa26f.blade.php b/resources/views/form/rapport-copd/1672036604-d4ed0839-6516-4aba-89c9-3bd4d01aa26f.blade.php
new file mode 100644
index 00000000..027b8289
--- /dev/null
+++ b/resources/views/form/rapport-copd/1672036604-d4ed0839-6516-4aba-89c9-3bd4d01aa26f.blade.php
@@ -0,0 +1,291 @@
+
+
+
+ @include('layouts.shared/title-meta', ['title' => "Form"])
+ @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
+
+
+
+

+
+
+
+
+
+
+
+
+
+ @if(Session::has('error'))
{{Session::get('error')}}
+
@endif
+ @if(session('success'))
{{ session('success') }}
+
+
@endif
+
+
{{$form->title}}
+
+ @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
+
+ @endif
+
+ @php
+ $start = $month = strtotime('2023-01-01');
+ $end = strtotime('now');
+ $months = [];
+ while($month < $end)
+ {
+ $months[date('Y-m', $month)] = date('F Y', $month);
+ $month = strtotime("+1 month", $month);
+ }
+ krsort($months);
+
+ if( request()->get('month') ) {
+ $target = strtotime(request()->get('month').'-01');
+ } else {
+ $target = strtotime("now");
+ }
+ $history = Formhelper::getMultiformData($form->partition, $form->form_id, $form->user_id, date("m-01-Y", $target) , date("m-t-Y", $target) );
+
+ $contacts = [];
+ foreach($questions as $question) {
+ if($question->code == 'contact_id') {
+ $contacts = $question->options;
+ }
+ }
+ foreach($contacts as &$contact) {
+ $contact->tiova = 0;
+ $contact->duova = 0;
+ $contact->triohale = 0;
+ $contact->nistami = 0;
+ $contact->glycohale_fb = 0;
+ $contact->maxiflo = 0;
+ $contact->maxiflo_sb = 0;
+ $contact->tiova_synchrobreathe = 0;
+
+ if(sizeof($history->data->submissions) > 0) {
+ foreach($history->data->submissions as $sub){
+ if($contact->display == $sub->formdata->contact_id) {
+ $contact->{$sub->formdata->brand_name} += 1;
+ }
+ }
+ }
+ }
+ //echo '
'; print_r($contacts); exit;
+ @endphp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | Action |
+ Doctor |
+ Powerof5 ? |
+ Tiova |
+ Duova |
+ Triohale |
+ Nistami |
+ Glycohale FB |
+ Maxiflo |
+ Maxiflo SB |
+ Tiova Synchrobreathe |
+
+
+
+ @foreach($contacts as $contact)
+
+ |
+
+ |
+ {{$contact->display}} |
+ {{isset($contact->contact->powerof5) ? $contact->contact->powerof5 : 'No'}} |
+ {{$contact->tiova}} |
+ {{$contact->duova}} |
+ {{$contact->triohale}} |
+ {{$contact->nistami}} |
+ {{$contact->glycohale_fb}} |
+ {{$contact->maxiflo}} |
+ {{$contact->maxiflo_sb}} |
+ {{$contact->tiova_synchrobreathe}} |
+
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@include('layouts.shared/footer-script')
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/form/rapport-nucron/1672744157-08d41020-dafe-4557-ac03-25f718648feb.blade.php b/resources/views/form/rapport-nucron/1672744157-08d41020-dafe-4557-ac03-25f718648feb.blade.php
new file mode 100644
index 00000000..18ffe7a8
--- /dev/null
+++ b/resources/views/form/rapport-nucron/1672744157-08d41020-dafe-4557-ac03-25f718648feb.blade.php
@@ -0,0 +1,226 @@
+
+
+
+ @include('layouts.shared/title-meta', ['title' => "Form"])
+ @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
+
+
+
+

+
+
+
+
+
+
+
+
+
+ @if(Session::has('error'))
{{Session::get('error')}}
+
@endif
+ @if(session('success'))
{{ session('success') }}
+
+
@endif
+
+
{{$form->title}}
+
+ @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
+
+ @endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@include('layouts.shared/footer-script')
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/form/rapport-nucron/1672744928-44f4949c-cd5f-4922-9292-a7041a980188.blade.php b/resources/views/form/rapport-nucron/1672744928-44f4949c-cd5f-4922-9292-a7041a980188.blade.php
new file mode 100644
index 00000000..31d1178d
--- /dev/null
+++ b/resources/views/form/rapport-nucron/1672744928-44f4949c-cd5f-4922-9292-a7041a980188.blade.php
@@ -0,0 +1,211 @@
+
+
+
+ @include('layouts.shared/title-meta', ['title' => "Form"])
+ @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
+
+
+
+

+
+
+
+
+
+
+
+
+
+ @if(Session::has('error'))
{{Session::get('error')}}
+
@endif
+ @if(session('success'))
{{ session('success') }}
+
+
@endif
+
+
{{$form->title}}
+
+ @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
+
+ @endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@include('layouts.shared/footer-script')
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/form/rapport-nucron/1672807625-8217d2d3-3832-4686-859d-ec5a277c7b24.blade.php b/resources/views/form/rapport-nucron/1672807625-8217d2d3-3832-4686-859d-ec5a277c7b24.blade.php
new file mode 100644
index 00000000..03afb754
--- /dev/null
+++ b/resources/views/form/rapport-nucron/1672807625-8217d2d3-3832-4686-859d-ec5a277c7b24.blade.php
@@ -0,0 +1,211 @@
+
+
+
+ @include('layouts.shared/title-meta', ['title' => "Form"])
+ @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
+
+
+
+

+
+
+
+
+
+
+
+
+
+ @if(Session::has('error'))
{{Session::get('error')}}
+
@endif
+ @if(session('success'))
{{ session('success') }}
+
+
@endif
+
+
{{$form->title}}
+
+ @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
+
+ @endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@include('layouts.shared/footer-script')
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/form/rapport-nucron/1672808391-a35fbd00-fbc8-40a6-ad40-6172011c546e.blade.php b/resources/views/form/rapport-nucron/1672808391-a35fbd00-fbc8-40a6-ad40-6172011c546e.blade.php
new file mode 100644
index 00000000..31d1178d
--- /dev/null
+++ b/resources/views/form/rapport-nucron/1672808391-a35fbd00-fbc8-40a6-ad40-6172011c546e.blade.php
@@ -0,0 +1,211 @@
+
+
+
+ @include('layouts.shared/title-meta', ['title' => "Form"])
+ @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
+
+
+
+

+
+
+
+
+
+
+
+
+
+ @if(Session::has('error'))
{{Session::get('error')}}
+
@endif
+ @if(session('success'))
{{ session('success') }}
+
+
@endif
+
+
{{$form->title}}
+
+ @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
+
+ @endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@include('layouts.shared/footer-script')
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/form/rapport-team3/1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php b/resources/views/form/rapport-team3/1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php
new file mode 100644
index 00000000..c429d65d
--- /dev/null
+++ b/resources/views/form/rapport-team3/1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php
@@ -0,0 +1,325 @@
+
+
+
+ @include('layouts.shared/title-meta', ['title' => "Form"])
+ @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
+
+
+
+

+
+
+
+
+
+
+
+
+
+ @if(Session::has('error'))
{{Session::get('error')}}
+
@endif
+ @if(session('success'))
{{ session('success') }}
+
+
@endif
+
+
{{$form->title}}
+
+
+ @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
+
+ @if($form->link_type == 'form')
+
+
+ @else
+
Back
+ @endif
+
+ @endif
+
+ @php
+ $history = Formhelper::getMultiformData($form->partition, $form->form_id, $form->user_id);
+ @endphp
+
+
+
+
+
+
+
+
+ | Action |
+ Execution Done |
+ Plan Date |
+ Team Name |
+ Type of meeting |
+ Execution Date |
+ Name of speaker |
+ MSL Code |
+ No. og Doctors/Paramedics attended |
+
+
+
+ @foreach($history->data->submissions as $sub)
+ @php
+ $sub->formdata->id = $sub->id;
+ @endphp
+
+ |
+
+ |
+ {{(isset($sub->formdata->record_date) && $sub->formdata->record_date > 0) ?'Yes':'No' }} |
+ {{$sub->formdata->plan_date}} |
+ {{$sub->formdata->team_name}} |
+ {{$sub->formdata->type_of_meeting}} |
+ {{$sub->formdata->record_date}} |
+ {{$sub->formdata->name_of_the_speaker}} |
+ {{$sub->formdata->msl_code}} |
+ {{$sub->formdata->attendence}} |
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@include('layouts.shared/footer-script')
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/form/rapport-team3/1655458544-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac4.blade.php b/resources/views/form/rapport-team3/1655458544-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac4.blade.php
new file mode 100644
index 00000000..c429d65d
--- /dev/null
+++ b/resources/views/form/rapport-team3/1655458544-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac4.blade.php
@@ -0,0 +1,325 @@
+
+
+
+ @include('layouts.shared/title-meta', ['title' => "Form"])
+ @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
+
+
+
+

+
+
+
+
+
+
+
+
+
+ @if(Session::has('error'))
{{Session::get('error')}}
+
@endif
+ @if(session('success'))
{{ session('success') }}
+
+
@endif
+
+
{{$form->title}}
+
+
+ @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
+
+ @if($form->link_type == 'form')
+
+
+ @else
+
Back
+ @endif
+
+ @endif
+
+ @php
+ $history = Formhelper::getMultiformData($form->partition, $form->form_id, $form->user_id);
+ @endphp
+
+
+
+
+
+
+
+
+ | Action |
+ Execution Done |
+ Plan Date |
+ Team Name |
+ Type of meeting |
+ Execution Date |
+ Name of speaker |
+ MSL Code |
+ No. og Doctors/Paramedics attended |
+
+
+
+ @foreach($history->data->submissions as $sub)
+ @php
+ $sub->formdata->id = $sub->id;
+ @endphp
+
+ |
+
+ |
+ {{(isset($sub->formdata->record_date) && $sub->formdata->record_date > 0) ?'Yes':'No' }} |
+ {{$sub->formdata->plan_date}} |
+ {{$sub->formdata->team_name}} |
+ {{$sub->formdata->type_of_meeting}} |
+ {{$sub->formdata->record_date}} |
+ {{$sub->formdata->name_of_the_speaker}} |
+ {{$sub->formdata->msl_code}} |
+ {{$sub->formdata->attendence}} |
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@include('layouts.shared/footer-script')
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/form/rapport-team3/1655458548-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac8.blade.php b/resources/views/form/rapport-team3/1655458548-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac8.blade.php
new file mode 100644
index 00000000..c429d65d
--- /dev/null
+++ b/resources/views/form/rapport-team3/1655458548-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac8.blade.php
@@ -0,0 +1,325 @@
+
+
+
+ @include('layouts.shared/title-meta', ['title' => "Form"])
+ @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
+
+
+
+

+
+
+
+
+
+
+
+
+
+ @if(Session::has('error'))
{{Session::get('error')}}
+
@endif
+ @if(session('success'))
{{ session('success') }}
+
+
@endif
+
+
{{$form->title}}
+
+
+ @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
+
+ @if($form->link_type == 'form')
+
+
+ @else
+
Back
+ @endif
+
+ @endif
+
+ @php
+ $history = Formhelper::getMultiformData($form->partition, $form->form_id, $form->user_id);
+ @endphp
+
+
+
+
+
+
+
+
+ | Action |
+ Execution Done |
+ Plan Date |
+ Team Name |
+ Type of meeting |
+ Execution Date |
+ Name of speaker |
+ MSL Code |
+ No. og Doctors/Paramedics attended |
+
+
+
+ @foreach($history->data->submissions as $sub)
+ @php
+ $sub->formdata->id = $sub->id;
+ @endphp
+
+ |
+
+ |
+ {{(isset($sub->formdata->record_date) && $sub->formdata->record_date > 0) ?'Yes':'No' }} |
+ {{$sub->formdata->plan_date}} |
+ {{$sub->formdata->team_name}} |
+ {{$sub->formdata->type_of_meeting}} |
+ {{$sub->formdata->record_date}} |
+ {{$sub->formdata->name_of_the_speaker}} |
+ {{$sub->formdata->msl_code}} |
+ {{$sub->formdata->attendence}} |
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@include('layouts.shared/footer-script')
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/form/rapport-team3/1655876175-d3742341-6728-4863-a938-6f914869dd94.blade.php b/resources/views/form/rapport-team3/1655876175-d3742341-6728-4863-a938-6f914869dd94.blade.php
new file mode 100644
index 00000000..e19f65d2
--- /dev/null
+++ b/resources/views/form/rapport-team3/1655876175-d3742341-6728-4863-a938-6f914869dd94.blade.php
@@ -0,0 +1,318 @@
+
+
+
+ @include('layouts.shared/title-meta', ['title' => "Form"])
+ @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
+
+
+
+

+
+
+
+
+
+
+
+
+
+ @if(Session::has('error'))
{{Session::get('error')}}
+
@endif
+ @if(session('success'))
{{ session('success') }}
+
+
@endif
+
+
{{$form->title}}
+
+
+ @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
+
+ @if($form->link_type == 'form')
+
+
+ @else
+
Back
+ @endif
+
+ @endif
+
+ @php
+ $history = Formhelper::getMultiformData($form->partition, $form->form_id, $form->user_id);
+ @endphp
+
+
+
+
+
+
+
+
+ | Action |
+ Execution Done |
+ Tour |
+ Plan Date |
+ Execution Date |
+ Total POB |
+
+
+
+ @foreach($history->data->submissions as $sub)
+ @php
+ $sub->formdata->id = $sub->id;
+ @endphp
+
+ |
+
+ |
+ {{(isset($sub->formdata->record_date) && $sub->formdata->record_date > 0) ?'Yes':'No' }} |
+ {{$sub->formdata->tour}} |
+ {{$sub->formdata->plan_date}} |
+ {{$sub->formdata->record_date}} |
+ {{$sub->formdata->total_pob}} |
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@include('layouts.shared/footer-script')
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/form/rapport-team3/1672205980-2d6bd93c-4834-4737-b510-a6729d108b1c.blade.php b/resources/views/form/rapport-team3/1672205980-2d6bd93c-4834-4737-b510-a6729d108b1c.blade.php
new file mode 100644
index 00000000..2b0d630b
--- /dev/null
+++ b/resources/views/form/rapport-team3/1672205980-2d6bd93c-4834-4737-b510-a6729d108b1c.blade.php
@@ -0,0 +1,201 @@
+
+
+
+ @include('layouts.shared/title-meta', ['title' => "Form"])
+ @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
+
+
+
+

+
+
+
+
+
+
+
+
+
+ @if(Session::has('error'))
{{Session::get('error')}}
+
@endif
+ @if(session('success'))
{{ session('success') }}
+
+
@endif
+
+
{{$form->title}}
+
+ @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
+
+ @endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@include('layouts.shared/footer-script')
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/form/rapport-team3/1672725182-7dfd3086-d7c4-4f58-a119-b141ef02541d.blade.php b/resources/views/form/rapport-team3/1672725182-7dfd3086-d7c4-4f58-a119-b141ef02541d.blade.php
new file mode 100644
index 00000000..d3c03400
--- /dev/null
+++ b/resources/views/form/rapport-team3/1672725182-7dfd3086-d7c4-4f58-a119-b141ef02541d.blade.php
@@ -0,0 +1,216 @@
+
+
+
+ @include('layouts.shared/title-meta', ['title' => "Form"])
+ @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
+
+
+
+

+
+
+
+
+
+
+
+
+
+ @if(Session::has('error'))
{{Session::get('error')}}
+
@endif
+ @if(session('success'))
{{ session('success') }}
+
+
@endif
+
+
{{$form->title}}
+
+ @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
+
+ @endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@include('layouts.shared/footer-script')
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/form/rapport-vitalis1/1659513453-1f5e2584-fb76-4075-b040-6sg6e34a5423.blade.php b/resources/views/form/rapport-vitalis1/1659513453-1f5e2584-fb76-4075-b040-6sg6e34a5423.blade.php
index 5f240d29..e33d00ba 100644
--- a/resources/views/form/rapport-vitalis1/1659513453-1f5e2584-fb76-4075-b040-6sg6e34a5423.blade.php
+++ b/resources/views/form/rapport-vitalis1/1659513453-1f5e2584-fb76-4075-b040-6sg6e34a5423.blade.php
@@ -15,7 +15,6 @@
-
@if(Session::has('error'))
{{Session::get('error')}}
@endif
@if(session('success'))
{{ session('success') }}
@@ -39,6 +38,18 @@
@if($id)
@endif
+ @if(isset($form->manager_can_submit) && (bool)$form->manager_can_submit)
+
+
+
+
+ @endif
+
@foreach($questions as $question)
@@ -122,11 +133,17 @@
jQuery(document).ready(function($){
$('#report-form input').parent().find('.col-md-12').hide()
$('#field-customer_type').parent().show()
+ $('#field-user_id').parent().show()
+ $('#field-pob_arni_50mg,#field-pob_arni_100mg,#field-pob_arni_200mg').change(function(){
+ $('#field-pob_total').val( parseInt($('#field-pob_arni_50mg').val()) + parseInt($('#field-pob_arni_100mg').val()) + parseInt($('#field-pob_arni_200mg').val()) )
+ })
+
$('#field-customer_type').change(function(){
$('#report-form input').parent().find('.col-md-12').hide()
$('#field-customer_type').parent().show()
- console.log($(this).val())
+ $('#field-user_id').parent().show()
+
if($(this).val() == 'Doctor') {
$('#field-doctor_name').parent().show()
$('#field-brand_selected').parent().show()
@@ -148,6 +165,25 @@
$('#report-form input:visible').prop('required',true)
})
+ $('#field-user_id').change(function(){
+ let hierarchy = $('option:selected', this).attr('hierarchy');
+ event.preventDefault();
+ $.ajax({
+ type: "GET",
+ url: '/form/getdoctorlist?partition={{$form->partition}}&hierarchy='+hierarchy,
+ processData: false,
+ contentType: false,
+ success: function( data ) {
+ $("#pageloader").fadeOut();
+ $('#field-doctor_name').html('')
+ $('#field-doctor_name').append($("
").attr("value",'').text('-- Select --'));
+ for(let itm of data) {
+ $('#field-doctor_name').append($("
").attr("value",itm.value).text(itm.display));
+ }
+ },
+ });
+ })
+
$('#report-form').on('submit', function(event){
event.preventDefault();
$("#pageloader").fadeIn();
diff --git a/resources/views/form/rapport-vitalis1/1673857541-fe4fef4b-6b1c-4326-96ec-f71634ee91db.blade.php b/resources/views/form/rapport-vitalis1/1673857541-fe4fef4b-6b1c-4326-96ec-f71634ee91db.blade.php
new file mode 100644
index 00000000..ed90c93b
--- /dev/null
+++ b/resources/views/form/rapport-vitalis1/1673857541-fe4fef4b-6b1c-4326-96ec-f71634ee91db.blade.php
@@ -0,0 +1,222 @@
+
+
+
+ @include('layouts.shared/title-meta', ['title' => "Form"])
+ @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
+
+
+
+

+
+
+
+
+
+
+
+
+ @if(Session::has('error'))
{{Session::get('error')}}
+
@endif
+ @if(session('success'))
{{ session('success') }}
+
+
@endif
+
+
{{$form->title}}
+
+ @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
+
+ @endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@include('layouts.shared/footer-script')
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php
index aabe58d2..a3192604 100755
--- a/resources/views/index.blade.php
+++ b/resources/views/index.blade.php
@@ -93,6 +93,7 @@
diff --git a/resources/views/layouts/shared/left-sidebar.blade.php b/resources/views/layouts/shared/left-sidebar.blade.php
index 5842d6c5..200bb8fd 100755
--- a/resources/views/layouts/shared/left-sidebar.blade.php
+++ b/resources/views/layouts/shared/left-sidebar.blade.php
@@ -29,9 +29,8 @@