#2300 Mobile App Fixes (#710)

* #2300 Mobile App Fixes

* #2245 Add points-module as payment method

* #2245 Add points-module as payment method

* #2220 points module
This commit is contained in:
Dia Shalabi 2020-10-08 18:17:09 +03:00 committed by GitHub
parent df2afcd562
commit 697ce598ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 86 additions and 5 deletions

View File

@ -306,4 +306,10 @@ return [
'and_above' => 'and above',
'and_below' => 'and below',
'clear_all' => 'Clear All',
'balances' => 'Balances',
'packages' => 'Packages',
'dopings' => 'Dopings',
'advs' => 'Advs',
'site' => 'Site',
'subscription' => 'Subscription',
];

View File

@ -0,0 +1,23 @@
<?php namespace Visiosoft\AdvsModule\Support\Command;
use Anomaly\Streams\Platform\Addon\Module\Contract\ModuleRepositoryInterface;
class CheckModuleInstalled
{
protected $moduleNamespace;
protected $checkEnabled;
public function __construct($moduleNamespace, $checkEnabled = true)
{
$this->moduleNamespace = $moduleNamespace;
$this->checkEnabled = $checkEnabled;
}
public function handle(ModuleRepositoryInterface $moduleRepository)
{
if ($module = $moduleRepository->findBy('namespace', $this->moduleNamespace)) {
return $this->checkEnabled ? $module->installed && $module->enabled : boolval($module->installed);
}
return false;
}
}

View File

@ -0,0 +1,34 @@
<?php namespace Visiosoft\AdvsModule\Support\Command;
class GetBuyables
{
public function handle()
{
return [
'balances' => [
'name' => trans('visiosoft.module.advs::field.balances'),
'entry_type' => 'Visiosoft\BalancesModule\Balance\BalanceModel'
],
'packages' => [
'name' => trans('visiosoft.module.advs::field.packages'),
'entry_type' => 'Visiosoft\PackagesModule\Package\PackageModel'
],
'dopings' => [
'name' => trans('visiosoft.module.advs::field.dopings'),
'entry_type' => 'Anomaly\Streams\Platform\Model\Dopings\DopingsDopingsEntryModel'
],
'advs' => [
'name' => trans('visiosoft.module.advs::field.advs'),
'entry_type' => 'Visiosoft\AdvsModule\Adv\AdvModel'
],
'site' => [
'name' => trans('visiosoft.module.advs::field.site'),
'entry_type' => 'Visiosoft\SiteModule\Addon\AddonModel'
],
'subscriptions' => [
'name' => trans('visiosoft.module.advs::field.subscriptions'),
'entry_type' => 'Anomaly\Streams\Platform\Model\Users\UsersUsersEntryModel'
],
];
}
}

View File

@ -2,9 +2,26 @@
use Illuminate\Contracts\Bus\Dispatcher;
use Visiosoft\AdvsModule\Adv\Command\appendRequestURL;
use Visiosoft\AdvsModule\Support\Command\CheckModuleInstalled;
use Visiosoft\AdvsModule\Support\Command\GetBuyables;
if (!function_exists('fullLink')) {
if (!function_exists('fullLink'))
{
function fullLink($request, $url, $newParameters = array()) {
return app(Dispatcher::class)->dispatch(new appendRequestURL($request, $url, $newParameters));
}
}
if (!function_exists('is_module_installed'))
{
function is_module_installed($moduleNamespace, $checkEnabled = true) {
return dispatch_now(new CheckModuleInstalled($moduleNamespace, $checkEnabled));
}
}
if (!function_exists('get_buyables'))
{
function get_buyables() {
return dispatch_now(new GetBuyables());
}
}

View File

@ -2,7 +2,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width"/>
<meta name="generator" content="{{ config_get('streams::distribution.name') }}"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, viewport-fit=cover">
<meta name="description"
content="{{ (template.get('meta_description') ?: setting_value('streams::description'))|slice(0,160) }}"/>
<meta name="keywords" content="{{ template.get('meta_keywords') }}" />

View File

@ -147,13 +147,14 @@
</div>
</div>
<div class="col-md-12 text-right">
<div class="form-group">
<div class="form-group d-flex align-items-center justify-content-end">
{{ addBlock('profile/detail/profile-detail-form/actions', {'user': user})|raw }}
{{ profileForm.actions|raw }}
</div>
</div>
</div>
{{ profileForm.close()|raw }}
{{ profileForm.close()|raw }}
</div>
<div class="tab-pane fade" id="nav-password" role="tabpanel" aria-labelledby="nav-password-tab">
{% set passwordForm = form('updatePassword').get() %}