Skip to content

Commit ba25b7e

Browse files
Merge pull request #2483 from VikassWebkul214254/2.2
2.2
2 parents 5751351 + 90ef013 commit ba25b7e

File tree

11 files changed

+55
-37
lines changed

11 files changed

+55
-37
lines changed

CHANGELOG.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,22 @@
22

33
This changelog consists of the bug & security fixes and new features being included in the releases listed below.
44

5-
## **v2.2.0 (17th of March 2026)**
5+
## **v2.2.0 (17th of March 2026)** *Release*
66

77
* **[Laravel 12 Upgrade]** Upgraded framework to Laravel 12
88

9-
* Update Testcases
9+
* #2480[enhancement] Codebase updates and refinements.
10+
11+
* #2478[enhancement] Improved class instantiation handling.
12+
13+
* #2472[enhancement] Upgrade to Laravel 12.
14+
15+
* #2470[enhancement] Updated auto_commits.yml configuration.
16+
17+
* #2469[enhancement] General enhancements and optimizations.
18+
19+
* #2468[enhancement] Documentation updates (MD files).
20+
21+
* #2450[fixed] Added ACL support for warehouses.
22+
23+
* #2444[fixed] Improved global search functionality for organizations.

example.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/Webkul/Admin/src/Exceptions/Handler.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ public function __construct(Container $container)
3232
parent::__construct($container);
3333

3434
$this->jsonErrorMessages = [
35-
'404' => trans('admin::app.common.resource-not-found'),
36-
'403' => trans('admin::app.common.forbidden-error'),
37-
'401' => trans('admin::app.common.unauthenticated'),
38-
'500' => trans('admin::app.common.internal-server-error'),
35+
'404' => trans('admin::app.errors.404.title'),
36+
'403' => trans('admin::app.errors.403.title'),
37+
'401' => trans('admin::app.errors.401.title'),
38+
'500' => trans('admin::app.errors.500.title'),
3939
];
4040
}
4141

packages/Webkul/Admin/src/Http/Middleware/Bouncer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function handle($request, \Closure $next, $guard = 'user')
2727
if (! (bool) auth()->guard($guard)->user()->status) {
2828
auth()->guard($guard)->logout();
2929

30-
session()->flash('error', __('admin::app.errors.401'));
30+
session()->flash('error', trans('admin::app.errors.401'));
3131

3232
return redirect()->route('admin.session.create');
3333
}
@@ -39,7 +39,7 @@ public function handle($request, \Closure $next, $guard = 'user')
3939
if ($this->isPermissionsEmpty()) {
4040
auth()->guard($guard)->logout();
4141

42-
session()->flash('error', __('admin::app.errors.401'));
42+
session()->flash('error', trans('admin::app.errors.401'));
4343

4444
return redirect()->route('admin.session.create');
4545
}

packages/Webkul/Admin/src/Http/Requests/PipelineForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function rules()
5858
public function messages()
5959
{
6060
return [
61-
'stages.*.name.unique_key' => __('admin::app.settings.pipelines.duplicate-name'),
61+
'stages.*.name.unique_key' => trans('admin::app.settings.pipelines.duplicate-name'),
6262
];
6363
}
6464

packages/Webkul/Admin/src/Resources/views/settings/pipelines/create.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ class="secondary-button"
388388
});
389389
390390
if (filteredStages.length > 1) {
391-
return '{!! __('admin::app.settings.pipelines.create.duplicate-name') !!}';
391+
return "{!! trans('admin::app.settings.pipelines.create.duplicate-name') !!}";
392392
}
393393
394394
this.removeUniqueNameErrors();

packages/Webkul/Admin/src/Resources/views/settings/pipelines/edit.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ class="secondary-button"
338338
});
339339
340340
if (filteredStages.length > 1) {
341-
return '{!! __('admin::app.settings.pipelines.create.duplicate-name') !!}';
341+
return "{!! trans('admin::app.settings.pipelines.create.duplicate-name') !!}";
342342
}
343343
344344
this.removeUniqueNameErrors();

