From 2fbe2cefc3079c309a0d421c7ee6c6b5b77d51f2 Mon Sep 17 00:00:00 2001 From: Tanuja Pansare Date: Thu, 3 Sep 2026 17:13:12 +0530 Subject: [PATCH 01/11] Team 3 Doctor Activities for Neb 2 form changes --- ...e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php | 44 ++++++++++++++----- 1 file changed, 34 insertions(+), 10 deletions(-) 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 index dd543459..7b544e0c 100644 --- 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 @@ -116,7 +116,7 @@ @endif @foreach ($questions as $question) - @if (in_array($question->code, ['record_date', 'name_of_the_speaker', 'msl_code', 'attendence','speciality','honorarium_amount','other_expenses','total_eas','no_of_patients_on_duolin','no_of_units_duolin_respules','other_msl_code','other_speciality'])) + @if (in_array($question->code, ['record_date', 'name_of_the_speaker', 'msl_code', 'attendence','speciality','honorarium_amount','other_expenses','total_eas','no_of_patients_on_duolin','no_of_units_duolin_respules','other_msl_code','other_speciality','other_speaker_name'])) @continue @endif
@@ -247,6 +247,21 @@ @endif @endforeach + + @elseif ($question->code == 'other_speaker_name') + @foreach ($question->options as $option) + @if( + !isset($option->contact->doctor_activities_for_neb_2_top_30_next_30_doctors) || + $option->contact->doctor_activities_for_neb_2_top_30_next_30_doctors === null + ) + + @endif + @endforeach + @else @foreach ($question->options as $option)
@endif @foreach ($questions as $question) - @if (in_array($question->code, ['record_date', 'name_of_the_speaker', 'msl_code', 'attendence','speciality','honorarium_amount','other_expenses','total_eas','no_of_patients_on_duolin','no_of_units_duolin_respules','other_msl_code','other_speciality','other_speaker_name'])) + @if (in_array($question->code, ['record_date', 'attendence','honorarium_amount','other_expenses','total_eas','no_of_patients_on_duolin','no_of_units_duolin_respules'])) @continue @endif
@@ -155,14 +155,40 @@ @break @case('dropdown') - required == 'yes' ? 'required' : '' }}> - @foreach ($question->options as $option) - - @endforeach + @if ($question->code == 'name_of_the_speaker') + @foreach ($question->options as $option) + @if( isset($option->contact->doctor_activities_for_neb_2_top_30_next_30_doctors) && $option->contact->doctor_activities_for_neb_2_top_30_next_30_doctors == 'Yes' ) + + @endif + @endforeach + + + @elseif ($question->code == 'other_speaker_name') + @foreach ($question->options as $option) + @if(!isset($option->contact->doctor_activities_for_neb_2_top_30_next_30_doctors) || + $option->contact->doctor_activities_for_neb_2_top_30_next_30_doctors === null + ) + + @endif + @endforeach + + @else + @foreach ($question->options as $option) + + @endforeach + @endif @break @@ -235,41 +261,40 @@ @case('dropdown') + {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }}> + {{ $option->display }} + + @endif + @endforeach + + @else + @foreach ($question->options as $option) + + @endforeach + @endif + @break @case('checkbox') @@ -393,6 +418,47 @@ $('#execution-form-wrapper').hide() }) + + $('#field-msl_code,#field-speciality,#field-other_msl_code,#field-other_speciality').attr('readonly',true); + + $('#field-name_of_the_speaker').change(function() { + let value=$(this).val(); + if(value==='other'){ + $('#field-other_msl_code,#field-other_speciality,#field-other_speaker_name').parent().show(); + $('#field-other_msl_code,#field-other_speciality,#field-other_speaker_name').attr('required',true); + + $('#field-msl_code,#field-speciality').parent().hide(); + $('#field-msl_code,#field-speciality').attr('required',false); + } + else{ + $('#field-other_msl_code,#field-other_speciality,#field-other_speaker_name').parent().hide(); + $('#field-other_msl_code,#field-other_speciality,#field-other_speaker_name').attr('required',false); + $('#field-msl_code,#field-speciality').parent().show(); + $('#field-msl_code,#field-speciality').attr('required',true); + } + }) + + $('#field-other_msl_code,#field-other_speciality,#field-other_speaker_name').parent().hide(); + $('#field-other_msl_code,#field-other_speciality,#field-other_speaker_name').attr('required',false); + + $('#field-name_of_the_speaker').change(function() { + $('#field-msl_code').val($('option:selected', this).attr('msl_code')) + }) + + $('#field-name_of_the_speaker').change(function() { + $('#field-speciality').val($('option:selected', this).attr('speciality')) + }) + + $('#field-other_speaker_name').change(function() { + $('#field-other_msl_code').val($('option:selected', this).attr('msl_code')) + }) + + $('#field-other_speaker_name').change(function() { + $('#field-other_speciality').val($('option:selected', this).attr('speciality')) + }) + + + $('.edit-btn').click(function() { let selected = JSON.parse($(this).attr('plan_details')) /*for (let k of Object.keys(selected)) { @@ -450,7 +516,7 @@ let type_of_meet=$('#execution-type_of_meeting').val(); console.log("Type of Meet without change",type_of_meet); - if(type_of_meet==='Asthma camp'){ + if(type_of_meet==='GNP Camp'){ $('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').parent().show(); $('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').attr('required',true); $('label[for="execution-name_of_the_speaker"]').html('Name of the Speaker (Pedia or GP only) '); @@ -463,26 +529,11 @@ } - $('#execution-name_of_the_speaker').change(function() { - $('#execution-msl_code').val($('option:selected', this).attr('msl_code')) - }) - $('#execution-name_of_the_speaker').change(function() { - $('#execution-speciality').val($('option:selected', this).attr('speciality')) - }) - - $('#execution-other_speaker_name').change(function() { - $('#execution-other_msl_code').val($('option:selected', this).attr('msl_code')) - }) - - $('#execution-other_speaker_name').change(function() { - $('#execution-other_speciality').val($('option:selected', this).attr('speciality')) - }) - }) - $('#execution-msl_code,#execution-speciality,#execution-other_msl_code,#execution-other_speciality').attr('readonly',true); + $('#execution-msl_code,#execution-speciality,#execution-other_msl_code,#execution-other_speciality').attr('readonly',true); - $('#execution-name_of_the_speaker').change(function() { + $('#execution-name_of_the_speaker').change(function() { let value=$(this).val(); if(value==='other'){ $('#execution-other_msl_code,#execution-other_speciality,#execution-other_speaker_name').parent().show(); @@ -497,7 +548,7 @@ $('#execution-msl_code,#execution-speciality').parent().show(); $('#execution-msl_code,#execution-speciality').attr('required',true); } - }) + }) jQuery(document).ready(function($) { $('#field-user_id').change(function(){ diff --git a/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php b/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php new file mode 100644 index 00000000..7b22617a --- /dev/null +++ b/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php @@ -0,0 +1,450 @@ + + + + + @include('layouts.shared/title-meta', ['title' => "Form"]) + @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? '']) + + + +
+ processing... +
+ + + +@php +// echo "
";
+// print_r($submitted_formdata);
+// echo "
"; +$skuData = []; + +foreach($questions as $q){ + if($q->code === 'sku'){ + foreach($q->options as $opt){ + $skuData[$opt->value] = $opt->submitted_value ?? 0; + } + } +} + +@endphp + + + + + + + + @include('layouts.shared/footer-script') + + + + + + \ No newline at end of file From 5b80c8a571dd4d170050e04cc25c1ad3a4547f58 Mon Sep 17 00:00:00 2001 From: Tanuja Pansare Date: Thu, 3 Sep 2026 17:42:59 +0530 Subject: [PATCH 03/11] Team 3 Doctor Activities for Neb 2 form changes 2 --- ...e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php | 451 +----------------- 1 file changed, 1 insertion(+), 450 deletions(-) diff --git a/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php b/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php index 7b22617a..4de2f126 100644 --- a/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php +++ b/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php @@ -1,450 +1 @@ - - - - - @include('layouts.shared/title-meta', ['title' => "Form"]) - @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? '']) - - - -
- processing... -
- - - -@php -// echo "
";
-// print_r($submitted_formdata);
-// echo "
"; -$skuData = []; - -foreach($questions as $q){ - if($q->code === 'sku'){ - foreach($q->options as $opt){ - $skuData[$opt->value] = $opt->submitted_value ?? 0; - } - } -} - -@endphp - - - - - - - - @include('layouts.shared/footer-script') - - - - - - \ No newline at end of file +preview \ No newline at end of file From 4a0bcda7e9942b6c5f72011a12fa0ca20f9ca348 Mon Sep 17 00:00:00 2001 From: Tanuja Pansare Date: Thu, 3 Sep 2026 17:47:12 +0530 Subject: [PATCH 04/11] Team 3 Doctor Activities for Neb 2 form changes 3 --- ...e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php | 280 +++++++++++++++++- 1 file changed, 279 insertions(+), 1 deletion(-) diff --git a/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php b/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php index 4de2f126..4f8e721b 100644 --- a/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php +++ b/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php @@ -1 +1,279 @@ -preview \ No newline at end of file + + + + @include('layouts.shared/title-meta', ['title' => "Form"]) + @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? '']) + + +
+ processing... +
+ + + + +@include('layouts.shared/footer-script') + + + + + \ No newline at end of file From b83850aa3701c8b28cd9094b6576ca7369af3dde Mon Sep 17 00:00:00 2001 From: Tanuja Pansare Date: Thu, 3 Sep 2026 17:50:26 +0530 Subject: [PATCH 05/11] Team 3 Doctor Activities for Neb 2 form changes 3 --- ...w-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php b/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php index 4f8e721b..15c2bbdd 100644 --- a/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php +++ b/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php @@ -58,6 +58,9 @@ @endif @foreach($questions as $question) + @if (in_array($question->code, ['record_date', 'attendence','honorarium_amount','other_expenses','total_eas','no_of_patients_on_duolin','no_of_units_duolin_respules'])) + @continue + @endif
@switch($question->type) From 9ea61fd5cc167f8d1840dc71917bc7cdb7c30f91 Mon Sep 17 00:00:00 2001 From: Tanuja Pansare Date: Thu, 3 Sep 2026 17:53:32 +0530 Subject: [PATCH 06/11] Team 3 Doctor Activities for Neb 2 form changes 3 --- ...e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php | 623 +++++++++++++----- 1 file changed, 462 insertions(+), 161 deletions(-) diff --git a/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php b/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php index 15c2bbdd..d8311a42 100644 --- a/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php +++ b/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php @@ -1,13 +1,124 @@ + @include('layouts.shared/title-meta', ['title' => "Form"]) @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? '']) +
- processing... + processing...
+@php +$brandData = [ + +['brand'=>'JUNIOR LANZOL 15', 'slug'=>'junior_lanzol_15_units','pseudoId'=>'junior_lanzol_15_value'], +['brand'=>'JUNIOR LANZOL 30', 'slug'=>'junior_lanzol_30_units','pseudoId'=>'junior_lanzol_30_value'], +['brand'=>"LEVOFLOX 250 (10'S) IP", 'slug'=>'levoflox_250_10s_ip_units','pseudoId'=>'levoflox_250_10s_ip_value'], +['brand'=>"LEVOFLOX 250 TAB 10'", 'slug'=>'levoflox_250_tab_10_units','pseudoId'=>'levoflox_250_tab_10_value'], +['brand'=>"LEVOFLOX 500 (10'S) IP", 'slug'=>'levoflox_500_10s_ip_units','pseudoId'=>'levoflox_500_10s_ip_value'], +['brand'=>"LEVOFLOX 500 10'S", 'slug'=>'levoflox_500_10s_units','pseudoId'=>'levoflox_500_10s_value'], +['brand'=>"LEVOFLOX 750 (5'S) IP", 'slug'=>'levoflox_750_5s_ip_units','pseudoId'=>'levoflox_750_5s_ip_value'], +['brand'=>"LEVOFLOX 750 TAB 5'S", 'slug'=>'levoflox_750_tab_5s_units','pseudoId'=>'levoflox_750_tab_5s_value'], +['brand'=>'LEVOFLOX INFUSION', 'slug'=>'levoflox_infusion_units','pseudoId'=>'levoflox_infusion_value'], +['brand'=>'METASPRAY 100AQ', 'slug'=>'metaspray_100aq_units','pseudoId'=>'metaspray_100aq_value'], + +['brand'=>'MONTAIR FX', 'slug'=>'montair_fx_units','pseudoId'=>'montair_fx_value'], +['brand'=>'Montair FX 15s', 'slug'=>'montair_fx_15s_units','pseudoId'=>'montair_fx_15s_value'], +['brand'=>'CEFOPROX 100 30ML(60)', 'slug'=>'cefoprox_100_30ml60_units','pseudoId'=>'cefoprox_100_30ml60_value'], +['brand'=>'CEFOPROX 100DT', 'slug'=>'cefoprox_100dt_units','pseudoId'=>'cefoprox_100dt_value'], +['brand'=>"CEFOPROX 200 10'S", 'slug'=>'cefoprox_200_10s_units','pseudoId'=>'cefoprox_200_10s_value'], +['brand'=>'CEFOPROX 50 30ml', 'slug'=>'cefoprox_50_30ml_units','pseudoId'=>'cefoprox_50_30ml_value'], +['brand'=>'CEFOPROX CV 325 TAB', 'slug'=>'cefoprox_cv_325_tab_units','pseudoId'=>'cefoprox_cv_325_tab_value'], +['brand'=>'Cheston DUO 100ml Syrup', 'slug'=>'cheston_duo_100ml_syrup_units','pseudoId'=>'cheston_duo_100ml_syrup_value'], +['brand'=>'Cheston LS Junior 100 ML', 'slug'=>'cheston_ls_junior_100_ml_units','pseudoId'=>'cheston_ls_junior_100_ml_value'], +['brand'=>'Cheston-D Cough Syrup 100 ML', 'slug'=>'cheston_d_cough_syrup_100_ml_units','pseudoId'=>'cheston_d_cough_syrup_100_ml_value'], + +['brand'=>"Cheston-D Plus 1 x 10'S", 'slug'=>'cheston_d_plus_1_x_10s_units','pseudoId'=>'cheston_d_plus_1_x_10s_value'], +['brand'=>'Cheston-LS Cough Syrup 100 ML', 'slug'=>'cheston_ls_cough_syrup_100_ml_units','pseudoId'=>'cheston_ls_cough_syrup_100_ml_value'], +['brand'=>'Cheston-LS Junior 60 ML', 'slug'=>'cheston_ls_junior_60_ml_units','pseudoId'=>'cheston_ls_junior_60_ml_value'], +['brand'=>'DALACIN C 150MG CAPS 10s', 'slug'=>'dalacin_c_150mg_caps_10s_units','pseudoId'=>'dalacin_c_150mg_caps_10s_value'], +['brand'=>'DALACIN C 300MG CAPS 10s', 'slug'=>'dalacin_c_300mg_caps_10s_units','pseudoId'=>'dalacin_c_300mg_caps_10s_value'], +['brand'=>'DOLONEX DISP 20MG TABS (IP)', 'slug'=>'dolonex_disp_20mg_tabs_ip_units','pseudoId'=>'dolonex_disp_20mg_tabs_ip_value'], +['brand'=>'DOLONEX IM 20MG/1ML INJ', 'slug'=>'dolonex_im_20mg1ml_inj_units','pseudoId'=>'dolonex_im_20mg1ml_inj_value'], +['brand'=>"DOLONEX IM 40MG 2ML INJ HOSP (IP)", 'slug'=>'dolonex_im_40mg_2ml_inj_hosp_ip_units','pseudoId'=>'dolonex_im_40mg_2ml_inj_hosp_ip_value'], +['brand'=>"DOLONEX IM 40MG/2ML INJ (IP)", 'slug'=>'dolonex_im_40mg2ml_inj_ip_units','pseudoId'=>'dolonex_im_40mg2ml_inj_ip_value'], +['brand'=>'DUONASE - F 70 MD', 'slug'=>'duonase_f_70_md_units','pseudoId'=>'duonase_f_70_md_value'], + +['brand'=>"DUONASE NASAL SPRAY", 'slug'=>'duonase_nasal_spray_units','pseudoId'=>'duonase_nasal_spray_value'], +['brand'=>"IBUGESIC PLUS SUSP", 'slug'=>'ibugesic_plus_susp_units','pseudoId'=>'ibugesic_plus_susp_value'], +['brand'=>'IBUGESIC PLUS SUSP 1', 'slug'=>'ibugesic_plus_susp_1_units','pseudoId'=>'ibugesic_plus_susp_1_value'], +['brand'=>"IBUGESIC PLUS SUSPENSION 100ML - ORANGE", 'slug'=>'ibugesic_plus_suspension_100ml_orange_units','pseudoId'=>'ibugesic_plus_suspension_100ml_orange_value'], +['brand'=>"MUCINAC 200 TABLET 1 X 10'S", 'slug'=>'mucinac_200_tablet_1_x_10s_units','pseudoId'=>'mucinac_200_tablet_1_x_10s_value'], +['brand'=>'MUCINAC 600 TABLETS', 'slug'=>'mucinac_600_tablets_units','pseudoId'=>'mucinac_600_tablets_value'], +['brand'=>'Mucinac AB 1 X 10 TABLETS', 'slug'=>'mucinac_ab_1_x_10_tablets_units','pseudoId'=>'mucinac_ab_1_x_10_tablets_value'], +['brand'=>"Mucinac AB Tablet", 'slug'=>'mucinac_ab_tablet_units','pseudoId'=>'mucinac_ab_tablet_value'], +['brand'=>"MUCINAC C Tablets 1 x 15'S", 'slug'=>'mucinac_c_tablets_1_x_15s_units','pseudoId'=>'mucinac_c_tablets_1_x_15s_value'], +['brand'=>'Mucinac Oral Solution 100ml', 'slug'=>'mucinac_oral_solution_100ml_units','pseudoId'=>'mucinac_oral_solution_100ml_value'], + + +['brand'=>"NOVAMOX - 500", 'slug'=>'novamox_500_units','pseudoId'=>'novamox_500_value'], +['brand'=>"NOVAMOX 125 REDIUSE 30 ML", 'slug'=>'novamox_125_rediuse_30_ml_units','pseudoId'=>'novamox_125_rediuse_30_ml_value'], +['brand'=>'NOVAMOX 125 REDIUSE 60 ML', 'slug'=>'novamox_125_rediuse_60_ml_units','pseudoId'=>'novamox_125_rediuse_60_ml_value'], +['brand'=>"NOVAMOX 250 DT 15's", 'slug'=>'novamox_250_dt_15s_units','pseudoId'=>'novamox_250_dt_15s_value'], +['brand'=>"NOVAMOX 250 R/U 30", 'slug'=>'novamox_250_ru_30_units','pseudoId'=>'novamox_250_ru_30_value'], +['brand'=>'NOVAMOX 250 REDIUSE', 'slug'=>'novamox_250_rediuse_units','pseudoId'=>'novamox_250_rediuse_value'], +['brand'=>'NOVAMOX 30ML', 'slug'=>'novamox_30ml_units','pseudoId'=>'novamox_30ml_value'], +['brand'=>"NOVAMOX 60ML", 'slug'=>'novamox_60ml_units','pseudoId'=>'novamox_60ml_value'], +['brand'=>"NOVAMOX CV 1000 MG", 'slug'=>'novamox_cv_1000_mg_units','pseudoId'=>'novamox_cv_1000_mg_value'], +['brand'=>"NOVAMOX CV 228.5 DT TABLETS", 'slug'=>'novamox_cv_2285_dt_tablets_units','pseudoId'=>'novamox_cv_2285_dt_tablets_value'], + +['brand'=>"NOVAMOX CV 228.5 MG  SYRUP", 'slug'=>'novamox_cv_2285_mg_syrup_units','pseudoId'=>'novamox_cv_2285_mg_syrup_value'], +['brand'=>"NOVAMOX CV 375 TAB 10s", 'slug'=>'novamox_cv_375_tab_10s_units','pseudoId'=>'novamox_cv_375_tab_10s_value'], +['brand'=>"NOVAMOX CV 457 DT 10's", 'slug'=>'novamox_cv_457_dt_10s_units','pseudoId'=>'novamox_cv_457_dt_10s_value'], +['brand'=>"NOVAMOX CV 625 TABLETS 10", 'slug'=>'novamox_cv_625_tablets_10_units','pseudoId'=>'novamox_cv_625_tablets_10_value'], +['brand'=>"NOVAMOX CV DROPS", 'slug'=>'novamox_cv_drops_units','pseudoId'=>'novamox_cv_drops_value'], +['brand'=>'Novamox CV Dry Syrup 30 ML', 'slug'=>'novamox_cv_dry_syrup_30_ml_units','pseudoId'=>'novamox_cv_dry_syrup_30_ml_value'], +['brand'=>'NOVAMOX CV DS', 'slug'=>'novamox_cv_ds_units','pseudoId'=>'novamox_cv_ds_value'], +['brand'=>"NOVAMOX CV FORTE SYP", 'slug'=>'novamox_cv_forte_syp_units','pseudoId'=>'novamox_cv_forte_syp_value'], +['brand'=>"Novamox CV Forte Syp 60 ml", 'slug'=>'novamox_cv_forte_syp_60_ml_units','pseudoId'=>'novamox_cv_forte_syp_60_ml_value'], +['brand'=>"NOVAMOX DROPS", 'slug'=>'novamox_drops_units','pseudoId'=>'novamox_drops_value'], + +['brand'=>"NOVAMOX LB 500", 'slug'=>'novamox_lb_500_units','pseudoId'=>'novamox_lb_500_value'], +['brand'=>"NOVAMOX RDU DROPS", 'slug'=>'novamox_rdu_drops_units','pseudoId'=>'novamox_rdu_drops_value'], +['brand'=>"NOVAMOX-125 DT 15'S", 'slug'=>'novamox_125_dt_15s_units','pseudoId'=>'novamox_125_dt_15s_value'], +['brand'=>"NOVAMOX-250 [15'S]", 'slug'=>'novamox_250_15s_units','pseudoId'=>'novamox_250_15s_value'], +['brand'=>"TEDISPAN 200 TABLETS 6S", 'slug'=>'tedispan_200_tablets_6s_units','pseudoId'=>'tedispan_200_tablets_6s_value'], +['brand'=>"RABICIP - L CAPSULES", 'slug'=>'rabicip_l_capsules_units','pseudoId'=>'rabicip_l_capsules_value'], +['brand'=>"RABICIP 20 15'S", 'slug'=>'rabicip_20_15s_units','pseudoId'=>'rabicip_20_15s_value'], +['brand'=>"RABICIP 20 TABLETS 15S", 'slug'=>'rabicip_20_tablets_15s_units','pseudoId'=>'rabicip_20_tablets_15s_value'], +['brand'=>"RABICIP 20mg (IP) 1 x 15s TABLETS", 'slug'=>'rabicip_20mg_ip_1_x_15s_tablets_units','pseudoId'=>'rabicip_20mg_ip_1_x_15s_tablets_value'], +['brand'=>"RABICIP D CAPSULES 1 X 15'S", 'slug'=>'rabicip_d_capsules_1_x_15s_units','pseudoId'=>'rabicip_d_capsules_1_x_15s_value'], +['brand'=>"ANTIFLU SYRUP 75 ML", 'slug'=>'antiflu_syrup_75_ml_units','pseudoId'=>'antiflu_syrup_75_ml_value'] + + + + + +]; + +@endphp + + +@php +// echo "
";
+// print_r($submitted_formdata);
+// echo "
"; +$skuData = []; + +foreach($questions as $q){ + if($q->code === 'sku'){ + foreach($q->options as $opt){ + $skuData[$opt->value] = $opt->submitted_value ?? 0; + } + } +} + +@endphp + + + - -@include('layouts.shared/footer-script') - - + + + + + + + + \ No newline at end of file From e66834690a926d507ec051da792774c48f9a78ff Mon Sep 17 00:00:00 2001 From: Tanuja Pansare Date: Thu, 3 Sep 2026 18:02:11 +0530 Subject: [PATCH 07/11] Remove unwanted file --- ...e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php | 583 ------------------ 1 file changed, 583 deletions(-) delete mode 100644 resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php diff --git a/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php b/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php deleted file mode 100644 index d8311a42..00000000 --- a/resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php +++ /dev/null @@ -1,583 +0,0 @@ - - - - - @include('layouts.shared/title-meta', ['title' => "Form"]) - @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? '']) - - - -
- processing... -
-@php -$brandData = [ - -['brand'=>'JUNIOR LANZOL 15', 'slug'=>'junior_lanzol_15_units','pseudoId'=>'junior_lanzol_15_value'], -['brand'=>'JUNIOR LANZOL 30', 'slug'=>'junior_lanzol_30_units','pseudoId'=>'junior_lanzol_30_value'], -['brand'=>"LEVOFLOX 250 (10'S) IP", 'slug'=>'levoflox_250_10s_ip_units','pseudoId'=>'levoflox_250_10s_ip_value'], -['brand'=>"LEVOFLOX 250 TAB 10'", 'slug'=>'levoflox_250_tab_10_units','pseudoId'=>'levoflox_250_tab_10_value'], -['brand'=>"LEVOFLOX 500 (10'S) IP", 'slug'=>'levoflox_500_10s_ip_units','pseudoId'=>'levoflox_500_10s_ip_value'], -['brand'=>"LEVOFLOX 500 10'S", 'slug'=>'levoflox_500_10s_units','pseudoId'=>'levoflox_500_10s_value'], -['brand'=>"LEVOFLOX 750 (5'S) IP", 'slug'=>'levoflox_750_5s_ip_units','pseudoId'=>'levoflox_750_5s_ip_value'], -['brand'=>"LEVOFLOX 750 TAB 5'S", 'slug'=>'levoflox_750_tab_5s_units','pseudoId'=>'levoflox_750_tab_5s_value'], -['brand'=>'LEVOFLOX INFUSION', 'slug'=>'levoflox_infusion_units','pseudoId'=>'levoflox_infusion_value'], -['brand'=>'METASPRAY 100AQ', 'slug'=>'metaspray_100aq_units','pseudoId'=>'metaspray_100aq_value'], - -['brand'=>'MONTAIR FX', 'slug'=>'montair_fx_units','pseudoId'=>'montair_fx_value'], -['brand'=>'Montair FX 15s', 'slug'=>'montair_fx_15s_units','pseudoId'=>'montair_fx_15s_value'], -['brand'=>'CEFOPROX 100 30ML(60)', 'slug'=>'cefoprox_100_30ml60_units','pseudoId'=>'cefoprox_100_30ml60_value'], -['brand'=>'CEFOPROX 100DT', 'slug'=>'cefoprox_100dt_units','pseudoId'=>'cefoprox_100dt_value'], -['brand'=>"CEFOPROX 200 10'S", 'slug'=>'cefoprox_200_10s_units','pseudoId'=>'cefoprox_200_10s_value'], -['brand'=>'CEFOPROX 50 30ml', 'slug'=>'cefoprox_50_30ml_units','pseudoId'=>'cefoprox_50_30ml_value'], -['brand'=>'CEFOPROX CV 325 TAB', 'slug'=>'cefoprox_cv_325_tab_units','pseudoId'=>'cefoprox_cv_325_tab_value'], -['brand'=>'Cheston DUO 100ml Syrup', 'slug'=>'cheston_duo_100ml_syrup_units','pseudoId'=>'cheston_duo_100ml_syrup_value'], -['brand'=>'Cheston LS Junior 100 ML', 'slug'=>'cheston_ls_junior_100_ml_units','pseudoId'=>'cheston_ls_junior_100_ml_value'], -['brand'=>'Cheston-D Cough Syrup 100 ML', 'slug'=>'cheston_d_cough_syrup_100_ml_units','pseudoId'=>'cheston_d_cough_syrup_100_ml_value'], - -['brand'=>"Cheston-D Plus 1 x 10'S", 'slug'=>'cheston_d_plus_1_x_10s_units','pseudoId'=>'cheston_d_plus_1_x_10s_value'], -['brand'=>'Cheston-LS Cough Syrup 100 ML', 'slug'=>'cheston_ls_cough_syrup_100_ml_units','pseudoId'=>'cheston_ls_cough_syrup_100_ml_value'], -['brand'=>'Cheston-LS Junior 60 ML', 'slug'=>'cheston_ls_junior_60_ml_units','pseudoId'=>'cheston_ls_junior_60_ml_value'], -['brand'=>'DALACIN C 150MG CAPS 10s', 'slug'=>'dalacin_c_150mg_caps_10s_units','pseudoId'=>'dalacin_c_150mg_caps_10s_value'], -['brand'=>'DALACIN C 300MG CAPS 10s', 'slug'=>'dalacin_c_300mg_caps_10s_units','pseudoId'=>'dalacin_c_300mg_caps_10s_value'], -['brand'=>'DOLONEX DISP 20MG TABS (IP)', 'slug'=>'dolonex_disp_20mg_tabs_ip_units','pseudoId'=>'dolonex_disp_20mg_tabs_ip_value'], -['brand'=>'DOLONEX IM 20MG/1ML INJ', 'slug'=>'dolonex_im_20mg1ml_inj_units','pseudoId'=>'dolonex_im_20mg1ml_inj_value'], -['brand'=>"DOLONEX IM 40MG 2ML INJ HOSP (IP)", 'slug'=>'dolonex_im_40mg_2ml_inj_hosp_ip_units','pseudoId'=>'dolonex_im_40mg_2ml_inj_hosp_ip_value'], -['brand'=>"DOLONEX IM 40MG/2ML INJ (IP)", 'slug'=>'dolonex_im_40mg2ml_inj_ip_units','pseudoId'=>'dolonex_im_40mg2ml_inj_ip_value'], -['brand'=>'DUONASE - F 70 MD', 'slug'=>'duonase_f_70_md_units','pseudoId'=>'duonase_f_70_md_value'], - -['brand'=>"DUONASE NASAL SPRAY", 'slug'=>'duonase_nasal_spray_units','pseudoId'=>'duonase_nasal_spray_value'], -['brand'=>"IBUGESIC PLUS SUSP", 'slug'=>'ibugesic_plus_susp_units','pseudoId'=>'ibugesic_plus_susp_value'], -['brand'=>'IBUGESIC PLUS SUSP 1', 'slug'=>'ibugesic_plus_susp_1_units','pseudoId'=>'ibugesic_plus_susp_1_value'], -['brand'=>"IBUGESIC PLUS SUSPENSION 100ML - ORANGE", 'slug'=>'ibugesic_plus_suspension_100ml_orange_units','pseudoId'=>'ibugesic_plus_suspension_100ml_orange_value'], -['brand'=>"MUCINAC 200 TABLET 1 X 10'S", 'slug'=>'mucinac_200_tablet_1_x_10s_units','pseudoId'=>'mucinac_200_tablet_1_x_10s_value'], -['brand'=>'MUCINAC 600 TABLETS', 'slug'=>'mucinac_600_tablets_units','pseudoId'=>'mucinac_600_tablets_value'], -['brand'=>'Mucinac AB 1 X 10 TABLETS', 'slug'=>'mucinac_ab_1_x_10_tablets_units','pseudoId'=>'mucinac_ab_1_x_10_tablets_value'], -['brand'=>"Mucinac AB Tablet", 'slug'=>'mucinac_ab_tablet_units','pseudoId'=>'mucinac_ab_tablet_value'], -['brand'=>"MUCINAC C Tablets 1 x 15'S", 'slug'=>'mucinac_c_tablets_1_x_15s_units','pseudoId'=>'mucinac_c_tablets_1_x_15s_value'], -['brand'=>'Mucinac Oral Solution 100ml', 'slug'=>'mucinac_oral_solution_100ml_units','pseudoId'=>'mucinac_oral_solution_100ml_value'], - - -['brand'=>"NOVAMOX - 500", 'slug'=>'novamox_500_units','pseudoId'=>'novamox_500_value'], -['brand'=>"NOVAMOX 125 REDIUSE 30 ML", 'slug'=>'novamox_125_rediuse_30_ml_units','pseudoId'=>'novamox_125_rediuse_30_ml_value'], -['brand'=>'NOVAMOX 125 REDIUSE 60 ML', 'slug'=>'novamox_125_rediuse_60_ml_units','pseudoId'=>'novamox_125_rediuse_60_ml_value'], -['brand'=>"NOVAMOX 250 DT 15's", 'slug'=>'novamox_250_dt_15s_units','pseudoId'=>'novamox_250_dt_15s_value'], -['brand'=>"NOVAMOX 250 R/U 30", 'slug'=>'novamox_250_ru_30_units','pseudoId'=>'novamox_250_ru_30_value'], -['brand'=>'NOVAMOX 250 REDIUSE', 'slug'=>'novamox_250_rediuse_units','pseudoId'=>'novamox_250_rediuse_value'], -['brand'=>'NOVAMOX 30ML', 'slug'=>'novamox_30ml_units','pseudoId'=>'novamox_30ml_value'], -['brand'=>"NOVAMOX 60ML", 'slug'=>'novamox_60ml_units','pseudoId'=>'novamox_60ml_value'], -['brand'=>"NOVAMOX CV 1000 MG", 'slug'=>'novamox_cv_1000_mg_units','pseudoId'=>'novamox_cv_1000_mg_value'], -['brand'=>"NOVAMOX CV 228.5 DT TABLETS", 'slug'=>'novamox_cv_2285_dt_tablets_units','pseudoId'=>'novamox_cv_2285_dt_tablets_value'], - -['brand'=>"NOVAMOX CV 228.5 MG  SYRUP", 'slug'=>'novamox_cv_2285_mg_syrup_units','pseudoId'=>'novamox_cv_2285_mg_syrup_value'], -['brand'=>"NOVAMOX CV 375 TAB 10s", 'slug'=>'novamox_cv_375_tab_10s_units','pseudoId'=>'novamox_cv_375_tab_10s_value'], -['brand'=>"NOVAMOX CV 457 DT 10's", 'slug'=>'novamox_cv_457_dt_10s_units','pseudoId'=>'novamox_cv_457_dt_10s_value'], -['brand'=>"NOVAMOX CV 625 TABLETS 10", 'slug'=>'novamox_cv_625_tablets_10_units','pseudoId'=>'novamox_cv_625_tablets_10_value'], -['brand'=>"NOVAMOX CV DROPS", 'slug'=>'novamox_cv_drops_units','pseudoId'=>'novamox_cv_drops_value'], -['brand'=>'Novamox CV Dry Syrup 30 ML', 'slug'=>'novamox_cv_dry_syrup_30_ml_units','pseudoId'=>'novamox_cv_dry_syrup_30_ml_value'], -['brand'=>'NOVAMOX CV DS', 'slug'=>'novamox_cv_ds_units','pseudoId'=>'novamox_cv_ds_value'], -['brand'=>"NOVAMOX CV FORTE SYP", 'slug'=>'novamox_cv_forte_syp_units','pseudoId'=>'novamox_cv_forte_syp_value'], -['brand'=>"Novamox CV Forte Syp 60 ml", 'slug'=>'novamox_cv_forte_syp_60_ml_units','pseudoId'=>'novamox_cv_forte_syp_60_ml_value'], -['brand'=>"NOVAMOX DROPS", 'slug'=>'novamox_drops_units','pseudoId'=>'novamox_drops_value'], - -['brand'=>"NOVAMOX LB 500", 'slug'=>'novamox_lb_500_units','pseudoId'=>'novamox_lb_500_value'], -['brand'=>"NOVAMOX RDU DROPS", 'slug'=>'novamox_rdu_drops_units','pseudoId'=>'novamox_rdu_drops_value'], -['brand'=>"NOVAMOX-125 DT 15'S", 'slug'=>'novamox_125_dt_15s_units','pseudoId'=>'novamox_125_dt_15s_value'], -['brand'=>"NOVAMOX-250 [15'S]", 'slug'=>'novamox_250_15s_units','pseudoId'=>'novamox_250_15s_value'], -['brand'=>"TEDISPAN 200 TABLETS 6S", 'slug'=>'tedispan_200_tablets_6s_units','pseudoId'=>'tedispan_200_tablets_6s_value'], -['brand'=>"RABICIP - L CAPSULES", 'slug'=>'rabicip_l_capsules_units','pseudoId'=>'rabicip_l_capsules_value'], -['brand'=>"RABICIP 20 15'S", 'slug'=>'rabicip_20_15s_units','pseudoId'=>'rabicip_20_15s_value'], -['brand'=>"RABICIP 20 TABLETS 15S", 'slug'=>'rabicip_20_tablets_15s_units','pseudoId'=>'rabicip_20_tablets_15s_value'], -['brand'=>"RABICIP 20mg (IP) 1 x 15s TABLETS", 'slug'=>'rabicip_20mg_ip_1_x_15s_tablets_units','pseudoId'=>'rabicip_20mg_ip_1_x_15s_tablets_value'], -['brand'=>"RABICIP D CAPSULES 1 X 15'S", 'slug'=>'rabicip_d_capsules_1_x_15s_units','pseudoId'=>'rabicip_d_capsules_1_x_15s_value'], -['brand'=>"ANTIFLU SYRUP 75 ML", 'slug'=>'antiflu_syrup_75_ml_units','pseudoId'=>'antiflu_syrup_75_ml_value'] - - - - - -]; - -@endphp - - -@php -// echo "
";
-// print_r($submitted_formdata);
-// echo "
"; -$skuData = []; - -foreach($questions as $q){ - if($q->code === 'sku'){ - foreach($q->options as $opt){ - $skuData[$opt->value] = $opt->submitted_value ?? 0; - } - } -} - -@endphp - - - - - - - - @include('layouts.shared/footer-script') - - - - - - \ No newline at end of file From c77afbf81cc28768c5d2c51e43f1824e3a59edac Mon Sep 17 00:00:00 2001 From: Tanuja Pansare Date: Thu, 3 Sep 2026 18:16:16 +0530 Subject: [PATCH 08/11] Team 3 Doctor Activities for Neb 2 form changes 4 --- ...e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) 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 index 92016b8b..702d06f9 100644 --- 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 @@ -74,11 +74,29 @@ @endphp - + + + + + @elseif($sub->workflow_status=='rejected') + + @else + + + + @endif + {{ isset($sub->formdata->record_date) && $sub->formdata->record_date > 0 ? 'Yes' : 'No' }} From 31aa46208abe97956d06ae34b2dc849e6ab233dd Mon Sep 17 00:00:00 2001 From: Ravi Gulhane Date: Fri, 4 Sep 2026 11:05:05 +0530 Subject: [PATCH 09/11] changes --- app/Http/Controllers/DomainController.php | 15 +- app/Http/Controllers/FormController.php | 30 + .../Controllers/LeaderboardController.php | 35 + ...0da9-b147-435f-a0be-e2b9087d3c49.blade.php | 309 ++++++ ...8b95-d240-452c-bd5f-00dab08a14dd.blade.php | 315 ++++++ ...a724-fffb-4ab9-8fcb-a635b6c71091.blade.php | 315 ++++++ ...2b5e-6d80-4bef-97dd-e2ff0beb8276.blade.php | 906 ++++++++++++++++++ ...e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php | 362 ++++++- ...e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php | 619 ++++++++++++ .../form/rapport-xennex/list_old.blade.php | 223 +++++ .../form/workflow-approval-error.blade.php | 24 + .../views/form/workflow-approval.blade.php | 301 ++++++ .../views/leaderboard/dashboard.blade.php | 68 +- 13 files changed, 3488 insertions(+), 34 deletions(-) create mode 100644 resources/views/form/rapport-arise/1777097685-b3bf0da9-b147-435f-a0be-e2b9087d3c49.blade.php create mode 100644 resources/views/form/rapport-arise/1777271277-05698b95-d240-452c-bd5f-00dab08a14dd.blade.php create mode 100644 resources/views/form/rapport-arise/1777276825-8b57a724-fffb-4ab9-8fcb-a635b6c71091.blade.php create mode 100644 resources/views/form/rapport-pulmocare/1781619111-800b2b5e-6d80-4bef-97dd-e2ff0beb8276.blade.php create mode 100644 resources/views/form/rapport-team3/preview-1655458541-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac1.blade.php create mode 100644 resources/views/form/rapport-xennex/list_old.blade.php create mode 100644 resources/views/form/workflow-approval-error.blade.php create mode 100644 resources/views/form/workflow-approval.blade.php diff --git a/app/Http/Controllers/DomainController.php b/app/Http/Controllers/DomainController.php index 3f47447e..5aa5f196 100644 --- a/app/Http/Controllers/DomainController.php +++ b/app/Http/Controllers/DomainController.php @@ -24,7 +24,7 @@ class DomainController extends Controller //echo '
'; print_r($response); exit;
             $values = $response->data->item;
         }
-        $data = $this->_beforeform($type, $values);
+        $values = $this->_beforeform($type, $values);
         $fields = $this->get_form_fields($type, $values);
         //echo '
'; print_r($data); exit;
         return $this->view('form')->with([
@@ -125,12 +125,22 @@ class DomainController extends Controller
             'badges_recipient_list' => ['title' => 'Badges Recipient List', 'type' => 'select', 'required' => true, 'values' => ['show_all_users' => 'Show all users', 'show_users_under_hierarchy' => 'Show users under hierarchy', 'show_users_under_hierarchy_and_peers' => 'Show users under hierarchy & peers', 'show_users_under_hierarchy_same_level' => 'Show users under hierarchy & at same level'] ],
 
             'users_extra_profile_fields' => ['title' => 'Extra Profile Fields(comma seperated)', 'type' => 'textarea', 'fullwidth' => true],
+            'doctor_tags_roles' => ['title' => 'Doctor Tags Roles', 'type' => 'multiselect', 'values' => $roles_dd, 'fullwidth' => true],
             'terms_text' => ['title' => 'Login Terms & Conditions Text', 'type' => 'textarea', 'required' => true, 'fullwidth' => true],
             'android_server_key' => ['title' => 'Android Server Key', 'type' => 'textarea', 'fullwidth' => true],
             'ios_server_key' => ['title' => 'IOS Server Key', 'type' => 'textarea', 'fullwidth' => true],
         ];
     }
 
+    protected function _beforeform($type, $values) {
+        if ($type == 'edit' && is_object($values)) {
+            if (!isset($values->doctor_tags_roles) || !is_array($values->doctor_tags_roles)) {
+                $values->doctor_tags_roles = [];
+            }
+        }
+        return $values;
+    }
+
     protected function _beforesave($type, $request) {
         $data = $request->except('_token');
         $static_otp_for_roles = [];
@@ -140,6 +150,9 @@ class DomainController extends Controller
             }
         }
         $data['static_otp_for_roles'] = json_encode($static_otp_for_roles);
+        if (!isset($data['doctor_tags_roles']) || !is_array($data['doctor_tags_roles'])) {
+            $data['doctor_tags_roles'] = [];
+        }
         if( $request->file('logo') ) {
             $data['logo'] = $this->_uploadMedia($request, 'logo', 'domain');
         }
diff --git a/app/Http/Controllers/FormController.php b/app/Http/Controllers/FormController.php
index 8972c4e9..1f7ac950 100644
--- a/app/Http/Controllers/FormController.php
+++ b/app/Http/Controllers/FormController.php
@@ -1081,6 +1081,36 @@ class FormController extends Controller
             $cont = LambdaRequest::postrequest('contact', 'contact/update', $contactdata, $token[0]->access_token);
         }
 
+        // Zenova - Glipiq & Sitazit Tracker Copy
+        if($formdata->form_id == '1788239728-6f7f3c27-c5dc-4e6e-a042-aefd5681af3a' && isset($post['contact_id']) && !empty($post['contact_id'])) {
+            list($application, $domain) = explode("-", $formdata->partition);
+            $token = DB::table('users')->select("access_token","user_id")->where("domain", $domain)->where("permissions", 'like', '%contact_create%')->orderBy('updated_at', 'desc')->skip(0)->take(1)->get();
+            $contactdata = [
+                'domain' => $domain,
+                'application' => $application,
+                'user_id' => $post['user_id'],
+                'id' => $post['contact_id'],
+            ];
+            $contactAttributes = [
+                'sankalp_lead_received_penvial',
+                'sankalp_lead_enrolled_penvial',
+                'pmos_dr',
+                'qbs_dr',
+                'adboard_dr',
+                'fb_live_dr',
+                'ecme_dr',
+                'rtm_dr',
+            ];
+            foreach ($contactAttributes as $attr) {
+                if (isset($post[$attr]) && $post[$attr] !== '') {
+                    $contactdata[$attr] = $post[$attr];
+                }
+            }
+            if (count($contactdata) > 4) {
+                LambdaRequest::postrequest('contact', 'contact/update', $contactdata, $token[0]->access_token);
+            }
+        }
+
         // if($formdata->form_id == '1758800833-00e44f7c-1857-4109-8ad4-2789d49a78fa') {
 
         //     list($application, $domain) = explode("-", $formdata->partition);
diff --git a/app/Http/Controllers/LeaderboardController.php b/app/Http/Controllers/LeaderboardController.php
index 00c63b96..38b88bbb 100644
--- a/app/Http/Controllers/LeaderboardController.php
+++ b/app/Http/Controllers/LeaderboardController.php
@@ -335,6 +335,8 @@ class LeaderboardController extends Controller
             'title' => 'Leaderboard',
             'subtitle' => '',
             'period_label' => '',
+            'periods' => [],
+            'selected_period' => (string) $request->query('period', ''),
             'users' => [],
             'metrics' => [],
             'pills' => [],
@@ -377,6 +379,11 @@ class LeaderboardController extends Controller
         }
 
         $pills = $this->roleLeaderboardPills($id, $roleId, $groups, $request->query('period'));
+        $periods = $this->uniquePeriodOptions($view->periods ?? []);
+        $selectedPeriod = (string) ($request->query('period') ?: ($view->interval ?? ''));
+        if ($selectedPeriod === '') {
+            $selectedPeriod = 'all';
+        }
 
         if (!$selected) {
             return [
@@ -384,6 +391,8 @@ class LeaderboardController extends Controller
                 'title' => $view->name ?? 'Leaderboard',
                 'subtitle' => '',
                 'period_label' => '',
+                'periods' => $periods,
+                'selected_period' => $selectedPeriod,
                 'users' => [],
                 'metrics' => [],
                 'pills' => $pills,
@@ -449,6 +458,8 @@ class LeaderboardController extends Controller
             'title' => $view->name ?? 'Leaderboard',
             'subtitle' => $subtitle,
             'period_label' => $periodLabel,
+            'periods' => $periods,
+            'selected_period' => $selectedPeriod,
             'users' => $users,
             'metrics' => $metrics,
             'pills' => $pills,
@@ -456,6 +467,30 @@ class LeaderboardController extends Controller
         ];
     }
 
+    protected function uniquePeriodOptions($periods): array
+    {
+        if (is_object($periods)) {
+            $periods = array_values((array) $periods);
+        }
+        if (!is_array($periods)) {
+            return [];
+        }
+
+        $out = [];
+        $seen = [];
+        foreach ($periods as $period) {
+            $period = is_object($period) ? $period : (object) $period;
+            $value = (string) ($period->value ?? '');
+            if ($value === '' || isset($seen[$value])) {
+                continue;
+            }
+            $seen[$value] = true;
+            $out[] = $period;
+        }
+
+        return $out;
+    }
+
     protected function roleLeaderboardPills($leaderboardId, $selectedRoleId, array $groups, $period = null): array
     {
         $rankRoles = [];
diff --git a/resources/views/form/rapport-arise/1777097685-b3bf0da9-b147-435f-a0be-e2b9087d3c49.blade.php b/resources/views/form/rapport-arise/1777097685-b3bf0da9-b147-435f-a0be-e2b9087d3c49.blade.php
new file mode 100644
index 00000000..c42d35de
--- /dev/null
+++ b/resources/views/form/rapport-arise/1777097685-b3bf0da9-b147-435f-a0be-e2b9087d3c49.blade.php
@@ -0,0 +1,309 @@
+
+
+
+    @include('layouts.shared/title-meta', ['title' => "Form"])
+    @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
+    
+
+
+ processing... +
+ + + + +@include('layouts.shared/footer-script') + + + + + \ No newline at end of file diff --git a/resources/views/form/rapport-arise/1777271277-05698b95-d240-452c-bd5f-00dab08a14dd.blade.php b/resources/views/form/rapport-arise/1777271277-05698b95-d240-452c-bd5f-00dab08a14dd.blade.php new file mode 100644 index 00000000..c32532c9 --- /dev/null +++ b/resources/views/form/rapport-arise/1777271277-05698b95-d240-452c-bd5f-00dab08a14dd.blade.php @@ -0,0 +1,315 @@ + + + + @include('layouts.shared/title-meta', ['title' => "Form"]) + @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? '']) + + +
+ processing... +
+ + + + +@include('layouts.shared/footer-script') + + + + + \ No newline at end of file diff --git a/resources/views/form/rapport-arise/1777276825-8b57a724-fffb-4ab9-8fcb-a635b6c71091.blade.php b/resources/views/form/rapport-arise/1777276825-8b57a724-fffb-4ab9-8fcb-a635b6c71091.blade.php new file mode 100644 index 00000000..c32532c9 --- /dev/null +++ b/resources/views/form/rapport-arise/1777276825-8b57a724-fffb-4ab9-8fcb-a635b6c71091.blade.php @@ -0,0 +1,315 @@ + + + + @include('layouts.shared/title-meta', ['title' => "Form"]) + @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? '']) + + +
+ processing... +
+ + + + +@include('layouts.shared/footer-script') + + + + + \ No newline at end of file diff --git a/resources/views/form/rapport-pulmocare/1781619111-800b2b5e-6d80-4bef-97dd-e2ff0beb8276.blade.php b/resources/views/form/rapport-pulmocare/1781619111-800b2b5e-6d80-4bef-97dd-e2ff0beb8276.blade.php new file mode 100644 index 00000000..f6baab00 --- /dev/null +++ b/resources/views/form/rapport-pulmocare/1781619111-800b2b5e-6d80-4bef-97dd-e2ff0beb8276.blade.php @@ -0,0 +1,906 @@ + + + + @include('layouts.shared/title-meta', ['title' => "Form"]) + @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? '']) + + +
+ processing... +
+ +@php + $history = Formhelper::getMultiformData($form->partition, $form_id, $form->user_id); + $doctorNameById = []; + $doctorIdByName = []; + + foreach ($questions as $question) { + if ($question->code == 'contact_id' && is_iterable($question->options ?? null)) { + foreach ($question->options as $opt) { + $doctorNameById[$opt->value] = $opt->display; + $doctorIdByName[$opt->display] = $opt->value; + } + } + } + + $resolveContactId = function ($raw) use ($doctorNameById, $doctorIdByName) { + if (is_array($raw) || $raw instanceof \Traversable) { + $raw = trim((string) (array_values((array) $raw)[0] ?? '')); + } else { + $raw = trim((string) ($raw ?? '')); + } + + if ($raw === '') { + return ''; + } + + if (isset($doctorNameById[$raw])) { + return $raw; + } + + if (isset($doctorIdByName[$raw])) { + return $doctorIdByName[$raw]; + } + + return $raw; + }; + + $latestByContact = []; + if (isset($history->data->submissions) && is_iterable($history->data->submissions)) { + foreach ($history->data->submissions as $sub) { + $formdata = $sub->formdata ?? null; + if (!$formdata) { + continue; + } + + $contactId = $resolveContactId($formdata->contact_id ?? ''); + + if ($contactId === '') { + continue; + } + + $ts = 0; + if (!empty($sub->createdAt)) { + $ts = strtotime($sub->createdAt) ?: 0; + } elseif (!empty($sub->updatedAt)) { + $ts = strtotime($sub->updatedAt) ?: 0; + } elseif (!empty($formdata->record_date)) { + $ts = strtotime($formdata->record_date) ?: 0; + } + + if (!isset($latestByContact[$contactId]) || $ts >= $latestByContact[$contactId]['ts']) { + $latestByContact[$contactId] = ['sub' => $sub, 'ts' => $ts]; + } + } + } + + $latestDoctorRows = collect(array_values($latestByContact)) + ->map(function ($item) { + return $item['sub']; + }) + ->sortByDesc(function ($sub) { + $fd = $sub->formdata ?? null; + if (!$fd) { + return 0; + } + return strtotime($sub->createdAt ?? $sub->updatedAt ?? ($fd->record_date ?? '')) ?: 0; + }) + ->values(); + + $reportFormId = '1781620356-76fde7ab-e939-44ff-b0be-c33e7f2a05a7'; + $report_form = Formhelper::getformdefination($form->partition, $reportFormId, $form->user_id); + $reportQuestions = $report_form->data->questions ?? []; + $reportHistory = Formhelper::getMultiformData($form->partition, $reportFormId, $form->user_id); + + $reportMonths = [ + 'January', 'February', 'March', 'April', 'May', 'June', + 'July', 'August', 'September', 'October', 'November', 'December', + ]; + $reportMonthNumToName = array_combine(range(1, 12), $reportMonths); + $reportMonthShortNames = [ + 'January' => 'Jan', 'February' => 'Feb', 'March' => 'Mar', + 'April' => 'Apr', 'May' => 'May', 'June' => 'Jun', + 'July' => 'Jul', 'August' => 'Aug', 'September' => 'Sep', + 'October' => 'Oct', 'November' => 'Nov', 'December' => 'Dec', + ]; + $fiscalMonthColumns = [ + 'Apr-26', 'May-26', 'Jun-26', 'Jul-26', 'Aug-26', 'Sep-26', + 'Oct-26', 'Nov-26', 'Dec-26', 'Jan-27', 'Feb-27', 'Mar-27', + ]; + + $normalizeReportMonth = function ($month) use ($reportMonths, $reportMonthNumToName) { + if (is_array($month) || $month instanceof \Traversable) { + $month = array_values((array) $month)[0] ?? ''; + } + + $month = trim((string) $month); + if ($month === '') { + return ''; + } + + if (is_numeric($month)) { + return $reportMonthNumToName[(int) $month] ?? ''; + } + + foreach ($reportMonths as $monthName) { + if (strcasecmp($month, $monthName) === 0) { + return $monthName; + } + } + + return $month; + }; + + $reportMonthColumnKey = function ($month, $year) use ($normalizeReportMonth, $reportMonthShortNames, $fiscalMonthColumns) { + $monthName = $normalizeReportMonth($month); + $year = trim((string) $year); + + if ($monthName === '' || $year === '' || !isset($reportMonthShortNames[$monthName])) { + return null; + } + + $columnKey = $reportMonthShortNames[$monthName] . '-' . substr($year, -2); + return in_array($columnKey, $fiscalMonthColumns, true) ? $columnKey : null; + }; + + $reportTotalsByContact = []; + if (isset($reportHistory->data->submissions) && is_iterable($reportHistory->data->submissions)) { + foreach ($reportHistory->data->submissions as $reportSub) { + $reportFd = $reportSub->formdata ?? null; + if (!$reportFd) { + continue; + } + + $reportContactId = $resolveContactId($reportFd->contact_id ?? ''); + if ($reportContactId === '') { + continue; + } + + $columnKey = $reportMonthColumnKey($reportFd->month ?? '', $reportFd->year ?? ''); + if ($columnKey === null) { + continue; + } + + $totalValue = $reportFd->total_actual_value ?? $reportFd->total ?? 0; + if (is_array($totalValue) || $totalValue instanceof \Traversable) { + $totalValue = array_values((array) $totalValue)[0] ?? 0; + } + $totalValue = (float) $totalValue; + + if (!isset($reportTotalsByContact[$reportContactId][$columnKey])) { + $reportTotalsByContact[$reportContactId][$columnKey] = 0; + } + $reportTotalsByContact[$reportContactId][$columnKey] += $totalValue; + } + } + + $formatReportTotal = function ($value) { + if ($value === null || (float) $value === 0.0) { + return ''; + } + + $formatted = number_format((float) $value, 2, '.', ''); + return rtrim(rtrim($formatted, '0'), '.'); + }; + + $reportCurrentMonth = $reportMonths[(int) date('n') - 1]; + $reportCurrentYear = (int) date('Y'); + if ($reportCurrentYear < 2026) { + $reportCurrentYear = 2026; + } elseif ($reportCurrentYear > 2028) { + $reportCurrentYear = 2028; + } + + $reportReadonlyCalcFields = [ + 'pulmosmart_group_actual_value', + 'pulmosamrt_group_actual_value', + 'total_actual_value', + 'ps_share', + ]; + + foreach ($reportQuestions as $question) { + if ($question->code == 'contact_id' && is_iterable($question->options ?? null)) { + foreach ($question->options as $opt) { + $doctorNameById[$opt->value] = $opt->display; + $doctorIdByName[$opt->display] = $opt->value; + } + } + } +@endphp + + + + + +@include('layouts.shared/footer-script') + + + + + 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 index 8c40024e..3e2caf0a 100644 --- 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 @@ -44,7 +44,18 @@ @endif @php - $history = Formhelper::getMultiformData($form->partition, $form->form_id, $form->user_id); + $submissions = []; + if (isset($form->manager_can_submit) && $form->manager_can_submit == true && isset($form->users) && count($form->users) > 0) { + foreach ($form->users as $option) { + $history = Formhelper::getMultiformData($form->partition, $form->form_id, $option->value); + if (isset($history->data->submissions) && is_array($history->data->submissions)) { + $submissions = array_merge($submissions, $history->data->submissions); + } + } + } else { + $history = Formhelper::getMultiformData($form->partition, $form->form_id, $form->user_id); + $submissions = $history->data->submissions ?? []; + } @endphp
@@ -56,37 +67,74 @@ Action + @if(isset($form->manager_can_submit) && $form->manager_can_submit == true) + User + @endif Execution Done Plan Date {{-- Team Name --}} Type of meeting Execution Date - Name of speaker + {{-- Name of speaker --}} MSL Code Speciality - No. og Doctors/Paramedics attended + No. of Doctors/Paramedics attended - @foreach ($history->data->submissions as $sub) + @foreach ($submissions as $sub) @php $sub->formdata->id = $sub->id; + if (isset($sub->user_info->id)) { + $sub->formdata->user_id = $sub->user_info->id; + } + if (isset($sub->hierarchy_id) && $sub->hierarchy_id != '') { + $sub->formdata->hierarchy_id = $sub->hierarchy_id; + } elseif (isset($form->users) && isset($sub->formdata->user_id)) { + foreach ($form->users as $option) { + if ($option->value == $sub->formdata->user_id && isset($option->hierarchy_id)) { + $sub->formdata->hierarchy_id = $option->hierarchy_id; + break; + } + } + } @endphp - + + + + + @elseif($sub->workflow_status=='rejected') + + @else + + + + @endif + + @if(isset($form->manager_can_submit) && $form->manager_can_submit == true) + {{ $sub->user_info->name ?? '' }} + @endif {{ 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->name_of_the_speaker }} --}} {{ $sub->formdata->msl_code }} {{ $sub->formdata->speciality }} {{ $sub->formdata->attendence }} @@ -103,8 +151,20 @@
@csrf + @if(isset($form->manager_can_submit) && $form->manager_can_submit == true) +
+ + + +
+ @endif @foreach ($questions as $question) - @if (in_array($question->code, ['record_date', 'name_of_the_speaker', 'msl_code', 'attendence','speciality','honorarium_amount','other_expenses','total_eas','no_of_patients_on_duolin','no_of_units_duolin_respules'])) + @if (in_array($question->code, ['record_date', 'attendence','honorarium_amount','other_expenses','total_eas','no_of_patients_on_duolin','no_of_units_duolin_respules'])) @continue @endif
@@ -143,14 +203,40 @@ @break @case('dropdown') - required == 'yes' ? 'required' : '' }}> - @foreach ($question->options as $option) - - @endforeach + @if ($question->code == 'name_of_the_speaker') + @foreach ($question->options as $option) + @if( isset($option->contact->doctor_activities_for_neb_2_top_30_next_30_doctors) && $option->contact->doctor_activities_for_neb_2_top_30_next_30_doctors == 'Yes' ) + + @endif + @endforeach + + + @elseif ($question->code == 'other_speaker_name') + @foreach ($question->options as $option) + @if(!isset($option->contact->doctor_activities_for_neb_2_top_30_next_30_doctors) || + $option->contact->doctor_activities_for_neb_2_top_30_next_30_doctors === null + ) + + @endif + @endforeach + + @else + @foreach ($question->options as $option) + + @endforeach + @endif @break @@ -185,6 +271,10 @@ @csrf + @if(isset($form->manager_can_submit) && $form->manager_can_submit == true) + + + @endif @foreach ($questions as $question)