@@ -19,7 +19,7 @@ |
||
19 | 19 | ')->leftJoin('users', 'people.id', '=', 'users.person_id') |
20 | 20 | ->leftJoin( |
21 | 21 | 'company_person', |
22 | - fn ($join) => $join |
|
22 | + fn($join) => $join |
|
23 | 23 | ->on('people.id', '=', 'company_person.person_id') |
24 | 24 | ->where('company_person.is_main', true) |
25 | 25 | )->leftJoin('companies', 'company_person.company_id', 'companies.id'); |
@@ -20,7 +20,7 @@ |
||
20 | 20 | ')->leftJoin('users', 'people.id', '=', 'users.person_id') |
21 | 21 | ->leftJoin( |
22 | 22 | 'company_person', |
23 | - fn ($join) => $join |
|
23 | + fn($join) => $join |
|
24 | 24 | ->on('people.id', '=', 'company_person.person_id') |
25 | 25 | ->where('company_person.is_main', true) |
26 | 26 | )->leftJoin('companies', 'company_person.company_id', 'companies.id') |
@@ -18,7 +18,7 @@ |
||
18 | 18 | companies.phone, companies.status, companies.is_tenant, companies.created_at |
19 | 19 | ')->leftJoin( |
20 | 20 | 'company_person', |
21 | - fn ($join) => $join |
|
21 | + fn($join) => $join |
|
22 | 22 | ->on('companies.id', '=', 'company_person.company_id') |
23 | 23 | ->where('company_person.is_mandatary', true) |
24 | 24 | )->leftJoin('people', 'company_person.person_id', '=', 'people.id'); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | companies.phone, companies.status, companies.is_tenant, companies.created_at |
20 | 20 | ')->leftJoin( |
21 | 21 | 'company_person', |
22 | - fn ($join) => $join |
|
22 | + fn($join) => $join |
|
23 | 23 | ->on('companies.id', '=', 'company_person.company_id') |
24 | 24 | )->leftJoin('people', 'company_person.person_id', '=', 'people.id') |
25 | 25 | ->where('company_person.person_id', Auth::user()->person_id); |
@@ -14,7 +14,7 @@ |
||
14 | 14 | public function __invoke(CompanyForm $form) |
15 | 15 | { |
16 | 16 | $conn = $this->getConnection(); |
17 | - if($conn == 'tenant') { |
|
17 | + if ($conn == 'tenant') { |
|
18 | 18 | $form = new CompanyFormIndi(); |
19 | 19 | return ['form' => $form->create()]; |
20 | 20 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | public function __invoke(Request $request) |
22 | 22 | { |
23 | 23 | $conn = $this->getConnection(); |
24 | - if($conn == 'tenant') { |
|
24 | + if ($conn == 'tenant') { |
|
25 | 25 | // $companies = Auth::user()->person->companies; |
26 | 26 | // return $companies; |
27 | 27 | // $company_ids = []; |
@@ -38,10 +38,10 @@ discard block |
||
38 | 38 | $query = method_exists($this, 'query') ? $this->query($request) : App::make($this->model)::query(); |
39 | 39 | |
40 | 40 | return (new EOptions($query)) |
41 | - ->when($request->has('trackBy'), fn ($options) => $options->trackBy($request->get('trackBy'))) |
|
42 | - ->when($request->has('searchMode'), fn ($options) => $options->searchMode($request->get('searchMode'))) |
|
43 | - ->when(isset($this->queryAttributes), fn ($options) => $options->queryAttributes($this->queryAttributes)) |
|
44 | - ->when(isset($this->resource), fn ($options) => $options->resource($this->resource)) |
|
45 | - ->when(isset($this->appends), fn ($options) => $options->appends($this->appends)); |
|
41 | + ->when($request->has('trackBy'), fn($options) => $options->trackBy($request->get('trackBy'))) |
|
42 | + ->when($request->has('searchMode'), fn($options) => $options->searchMode($request->get('searchMode'))) |
|
43 | + ->when(isset($this->queryAttributes), fn($options) => $options->queryAttributes($this->queryAttributes)) |
|
44 | + ->when(isset($this->resource), fn($options) => $options->resource($this->resource)) |
|
45 | + ->when(isset($this->appends), fn($options) => $options->appends($this->appends)); |
|
46 | 46 | } |
47 | 47 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | $company->save(); |
26 | 26 | $conn = $this->getConnection(); |
27 | - if($conn === 'tenant') { |
|
27 | + if ($conn === 'tenant') { |
|
28 | 28 | $person_id = Auth::user()->person_id; |
29 | 29 | $email = Auth::user()->email; |
30 | 30 | $company->email = $email; |
@@ -24,8 +24,8 @@ |
||
24 | 24 | public function __invoke(Request $request) |
25 | 25 | { |
26 | 26 | $this->tableClass = CompanyTable::class; |
27 | - $conn = $this->getConnection(); |
|
28 | - if($conn == 'tenant') { |
|
27 | + $conn = $this->getConnection(); |
|
28 | + if ($conn == 'tenant') { |
|
29 | 29 | $this->tableClass = CompanyTableIndi::class; |
30 | 30 | } |
31 | 31 |
@@ -15,7 +15,7 @@ |
||
15 | 15 | public function __invoke(Person $person, PersonForm $form) |
16 | 16 | { |
17 | 17 | $conn = $this->getConnection(); |
18 | - if($conn === 'tenant') { |
|
18 | + if ($conn === 'tenant') { |
|
19 | 19 | $person = Person::find(Auth::user()->person_id); |
20 | 20 | $form = new PersonFormIndi(); |
21 | 21 | return ['form' => $form->edit($person)]; |