Merge branch 'master' of https://github.com/brkcvn/akaunting into text-hover
This commit is contained in:
commit
8ca2a931ec
@ -276,10 +276,10 @@ class Item extends Controller
|
|||||||
public function uninstall($alias)
|
public function uninstall($alias)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->dispatch(new UninstallModule($alias, company_id()));
|
|
||||||
|
|
||||||
$name = module($alias)->getName();
|
$name = module($alias)->getName();
|
||||||
|
|
||||||
|
$this->dispatch(new UninstallModule($alias, company_id()));
|
||||||
|
|
||||||
$message = trans('modules.uninstalled', ['module' => $name]);
|
$message = trans('modules.uninstalled', ['module' => $name]);
|
||||||
|
|
||||||
flash($message)->success();
|
flash($message)->success();
|
||||||
@ -295,10 +295,10 @@ class Item extends Controller
|
|||||||
public function enable($alias)
|
public function enable($alias)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->dispatch(new EnableModule($alias, company_id()));
|
|
||||||
|
|
||||||
$name = module($alias)->getName();
|
$name = module($alias)->getName();
|
||||||
|
|
||||||
|
$this->dispatch(new EnableModule($alias, company_id()));
|
||||||
|
|
||||||
$message = trans('modules.enabled', ['module' => $name]);
|
$message = trans('modules.enabled', ['module' => $name]);
|
||||||
|
|
||||||
flash($message)->success();
|
flash($message)->success();
|
||||||
@ -314,10 +314,10 @@ class Item extends Controller
|
|||||||
public function disable($alias)
|
public function disable($alias)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->dispatch(new DisableModule($alias, company_id()));
|
|
||||||
|
|
||||||
$name = module($alias)->getName();
|
$name = module($alias)->getName();
|
||||||
|
|
||||||
|
$this->dispatch(new DisableModule($alias, company_id()));
|
||||||
|
|
||||||
$message = trans('modules.disabled', ['module' => $name]);
|
$message = trans('modules.disabled', ['module' => $name]);
|
||||||
|
|
||||||
flash($message)->success();
|
flash($message)->success();
|
||||||
|
@ -59,6 +59,13 @@ class ShowInNotifications
|
|||||||
continue;
|
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 = new DatabaseNotification();
|
||||||
$new->id = $key;
|
$new->id = $key;
|
||||||
$new->type = 'new-apps';
|
$new->type = 'new-apps';
|
||||||
@ -66,7 +73,7 @@ class ShowInNotifications
|
|||||||
$new->notifiable_id = user()->id;
|
$new->notifiable_id = user()->id;
|
||||||
$new->data = [
|
$new->data = [
|
||||||
'title' => $new_app->name,
|
'title' => $new_app->name,
|
||||||
'description' => '', // $new_app->message,
|
'description' => trans('notifications.new_apps', ['app' => $new_app->name, 'url' => $app_url]),
|
||||||
'alias' => $new_app->alias,
|
'alias' => $new_app->alias,
|
||||||
];
|
];
|
||||||
$new->created_at = $new_app->started_at->date;
|
$new->created_at = $new_app->started_at->date;
|
||||||
|
107
app/Listeners/Update/V30/Version303.php
Normal file
107
app/Listeners/Update/V30/Version303.php
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Listeners\Update\V30;
|
||||||
|
|
||||||
|
use App\Abstracts\Listeners\Update as Listener;
|
||||||
|
use App\Events\Install\UpdateFinished as Event;
|
||||||
|
use App\Models\Common\Widget;
|
||||||
|
use App\Models\Common\Company;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
|
class Version303 extends Listener
|
||||||
|
{
|
||||||
|
const ALIAS = 'core';
|
||||||
|
|
||||||
|
const VERSION = '3.0.3';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle the event.
|
||||||
|
*
|
||||||
|
* @param $event
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function handle(Event $event)
|
||||||
|
{
|
||||||
|
if ($this->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.');
|
||||||
|
}
|
||||||
|
}
|
@ -16,6 +16,7 @@ class Event extends Provider
|
|||||||
'App\Listeners\Update\CreateModuleUpdatedHistory',
|
'App\Listeners\Update\CreateModuleUpdatedHistory',
|
||||||
'App\Listeners\Module\UpdateExtraModules',
|
'App\Listeners\Module\UpdateExtraModules',
|
||||||
'App\Listeners\Update\V30\Version300',
|
'App\Listeners\Update\V30\Version300',
|
||||||
|
'App\Listeners\Update\V30\Version303',
|
||||||
],
|
],
|
||||||
'Illuminate\Auth\Events\Login' => [
|
'Illuminate\Auth\Events\Login' => [
|
||||||
'App\Listeners\Auth\Login',
|
'App\Listeners\Auth\Login',
|
||||||
|
@ -582,6 +582,8 @@ export default {
|
|||||||
|
|
||||||
if (this.filter_index == 0) {
|
if (this.filter_index == 0) {
|
||||||
this.onChangeSearchAndFilterText(this.defaultPlaceholder, true);
|
this.onChangeSearchAndFilterText(this.defaultPlaceholder, true);
|
||||||
|
} else {
|
||||||
|
this.show_icon = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.filter_last_step = 'options';
|
this.filter_last_step = 'options';
|
||||||
|
@ -6,9 +6,10 @@ return [
|
|||||||
'hello' => 'Hello!',
|
'hello' => 'Hello!',
|
||||||
'salutation' => 'Regards,<br> :company_name',
|
'salutation' => 'Regards,<br> :company_name',
|
||||||
'subcopy' => 'If you’re having trouble clicking the ":text" button, copy and paste the URL below into your web browser: [:url](:url)',
|
'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' => 'Mark as Read',
|
||||||
'mark_read_all' => 'Mark Read All',
|
'mark_read_all' => 'Mark as All Read',
|
||||||
'empty' => 'Woohoo, notification zero!',
|
'empty' => 'Woohoo, notification zero!',
|
||||||
|
'new_apps' => ':app is available. <a href=":url">Check it out now</a>!',
|
||||||
|
|
||||||
'update' => [
|
'update' => [
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
@if ($notifications)
|
@if ($notifications)
|
||||||
<div class="flex justify-end mt-1 mb-3">
|
<div class="flex justify-end mt-1 mb-3">
|
||||||
<x-tooltip id="notification-all" placement="top" message="Mark as All Read">
|
<x-tooltip id="notification-all" placement="top" message="{{ trans('notifications.mark_read_all') }}">
|
||||||
<button type="button" wire:click="markReadAll()">
|
<button type="button" wire:click="markReadAll()">
|
||||||
<span id="menu-notification-read-all" class="material-icons text-lg text-purple">done_all</span>
|
<span id="menu-notification-read-all" class="material-icons text-lg text-purple">done_all</span>
|
||||||
</button>
|
</button>
|
||||||
@ -26,15 +26,18 @@
|
|||||||
<div class="flex items-start justify-between font-medium text-sm text-purple mb-1">
|
<div class="flex items-start justify-between font-medium text-sm text-purple mb-1">
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
{!! $notification->data['title'] !!}
|
{!! $notification->data['title'] !!}
|
||||||
<span class="text-gray-500" style="font-size: 10px;">{{ \Carbon\Carbon::createFromTimeStamp(strtotime($notification->created_at))->diffForHumans() }}</span>
|
|
||||||
|
<span class="text-gray-500" style="font-size: 10px;">
|
||||||
|
{{ \Carbon\Carbon::createFromTimeStamp(strtotime($notification->created_at))->diffForHumans() }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if ($notification->type != 'updates')
|
@if ($notification->type != 'updates')
|
||||||
<x-tooltip id="notification-{{ $notification->id }}" placement="top" message="Clear Notification">
|
<x-tooltip id="notification-{{ $notification->id }}" placement="top" message="{{ trans('notifications.mark_read') }}">
|
||||||
<button type="button" wire:click="markRead('{{ $notification->type }}', '{{ $notification->id }}')">
|
<button type="button" wire:click="markRead('{{ $notification->type }}', '{{ $notification->id }}')">
|
||||||
<span id="menu-notification-mark-read" class="material-icons text-lg text-purple">check_circle_outline</span>
|
<span id="menu-notification-mark-read" class="material-icons text-lg text-purple">check_circle_outline</span>
|
||||||
</button>
|
</button>
|
||||||
</x-tooltip>
|
</x-tooltip>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -4,8 +4,11 @@
|
|||||||
<ul class="text-sm space-y-3 my-3">
|
<ul class="text-sm space-y-3 my-3">
|
||||||
@foreach($accounts as $item)
|
@foreach($accounts as $item)
|
||||||
<li class="flex justify-between">
|
<li class="flex justify-between">
|
||||||
{{ $item->name }}
|
{{ $item->title }}
|
||||||
<span class="font-medium">{{ $item->balance_formatted }}</span>
|
|
||||||
|
<span class="font-medium">
|
||||||
|
{{ $item->balance_formatted }}
|
||||||
|
</span>
|
||||||
</li>
|
</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
{{ $totals['incoming'] }}
|
{{ $totals['incoming'] }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="text-green text-xs">{{ trans('general.incoming') }}</span>
|
<span class="text-green text-xs">
|
||||||
|
{{ trans('general.incoming') }}
|
||||||
|
</span>
|
||||||
|
|
||||||
<span class="material-icons mt-2">remove</span>
|
<span class="material-icons mt-2">remove</span>
|
||||||
</div>
|
</div>
|
||||||
@ -22,7 +24,9 @@
|
|||||||
{{ $totals['outgoing'] }}
|
{{ $totals['outgoing'] }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="text-rose text-xs">{{ trans('general.outgoing') }}</span>
|
<span class="text-rose text-xs">
|
||||||
|
{{ trans('general.outgoing') }}
|
||||||
|
</span>
|
||||||
|
|
||||||
<span class="material-icons mt-2">drag_handle</span>
|
<span class="material-icons mt-2">drag_handle</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -5,7 +5,10 @@
|
|||||||
@foreach($currencies as $item)
|
@foreach($currencies as $item)
|
||||||
<li class="flex justify-between">
|
<li class="flex justify-between">
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
<span class="font-medium">{{ $item->rate }}</span>
|
|
||||||
|
<span class="font-medium">
|
||||||
|
{{ $item->rate }}
|
||||||
|
</span>
|
||||||
</li>
|
</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -34,11 +34,16 @@
|
|||||||
<span class="material-icons-round cursor-pointer">arrow_drop_down</span>
|
<span class="material-icons-round cursor-pointer">arrow_drop_down</span>
|
||||||
|
|
||||||
<div id="widgets-list-{{ $class->model->id }}" class="absolute right-0 mt-3 py-2 bg-white rounded-md border border-gray-200 shadow-xl z-20 hidden" style="left: auto; min-width: 10rem;">
|
<div id="widgets-list-{{ $class->model->id }}" class="absolute right-0 mt-3 py-2 bg-white rounded-md border border-gray-200 shadow-xl z-20 hidden" style="left: auto; min-width: 10rem;">
|
||||||
@foreach($periods as $name => $amount)
|
@foreach ($periods as $name => $amount)
|
||||||
<div id="dashboard-widget-{{ strtolower(class_basename($class)) }}-{{ str_replace('_', '-', $name) }}" class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap cursor-auto">
|
<div id="dashboard-widget-{{ strtolower(class_basename($class)) }}-{{ str_replace('_', '-', $name) }}" class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap cursor-auto">
|
||||||
<div class="w-full h-full flex items-center justify-between rounded-md px-2 text-sm hover:bg-lilac-100">
|
<div class="w-full h-full flex items-center justify-between rounded-md px-2 text-sm hover:bg-lilac-100">
|
||||||
<div class="font-normal text-sm">{{ trans('widgets.periods.' . $name) }}</div>
|
<div class="font-normal text-sm">
|
||||||
<div class="pl-12 text-sm">{{ $amount }}</div>
|
{{ trans('widgets.periods.' . $name) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pl-12 text-sm">
|
||||||
|
{{ $amount }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
Loading…
x
Reference in New Issue
Block a user