Skip to content

Commit

Permalink
Fix invalid namespaces after the Beam module refactoring
Browse files Browse the repository at this point in the history
(cherry picked from commit bb81222)
  • Loading branch information
rootpd committed Sep 5, 2023
1 parent 236dade commit 5004703
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 15 deletions.
2 changes: 0 additions & 2 deletions Beam/app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

namespace App\Http;

use App\Http\Middleware\DashboardBasicAuth;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
use Remp\LaravelSso\Http\Middleware\VerifyJwtToken;

class Kernel extends HttpKernel
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function definition()

return [
'article_id' => function () {
return \App\Article::factory()->create()->id;
return \Remp\BeamModule\Model\Article::factory()->create()->id;
},
'time_from' => $timeFrom,
'time_to' => $timeTo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function definition()

return [
'article_id' => function () {
return \App\Article::factory()->create()->id;
return \Remp\BeamModule\Model\Article::factory()->create()->id;
},
'time_from' => $timeFrom,
'time_to' => $timeTo,
Expand Down
12 changes: 6 additions & 6 deletions Beam/extensions/beam-module/resources/lang/en/entities.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

return [
"types" => [
App\EntityParam::TYPE_STRING => "String",
App\EntityParam::TYPE_STRING_ARRAY => "StringArray",
App\EntityParam::TYPE_NUMBER => "Number",
App\EntityParam::TYPE_NUMBER_ARRAY => "NumberArray",
App\EntityParam::TYPE_BOOLEAN => "Boolean",
App\EntityParam::TYPE_DATETIME => "DateTime",
\Remp\BeamModule\Model\EntityParam::TYPE_STRING => "String",
\Remp\BeamModule\Model\EntityParam::TYPE_STRING_ARRAY => "StringArray",
\Remp\BeamModule\Model\EntityParam::TYPE_NUMBER => "Number",
\Remp\BeamModule\Model\EntityParam::TYPE_NUMBER_ARRAY => "NumberArray",
\Remp\BeamModule\Model\EntityParam::TYPE_BOOLEAN => "Boolean",
\Remp\BeamModule\Model\EntityParam::TYPE_DATETIME => "DateTime",
]
];
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"parent_id": '{!! $entity->parent_id !!}' || null,
"name": '{!! $entity->name !!}',
"params": {!! @json($entity->params) !!},
"types": {!! @json(\App\EntityParam::getAllTypes()) !!},
"types": {!! @json(\Remp\BeamModule\Model\EntityParam::getAllTypes()) !!},
"rootEntities": {!! @json($rootEntities) !!} || null,
"validateUrl": {!! @json(route('entities.validateForm', ['entity' => $entity])) !!}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function handle(JournalContract $journalContract)
}

$segmentCode = "{$treshold}-plus-article-views-in-{$days}-days";
if (\App\Segment::where(['code' => $segmentCode])->exists()) {
if (Segment::where(['code' => $segmentCode])->exists()) {
$this->line("Segment <info>{$segmentCode}</info> already exists, no new segment was created");
return 2;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function create()

return response()->format([
'html' => view(
'newsletters.create',
'beam::newsletters.create',
compact(['newsletter', 'segments', 'generators', 'criteria', 'mailTypes'])
),
'json' => [],
Expand All @@ -105,7 +105,7 @@ public function edit($id)

return response()->format([
'html' => view(
'newsletters.edit',
'beam::newsletters.edit',
compact(['newsletter', 'segments', 'generators', 'criteria', 'mailTypes'])
),
'json' => [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public function update(SegmentRequest $request, Segment $segment)
/**
* Remove the specified resource from storage.
*
* @param \App\Segment $segment
* @param \Remp\BeamModule\Model\Segment $segment
* @return \Illuminate\Http\Response
*/
public function destroy(Segment $segment)
Expand Down
1 change: 1 addition & 0 deletions changelogs/CHANGELOG-v3.2.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## [3.2] - 2023-08-24

- [3.2.1] [Mailer]: Fixed Mailer segment provider users acquiring. Provided segment code needs to be processed before fetching users from database. remp/mnt#114
- [3.2.2] [Mailer]: Fixed Beam's invalid namespaces and routes.

### Project

Expand Down

0 comments on commit 5004703

Please sign in to comment.