Merge branch 'master' of https://github.com/brkcvn/akaunting into new-plans

This commit is contained in:
Burak Civan 2022-10-26 09:40:48 +03:00
commit 178ad943d0
46 changed files with 741 additions and 917 deletions

View File

@ -56,6 +56,10 @@ abstract class Report
public $loaded = false;
public $bar_formatter_type = 'money';
public $donut_formatter_type = 'percent';
public $chart = [
'bar' => [
'colors' => [
@ -158,27 +162,6 @@ abstract class Report
return $this->icon;
}
public function getGrandTotal()
{
if (!$this->loaded) {
$this->load();
}
if (!empty($this->footer_totals)) {
$sum = 0;
foreach ($this->footer_totals as $total) {
$sum += is_array($total) ? array_sum($total) : $total;
}
$total = $this->has_money ? money($sum, default_currency(), true)->format() : $sum;
} else {
$total = trans('general.na');
}
return $total;
}
public function getCharts($table_key)
{
return [
@ -310,12 +293,12 @@ abstract class Report
continue;
}
$this->chart[$table_key]['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter();
$this->chart[$table_key]['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter('percent');
$this->chart[$table_key]['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter($this->bar_formatter_type);
$this->chart[$table_key]['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter($this->donut_formatter_type);
}
} else {
$this->chart['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter();
$this->chart['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter('percent');
$this->chart['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter($this->bar_formatter_type);
$this->chart['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter($this->donut_formatter_type);
}
}

View File

@ -8,13 +8,16 @@ class CompanyCreated extends Event
{
public $company;
public $request;
/**
* Create a new event instance.
*
* @param $company
*/
public function __construct($company)
public function __construct($company, $request = null)
{
$this->company = $company;
$this->request = $request;
}
}

View File

@ -10,6 +10,7 @@ use App\Jobs\Common\UpdateCompany;
use App\Models\Common\Company;
use App\Traits\Uploads;
use App\Traits\Users;
use Akaunting\Money\Currency as MoneyCurrency;
class Companies extends Controller
{
@ -44,7 +45,15 @@ class Companies extends Controller
*/
public function create()
{
return view('common.companies.create');
$money_currencies = MoneyCurrency::getCurrencies();
$currencies = [];
foreach ($money_currencies as $key => $item) {
$currencies[$key] = $key . ' - ' . $item['name'];
}
return view('common.companies.create', compact('currencies'));
}
/**
@ -61,7 +70,7 @@ class Companies extends Controller
$response = $this->ajaxDispatch(new CreateCompany($request));
if ($response['success']) {
$response['redirect'] = route('companies.index');
$response['redirect'] = route('companies.switch', $response['data']->id);
$message = trans('messages.success.added', ['type' => trans_choice('general.companies', 1)]);
@ -92,7 +101,15 @@ class Companies extends Controller
return redirect()->route('companies.index');
}
return view('common.companies.edit', compact('company'));
$money_currencies = MoneyCurrency::getCurrencies();
$currencies = [];
foreach ($money_currencies as $key => $item) {
$currencies[$key] = $key . ' - ' . $item['name'];
}
return view('common.companies.edit', compact('company', 'currencies'));
}
/**

View File

@ -1,117 +0,0 @@
<?php
namespace App\Http\Controllers\Wizard;
use App\Abstracts\Http\Controller;
use App\Http\Requests\Setting\Tax as Request;
use App\Jobs\Setting\CreateTax;
use App\Jobs\Setting\DeleteTax;
use App\Jobs\Setting\UpdateTax;
use App\Models\Setting\Tax;
class Taxes extends Controller
{
/**
* Instantiate a new controller instance.
*/
public function __construct()
{
// Add CRUD permission check
$this->middleware('permission:create-settings-taxes')->only('create', 'store', 'duplicate', 'import');
$this->middleware('permission:read-settings-taxes')->only('index', 'show', 'edit', 'export');
$this->middleware('permission:update-settings-taxes')->only('update', 'enable', 'disable');
$this->middleware('permission:delete-settings-taxes')->only('destroy');
}
/**
* Show the form for editing the specified resource.
*
* @return Response
*/
public function index()
{
$taxes = Tax::collect();
return $this->response('wizard.taxes.index', compact('taxes'));
}
/**
* Show the form for viewing the specified resource.
*
* @return Response
*/
public function show()
{
return redirect()->route('wizard.taxes.index');
}
/**
* Store a newly created resource in storage.
*
* @param Request $request
*
* @return Response
*/
public function store(Request $request)
{
$response = $this->ajaxDispatch(new CreateTax($request));
if ($response['success']) {
$message = trans('messages.success.added', ['type' => trans_choice('general.taxes', 1)]);
} else {
$message = $response['message'];
}
$response['message'] = $message;
return response()->json($response);
}
/**
* Update the specified resource in storage.
*
* @param Tax $tax
* @param Request $request
*
* @return Response
*/
public function update(Tax $tax, Request $request)
{
$response = $this->ajaxDispatch(new UpdateTax($tax, $request));
if ($response['success']) {
$message = trans('messages.success.updated', ['type' => $tax->name]);
} else {
$message = $response['message'];
}
$response['message'] = $message;
return response()->json($response);
}
/**
* Remove the specified resource from storage.
*
* @param Tax $tax
*
* @return Response
*/
public function destroy(Tax $tax)
{
$tax_id = $tax->id;
$response = $this->ajaxDispatch(new DeleteTax($tax));
if ($response['success']) {
$message = trans('messages.success.deleted', ['type' => $tax->name]);
} else {
$message = $response['message'];
}
$response['tax_id'] = $tax_id;
$response['message'] = $message;
return response()->json($response);
}
}

View File

@ -89,6 +89,7 @@ class UpdateUser extends Job implements ShouldUpdate
}
// Can't unassigned company, The company must be assigned at least one user.
if ($this->request->has('companies')) {
$companies = (array) $this->request->get('companies', []);
$user_companies = $this->model->companies()->pluck('id')->toArray();
@ -113,3 +114,4 @@ class UpdateUser extends Job implements ShouldUpdate
}
}
}
}

View File

@ -8,8 +8,12 @@ use App\Events\Common\CompanyCreating;
use App\Interfaces\Job\HasOwner;
use App\Interfaces\Job\HasSource;
use App\Interfaces\Job\ShouldCreate;
use App\Models\Banking\Account;
use App\Models\Common\Company;
use App\Models\Setting\Currency;
use Akaunting\Money\Currency as MoneyCurrency;
use Illuminate\Support\Facades\Artisan;
use OutOfBoundsException;
class CreateCompany extends Job implements HasOwner, HasSource, ShouldCreate
{
@ -26,15 +30,17 @@ class CreateCompany extends Job implements HasOwner, HasSource, ShouldCreate
$this->callSeeds();
$this->updateCurrency();
$this->updateSettings();
});
event(new CompanyCreated($this->model));
if (! empty($current_company_id)) {
company($current_company_id)->makeCurrent();
}
event(new CompanyCreated($this->model, $this->request));
return $this->model;
}
@ -99,4 +105,42 @@ class CreateCompany extends Job implements HasOwner, HasSource, ShouldCreate
setting()->save();
}
protected function updateCurrency()
{
$currency_code = $this->request->get('currency');
if ($currency_code == 'USD') {
return;
}
$currency = Currency::where('company_id', $this->model->id)
->where('code', $currency_code)
->first();
if ($currency) {
$currency->rate = '1';
$currency->enabled = '1';
$currency->save();
} else {
try {
$data = (new MoneyCurrency($currency_code))->toArray()[$currency_code];
$data['rate'] = '1';
$data['enabled'] = '1';
$data['company_id'] = $this->model->id;
$data['code'] = $currency_code;
$data['created_from'] = 'core::ui';
$data['created_by'] = user_id();
$currency = Currency::create($data);
} catch (OutOfBoundsException $e) {
}
}
$account = Account::where('company_id', $this->model->id)->first();
$account->currency_code = $currency_code;
$account->save();
}
}

View File

@ -7,7 +7,10 @@ use App\Events\Common\CompanyUpdated;
use App\Events\Common\CompanyUpdating;
use App\Interfaces\Job\ShouldUpdate;
use App\Models\Common\Company;
use App\Models\Setting\Currency;
use App\Traits\Users;
use Akaunting\Money\Currency as MoneyCurrency;
use OutOfBoundsException;
class UpdateCompany extends Job implements ShouldUpdate
{
@ -86,6 +89,8 @@ class UpdateCompany extends Job implements ShouldUpdate
}
setting()->save();
$this->updateCurrency();
});
event(new CompanyUpdated($this->model, $this->request));
@ -116,4 +121,37 @@ class UpdateCompany extends Job implements ShouldUpdate
throw new \Exception($message);
}
}
protected function updateCurrency()
{
$currency_code = $this->request->get('currency');
if (empty($currency_code)) {
return;
}
$currency = Currency::where('company_id', $this->model->id)
->where('code', $currency_code)
->first();
if ($currency) {
$currency->rate = '1';
$currency->enabled = '1';
$currency->save();
} else {
try {
$data = (new MoneyCurrency($currency_code))->toArray()[$currency_code];
$data['rate'] = '1';
$data['enabled'] = '1';
$data['company_id'] = $this->model->id;
$data['code'] = $currency_code;
$data['created_from'] = 'core::ui';
$data['created_by'] = user_id();
$currency = Currency::create($data);
} catch (OutOfBoundsException $e) {
}
}
}
}

