diff --git a/app/Models/Company.php b/app/Models/Company.php
index 345fbb77..25b50f05 100644
--- a/app/Models/Company.php
+++ b/app/Models/Company.php
@@ -110,7 +110,7 @@ class Company extends AbstractModel implements Documentable
{
return $this->hasManyDeep(Transaction::class, [Booking::class], ['company_id', 'owner_id'], ['id', 'id']);
}
-
+
/**
* @return HasMany
*/
@@ -131,13 +131,25 @@ class Company extends AbstractModel implements Documentable
* @return Builder
*/
public function services(): Builder {
- return ServiceType::where('status', ApprovalStatus::APPROVED)->whereHas('constants', function($query) {
- $query->Where(function($query){
- $query->where('reference', SegmentConstants::SERVICE_TYPE)->where('detail->is_active', true);
- })->orWhere(function($query) {
- $query->where('reference', SegmentConstants::CUSTOM_SERVICE_TYPE)->where('detail->is_active', true)->whereIn('segment_id', $this->segments->pluck('id'));
+
+ if ($this->business_type === 3) {
+ return ServiceType::where('status', ApprovalStatus::APPROVED)->whereHas('constants', function($query) {
+ $query->where(function($query) {
+ $query->where('reference', SegmentConstants::SERVICE_TYPE)->where('detail->is_active', true);
+ })->orWhere(function($query) {
+ $query->where('reference', SegmentConstants::CUSTOM_SERVICE_TYPE)->where('detail->is_active', true);
+ });
});
- });
+ } else {
+ // Existing logic for other company types
+ return ServiceType::where('status', ApprovalStatus::APPROVED)->whereHas('constants', function($query) {
+ $query->Where(function($query){
+ $query->where('reference', SegmentConstants::SERVICE_TYPE)->where('detail->is_active', true);
+ })->orWhere(function($query) {
+ $query->where('reference', SegmentConstants::CUSTOM_SERVICE_TYPE)->where('detail->is_active', true)->whereIn('segment_id', $this->segments->pluck('id'));
+ });
+ });
+ }
}
public function servicesConfigurations(): Collection {
diff --git a/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue b/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue
index 07bb9476..32853a4f 100644
--- a/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue
+++ b/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue
@@ -13,6 +13,10 @@