App Store category filter fixed.

This commit is contained in:
Cüneyt Şentürk 2019-11-20 17:45:19 +03:00
parent 771d73f0d1
commit e4422a22d7
6 changed files with 48 additions and 1 deletions

View File

@ -14,12 +14,28 @@ import Form from './../../plugins/form';
const app = new Vue({
el: '#app',
mixins: [
Global
],
data: function () {
return {
form: new Form('form-app')
}
},
methods: {
onChangeCategory(category) {
let path = document.getElementById('category_page').value;
if (category) {
path += '/' + encodeURIComponent(category);
} else {
path = app_home;
}
location = path;
}
}
});

View File

@ -47,6 +47,18 @@ const app = new Vue({
},
methods: {
onChangeCategory(category) {
let path = document.getElementById('category_page').value;
if (category) {
path += '/' + encodeURIComponent(category);
} else {
path = app_home;
}
location = path;
},
onGetReviews (path, page) {
axios.post(url + '/apps/' + app_slug + '/reviews', {
patth: path,

View File

@ -36,3 +36,7 @@
@endif
</div>
@endsection
@push('scripts_start')
<script src="{{ asset('public/js/modules/apps.js?v=' . version('short')) }}"></script>
@endpush

View File

@ -40,3 +40,8 @@
</div>
@endif
@endsection
@push('scripts_start')
<script src="{{ asset('public/js/modules/apps.js?v=' . version('short')) }}"></script>
@endpush

View File

@ -4,7 +4,16 @@
<div class="card-body">
<div class="row">
<div class="col-9">
{!! Form::select('category', $categories, request('category'), ['class' => 'form-control form-control-sm table-header-search mt-0']) !!}
<akaunting-select
class="form-control-sm table-header-search mt-0"
:placeholder="'{{ trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)]) }}'"
:name="'category'"
:icon="'folder'"
:options="{{ json_encode($categories) }}"
:value="'{{ request('category') }}'"
@change="onChangeCategory($event)"
></akaunting-select>
{{ Form::hidden('category_page', url("apps/categories"), ['id' => 'category_page']) }}
<a href="{{ route('apps.paid') }}" class="btn btn-sm btn-white card-buttons filter-button ml-2">{{ trans('modules.top_paid') }}</a>
<a href="{{ route('apps.new') }}" class="btn btn-sm btn-white card-buttons filter-button">{{ trans('modules.new') }}</a>

View File

@ -32,6 +32,7 @@
<script type="text/javascript"><!--
var url = '{{ url("/") }}';
var app_home = '{{ url("apps/categories") }}';
var app_url = '{{ env("APP_URL") }}';
//--></script>