View File

@ -542,22 +542,8 @@ class Document extends Model
],
];
} catch (\Exception $e) {}
} else {
try {
$actions[] = [
'title' => trans('general.print'),
'icon' => 'print',
'url' => route($prefix . '.print', $this->id),
'permission' => 'read-' . $group . '-' . $permission_prefix,
'attributes' => [
'id' => 'index-line-actions-print-' . $this->type . '-' . $this->id,
'target' => '_blank',
],
];
} catch (\Exception $e) {}
}
if (($actions[1]['icon'] != 'print') && ($actions[2]['icon'] != 'print')) {
try {
$actions[] = [
'title' => trans('general.print'),
@ -570,7 +556,6 @@ class Document extends Model
],
];
} catch (\Exception $e) {}
}
try {
$actions[] = [

View File

@ -35,6 +35,10 @@ class Currency extends Form
$this->currencies = Model::enabled()->orderBy('name')->pluck('name', 'code');
if (! empty($this->options)) {
$this->currencies = $this->options;
}
$currency_id = old('currency.id', old('currency_id', null));
if (! empty($currency_id)) {

View File

@ -6,7 +6,6 @@ use Akaunting\Money\Currency as MoneyCurrency;
use App\Abstracts\View\Component;
use App\Models\Common\Media;
use App\Models\Setting\Currency;
use App\Models\Setting\Tax;
use App\Traits\Modules;
class Scripts extends Component
@ -21,8 +20,6 @@ class Scripts extends Component
public $currency_codes;
public $taxes;
public $modules;
/**
@ -41,8 +38,6 @@ class Scripts extends Component
// Prepare codes
$this->currency_codes = $this->getCurrencyCodes();
$this->taxes = $this->getTaxes();
$this->modules = $this->getFeaturedModules([
'query' => [
'limit' => 5
@ -122,29 +117,6 @@ class Scripts extends Component
'cancel' => trans('general.cancel'),
],
'taxes' => [
'title' => trans_choice('general.taxes', 2),
'add_new' => trans('general.add_new'),
'no_taxes' => trans('taxes.no_taxes'),
'create_task' => trans('taxes.create_task'),
'new_tax' => trans('taxes.new_tax'),
'name' => trans('general.name'),
'rate_percent' => trans('taxes.rate_percent'),
'enabled' => trans('general.enabled'),
'actions' => trans('general.actions'),
'yes' => trans('general.yes'),
'no' => trans('general.no'),
'edit' => trans('general.edit'),
'delete' => trans('general.delete'),
'name' => trans('general.name'),
'rate' => trans('currencies.rate'),
'enabled' => trans('general.enabled'),
'save' => trans('general.save'),
'previous' => trans('pagination.previous'),
'next' => trans('pagination.next'),
'cancel' => trans('general.cancel'),
],
'finish' => [
'title' => trans('modules.ready'),
'recommended_apps' => trans('modules.recommended_apps'),
@ -185,9 +157,4 @@ class Scripts extends Component
return $codes;
}
protected function getTaxes()
{
return Tax::all();
}
}

View File

@ -31,7 +31,7 @@
"akaunting/laravel-debugbar-collector": "^2.0",
"akaunting/laravel-firewall": "^2.0",
"akaunting/laravel-language": "^1.0",
"akaunting/laravel-menu": "^2.0",
"akaunting/laravel-menu": "^3.0",
"akaunting/laravel-module": "^2.0",
"akaunting/laravel-money": "^3.0",
"akaunting/laravel-mutable-observer": "^1.0",

186
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "8c3e839574009ba27f0d0cdf0b8d8f0c",
"content-hash": "05d1711a45b021377c4ae35714cfb7ea",
"packages": [
{
"name": "akaunting/laravel-apexcharts",
@ -271,30 +271,30 @@
},
{
"name": "akaunting/laravel-menu",
"version": "2.0.3",
"version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/akaunting/laravel-menu.git",
"reference": "4b5faf3929e2198725619ef7d313d2c582ea348f"
"reference": "9f7ac7fc67f1d7918281fe872472a79c9789d3e1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/akaunting/laravel-menu/zipball/4b5faf3929e2198725619ef7d313d2c582ea348f",
"reference": "4b5faf3929e2198725619ef7d313d2c582ea348f",
"url": "https://api.github.com/repos/akaunting/laravel-menu/zipball/9f7ac7fc67f1d7918281fe872472a79c9789d3e1",
"reference": "9f7ac7fc67f1d7918281fe872472a79c9789d3e1",
"shasum": ""
},
"require": {
"illuminate/config": ">=5.5",
"illuminate/support": ">=5.5",
"illuminate/view": ">=5.5",
"laravelcollective/html": ">=5.5",
"php": ">=7.3"
"illuminate/config": "^9.0",
"illuminate/support": "^9.0",
"illuminate/view": "^9.0",
"laravelcollective/html": "^6.3",
"php": "^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": ">=3.4",
"mockery/mockery": ">=1.4",
"orchestra/testbench": ">=6.0",
"phpunit/phpunit": ">=9.0"
"friendsofphp/php-cs-fixer": "^3.12",
"mockery/mockery": "^1.5",
"orchestra/testbench": "^7.11",
"phpunit/phpunit": "^9.5"
},
"type": "library",
"extra": {
@ -337,9 +337,9 @@
],
"support": {
"issues": "https://github.com/akaunting/laravel-menu/issues",
"source": "https://github.com/akaunting/laravel-menu/tree/2.0.3"
"source": "https://github.com/akaunting/laravel-menu/tree/3.0.0"
},
"time": "2022-02-04T14:26:16+00:00"
"time": "2022-10-25T14:52:51+00:00"
},
{
"name": "akaunting/laravel-module",
@ -907,16 +907,16 @@
},
{
"name": "aws/aws-sdk-php",
"version": "3.239.0",
"version": "3.240.1",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
"reference": "33ae76381b77a1a2580817996dcc7b9e931ae5f4"
"reference": "34c6bf82f337cadf31475c88ca70e8302afc624b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/33ae76381b77a1a2580817996dcc7b9e931ae5f4",
"reference": "33ae76381b77a1a2580817996dcc7b9e931ae5f4",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/34c6bf82f337cadf31475c88ca70e8302afc624b",
"reference": "34c6bf82f337cadf31475c88ca70e8302afc624b",
"shasum": ""
},
"require": {
@ -995,9 +995,9 @@
"support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.239.0"
"source": "https://github.com/aws/aws-sdk-php/tree/3.240.1"
},
"time": "2022-10-18T18:17:00+00:00"
"time": "2022-10-24T19:03:23+00:00"
},
{
"name": "balping/json-raw-encoder",
@ -1469,16 +1469,16 @@
},
{
"name": "bugsnag/bugsnag",
"version": "v3.28.0",
"version": "v3.29.0",
"source": {
"type": "git",
"url": "https://github.com/bugsnag/bugsnag-php.git",
"reference": "44fc93cac95e44741e0a5f9100f2a0958372e792"
"reference": "362b93bb4b1318bb4bfe3a9e553413e6c2c1f382"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bugsnag/bugsnag-php/zipball/44fc93cac95e44741e0a5f9100f2a0958372e792",
"reference": "44fc93cac95e44741e0a5f9100f2a0958372e792",
"url": "https://api.github.com/repos/bugsnag/bugsnag-php/zipball/362b93bb4b1318bb4bfe3a9e553413e6c2c1f382",
"reference": "362b93bb4b1318bb4bfe3a9e553413e6c2c1f382",
"shasum": ""
},
"require": {
@ -1526,30 +1526,30 @@
],
"support": {
"issues": "https://github.com/bugsnag/bugsnag-php/issues",
"source": "https://github.com/bugsnag/bugsnag-php/tree/v3.28.0"
"source": "https://github.com/bugsnag/bugsnag-php/tree/v3.29.0"
},
"time": "2022-05-18T14:13:46+00:00"
"time": "2022-10-19T09:54:15+00:00"
},
{
"name": "bugsnag/bugsnag-laravel",
"version": "v2.24.0",
"version": "v2.25.0",
"source": {
"type": "git",
"url": "https://github.com/bugsnag/bugsnag-laravel.git",
"reference": "1853d8335e2c29412abd14e3522fbca0a4351d84"
"reference": "64546d9171b6645b5e5c4c12195193cf8ec61aad"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bugsnag/bugsnag-laravel/zipball/1853d8335e2c29412abd14e3522fbca0a4351d84",
"reference": "1853d8335e2c29412abd14e3522fbca0a4351d84",
"url": "https://api.github.com/repos/bugsnag/bugsnag-laravel/zipball/64546d9171b6645b5e5c4c12195193cf8ec61aad",
"reference": "64546d9171b6645b5e5c4c12195193cf8ec61aad",
"shasum": ""
},
"require": {
"bugsnag/bugsnag": "^3.28.0",
"bugsnag/bugsnag": "^3.29.0",
"bugsnag/bugsnag-psr-logger": "^1.4|^2.0",
"illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0",
"illuminate/support": "^5.0|^6.0|^7.0|^8.0|^9.0",
"monolog/monolog": "^1.12|^2.0",
"monolog/monolog": "^1.12|^2.0|^3.0",
"php": ">=5.5"
},
"require-dev": {
@ -1589,9 +1589,9 @@
],
"support": {
"issues": "https://github.com/bugsnag/bugsnag-laravel/issues",
"source": "https://github.com/bugsnag/bugsnag-laravel/tree/v2.24.0"
"source": "https://github.com/bugsnag/bugsnag-laravel/tree/v2.25.0"
},
"time": "2022-05-20T14:12:51+00:00"
"time": "2022-10-25T10:33:03+00:00"
},
{
"name": "bugsnag/bugsnag-psr-logger",
@ -2103,23 +2103,23 @@
},
{
"name": "doctrine/dbal",
"version": "3.4.5",
"version": "3.5.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
"reference": "a5a58773109c0abb13e658c8ccd92aeec8d07f9e"
"reference": "f38ee8aaca2d58ee88653cb34a6a3880c23f38a5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/a5a58773109c0abb13e658c8ccd92aeec8d07f9e",
"reference": "a5a58773109c0abb13e658c8ccd92aeec8d07f9e",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/f38ee8aaca2d58ee88653cb34a6a3880c23f38a5",
"reference": "f38ee8aaca2d58ee88653cb34a6a3880c23f38a5",
"shasum": ""
},
"require": {
"composer-runtime-api": "^2",
"doctrine/cache": "^1.11|^2.0",
"doctrine/deprecations": "^0.5.3|^1",
"doctrine/event-manager": "^1.0",
"doctrine/event-manager": "^1|^2",
"php": "^7.4 || ^8.0",
"psr/cache": "^1|^2|^3",
"psr/log": "^1|^2|^3"
@ -2127,14 +2127,14 @@
"require-dev": {
"doctrine/coding-standard": "10.0.0",
"jetbrains/phpstorm-stubs": "2022.2",
"phpstan/phpstan": "1.8.3",
"phpstan/phpstan-strict-rules": "^1.3",
"phpunit/phpunit": "9.5.24",
"phpstan/phpstan": "1.8.10",
"phpstan/phpstan-strict-rules": "^1.4",
"phpunit/phpunit": "9.5.25",
"psalm/plugin-phpunit": "0.17.0",
"squizlabs/php_codesniffer": "3.7.1",
"symfony/cache": "^5.4|^6.0",
"symfony/console": "^4.4|^5.4|^6.0",
"vimeo/psalm": "4.27.0"
"vimeo/psalm": "4.29.0"
},
"suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files."
@ -2194,7 +2194,7 @@
],
"support": {
"issues": "https://github.com/doctrine/dbal/issues",
"source": "https://github.com/doctrine/dbal/tree/3.4.5"
"source": "https://github.com/doctrine/dbal/tree/3.5.1"
},
"funding": [
{
@ -2210,7 +2210,7 @@
"type": "tidelift"
}
],
"time": "2022-09-23T17:48:57+00:00"
"time": "2022-10-24T07:26:18+00:00"
},
{
"name": "doctrine/deprecations",
@ -2349,23 +2349,23 @@
},
{
"name": "doctrine/inflector",
"version": "2.0.5",
"version": "2.0.6",
"source": {
"type": "git",
"url": "https://github.com/doctrine/inflector.git",
"reference": "ade2b3bbfb776f27f0558e26eed43b5d9fe1b392"
"reference": "d9d313a36c872fd6ee06d9a6cbcf713eaa40f024"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/inflector/zipball/ade2b3bbfb776f27f0558e26eed43b5d9fe1b392",
"reference": "ade2b3bbfb776f27f0558e26eed43b5d9fe1b392",
"url": "https://api.github.com/repos/doctrine/inflector/zipball/d9d313a36c872fd6ee06d9a6cbcf713eaa40f024",
"reference": "d9d313a36c872fd6ee06d9a6cbcf713eaa40f024",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^9",
"doctrine/coding-standard": "^10",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-phpunit": "^1.1",
"phpstan/phpstan-strict-rules": "^1.3",
@ -2420,7 +2420,7 @@
],
"support": {
"issues": "https://github.com/doctrine/inflector/issues",
"source": "https://github.com/doctrine/inflector/tree/2.0.5"
"source": "https://github.com/doctrine/inflector/tree/2.0.6"
},
"funding": [
{
@ -2436,7 +2436,7 @@
"type": "tidelift"
}
],
"time": "2022-09-07T09:01:28+00:00"
"time": "2022-10-20T09:10:12+00:00"
},
{
"name": "doctrine/lexer",
@ -3397,16 +3397,16 @@
},
{
"name": "guzzlehttp/psr7",
"version": "2.4.1",
"version": "2.4.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379"
"reference": "3148458748274be1546f8f2809a6c09fe66f44aa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/69568e4293f4fa993f3b0e51c9723e1e17c41379",
"reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/3148458748274be1546f8f2809a6c09fe66f44aa",
"reference": "3148458748274be1546f8f2809a6c09fe66f44aa",
"shasum": ""
},
"require": {
@ -3496,7 +3496,7 @@
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/2.4.1"
"source": "https://github.com/guzzle/psr7/tree/2.4.2"
},
"funding": [
{
@ -3512,7 +3512,7 @@
"type": "tidelift"
}
],
"time": "2022-08-28T14:45:39+00:00"
"time": "2022-10-25T13:49:28+00:00"
},
{
"name": "hoa/compiler",
@ -4858,16 +4858,16 @@
},
{
"name": "laravel/framework",
"version": "v9.36.2",
"version": "v9.36.4",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "0bcd350eec1974c9f912f129368587ef7e43722b"
"reference": "15ce569fd93124e8e2257c24e3ed85b9ef9951d6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/0bcd350eec1974c9f912f129368587ef7e43722b",
"reference": "0bcd350eec1974c9f912f129368587ef7e43722b",
"url": "https://api.github.com/repos/laravel/framework/zipball/15ce569fd93124e8e2257c24e3ed85b9ef9951d6",
"reference": "15ce569fd93124e8e2257c24e3ed85b9ef9951d6",
"shasum": ""
},
"require": {
@ -4879,7 +4879,7 @@
"fruitcake/php-cors": "^1.2",
"laravel/serializable-closure": "^1.2.2",
"league/commonmark": "^2.2",
"league/flysystem": "^3.0.16",
"league/flysystem": "^3.8.0",
"monolog/monolog": "^2.0",
"nesbot/carbon": "^2.62.1",
"nunomaduro/termwind": "^1.13",
@ -4956,7 +4956,7 @@
"league/flysystem-read-only": "^3.3",
"league/flysystem-sftp-v3": "^3.0",
"mockery/mockery": "^1.5.1",
"orchestra/testbench-core": "^7.8",
"orchestra/testbench-core": "^7.11",
"pda/pheanstalk": "^4.0",
"phpstan/phpstan": "^1.4.7",
"phpunit/phpunit": "^9.5.8",
@ -5040,7 +5040,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2022-10-18T18:46:20+00:00"
"time": "2022-10-20T16:11:03+00:00"
},
{
"name": "laravel/sanctum",
@ -5619,16 +5619,16 @@
},
{
"name": "league/flysystem",
"version": "3.9.0",
"version": "3.10.2",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem.git",
"reference": "60f3760352fe08e918bc3b1acae4e91af092ebe1"
"reference": "b9bd194b016114d6ff6765c09d40c7d427e4e3f6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/60f3760352fe08e918bc3b1acae4e91af092ebe1",
"reference": "60f3760352fe08e918bc3b1acae4e91af092ebe1",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/b9bd194b016114d6ff6765c09d40c7d427e4e3f6",
"reference": "b9bd194b016114d6ff6765c09d40c7d427e4e3f6",
"shasum": ""
},
"require": {
@ -5644,7 +5644,7 @@
},
"require-dev": {
"async-aws/s3": "^1.5",
"async-aws/simple-s3": "^1.0",
"async-aws/simple-s3": "^1.1",
"aws/aws-sdk-php": "^3.198.1",
"composer/semver": "^3.0",
"ext-fileinfo": "*",
@ -5690,7 +5690,7 @@
],
"support": {
"issues": "https://github.com/thephpleague/flysystem/issues",
"source": "https://github.com/thephpleague/flysystem/tree/3.9.0"
"source": "https://github.com/thephpleague/flysystem/tree/3.10.2"
},
"funding": [
{
@ -5706,25 +5706,25 @@
"type": "tidelift"
}
],
"time": "2022-10-18T21:02:43+00:00"
"time": "2022-10-25T07:01:47+00:00"
},
{
"name": "league/flysystem-aws-s3-v3",
"version": "3.8.0",
"version": "3.10.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git",
"reference": "192c0e7f36fe4e5a79cce94f8359076630b641f8"
"reference": "95825edc5463006853e64338a4d96a977e8a10ca"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/192c0e7f36fe4e5a79cce94f8359076630b641f8",
"reference": "192c0e7f36fe4e5a79cce94f8359076630b641f8",
"url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/95825edc5463006853e64338a4d96a977e8a10ca",
"reference": "95825edc5463006853e64338a4d96a977e8a10ca",
"shasum": ""
},
"require": {
"aws/aws-sdk-php": "^3.132.4",
"league/flysystem": "^3.8.0",
"league/flysystem": "^3.10.0",
"league/mime-type-detection": "^1.0.0",
"php": "^8.0.2"
},
@ -5760,7 +5760,7 @@
],
"support": {
"issues": "https://github.com/thephpleague/flysystem-aws-s3-v3/issues",
"source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.8.0"
"source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.10.0"
},
"funding": [
{
@ -5776,7 +5776,7 @@
"type": "tidelift"
}
],
"time": "2022-10-18T06:40:06+00:00"
"time": "2022-10-20T21:00:57+00:00"
},
{
"name": "league/mime-type-detection",
@ -9524,16 +9524,16 @@
},
{
"name": "sentry/sentry",
"version": "3.9.1",
"version": "3.10.0",
"source": {
"type": "git",
"url": "https://github.com/getsentry/sentry-php.git",
"reference": "45b618b2265d11bc9b5a15f31bcc573a2dc3b956"
"reference": "2fdbda9b3569df08dd4a300db8a563d0ec7241f9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/getsentry/sentry-php/zipball/45b618b2265d11bc9b5a15f31bcc573a2dc3b956",
"reference": "45b618b2265d11bc9b5a15f31bcc573a2dc3b956",
"url": "https://api.github.com/repos/getsentry/sentry-php/zipball/2fdbda9b3569df08dd4a300db8a563d0ec7241f9",
"reference": "2fdbda9b3569df08dd4a300db8a563d0ec7241f9",
"shasum": ""
},
"require": {
@ -9578,7 +9578,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.9.x-dev"
"dev-master": "3.10.x-dev"
}
},
"autoload": {
@ -9612,7 +9612,7 @@
],
"support": {
"issues": "https://github.com/getsentry/sentry-php/issues",
"source": "https://github.com/getsentry/sentry-php/tree/3.9.1"
"source": "https://github.com/getsentry/sentry-php/tree/3.10.0"
},
"funding": [
{
@ -9624,7 +9624,7 @@
"type": "custom"
}
],
"time": "2022-10-11T09:00:25+00:00"
"time": "2022-10-19T09:28:02+00:00"
},
{
"name": "sentry/sentry-laravel",
@ -15350,16 +15350,16 @@
},
{
"name": "spatie/laravel-ignition",
"version": "1.5.2",
"version": "1.6.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-ignition.git",
"reference": "f2336fc79d99aab5cf27fa4aebe5e9c9ecf3808a"
"reference": "c21309ebf6657e0c38083afac8af9baa12885676"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/f2336fc79d99aab5cf27fa4aebe5e9c9ecf3808a",
"reference": "f2336fc79d99aab5cf27fa4aebe5e9c9ecf3808a",
"url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/c21309ebf6657e0c38083afac8af9baa12885676",
"reference": "c21309ebf6657e0c38083afac8af9baa12885676",
"shasum": ""
},
"require": {
@ -15436,7 +15436,7 @@
"type": "github"
}
],
"time": "2022-10-14T12:24:21+00:00"
"time": "2022-10-25T08:38:04+00:00"
},
{
"name": "theseer/tokenizer",

View File

@ -346,6 +346,31 @@ return [
],
],
Transaction::INCOME_SPLIT_TYPE => [
'group' => 'banking',
'route' => [
'prefix' => 'transactions', // core use with group + prefix, module ex. estimates
'parameter' => 'transaction', // banking/transactions/{parameter}/edit
//'create' => 'transactions.create', // if you change route, you can write full path
],
'permission' => [
'prefix' => 'transactions',
//'create' => 'create-banking-transactions',
],
'translation' => [
'prefix' => 'transactions', // this translation file name.
'related_document_amount' => 'invoices.invoice_amount',
'transactions' => 'general.incomes',
],
'contact_type' => 'customer',
'document_type' => 'invoice',
'email_template' => 'payment_received_customer',
'script' => [
'folder' => 'banking',
'file' => 'transactions',
],
],
Transaction::INCOME_RECURRING_TYPE => [
'group' => 'banking',
'route' => [
@ -424,6 +449,30 @@ return [
],
],
Transaction::EXPENSE_SPLIT_TYPE => [
'group' => 'banking',
'route' => [
'prefix' => 'transactions', // core use with group + prefix, module ex. estimates
'parameter' => 'transaction', // banking/transactions/{parameter}/edit
//'create' => 'transactions.create', // if you change route, you can write full path
],
'permission' => [
'prefix' => 'transactions',
//'create' => 'create-banking-transactions',
],
'translation' => [
'prefix' => 'transactions', // this translation file name.
'related_document_amount' => 'bills.bill_amount',
],
'contact_type' => 'vendor',
'document_type' => 'bill',
'email_template' => 'payment_made_vendor',
'script' => [
'folder' => 'banking',
'file' => 'transactions',
],
],
Transaction::EXPENSE_RECURRING_TYPE => [
'group' => 'banking',
'route' => [

12
presets.js vendored
View File

@ -252,6 +252,14 @@ module.exports = {
'0%': { boxShadow: '0 28px 0 -28px #55588b' },
'100%': { boxShadow: '0 28px 0 #55588b' },
},
marquee: {
'0%': { transform: 'translateX(0%)' },
'100%': { transform: 'translateX(-100%)' },
},
marquee_long: {
'0%': { transform: 'translateX(0%)' },
'100%': { transform: 'translateX(-350%)' },
}
},
animation: {
@ -260,7 +268,9 @@ module.exports = {
pulsate: 'pulsate 1500ms ease infinite;',
spin: 'spin 1000ms infinite',
submit: 'submit 0.7s ease alternate infinite',
submit_second: 'submit_second 0.7s ease alternate infinite'
submit_second: 'submit_second 0.7s ease alternate infinite',
marquee: 'marquee 9s linear infinite',
marquee_long: 'marquee_long 14s linear infinite'
},
transitionProperty: {

View File

@ -357,3 +357,84 @@ if (navigator.userAgent.search("Firefox") >= 0) {
}
}
//Firefox show modal for icon set
//margue animation for truncated text
function marqueeAnimation(truncate) {
if (truncate.closest('[disable-marquee]') !== null) {
truncate.parentElement.classList.add('truncate');
truncate.closest('[disable-marquee]').setAttribute('disable-marquee', 'data-disable-marquee');
return;
}
// offsetwidth = width of the text, clientWidth = width of parent text (div)
// because some index page has icons, we use two time parent element
if (truncate.children.length < 1 && truncate.offsetWidth > truncate.parentElement.clientWidth || truncate.offsetWidth > truncate.parentElement.parentElement.parentElement.clientWidth) {
truncate.addEventListener('mouseover', function () {
truncate.parentElement.style.animationPlayState = 'running';
if (truncate.offsetWidth > 400 && truncate.parentElement.clientWidth < 150) {
truncate.parentElement.classList.remove('animate-marquee');
truncate.parentElement.classList.add('animate-marquee_long');
} else {
truncate.parentElement.classList.remove('animate-marquee_long');
truncate.parentElement.classList.add('animate-marquee');
}
if (truncate.parentElement.classList.contains('truncate')) {
truncate.parentElement.classList.remove('truncate');
}
});
truncate.addEventListener('mouseout', function () {
truncate.parentElement.style.animationPlayState = 'paused';
truncate.parentElement.classList.remove('animate-marquee');
truncate.parentElement.classList.remove('animate-marquee_long');
truncate.parentElement.classList.add('truncate');
});
truncate.classList.add('truncate');
// if truncate has truncate class, text marquee animate doesn't pretty work
if (truncate.querySelector('.truncate') !== null && truncate.querySelector('.truncate').classList.contains('truncate')) {
let old_element = truncate.querySelector('.truncate');
let parent = old_element.parentNode;
let new_element = document.createElement('span');
new_element.innerHTML = old_element.innerHTML;
new_element.classList = old_element.classList;
parent.replaceChild(new_element, old_element);
}
// if truncate has truncate class, text marquee animate doesn't pretty work
// There needs to be two div for disable/enable icons. If I don't create this div, animation will work with disable/enable icons.-->
let animate_element = document.createElement('div');
animate_element.classList.add('truncate');
truncate.parentElement.append(animate_element);
animate_element.append(truncate);
// There needs to be two div for disable/enable icons. If I don't create this div, animation will work with disable/enable icons.-->
//there is overflow class for the animation does not overflow the width
truncate.parentElement.parentElement.classList.add('overflow-x-hidden');
}
}
document.querySelectorAll('[data-truncate-marquee]').forEach((truncate) => {
marqueeAnimation(truncate);
});
//disable/enable icons ejected from data-truncate-marquee, HTML of icons ejected from parent element (data-truncate-marquee)
document.querySelectorAll('[data-index-icon]').forEach((defaultText) => {
let icon_parents_element = defaultText.parentElement.parentElement.parentElement;
if (icon_parents_element.classList.contains('flex')) {
icon_parents_element.appendChild(defaultText);
} else {
icon_parents_element.parentElement.appendChild(defaultText);
}
// defaultText.parentElement.parentElement.parentElement.parentElement.appendChild(defaultText);
});
//disable/enable icons ejected from data-truncate-marquee
//margue animation for truncated text

158
public/css/app.css vendored
View File

@ -1618,6 +1618,36 @@ input[type="date"]::-webkit-inner-spin-button,
height: 4rem;
}
/* widget container name will change as lg:px-12 on database. When container class name change on database, this code will clean */
.dashboard .px-12{
padding-left: 0px;
padding-right: 0px;
}
@media (min-width: 1024px){
.dashboard .px-12{
padding-left: 3rem;
padding-right: 3rem;
}
}
.dashboard .px-6{
padding-left: 0px;
padding-right: 0px;
}
@media (min-width: 1024px){
.dashboard .px-6{
padding-left: 1.5rem;
padding-right: 1.5rem;
}
}
/* widget container name will change as lg:px-12 on database. When container class name change on database, this code will clean */
*, ::before, ::after{
--tw-translate-x: 0;
--tw-translate-y: 0;
@ -10273,6 +10303,62 @@ input[type="date"]::-webkit-inner-spin-button,
-webkit-animation: submit_second 0.7s ease alternate infinite;
animation: submit_second 0.7s ease alternate infinite;
}
@-webkit-keyframes marquee{
0%{
-webkit-transform: translateX(0%);
transform: translateX(0%);
}
100%{
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
}
}
@keyframes marquee{
0%{
-webkit-transform: translateX(0%);
transform: translateX(0%);
}
100%{
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
}
}
.animate-marquee{
-webkit-animation: marquee 9s linear infinite;
animation: marquee 9s linear infinite;
}
@-webkit-keyframes marquee_long{
0%{
-webkit-transform: translateX(0%);
transform: translateX(0%);
}
100%{
-webkit-transform: translateX(-350%);
transform: translateX(-350%);
}
}
@keyframes marquee_long{
0%{
-webkit-transform: translateX(0%);
transform: translateX(0%);
}
100%{
-webkit-transform: translateX(-350%);
transform: translateX(-350%);
}
}
.animate-marquee_long{
-webkit-animation: marquee_long 14s linear infinite;
animation: marquee_long 14s linear infinite;
}
.cursor-auto{
cursor: auto;
}
@ -51760,6 +51846,30 @@ body{
}
@media (min-width: 1024px){
.dashboard .lg\:px-12{
padding-left: 0px;
padding-right: 0px;
}
@media (min-width: 1024px){
.dashboard .lg\:px-12{
padding-left: 3rem;
padding-right: 3rem;
}
}
.dashboard .lg\:px-6{
padding-left: 0px;
padding-right: 0px;
}
@media (min-width: 1024px){
.dashboard .lg\:px-6{
padding-left: 1.5rem;
padding-right: 1.5rem;
}
}
.lg\:absolute{
position: absolute;
@ -51773,11 +51883,15 @@ body{
right: 0px;
}
<<<<<<< HEAD
.lg\:top-7{
top: 1.75rem;
}
.lg\:right-24{
=======
.lg\:right-24{
>>>>>>> a4ea448ef90c7eafacea3700bc7c83bdbb963165
right: 6rem;
}
@ -51799,12 +51913,16 @@ body{
margin-right: -3rem;
}
<<<<<<< HEAD
.lg\:my-16{
margin-top: 4rem;
margin-bottom: 4rem;
}
.lg\:my-0{
=======
.lg\:my-0{
>>>>>>> a4ea448ef90c7eafacea3700bc7c83bdbb963165
margin-top: 0px;
margin-bottom: 0px;
}
@ -51859,6 +51977,7 @@ body{
display: none;
}
<<<<<<< HEAD
.lg\:h-6{
height: 1.5rem;
}
@ -51872,6 +51991,9 @@ body{
}
.lg\:h-64{
=======
.lg\:h-64{
>>>>>>> a4ea448ef90c7eafacea3700bc7c83bdbb963165
height: 16rem;
}
@ -51903,11 +52025,15 @@ body{
width: 24rem;
}
<<<<<<< HEAD
.lg\:w-18{
width: 4.5rem;
}
.lg\:w-1\/2{
=======
.lg\:w-1\/2{
>>>>>>> a4ea448ef90c7eafacea3700bc7c83bdbb963165
width: 50%;
}
@ -51995,11 +52121,15 @@ body{
width: 75%;
}
<<<<<<< HEAD
.lg\:max-w-lg{
max-width: 32rem;
}
.lg\:max-w-7xl{
=======
.lg\:max-w-7xl{
>>>>>>> a4ea448ef90c7eafacea3700bc7c83bdbb963165
max-width: 80rem;
}
@ -52007,6 +52137,7 @@ body{
max-width: 72rem;
}
<<<<<<< HEAD
.lg\:grid-cols-2{
grid-template-columns: repeat(2, minmax(0, 1fr));
}
@ -52016,6 +52147,9 @@ body{
}
.lg\:flex-row{
=======
.lg\:flex-row{
>>>>>>> a4ea448ef90c7eafacea3700bc7c83bdbb963165
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
@ -52068,6 +52202,7 @@ body{
gap: 4rem;
}
<<<<<<< HEAD
.lg\:space-x-8 > :not([hidden]) ~ :not([hidden]){
--tw-space-x-reverse: 0;
margin-right: calc(2rem * var(--tw-space-x-reverse));
@ -52075,6 +52210,9 @@ body{
}
.lg\:space-y-0 > :not([hidden]) ~ :not([hidden]){
=======
.lg\:space-y-0 > :not([hidden]) ~ :not([hidden]){
>>>>>>> a4ea448ef90c7eafacea3700bc7c83bdbb963165
--tw-space-y-reverse: 0;
margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse)));
margin-bottom: calc(0px * var(--tw-space-y-reverse));
@ -52102,11 +52240,15 @@ body{
overflow: visible;
}
<<<<<<< HEAD
.lg\:overflow-x-hidden{
overflow-x: hidden;
}
.lg\:border-r{
=======
.lg\:border-r{
>>>>>>> a4ea448ef90c7eafacea3700bc7c83bdbb963165
border-right-width: 1px;
}
@ -52164,6 +52306,7 @@ body{
padding-right: 0px;
}
<<<<<<< HEAD
.lg\:text-6xl{
font-size: 2.5rem;
line-height: 2.75rem;
@ -52180,6 +52323,9 @@ body{
}
.lg\:text-8xl{
=======
.lg\:text-8xl{
>>>>>>> a4ea448ef90c7eafacea3700bc7c83bdbb963165
font-size: 3rem;
line-height: 3.25rem;
}
@ -52204,6 +52350,7 @@ body{
line-height: 1.75rem;
}
<<<<<<< HEAD
.lg\:leading-4{
line-height: 1rem;
}
@ -52217,6 +52364,13 @@ body{
}
[dir="ltr"] .lg\:ltr\:pr-12{
=======
[dir="ltr"] .lg\:ltr\:right-0{
right: 0px;
}
[dir="ltr"] .lg\:ltr\:pr-12{
>>>>>>> a4ea448ef90c7eafacea3700bc7c83bdbb963165
padding-right: 3rem;
}
@ -52236,11 +52390,15 @@ body{
left: 0px;
}
<<<<<<< HEAD
[dir="rtl"] .lg\:rtl\:mr-72{
margin-right: 18rem;
}
[dir="rtl"] .lg\:rtl\:pl-12{
=======
[dir="rtl"] .lg\:rtl\:pl-12{
>>>>>>> a4ea448ef90c7eafacea3700bc7c83bdbb963165
padding-left: 3rem;
}

View File

@ -2,7 +2,6 @@
<router-view
:translations="translations"
:currencies="currencies"
:taxes="taxes"
:modules="modules.data"
:currency_codes="currency_codes"
:company="company"
@ -21,7 +20,6 @@
this.countries = wizard_countries;
this.currencies = wizard_currencies;
this.currency_codes = wizard_currency_codes;
this.taxes = wizard_taxes;
this.modules = wizard_modules;
Object.keys(this.currency_codes).map((key) => {
@ -36,14 +34,12 @@
translations: {
company: {},
currencies: {},
taxes: {},
finish: {},
},
company: {},
countries: {},
currencies: [],
currency_codes: [],
taxes: [],
modules: {},
page_loaded: true
};

View File

@ -842,7 +842,8 @@ export default {
if (!check) {
this.sorted_options.push({
key: option.id.toString(),
value: (option.title) ? option.title : (option.display_name) ? option.display_name : option.name
value: (option.title) ? option.title : (option.display_name) ? option.display_name : option.name,
level: (option.parent_id) ? 1 : 0 // 0: parent, 1: child. Level data get 0 via backend. This control will refactor.
});
}

View File

@ -165,19 +165,19 @@ export default {
widthOptions: [
{
label: '25%',
value: 'w-full lg:w-1/4 px-6'
value: 'w-full lg:w-1/4 lg:px-6'
},
{
label: '33%',
value: 'w-full lg:w-1/3 px-6'
value: 'w-full lg:w-1/3 lg:px-6'
},
{
label: '50%',
value: 'w-full lg:w-2/4 px-12'
value: 'w-full lg:w-2/4 lg:px-12'
},
{
label: '100%',
value: 'w-full px-12'
value: 'w-full lg:px-12'
}
],
form: {

View File

@ -414,7 +414,7 @@
next() {
if (this.active++ > 2);
this.$router.push("/wizard/taxes");
this.$router.push("/wizard/finish");
},
},
};

View File

@ -128,7 +128,7 @@ export default {
prev() {
if (this.active-- > 2);
this.$router.push("/wizard/taxes");
this.$router.push("/wizard/currencies");
},
finish() {

View File

@ -28,19 +28,6 @@
</span>
</li>
<li class="w-1/4">
<span class="px-3 flex flex-col">
<span
:class="[{'bg-purple': active_state > 2}, {'bg-purple': active_state == 2}]"
class="w-full h-1 bg-gray-300 rounded-xl text-transparent"
>Text</span>
<span :class="[{'font-bold': active_state == 2}, {'font-bold': active_state > 2}]" class="text-sm font-normal mt-2">
{{ translations.taxes.title }}
</span>
</span>
</li>
<li class="w-1/4">
<span class="pl-6 flex flex-col">
<span
@ -79,7 +66,6 @@
translations: {
company: {},
currencies: {},
taxes: {},
finish: {},
},
};

View File

@ -1,269 +0,0 @@
<template>
<div class="relative bg-body z-10 rounded-lg shadow-2xl p-10" style="height:675px;">
<WizardSteps :active_state="active"></WizardSteps>
<div class="flex flex-col justify-between overflow-y-auto" style="height: calc(100% - 53px)">
<div v-if="pageLoad" class="absolute left-0 right-0 top-0 bottom-0 w-full h-full bg-white rounded-lg flex items-center justify-center z-50">
<span class="material-icons form-spin animate-spin text-9xl">data_usage</span>
</div>
<div class="overflow-x-visible menu-scroll mt-1">
<form ref="form" class="py-2 align-middle inline-block min-w-full">
<table id="tbl-taxes" v-if="taxes.length" class="min-w-full divide-y divide-gray-200">
<thead class="thead-light">
<tr class="flex items-center px-1">
<th class="w-6/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-left rtl:text-right text-xs font-medium text-black tracking-wider">
{{ translations.taxes.name }}
</th>
<th class="w-6/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-right rtl:text-left text-xs font-medium text-black tracking-wider">
{{ translations.taxes.rate }}
</th>
</tr>
</thead>
<tbody data-table-body>
<tr v-for="(item, index) in taxes" :key="index" data-table-list class="relative flex items-center border-b hover:bg-gray-100 px-1 flex-wrap group">
<td :class="current_tab == index ? 'hidden' : ''" class="w-6/12 ltr:pr-6 rtl:pl-6 py-4 ltr:text-left rtl:text-right whitespace-nowrap text-sm font-medium text-black">
{{ item.name }}
</td>
<td :class="current_tab == index ? 'hidden' : ''" class="w-6/12 relative ltr:pr-6 rtl:pl-6 py-4 ltr:text-right rtl:text-left whitespace-nowrap text-sm font-medium text-black">
{{ item.rate }}
<div class="absolute ltr:right-12 rtl:left-12 -top-4 hidden items-center group-hover:flex">
<button type="button" class="relative bg-white hover:bg-gray-100 border py-0.5 px-1 cursor-pointer index-actions " @click="onEditItem(item, index)">
<span class="material-icons-outlined text-purple text-lg">edit</span>
<div class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm opacity-0 whitespace-nowrap tooltip-content -top-10 -left-2" data-tooltip-placement="top">
<span>{{ translations.taxes.edit }}</span>
<div class="absolute w-2 h-2 -bottom-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-t-0 before:border-l-0" data-popper-arrow></div>
</div>
</button>
<button type="button" class="relative bg-white hover:bg-gray-100 border py-0.5 px-1 cursor-pointer index-actions " @click="onClickDelete(item)">
<span class="material-icons-outlined text-purple text-lg">delete</span>
<div class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm opacity-0 whitespace-nowrap tooltip-content -top-10 -left-2" data-tooltip-placement="top">
<span>{{ translations.taxes.delete }}</span>
<div class="absolute w-2 h-2 -bottom-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-t-0 before:border-l-0" data-popper-arrow></div>
</div>
</button>
</div>
</td>
<td class="w-full p-0 current-tab" v-if="current_tab == index">
<div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 py-3">
<base-input name="name" data-name="name" :placeholder="translations.taxes.name"
form-classes="sm:col-span-2"
v-model="model.name"
:error="onFailErrorGet('name')"
/>
<div class="sm:col-span-2"></div>
<base-input name="rate" data-name="rate" :placeholder="translations.taxes.rate"
form-classes="sm:col-span-2"
v-model="model.rate"
:error="onFailErrorGet('rate')"
/>
<div class="flex justify-end items-center sm:col-span-6">
<base-button class="flex items-center justify-center px-6 py-1.5 text-base rounded-lg bg-transparent hover:bg-gray-100 ltr:mr-2 rtl:ml-2" @click="onCancelItem()">
{{ translations.taxes.cancel }}
</base-button>
<button
type="submit"
:disabled="button_loading"
class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100"
@click="onEditForm(item, $event)"
>
<i v-if="button_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]"></i>
<span :class="[{'opacity-0': button_loading}]">
{{ translations.taxes.save }}
</span>
</button>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<div class="flex flex-col items-center">
<div v-if="!taxes.length" class="flex flex-col items-center gap-y-2">
<span class="text-dark">
{{ translations.taxes.no_taxes }}
</span>
<span class="text-gray-700">
{{ translations.taxes.create_task }}
</span>
</div>
<div v-if="taxes.length" class="w-full border-b hover:bg-gray-100" style="height:53px;">
<button type="button" class="w-full h-full flex items-center justify-center text-purple font-medium disabled:bg-gray-200" @click="onAddItem()">
<span class="material-icons-outlined text-base font-bold ltr:mr-1 rtl:ml-1 pointer-events-none">add</span>
{{ translations.taxes.new_tax }}
</button>
</div>
<button v-else type="button" class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100 mt-3" @click="onAddItem()">
{{ translations.taxes.new_tax }}
</button>
</div>
<div v-if="new_datas" class="grid sm:grid-cols-4 gap-x-8 gap-y-6 my-3.5 w-full">
<base-input :label="translations.taxes.name" name="name" data-name="name" :placeholder="translations.taxes.name"
class="sm:col-span-2"
v-model="model.name"
:error="onFailErrorGet('name')"
/>
<base-input :label="translations.taxes.rate" name="rate" data-name="rate"
:placeholder="translations.taxes.rate"
class="sm:col-span-2"
v-model="model.rate"
:error="onFailErrorGet('rate')"
/>
<div class="flex items-center justify-end sm:col-span-4">
<base-button class="flex items-center justify-center px-6 py-1.5 text-base rounded-lg bg-transparent hover:bg-gray-100 ltr:mr-2 rtl:ml-2" @click="new_datas = false">
{{ translations.taxes.cancel }}
</base-button>
<button type="submit" :disabled="button_loading" class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100" @click="onSubmitForm($event)">
<i v-if="button_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]"></i>
<span :class="[{'opacity-0': button_loading}]">
{{ translations.taxes.save }}
</span>
</button>
</div>
</div>
</form>
</div>
<div class="flex items-center justify-center mt-5 gap-x-10">
<base-button class="w-1/2 flex items-center justify-center px-6 py-1.5 text-base rounded-lg bg-transparent hover:bg-gray-100" @click="prev()">
{{ translations.taxes.previous }}
</base-button>
<base-button class="w-1/2 relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100" @click="next()">
{{ translations.taxes.next }}
</base-button>
</div>
</div>
<notifications></notifications>
<form id="form-dynamic-component" method="POST" action="#"></form>
<component v-bind:is="component" @deleted="onDeleteCurrency($event)"></component>
</div>
</template>
<script>
import AkauntingRadioGroup from "./../../components/AkauntingRadioGroup";
import BulkAction from "./../../plugins/bulk-action";
import MixinsGlobal from "./../../mixins/global";
import WizardAction from "./../../mixins/wizardAction";
import WizardSteps from "./Steps.vue";
export default {
name: "Taxes",
mixins: [MixinsGlobal, WizardAction],
components: {
AkauntingRadioGroup,
WizardSteps
},
props: {
taxes: {
type: [Object, Array],
},
translations: {
type: [Object, Array],
},
pageLoad: {
type: [Boolean, String]
}
},
data() {
return {
active: 2,
bulk_action: new BulkAction(url + "/settings/taxes"),
add_taxes: true,
new_add_taxes: false
};
},
methods: {
onClickDelete(item) {
this.confirmDelete(
`${
new URL(url).protocol +
"//" +
location.host +
location.pathname +
"/" +
item.id
}`,
this.translations.taxes.title,
`${
this.translations.currencies.title +
"&nbsp;" +
this.translations.currencies.delete
} <strong>${item.name}</strong>?`,
this.translations.taxes.cancel,
this.translations.taxes.delete
);
},
onDeleteCurrency(event) {
this.onEjetItem(event, this.taxes, event.tax_id);
},
onEditForm(item, event) {
event.preventDefault();
this.onSubmitEvent(
"PATCH",
url + "/wizard/taxes/" + item.id,
"type",
this.taxes,
item.id
);
},
onNewTax() {
this.new_add_taxes = true;
this.add_taxes = false;
},
onCancelNewTax() {
this.new_add_taxes = false;
this.add_taxes = true;
},
onSubmitForm(event) {
event.preventDefault();
this.onSubmitEvent("POST", url + "/wizard/taxes", "type", this.taxes);
},
prev() {
if (this.active-- > 2);
this.$router.push("/wizard/currencies");
},
next() {
if (this.active++ > 2);
this.$router.push("/wizard/finish");
},
},
};
</script>

View File

@ -10,7 +10,6 @@ Vue.use(VueRouter);
import Wizard from './Wizard.vue';
import Company from './views/wizard/Company.vue';
import Currencies from './views/wizard/Currencies.vue';
import Taxes from './views/wizard/Taxes.vue';
import Finish from './views/wizard/Finish.vue';
var global_path = new URL(url).protocol + '//' + window.location.host;
@ -18,7 +17,9 @@ var base_path = url.replace(global_path, '');
const router = new VueRouter({
mode: 'history',
base: base_path,
routes: [
{
path: '/wizard',
@ -35,18 +36,15 @@ const router = new VueRouter({
name: 'Currencies',
component: Currencies
},
{
path: '/wizard/taxes',
name: 'Taxes',
component: Taxes
},
{
path: '/wizard/finish',
name: 'Finish',
component: Finish
}
],
linkActiveClass: 'active',
scrollBehavior: (to, from ,savedPosition) => {
if (savedPosition) {
return savedPosition;

View File

@ -203,6 +203,15 @@
overflow: hidden;
height: 4rem;
}
/* widget container name will change as lg:px-12 on database. When container class name change on database, this code will clean */
.dashboard .px-12 {
@apply px-0 lg:pl-12 lg:pr-12;
}
.dashboard .px-6 {
@apply px-0 lg:pl-6 lg:pr-6;
}
/* widget container name will change as lg:px-12 on database. When container class name change on database, this code will clean */
}
/* menu */

View File

@ -58,11 +58,11 @@
<x-table.td class="w-4/12 sm:w-5/12">
<div class="flex items-center space-x-2">
@if (setting('default.use_gravatar', '0') == '1')
<img src="{{ $item->picture }}" class="w-6 h-6 rounded-full mr-2 hidden lg:block" title="{{ $item->name }}" alt="{{ $item->name }}">
<img src="{{ $item->picture }}" class="w-6 h-6 rounded-full mr-2 hidden lg:block text-transparent" title="{{ $item->name }}" alt="{{ $item->name }}">
@elseif (is_object($item->picture))
<img src="{{ Storage::url($item->picture->id) }}" class="w-6 h-6 rounded-full mr-2 hidden lg:block" alt="{{ $item->name }}" title="{{ $item->name }}">
<img src="{{ Storage::url($item->picture->id) }}" class="w-6 h-6 rounded-full mr-2 hidden lg:block text-transparent" alt="{{ $item->name }}" title="{{ $item->name }}">
@else
<img src="{{ asset('public/img/user.svg') }}" class="w-6 h-6 rounded-full mr-2 hidden lg:block" alt="{{ $item->name }}"/>
<img src="{{ asset('public/img/user.svg') }}" class="w-6 h-6 rounded-full mr-2 hidden lg:block text-transparent" alt="{{ $item->name }}"/>
@endif
{{ !empty($item->name) ? $item->name : trans('general.na') }}

View File

@ -64,9 +64,7 @@
<x-table.td class="w-6/12 sm:w-5/12">
<x-slot name="first" class="flex font-bold">
<div class="truncate">
{{ $item->name }}
</div>
@if (! $item->enabled)
<x-index.disable text="{{ trans_choice('general.accounts', 1) }}" />

View File

@ -82,13 +82,18 @@
<x-table.td kind="amount" class="none-truncate">
@php
$reconciliation_transactions = [];
$type = $item->isIncome() ? 'income' : 'expense';
$name = $type . '_' . $item->id;
$checked = $item->reconciled;
if (! $reconciliation->reconciled && array_key_exists($name, $reconciliation->transactions)) {
$checked = (empty($reconciliation->transactions[$name]) || $reconciliation->transactions[$name] === 'false') ? 0 : 1;
if (! empty($reconciliation->transactions)) {
$reconciliation_transactions = $reconciliation->transactions;
}
if (! $reconciliation->reconciled && array_key_exists($name, $reconciliation_transactions)) {
$checked = (empty($reconciliation_transactions[$name]) || $reconciliation_transactions[$name] === 'false') ? 0 : 1;
}
@endphp

View File

@ -1,5 +1,7 @@
<x-layouts.admin>
<x-slot name="title">{{ trans('general.title.new', ['type' => trans_choice('general.companies', 1)]) }}</x-slot>
<x-slot name="title">
{{ trans('general.title.new', ['type' => trans_choice('general.companies', 1)]) }}
</x-slot>
<x-slot name="content">
<x-form.container>
@ -10,47 +12,11 @@
</x-slot>
<x-slot name="body">
<div class="sm:col-span-3 grid gap-x-8 gap-y-6 grid-rows-3">
<x-form.group.text name="name" label="{{ trans('general.name') }}" />
<x-form.group.email name="email" label="{{ trans('general.email') }}" />
<x-form.group.text name="phone" label="{{ trans('settings.company.phone') }}" value="{{ setting('company.phone') }}" not-required />
</div>
<div class="sm:col-span-3">
<x-form.group.file name="logo" label="{{ trans('companies.logo') }}" not-required />
</div>
</x-slot>
</x-form.section>
<x-form.section>
<x-slot name="head">
<x-form.section.head title="{{ trans('items.billing') }}" description="{{ trans('companies.form_description.billing') }}" />
</x-slot>
<x-slot name="body">
<x-form.group.text name="tax_number" label="{{ trans('general.tax_number') }}" not-required />
<x-form.group.currency name="currency" />
<x-form.group.locale not-required />
</x-slot>
</x-form.section>
<x-form.section>
<x-slot name="head">
<x-form.section.head title="{{ trans('general.address') }}" description="{{ trans('companies.form_description.address') }}" />
</x-slot>
<x-slot name="body">
<x-form.group.textarea name="address" label="{{ trans('general.address') }}" v-model="form.address" not-required />
<x-form.group.text name="city" label="{{ trans_choice('general.cities', 1) }}" value="{{ setting('company.city') }}" not-required />
<x-form.group.text name="zip_code" label="{{ trans('general.zip_code') }}" value="{{ setting('company.zip_code') }}" not-required />
<x-form.group.text name="state" label="{{ trans('general.state') }}" value="{{ setting('company.state') }}" not-required />
<x-form.group.currency name="currency" :options="$currencies" without-add-new />
<x-form.group.country />
</x-slot>

View File

@ -10,47 +10,11 @@
</x-slot>
<x-slot name="body">
<div class="sm:col-span-3 grid gap-x-8 gap-y-6 grid-rows-3">
<x-form.group.text name="name" label="{{ trans('general.name') }}" />
<x-form.group.email name="email" label="{{ trans('general.email') }}" />
<x-form.group.text name="phone" label="{{ trans('settings.company.phone') }}" not-required />
</div>
<div class="sm:col-span-3">
<x-form.group.file name="logo" label="{{ trans('companies.logo') }}" :value="$company->company_logo" not-required />
</div>
</x-slot>
</x-form.section>
<x-form.section>
<x-slot name="head">
<x-form.section.head title="{{ trans('items.billing') }}" description="{{ trans('companies.form_description.billing') }}" />
</x-slot>
<x-slot name="body">
<x-form.group.text name="tax_number" label="{{ trans('general.tax_number') }}" not-required />
<x-form.group.currency name="currency" selected="{{ ! empty($company->currency) ? $company->currency : config('setting.fallback.default.currency') }}" />
<x-form.group.locale not-required />
</x-slot>
</x-form.section>
<x-form.section>
<x-slot name="head">
<x-form.section.head title="{{ trans('general.address') }}" description="{{ trans('companies.form_description.address') }}" />
</x-slot>
<x-slot name="body">
<x-form.group.textarea name="address" label="{{ trans('general.address') }}" not-required v-model="form.address" />
<x-form.group.text name="city" label="{{ trans_choice('general.cities', 1) }}" not-required />
<x-form.group.text name="zip_code" label="{{ trans('general.zip_code') }}" not-required />
<x-form.group.text name="state" label="{{ trans('general.state') }}" not-required />
<x-form.group.currency name="currency" :options="$currencies" selected="{{ ! empty($company->currency) ? $company->currency : config('setting.fallback.default.currency') }}" without-add-new />
<x-form.group.country />
</x-slot>

View File

@ -84,16 +84,14 @@
</x-table.td>
<x-table.td class="w-6/12 sm:w-4/12">
<x-slot name="first" class="flex items-center font-bold" override="class">
<div class="truncate">
<x-slot name="first" class="font-bold" override="class">
{{ $item->name }}
</div>
@if (! $item->enabled)
<x-index.disable text="{{ trans_choice('general.items', 1) }}" />
@endif
</x-slot>
<x-slot name="second" class="font-normal truncate" override="class">
<x-slot name="second" class="font-normal" override="class">
{{ $item->description }}
</x-slot>
</x-table.td>

View File

@ -1,4 +1,4 @@
<x-form.accordion type="company">
<x-form.accordion type="company" :open="(! $hideLogo && empty(setting('company.logo')))">
<x-slot name="head">
<x-form.accordion.head
title="{{ trans_choice($textSectionCompaniesTitle, 1) }}"

View File

@ -139,6 +139,10 @@
@visible-change="{{ $attributes['visible-change'] }}"
@endif
@if (! empty($attributes['clear']))
@clear="{{ $attributes['clear'] }}($event)"
@endif
@if (isset($attributes['readonly']))
:readonly="{{ $attributes['readonly'] }}"
@endif

View File

@ -1,3 +1,4 @@
<div class="flex items-center">
<span @class([
'w-3 h-3 rounded-full ltr:mr-1 rtl:ml-1', $backgroundColor, $textColor
])
@ -7,3 +8,4 @@
>
</span>
<span class="w-24 truncate">{{ $name }}</span>
</div>

View File

@ -1,5 +1,7 @@
<div data-index-icon>
<x-tooltip id="{{ $id }}" placement="{{ $position }}" message="{{ $text }}">
<span class="material-icons{{ $iconType }} text-purple text-sm ml-2">
{{ $icon }}
</span>
</x-tooltip>
</div>

View File

@ -1,5 +1,7 @@
<div data-index-icon>
<x-tooltip id="{{ $id }}" placement="{{ $position }}" message="{{ $disableText }}">
<span class="material-icons{{ $iconType }} text-red text-sm ml-2">
{{ $icon }}
</span>
</x-tooltip>
</div>

View File

@ -40,9 +40,9 @@
</span>
@if (setting('default.use_gravatar', '0') == '1')
<img src="{{ user()->picture }}" alt="{{ user()->name }}" class="w-8 h-8 m-auto rounded-full" alt="{{ user()->name }}" title="{{ user()->name }}">
<img src="{{ user()->picture }}" alt="{{ user()->name }}" class="w-8 h-8 m-auto rounded-full text-transparent" alt="{{ user()->name }}" title="{{ user()->name }}">
@elseif (is_object(user()->picture))
<img src="{{ Storage::url(user()->picture->id) }}" class="w-8 h-8 m-auto rounded-full" alt="{{ user()->name }}" title="{{ user()->name }}">
<img src="{{ Storage::url(user()->picture->id) }}" class="w-8 h-8 m-auto rounded-full text-transparent" alt="{{ user()->name }}" title="{{ user()->name }}">
@else
<span id="menu-profile-icon" name="account_circle" class="material-icons-outlined text-purple w-8 h-8 flex items-center justify-center text-center text-2xl pointer-events-none" alt="{{ user()->name }}" title="{{ user()->name }}">
account_circle

View File

@ -24,9 +24,9 @@
</span>
@if (setting('default.use_gravatar', '0') == '1')
<img src="{{ user()->picture }}" alt="{{ user()->name }}" class="w-8 h-8 m-auto rounded-full" alt="{{ user()->name }}" title="{{ user()->name }}">
<img src="{{ user()->picture }}" alt="{{ user()->name }}" class="w-8 h-8 m-auto rounded-full text-transparent" alt="{{ user()->name }}" title="{{ user()->name }}">
@elseif (is_object(user()->picture))
<img src="{{ Storage::url(user()->picture->id) }}" class="w-8 h-8 m-auto rounded-full" alt="{{ user()->name }}" title="{{ user()->name }}">
<img src="{{ Storage::url(user()->picture->id) }}" class="w-8 h-8 m-auto rounded-full text-transparent" alt="{{ user()->name }}" title="{{ user()->name }}">
@else
<span name="account_circle" class="material-icons-outlined text-purple w-8 h-8 flex items-center justify-center text-center text-2xl pointer-events-none" alt="{{ user()->name }}" title="{{ user()->name }}">
account_circle

View File

@ -10,7 +10,6 @@
var wizard_countries = {!! json_encode(trans('countries')) !!};
var wizard_currencies = {!! json_encode($currencies) !!};
var wizard_currency_codes = {!! json_encode($currency_codes) !!};
var wizard_taxes = {!! json_encode($taxes) !!};
var wizard_modules = {!! json_encode($modules) !!};
</script>

View File

@ -1,6 +1,6 @@
<div class="overflow-x-visible">
<div class="py-2 align-middle">
<table class="flex flex-col divide-y divide-gray-200">
<table class="flex flex-col divide-y divide-gray-200" {{ $attributes }}>
{{ $slot }}
</table>
</div>

View File

@ -8,7 +8,13 @@
}
@endphp
<div {{ $first_attributes }}>
<!--so that the animation does not overflow the width. With javascript will add (overflow-x-hidden) class name-->
<div>
<!-- this tag use for calculate width of text and parent element -->
<span data-truncate-marquee>
{!! $first !!}
</span>
</div>
</div>
@endif
@ -21,9 +27,18 @@
}
@endphp
<div {{ $second_attributes }}>
<div>
<span data-truncate-marquee>
{!! $second !!}
</span>
</div>
</div>
@endif
<div>
<span data-truncate-marquee>
{{ $slot }}
</span>
</div>
</td>

View File

@ -8,7 +8,13 @@
}
@endphp
<div {{ $first_attributes }}>
<!--so that the animation does not overflow the width. With javascript will add (overflow-x-hidden) class name-->
<div>
<!-- this tag use for calculate width of text and parent element -->
<span data-truncate-marquee>
{!! $first !!}
</span>
</div>
</div>
@endif
@ -21,9 +27,17 @@
}
@endphp
<div {{ $second_attributes }}>
<div>
<span data-truncate-marquee>
{!! $second !!}
</span>
</div>
</div>
@endif
<div>
<span data-truncate-marquee>
{{ $slot }}
</span>
</div>
</th>

View File

@ -57,7 +57,7 @@
</x-table.td>
<x-table.td class="w-6/12 sm:w-4/12">
<x-slot name="first" class="flex" override="class">
<x-slot name="first" class="flex font-bold" override="class">
<div class="font-bold truncate">
{{ $item->name }}
</div>

View File

@ -1,7 +0,0 @@
<x-layouts.wizard>
<x-slot name="title">
{{ trans('general.wizard') }}
</x-slot>
<x-slot name="content"></x-slot>
</x-layouts.wizard>

View File

@ -16,10 +16,6 @@ Route::group(['as' => 'wizard.'], function () {
Route::get('currencies/{currency}/disable', 'Settings\Currencies@disable')->name('currencies.disable');
Route::resource('currencies', 'Wizard\Currencies');
Route::get('taxes/{tax}/enable', 'Settings\Taxes@enable')->name('taxes.enable');
Route::get('taxes/{tax}/disable', 'Settings\Taxes@disable')->name('taxes.disable');
Route::resource('taxes', 'Wizard\Taxes');
Route::get('finish', 'Wizard\Finish@index')->name('finish.index');
Route::patch('finish', 'Wizard\Finish@update')->name('finish.update');
});

View File

@ -1,79 +0,0 @@
<?php
namespace Tests\Feature\Wizard;
use App\Jobs\Setting\CreateTax;
use App\Models\Setting\Tax;
use Tests\Feature\FeatureTestCase;
class TaxesTest extends FeatureTestCase
{
public function testItShouldSeeTaxListPage()
{
$this->loginAs()
->get(route('wizard.taxes.index'))
->assertStatus(200)
->assertSeeText(trans('general.wizard'));
}
public function testItShouldCreateTax()
{
$request = $this->getRequest();
$message = trans('messages.success.added', ['type' => trans_choice('general.taxes', 1)]);
$this->loginAs()
->post(route('wizard.taxes.store'), $request)
->assertStatus(200)
->assertJson([
'success' => true,
'message' => $message,
]);
$this->assertDatabaseHas('taxes', $request);
}
public function testItShouldUpdateTax()
{
$request = $this->getRequest();
$tax = $this->dispatch(new CreateTax($request));
$request['name'] = $this->faker->text(15);
$message = trans('messages.success.updated', ['type' => $request['name']]);
$this->loginAs()
->patch(route('wizard.taxes.update', $tax->id), $request)
->assertStatus(200)
->assertJson([
'success' => true,
'message' => $message,
]);
$this->assertDatabaseHas('taxes', $request);
}
public function testItShouldDeleteTax()
{
$request = $this->getRequest();
$tax = $this->dispatch(new CreateTax($request));
$message = trans('messages.success.deleted', ['type' => $tax->name]);
$this->loginAs()
->delete(route('wizard.taxes.destroy', $tax->id))
->assertStatus(200)
->assertJson([
'success' => true,
'message' => $message,
]);
$this->assertDatabaseHas('taxes', $request);
}
public function getRequest()
{
return Tax::factory()->enabled()->raw();
}
}