Merge branch 'akaunting:master' into master
This commit is contained in:
commit
d7ac71cc22
@ -42,7 +42,20 @@ class Accounts extends Controller
|
||||
->orWhereHas('income_transaction', fn ($query) => $query->where('account_id', $account->id))
|
||||
->collect(['expense_transaction.paid_at' => 'desc']);
|
||||
|
||||
return view('banking.accounts.show', compact('account', 'transactions', 'transfers'));
|
||||
$incoming_amount = money($account->income_balance, $account->currency_code, true);
|
||||
$outgoing_amount = money($account->expense_balance, $account->currency_code, true);
|
||||
$current_amount = money($account->balance, $account->currency_code, true);
|
||||
|
||||
$summary_amounts = [
|
||||
'incoming_exact' => $incoming_amount->format(),
|
||||
'incoming_for_humans' => $incoming_amount->formatForHumans(),
|
||||
'outgoing_exact' => $outgoing_amount->format(),
|
||||
'outgoing_for_humans' => $outgoing_amount->formatForHumans(),
|
||||
'current_exact' => $current_amount->format(),
|
||||
'current_for_humans' => $current_amount->formatForHumans(),
|
||||
];
|
||||
|
||||
return view('banking.accounts.show', compact('account', 'transactions', 'transfers', 'summary_amounts'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -155,7 +155,7 @@ class Tiles extends Controller
|
||||
$modules = $this->getSearchModules($data);
|
||||
$installed = Module::all()->pluck('enabled', 'alias')->toArray();
|
||||
|
||||
return view('modules.tiles.index', compact('title', 'modules', 'keyword', 'installed'));
|
||||
return $this->response('modules.tiles.index', compact('modules', 'title', 'keyword', 'installed'));
|
||||
}
|
||||
|
||||
public function loadMore($type, Request $request)
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Utilities;
|
||||
|
||||
use Akaunting\Money\Money;
|
||||
use App\Models\Setting\Currency;
|
||||
|
||||
class Overrider
|
||||
@ -58,6 +59,9 @@ class Overrider
|
||||
app()->setLocale($locale);
|
||||
}
|
||||
|
||||
// Set locale for Money package
|
||||
Money::setLocale(app()->getLocale());
|
||||
|
||||
// Set app url dynamically if empty
|
||||
if (! config('app.url')) {
|
||||
config(['app.url' => url('/')]);
|
||||
|
88
composer.lock
generated
88
composer.lock
generated
@ -413,16 +413,16 @@
|
||||
},
|
||||
{
|
||||
"name": "akaunting/laravel-money",
|
||||
"version": "3.0.1",
|
||||
"version": "3.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/akaunting/laravel-money.git",
|
||||
"reference": "22336631239eb008e26d322faa208cbc50757a38"
|
||||
"reference": "a4a3a204250a1185080c9cf0fe6f7f50d0e144cf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/akaunting/laravel-money/zipball/22336631239eb008e26d322faa208cbc50757a38",
|
||||
"reference": "22336631239eb008e26d322faa208cbc50757a38",
|
||||
"url": "https://api.github.com/repos/akaunting/laravel-money/zipball/a4a3a204250a1185080c9cf0fe6f7f50d0e144cf",
|
||||
"reference": "a4a3a204250a1185080c9cf0fe6f7f50d0e144cf",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -475,9 +475,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/akaunting/laravel-money/issues",
|
||||
"source": "https://github.com/akaunting/laravel-money/tree/3.0.1"
|
||||
"source": "https://github.com/akaunting/laravel-money/tree/3.1.0"
|
||||
},
|
||||
"time": "2022-05-11T06:34:38+00:00"
|
||||
"time": "2022-07-19T11:23:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "akaunting/laravel-mutable-observer",
|
||||
@ -907,16 +907,16 @@
|
||||
},
|
||||
{
|
||||
"name": "aws/aws-sdk-php",
|
||||
"version": "3.231.6",
|
||||
"version": "3.231.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||
"reference": "54c5fe6667c73010d954ce4c4d657d093f0bdcbf"
|
||||
"reference": "99b3e4585ac82a6e9ab6d1944d90231456fefbea"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/54c5fe6667c73010d954ce4c4d657d093f0bdcbf",
|
||||
"reference": "54c5fe6667c73010d954ce4c4d657d093f0bdcbf",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/99b3e4585ac82a6e9ab6d1944d90231456fefbea",
|
||||
"reference": "99b3e4585ac82a6e9ab6d1944d90231456fefbea",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -993,9 +993,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.231.6"
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.231.8"
|
||||
},
|
||||
"time": "2022-07-14T18:20:54+00:00"
|
||||
"time": "2022-07-18T18:20:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "balping/json-raw-encoder",
|
||||
@ -5038,16 +5038,16 @@
|
||||
},
|
||||
{
|
||||
"name": "league/commonmark",
|
||||
"version": "2.3.3",
|
||||
"version": "2.3.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/commonmark.git",
|
||||
"reference": "0da1dca5781dd3cfddbe328224d9a7a62571addc"
|
||||
"reference": "155ec1c95626b16fda0889cf15904d24890a60d5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/0da1dca5781dd3cfddbe328224d9a7a62571addc",
|
||||
"reference": "0da1dca5781dd3cfddbe328224d9a7a62571addc",
|
||||
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/155ec1c95626b16fda0889cf15904d24890a60d5",
|
||||
"reference": "155ec1c95626b16fda0889cf15904d24890a60d5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -5140,7 +5140,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-06-07T21:28:26+00:00"
|
||||
"time": "2022-07-17T16:25:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/config",
|
||||
@ -5226,16 +5226,16 @@
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "3.1.0",
|
||||
"version": "3.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "34a68067b7ae3b836ea5e57e1fc432478372a4f5"
|
||||
"reference": "1a941703dfb649f9b821e7bc425e782f576a805e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/34a68067b7ae3b836ea5e57e1fc432478372a4f5",
|
||||
"reference": "34a68067b7ae3b836ea5e57e1fc432478372a4f5",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/1a941703dfb649f9b821e7bc425e782f576a805e",
|
||||
"reference": "1a941703dfb649f9b821e7bc425e782f576a805e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -5296,7 +5296,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/flysystem/issues",
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/3.1.0"
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/3.1.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -5312,25 +5312,25 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-06-29T17:29:54+00:00"
|
||||
"time": "2022-07-18T09:59:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem-aws-s3-v3",
|
||||
"version": "3.0.22",
|
||||
"version": "3.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git",
|
||||
"reference": "e5fc508faf83df2fbd2a215d2b4bea9584906221"
|
||||
"reference": "fa46ce9fbad9bfc73d8b160ffeb2c1793fe9c73b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/e5fc508faf83df2fbd2a215d2b4bea9584906221",
|
||||
"reference": "e5fc508faf83df2fbd2a215d2b4bea9584906221",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/fa46ce9fbad9bfc73d8b160ffeb2c1793fe9c73b",
|
||||
"reference": "fa46ce9fbad9bfc73d8b160ffeb2c1793fe9c73b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"aws/aws-sdk-php": "^3.132.4",
|
||||
"league/flysystem": "^2.0.0 || ^3.0.0",
|
||||
"league/flysystem": "^3.0.0",
|
||||
"league/mime-type-detection": "^1.0.0",
|
||||
"php": "^8.0.2"
|
||||
},
|
||||
@ -5366,9 +5366,23 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/flysystem-aws-s3-v3/issues",
|
||||
"source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.0.22"
|
||||
"source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.1.1"
|
||||
},
|
||||
"time": "2022-06-29T07:09:46+00:00"
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://offset.earth/frankdejonge",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/frankdejonge",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/league/flysystem",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-07-18T09:31:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/mime-type-detection",
|
||||
@ -7522,16 +7536,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpoffice/phpspreadsheet",
|
||||
"version": "1.24.0",
|
||||
"version": "1.24.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
|
||||
"reference": "ebe8745c92a7cac4514d040758393b5399633b83"
|
||||
"reference": "69991111e05fca3ff7398e1e7fca9ebed33efec6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/ebe8745c92a7cac4514d040758393b5399633b83",
|
||||
"reference": "ebe8745c92a7cac4514d040758393b5399633b83",
|
||||
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/69991111e05fca3ff7398e1e7fca9ebed33efec6",
|
||||
"reference": "69991111e05fca3ff7398e1e7fca9ebed33efec6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -7620,9 +7634,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
|
||||
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.24.0"
|
||||
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.24.1"
|
||||
},
|
||||
"time": "2022-07-09T13:49:09+00:00"
|
||||
"time": "2022-07-18T19:50:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpoption/phpoption",
|
||||
@ -14115,5 +14129,5 @@
|
||||
"ext-zip": "*"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.3.0"
|
||||
"plugin-api-version": "2.2.0"
|
||||
}
|
||||
|
39
resources/assets/js/views/modules/apps.js
vendored
39
resources/assets/js/views/modules/apps.js
vendored
@ -29,6 +29,10 @@ const app = new Vue({
|
||||
AkauntingSlider
|
||||
},
|
||||
|
||||
created() {
|
||||
document.addEventListener('click', this.closeIfClickedOutside);
|
||||
},
|
||||
|
||||
mounted() {
|
||||
if (typeof app_slug !== 'undefined') {
|
||||
this.onReleases(1);
|
||||
@ -84,6 +88,12 @@ const app = new Vue({
|
||||
|
||||
addToCartLoading: false,
|
||||
loadMoreLoading: false,
|
||||
live_search: {
|
||||
data: [],
|
||||
modal: false,
|
||||
not_found: false
|
||||
},
|
||||
route_url: url
|
||||
}
|
||||
},
|
||||
|
||||
@ -288,5 +298,34 @@ const app = new Vue({
|
||||
this.loadMoreLoading = false;
|
||||
});
|
||||
},
|
||||
|
||||
closeIfClickedOutside(event) {
|
||||
let el = this.$refs.liveSearchModal;
|
||||
let target = event.target;
|
||||
|
||||
if (el !== target && target.contains(el)) {
|
||||
this.live_search.modal = false;
|
||||
}
|
||||
},
|
||||
|
||||
onLiveSearch(event) {
|
||||
let target_length = event.target.value.length;
|
||||
|
||||
if (target_length > 2) {
|
||||
window.axios.get(url + '/apps/search?keyword=' + event.target.value)
|
||||
.then(response => {
|
||||
this.live_search.data = response.data.data.data;
|
||||
this.live_search.modal = true;
|
||||
this.live_search.not_found = false;
|
||||
})
|
||||
.catch(error => {
|
||||
this.live_search.not_found = true;
|
||||
this.live_search.data = [];
|
||||
console.log(error);
|
||||
})
|
||||
} else if (target_length == 0) {
|
||||
this.live_search.modal = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -50,6 +50,7 @@ return [
|
||||
'hosted_on_akaunting' => 'Hosted on akaunting.com',
|
||||
'only_works_cloud' => 'This app is available only on <strong>Cloud</strong>.',
|
||||
'only_premium_plan' => 'This app is available only on <strong>Premium Cloud</strong>.',
|
||||
'not_found' => 'No app found',
|
||||
|
||||
'about' => 'About',
|
||||
|
||||
|
@ -116,15 +116,15 @@
|
||||
|
||||
<x-show.summary.right>
|
||||
@stack('summary_incoming_start')
|
||||
<x-slot name="first" amount="{{ money($account->income_balance, $account->currency_code, true) }}" title="{{ trans('accounts.incoming') }}"></x-slot>
|
||||
<x-slot name="first" amount="{{ $summary_amounts['incoming_for_humans'] }}" title="{{ trans('accounts.incoming') }}" tooltip="{{ $summary_amounts['incoming_exact'] }}"></x-slot>
|
||||
@stack('summary_incoming_end')
|
||||
|
||||
@stack('summary_outgoing_start')
|
||||
<x-slot name="second" amount="{{ money($account->expense_balance, $account->currency_code, true) }}" title="{{ trans('accounts.outgoing') }}"></x-slot>
|
||||
<x-slot name="second" amount="{{ $summary_amounts['outgoing_for_humans'] }}" title="{{ trans('accounts.outgoing') }}" tooltip="{{ $summary_amounts['outgoing_exact'] }}"></x-slot>
|
||||
@stack('summary_outgoing_end')
|
||||
|
||||
@stack('summary_current_start')
|
||||
<x-slot name="third" amount="{{ money($account->balance, $account->currency_code, true) }}" title="{{ trans('accounts.current_balance') }}"></x-slot>
|
||||
<x-slot name="third" amount="{{ $summary_amounts['current_for_humans'] }}" title="{{ trans('accounts.current_balance') }}" tooltip="{{ $summary_amounts['current_exact'] }}"></x-slot>
|
||||
@stack('summary_current_end')
|
||||
</x-show.summary.right>
|
||||
</x-show.summary>
|
||||
|
@ -61,7 +61,7 @@
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col lg:flex-row w-full justify-between">
|
||||
<div class="h-full relative">
|
||||
<div class="w-8/12 h-full">
|
||||
<form method="GET" action="{{ url("/" . company_id()) }}/apps/search">
|
||||
<div class="h-full flex items-center pl-2 gap-2">
|
||||
<i class="material-icons text-light-gray">search</i>
|
||||
@ -73,12 +73,42 @@
|
||||
value="{{ isset($keyword) ? $keyword : '' }}"
|
||||
placeholder="{{ trans('general.search_placeholder') }}"
|
||||
autocomplete="off"
|
||||
v-on:keyup="onLiveSearch($event)"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
ref="liveSearchModal"
|
||||
v-if="live_search.modal"
|
||||
class="absolute w-full left-0 right-0 bg-white rounded-xl shadow-md pl-4 pr-4 pt-4 top-20 z-10"
|
||||
:class="live_search.data.length > 8 ? 'pb-0' : 'pb-4'"
|
||||
>
|
||||
<ul class="grid sm:grid-cols-6 gap-8">
|
||||
<li v-for="(item, index) in live_search.data.slice(0,8)" :key="index" class="sm:col-span-3 p-3 rounded-lg hover:bg-gray-100">
|
||||
<a :href="route_url + '/apps/' + item.slug" class="flex items-center space-x-4">
|
||||
<img v-for="(file, indis) in item.files"
|
||||
:src="file.path_string"
|
||||
:alt="item.name"
|
||||
class="w-16 h-12 rounded-lg object-cover"
|
||||
/>
|
||||
<div>
|
||||
<h6 class="font-bold" v-html="item.name"></h6>
|
||||
<span class="text-sm text-gray-500 line-clamp-1" v-html="item.sort_desc ? item.sort_desc : item.description"></span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li v-if="live_search.not_found">{{ trans('modules.not_found') }}</li>
|
||||
</ul>
|
||||
|
||||
<div v-if="live_search.data.length > 8" class="flex item-center justify-center mt-5 -mx-4">
|
||||
<x-button type="submit" class="w-full h-10 flex items-center justify-center text-purple font-medium border-y rounded-bl-xl rounded-br-xl disabled:bg-gray-200 hover:bg-gray-100" override="class">{{ trans('modules.see_more') }}</x-button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row items-end lg:items-center mb-1 divide-x divide-black-400">
|
||||
<div class="flex flex-row items-end lg:items-center mb-1 divide-x divide-black-400 mt-4 lg:mt-0">
|
||||
<x-link href="{{ route('apps.home.index') }}" class="text-sm font-semibold px-2 sm:mt-0 sm:mb-0 leading-4" override="class">
|
||||
<x-link.hover color="to-black-400">
|
||||
{{ trans('modules.home') }}
|
||||
@ -104,4 +134,4 @@
|
||||
</x-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
x
Reference in New Issue
Block a user