diff --git a/app/Http/Controllers/Modules/Item.php b/app/Http/Controllers/Modules/Item.php
index 6f279a1c7..096ed6771 100644
--- a/app/Http/Controllers/Modules/Item.php
+++ b/app/Http/Controllers/Modules/Item.php
@@ -276,10 +276,10 @@ class Item extends Controller
public function uninstall($alias)
{
try {
- $this->dispatch(new UninstallModule($alias, company_id()));
-
$name = module($alias)->getName();
+ $this->dispatch(new UninstallModule($alias, company_id()));
+
$message = trans('modules.uninstalled', ['module' => $name]);
flash($message)->success();
@@ -295,10 +295,10 @@ class Item extends Controller
public function enable($alias)
{
try {
- $this->dispatch(new EnableModule($alias, company_id()));
-
$name = module($alias)->getName();
+ $this->dispatch(new EnableModule($alias, company_id()));
+
$message = trans('modules.enabled', ['module' => $name]);
flash($message)->success();
@@ -314,10 +314,10 @@ class Item extends Controller
public function disable($alias)
{
try {
- $this->dispatch(new DisableModule($alias, company_id()));
-
$name = module($alias)->getName();
+ $this->dispatch(new DisableModule($alias, company_id()));
+
$message = trans('modules.disabled', ['module' => $name]);
flash($message)->success();
diff --git a/app/Listeners/Menu/ShowInNotifications.php b/app/Listeners/Menu/ShowInNotifications.php
index 6ba776b82..c73da1ecc 100644
--- a/app/Listeners/Menu/ShowInNotifications.php
+++ b/app/Listeners/Menu/ShowInNotifications.php
@@ -59,6 +59,13 @@ class ShowInNotifications
continue;
}
+ $app_url = route('apps.app.show', [
+ 'alias' => $new_app->alias,
+ 'utm_source' => 'notification',
+ 'utm_medium' => 'software',
+ 'utm_campaign' => str_replace('-', '', $new_app->alias),
+ ]);
+
$new = new DatabaseNotification();
$new->id = $key;
$new->type = 'new-apps';
@@ -66,7 +73,7 @@ class ShowInNotifications
$new->notifiable_id = user()->id;
$new->data = [
'title' => $new_app->name,
- 'description' => '', // $new_app->message,
+ 'description' => trans('notifications.new_apps', ['app' => $new_app->name, 'url' => $app_url]),
'alias' => $new_app->alias,
];
$new->created_at = $new_app->started_at->date;
diff --git a/app/Listeners/Update/V30/Version303.php b/app/Listeners/Update/V30/Version303.php
new file mode 100644
index 000000000..a2edb582f
--- /dev/null
+++ b/app/Listeners/Update/V30/Version303.php
@@ -0,0 +1,107 @@
+skipThisUpdate($event)) {
+ return;
+ }
+
+ Log::channel('stderr')->info('Starting the Akaunting 3.0.3 update...');
+
+ $this->updateCompanies();
+
+ Log::channel('stderr')->info('Akaunting 3.0.3 update finished.');
+ }
+
+ public function updateCompanies()
+ {
+ Log::channel('stderr')->info('Updating companies...');
+
+ $company_id = company_id();
+
+ $companies = Company::cursor();
+
+ foreach ($companies as $company) {
+ Log::channel('stderr')->info('Updating company:' . $company->id);
+
+ $company->makeCurrent();
+
+ $this->updateWidgets();
+
+ Log::channel('stderr')->info('Company updated:' . $company->id);
+ }
+
+ company($company_id)->makeCurrent();
+
+ Log::channel('stderr')->info('Companies updated.');
+ }
+
+ public function updateWidgets()
+ {
+ Log::channel('stderr')->info('Updating widgets...');
+
+ $widgets = Widget::cursor();
+
+ foreach ($widgets as $widget) {
+ Log::channel('stderr')->info('Updating widget:' . $widget->id);
+
+ $widget_settings = $widget->settings;
+
+ if (empty($widget_settings->width)) {
+ Log::channel('stderr')->info('Skip widget:' . $widget->id);
+
+ continue;
+ }
+
+ if (Str::contains($widget_settings->width, 'w-full')) {
+ Log::channel('stderr')->info('Already new classs widget:' . $widget->id);
+
+ continue;
+ }
+
+ switch ($widget_settings->width) {
+ case 'col-md-3':
+ $widget_settings->width = 'w-full lg:w-1/4 px-6';
+ break;
+ case 'col-md-4':
+ $widget_settings->width = 'w-full lg:w-1/3 px-6';
+ break;
+ case 'col-md-6':
+ $widget_settings->width = 'w-full lg:w-2/4 px-12';
+ break;
+ case 'col-md-12':
+ $widget_settings->width = 'w-full px-12';
+ break;
+ }
+
+ $widget->settings = $widget_settings;
+
+ $widget->save();
+
+ Log::channel('stderr')->info('Widget updated:' . $widget->id);
+ }
+
+ Log::channel('stderr')->info('Widgets updated.');
+ }
+}
diff --git a/app/Providers/Event.php b/app/Providers/Event.php
index 832bae905..0e9351031 100644
--- a/app/Providers/Event.php
+++ b/app/Providers/Event.php
@@ -16,6 +16,7 @@ class Event extends Provider
'App\Listeners\Update\CreateModuleUpdatedHistory',
'App\Listeners\Module\UpdateExtraModules',
'App\Listeners\Update\V30\Version300',
+ 'App\Listeners\Update\V30\Version303',
],
'Illuminate\Auth\Events\Login' => [
'App\Listeners\Auth\Login',
diff --git a/resources/assets/js/components/AkauntingSearch.vue b/resources/assets/js/components/AkauntingSearch.vue
index ebf00d8bd..3cd583b70 100644
--- a/resources/assets/js/components/AkauntingSearch.vue
+++ b/resources/assets/js/components/AkauntingSearch.vue
@@ -582,6 +582,8 @@ export default {
if (this.filter_index == 0) {
this.onChangeSearchAndFilterText(this.defaultPlaceholder, true);
+ } else {
+ this.show_icon = false;
}
this.filter_last_step = 'options';
diff --git a/resources/lang/en-GB/notifications.php b/resources/lang/en-GB/notifications.php
index f94a6b39e..896c6378d 100644
--- a/resources/lang/en-GB/notifications.php
+++ b/resources/lang/en-GB/notifications.php
@@ -6,9 +6,10 @@ return [
'hello' => 'Hello!',
'salutation' => 'Regards,
:company_name',
'subcopy' => 'If you’re having trouble clicking the ":text" button, copy and paste the URL below into your web browser: [:url](:url)',
- 'mark_read' => 'Mark Read',
- 'mark_read_all' => 'Mark Read All',
+ 'mark_read' => 'Mark as Read',
+ 'mark_read_all' => 'Mark as All Read',
'empty' => 'Woohoo, notification zero!',
+ 'new_apps' => ':app is available. Check it out now!',
'update' => [
diff --git a/resources/views/livewire/menu/notifications.blade.php b/resources/views/livewire/menu/notifications.blade.php
index 31249be66..57af525d6 100644
--- a/resources/views/livewire/menu/notifications.blade.php
+++ b/resources/views/livewire/menu/notifications.blade.php
@@ -9,7 +9,7 @@
@if ($notifications)