Skip to content

Commit

Permalink
Merge pull request #143 from sarapis/feedback-changes
Browse files Browse the repository at this point in the history
Add logic for taxonomy data
  • Loading branch information
d9it committed Mar 15, 2024
2 parents b97cb76 + 12198a2 commit 6e84601
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 27 deletions.
23 changes: 21 additions & 2 deletions resources/views/frontEnd/contacts/show.blade.php
Expand Up @@ -171,11 +171,27 @@
@php
$i = 0;
$j = 0;
$service_category_data = 0;
$service_eligibility_data = 0;
foreach ($service->taxonomy as $service_taxonomy_info) {
$taxonomyTypeCategory = $service_taxonomy_info?->taxonomy_type->where('name','Service Category')->first();
if (!empty($taxonomyTypeCategory)) {
$service_category_data += 1;
}
$taxonomyTypeEligibility = $service_taxonomy_info?->taxonomy_type->where('name','Service Eligibility')->first();
if (!empty($taxonomyTypeEligibility)) {
$service_eligibility_data += 1;
}
}
@endphp
<div class="tagp_class">
<span class="pl-0 category_badge subtitle">
@foreach ($service->taxonomy as $service_taxonomy_info)
@if (isset($service_taxonomy_info->taxonomy_type) && count($service_taxonomy_info->taxonomy_type) > 0 && $service_taxonomy_info->taxonomy_type[0]->name == 'Service Category')
@php
$taxonomyTypeCategory = $service_taxonomy_info?->taxonomy_type->where('name','Service Category')->first();
@endphp
@if (!empty($taxonomyTypeCategory))
{{-- @if($service->service_taxonomy != null) --}}
@if ($i == 0)
<b>Service Category:</b>
Expand All @@ -193,7 +209,10 @@
<div class="tagp_class">
<span class="pl-0 category_badge subtitle">
@foreach ($service->taxonomy as $service_taxonomy_info)
@if (isset($service_taxonomy_info->taxonomy_type) && count($service_taxonomy_info->taxonomy_type) > 0 && $service_taxonomy_info->taxonomy_type[0]->name == 'Service Eligibility')
@php
$taxonomyTypeEligibility = $service_taxonomy_info?->taxonomy_type->where('name','Service Eligibility')->first();
@endphp
@if (!empty($taxonomyTypeEligibility))
{{-- @if($service->service_taxonomy != null) --}}
@if ($j == 0)
<b>Service Eligibility:</b>
Expand Down
27 changes: 21 additions & 6 deletions resources/views/frontEnd/locations/show.blade.php
Expand Up @@ -256,13 +256,27 @@
@php
$i = 0;
$j = 0;
$service_category_data = 0;
$service_eligibility_data = 0;
foreach ($service->taxonomy as $service_taxonomy_info) {
$taxonomyTypeCategory = $service_taxonomy_info?->taxonomy_type->where('name','Service Category')->first();
if (!empty($taxonomyTypeCategory)) {
$service_category_data += 1;
}
$taxonomyTypeEligibility = $service_taxonomy_info?->taxonomy_type->where('name','Service Eligibility')->first();
if (!empty($taxonomyTypeEligibility)) {
$service_eligibility_data += 1;
}
}
@endphp
<div class="tagp_class">
<span class="pl-0 category_badge subtitle">
@foreach ($service->taxonomy as $service_taxonomy_info)
@if (isset($service_taxonomy_info->taxonomy_type) &&
count($service_taxonomy_info->taxonomy_type) > 0 &&
$service_taxonomy_info->taxonomy_type[0]->name == 'Service Category')
@php
$taxonomyTypeCategory = $service_taxonomy_info?->taxonomy_type->where('name','Service Category')->first();
@endphp
@if (!empty($taxonomyTypeCategory))
{{-- @if($service->service_taxonomy != null) --}}
@if ($i == 0)
<b>Service Category:</b>
Expand All @@ -281,9 +295,10 @@
<div class="tagp_class">
<span class="pl-0 category_badge subtitle">
@foreach ($service->taxonomy as $service_taxonomy_info)
@if (isset($service_taxonomy_info->taxonomy_type) &&
count($service_taxonomy_info->taxonomy_type) > 0 &&
$service_taxonomy_info->taxonomy_type[0]->name == 'Service Eligibility')
@php
$taxonomyTypeEligibility = $service_taxonomy_info?->taxonomy_type->where('name','Service Eligibility')->first();
@endphp
@if (!empty($taxonomyTypeEligibility))
{{-- @if($service->service_taxonomy != null) --}}
@if ($j == 0)
<b>Service Eligibility:</b>
Expand Down
23 changes: 21 additions & 2 deletions resources/views/frontEnd/organizations/show.blade.php
Expand Up @@ -357,11 +357,27 @@ class="subtitle"><b>{{ $detail['detail_type'] }}:</b></span>
@php
$i = 0;
$j = 0;
$service_category_data = 0;
$service_eligibility_data = 0;
foreach ($service->taxonomy as $service_taxonomy_info) {
$taxonomyTypeCategory = $service_taxonomy_info?->taxonomy_type->where('name','Service Category')->first();
if (!empty($taxonomyTypeCategory)) {
$service_category_data += 1;
}
$taxonomyTypeEligibility = $service_taxonomy_info?->taxonomy_type->where('name','Service Eligibility')->first();
if (!empty($taxonomyTypeEligibility)) {
$service_eligibility_data += 1;
}
}
@endphp
<div class="tagp_class">
<span class="pl-0 category_badge subtitle">
@foreach ($service->taxonomy as $service_taxonomy_info)
@if (isset($service_taxonomy_info->taxonomy_type) && count($service_taxonomy_info->taxonomy_type) > 0 && $service_taxonomy_info->taxonomy_type[0]->name == 'Service Category')
@php
$taxonomyTypeCategory = $service_taxonomy_info?->taxonomy_type->where('name','Service Category')->first();
@endphp
@if (!empty($taxonomyTypeCategory))
{{-- @if ($service->service_taxonomy != null) --}}
@if ($i == 0)
<b>Service Category:</b>
Expand All @@ -380,7 +396,10 @@ class="subtitle"><b>{{ $detail['detail_type'] }}:</b></span>
<div class="tagp_class">
<span class="pl-0 category_badge subtitle">
@foreach ($service->taxonomy as $service_taxonomy_info)
@if (isset($service_taxonomy_info->taxonomy_type) && count($service_taxonomy_info->taxonomy_type) > 0 && $service_taxonomy_info->taxonomy_type[0]->name == 'Service Eligibility')
@php
$taxonomyTypeEligibility = $service_taxonomy_info?->taxonomy_type->where('name','Service Eligibility')->first();
@endphp
@if (!empty($taxonomyTypeEligibility))
{{-- @if ($service->service_taxonomy != null) --}}
@if ($j == 0)
<b>Service Eligibility:</b>
Expand Down
26 changes: 14 additions & 12 deletions resources/views/frontEnd/services/services.blade.php
Expand Up @@ -265,25 +265,26 @@
$j = 0;
$service_category_data = 0;
$service_eligibility_data = 0;
foreach($service->taxonomy as $service_taxonomy_info){
// dd($service->taxonomy,$service_taxonomy_info->taxonomy_type);
if (isset($service_taxonomy_info->taxonomy_type) && count($service_taxonomy_info->taxonomy_type) > 0 && $service_taxonomy_info->taxonomy_type[0]->name == 'Service Category'){
foreach ($service->taxonomy as $service_taxonomy_info) {
$taxonomyTypeCategory = $service_taxonomy_info?->taxonomy_type->where('name','Service Category')->first();
if (!empty($taxonomyTypeCategory)) {
$service_category_data += 1;
}
if (isset($service_taxonomy_info->taxonomy_type) && count($service_taxonomy_info->taxonomy_type) > 0 && $service_taxonomy_info->taxonomy_type[0]->name == 'Service Eligibility'){
$taxonomyTypeEligibility = $service_taxonomy_info?->taxonomy_type->where('name','Service Eligibility')->first();
if (!empty($taxonomyTypeEligibility)) {
$service_eligibility_data += 1;
}
}
@endphp
@if ($service_category_data != 0)
<div class="tagp_class">
<span class="pl-0 category_badge subtitle">
@foreach ($service->taxonomy as $service_taxonomy_info)
@if (isset($service_taxonomy_info->taxonomy_type) &&
count($service_taxonomy_info->taxonomy_type) > 0 &&
$service_taxonomy_info->taxonomy_type[0]->name == 'Service Category')
{{-- @if($service->service_taxonomy != null)--}}
@php
$taxonomyTypeCategory = $service_taxonomy_info?->taxonomy_type->where('name','Service Category')->first();
@endphp
@if (!empty($taxonomyTypeCategory))
@if ($i == 0)
<b>Service Category:</b>
@php
Expand All @@ -303,9 +304,10 @@
<div class="tagp_class">
<span class="pl-0 category_badge subtitle">
@foreach ($service->taxonomy as $service_taxonomy_info)
@if (isset($service_taxonomy_info->taxonomy_type) &&
count($service_taxonomy_info->taxonomy_type) > 0 &&
$service_taxonomy_info->taxonomy_type[0]->name == 'Service Eligibility')
@php
$taxonomyTypeEligibility = $service_taxonomy_info?->taxonomy_type->where('name','Service Eligibility')->first();
@endphp
@if (!empty($taxonomyTypeEligibility))
{{-- @if($service->service_taxonomy != null) --}}
@if ($j == 0)
<b>Service Eligibility:</b>
Expand Down
18 changes: 13 additions & 5 deletions resources/views/frontEnd/services/show.blade.php
Expand Up @@ -194,11 +194,13 @@
$service_category_data = 0;
$service_eligibility_data = 0;
foreach ($service->taxonomy as $service_taxonomy_info) {
// dd($service_taxonomy_info->taxonomy_type[0]->name);
if (isset($service_taxonomy_info->taxonomy_type) && count($service_taxonomy_info->taxonomy_type) > 0 && $service_taxonomy_info->taxonomy_type[0]->name == 'Service Category') {
$taxonomyTypeCategory = $service_taxonomy_info?->taxonomy_type->where('name','Service Category')->first();
if (!empty($taxonomyTypeCategory)) {
$service_category_data += 1;
}
if (isset($service_taxonomy_info->taxonomy_type) && count($service_taxonomy_info->taxonomy_type) > 0 && $service_taxonomy_info->taxonomy_type[0]->name == 'Service Eligibility') {
$taxonomyTypeEligibility = $service_taxonomy_info?->taxonomy_type->where('name','Service Eligibility')->first();
if (!empty($taxonomyTypeEligibility)) {
$service_eligibility_data += 1;
}
}
Expand All @@ -207,7 +209,10 @@
<div class="tagp_class">
<span class="pl-0 category_badge subtitle">
@foreach ($service->taxonomy as $service_taxonomy_info)
@if (isset($service_taxonomy_info->taxonomy_type) && count($service_taxonomy_info->taxonomy_type) > 0 && $service_taxonomy_info->taxonomy_type[0]->name == 'Service Category')
@php
$taxonomyTypeCategory = $service_taxonomy_info?->taxonomy_type->where('name','Service Category')->first();
@endphp
@if (!empty($taxonomyTypeCategory))
@if ($i == 0)
<b>Service Category:</b>
@php
Expand All @@ -226,7 +231,10 @@
<div class="tagp_class">
<span class="pl-0 category_badge subtitle">
@foreach ($service->taxonomy as $service_taxonomy_info)
@if (isset($service_taxonomy_info->taxonomy_type) && count($service_taxonomy_info->taxonomy_type) > 0 && $service_taxonomy_info->taxonomy_type[0]->name == 'Service Eligibility')
@php
$taxonomyTypeEligibility = $service_taxonomy_info?->taxonomy_type->where('name','Service Eligibility')->first();
@endphp
@if (!empty($taxonomyTypeEligibility))
{{-- @if ($service->service_taxonomy != null)--}}
@if ($j == 0)
<b>Service Eligibility:</b>
Expand Down

0 comments on commit 6e84601

Please sign in to comment.