packages/Webkul/Admin/src/Traits/ProvideDropdownOptions.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function getActiveInactiveDropdownOptions(): array
5353
return [
5454
[
5555
'value' => '',
56-
'label' => __('admin::app.common.select-options'),
56+
'label' => trans('admin::app.common.select-options'),
5757
'disabled' => true,
5858
'selected' => true,
5959
],
@@ -79,18 +79,18 @@ public function getYesNoDropdownOptions(): array
7979
return [
8080
[
8181
'value' => '',
82-
'label' => __('admin::app.common.select-options'),
82+
'label' => trans('admin::app.common.select-options'),
8383
'disabled' => true,
8484
'selected' => true,
8585
],
8686
[
8787
'value' => 0,
88-
'label' => __('admin::app.common.no'),
88+
'label' => trans('admin::app.common.no'),
8989
'disabled' => false,
9090
'selected' => false,
9191
], [
9292
'value' => 1,
93-
'label' => __('admin::app.common.yes'),
93+
'label' => trans('admin::app.common.yes'),
9494
'disabled' => false,
9595
'selected' => false,
9696
],
@@ -115,7 +115,7 @@ public function getUserDropdownOptions(): array
115115

116116
return [
117117
[
118-
'label' => __('admin::app.common.select-users'),
118+
'label' => trans('admin::app.common.select-users'),
119119
'value' => '',
120120
'disabled' => true,
121121
'selected' => true,
@@ -142,7 +142,7 @@ public function getLeadSourcesOptions(): array
142142

143143
return [
144144
[
145-
'label' => __('admin::app.common.select-users'),
145+
'label' => trans('admin::app.common.select-users'),
146146
'value' => '',
147147
'disabled' => true,
148148
'selected' => true,
@@ -169,7 +169,7 @@ public function getOrganizationDropdownOptions(): array
169169

170170
return [
171171
[
172-
'label' => __('admin::app.common.select-organization'),
172+
'label' => trans('admin::app.common.select-organization'),
173173
'value' => '',
174174
'disabled' => true,
175175
'selected' => true,
@@ -273,7 +273,7 @@ public function getWarehouseDropdownOptions(): array
273273

274274
return [
275275
[
276-
'label' => __('admin::app.common.select-warehouse'),
276+
'label' => trans('admin::app.common.select-warehouse'),
277277
'value' => '',
278278
'disabled' => true,
279279
'selected' => true,

packages/Webkul/Automation/src/Helpers/Entity/AbstractEntity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function replacePlaceholders(mixed $entity, string $content): string
110110
break;
111111

112112
case 'boolean':
113-
$value = $entity->{$attribute['id']} ? __('admin::app.common.yes') : __('admin::app.common.no');
113+
$value = $entity->{$attribute['id']} ? trans('admin::app.common.yes') : trans('admin::app.common.no');
114114

115115
break;
116116

packages/Webkul/Installer/src/Http/Middleware/CanInstall.php

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@ class CanInstall
1515
*/
1616
public function handle(Request $request, Closure $next): mixed
1717
{
18-
if (Str::contains($request->getPathInfo(), '/install')) {
19-
if ($this->isAlreadyInstalled() && ! $request->ajax()) {
20-
return redirect()->route('admin.dashboard.index');
21-
}
22-
} else {
23-
if (! $this->isAlreadyInstalled()) {
24-
return redirect()->route('installer.index');
25-
}
18+
$isInstallRoute = Str::contains($request->getPathInfo(), '/install');
19+
$isInstalled = $this->isAlreadyInstalled();
20+
21+
if ($isInstallRoute && $isInstalled) {
22+
abort_if($request->ajax(), 403);
23+
24+
return redirect()->route('admin.dashboard.index');
25+
}
26+
27+
if (! $isInstallRoute && ! $isInstalled) {
28+
return redirect()->route('installer.index');
2629
}
2730

2831
return $next($request);
@@ -33,18 +36,20 @@ public function handle(Request $request, Closure $next): mixed
3336
*/
3437
public function isAlreadyInstalled(): bool
3538
{
36-
if (file_exists(storage_path('installed'))) {
39+
$installedPath = storage_path('installed');
40+
41+
if (file_exists($installedPath)) {
3742
return true;
3843
}
3944

40-
if (app(DatabaseManager::class)->isInstalled()) {
41-
touch(storage_path('installed'));
45+
if (! app(DatabaseManager::class)->isInstalled()) {
46+
return false;
47+
}
4248

43-
Event::dispatch('krayin.installed');
49+
touch($installedPath);
4450

45-
return true;
46-
}
51+
Event::dispatch('krayin.installed');
4752

48-
return false;
53+
return true;
4954
}
5055
}

0 commit comments

Comments
 (0)