Merge branch 'master' of https://github.com/brkcvn/akaunting into form-elements
This commit is contained in:
		@@ -39,6 +39,19 @@ class Categories extends BulkAction
 | 
				
			|||||||
        ],
 | 
					        ],
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public function getSelectedRecords($request, $relationships = null)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        if (empty($relationships)) {
 | 
				
			||||||
 | 
					            $model = $this->model::query();
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            $relationships = Arr::wrap($relationships);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            $model = $this->model::with($relationships);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return $model->getWithoutChildren()->find($this->getSelectedInput($request));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public function disable($request)
 | 
					    public function disable($request)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $categories = $this->getSelectedRecords($request);
 | 
					        $categories = $this->getSelectedRecords($request);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -91,7 +91,7 @@ class Notifications extends Component
 | 
				
			|||||||
    public function getNotifications(): array
 | 
					    public function getNotifications(): array
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $notifications = new \stdClass();
 | 
					        $notifications = new \stdClass();
 | 
				
			||||||
        $notifications->notifications = [];
 | 
					        $notifications->notifications = collect();
 | 
				
			||||||
        $notifications->keyword = $this->keyword;
 | 
					        $notifications->keyword = $this->keyword;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        event(new NotificationsCreated($notifications));
 | 
					        event(new NotificationsCreated($notifications));
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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.');
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -4,6 +4,7 @@ namespace App\Models\Common;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use App\Abstracts\Model;
 | 
					use App\Abstracts\Model;
 | 
				
			||||||
use App\Models\Document\Document;
 | 
					use App\Models\Document\Document;
 | 
				
			||||||
 | 
					use App\Utilities\Str;
 | 
				
			||||||
use App\Traits\Currencies;
 | 
					use App\Traits\Currencies;
 | 
				
			||||||
use App\Traits\Media;
 | 
					use App\Traits\Media;
 | 
				
			||||||
use Bkwld\Cloner\Cloneable;
 | 
					use Bkwld\Cloner\Cloneable;
 | 
				
			||||||
@@ -138,6 +139,11 @@ class Item extends Model
 | 
				
			|||||||
            ->select('items.*');
 | 
					            ->select('items.*');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public function getInitialsAttribute($value)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return Str::getInitials($this->name);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Get the current balance.
 | 
					     * Get the current balance.
 | 
				
			||||||
     *
 | 
					     *
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -41,7 +41,7 @@ class Menu extends Component
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
        // Get nofitications
 | 
					        // Get nofitications
 | 
				
			||||||
        $notifications = new \stdClass();
 | 
					        $notifications = new \stdClass();
 | 
				
			||||||
        $notifications->notifications = [];
 | 
					        $notifications->notifications = collect();
 | 
				
			||||||
        $notifications->keyword = '';
 | 
					        $notifications->keyword = '';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        event(new NotificationsCreated($notifications));
 | 
					        event(new NotificationsCreated($notifications));
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -385,11 +385,10 @@ export default {
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        onOptionSelected(value) {
 | 
					        onOptionSelected(value) {
 | 
				
			||||||
            this.show_icon = false;
 | 
					 | 
				
			||||||
            this.current_value = value;
 | 
					            this.current_value = value;
 | 
				
			||||||
            this.range = false;
 | 
					            this.range = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            this.dynamicPlaceholder = this.selectPlaceholder;
 | 
					            this.onChangeSearchAndFilterText(this.selectPlaceholder, false);
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            let option = false;
 | 
					            let option = false;
 | 
				
			||||||
            let option_url = false;
 | 
					            let option_url = false;
 | 
				
			||||||
@@ -522,7 +521,7 @@ export default {
 | 
				
			|||||||
            this.show_close_icon = true;
 | 
					            this.show_close_icon = true;
 | 
				
			||||||
            let select_value = false;
 | 
					            let select_value = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            this.dynamicPlaceholder = this.enterPlaceholder;
 | 
					            this.onChangeSearchAndFilterText(this.enterPlaceholder, false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            for (let i = 0; i < this.values.length; i++) {
 | 
					            for (let i = 0; i < this.values.length; i++) {
 | 
				
			||||||
                if (this.values[i].key == value) {
 | 
					                if (this.values[i].key == value) {
 | 
				
			||||||
@@ -582,7 +581,9 @@ export default {
 | 
				
			|||||||
            this.show_date = false;
 | 
					            this.show_date = false;
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            if (this.filter_index == 0) {
 | 
					            if (this.filter_index == 0) {
 | 
				
			||||||
                this.dynamicPlaceholder = this.defaultPlaceholder;
 | 
					                this.onChangeSearchAndFilterText(this.defaultPlaceholder, true);
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                this.show_icon = false;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            this.filter_last_step = 'options';
 | 
					            this.filter_last_step = 'options';
 | 
				
			||||||
@@ -597,6 +598,11 @@ export default {
 | 
				
			|||||||
            this.onInputConfirm();
 | 
					            this.onInputConfirm();
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        onChangeSearchAndFilterText(arg, param) {
 | 
				
			||||||
 | 
					            this.dynamicPlaceholder = arg;
 | 
				
			||||||
 | 
					            this.show_icon = param;
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        convertOption(options) {
 | 
					        convertOption(options) {
 | 
				
			||||||
            let values = [];
 | 
					            let values = [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -765,6 +771,9 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    mounted() {
 | 
					    mounted() {
 | 
				
			||||||
 | 
					        if (this.filter_index > 0) {
 | 
				
			||||||
 | 
					            this.onChangeSearchAndFilterText(this.enterPlaceholder, false);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    computed: {
 | 
					    computed: {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -260,7 +260,7 @@
 | 
				
			|||||||
                                v-for="n in 12"
 | 
					                                v-for="n in 12"
 | 
				
			||||||
                                v-bind:disabled="n < minCardMonth"
 | 
					                                v-bind:disabled="n < minCardMonth"
 | 
				
			||||||
                                v-bind:key="n"
 | 
					                                v-bind:key="n"
 | 
				
			||||||
                            >{{generateMonthValue(n)}}</option>
 | 
					                            >{{ generateMonthValue(n) }}</option>
 | 
				
			||||||
                        </select>
 | 
					                        </select>
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
@@ -278,7 +278,7 @@
 | 
				
			|||||||
                            v-bind:value="$index + minCardYear"
 | 
					                            v-bind:value="$index + minCardYear"
 | 
				
			||||||
                            v-for="(n, $index) in 12"
 | 
					                            v-for="(n, $index) in 12"
 | 
				
			||||||
                            v-bind:key="n"
 | 
					                            v-bind:key="n"
 | 
				
			||||||
                        >{{$index + minCardYear}}</option>
 | 
					                        >{{ $index + minCardYear }}</option>
 | 
				
			||||||
                    </select>
 | 
					                    </select>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -312,7 +312,7 @@
 | 
				
			|||||||
                        </label>
 | 
					                        </label>
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    <button class="relative flex items-center justify-center px-6 py-1.5 bg-green hover:bg-green-700 text-white rounded-lg" v-on:click="invaildCard" :disabled="loading">
 | 
					                    <button v-if="! hideButton" class="relative flex items-center justify-center px-6 py-1.5 bg-green hover:bg-green-700 text-white rounded-lg" v-on:click="invaildCard" :disabled="loading">
 | 
				
			||||||
                        <i
 | 
					                        <i
 | 
				
			||||||
                            v-if="loading"
 | 
					                            v-if="loading"
 | 
				
			||||||
                            class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]"
 | 
					                            class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]"
 | 
				
			||||||
@@ -371,7 +371,9 @@ export default {
 | 
				
			|||||||
    props: {
 | 
					    props: {
 | 
				
			||||||
        cards: {
 | 
					        cards: {
 | 
				
			||||||
            type: [Array, Object],
 | 
					            type: [Array, Object],
 | 
				
			||||||
            default: [],
 | 
					            default: function () {
 | 
				
			||||||
 | 
					                return [];
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
            description: "Add Card Style"
 | 
					            description: "Add Card Style"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -454,6 +456,12 @@ export default {
 | 
				
			|||||||
            description: "Placeholder Card CVV Text"
 | 
					            description: "Placeholder Card CVV Text"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        hideButton: {
 | 
				
			||||||
 | 
					            type: Boolean,
 | 
				
			||||||
 | 
					            default: false,
 | 
				
			||||||
 | 
					            description: "Confirm button"
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        textButton: {
 | 
					        textButton: {
 | 
				
			||||||
            type: String,
 | 
					            type: String,
 | 
				
			||||||
            default: 'Confirm',
 | 
					            default: 'Confirm',
 | 
				
			||||||
@@ -554,7 +562,6 @@ export default {
 | 
				
			|||||||
            this.register_card = null;
 | 
					            this.register_card = null;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
        onSelectedCard(card_id) {
 | 
					        onSelectedCard(card_id) {
 | 
				
			||||||
            this.card_id = card_id;
 | 
					            this.card_id = card_id;
 | 
				
			||||||
            this.formData.card_id = card_id;
 | 
					            this.formData.card_id = card_id;
 | 
				
			||||||
@@ -623,7 +630,8 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            this.unMaskCardNumber();
 | 
					            this.unMaskCardNumber();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            /*for (let i = number.length - 1; i >= 0; i--) {
 | 
					            /*
 | 
				
			||||||
 | 
					            for (let i = number.length - 1; i >= 0; i--) {
 | 
				
			||||||
                let num = number.charAt(i);
 | 
					                let num = number.charAt(i);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (isOdd) {
 | 
					                if (isOdd) {
 | 
				
			||||||
@@ -639,7 +647,8 @@ export default {
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                isOdd = !isOdd;
 | 
					                isOdd = !isOdd;
 | 
				
			||||||
            }*/
 | 
					            }
 | 
				
			||||||
 | 
					            */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            this.formData.card_id = this.card_id;
 | 
					            this.formData.card_id = this.card_id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										12
									
								
								resources/assets/js/mixins/global.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								resources/assets/js/mixins/global.js
									
									
									
									
										vendored
									
									
								
							@@ -24,6 +24,7 @@ import AkauntingConnectTransactions from './../components/AkauntingConnectTransa
 | 
				
			|||||||
import AkauntingSwitch from './../components/AkauntingSwitch';
 | 
					import AkauntingSwitch from './../components/AkauntingSwitch';
 | 
				
			||||||
import AkauntingSlider from './../components/AkauntingSlider';
 | 
					import AkauntingSlider from './../components/AkauntingSlider';
 | 
				
			||||||
import AkauntingColor from './../components/AkauntingColor';
 | 
					import AkauntingColor from './../components/AkauntingColor';
 | 
				
			||||||
 | 
					import CardForm from './../components/CreditCard/CardForm';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import NProgress from 'nprogress';
 | 
					import NProgress from 'nprogress';
 | 
				
			||||||
import 'nprogress/nprogress.css';
 | 
					import 'nprogress/nprogress.css';
 | 
				
			||||||
@@ -61,6 +62,7 @@ export default {
 | 
				
			|||||||
        AkauntingSwitch,
 | 
					        AkauntingSwitch,
 | 
				
			||||||
        AkauntingSlider,
 | 
					        AkauntingSlider,
 | 
				
			||||||
        AkauntingColor,
 | 
					        AkauntingColor,
 | 
				
			||||||
 | 
					        CardForm,
 | 
				
			||||||
        [Select.name]: Select,
 | 
					        [Select.name]: Select,
 | 
				
			||||||
        [Option.name]: Option,
 | 
					        [Option.name]: Option,
 | 
				
			||||||
        [Steps.name]: Steps,
 | 
					        [Steps.name]: Steps,
 | 
				
			||||||
@@ -91,6 +93,16 @@ export default {
 | 
				
			|||||||
                currency: {},
 | 
					                currency: {},
 | 
				
			||||||
                documents: [],
 | 
					                documents: [],
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            cardData: {
 | 
				
			||||||
 | 
					                cardName: '',
 | 
				
			||||||
 | 
					                cardNumber: '',
 | 
				
			||||||
 | 
					                cardMonth: '',
 | 
				
			||||||
 | 
					                cardYear: '',
 | 
				
			||||||
 | 
					                cardCvv: '',
 | 
				
			||||||
 | 
					                storeCard: false,
 | 
				
			||||||
 | 
					                card_id: 0,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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' => [
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,7 +15,7 @@ return [
 | 
				
			|||||||
        'general'           => 'Here you can enter the general information of transaction such as date, amount, account, description, etc.',
 | 
					        'general'           => 'Here you can enter the general information of transaction such as date, amount, account, description, etc.',
 | 
				
			||||||
        'assign_income'     => 'Select a category and customer to make your reports more detailed.',
 | 
					        'assign_income'     => 'Select a category and customer to make your reports more detailed.',
 | 
				
			||||||
        'assign_expense'    => 'Select a category and vendor to make your reports more detailed.',
 | 
					        'assign_expense'    => 'Select a category and vendor to make your reports more detailed.',
 | 
				
			||||||
        'other'             => 'Enter a reference to keep the transaction linked to your records.',
 | 
					        'other'             => 'Enter a number and reference to keep the transaction linked to your records.',
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    'slider' => [
 | 
					    'slider' => [
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -77,7 +77,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                        @stack('remove_th_start')
 | 
					                        @stack('remove_th_start')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        <th class="border-t-0 border-r-0 border-b-0" style="vertical-align:bottom;">
 | 
					                        <th class="border-t-0 border-r-0 border-b-0 align-bottom" style="width:24px; display:block;">
 | 
				
			||||||
                            <div></div>
 | 
					                            <div></div>
 | 
				
			||||||
                        </th>
 | 
					                        </th>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,20 +22,20 @@
 | 
				
			|||||||
        <div class="relative flex items-center ltr:mr-4 rtl:ml-4" v-if="bulk_action.count">
 | 
					        <div class="relative flex items-center ltr:mr-4 rtl:ml-4" v-if="bulk_action.count">
 | 
				
			||||||
            @foreach ($actions as $key => $action)
 | 
					            @foreach ($actions as $key => $action)
 | 
				
			||||||
                @if (! empty($action['icon']))
 | 
					                @if (! empty($action['icon']))
 | 
				
			||||||
                <div>
 | 
					                    <div>
 | 
				
			||||||
                    <x-tooltip id="{{ $key }}" placement="top" message="{{ trans($action['name']) }}">
 | 
					                        <x-tooltip id="{{ $key }}" placement="top" message="{{ trans($action['name']) }}">
 | 
				
			||||||
                        <x-button @click="onChangeBulkAction('{{ $key }}')"
 | 
					                            <x-button @click="onChangeBulkAction('{{ $key }}')"
 | 
				
			||||||
                            id="button-bulk-action-{{ $key }}"
 | 
					                                id="button-bulk-action-{{ $key }}"
 | 
				
			||||||
                            class="relative w-8 h-8 flex items-center px-2 mr-2 rounded-lg hover:bg-gray-200"
 | 
					                                class="relative w-8 h-8 flex items-center px-2 mr-2 rounded-lg hover:bg-gray-200"
 | 
				
			||||||
                            override="class"
 | 
					                                override="class"
 | 
				
			||||||
                            data-message="{{ ! empty($action['message']) ? trans_choice($action['message'], 2, ['type' => strtolower(trans_choice($text, 2))]) : '' }}"
 | 
					                                data-message="{{ ! empty($action['message']) ? trans_choice($action['message'], 2, ['type' => strtolower(trans_choice($text, 2))]) : '' }}"
 | 
				
			||||||
                            data-path="{{ (isset($path) && ! empty($path)) ? $path : '' }}"
 | 
					                                data-path="{{ (isset($path) && ! empty($path)) ? $path : '' }}"
 | 
				
			||||||
                            data-type="{{ (isset($action['type']) && ! empty($action['type'])) ? $action['type'] : '' }}"
 | 
					                                data-type="{{ (isset($action['type']) && ! empty($action['type'])) ? $action['type'] : '' }}"
 | 
				
			||||||
                        >
 | 
					                            >
 | 
				
			||||||
                            <x-icon class="text-lg" :icon="$action['icon']" />
 | 
					                                <x-icon class="text-lg" :icon="$action['icon']" />
 | 
				
			||||||
                        </x-button>
 | 
					                            </x-button>
 | 
				
			||||||
                    </x-tooltip>
 | 
					                        </x-tooltip>
 | 
				
			||||||
                </div>
 | 
					                    </div>
 | 
				
			||||||
                @else
 | 
					                @else
 | 
				
			||||||
                    <div>
 | 
					                    <div>
 | 
				
			||||||
                        <x-tooltip id="{{ $key }}" placement="top" message="{{ trans($action['name']) }}">
 | 
					                        <x-tooltip id="{{ $key }}" placement="top" message="{{ trans($action['name']) }}">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,7 +12,7 @@
 | 
				
			|||||||
    textButton="{{ trans('general.confirm') }}"
 | 
					    textButton="{{ trans('general.confirm') }}"
 | 
				
			||||||
    textCard="{{ trans_choice('general.card.cards', 2) }}"
 | 
					    textCard="{{ trans_choice('general.card.cards', 2) }}"
 | 
				
			||||||
    textNewCard="{{  trans('general.form.add_new', ['field' => trans_choice('general.card.cards', 1)]) }}"
 | 
					    textNewCard="{{  trans('general.form.add_new', ['field' => trans_choice('general.card.cards', 1)]) }}"
 | 
				
			||||||
    textStoreCard="{{ trans('general.card.save') }} "
 | 
					    textStoreCard="{{ trans('general.card.save') }}"
 | 
				
			||||||
    :store-card="{{ !empty($store_card) ? 'true' : 'false' }}"
 | 
					    :store-card="{{ !empty($store_card) ? 'true' : 'false' }}"
 | 
				
			||||||
    :cards="{{ !empty($cards) ? json_encode($cards) : json_encode([]) }}"
 | 
					    :cards="{{ !empty($cards) ? json_encode($cards) : json_encode([]) }}"
 | 
				
			||||||
    :form-data="formData"
 | 
					    :form-data="formData"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,6 +8,7 @@
 | 
				
			|||||||
    data-id="tab-{{ $id }}"
 | 
					    data-id="tab-{{ $id }}"
 | 
				
			||||||
    data-tabs="{{ $id }}"
 | 
					    data-tabs="{{ $id }}"
 | 
				
			||||||
    x-bind:class="active != '{{ $id }}' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'"
 | 
					    x-bind:class="active != '{{ $id }}' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'"
 | 
				
			||||||
 | 
					    {{ $attributes }}
 | 
				
			||||||
>
 | 
					>
 | 
				
			||||||
    @if ($slot->isNotEmpty())
 | 
					    @if ($slot->isNotEmpty())
 | 
				
			||||||
        {!! $slot !!}
 | 
					        {!! $slot !!}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,6 +9,7 @@
 | 
				
			|||||||
    data-tabs="{{ $id }}"
 | 
					    data-tabs="{{ $id }}"
 | 
				
			||||||
    x-on:click="active = '{{ $id }}'"
 | 
					    x-on:click="active = '{{ $id }}'"
 | 
				
			||||||
    x-bind:class="active != '{{ $id }}' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'"
 | 
					    x-bind:class="active != '{{ $id }}' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'"
 | 
				
			||||||
 | 
					    {{ $attributes }}
 | 
				
			||||||
>
 | 
					>
 | 
				
			||||||
    @if ($slot->isNotEmpty())
 | 
					    @if ($slot->isNotEmpty())
 | 
				
			||||||
        {!! $slot !!}
 | 
					        {!! $slot !!}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,10 @@
 | 
				
			|||||||
@props(['id'])
 | 
					@props(['id'])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<div id="tab-{{ $id }}" data-tabs-content="{{ $id }}" x-show="active === '{{ $id }}'">
 | 
					<div
 | 
				
			||||||
 | 
					    id="tab-{{ $id }}"
 | 
				
			||||||
 | 
					    data-tabs-content="{{ $id }}"
 | 
				
			||||||
 | 
					    x-show="active === '{{ $id }}'"
 | 
				
			||||||
 | 
					    {{ $attributes }}
 | 
				
			||||||
 | 
					>
 | 
				
			||||||
    {{ $slot }}
 | 
					    {{ $slot }}
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,30 +27,34 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                            <div class="swiper swiper-links">
 | 
					                            <div class="swiper swiper-links">
 | 
				
			||||||
                                <div class="swiper-wrapper">
 | 
					                                <div class="swiper-wrapper">
 | 
				
			||||||
                            @foreach ($payment_methods as $key => $name)
 | 
					                                    @foreach ($payment_methods as $key => $name)
 | 
				
			||||||
                                @stack('invoice_{{ $key }}_tab_start')
 | 
					                                        @stack('invoice_{{ $key }}_tab_start')
 | 
				
			||||||
                                <div class="swiper-slide">
 | 
					 | 
				
			||||||
                                    <div
 | 
					 | 
				
			||||||
                                    x-on:click="active = '{{ $name }}'"
 | 
					 | 
				
			||||||
                                    @click="onChangePaymentMethod('{{ $key }}')"
 | 
					 | 
				
			||||||
                                    id="tabs-payment-method-{{ $key }}-tab"
 | 
					 | 
				
			||||||
                                    x-bind:class="active != '{{ $name }}' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'"
 | 
					 | 
				
			||||||
                                    class="text-sm text-black text-center pb-2 border-b cursor-pointer transition-all tabs-link"
 | 
					 | 
				
			||||||
                                >
 | 
					 | 
				
			||||||
                                    {{ $name }}
 | 
					 | 
				
			||||||
                                </div>
 | 
					 | 
				
			||||||
                                </div>
 | 
					 | 
				
			||||||
                                @stack('invoice_{{ $key }}_tab_end')
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                @php $is_active = false; @endphp
 | 
					                                        <div class="swiper-slide">
 | 
				
			||||||
                            @endforeach
 | 
					                                            <div
 | 
				
			||||||
 | 
					                                                x-on:click="active = '{{ $name }}'"
 | 
				
			||||||
 | 
					                                                @click="onChangePaymentMethod('{{ $key }}')"
 | 
				
			||||||
 | 
					                                                id="tabs-payment-method-{{ $key }}-tab"
 | 
				
			||||||
 | 
					                                                x-bind:class="active != '{{ $name }}' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'"
 | 
				
			||||||
 | 
					                                                class="text-sm text-black text-center pb-2 border-b cursor-pointer transition-all tabs-link"
 | 
				
			||||||
 | 
					                                            >
 | 
				
			||||||
 | 
					                                                {{ $name }}
 | 
				
			||||||
 | 
					                                            </div>
 | 
				
			||||||
 | 
					                                        </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                        @stack('invoice_{{ $key }}_tab_end')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                        @php $is_active = false; @endphp
 | 
				
			||||||
 | 
					                                    @endforeach
 | 
				
			||||||
                                </div>
 | 
					                                </div>
 | 
				
			||||||
                            </div>
 | 
					                            </div>
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        @php $is_active = true; @endphp
 | 
					                        @php $is_active = true; @endphp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        @foreach ($payment_methods as $key => $name)
 | 
					                        @foreach ($payment_methods as $key => $name)
 | 
				
			||||||
                            @stack('invoice_{{ $key }}_content_start')
 | 
					                            @stack('invoice_{{ $key }}_content_start')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            <div
 | 
					                            <div
 | 
				
			||||||
                                x-bind:class="active != '{{ $name }}' ? 'hidden': 'block'"
 | 
					                                x-bind:class="active != '{{ $name }}' ? 'hidden': 'block'"
 | 
				
			||||||
                                class="my-3"
 | 
					                                class="my-3"
 | 
				
			||||||
@@ -58,6 +62,7 @@
 | 
				
			|||||||
                            >
 | 
					                            >
 | 
				
			||||||
                                <component v-bind:is="method_show_html" @interface="onRedirectConfirm"></component>
 | 
					                                <component v-bind:is="method_show_html" @interface="onRedirectConfirm"></component>
 | 
				
			||||||
                            </div>
 | 
					                            </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            @stack('invoice_{{ $key }}_content_end')
 | 
					                            @stack('invoice_{{ $key }}_content_end')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            @php $is_active = false; @endphp
 | 
					                            @php $is_active = false; @endphp
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -64,51 +64,58 @@
 | 
				
			|||||||
                </x-table.thead>
 | 
					                </x-table.thead>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                <x-table.tbody>
 | 
					                <x-table.tbody>
 | 
				
			||||||
                    @foreach($categories as $category)
 | 
					                    @foreach($categories as $item)
 | 
				
			||||||
                        <x-table.tr href="{{ route('categories.edit', $category->id) }}" class="relative flex items-center border-b hover:bg-gray-100 px-1 group transition-all">
 | 
					                        <x-table.tr href="{{ route('categories.edit', $item->id) }}" class="relative flex items-center border-b hover:bg-gray-100 px-1 group transition-all">
 | 
				
			||||||
                            <x-table.td class="ltr:pr-6 rtl:pl-6 hidden sm:table-cell" override="class">
 | 
					                            <x-table.td class="ltr:pr-6 rtl:pl-6 hidden sm:table-cell" override="class">
 | 
				
			||||||
                                <x-index.bulkaction.single id="{{ $category->id }}" name="{{ $category->name }}" />
 | 
					                                <x-index.bulkaction.single id="{{ $item->id }}" name="{{ $item->name }}" />
 | 
				
			||||||
                            </x-table.td>
 | 
					                            </x-table.td>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            <x-table.td class="w-5/12 truncate">
 | 
					                            <x-table.td class="w-5/12 truncate">
 | 
				
			||||||
                                @if ($category->sub_categories->count())
 | 
					                                @if ($item->sub_categories->count())
 | 
				
			||||||
                                    <div class="flex items-center font-bold">
 | 
					                                    <div class="flex items-center font-bold">
 | 
				
			||||||
                                        {{ $category->name }}
 | 
					                                        {{ $item->name }}
 | 
				
			||||||
                                        <x-tooltip id="tooltip-category-{{ $category->id }}" placement="bottom" message="{{ trans('categories.collapse') }}">
 | 
					
 | 
				
			||||||
 | 
					                                        <x-tooltip id="tooltip-category-{{ $item->id }}" placement="bottom" message="{{ trans('categories.collapse') }}">
 | 
				
			||||||
                                            <button
 | 
					                                            <button
 | 
				
			||||||
                                                type="button"
 | 
					                                                type="button"
 | 
				
			||||||
                                                class="w-4 h-4 flex items-center justify-center mx-2 leading-none align-text-top rounded-lg bg-gray-500 hover:bg-gray-700"
 | 
					                                                class="w-4 h-4 flex items-center justify-center mx-2 leading-none align-text-top rounded-lg bg-gray-500 hover:bg-gray-700"
 | 
				
			||||||
                                                node="child-{{ $category->id }}"
 | 
					                                                node="child-{{ $item->id }}"
 | 
				
			||||||
                                                onClick="toggleSub('child-{{ $category->id }}', event)"
 | 
					                                                onClick="toggleSub('child-{{ $item->id }}', event)"
 | 
				
			||||||
                                            >
 | 
					                                            >
 | 
				
			||||||
                                                <span class="material-icons transform rotate-90 transition-all text-lg leading-none align-middle text-white">chevron_right</span>
 | 
					                                                <span class="material-icons transform rotate-90 transition-all text-lg leading-none align-middle text-white">chevron_right</span>
 | 
				
			||||||
                                            </button>
 | 
					                                            </button>
 | 
				
			||||||
                                        </x-tooltip>
 | 
					                                        </x-tooltip>
 | 
				
			||||||
                                    </div>
 | 
					                                    </div>
 | 
				
			||||||
                                @else
 | 
					                                @else
 | 
				
			||||||
                                    <span class="font-bold">{{ $category->name }}</span>
 | 
					                                    <span class="font-bold">
 | 
				
			||||||
 | 
					                                        {{ $item->name }}
 | 
				
			||||||
 | 
					                                    </span>
 | 
				
			||||||
 | 
					                                @endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                @if (! $item->enabled)
 | 
				
			||||||
 | 
					                                    <x-index.disable text="{{ trans_choice('general.categories', 1) }}" />
 | 
				
			||||||
                                @endif
 | 
					                                @endif
 | 
				
			||||||
                            </x-table.td>
 | 
					                            </x-table.td>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            <x-table.td class="w-5/12 truncate">
 | 
					                            <x-table.td class="w-5/12 truncate">
 | 
				
			||||||
                                @if (! empty($types[$category->type]))
 | 
					                                @if (! empty($types[$item->type]))
 | 
				
			||||||
                                    {{ $types[$category->type] }}
 | 
					                                    {{ $types[$item->type] }}
 | 
				
			||||||
                                @else
 | 
					                                @else
 | 
				
			||||||
                                    <x-empty-data />
 | 
					                                    <x-empty-data />
 | 
				
			||||||
                                @endif
 | 
					                                @endif
 | 
				
			||||||
                            </x-table.td>
 | 
					                            </x-table.td>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            <x-table.td class="w-2/12 relative">
 | 
					                            <x-table.td class="w-2/12 relative">
 | 
				
			||||||
                                <span class="material-icons text-{{ $category->color }}" class="text-3xl" style="color:{{ $category->color }};">circle</span>
 | 
					                                <span class="material-icons text-{{ $item->color }}" class="text-3xl" style="color:{{ $item->color }};">circle</span>
 | 
				
			||||||
                            </x-table.td>
 | 
					                            </x-table.td>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            <x-table.td kind="action">
 | 
					                            <x-table.td kind="action">
 | 
				
			||||||
                                <x-table.actions :model="$category" />
 | 
					                                <x-table.actions :model="$item" />
 | 
				
			||||||
                            </x-table.td>
 | 
					                            </x-table.td>
 | 
				
			||||||
                        </x-table.tr>
 | 
					                        </x-table.tr>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        @foreach($category->sub_categories as $sub_category)
 | 
					                        @foreach($item->sub_categories as $sub_category)
 | 
				
			||||||
                            @include('settings.categories.sub_category', ['parent_category' => $category, 'sub_category' => $sub_category, 'tree_level' => 1])
 | 
					                            @include('settings.categories.sub_category', ['parent_category' => $item, 'sub_category' => $sub_category, 'tree_level' => 1])
 | 
				
			||||||
                        @endforeach
 | 
					                        @endforeach
 | 
				
			||||||
                    @endforeach
 | 
					                    @endforeach
 | 
				
			||||||
                </x-table.tbody>
 | 
					                </x-table.tbody>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -28,18 +28,22 @@
 | 
				
			|||||||
                    {{ $sub_category->name }}
 | 
					                    {{ $sub_category->name }}
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
            @endif
 | 
					            @endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            @if (! $sub_category->enabled)
 | 
				
			||||||
 | 
					                <x-index.disable text="{{ trans_choice('general.categories', 1) }}" />
 | 
				
			||||||
 | 
					            @endif
 | 
				
			||||||
        </x-table.td>
 | 
					        </x-table.td>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <x-table.td class="w-5/12 ltr:pr-6 rtl:pl-6 py-4 ltr:text-left rtl:text-right whitespace-nowrap text-sm font-normal text-black cursor-pointer truncate">
 | 
					        <x-table.td class="w-5/12 ltr:pr-6 rtl:pl-6 py-4 ltr:text-left rtl:text-right whitespace-nowrap text-sm font-normal text-black cursor-pointer truncate">
 | 
				
			||||||
            @if (! empty($types[$category->type]))
 | 
					            @if (! empty($types[$item->type]))
 | 
				
			||||||
                {{ $types[$category->type] }}
 | 
					                {{ $types[$item->type] }}
 | 
				
			||||||
            @else
 | 
					            @else
 | 
				
			||||||
                <x-empty-data />
 | 
					                <x-empty-data />
 | 
				
			||||||
            @endif
 | 
					            @endif
 | 
				
			||||||
        </x-table.td>
 | 
					        </x-table.td>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <x-table.td class="ltr:pr-6 rtl:pl-6 py-4 ltr:text-left rtl:text-right whitespace-nowrap text-sm font-normal text-black cursor-pointer w-2/12 relative">
 | 
					        <x-table.td class="ltr:pr-6 rtl:pl-6 py-4 ltr:text-left rtl:text-right whitespace-nowrap text-sm font-normal text-black cursor-pointer w-2/12 relative">
 | 
				
			||||||
            <span class="material-icons text-3xl text-{{ $category->color }}" style="color:{{ $sub_category->color }};">circle</span>
 | 
					            <span class="material-icons text-3xl text-{{ $item->color }}" style="color:{{ $sub_category->color }};">circle</span>
 | 
				
			||||||
        </x-table.td>
 | 
					        </x-table.td>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <x-table.td kind="action">
 | 
					        <x-table.td kind="action">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -28,17 +28,24 @@
 | 
				
			|||||||
            </span>
 | 
					            </span>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <button id="dashboard-widget-{{ strtolower(class_basename($class)) }}-overdue" type="button" class="flex items-center text-black-400 font-medium group" data-dropdown-toggle="widgets-list-{{ $class->model->id }}">
 | 
					            <button id="dashboard-widget-{{ strtolower(class_basename($class)) }}-overdue" type="button" class="flex items-center text-black-400 font-medium group" data-dropdown-toggle="widgets-list-{{ $class->model->id }}">
 | 
				
			||||||
                <span class="border-b border-transparent transition-all group-hover:border-black-400"> {{ $totals['overdue'] }} </span>
 | 
					                <span class="border-b border-transparent transition-all group-hover:border-black-400">
 | 
				
			||||||
 | 
					                    {{ $totals['overdue'] }}
 | 
				
			||||||
 | 
					                </span>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                <div class="relative flex">
 | 
					                <div class="relative flex">
 | 
				
			||||||
                    <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
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user