Merge branch 'master' of https://github.com/bagisto/bagisto into sarga-v1
Conflicts: public/installer/Seeder.php
This commit is contained in:
commit
0e819f43fe
|
|
@ -66,7 +66,7 @@ jobs:
|
||||||
run: set -e && php artisan db:seed --env=testing
|
run: set -e && php artisan db:seed --env=testing
|
||||||
|
|
||||||
- name: Vendor Publish
|
- name: Vendor Publish
|
||||||
run: set -e && php artisan vendor:publish --all --force --env=testing
|
run: set -e && php artisan bagisto:publish --force --env=testing
|
||||||
|
|
||||||
- name: Execute Unit Tests
|
- name: Execute Unit Tests
|
||||||
run: set -e && vendor/bin/codecept run unit
|
run: set -e && vendor/bin/codecept run unit
|
||||||
|
|
|
||||||
|
|
@ -153,12 +153,12 @@
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/bagisto/rest-api.git",
|
"url": "https://github.com/bagisto/rest-api.git",
|
||||||
"reference": "03d7284867327c9db2412260e9113982fa7c07f1"
|
"reference": "8f679061530ca31d85bff7fff0a19a3e4368216e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/bagisto/rest-api/zipball/03d7284867327c9db2412260e9113982fa7c07f1",
|
"url": "https://api.github.com/repos/bagisto/rest-api/zipball/8f679061530ca31d85bff7fff0a19a3e4368216e",
|
||||||
"reference": "03d7284867327c9db2412260e9113982fa7c07f1",
|
"reference": "8f679061530ca31d85bff7fff0a19a3e4368216e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"default-branch": true,
|
"default-branch": true,
|
||||||
|
|
@ -189,7 +189,7 @@
|
||||||
"issues": "https://github.com/bagisto/rest-api/issues",
|
"issues": "https://github.com/bagisto/rest-api/issues",
|
||||||
"source": "https://github.com/bagisto/rest-api/tree/master"
|
"source": "https://github.com/bagisto/rest-api/tree/master"
|
||||||
},
|
},
|
||||||
"time": "2022-01-21T11:21:50+00:00"
|
"time": "2022-04-07T09:23:21+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "bagistobrasil/bagisto-product-social-share",
|
"name": "bagistobrasil/bagisto-product-social-share",
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"/js/admin.js": "/js/admin.js?id=1dddbb0d655216b79be5",
|
"/js/admin.js": "/js/admin.js?id=fecd2e4463e43c5595a5",
|
||||||
"/css/admin.css": "/css/admin.css?id=d35081df99f6ce2df4ff"
|
"/css/admin.css": "/css/admin.css?id=932732d5f00ca02d5043"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,7 @@ class ProductDataGrid extends DataGrid
|
||||||
'products.type as product_type',
|
'products.type as product_type',
|
||||||
'product_flat.status',
|
'product_flat.status',
|
||||||
'product_flat.price',
|
'product_flat.price',
|
||||||
|
'product_flat.url_key',
|
||||||
'attribute_families.name as attribute_family',
|
'attribute_families.name as attribute_family',
|
||||||
DB::raw('SUM(' . DB::getTablePrefix() . 'product_inventories.qty) as quantity')
|
DB::raw('SUM(' . DB::getTablePrefix() . 'product_inventories.qty) as quantity')
|
||||||
);
|
);
|
||||||
|
|
@ -166,6 +167,13 @@ class ProductDataGrid extends DataGrid
|
||||||
'searchable' => true,
|
'searchable' => true,
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
'filterable' => true,
|
'filterable' => true,
|
||||||
|
'closure' => function ($row) {
|
||||||
|
if (! empty($row->url_key)) {
|
||||||
|
return "<a href='" . route('shop.productOrCategory.index', $row->url_key) . "' target='_blank'>" . $row->product_name . "</a>";
|
||||||
|
}
|
||||||
|
|
||||||
|
return $row->product_name;
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
|
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Webkul\Admin\Http\Middleware;
|
|
||||||
|
|
||||||
use Closure;
|
|
||||||
use Webkul\Core\Repositories\LocaleRepository;
|
|
||||||
|
|
||||||
class Locale
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Create a new middleware instance.
|
|
||||||
*
|
|
||||||
* @param \Webkul\Core\Repositories\LocaleRepository $localeRepository
|
|
||||||
*/
|
|
||||||
public function __construct(protected LocaleRepository $localeRepository)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handle an incoming request.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Http\Request $request
|
|
||||||
* @param \Closure $next
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public function handle($request, Closure $next)
|
|
||||||
{
|
|
||||||
$locale = request()->get('admin_locale');
|
|
||||||
|
|
||||||
if ($locale) {
|
|
||||||
if ($this->localeRepository->findOneByField('code', $locale)) {
|
|
||||||
app()->setLocale($locale);
|
|
||||||
|
|
||||||
session()->put('admin_locale', $locale);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if ($locale = session()->get('admin_locale')) {
|
|
||||||
app()->setLocale($locale);
|
|
||||||
} else {
|
|
||||||
app()->setLocale(app()->getLocale());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
unset($request['admin_locale']);
|
|
||||||
|
|
||||||
return $next($request);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -28,8 +28,6 @@ class AdminServiceProvider extends ServiceProvider
|
||||||
|
|
||||||
$this->registerACL();
|
$this->registerACL();
|
||||||
|
|
||||||
$router->aliasMiddleware('admin_locale', Locale::class);
|
|
||||||
|
|
||||||
$this->app->register(EventServiceProvider::class);
|
$this->app->register(EventServiceProvider::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -769,6 +769,7 @@ body {
|
||||||
color: $read-all-text-color;
|
color: $read-all-text-color;
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#notif-title {
|
#notif-title {
|
||||||
|
|
|
||||||
|
|
@ -286,6 +286,9 @@ return [
|
||||||
'confirm-password' => 'تأكيد كلمة المرور',
|
'confirm-password' => 'تأكيد كلمة المرور',
|
||||||
'back-link-title' => 'العودة للتوقيع',
|
'back-link-title' => 'العودة للتوقيع',
|
||||||
'submit-btn-title' => 'بريد إلكتروني كلمة مرور إعادة تعيين وصلة',
|
'submit-btn-title' => 'بريد إلكتروني كلمة مرور إعادة تعيين وصلة',
|
||||||
|
'passwords' => [
|
||||||
|
'throttled' => 'تحذير: لقد طلبت إعادة تعيين كلمة المرور مؤخرًا ، يرجى التحقق من بريدك الإلكتروني.',
|
||||||
|
]
|
||||||
],
|
],
|
||||||
|
|
||||||
'reset-password' => [
|
'reset-password' => [
|
||||||
|
|
@ -685,6 +688,8 @@ return [
|
||||||
'name' => 'اسم',
|
'name' => 'اسم',
|
||||||
'groups' => 'المجموعات',
|
'groups' => 'المجموعات',
|
||||||
'add-group-title' => 'أضف المجموعة',
|
'add-group-title' => 'أضف المجموعة',
|
||||||
|
'edit-group-title' => 'Edit Group',
|
||||||
|
'update-group-title' => 'Update Group',
|
||||||
'position' => 'موضع',
|
'position' => 'موضع',
|
||||||
'attribute-code' => 'الشفرة',
|
'attribute-code' => 'الشفرة',
|
||||||
'type' => 'النوع',
|
'type' => 'النوع',
|
||||||
|
|
|
||||||
|
|
@ -286,6 +286,9 @@ return [
|
||||||
'confirm-password' => 'Passwort bestätigen',
|
'confirm-password' => 'Passwort bestätigen',
|
||||||
'back-link-title' => 'Zurück zur Anmeldung',
|
'back-link-title' => 'Zurück zur Anmeldung',
|
||||||
'submit-btn-title' => 'E-Mail zum Zurücksetzen des Passworts senden',
|
'submit-btn-title' => 'E-Mail zum Zurücksetzen des Passworts senden',
|
||||||
|
'passwords' => [
|
||||||
|
'throttled' => 'Warnung: Sie haben das Zurücksetzen des Passworts kürzlich angefordert, bitte überprüfen Sie Ihre E-Mails.',
|
||||||
|
]
|
||||||
],
|
],
|
||||||
'reset-password' =>
|
'reset-password' =>
|
||||||
[
|
[
|
||||||
|
|
@ -676,6 +679,8 @@ return [
|
||||||
'name' => 'Name',
|
'name' => 'Name',
|
||||||
'groups' => 'Gruppen',
|
'groups' => 'Gruppen',
|
||||||
'add-group-title' => 'Gruppe hinzufügen',
|
'add-group-title' => 'Gruppe hinzufügen',
|
||||||
|
'edit-group-title' => 'Edit Group',
|
||||||
|
'update-group-title' => 'Update Group',
|
||||||
'position' => 'Position',
|
'position' => 'Position',
|
||||||
'attribute-code' => 'Code',
|
'attribute-code' => 'Code',
|
||||||
'type' => 'Typ',
|
'type' => 'Typ',
|
||||||
|
|
|
||||||
|
|
@ -288,6 +288,9 @@ return [
|
||||||
'confirm-password' => 'Confirm Password',
|
'confirm-password' => 'Confirm Password',
|
||||||
'back-link-title' => 'Back to Sign In',
|
'back-link-title' => 'Back to Sign In',
|
||||||
'submit-btn-title' => 'Send Password Reset Email',
|
'submit-btn-title' => 'Send Password Reset Email',
|
||||||
|
'passwords' => [
|
||||||
|
'throttled' => 'Warning: You have requested password reset recently, please check your email.',
|
||||||
|
]
|
||||||
],
|
],
|
||||||
|
|
||||||
'reset-password' => [
|
'reset-password' => [
|
||||||
|
|
@ -688,6 +691,8 @@ return [
|
||||||
'name' => 'Name',
|
'name' => 'Name',
|
||||||
'groups' => 'Groups',
|
'groups' => 'Groups',
|
||||||
'add-group-title' => 'Add Group',
|
'add-group-title' => 'Add Group',
|
||||||
|
'edit-group-title' => 'Edit Group',
|
||||||
|
'update-group-title' => 'Update Group',
|
||||||
'position' => 'Position',
|
'position' => 'Position',
|
||||||
'attribute-code' => 'Code',
|
'attribute-code' => 'Code',
|
||||||
'type' => 'Type',
|
'type' => 'Type',
|
||||||
|
|
|
||||||
|
|
@ -690,6 +690,8 @@ return [
|
||||||
'name' => 'Nombre',
|
'name' => 'Nombre',
|
||||||
'groups' => 'Grupos',
|
'groups' => 'Grupos',
|
||||||
'add-group-title' => 'Agregar grupo',
|
'add-group-title' => 'Agregar grupo',
|
||||||
|
'edit-group-title' => 'Edit Group',
|
||||||
|
'update-group-title' => 'Update Group',
|
||||||
'position' => 'Posición',
|
'position' => 'Posición',
|
||||||
'attribute-code' => 'Código',
|
'attribute-code' => 'Código',
|
||||||
'type' => 'Tipo',
|
'type' => 'Tipo',
|
||||||
|
|
|
||||||
|
|
@ -673,6 +673,8 @@ return [
|
||||||
'name' => 'نام',
|
'name' => 'نام',
|
||||||
'groups' => 'گروه ها',
|
'groups' => 'گروه ها',
|
||||||
'add-group-title' => 'افزودن گروه',
|
'add-group-title' => 'افزودن گروه',
|
||||||
|
'edit-group-title' => 'Edit Group',
|
||||||
|
'update-group-title' => 'Update Group',
|
||||||
'position' => 'موقعیت',
|
'position' => 'موقعیت',
|
||||||
'attribute-code' => 'کد',
|
'attribute-code' => 'کد',
|
||||||
'type' => 'نوع',
|
'type' => 'نوع',
|
||||||
|
|
|
||||||
|
|
@ -288,6 +288,9 @@ return [
|
||||||
'confirm-password' => 'Confirmez le mot de passe',
|
'confirm-password' => 'Confirmez le mot de passe',
|
||||||
'back-link-title' => 'Retour à la connexion',
|
'back-link-title' => 'Retour à la connexion',
|
||||||
'submit-btn-title' => 'Envoyer un e-mail de réinitialisation du mot de passe',
|
'submit-btn-title' => 'Envoyer un e-mail de réinitialisation du mot de passe',
|
||||||
|
'passwords' => [
|
||||||
|
'throttled' => 'Avertissement : Vous avez récemment demandé la réinitialisation de votre mot de passe, veuillez vérifier votre messagerie.',
|
||||||
|
]
|
||||||
],
|
],
|
||||||
|
|
||||||
'reset-password' => [
|
'reset-password' => [
|
||||||
|
|
@ -689,6 +692,8 @@ return [
|
||||||
'name' => 'Nom',
|
'name' => 'Nom',
|
||||||
'groups' => 'Groupes',
|
'groups' => 'Groupes',
|
||||||
'add-group-title' => 'Ajouter un groupe',
|
'add-group-title' => 'Ajouter un groupe',
|
||||||
|
'edit-group-title' => 'Edit Group',
|
||||||
|
'update-group-title' => 'Update Group',
|
||||||
'position' => 'Positionner',
|
'position' => 'Positionner',
|
||||||
'attribute-code' => 'Code',
|
'attribute-code' => 'Code',
|
||||||
'type' => 'Taper',
|
'type' => 'Taper',
|
||||||
|
|
|
||||||
|
|
@ -688,6 +688,8 @@ return [
|
||||||
'name' => 'नाम',
|
'name' => 'नाम',
|
||||||
'groups' => 'समूह',
|
'groups' => 'समूह',
|
||||||
'add-group-title' => 'समूह जोड़ें',
|
'add-group-title' => 'समूह जोड़ें',
|
||||||
|
'edit-group-title' => 'Edit Group',
|
||||||
|
'update-group-title' => 'Update Group',
|
||||||
'position' => 'स्थान',
|
'position' => 'स्थान',
|
||||||
'attribute-code' => 'कोड',
|
'attribute-code' => 'कोड',
|
||||||
'type' => 'प्रकार',
|
'type' => 'प्रकार',
|
||||||
|
|
|
||||||
|
|
@ -283,6 +283,9 @@ return [
|
||||||
'confirm-password' => 'Conferma Password',
|
'confirm-password' => 'Conferma Password',
|
||||||
'back-link-title' => 'Torna a Login',
|
'back-link-title' => 'Torna a Login',
|
||||||
'submit-btn-title' => 'Invia Email Recupera Password',
|
'submit-btn-title' => 'Invia Email Recupera Password',
|
||||||
|
'passwords' => [
|
||||||
|
'throttled' => 'Avvertenza: hai richiesto di recente la reimpostazione della password, controlla la tua email.',
|
||||||
|
]
|
||||||
],
|
],
|
||||||
|
|
||||||
'reset-password' => [
|
'reset-password' => [
|
||||||
|
|
@ -673,6 +676,8 @@ return [
|
||||||
'name' => 'Nome',
|
'name' => 'Nome',
|
||||||
'groups' => 'Gruppi',
|
'groups' => 'Gruppi',
|
||||||
'add-group-title' => 'Aggiungi Gruppo',
|
'add-group-title' => 'Aggiungi Gruppo',
|
||||||
|
'edit-group-title' => 'Edit Group',
|
||||||
|
'update-group-title' => 'Update Group',
|
||||||
'position' => 'Posizione',
|
'position' => 'Posizione',
|
||||||
'attribute-code' => 'Codice',
|
'attribute-code' => 'Codice',
|
||||||
'type' => 'Tipo',
|
'type' => 'Tipo',
|
||||||
|
|
|
||||||
|
|
@ -672,6 +672,8 @@ return [
|
||||||
'name' => 'Naam',
|
'name' => 'Naam',
|
||||||
'groups' => 'Groepen',
|
'groups' => 'Groepen',
|
||||||
'add-group-title' => 'Add Group',
|
'add-group-title' => 'Add Group',
|
||||||
|
'edit-group-title' => 'Edit Group',
|
||||||
|
'update-group-title' => 'Update Group',
|
||||||
'position' => 'Position',
|
'position' => 'Position',
|
||||||
'attribute-code' => 'Code',
|
'attribute-code' => 'Code',
|
||||||
'type' => 'Type',
|
'type' => 'Type',
|
||||||
|
|
|
||||||
|
|
@ -672,6 +672,8 @@ return [
|
||||||
'name' => 'Nazwa',
|
'name' => 'Nazwa',
|
||||||
'groups' => 'Grupy',
|
'groups' => 'Grupy',
|
||||||
'add-group-title' => 'Dodaj grupę',
|
'add-group-title' => 'Dodaj grupę',
|
||||||
|
'edit-group-title' => 'Edit Group',
|
||||||
|
'update-group-title' => 'Update Group',
|
||||||
'position' => 'Pozycja',
|
'position' => 'Pozycja',
|
||||||
'attribute-code' => 'Kod',
|
'attribute-code' => 'Kod',
|
||||||
'type' => 'Rodzaj',
|
'type' => 'Rodzaj',
|
||||||
|
|
|
||||||
|
|
@ -671,6 +671,8 @@ return [
|
||||||
'name' => 'Nome',
|
'name' => 'Nome',
|
||||||
'groups' => 'Grupos',
|
'groups' => 'Grupos',
|
||||||
'add-group-title' => 'Add Grupo',
|
'add-group-title' => 'Add Grupo',
|
||||||
|
'edit-group-title' => 'Edit Group',
|
||||||
|
'update-group-title' => 'Update Group',
|
||||||
'position' => 'Posição',
|
'position' => 'Posição',
|
||||||
'attribute-code' => 'Código',
|
'attribute-code' => 'Código',
|
||||||
'type' => 'Tipo',
|
'type' => 'Tipo',
|
||||||
|
|
|
||||||
|
|
@ -678,6 +678,8 @@ return [
|
||||||
'name' => 'Tanımı',
|
'name' => 'Tanımı',
|
||||||
'groups' => 'Gruplar',
|
'groups' => 'Gruplar',
|
||||||
'add-group-title' => 'Grup Ekle',
|
'add-group-title' => 'Grup Ekle',
|
||||||
|
'edit-group-title' => 'Edit Group',
|
||||||
|
'update-group-title' => 'Update Group',
|
||||||
'position' => 'Konum',
|
'position' => 'Konum',
|
||||||
'attribute-code' => 'Nitelik Kodu',
|
'attribute-code' => 'Nitelik Kodu',
|
||||||
'type' => 'Tipi',
|
'type' => 'Tipi',
|
||||||
|
|
|
||||||
|
|
@ -673,6 +673,8 @@ return [
|
||||||
'name' => '名称',
|
'name' => '名称',
|
||||||
'groups' => '客户群',
|
'groups' => '客户群',
|
||||||
'add-group-title' => '添加群',
|
'add-group-title' => '添加群',
|
||||||
|
'edit-group-title' => 'Edit Group',
|
||||||
|
'update-group-title' => 'Update Group',
|
||||||
'position' => '位置',
|
'position' => '位置',
|
||||||
'attribute-code' => '代码',
|
'attribute-code' => '代码',
|
||||||
'type' => '类型',
|
'type' => '类型',
|
||||||
|
|
|
||||||
|
|
@ -370,6 +370,12 @@
|
||||||
} else {
|
} else {
|
||||||
$('#enable_wysiwyg').parents('.control-group').addClass('hide');
|
$('#enable_wysiwyg').parents('.control-group').addClass('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (['text'].indexOf($(e.target).val()) > -1) {
|
||||||
|
$('#validation').parents('.control-group').removeClass('hide');
|
||||||
|
} else {
|
||||||
|
$('#validation').parents('.control-group').addClass('hide');
|
||||||
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -184,25 +184,27 @@
|
||||||
<input type="hidden" name="is_unique" value="{{ $attribute->is_unique }}"/>
|
<input type="hidden" name="is_unique" value="{{ $attribute->is_unique }}"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="control-group">
|
@if ($attribute->type == 'text')
|
||||||
<?php $selectedValidation = old('validation') ?: $attribute->validation ?>
|
<div class="control-group">
|
||||||
<label for="validation">{{ __('admin::app.catalog.attributes.input_validation') }}</label>
|
<?php $selectedValidation = old('validation') ?: $attribute->validation ?>
|
||||||
<select class="control" id="validation" name="validation" {{ ! $attribute->is_user_defined ? 'disabled' : '' }}>
|
<label for="validation">{{ __('admin::app.catalog.attributes.input_validation') }}</label>
|
||||||
<option value=""></option>
|
<select class="control" id="validation" name="validation" {{ ! $attribute->is_user_defined ? 'disabled' : '' }}>
|
||||||
<option value="numeric" {{ $selectedValidation == 'numeric' ? 'selected' : '' }}>
|
<option value=""></option>
|
||||||
{{ __('admin::app.catalog.attributes.number') }}
|
<option value="numeric" {{ $selectedValidation == 'numeric' ? 'selected' : '' }}>
|
||||||
</option>
|
{{ __('admin::app.catalog.attributes.number') }}
|
||||||
<option value="decimal" {{ $selectedValidation == 'decimal' ? 'selected' : '' }}>
|
</option>
|
||||||
{{ __('admin::app.catalog.attributes.decimal') }}
|
<option value="decimal" {{ $selectedValidation == 'decimal' ? 'selected' : '' }}>
|
||||||
</option>
|
{{ __('admin::app.catalog.attributes.decimal') }}
|
||||||
<option value="email" {{ $selectedValidation == 'email' ? 'selected' : '' }}>
|
</option>
|
||||||
{{ __('admin::app.catalog.attributes.email') }}
|
<option value="email" {{ $selectedValidation == 'email' ? 'selected' : '' }}>
|
||||||
</option>
|
{{ __('admin::app.catalog.attributes.email') }}
|
||||||
<option value="url" {{ $selectedValidation == 'url' ? 'selected' : '' }}>
|
</option>
|
||||||
{{ __('admin::app.catalog.attributes.url') }}
|
<option value="url" {{ $selectedValidation == 'url' ? 'selected' : '' }}>
|
||||||
</option>
|
{{ __('admin::app.catalog.attributes.url') }}
|
||||||
</select>
|
</option>
|
||||||
</div>
|
</select>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
{!! view_render_event('bagisto.admin.catalog.attribute.edit_form_accordian.validations.controls.after', ['attribute' => $attribute]) !!}
|
{!! view_render_event('bagisto.admin.catalog.attribute.edit_form_accordian.validations.controls.after', ['attribute' => $attribute]) !!}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -61,10 +61,6 @@
|
||||||
<accordian title="{{ __('admin::app.catalog.families.groups') }}" :active="true">
|
<accordian title="{{ __('admin::app.catalog.families.groups') }}" :active="true">
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
|
|
||||||
<button type="button" style="margin-bottom : 20px" class="btn btn-md btn-primary" @click="showModal('addGroup')">
|
|
||||||
{{ __('admin::app.catalog.families.add-group-title') }}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
{!! view_render_event('bagisto.admin.catalog.family.create_form_accordian.groups.controls.before') !!}
|
{!! view_render_event('bagisto.admin.catalog.family.create_form_accordian.groups.controls.before') !!}
|
||||||
|
|
||||||
<group-list></group-list>
|
<group-list></group-list>
|
||||||
|
|
@ -81,63 +77,108 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<modal id="addGroup" :is-open="modalIds.addGroup">
|
|
||||||
<h3 slot="header">{{ __('admin::app.catalog.families.add-group-title') }}</h3>
|
|
||||||
|
|
||||||
<div slot="body">
|
|
||||||
<group-form></group-form>
|
|
||||||
</div>
|
|
||||||
</modal>
|
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
|
|
||||||
<script type="text/x-template" id="group-form-template">
|
|
||||||
<form method="POST" action="{{ route('admin.catalog.families.store') }}" data-vv-scope="add-group-form" @submit.prevent="addGroup('add-group-form')">
|
|
||||||
|
|
||||||
<div class="page-content">
|
|
||||||
<div class="form-container">
|
|
||||||
@csrf()
|
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('add-group-form.groupName') ? 'has-error' : '']">
|
|
||||||
<label for="groupName" class="required">{{ __('admin::app.catalog.families.name') }}</label>
|
|
||||||
<input type="text" v-validate="'required'" v-model="group.groupName" class="control" id="groupName" name="groupName" data-vv-as=""{{ __('admin::app.catalog.families.name') }}""/>
|
|
||||||
<span class="control-error" v-if="errors.has('add-group-form.groupName')">@{{ errors.first('add-group-form.groupName') }}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('add-group-form.position') ? 'has-error' : '']">
|
|
||||||
<label for="position" class="required">{{ __('admin::app.catalog.families.position') }}</label>
|
|
||||||
<input type="text" v-validate="'required|numeric'" v-model="group.position" class="control" id="position" name="position" data-vv-as=""{{ __('admin::app.catalog.families.position') }}""/>
|
|
||||||
<span class="control-error" v-if="errors.has('add-group-form.position')">@{{ errors.first('add-group-form.position') }}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button type="submit" class="btn btn-lg btn-primary">
|
|
||||||
{{ __('admin::app.catalog.families.add-group-title') }}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/x-template" id="group-list-template">
|
<script type="text/x-template" id="group-list-template">
|
||||||
<div>
|
<div>
|
||||||
<group-item v-for='(group, index) in groups' :group="group" :custom_attributes="custom_attributes" :key="index" :index="index" @onRemoveGroup="removeGroup($event)" @onAttributeAdd="addAttributes(index, $event)" @onAttributeRemove="removeAttribute(index, $event)"></group-item>
|
<button type="button" style="margin-bottom : 20px" class="btn btn-md btn-primary" @click="$root.showModal('addGroupForm')">
|
||||||
|
{{ __('admin::app.catalog.families.add-group-title') }}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<modal id="addGroupForm" :is-open="$root.modalIds.addGroupForm">
|
||||||
|
<h3 slot="header">{{ __('admin::app.catalog.families.add-group-title') }}</h3>
|
||||||
|
|
||||||
|
<div slot="body">
|
||||||
|
<form method="POST" data-vv-scope="add-group-form" @submit.prevent="addGroup('add-group-form')">
|
||||||
|
|
||||||
|
<div class="page-content">
|
||||||
|
<div class="form-container">
|
||||||
|
@csrf()
|
||||||
|
|
||||||
|
<div class="control-group" :class="[errors.has('add-group-form.name') ? 'has-error' : '']">
|
||||||
|
<label for="name" class="required">{{ __('admin::app.catalog.families.name') }}</label>
|
||||||
|
<input type="text" v-validate="'required'" v-model="group.name" class="control" id="name" name="name" data-vv-as=""{{ __('admin::app.catalog.families.name') }}""/>
|
||||||
|
<span class="control-error" v-if="errors.has('add-group-form.name')">@{{ errors.first('add-group-form.name') }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group" :class="[errors.has('add-group-form.position') ? 'has-error' : '']">
|
||||||
|
<label for="position" class="required">{{ __('admin::app.catalog.families.position') }}</label>
|
||||||
|
<input type="text" v-validate="'required|numeric'" v-model="group.position" class="control" id="position" name="position" data-vv-as=""{{ __('admin::app.catalog.families.position') }}""/>
|
||||||
|
<span class="control-error" v-if="errors.has('add-group-form.position')">@{{ errors.first('add-group-form.position') }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="submit" class="btn btn-lg btn-primary">
|
||||||
|
{{ __('admin::app.catalog.families.add-group-title') }}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</modal>
|
||||||
|
|
||||||
|
<modal id="editGroupForm" :is-open="$root.modalIds.editGroupForm">
|
||||||
|
<h3 slot="header">{{ __('admin::app.catalog.families.edit-group-title') }}</h3>
|
||||||
|
|
||||||
|
<div slot="body">
|
||||||
|
<form method="POST" data-vv-scope="edit-group-form" @submit.prevent="updateGroup('edit-group-form')">
|
||||||
|
|
||||||
|
<div class="page-content">
|
||||||
|
<div class="form-container">
|
||||||
|
<div class="control-group" :class="[errors.has('edit-group-form.name') ? 'has-error' : '']">
|
||||||
|
<label for="name" class="required">{{ __('admin::app.catalog.families.name') }}</label>
|
||||||
|
<input type="text" v-validate="'required'" v-model="editGroup.name" class="control" id="name" name="name" data-vv-as=""{{ __('admin::app.catalog.families.name') }}""/>
|
||||||
|
<span class="control-error" v-if="errors.has('edit-group-form.name')">@{{ errors.first('edit-group-form.name') }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group" :class="[errors.has('edit-group-form.position') ? 'has-error' : '']">
|
||||||
|
<label for="position" class="required">{{ __('admin::app.catalog.families.position') }}</label>
|
||||||
|
<input type="text" v-validate="'required|numeric'" v-model="editGroup.position" class="control" id="position" name="position" data-vv-as=""{{ __('admin::app.catalog.families.position') }}""/>
|
||||||
|
<span class="control-error" v-if="errors.has('edit-group-form.position')">@{{ errors.first('edit-group-form.position') }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="submit" class="btn btn-lg btn-primary">
|
||||||
|
{{ __('admin::app.catalog.families.update-group-title') }}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</modal>
|
||||||
|
|
||||||
|
<group-item
|
||||||
|
v-for='(group, index) in groups'
|
||||||
|
:group="group"
|
||||||
|
:custom_attributes="custom_attributes"
|
||||||
|
:key="index"
|
||||||
|
:index="index"
|
||||||
|
@onRemoveGroup="removeGroup($event)"
|
||||||
|
@onEditGroup="openEditGroupModal($event)"
|
||||||
|
@onAttributeAdd="addAttributes(index, $event)"
|
||||||
|
@onAttributeRemove="removeAttribute(index, $event)"
|
||||||
|
></group-item>
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/x-template" id="group-item-template">
|
<script type="text/x-template" id="group-item-template">
|
||||||
<accordian :title="group.groupName" :active="true">
|
<accordian :title="group.name" :active="true">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<i class="icon expand-icon left"></i>
|
<i class="icon expand-icon left"></i>
|
||||||
<h1>@{{ group.name ? group.name : group.groupName }}</h1>
|
|
||||||
|
<h1>@{{ group.name }}</h1>
|
||||||
|
|
||||||
<i class="icon trash-icon" @click="removeGroup()" v-if="group.is_user_defined"></i>
|
<i class="icon trash-icon" @click="removeGroup()" v-if="group.is_user_defined"></i>
|
||||||
|
|
||||||
|
<span class="icon pencil-lg-icon" @click="editGroup()"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<input type="hidden" :name="[groupInputName + '[name]']" :value="group.name ? group.name : group.groupName"/>
|
<input type="hidden" :name="[groupInputName + '[name]']" :value="group.name"/>
|
||||||
<input type="hidden" :name="[groupInputName + '[position]']" :value="group.position"/>
|
<input type="hidden" :name="[groupInputName + '[position]']" :value="group.position"/>
|
||||||
<input type="hidden" :name="[groupInputName + '[is_user_defined]']" :value="group.is_user_defined"/>
|
<input type="hidden" :name="[groupInputName + '[is_user_defined]']" :value="group.is_user_defined"/>
|
||||||
|
|
||||||
|
|
@ -201,71 +242,28 @@
|
||||||
var groups = @json($attributeFamily ? $attributeFamily->attribute_groups : []);
|
var groups = @json($attributeFamily ? $attributeFamily->attribute_groups : []);
|
||||||
var custom_attributes = @json($custom_attributes);
|
var custom_attributes = @json($custom_attributes);
|
||||||
|
|
||||||
Vue.component('group-form', {
|
|
||||||
|
|
||||||
data: function () {
|
|
||||||
return {
|
|
||||||
group: {
|
|
||||||
'groupName': '',
|
|
||||||
'position': '',
|
|
||||||
'is_user_defined': 1,
|
|
||||||
'custom_attributes': []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
template: '#group-form-template',
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
addGroup: function (formScope) {
|
|
||||||
var this_this = this;
|
|
||||||
|
|
||||||
this.$validator.validateAll(formScope).then(function (result) {
|
|
||||||
if (result) {
|
|
||||||
|
|
||||||
var filteredGroups = groups.filter(function(group) {
|
|
||||||
return this_this.group.groupName.trim() === (group.name ? group.name.trim() : group.groupName.trim())
|
|
||||||
})
|
|
||||||
|
|
||||||
if (filteredGroups.length) {
|
|
||||||
const field = this.$validator.fields.find({ name: 'groupName', scope: 'add-group-form' });
|
|
||||||
|
|
||||||
if (field) {
|
|
||||||
this.$validator.errors.add({
|
|
||||||
id: field.id,
|
|
||||||
field: 'groupName',
|
|
||||||
msg: "{{ __('admin::app.catalog.families.group-exist-error') }}",
|
|
||||||
scope: 'add-group-form',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
groups.push(this_this.group);
|
|
||||||
|
|
||||||
groups = this_this.sortGroups();
|
|
||||||
|
|
||||||
this.group = {'groupName': '', 'position': '', 'is_user_defined': 1, 'custom_attributes': []};
|
|
||||||
|
|
||||||
this_this.$parent.closeModal();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
sortGroups: function () {
|
|
||||||
return groups.sort(function(a, b) {
|
|
||||||
return a.position - b.position;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Vue.component('group-list', {
|
Vue.component('group-list', {
|
||||||
|
|
||||||
template: '#group-list-template',
|
template: '#group-list-template',
|
||||||
|
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
|
group: {
|
||||||
|
'name': '',
|
||||||
|
'position': '',
|
||||||
|
'is_user_defined': 1,
|
||||||
|
'custom_attributes': []
|
||||||
|
},
|
||||||
|
|
||||||
|
editGroup: {
|
||||||
|
'name': '',
|
||||||
|
'position': '',
|
||||||
|
'is_user_defined': 1,
|
||||||
|
'custom_attributes': []
|
||||||
|
},
|
||||||
|
|
||||||
groups: groups,
|
groups: groups,
|
||||||
|
|
||||||
custom_attributes: custom_attributes
|
custom_attributes: custom_attributes
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -286,6 +284,88 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
addGroup: function (formScope) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
this.$validator.validateAll(formScope).then(function (result) {
|
||||||
|
if (result) {
|
||||||
|
|
||||||
|
var filteredGroups = groups.filter(function(group) {
|
||||||
|
return self.group.name.trim() === group.name.trim()
|
||||||
|
})
|
||||||
|
|
||||||
|
if (filteredGroups.length) {
|
||||||
|
const field = self.$validator.fields.find({ name: 'name', scope: 'add-group-form' });
|
||||||
|
|
||||||
|
if (field) {
|
||||||
|
self.$validator.errors.add({
|
||||||
|
id: field.id,
|
||||||
|
field: 'name',
|
||||||
|
msg: "{{ __('admin::app.catalog.families.group-exist-error') }}",
|
||||||
|
scope: 'add-group-form',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
groups.push(self.group);
|
||||||
|
|
||||||
|
groups = self.sortGroups();
|
||||||
|
|
||||||
|
this.group = {'name': '', 'position': '', 'is_user_defined': 1, 'custom_attributes': []};
|
||||||
|
|
||||||
|
self.$set(self.$root.modalIds, 'addGroupForm', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
updateGroup: function(formScope) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
this.$validator.validateAll(formScope).then(function (result) {
|
||||||
|
if (result) {
|
||||||
|
|
||||||
|
var filteredGroups = groups.filter(function(group) {
|
||||||
|
return self.editGroup.name.trim() === group.name.trim()
|
||||||
|
})
|
||||||
|
|
||||||
|
if (filteredGroups.length > 1) {
|
||||||
|
const field = self.$validator.fields.find({ name: 'name', scope: 'edit-group-form' });
|
||||||
|
|
||||||
|
if (field) {
|
||||||
|
self.$validator.errors.add({
|
||||||
|
id: field.id,
|
||||||
|
field: 'name',
|
||||||
|
msg: "{{ __('admin::app.catalog.families.group-exist-error') }}",
|
||||||
|
scope: 'edit-group-form',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let index = groups.indexOf(self.editGroup)
|
||||||
|
|
||||||
|
groups[index] = self.editGroup;
|
||||||
|
|
||||||
|
groups = self.sortGroups();
|
||||||
|
|
||||||
|
this.editGroup = {'name': '', 'position': '', 'is_user_defined': 1, 'custom_attributes': []};
|
||||||
|
|
||||||
|
self.$set(self.$root.modalIds, 'editGroupForm', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
sortGroups: function () {
|
||||||
|
return groups.sort(function(a, b) {
|
||||||
|
return a.position - b.position;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
openEditGroupModal: function (group) {
|
||||||
|
this.editGroup = group;
|
||||||
|
|
||||||
|
this.$root.showModal('editGroupForm')
|
||||||
|
},
|
||||||
|
|
||||||
removeGroup: function (group) {
|
removeGroup: function (group) {
|
||||||
group.custom_attributes.forEach(function(attribute) {
|
group.custom_attributes.forEach(function(attribute) {
|
||||||
this.custom_attributes.push(attribute);
|
this.custom_attributes.push(attribute);
|
||||||
|
|
@ -342,6 +422,10 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
editGroup: function() {
|
||||||
|
this.$emit('onEditGroup', this.group)
|
||||||
|
},
|
||||||
|
|
||||||
removeGroup: function () {
|
removeGroup: function () {
|
||||||
this.$emit('onRemoveGroup', this.group)
|
this.$emit('onRemoveGroup', this.group)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -64,10 +64,6 @@
|
||||||
|
|
||||||
{!! view_render_event('bagisto.admin.catalog.family.edit_form_accordian.groups.controls.before', ['attributeFamily' => $attributeFamily]) !!}
|
{!! view_render_event('bagisto.admin.catalog.family.edit_form_accordian.groups.controls.before', ['attributeFamily' => $attributeFamily]) !!}
|
||||||
|
|
||||||
<button type="button" style="margin-bottom : 20px" class="btn btn-md btn-primary" @click="showModal('addGroup')">
|
|
||||||
{{ __('admin::app.catalog.families.add-group-title') }}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<group-list></group-list>
|
<group-list></group-list>
|
||||||
|
|
||||||
{!! view_render_event('bagisto.admin.catalog.family.edit_form_accordian.groups.controls.before', ['attributeFamily' => $attributeFamily]) !!}
|
{!! view_render_event('bagisto.admin.catalog.family.edit_form_accordian.groups.controls.before', ['attributeFamily' => $attributeFamily]) !!}
|
||||||
|
|
@ -81,63 +77,106 @@
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<modal id="addGroup" :is-open="modalIds.addGroup">
|
|
||||||
<h3 slot="header">{{ __('admin::app.catalog.families.add-group-title') }}</h3>
|
|
||||||
|
|
||||||
<div slot="body">
|
|
||||||
<group-form></group-form>
|
|
||||||
</div>
|
|
||||||
</modal>
|
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
|
|
||||||
<script type="text/x-template" id="group-form-template">
|
|
||||||
<form method="POST" action="{{ route('admin.catalog.families.store') }}" data-vv-scope="add-group-form" @submit.prevent="addGroup('add-group-form')">
|
|
||||||
|
|
||||||
<div class="page-content">
|
|
||||||
<div class="form-container">
|
|
||||||
@csrf()
|
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('add-group-form.groupName') ? 'has-error' : '']">
|
|
||||||
<label for="groupName" class="required">{{ __('admin::app.catalog.families.name') }}</label>
|
|
||||||
<input type="text" v-validate="'required'" v-model="group.groupName" class="control" id="groupName" name="groupName" data-vv-as=""{{ __('admin::app.catalog.families.name') }}""/>
|
|
||||||
<span class="control-error" v-if="errors.has('add-group-form.groupName')">@{{ errors.first('add-group-form.groupName') }}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('add-group-form.position') ? 'has-error' : '']">
|
|
||||||
<label for="position" class="required">{{ __('admin::app.catalog.families.position') }}</label>
|
|
||||||
<input type="text" v-validate="'required|numeric'" v-model="group.position" class="control" id="position" name="position" data-vv-as=""{{ __('admin::app.catalog.families.position') }}""/>
|
|
||||||
<span class="control-error" v-if="errors.has('add-group-form.position')">@{{ errors.first('add-group-form.position') }}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button type="submit" class="btn btn-lg btn-primary">
|
|
||||||
{{ __('admin::app.catalog.families.add-group-title') }}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/x-template" id="group-list-template">
|
<script type="text/x-template" id="group-list-template">
|
||||||
<div style="margin-top: 20px">
|
<div style="margin-top: 20px">
|
||||||
<group-item v-for='(group, index) in groups' :group="group" :custom_attributes="custom_attributes" :key="index" :index="index" @onRemoveGroup="removeGroup($event)" @onAttributeAdd="addAttributes(index, $event)" @onAttributeRemove="removeAttribute(index, $event)"></group-item>
|
<button type="button" style="margin-bottom : 20px" class="btn btn-md btn-primary" @click="showModal('addGroupForm')">
|
||||||
|
{{ __('admin::app.catalog.families.add-group-title') }}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<modal id="addGroupForm" :is-open="$root.modalIds.addGroupForm">
|
||||||
|
<h3 slot="header">{{ __('admin::app.catalog.families.add-group-title') }}</h3>
|
||||||
|
|
||||||
|
<div slot="body">
|
||||||
|
<form method="POST" data-vv-scope="add-group-form" @submit.prevent="addGroup('add-group-form')">
|
||||||
|
|
||||||
|
<div class="page-content">
|
||||||
|
<div class="form-container">
|
||||||
|
<div class="control-group" :class="[errors.has('add-group-form.name') ? 'has-error' : '']">
|
||||||
|
<label for="name" class="required">{{ __('admin::app.catalog.families.name') }}</label>
|
||||||
|
<input type="text" v-validate="'required'" v-model="group.name" class="control" id="name" name="name" data-vv-as=""{{ __('admin::app.catalog.families.name') }}""/>
|
||||||
|
<span class="control-error" v-if="errors.has('add-group-form.name')">@{{ errors.first('add-group-form.name') }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group" :class="[errors.has('add-group-form.position') ? 'has-error' : '']">
|
||||||
|
<label for="position" class="required">{{ __('admin::app.catalog.families.position') }}</label>
|
||||||
|
<input type="text" v-validate="'required|numeric'" v-model="group.position" class="control" id="position" name="position" data-vv-as=""{{ __('admin::app.catalog.families.position') }}""/>
|
||||||
|
<span class="control-error" v-if="errors.has('add-group-form.position')">@{{ errors.first('add-group-form.position') }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="submit" class="btn btn-lg btn-primary">
|
||||||
|
{{ __('admin::app.catalog.families.add-group-title') }}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</modal>
|
||||||
|
|
||||||
|
<modal id="editGroupForm" :is-open="$root.modalIds.editGroupForm">
|
||||||
|
<h3 slot="header">{{ __('admin::app.catalog.families.edit-group-title') }}</h3>
|
||||||
|
|
||||||
|
<div slot="body">
|
||||||
|
<form method="POST" data-vv-scope="edit-group-form" @submit.prevent="updateGroup('edit-group-form')">
|
||||||
|
|
||||||
|
<div class="page-content">
|
||||||
|
<div class="form-container">
|
||||||
|
<div class="control-group" :class="[errors.has('edit-group-form.name') ? 'has-error' : '']">
|
||||||
|
<label for="name" class="required">{{ __('admin::app.catalog.families.name') }}</label>
|
||||||
|
<input type="text" v-validate="'required'" v-model="editGroup.name" class="control" id="name" name="name" data-vv-as=""{{ __('admin::app.catalog.families.name') }}""/>
|
||||||
|
<span class="control-error" v-if="errors.has('edit-group-form.name')">@{{ errors.first('edit-group-form.name') }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group" :class="[errors.has('edit-group-form.position') ? 'has-error' : '']">
|
||||||
|
<label for="position" class="required">{{ __('admin::app.catalog.families.position') }}</label>
|
||||||
|
<input type="text" v-validate="'required|numeric'" v-model="editGroup.position" class="control" id="position" name="position" data-vv-as=""{{ __('admin::app.catalog.families.position') }}""/>
|
||||||
|
<span class="control-error" v-if="errors.has('edit-group-form.position')">@{{ errors.first('edit-group-form.position') }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="submit" class="btn btn-lg btn-primary">
|
||||||
|
{{ __('admin::app.catalog.families.update-group-title') }}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</modal>
|
||||||
|
|
||||||
|
<group-item
|
||||||
|
v-for='(group, index) in groups'
|
||||||
|
:group="group"
|
||||||
|
:custom_attributes="custom_attributes"
|
||||||
|
:key="index"
|
||||||
|
:index="index"
|
||||||
|
@onRemoveGroup="removeGroup($event)"
|
||||||
|
@onEditGroup="openEditGroupModal($event)"
|
||||||
|
@onAttributeAdd="addAttributes(index, $event)"
|
||||||
|
@onAttributeRemove="removeAttribute(index, $event)"
|
||||||
|
></group-item>
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/x-template" id="group-item-template">
|
<script type="text/x-template" id="group-item-template">
|
||||||
<accordian :title="group.groupName" :active="true">
|
<accordian :title="group.name" :active="true">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<i class="icon expand-icon left"></i>
|
<i class="icon expand-icon left"></i>
|
||||||
<h1>@{{ group.name ? group.name : group.groupName }}</h1>
|
|
||||||
|
<h1>@{{ group.name }}</h1>
|
||||||
|
|
||||||
<i class="icon trash-icon" @click="removeGroup()" v-if="group.is_user_defined"></i>
|
<i class="icon trash-icon" @click="removeGroup()" v-if="group.is_user_defined"></i>
|
||||||
|
|
||||||
|
<span class="icon pencil-lg-icon" @click="editGroup()"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<input type="hidden" :name="[groupInputName + '[name]']" :value="group.name ? group.name : group.groupName"/>
|
<input type="hidden" :name="[groupInputName + '[name]']" :value="group.name"/>
|
||||||
<input type="hidden":name="[groupInputName + '[position]']" :value="group.position"/>
|
<input type="hidden":name="[groupInputName + '[position]']" :value="group.position"/>
|
||||||
|
|
||||||
<div class="table" v-if="group.custom_attributes.length" style="margin-bottom: 20px;">
|
<div class="table" v-if="group.custom_attributes.length" style="margin-bottom: 20px;">
|
||||||
|
|
@ -200,70 +239,27 @@
|
||||||
var groups = @json($attributeFamily->attribute_groups);
|
var groups = @json($attributeFamily->attribute_groups);
|
||||||
var custom_attributes = @json($custom_attributes);
|
var custom_attributes = @json($custom_attributes);
|
||||||
|
|
||||||
Vue.component('group-form', {
|
|
||||||
|
|
||||||
data: function() {
|
|
||||||
return {
|
|
||||||
group: {
|
|
||||||
'groupName': '',
|
|
||||||
'position': '',
|
|
||||||
'custom_attributes': []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
template: '#group-form-template',
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
addGroup: function (formScope) {
|
|
||||||
var this_this = this;
|
|
||||||
|
|
||||||
this.$validator.validateAll(formScope).then(function (result) {
|
|
||||||
if (result) {
|
|
||||||
|
|
||||||
var filteredGroups = groups.filter(function(group) {
|
|
||||||
return this_this.group.groupName.trim() === (group.name ? group.name.trim() : group.groupName.trim())
|
|
||||||
})
|
|
||||||
|
|
||||||
if (filteredGroups.length) {
|
|
||||||
const field = this.$validator.fields.find({ name: 'groupName', scope: 'add-group-form' });
|
|
||||||
|
|
||||||
if (field) {
|
|
||||||
this.$validator.errors.add({
|
|
||||||
id: field.id,
|
|
||||||
field: 'groupName',
|
|
||||||
msg: "{{ __('admin::app.catalog.families.group-exist-error') }}",
|
|
||||||
scope: 'add-group-form',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
groups.push(this_this.group);
|
|
||||||
|
|
||||||
groups = this_this.sortGroups();
|
|
||||||
|
|
||||||
this.group = {'groupName': '', 'position': '', 'is_user_defined': 1, 'custom_attributes': []};
|
|
||||||
|
|
||||||
this_this.$parent.closeModal();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
sortGroups: function () {
|
|
||||||
return groups.sort(function(a, b) {
|
|
||||||
return a.position - b.position;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Vue.component('group-list', {
|
Vue.component('group-list', {
|
||||||
|
|
||||||
template: '#group-list-template',
|
template: '#group-list-template',
|
||||||
|
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
|
group: {
|
||||||
|
'name': '',
|
||||||
|
'position': '',
|
||||||
|
'custom_attributes': []
|
||||||
|
},
|
||||||
|
|
||||||
|
editGroup: {
|
||||||
|
'name': '',
|
||||||
|
'position': '',
|
||||||
|
'is_user_defined': 1,
|
||||||
|
'custom_attributes': []
|
||||||
|
},
|
||||||
|
|
||||||
groups: groups,
|
groups: groups,
|
||||||
|
|
||||||
custom_attributes: custom_attributes
|
custom_attributes: custom_attributes
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -286,6 +282,88 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
addGroup: function (formScope) {
|
||||||
|
var this_this = this;
|
||||||
|
|
||||||
|
this.$validator.validateAll(formScope).then(function (result) {
|
||||||
|
if (result) {
|
||||||
|
|
||||||
|
var filteredGroups = groups.filter(function(group) {
|
||||||
|
return this_this.group.name.trim() === group.name.trim()
|
||||||
|
})
|
||||||
|
|
||||||
|
if (filteredGroups.length) {
|
||||||
|
const field = this.$validator.fields.find({ name: 'name', scope: 'add-group-form' });
|
||||||
|
|
||||||
|
if (field) {
|
||||||
|
this.$validator.errors.add({
|
||||||
|
id: field.id,
|
||||||
|
field: 'name',
|
||||||
|
msg: "{{ __('admin::app.catalog.families.group-exist-error') }}",
|
||||||
|
scope: 'add-group-form',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
groups.push(this_this.group);
|
||||||
|
|
||||||
|
groups = this_this.sortGroups();
|
||||||
|
|
||||||
|
this.group = {'name': '', 'position': '', 'is_user_defined': 1, 'custom_attributes': []};
|
||||||
|
|
||||||
|
self.$set(self.$root.modalIds, 'addGroupForm', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
updateGroup: function(formScope) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
this.$validator.validateAll(formScope).then(function (result) {
|
||||||
|
if (result) {
|
||||||
|
|
||||||
|
var filteredGroups = groups.filter(function(group) {
|
||||||
|
return self.editGroup.name.trim() === group.name.trim()
|
||||||
|
})
|
||||||
|
|
||||||
|
if (filteredGroups.length > 1) {
|
||||||
|
const field = self.$validator.fields.find({ name: 'name', scope: 'edit-group-form' });
|
||||||
|
|
||||||
|
if (field) {
|
||||||
|
self.$validator.errors.add({
|
||||||
|
id: field.id,
|
||||||
|
field: 'name',
|
||||||
|
msg: "{{ __('admin::app.catalog.families.group-exist-error') }}",
|
||||||
|
scope: 'edit-group-form',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let index = groups.indexOf(self.editGroup)
|
||||||
|
|
||||||
|
groups[index] = self.editGroup;
|
||||||
|
|
||||||
|
groups = self.sortGroups();
|
||||||
|
|
||||||
|
this.editGroup = {'name': '', 'position': '', 'is_user_defined': 1, 'custom_attributes': []};
|
||||||
|
|
||||||
|
self.$set(self.$root.modalIds, 'editGroupForm', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
sortGroups: function () {
|
||||||
|
return groups.sort(function(a, b) {
|
||||||
|
return a.position - b.position;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
openEditGroupModal: function (group) {
|
||||||
|
this.editGroup = group;
|
||||||
|
|
||||||
|
this.$root.showModal('editGroupForm')
|
||||||
|
},
|
||||||
|
|
||||||
removeGroup: function (group) {
|
removeGroup: function (group) {
|
||||||
group.custom_attributes.forEach(function(attribute) {
|
group.custom_attributes.forEach(function(attribute) {
|
||||||
this.custom_attributes.push(attribute);
|
this.custom_attributes.push(attribute);
|
||||||
|
|
@ -347,6 +425,10 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
editGroup: function() {
|
||||||
|
this.$emit('onEditGroup', this.group)
|
||||||
|
},
|
||||||
|
|
||||||
removeGroup: function () {
|
removeGroup: function () {
|
||||||
this.$emit('onRemoveGroup', this.group)
|
this.$emit('onRemoveGroup', this.group)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
v-for='(image, index) in items'
|
v-for='(image, index) in items'
|
||||||
:key='image.id'
|
:key='image.id'
|
||||||
:image="image"
|
:image="image"
|
||||||
|
class="draggable"
|
||||||
@onRemoveImage="removeImage($event)"
|
@onRemoveImage="removeImage($event)"
|
||||||
@onImageSelected="imageSelected($event)">
|
@onImageSelected="imageSelected($event)">
|
||||||
</product-image-item>
|
</product-image-item>
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label for="name" >{{ __('admin::app.customers.reviews.comment') }}</label>
|
<label for="name" >{{ __('admin::app.customers.reviews.comment') }}</label>
|
||||||
<textarea class="control" disabled> {{ $review->comment }}</textarea>
|
<textarea class="control" disabled v-text='"{{ $review->comment }}"'> </textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if (count($review->images) > 0)
|
@if (count($review->images) > 0)
|
||||||
|
|
|
||||||
|
|
@ -28,52 +28,54 @@
|
||||||
<div class="title">
|
<div class="title">
|
||||||
{{ __('admin::app.dashboard.total-customers') }}
|
{{ __('admin::app.dashboard.total-customers') }}
|
||||||
</div>
|
</div>
|
||||||
|
<a href="{{ route('admin.customer.index') }}">
|
||||||
|
<div class="data">
|
||||||
|
{{ $statistics['total_customers']['current'] }}
|
||||||
|
|
||||||
<div class="data">
|
<span class="progress">
|
||||||
{{ $statistics['total_customers']['current'] }}
|
@if ($statistics['total_customers']['progress'] < 0)
|
||||||
|
<span class="icon graph-down-icon"></span>
|
||||||
<span class="progress">
|
{{ __('admin::app.dashboard.decreased', [
|
||||||
@if ($statistics['total_customers']['progress'] < 0)
|
'progress' => -number_format($statistics['total_customers']['progress'], 1)
|
||||||
<span class="icon graph-down-icon"></span>
|
])
|
||||||
{{ __('admin::app.dashboard.decreased', [
|
}}
|
||||||
'progress' => -number_format($statistics['total_customers']['progress'], 1)
|
@else
|
||||||
])
|
<span class="icon graph-up-icon"></span>
|
||||||
}}
|
{{ __('admin::app.dashboard.increased', [
|
||||||
@else
|
'progress' => number_format($statistics['total_customers']['progress'], 1)
|
||||||
<span class="icon graph-up-icon"></span>
|
])
|
||||||
{{ __('admin::app.dashboard.increased', [
|
}}
|
||||||
'progress' => number_format($statistics['total_customers']['progress'], 1)
|
@endif
|
||||||
])
|
</span>
|
||||||
}}
|
</div>
|
||||||
@endif
|
</a>
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dashboard-card">
|
<div class="dashboard-card">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
{{ __('admin::app.dashboard.total-orders') }}
|
{{ __('admin::app.dashboard.total-orders') }}
|
||||||
</div>
|
</div>
|
||||||
|
<a href="{{ route('admin.sales.orders.index') }}">
|
||||||
|
<div class="data">
|
||||||
|
{{ $statistics['total_orders']['current'] }}
|
||||||
|
|
||||||
<div class="data">
|
<span class="progress">
|
||||||
{{ $statistics['total_orders']['current'] }}
|
@if ($statistics['total_orders']['progress'] < 0)
|
||||||
|
<span class="icon graph-down-icon"></span>
|
||||||
<span class="progress">
|
{{ __('admin::app.dashboard.decreased', [
|
||||||
@if ($statistics['total_orders']['progress'] < 0)
|
'progress' => -number_format($statistics['total_orders']['progress'], 1)
|
||||||
<span class="icon graph-down-icon"></span>
|
])
|
||||||
{{ __('admin::app.dashboard.decreased', [
|
}}
|
||||||
'progress' => -number_format($statistics['total_orders']['progress'], 1)
|
@else
|
||||||
])
|
<span class="icon graph-up-icon"></span>
|
||||||
}}
|
{{ __('admin::app.dashboard.increased', [
|
||||||
@else
|
'progress' => number_format($statistics['total_orders']['progress'], 1)
|
||||||
<span class="icon graph-up-icon"></span>
|
])
|
||||||
{{ __('admin::app.dashboard.increased', [
|
}}
|
||||||
'progress' => number_format($statistics['total_orders']['progress'], 1)
|
@endif
|
||||||
])
|
</span>
|
||||||
}}
|
</div>
|
||||||
@endif
|
</a>
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dashboard-card">
|
<div class="dashboard-card">
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,6 @@
|
||||||
$tree->items = core()->sortItems($tree->items);
|
$tree->items = core()->sortItems($tree->items);
|
||||||
|
|
||||||
$config = $tree;
|
$config = $tree;
|
||||||
|
|
||||||
$allLocales = core()->getAllLocales()->pluck('name', 'code');
|
|
||||||
|
|
||||||
$currentLocaleCode = core()->getRequestedLocaleCode('admin_locale');
|
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
<mobile-nav></mobile-nav>
|
<mobile-nav></mobile-nav>
|
||||||
|
|
@ -83,23 +79,6 @@
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
<div class="nav-item">
|
|
||||||
<a class="nav-tab-name">
|
|
||||||
<span class="icon-menu icon locale-icon"
|
|
||||||
style="margin-right:10px; display: inline-block;vertical-align: middle;transform: scale(0.8);"></span>
|
|
||||||
<span class="menu-label"> {{ __('admin::app.datagrid.locale') }} {{ $allLocales[$currentLocaleCode] }}</span>
|
|
||||||
<span class="icon arrow-icon"></span>
|
|
||||||
</a>
|
|
||||||
<ul>
|
|
||||||
@foreach ($allLocales as $code => $name)
|
|
||||||
<li class="navbar-child">
|
|
||||||
<a href="{{ url()->current() . '?' . http_build_query(array_merge(request()->all(), ['admin_locale' => $code])) }}">
|
|
||||||
<span style="margin-left:47px"> {{ $name }}</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
@endforeach
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="nav-item">
|
<div class="nav-item">
|
||||||
<a class="nav-tab-name">
|
<a class="nav-tab-name">
|
||||||
<span class="icon-menu icon accounts-icon"
|
<span class="icon-menu icon accounts-icon"
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,6 @@
|
||||||
$config = $tree;
|
$config = $tree;
|
||||||
|
|
||||||
$allLocales = core()->getAllLocales()->pluck('name', 'code');
|
$allLocales = core()->getAllLocales()->pluck('name', 'code');
|
||||||
|
|
||||||
$currentLocaleCode = core()->getRequestedLocaleCode('admin_locale');
|
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
<div class="navbar-left" v-bind:class="{'open': isMenuOpen}">
|
<div class="navbar-left" v-bind:class="{'open': isMenuOpen}">
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,6 @@
|
||||||
'processing' => trans('admin::app.notification.order-status-messages.processing')
|
'processing' => trans('admin::app.notification.order-status-messages.processing')
|
||||||
];
|
];
|
||||||
$allLocales = core()->getAllLocales()->pluck('name', 'code');
|
$allLocales = core()->getAllLocales()->pluck('name', 'code');
|
||||||
|
|
||||||
$currentLocaleCode = core()->getRequestedLocaleCode('admin_locale');
|
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
<div class="navbar-top">
|
<div class="navbar-top">
|
||||||
|
|
@ -64,29 +62,6 @@
|
||||||
|
|
||||||
</notification>
|
</notification>
|
||||||
|
|
||||||
<div class="profile-info">
|
|
||||||
|
|
||||||
<div class="dropdown-toggle">
|
|
||||||
|
|
||||||
<i class="icon locale-icon"></i>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="dropdown-list bottom-right">
|
|
||||||
<div class="dropdown-container">
|
|
||||||
<ul>
|
|
||||||
@foreach ($allLocales as $code => $name)
|
|
||||||
<li>
|
|
||||||
<a href="{{ url()->current() . '?' . http_build_query(array_merge(request()->all(), ['admin_locale' => $code])) }}"
|
|
||||||
style="{{ $code == $currentLocaleCode ? 'color:blue' : '' }}">
|
|
||||||
{{ $name }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
@endforeach
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="profile-info">
|
<div class="profile-info">
|
||||||
<div class="dropdown-toggle">
|
<div class="dropdown-toggle">
|
||||||
<div style="display: inline-block; vertical-align: middle;">
|
<div style="display: inline-block; vertical-align: middle;">
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ use Webkul\User\Http\Controllers\SessionController;
|
||||||
/**
|
/**
|
||||||
* Auth routes.
|
* Auth routes.
|
||||||
*/
|
*/
|
||||||
Route::group(['middleware' => ['web', 'admin_locale'], 'prefix' => config('app.admin_url')], function () {
|
Route::group(['middleware' => ['web'], 'prefix' => config('app.admin_url')], function () {
|
||||||
/**
|
/**
|
||||||
* Redirect route.
|
* Redirect route.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ use Webkul\Product\Http\Controllers\ProductController;
|
||||||
/**
|
/**
|
||||||
* Catalog routes.
|
* Catalog routes.
|
||||||
*/
|
*/
|
||||||
Route::group(['middleware' => ['web', 'admin', 'admin_locale'], 'prefix' => config('app.admin_url')], function () {
|
Route::group(['middleware' => ['web', 'admin'], 'prefix' => config('app.admin_url')], function () {
|
||||||
Route::prefix('catalog')->group(function () {
|
Route::prefix('catalog')->group(function () {
|
||||||
/**
|
/**
|
||||||
* Sync route.
|
* Sync route.
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ use Webkul\CMS\Http\Controllers\Admin\PageController;
|
||||||
/**
|
/**
|
||||||
* CMS routes.
|
* CMS routes.
|
||||||
*/
|
*/
|
||||||
Route::group(['middleware' => ['web', 'admin', 'admin_locale'], 'prefix' => config('app.admin_url')], function () {
|
Route::group(['middleware' => ['web', 'admin'], 'prefix' => config('app.admin_url')], function () {
|
||||||
Route::prefix('cms')->group(function () {
|
Route::prefix('cms')->group(function () {
|
||||||
Route::get('/', [PageController::class, 'index'])->defaults('_config', [
|
Route::get('/', [PageController::class, 'index'])->defaults('_config', [
|
||||||
'view' => 'admin::cms.index',
|
'view' => 'admin::cms.index',
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ use Webkul\Admin\Http\Controllers\ConfigurationController;
|
||||||
/**
|
/**
|
||||||
* Configuration routes.
|
* Configuration routes.
|
||||||
*/
|
*/
|
||||||
Route::group(['middleware' => ['web', 'admin', 'admin_locale'], 'prefix' => config('app.admin_url')], function () {
|
Route::group(['middleware' => ['web', 'admin'], 'prefix' => config('app.admin_url')], function () {
|
||||||
Route::get('configuration/{slug?}/{slug2?}', [ConfigurationController::class, 'index'])->defaults('_config', [
|
Route::get('configuration/{slug?}/{slug2?}', [ConfigurationController::class, 'index'])->defaults('_config', [
|
||||||
'view' => 'admin::configuration.index',
|
'view' => 'admin::configuration.index',
|
||||||
])->name('admin.configuration.index');
|
])->name('admin.configuration.index');
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ use Webkul\Product\Http\Controllers\ReviewController;
|
||||||
/**
|
/**
|
||||||
* Customers routes.
|
* Customers routes.
|
||||||
*/
|
*/
|
||||||
Route::group(['middleware' => ['web', 'admin', 'admin_locale'], 'prefix' => config('app.admin_url')], function () {
|
Route::group(['middleware' => ['web', 'admin'], 'prefix' => config('app.admin_url')], function () {
|
||||||
/**
|
/**
|
||||||
* Customer management routes.
|
* Customer management routes.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ use Webkul\Sitemap\Http\Controllers\Admin\SitemapController;
|
||||||
/**
|
/**
|
||||||
* Marketing routes.
|
* Marketing routes.
|
||||||
*/
|
*/
|
||||||
Route::group(['middleware' => ['web', 'admin', 'admin_locale'], 'prefix' => config('app.admin_url')], function () {
|
Route::group(['middleware' => ['web', 'admin'], 'prefix' => config('app.admin_url')], function () {
|
||||||
Route::prefix('promotions')->group(function () {
|
Route::prefix('promotions')->group(function () {
|
||||||
/**
|
/**
|
||||||
* Cart rules routes.
|
* Cart rules routes.
|
||||||
|
|
@ -173,7 +173,6 @@ Route::group(['middleware' => ['web', 'admin', 'admin_locale'], 'prefix' => conf
|
||||||
'redirect' => 'admin.customers.subscribers.index',
|
'redirect' => 'admin.customers.subscribers.index',
|
||||||
])->name('admin.customers.subscribers.update');
|
])->name('admin.customers.subscribers.update');
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cart rules routes.
|
* Cart rules routes.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ use Webkul\Notification\Http\Controllers\Admin\NotificationController;
|
||||||
/**
|
/**
|
||||||
* Notification routes.
|
* Notification routes.
|
||||||
*/
|
*/
|
||||||
Route::group(['middleware' => ['web', 'admin', 'admin_locale'], 'prefix' => config('app.admin_url')], function () {
|
Route::group(['middleware' => ['web', 'admin'], 'prefix' => config('app.admin_url')], function () {
|
||||||
Route::get('notifications', [NotificationController::class, 'index'])->defaults('_config', [
|
Route::get('notifications', [NotificationController::class, 'index'])->defaults('_config', [
|
||||||
'view' => 'admin::notifications.index',
|
'view' => 'admin::notifications.index',
|
||||||
])->name('admin.notification.index');
|
])->name('admin.notification.index');
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ use Webkul\User\Http\Controllers\SessionController;
|
||||||
/**
|
/**
|
||||||
* Extra routes.
|
* Extra routes.
|
||||||
*/
|
*/
|
||||||
Route::group(['middleware' => ['web', 'admin', 'admin_locale'], 'prefix' => config('app.admin_url')], function () {
|
Route::group(['middleware' => ['web', 'admin'], 'prefix' => config('app.admin_url')], function () {
|
||||||
/**
|
/**
|
||||||
* Tinymce file upload handler.
|
* Tinymce file upload handler.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ use Webkul\Admin\Http\Controllers\Sales\TransactionController;
|
||||||
/**
|
/**
|
||||||
* Sales routes.
|
* Sales routes.
|
||||||
*/
|
*/
|
||||||
Route::group(['middleware' => ['web', 'admin', 'admin_locale'], 'prefix' => config('app.admin_url')], function () {
|
Route::group(['middleware' => ['web', 'admin'], 'prefix' => config('app.admin_url')], function () {
|
||||||
Route::prefix('sales')->group(function () {
|
Route::prefix('sales')->group(function () {
|
||||||
/**
|
/**
|
||||||
* Orders routes.
|
* Orders routes.
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ use Webkul\User\Http\Controllers\UserController;
|
||||||
/**
|
/**
|
||||||
* Settings routes.
|
* Settings routes.
|
||||||
*/
|
*/
|
||||||
Route::group(['middleware' => ['web', 'admin', 'admin_locale'], 'prefix' => config('app.admin_url')], function () {
|
Route::group(['middleware' => ['web', 'admin'], 'prefix' => config('app.admin_url')], function () {
|
||||||
/**
|
/**
|
||||||
* Roles routes.
|
* Roles routes.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
/**
|
/**
|
||||||
* Sales routes.
|
* Sales routes.
|
||||||
*/
|
*/
|
||||||
Route::group(['middleware' => ['web', 'admin', 'admin_locale'], 'prefix' => config('app.admin_url')], function () {
|
Route::group(['middleware' => ['web', 'admin'], 'prefix' => config('app.admin_url')], function () {
|
||||||
Route::prefix('sales')->group(function () {
|
Route::prefix('sales')->group(function () {
|
||||||
/**
|
/**
|
||||||
* Booking routes.
|
* Booking routes.
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@ return [
|
||||||
'book-an-appointment' => 'حجز موعد',
|
'book-an-appointment' => 'حجز موعد',
|
||||||
'date' => 'تاريخ',
|
'date' => 'تاريخ',
|
||||||
'slot' => 'فتحة',
|
'slot' => 'فتحة',
|
||||||
|
'no-slots-available' => 'No slots available',
|
||||||
'rent-an-item' => 'استئجار عنصر',
|
'rent-an-item' => 'استئجار عنصر',
|
||||||
'choose-rent-option' => 'اختر خيار الإيجار',
|
'choose-rent-option' => 'اختر خيار الإيجار',
|
||||||
'daily-basis' => 'الأساس اليومي',
|
'daily-basis' => 'الأساس اليومي',
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@ return [
|
||||||
'book-an-appointment' => 'Book an Appointment',
|
'book-an-appointment' => 'Book an Appointment',
|
||||||
'date' => 'Date',
|
'date' => 'Date',
|
||||||
'slot' => 'Slot',
|
'slot' => 'Slot',
|
||||||
|
'no-slots-available' => 'No slots available',
|
||||||
'rent-an-item' => 'Rent an Item',
|
'rent-an-item' => 'Rent an Item',
|
||||||
'choose-rent-option' => 'Choose Rent Option',
|
'choose-rent-option' => 'Choose Rent Option',
|
||||||
'daily-basis' => 'Daily Basis',
|
'daily-basis' => 'Daily Basis',
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@ return [
|
||||||
'book-an-appointment' => 'Reservar una Cita',
|
'book-an-appointment' => 'Reservar una Cita',
|
||||||
'date' => 'Fecha',
|
'date' => 'Fecha',
|
||||||
'slot' => 'Horario',
|
'slot' => 'Horario',
|
||||||
|
'no-slots-available' => 'No slots available',
|
||||||
'rent-an-item' => 'Alquilar un Artículo',
|
'rent-an-item' => 'Alquilar un Artículo',
|
||||||
'choose-rent-option' => 'Elija la Opción de Alquiler',
|
'choose-rent-option' => 'Elija la Opción de Alquiler',
|
||||||
'daily-basis' => 'Diariamente',
|
'daily-basis' => 'Diariamente',
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@ return [
|
||||||
'book-an-appointment' => 'قرار ملاقات را رزرو کنید',
|
'book-an-appointment' => 'قرار ملاقات را رزرو کنید',
|
||||||
'date' => 'تاریخ',
|
'date' => 'تاریخ',
|
||||||
'slot' => 'اسلات',
|
'slot' => 'اسلات',
|
||||||
|
'no-slots-available' => 'No slots available',
|
||||||
'rent-an-item' => 'اجاره یک مورد',
|
'rent-an-item' => 'اجاره یک مورد',
|
||||||
'choose-rent-option' => 'گزینه اجاره را انتخاب کنید',
|
'choose-rent-option' => 'گزینه اجاره را انتخاب کنید',
|
||||||
'daily-basis' => 'به صورت روزانه',
|
'daily-basis' => 'به صورت روزانه',
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@ return [
|
||||||
'book-an-appointment' => 'एक अपॉइंटमेंट बुक करें',
|
'book-an-appointment' => 'एक अपॉइंटमेंट बुक करें',
|
||||||
'date' => 'तारीख',
|
'date' => 'तारीख',
|
||||||
'slot' => 'स्लॉट',
|
'slot' => 'स्लॉट',
|
||||||
|
'no-slots-available' => 'No slots available',
|
||||||
'rent-an-item' => 'एक वस्तु किराए पर लें',
|
'rent-an-item' => 'एक वस्तु किराए पर लें',
|
||||||
'choose-rent-option' => 'किराया विकल्प चुनें',
|
'choose-rent-option' => 'किराया विकल्प चुनें',
|
||||||
'daily-basis' => 'दैनिक आधार पर',
|
'daily-basis' => 'दैनिक आधार पर',
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ return [
|
||||||
'same-slot-all-days' => 'Stesso Slot tutti i giorni',
|
'same-slot-all-days' => 'Stesso Slot tutti i giorni',
|
||||||
'slot-has-quantity' => 'Slot ha quantità',
|
'slot-has-quantity' => 'Slot ha quantità',
|
||||||
'slots' => 'Slot',
|
'slots' => 'Slot',
|
||||||
|
'no-slots-available' => 'No slots available',
|
||||||
'from' => 'Da',
|
'from' => 'Da',
|
||||||
'to' => 'A',
|
'to' => 'A',
|
||||||
'qty' => 'Qtà',
|
'qty' => 'Qtà',
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@ return [
|
||||||
'book-an-appointment' => 'Een afspraak maken',
|
'book-an-appointment' => 'Een afspraak maken',
|
||||||
'date' => 'Datum',
|
'date' => 'Datum',
|
||||||
'slot' => 'Sleuf',
|
'slot' => 'Sleuf',
|
||||||
|
'no-slots-available' => 'No slots available',
|
||||||
'rent-an-item' => 'Huur een item',
|
'rent-an-item' => 'Huur een item',
|
||||||
'choose-rent-option' => 'Kies Huuroptie',
|
'choose-rent-option' => 'Kies Huuroptie',
|
||||||
'daily-basis' => 'Dagelijks',
|
'daily-basis' => 'Dagelijks',
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@ return [
|
||||||
'book-an-appointment' => 'Marque uma consulta',
|
'book-an-appointment' => 'Marque uma consulta',
|
||||||
'date' => 'Date',
|
'date' => 'Date',
|
||||||
'slot' => 'Slot',
|
'slot' => 'Slot',
|
||||||
|
'no-slots-available' => 'No slots available',
|
||||||
'rent-an-item' => 'Alugar um item',
|
'rent-an-item' => 'Alugar um item',
|
||||||
'choose-rent-option' => 'Escolha a opção de aluguel',
|
'choose-rent-option' => 'Escolha a opção de aluguel',
|
||||||
'daily-basis' => 'Diariamente',
|
'daily-basis' => 'Diariamente',
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@ return [
|
||||||
'book-an-appointment' => 'Randevu Al',
|
'book-an-appointment' => 'Randevu Al',
|
||||||
'date' => 'Tarih',
|
'date' => 'Tarih',
|
||||||
'slot' => 'Slot',
|
'slot' => 'Slot',
|
||||||
|
'no-slots-available' => 'No slots available',
|
||||||
'rent-an-item' => 'Eşya Kiralama',
|
'rent-an-item' => 'Eşya Kiralama',
|
||||||
'choose-rent-option' => 'Kiralama Seçeneğini Seçin',
|
'choose-rent-option' => 'Kiralama Seçeneğini Seçin',
|
||||||
'daily-basis' => 'Günlük Bazında',
|
'daily-basis' => 'Günlük Bazında',
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@ return [
|
||||||
'book-an-appointment' => '预约',
|
'book-an-appointment' => '预约',
|
||||||
'date' => '日期',
|
'date' => '日期',
|
||||||
'slot' => '插槽',
|
'slot' => '插槽',
|
||||||
|
'no-slots-available' => 'No slots available',
|
||||||
'rent-an-item' => '租一个项目',
|
'rent-an-item' => '租一个项目',
|
||||||
'choose-rent-option' => '选择租金选项',
|
'choose-rent-option' => '选择租金选项',
|
||||||
'daily-basis' => '每日基础',
|
'daily-basis' => '每日基础',
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@
|
||||||
<div class="control-group slots" :class="[errors.has('booking[slot]') ? 'has-error' : '']">
|
<div class="control-group slots" :class="[errors.has('booking[slot]') ? 'has-error' : '']">
|
||||||
<select v-validate="'required'" name="booking[slot]" class="control" data-vv-as=""{{ __('bookingproduct::app.shop.products.slot') }}"">
|
<select v-validate="'required'" name="booking[slot]" class="control" data-vv-as=""{{ __('bookingproduct::app.shop.products.slot') }}"">
|
||||||
<option v-for="slot in slots" :value="slot.timestamp">@{{ slot.from + ' - ' + slot.to }}</option>
|
<option v-for="slot in slots" :value="slot.timestamp">@{{ slot.from + ' - ' + slot.to }}</option>
|
||||||
|
|
||||||
|
<option value="" v-if="! slots.length">{{ __('bookingproduct::app.shop.products.no-slots-available') }}</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<span class="control-error" v-if="errors.has('booking[slot]')">@{{ errors.first('booking[slot]') }}</span>
|
<span class="control-error" v-if="errors.has('booking[slot]')">@{{ errors.first('booking[slot]') }}</span>
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@
|
||||||
<div class="form-group slots" :class="[errors.has('booking[slot]') ? 'has-error' : '']">
|
<div class="form-group slots" :class="[errors.has('booking[slot]') ? 'has-error' : '']">
|
||||||
<select v-validate="'required'" name="booking[slot]" class="form-style" data-vv-as=""{{ __('bookingproduct::app.shop.products.slot') }}"">
|
<select v-validate="'required'" name="booking[slot]" class="form-style" data-vv-as=""{{ __('bookingproduct::app.shop.products.slot') }}"">
|
||||||
<option v-for="slot in slots" :value="slot.timestamp">@{{ slot.from + ' - ' + slot.to }}</option>
|
<option v-for="slot in slots" :value="slot.timestamp">@{{ slot.from + ' - ' + slot.to }}</option>
|
||||||
|
|
||||||
|
<option value="" v-if="! slots.length">{{ __('bookingproduct::app.shop.products.no-slots-available') }}</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<span class="control-error" v-if="errors.has('booking[slot]')">@{{ errors.first('booking[slot]') }}</span>
|
<span class="control-error" v-if="errors.has('booking[slot]')">@{{ errors.first('booking[slot]') }}</span>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,114 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Webkul\Core\Console\Commands;
|
||||||
|
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
|
||||||
|
class BagistoPublish extends Command
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The name and signature of the console command.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $signature = 'bagisto:publish { --force : Overwrite any existing files }';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'Publish the available assets';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of providers.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $providers = [
|
||||||
|
/**
|
||||||
|
* Package providers.
|
||||||
|
*/
|
||||||
|
[
|
||||||
|
'name' => 'DB Blade Compiler',
|
||||||
|
'provider' => \Flynsarmy\DbBladeCompiler\DbBladeCompilerServiceProvider::class,
|
||||||
|
],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bagisto providers.
|
||||||
|
*/
|
||||||
|
[
|
||||||
|
'name' => 'Admin',
|
||||||
|
'provider' => \Webkul\Admin\Providers\AdminServiceProvider::class,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'UI',
|
||||||
|
'provider' => \Webkul\Ui\Providers\UiServiceProvider::class,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Core',
|
||||||
|
'provider' => \Webkul\Core\Providers\CoreServiceProvider::class,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Shop',
|
||||||
|
'provider' => \Webkul\Shop\Providers\ShopServiceProvider::class,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Product',
|
||||||
|
'provider' => \Webkul\Product\Providers\ProductServiceProvider::class,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Velocity',
|
||||||
|
'provider' => \Webkul\Velocity\Providers\VelocityServiceProvider::class,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Booking Product',
|
||||||
|
'provider' => \Webkul\BookingProduct\Providers\BookingProductServiceProvider::class,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Social',
|
||||||
|
'provider' => \Webkul\SocialLogin\Providers\SocialLoginServiceProvider::class,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
$this->publishAllPackages();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Publish all packages.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function publishAllPackages(): void
|
||||||
|
{
|
||||||
|
collect($this->providers)->each(function ($provider) {
|
||||||
|
$this->publishPackage($provider);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Publish package.
|
||||||
|
*
|
||||||
|
* @param array $provider
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function publishPackage(array $provider): void
|
||||||
|
{
|
||||||
|
$this->line('');
|
||||||
|
$this->line('-----------------------------------------');
|
||||||
|
$this->info('Publishing ' . $provider['name']);
|
||||||
|
$this->line('-----------------------------------------');
|
||||||
|
|
||||||
|
$this->call('vendor:publish', [
|
||||||
|
'--provider' => $provider['provider'],
|
||||||
|
'--force' => $this->option('force'),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -53,9 +53,9 @@ class Install extends Command
|
||||||
$result = $this->call('db:seed');
|
$result = $this->call('db:seed');
|
||||||
$this->info($result);
|
$this->info($result);
|
||||||
|
|
||||||
// running `php artisan vendor:publish --all`
|
// running `php artisan bagisto:publish --force`
|
||||||
$this->warn('Step: Publishing assets and configurations...');
|
$this->warn('Step: Publishing assets and configurations...');
|
||||||
$result = $this->call('vendor:publish', ['--all' => true, '--force' => true]);
|
$result = $this->call('bagisto:publish', ['--force' => true]);
|
||||||
$this->info($result);
|
$this->info($result);
|
||||||
|
|
||||||
// running `php artisan storage:link`
|
// running `php artisan storage:link`
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,7 @@ class Core
|
||||||
protected LocaleRepository $localeRepository,
|
protected LocaleRepository $localeRepository,
|
||||||
protected CustomerGroupRepository $customerGroupRepository,
|
protected CustomerGroupRepository $customerGroupRepository,
|
||||||
protected CoreConfigRepository $coreConfigRepository
|
protected CoreConfigRepository $coreConfigRepository
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -246,7 +245,7 @@ class Core
|
||||||
|
|
||||||
return $data = [
|
return $data = [
|
||||||
'channel' => $channel,
|
'channel' => $channel,
|
||||||
'locales' => $channel->locales()->orderBy('name')->get()
|
'locales' => $channel->locales()->orderBy('name')->get(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -598,11 +597,13 @@ class Core
|
||||||
/**
|
/**
|
||||||
* Return currency symbol from currency code.
|
* Return currency symbol from currency code.
|
||||||
*
|
*
|
||||||
* @param float $price
|
* @param string|\Webkul\Core\Contracts\Currency $currency
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function currencySymbol($code)
|
public function currencySymbol($currency)
|
||||||
{
|
{
|
||||||
|
$code = $currency instanceof \Webkul\Core\Contracts\Currency ? $currency->code : $currency;
|
||||||
|
|
||||||
$formatter = new \NumberFormatter(app()->getLocale() . '@currency=' . $code, \NumberFormatter::CURRENCY);
|
$formatter = new \NumberFormatter(app()->getLocale() . '@currency=' . $code, \NumberFormatter::CURRENCY);
|
||||||
|
|
||||||
return $formatter->getSymbol(\NumberFormatter::CURRENCY_SYMBOL);
|
return $formatter->getSymbol(\NumberFormatter::CURRENCY_SYMBOL);
|
||||||
|
|
@ -1206,7 +1207,7 @@ class Core
|
||||||
* @param array $array2
|
* @param array $array2
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
protected function arrayMerge(array &$array1, array &$array2)
|
protected function arrayMerge(array&$array1, array&$array2)
|
||||||
{
|
{
|
||||||
$merged = $array1;
|
$merged = $array1;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,7 @@ class CoreServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
if ($this->app->runningInConsole()) {
|
if ($this->app->runningInConsole()) {
|
||||||
$this->commands([
|
$this->commands([
|
||||||
|
\Webkul\Core\Console\Commands\BagistoPublish::class,
|
||||||
\Webkul\Core\Console\Commands\BagistoVersion::class,
|
\Webkul\Core\Console\Commands\BagistoVersion::class,
|
||||||
\Webkul\Core\Console\Commands\Install::class,
|
\Webkul\Core\Console\Commands\Install::class,
|
||||||
\Webkul\Core\Console\Commands\ExchangeRateUpdate::class,
|
\Webkul\Core\Console\Commands\ExchangeRateUpdate::class,
|
||||||
|
|
|
||||||
|
|
@ -125,13 +125,14 @@ class WishlistController extends Controller
|
||||||
$updateCounts = $this->currentCustomer->wishlist_items()->update(['shared' => $data['shared']]);
|
$updateCounts = $this->currentCustomer->wishlist_items()->update(['shared' => $data['shared']]);
|
||||||
|
|
||||||
if ($updateCounts && $updateCounts > 0) {
|
if ($updateCounts && $updateCounts > 0) {
|
||||||
session()->flash('success', __('shop::app.customer.account.wishlist.update-message'));
|
return response()->json([
|
||||||
|
'isWishlistShared' => $this->currentCustomer->isWishlistShared(),
|
||||||
return redirect()->back();
|
'wishlistSharedLink' => $this->currentCustomer->getWishlistSharedLink()
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect()->back();
|
return response()->json([], 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -674,12 +674,12 @@ abstract class AbstractType
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'regular_price' => [
|
'regular_price' => [
|
||||||
'price' => core()->convertPrice($this->evaluatePrice($this->product->price)),
|
'price' => core()->convertPrice($this->evaluatePrice($regularPrice = $this->product->price)),
|
||||||
'formated_price' => core()->currency($this->evaluatePrice($this->product->price)),
|
'formated_price' => core()->currency($this->evaluatePrice($regularPrice)),
|
||||||
],
|
],
|
||||||
'final_price' => [
|
'final_price' => [
|
||||||
'price' => core()->convertPrice($this->evaluatePrice($this->getMinimalPrice())),
|
'price' => core()->convertPrice($this->evaluatePrice($minimalPrice = $this->getMinimalPrice())),
|
||||||
'formated_price' => core()->currency($this->evaluatePrice($this->getMinimalPrice())),
|
'formated_price' => core()->currency($this->evaluatePrice($minimalPrice)),
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -340,23 +340,23 @@ class Bundle extends AbstractType
|
||||||
return [
|
return [
|
||||||
'from' => [
|
'from' => [
|
||||||
'regular_price' => [
|
'regular_price' => [
|
||||||
'price' => core()->convertPrice($this->evaluatePrice($this->getRegularMinimalPrice())),
|
'price' => core()->convertPrice($this->evaluatePrice($regularMinimalPrice = $this->getRegularMinimalPrice())),
|
||||||
'formated_price' => core()->currency($this->evaluatePrice($this->getRegularMinimalPrice())),
|
'formated_price' => core()->currency($this->evaluatePrice($regularMinimalPrice)),
|
||||||
],
|
],
|
||||||
'final_price' => [
|
'final_price' => [
|
||||||
'price' => core()->convertPrice($this->evaluatePrice($this->getMinimalPrice())),
|
'price' => core()->convertPrice($this->evaluatePrice($minimalPrice = $this->getMinimalPrice())),
|
||||||
'formated_price' => core()->currency($this->evaluatePrice($this->getMinimalPrice())),
|
'formated_price' => core()->currency($this->evaluatePrice($minimalPrice)),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
'to' => [
|
'to' => [
|
||||||
'regular_price' => [
|
'regular_price' => [
|
||||||
'price' => core()->convertPrice($this->evaluatePrice($this->getRegularMaximamPrice())),
|
'price' => core()->convertPrice($this->evaluatePrice($regularMaximumPrice = $this->getRegularMaximamPrice())),
|
||||||
'formated_price' => core()->currency($this->evaluatePrice($this->getRegularMaximamPrice())),
|
'formated_price' => core()->currency($this->evaluatePrice($regularMaximumPrice)),
|
||||||
],
|
],
|
||||||
'final_price' => [
|
'final_price' => [
|
||||||
'price' => core()->convertPrice($this->evaluatePrice($this->getMaximamPrice())),
|
'price' => core()->convertPrice($this->evaluatePrice($maximumPrice = $this->getMaximamPrice())),
|
||||||
'formated_price' => core()->currency($this->evaluatePrice($this->getMaximamPrice())),
|
'formated_price' => core()->currency($this->evaluatePrice($maximumPrice)),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -555,14 +555,16 @@ class Configurable extends AbstractType
|
||||||
*/
|
*/
|
||||||
public function getProductPrices()
|
public function getProductPrices()
|
||||||
{
|
{
|
||||||
|
$haveOffer = $this->haveOffer();
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'regular_price' => [
|
'regular_price' => [
|
||||||
'formated_price' => $this->haveOffer()
|
'formated_price' => $haveOffer
|
||||||
? core()->currency($this->evaluatePrice($this->getOfferPrice()))
|
? core()->currency($this->evaluatePrice($offerPrice = $this->getOfferPrice()))
|
||||||
: core()->currency($this->evaluatePrice($this->getMinimalPrice())),
|
: core()->currency($this->evaluatePrice($minimalPrice = $this->getMinimalPrice())),
|
||||||
'price' => $this->haveOffer()
|
'price' => $haveOffer
|
||||||
? $this->evaluatePrice($this->getOfferPrice())
|
? $this->evaluatePrice($offerPrice)
|
||||||
: $this->evaluatePrice($this->getMinimalPrice()),
|
: $this->evaluatePrice($minimalPrice),
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,9 +74,13 @@ class OrderRepository extends Repository
|
||||||
$order->payment()->create($data['payment']);
|
$order->payment()->create($data['payment']);
|
||||||
|
|
||||||
if (isset($data['shipping_address'])) {
|
if (isset($data['shipping_address'])) {
|
||||||
|
unset($data['shipping_address']['customer_id']);
|
||||||
|
|
||||||
$order->addresses()->create($data['shipping_address']);
|
$order->addresses()->create($data['shipping_address']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unset($data['billing_address']['customer_id']);
|
||||||
|
|
||||||
$order->addresses()->create($data['billing_address']);
|
$order->addresses()->create($data['billing_address']);
|
||||||
|
|
||||||
foreach ($data['items'] as $item) {
|
foreach ($data['items'] as $item) {
|
||||||
|
|
|
||||||
|
|
@ -104,8 +104,8 @@ return [
|
||||||
'confirm-remove-all' => 'Are you sure you want to delete all compare items?',
|
'confirm-remove-all' => 'Are you sure you want to delete all compare items?',
|
||||||
'already_added' => 'تمت إضافة العنصر بالفعل لمقارنة القائمة',
|
'already_added' => 'تمت إضافة العنصر بالفعل لمقارنة القائمة',
|
||||||
'empty-text' => 'ليس لديك أي عناصر في قائمة المقارنة الخاصة بك',
|
'empty-text' => 'ليس لديك أي عناصر في قائمة المقارنة الخاصة بك',
|
||||||
'product_image' => 'Product Image',
|
'product_image' => 'صورة المنتج',
|
||||||
'actions' => 'Actions',
|
'actions' => 'أجراءات',
|
||||||
],
|
],
|
||||||
|
|
||||||
'signup-text' => [
|
'signup-text' => [
|
||||||
|
|
@ -368,19 +368,20 @@ return [
|
||||||
'remove-fail' => 'لا يمكن حذف العنصر من قائمة الأماني ، الرجاء المحاولة لاحقا',
|
'remove-fail' => 'لا يمكن حذف العنصر من قائمة الأماني ، الرجاء المحاولة لاحقا',
|
||||||
'empty' => 'ليس لديك أي عناصر في قائمة الأمنيات',
|
'empty' => 'ليس لديك أي عناصر في قائمة الأمنيات',
|
||||||
'remove-all-success' => 'كل الأشياء من قائمة أمانيك قد أزيلت',
|
'remove-all-success' => 'كل الأشياء من قائمة أمانيك قد أزيلت',
|
||||||
'save' => 'Save',
|
'save' => 'يحفظ',
|
||||||
'share' => 'Share',
|
'share' => 'شارك',
|
||||||
'share-wishlist' => 'Share Wishlist',
|
'share-wishlist' => 'مشاركة قائمة الرغبات',
|
||||||
'wishlist-sharing' => 'Wishlist Sharing',
|
'wishlist-sharing' => 'تقاسم قائمة الرغبات',
|
||||||
'shared-link' => 'Shared Link',
|
'shared-link' => 'رابط مشترك',
|
||||||
'visibility' => 'Visibility',
|
'copy' => 'ينسخ',
|
||||||
'public' => 'Public',
|
'visibility' => 'الرؤية',
|
||||||
'private' => 'Private',
|
'public' => 'عام',
|
||||||
'enable' => 'Enable',
|
'private' => 'نشر',
|
||||||
'disable' => 'Disable',
|
'enable' => 'ممكن',
|
||||||
'customer-name' => ':name\'s Shared Wishlist',
|
'disable' => 'إبطال',
|
||||||
'enable-wishlist-info' => 'Enable wishlist sharing to get the link.',
|
'customer-name' => ':name\'س قائمة الرغبات المشتركة',
|
||||||
'update-message' => 'Shared wishlist settings updated successfully',
|
'enable-wishlist-info' => 'قم بتمكين مشاركة قائمة الرغبات للحصول على الرابط.',
|
||||||
|
'update-message' => 'تم تحديث إعدادات قائمة الرغبات المشتركة بنجاح',
|
||||||
],
|
],
|
||||||
|
|
||||||
'downloadable_products' => [
|
'downloadable_products' => [
|
||||||
|
|
@ -395,7 +396,7 @@ return [
|
||||||
'remaining-downloads' => 'التنزيلات المتبقية',
|
'remaining-downloads' => 'التنزيلات المتبقية',
|
||||||
'unlimited' => 'غير محدود',
|
'unlimited' => 'غير محدود',
|
||||||
'download-error' => 'انتهت صلاحية رابط التنزيل.',
|
'download-error' => 'انتهت صلاحية رابط التنزيل.',
|
||||||
'payment-error' => 'Payment has not been done for this download.',
|
'payment-error' => 'لم يتم السداد لهذا التحميل.',
|
||||||
],
|
],
|
||||||
|
|
||||||
'review' => [
|
'review' => [
|
||||||
|
|
@ -472,9 +473,9 @@ return [
|
||||||
'available-for-order' => 'متوفر لطلب الشراء',
|
'available-for-order' => 'متوفر لطلب الشراء',
|
||||||
'settings' => 'Settings',
|
'settings' => 'Settings',
|
||||||
'compare_options' => 'قارن الخيارات',
|
'compare_options' => 'قارن الخيارات',
|
||||||
'wishlist-options' => 'Wishlist Options',
|
'wishlist-options' => 'خيارات قائمة الرغبات',
|
||||||
'offers' => 'Buy :qty for :price each and save :discount%',
|
'offers' => 'Buy :qty ل :price كل وحفظ :discount%',
|
||||||
'tax-inclusive' => 'Inclusive of all taxes',
|
'tax-inclusive' => 'شاملة لجميع الضرائب',
|
||||||
],
|
],
|
||||||
|
|
||||||
// 'reviews' => [
|
// 'reviews' => [
|
||||||
|
|
@ -532,11 +533,11 @@ return [
|
||||||
'expired' => 'This event has been expired.',
|
'expired' => 'This event has been expired.',
|
||||||
],
|
],
|
||||||
'minimum-order-message' => 'الحد الأدنى لمبلغ الطلب هو :amount',
|
'minimum-order-message' => 'الحد الأدنى لمبلغ الطلب هو :amount',
|
||||||
'suspended-account-message' => 'Your account has been suspended.',
|
'suspended-account-message' => 'تم تعليق حسابك.',
|
||||||
'check-shipping-address' => 'Please check shipping address.',
|
'check-shipping-address' => 'يرجى التحقق من عنوان الشحن.',
|
||||||
'check-billing-address' => 'Please check billing address.',
|
'check-billing-address' => 'يرجى التحقق من عنوان الفواتير.',
|
||||||
'specify-shipping-method' => 'Please specify shipping method.',
|
'specify-shipping-method' => 'الرجاء تحديد طريقة الشحن.',
|
||||||
'specify-payment-method' => 'Please specify payment method.',
|
'specify-payment-method' => 'الرجاء تحديد طريقة الدفع.',
|
||||||
],
|
],
|
||||||
|
|
||||||
'onepage' => [
|
'onepage' => [
|
||||||
|
|
@ -679,10 +680,10 @@ return [
|
||||||
'subject' => '#:order_id فاتورة لطلبك',
|
'subject' => '#:order_id فاتورة لطلبك',
|
||||||
'summary' => 'موجز الفاتورة',
|
'summary' => 'موجز الفاتورة',
|
||||||
'reminder' => [
|
'reminder' => [
|
||||||
'subject' => 'Invoice reminder',
|
'subject' => 'تذكير الفاتورة',
|
||||||
'your-invoice-is-overdue' => 'Your invoice :invoice is overdue by :time.',
|
'your-invoice-is-overdue' => 'فاتورتك :invoice فات موعده :time.',
|
||||||
'please-make-your-payment-as-soon-as-possible' => 'Please make your payment as soon as possible.',
|
'please-make-your-payment-as-soon-as-possible' => 'يرجى إجراء الدفع في أسرع وقت ممكن.',
|
||||||
'if-you-ve-already-paid-just-disregard-this-email' => 'If you\'ve already paid, just disregard this email.',
|
'if-you-ve-already-paid-just-disregard-this-email' => 'إذا كنت قد دفعت بالفعل ، فقط تجاهل هذا البريد الإلكتروني.',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -376,6 +376,7 @@ return [
|
||||||
'share-wishlist' => 'ইচ্ছা তালিকা ভাগ করুন',
|
'share-wishlist' => 'ইচ্ছা তালিকা ভাগ করুন',
|
||||||
'wishlist-sharing' => 'ইচ্ছা তালিকা শেয়ারিং',
|
'wishlist-sharing' => 'ইচ্ছা তালিকা শেয়ারিং',
|
||||||
'shared-link' => 'শেয়ারড লিংক',
|
'shared-link' => 'শেয়ারড লিংক',
|
||||||
|
'copy' => 'Copy',
|
||||||
'visibility' => 'দৃশ্যমানতা',
|
'visibility' => 'দৃশ্যমানতা',
|
||||||
'public' => 'পাবলিক',
|
'public' => 'পাবলিক',
|
||||||
'private' => 'ব্যক্তিগত',
|
'private' => 'ব্যক্তিগত',
|
||||||
|
|
|
||||||
|
|
@ -371,6 +371,7 @@ return [
|
||||||
'share-wishlist' => 'Share Wishlist',
|
'share-wishlist' => 'Share Wishlist',
|
||||||
'wishlist-sharing' => 'Wishlist Sharing',
|
'wishlist-sharing' => 'Wishlist Sharing',
|
||||||
'shared-link' => 'Shared Link',
|
'shared-link' => 'Shared Link',
|
||||||
|
'copy' => 'Copy',
|
||||||
'visibility' => 'Visibility',
|
'visibility' => 'Visibility',
|
||||||
'public' => 'Public',
|
'public' => 'Public',
|
||||||
'private' => 'Private',
|
'private' => 'Private',
|
||||||
|
|
|
||||||
|
|
@ -376,6 +376,7 @@ return [
|
||||||
'share-wishlist' => 'Share Wishlist',
|
'share-wishlist' => 'Share Wishlist',
|
||||||
'wishlist-sharing' => 'Wishlist Sharing',
|
'wishlist-sharing' => 'Wishlist Sharing',
|
||||||
'shared-link' => 'Shared Link',
|
'shared-link' => 'Shared Link',
|
||||||
|
'copy' => 'Copy',
|
||||||
'visibility' => 'Visibility',
|
'visibility' => 'Visibility',
|
||||||
'public' => 'Public',
|
'public' => 'Public',
|
||||||
'private' => 'Private',
|
'private' => 'Private',
|
||||||
|
|
|
||||||
|
|
@ -374,6 +374,7 @@ return [
|
||||||
'share-wishlist' => 'Share Wishlist',
|
'share-wishlist' => 'Share Wishlist',
|
||||||
'wishlist-sharing' => 'Wishlist Sharing',
|
'wishlist-sharing' => 'Wishlist Sharing',
|
||||||
'shared-link' => 'Shared Link',
|
'shared-link' => 'Shared Link',
|
||||||
|
'copy' => 'Copy',
|
||||||
'visibility' => 'Visibility',
|
'visibility' => 'Visibility',
|
||||||
'public' => 'Public',
|
'public' => 'Public',
|
||||||
'private' => 'Private',
|
'private' => 'Private',
|
||||||
|
|
|
||||||
|
|
@ -370,6 +370,7 @@ return [
|
||||||
'share-wishlist' => 'Share Wishlist',
|
'share-wishlist' => 'Share Wishlist',
|
||||||
'wishlist-sharing' => 'Wishlist Sharing',
|
'wishlist-sharing' => 'Wishlist Sharing',
|
||||||
'shared-link' => 'Shared Link',
|
'shared-link' => 'Shared Link',
|
||||||
|
'copy' => 'Copy',
|
||||||
'visibility' => 'Visibility',
|
'visibility' => 'Visibility',
|
||||||
'public' => 'Public',
|
'public' => 'Public',
|
||||||
'private' => 'Private',
|
'private' => 'Private',
|
||||||
|
|
|
||||||
|
|
@ -372,6 +372,7 @@ return [
|
||||||
'share-wishlist' => 'Share Wishlist',
|
'share-wishlist' => 'Share Wishlist',
|
||||||
'wishlist-sharing' => 'Wishlist Sharing',
|
'wishlist-sharing' => 'Wishlist Sharing',
|
||||||
'shared-link' => 'Shared Link',
|
'shared-link' => 'Shared Link',
|
||||||
|
'copy' => 'Copy',
|
||||||
'visibility' => 'Visibility',
|
'visibility' => 'Visibility',
|
||||||
'public' => 'Public',
|
'public' => 'Public',
|
||||||
'private' => 'Private',
|
'private' => 'Private',
|
||||||
|
|
|
||||||
|
|
@ -375,6 +375,7 @@ return [
|
||||||
'share-wishlist' => 'שתף משאלות',
|
'share-wishlist' => 'שתף משאלות',
|
||||||
'wishlist-sharing' => 'שיתוף רשימת המשאלות',
|
'wishlist-sharing' => 'שיתוף רשימת המשאלות',
|
||||||
'shared-link' => 'קישור משותף',
|
'shared-link' => 'קישור משותף',
|
||||||
|
'copy' => 'Copy',
|
||||||
'visibility' => 'רְאוּת',
|
'visibility' => 'רְאוּת',
|
||||||
'public' => 'פּוּמְבֵּי',
|
'public' => 'פּוּמְבֵּי',
|
||||||
'private' => 'פְּרָטִי',
|
'private' => 'פְּרָטִי',
|
||||||
|
|
|
||||||
|
|
@ -375,6 +375,7 @@ return [
|
||||||
'share-wishlist' => 'शेयर विशलिस्ट',
|
'share-wishlist' => 'शेयर विशलिस्ट',
|
||||||
'wishlist-sharing' => 'विशलिस्ट शेयरिंग',
|
'wishlist-sharing' => 'विशलिस्ट शेयरिंग',
|
||||||
'shared-link' => 'साझा लिंक',
|
'shared-link' => 'साझा लिंक',
|
||||||
|
'copy' => 'Copy',
|
||||||
'visibility' => 'दृश्यता',
|
'visibility' => 'दृश्यता',
|
||||||
'public' => 'जनता',
|
'public' => 'जनता',
|
||||||
'private' => 'निजी',
|
'private' => 'निजी',
|
||||||
|
|
|
||||||
|
|
@ -372,6 +372,7 @@ return [
|
||||||
'share-wishlist' => 'Share Wishlist',
|
'share-wishlist' => 'Share Wishlist',
|
||||||
'wishlist-sharing' => 'Wishlist Sharing',
|
'wishlist-sharing' => 'Wishlist Sharing',
|
||||||
'shared-link' => 'Shared Link',
|
'shared-link' => 'Shared Link',
|
||||||
|
'copy' => 'Copy',
|
||||||
'visibility' => 'Visibility',
|
'visibility' => 'Visibility',
|
||||||
'public' => 'Public',
|
'public' => 'Public',
|
||||||
'private' => 'Private',
|
'private' => 'Private',
|
||||||
|
|
|
||||||
|
|
@ -352,6 +352,7 @@ return [
|
||||||
'share-wishlist' => 'Share Wishlist',
|
'share-wishlist' => 'Share Wishlist',
|
||||||
'wishlist-sharing' => 'Wishlist Sharing',
|
'wishlist-sharing' => 'Wishlist Sharing',
|
||||||
'shared-link' => 'Shared Link',
|
'shared-link' => 'Shared Link',
|
||||||
|
'copy' => 'Copy',
|
||||||
'visibility' => 'Visibility',
|
'visibility' => 'Visibility',
|
||||||
'public' => 'Public',
|
'public' => 'Public',
|
||||||
'private' => 'Private',
|
'private' => 'Private',
|
||||||
|
|
|
||||||
|
|
@ -378,6 +378,7 @@ return [
|
||||||
'share-wishlist' => 'Share Wishlist',
|
'share-wishlist' => 'Share Wishlist',
|
||||||
'wishlist-sharing' => 'Wishlist Sharing',
|
'wishlist-sharing' => 'Wishlist Sharing',
|
||||||
'shared-link' => 'Shared Link',
|
'shared-link' => 'Shared Link',
|
||||||
|
'copy' => 'Copy',
|
||||||
'visibility' => 'Visibility',
|
'visibility' => 'Visibility',
|
||||||
'public' => 'Public',
|
'public' => 'Public',
|
||||||
'private' => 'Private',
|
'private' => 'Private',
|
||||||
|
|
|
||||||
|
|
@ -372,6 +372,7 @@ return [
|
||||||
'share-wishlist' => 'Share Wishlist',
|
'share-wishlist' => 'Share Wishlist',
|
||||||
'wishlist-sharing' => 'Wishlist Sharing',
|
'wishlist-sharing' => 'Wishlist Sharing',
|
||||||
'shared-link' => 'Shared Link',
|
'shared-link' => 'Shared Link',
|
||||||
|
'copy' => 'Copy',
|
||||||
'visibility' => 'Visibility',
|
'visibility' => 'Visibility',
|
||||||
'public' => 'Public',
|
'public' => 'Public',
|
||||||
'private' => 'Private',
|
'private' => 'Private',
|
||||||
|
|
|
||||||
|
|
@ -366,6 +366,7 @@ return [
|
||||||
'share-wishlist' => 'Share Wishlist',
|
'share-wishlist' => 'Share Wishlist',
|
||||||
'wishlist-sharing' => 'Wishlist Sharing',
|
'wishlist-sharing' => 'Wishlist Sharing',
|
||||||
'shared-link' => 'Shared Link',
|
'shared-link' => 'Shared Link',
|
||||||
|
'copy' => 'Copy',
|
||||||
'visibility' => 'Visibility',
|
'visibility' => 'Visibility',
|
||||||
'public' => 'Public',
|
'public' => 'Public',
|
||||||
'private' => 'Private',
|
'private' => 'Private',
|
||||||
|
|
|
||||||
|
|
@ -374,6 +374,7 @@ return [
|
||||||
'share-wishlist' => '«Поделиться списком желаний»',
|
'share-wishlist' => '«Поделиться списком желаний»',
|
||||||
'wishlist-sharing' => '«Обмен списком желаний»',
|
'wishlist-sharing' => '«Обмен списком желаний»',
|
||||||
'shared-link' => '«Общая ссылка»',
|
'shared-link' => '«Общая ссылка»',
|
||||||
|
'copy' => 'Copy',
|
||||||
'visibility' => '«Видимость»',
|
'visibility' => '«Видимость»',
|
||||||
'public' => '«Общественный»',
|
'public' => '«Общественный»',
|
||||||
'private' => 'Частный',
|
'private' => 'Частный',
|
||||||
|
|
|
||||||
|
|
@ -376,6 +376,7 @@ return [
|
||||||
'share-wishlist' => 'පැතුම් ලැයිස්තුව බෙදාගන්න',
|
'share-wishlist' => 'පැතුම් ලැයිස්තුව බෙදාගන්න',
|
||||||
'wishlist-sharing' => 'පැතුම් ලැයිස්තු බෙදාගැනීම',
|
'wishlist-sharing' => 'පැතුම් ලැයිස්තු බෙදාගැනීම',
|
||||||
'shared-link' => 'බෙදාගත් සබැඳිය',
|
'shared-link' => 'බෙදාගත් සබැඳිය',
|
||||||
|
'copy' => 'Copy',
|
||||||
'visibility' => 'දෘෂ්යතාව',
|
'visibility' => 'දෘෂ්යතාව',
|
||||||
'public' => 'මහජන',
|
'public' => 'මහජන',
|
||||||
'private' => 'පුද්ගලික',
|
'private' => 'පුද්ගලික',
|
||||||
|
|
|
||||||
|
|
@ -371,6 +371,7 @@ return [
|
||||||
'share-wishlist' => 'Share Wishlist',
|
'share-wishlist' => 'Share Wishlist',
|
||||||
'wishlist-sharing' => 'Wishlist Sharing',
|
'wishlist-sharing' => 'Wishlist Sharing',
|
||||||
'shared-link' => 'Shared Link',
|
'shared-link' => 'Shared Link',
|
||||||
|
'copy' => 'Copy',
|
||||||
'visibility' => 'Visibility',
|
'visibility' => 'Visibility',
|
||||||
'public' => 'Public',
|
'public' => 'Public',
|
||||||
'private' => 'Private',
|
'private' => 'Private',
|
||||||
|
|
|
||||||
|
|
@ -375,6 +375,7 @@ return [
|
||||||
'share-wishlist' => '分享愿望清单',
|
'share-wishlist' => '分享愿望清单',
|
||||||
'wishlist-sharing' => '愿望清单分享',
|
'wishlist-sharing' => '愿望清单分享',
|
||||||
'shared-link' => '已共享链接',
|
'shared-link' => '已共享链接',
|
||||||
|
'copy' => 'Copy',
|
||||||
'visibility' => '可见度',
|
'visibility' => '可见度',
|
||||||
'public' => '公开的',
|
'public' => '公开的',
|
||||||
'private' => '私有的',
|
'private' => '私有的',
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@
|
||||||
|
|
||||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.quantity.before', ['item' => $item]) !!}
|
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.quantity.before', ['item' => $item]) !!}
|
||||||
|
|
||||||
<div class="item-qty">Quantity - {{ $item->quantity }}</div>
|
<div class="item-qty">Quantity : {{ $item->quantity }}</div>
|
||||||
|
|
||||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.quantity.after', ['item' => $item]) !!}
|
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.quantity.after', ['item' => $item]) !!}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,17 @@
|
||||||
<div class="order-success-content" style="min-height: 300px;">
|
<div class="order-success-content" style="min-height: 300px;">
|
||||||
<h1>{{ __('shop::app.checkout.success.thanks') }}</h1>
|
<h1>{{ __('shop::app.checkout.success.thanks') }}</h1>
|
||||||
|
|
||||||
<p>{{ __('shop::app.checkout.success.order-id-info', ['order_id' => $order->increment_id]) }}</p>
|
<p>
|
||||||
|
@if (auth()->guard('customer')->user())
|
||||||
|
{!!
|
||||||
|
__('shop::app.checkout.success.order-id-info', [
|
||||||
|
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '">' . $order->increment_id . '</a>'
|
||||||
|
])
|
||||||
|
!!}
|
||||||
|
@else
|
||||||
|
{{ __('shop::app.checkout.success.order-id-info', ['order_id' => $order->increment_id]) }}
|
||||||
|
@endif
|
||||||
|
</p>
|
||||||
|
|
||||||
<p>{{ __('shop::app.checkout.success.info') }}</p>
|
<p>{{ __('shop::app.checkout.success.info') }}</p>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,51 +66,8 @@
|
||||||
{{ __('shop::app.customer.account.wishlist.share-wishlist') }}
|
{{ __('shop::app.customer.account.wishlist.share-wishlist') }}
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<i class="rango-close"></i>
|
|
||||||
|
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<form method="POST" action="{{ route('customer.wishlist.share') }}">
|
<share-component></share-component>
|
||||||
@csrf
|
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<label for="shared" class="required">{{ __('shop::app.customer.account.wishlist.wishlist-sharing') }}</label>
|
|
||||||
|
|
||||||
<select name="shared" class="control">
|
|
||||||
<option value="0" {{ $isWishlistShared ? '' : 'selected="selected"' }}>{{ __('shop::app.customer.account.wishlist.disable') }}</option>
|
|
||||||
<option value="1" {{ $isWishlistShared ? 'selected="selected"' : '' }}>{{ __('shop::app.customer.account.wishlist.enable') }}</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="required">{{ __('shop::app.customer.account.wishlist.visibility') }}</label>
|
|
||||||
|
|
||||||
<div class="mt-5">
|
|
||||||
@if ($isWishlistShared)
|
|
||||||
<span class="badge badge-sm badge-success">{{ __('shop::app.customer.account.wishlist.public') }}</span>
|
|
||||||
@else
|
|
||||||
<span class="badge badge-sm badge-danger">{{ __('shop::app.customer.account.wishlist.private') }}</span>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="required">{{ __('shop::app.customer.account.wishlist.shared-link') }}</label>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
@if ($isWishlistShared)
|
|
||||||
<a href="{{ $wishlistSharedLink ?? 'javascript:void(0);' }}" target="_blank">{{ $wishlistSharedLink }}</a>
|
|
||||||
@else
|
|
||||||
<p>{{ __('shop::app.customer.account.wishlist.enable-wishlist-info') }}</p>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="page-action">
|
|
||||||
<button type="submit" class="btn btn-lg btn-primary mt-10 pull-right">
|
|
||||||
{{ __('shop::app.customer.account.wishlist.save') }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</modal>
|
</modal>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -122,6 +79,65 @@
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
@if ($isSharingEnabled)
|
@if ($isSharingEnabled)
|
||||||
|
<script type="text/x-template" id="share-component-template">
|
||||||
|
<form method="POST">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="shared" class="required">{{ __('shop::app.customer.account.wishlist.wishlist-sharing') }}</label>
|
||||||
|
|
||||||
|
<select name="shared" class="control" @change="shareWishlist($event.target.value)">
|
||||||
|
<option value="0" :selected="! isWishlistShared">{{ __('shop::app.customer.account.wishlist.disable') }}</option>
|
||||||
|
<option value="1" :selected="isWishlistShared">{{ __('shop::app.customer.account.wishlist.enable') }}</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="required">{{ __('shop::app.customer.account.wishlist.visibility') }}</label>
|
||||||
|
|
||||||
|
<div style="margin-top: 10px; margin-bottom: 5px;">
|
||||||
|
<span class="badge badge-sm badge-success" v-if="isWishlistShared">
|
||||||
|
{{ __('shop::app.customer.account.wishlist.public') }}
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span class="badge badge-sm badge-danger" v-else>
|
||||||
|
{{ __('shop::app.customer.account.wishlist.private') }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="required">{{ __('shop::app.customer.account.wishlist.shared-link') }}</label>
|
||||||
|
|
||||||
|
<div style="margin-top: 10px; margin-bottom: 5px;">
|
||||||
|
<div class="input-group" v-if="isWishlistShared">
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
class="control"
|
||||||
|
v-model="wishlistSharedLink"
|
||||||
|
v-on:focus="$event.target.select()"
|
||||||
|
ref="sharedLink"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div class="input-group-append">
|
||||||
|
<button
|
||||||
|
class="btn btn-primary btn-md"
|
||||||
|
type="button"
|
||||||
|
@click="copyToClipboard"
|
||||||
|
>
|
||||||
|
{{ __('shop::app.customer.account.wishlist.copy') }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="alert alert-danger" v-else>
|
||||||
|
{{ __('shop::app.customer.account.wishlist.enable-wishlist-info') }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
/**
|
/**
|
||||||
* Show share wishlist modal.
|
* Show share wishlist modal.
|
||||||
|
|
@ -131,6 +147,50 @@
|
||||||
|
|
||||||
window.app.showModal('shareWishlist');
|
window.app.showModal('shareWishlist');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vue.component('share-component', {
|
||||||
|
template: '#share-component-template',
|
||||||
|
|
||||||
|
inject: ['$validator'],
|
||||||
|
|
||||||
|
data: function () {
|
||||||
|
return {
|
||||||
|
isWishlistShared: parseInt("{{ $isWishlistShared }}"),
|
||||||
|
|
||||||
|
wishlistSharedLink: "{{ $wishlistSharedLink }}",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
shareWishlist: function(val) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
this.$root.showLoader();
|
||||||
|
|
||||||
|
this.$http.post("{{ route('customer.wishlist.share') }}", {
|
||||||
|
shared: val
|
||||||
|
})
|
||||||
|
.then(function(response) {
|
||||||
|
self.$root.hideLoader();
|
||||||
|
|
||||||
|
self.isWishlistShared = response.data.isWishlistShared;
|
||||||
|
|
||||||
|
self.wishlistSharedLink = response.data.wishlistSharedLink;
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
self.$root.hideLoader();
|
||||||
|
|
||||||
|
window.location.reload();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
copyToClipboard: function() {
|
||||||
|
this.$refs.sharedLink.focus();
|
||||||
|
|
||||||
|
document.execCommand('copy');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"/js/ui.js": "/js/ui.js?id=4dc59bc61e8f3eff9489",
|
"/js/ui.js": "/js/ui.js?id=a2b05e91c1d8facc7948",
|
||||||
"/css/ui.css": "/css/ui.css?id=c8a7ade09358a1d61a4a"
|
"/css/ui.css": "/css/ui.css?id=243871695aaf4bd7cf12"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
inject: ['$validator'],
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
title: String,
|
title: String,
|
||||||
id: String,
|
id: String,
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@
|
||||||
export default {
|
export default {
|
||||||
props: ['id', 'isOpen'],
|
props: ['id', 'isOpen'],
|
||||||
|
|
||||||
|
inject: ['$validator'],
|
||||||
|
|
||||||
created () {
|
created () {
|
||||||
this.closeModal();
|
this.closeModal();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,9 @@
|
||||||
var body = document.querySelector("body");
|
var body = document.querySelector("body");
|
||||||
|
|
||||||
if (this.isOpen) {
|
if (this.isOpen) {
|
||||||
body.classList.add("modal-open");
|
body.classList.add("loader-open");
|
||||||
} else {
|
} else {
|
||||||
body.classList.remove("modal-open");
|
body.classList.remove("loader-open");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -377,7 +377,7 @@ h5 {
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
color: $brand-color;
|
color: $brand-color !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkbox {
|
.checkbox {
|
||||||
|
|
@ -865,6 +865,68 @@ h5 {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.input-group {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group {
|
||||||
|
position: relative;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-ms-flex-wrap: wrap;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
-webkit-box-align: stretch;
|
||||||
|
-ms-flex-align: stretch;
|
||||||
|
align-items: stretch;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.input-group-append,
|
||||||
|
.input-group-prepend {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
> .control {
|
||||||
|
margin: 0;
|
||||||
|
position: relative;
|
||||||
|
-webkit-box-flex: 1;
|
||||||
|
-ms-flex: 1 1 auto;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
width: 1% !important;
|
||||||
|
|
||||||
|
&:not(:first-child) {
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(:last-child) {
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group-prepend {
|
||||||
|
margin-right: -1px;
|
||||||
|
|
||||||
|
.control,
|
||||||
|
.btn {
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group-append {
|
||||||
|
margin-left: -1px;
|
||||||
|
|
||||||
|
.control,
|
||||||
|
.btn {
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.table {
|
.table {
|
||||||
|
|
@ -1203,6 +1265,10 @@ modal {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.loader-open {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.modal-overlay {
|
.modal-overlay {
|
||||||
display: none;
|
display: none;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
@ -1220,6 +1286,10 @@ modal {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.loader-open .loader-overlay {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
.modal-container {
|
.modal-container {
|
||||||
background: $white-color;
|
background: $white-color;
|
||||||
top: 100px;
|
top: 100px;
|
||||||
|
|
@ -1372,6 +1442,10 @@ modal {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
float: left;
|
float: left;
|
||||||
|
|
||||||
|
&.draggable {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
img.preview {
|
img.preview {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
@ -1425,7 +1499,7 @@ modal {
|
||||||
|
|
||||||
.overlay-loader {
|
.overlay-loader {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 11;
|
z-index: 10000;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
margin-top: -24px;
|
margin-top: -24px;
|
||||||
|
|
|
||||||
|
|
@ -810,7 +810,7 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (obj.column !== undefined && obj.column !== 'admin_locale' && obj.val !== undefined) {
|
if (obj.column !== undefined && obj.val !== undefined) {
|
||||||
this.filters.push(obj);
|
this.filters.push(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -4,7 +4,7 @@
|
||||||
"/js/velocity.js": "/js/velocity.js?id=f655ac65cbd1aa549cba57f77b9a4344",
|
"/js/velocity.js": "/js/velocity.js?id=f655ac65cbd1aa549cba57f77b9a4344",
|
||||||
"/js/manifest.js": "/js/manifest.js?id=e069a8f952a02ea0f290bcca8fab930e",
|
"/js/manifest.js": "/js/manifest.js?id=e069a8f952a02ea0f290bcca8fab930e",
|
||||||
"/js/components.js": "/js/components.js?id=13ebf112e40292178d2386143e9d75cd",
|
"/js/components.js": "/js/components.js?id=13ebf112e40292178d2386143e9d75cd",
|
||||||
"/css/velocity.css": "/css/velocity.css?id=63b696d9af02aa4e86927bc29a63da5f",
|
"/css/velocity.css": "/css/velocity.css?id=f88138dcc11381f1d2bea6f3a5aa8fe8",
|
||||||
"/css/velocity-admin.css": "/css/velocity-admin.css?id=b67a82956e53163b5e3ff45a44f9778f",
|
"/css/velocity-admin.css": "/css/velocity-admin.css?id=b67a82956e53163b5e3ff45a44f9778f",
|
||||||
"/images/icon-calendar.svg": "/images/icon-calendar.svg?id=870d0f733a58377422766f3152e15486",
|
"/images/icon-calendar.svg": "/images/icon-calendar.svg?id=870d0f733a58377422766f3152e15486",
|
||||||
"/images/icon-camera.svg": "/images/icon-camera.svg?id=b2fd2f9e17e1ccee96e29f6c6cec91e8",
|
"/images/icon-camera.svg": "/images/icon-camera.svg?id=b2fd2f9e17e1ccee96e29f6c6cec91e8",
|
||||||
|
|
|
||||||
|
|
@ -197,6 +197,12 @@ body {
|
||||||
right: 20px;
|
right: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.currency-icon {
|
||||||
|
~ .select-icon-container {
|
||||||
|
right: 7px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-list-container {
|
.category-list-container {
|
||||||
|
|
@ -299,6 +305,10 @@ body {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.account-action {
|
||||||
|
float: left !important;
|
||||||
|
}
|
||||||
|
|
||||||
.sidebar {
|
.sidebar {
|
||||||
border-left: 1px solid $border-general;
|
border-left: 1px solid $border-general;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,15 @@
|
||||||
<h1 class="row col-12">{{ __('shop::app.checkout.success.thanks') }}</h1>
|
<h1 class="row col-12">{{ __('shop::app.checkout.success.thanks') }}</h1>
|
||||||
|
|
||||||
<p class="row col-12">
|
<p class="row col-12">
|
||||||
{{ __('shop::app.checkout.success.order-id-info', ['order_id' => $order->increment_id]) }}
|
@if (auth()->guard('customer')->user())
|
||||||
|
{!!
|
||||||
|
__('shop::app.checkout.success.order-id-info', [
|
||||||
|
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '">' . $order->increment_id . '</a>'
|
||||||
|
])
|
||||||
|
!!}
|
||||||
|
@else
|
||||||
|
{{ __('shop::app.checkout.success.order-id-info', ['order_id' => $order->increment_id]) }}
|
||||||
|
@endif
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="row col-12">
|
<p class="row col-12">
|
||||||
|
|
|
||||||
|
|
@ -70,62 +70,7 @@
|
||||||
<i class="rango-close"></i>
|
<i class="rango-close"></i>
|
||||||
|
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<form method="POST" action="{{ route('customer.wishlist.share') }}">
|
<share-component></share-component>
|
||||||
@csrf
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12">
|
|
||||||
<label class="mandatory">
|
|
||||||
{{ __('shop::app.customer.account.wishlist.wishlist-sharing') }}
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<select name="shared" class="form-control">
|
|
||||||
<option value="0" {{ $isWishlistShared ? '' : 'selected="selected"' }}>{{ __('shop::app.customer.account.wishlist.disable') }}</option>
|
|
||||||
<option value="1" {{ $isWishlistShared ? 'selected="selected"' : '' }}>{{ __('shop::app.customer.account.wishlist.enable') }}</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mt-2">
|
|
||||||
<div class="col-12">
|
|
||||||
<label class="mandatory">
|
|
||||||
{{ __('shop::app.customer.account.wishlist.visibility') }}
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
@if ($isWishlistShared)
|
|
||||||
<span class="badge badge-success">{{ __('shop::app.customer.account.wishlist.public') }}</span>
|
|
||||||
@else
|
|
||||||
<span class="badge badge-danger">{{ __('shop::app.customer.account.wishlist.private') }}</span>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mt-2">
|
|
||||||
<div class="col-12">
|
|
||||||
<label class="mandatory">
|
|
||||||
{{ __('shop::app.customer.account.wishlist.shared-link') }}
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
@if ($isWishlistShared)
|
|
||||||
<a href="{{ $wishlistSharedLink ?? 'javascript:void(0);' }}" target="_blank">{{ $wishlistSharedLink }}</a>
|
|
||||||
@else
|
|
||||||
<p class="alert alert-danger">{{ __('shop::app.customer.account.wishlist.enable-wishlist-info') }}</p>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mt-2">
|
|
||||||
<div class="col-12">
|
|
||||||
<button type="submit" class="theme-btn float-right">
|
|
||||||
{{ __('shop::app.customer.account.wishlist.save') }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</modal>
|
</modal>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -136,6 +81,70 @@
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
@if($isSharingEnabled)
|
@if($isSharingEnabled)
|
||||||
|
<script type="text/x-template" id="share-component-template">
|
||||||
|
<form method="POST">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="label-style mandatory">
|
||||||
|
{{ __('shop::app.customer.account.wishlist.wishlist-sharing') }}
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<select name="shared" class="form-control" @change="shareWishlist($event.target.value)">
|
||||||
|
<option value="0" :selected="! isWishlistShared">{{ __('shop::app.customer.account.wishlist.disable') }}</option>
|
||||||
|
<option value="1" :selected="isWishlistShared">{{ __('shop::app.customer.account.wishlist.enable') }}</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="label-style mandatory">
|
||||||
|
{{ __('shop::app.customer.account.wishlist.visibility') }}
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<span class="badge badge-success" v-if="isWishlistShared">
|
||||||
|
{{ __('shop::app.customer.account.wishlist.public') }}
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span class="badge badge-danger" v-else>
|
||||||
|
{{ __('shop::app.customer.account.wishlist.private') }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="label-style mandatory">
|
||||||
|
{{ __('shop::app.customer.account.wishlist.shared-link') }}
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="input-group" v-if="isWishlistShared">
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
class="form-control"
|
||||||
|
v-model="wishlistSharedLink"
|
||||||
|
v-on:focus="$event.target.select()"
|
||||||
|
ref="sharedLink"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div class="input-group-append">
|
||||||
|
<button
|
||||||
|
class="btn btn-outline-secondary theme-btn"
|
||||||
|
style="padding: 6px 20px"
|
||||||
|
type="button"
|
||||||
|
@click="copyToClipboard"
|
||||||
|
>
|
||||||
|
{{ __('shop::app.customer.account.wishlist.copy') }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="alert alert-danger" v-else>
|
||||||
|
{{ __('shop::app.customer.account.wishlist.enable-wishlist-info') }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
/**
|
/**
|
||||||
* Show share wishlist modal.
|
* Show share wishlist modal.
|
||||||
|
|
@ -145,6 +154,50 @@
|
||||||
|
|
||||||
window.app.showModal('shareWishlist');
|
window.app.showModal('shareWishlist');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vue.component('share-component', {
|
||||||
|
template: '#share-component-template',
|
||||||
|
|
||||||
|
inject: ['$validator'],
|
||||||
|
|
||||||
|
data: function () {
|
||||||
|
return {
|
||||||
|
isWishlistShared: parseInt("{{ $isWishlistShared }}"),
|
||||||
|
|
||||||
|
wishlistSharedLink: "{{ $wishlistSharedLink }}",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
shareWishlist: function(val) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
this.$root.showLoader();
|
||||||
|
|
||||||
|
this.$http.post("{{ route('customer.wishlist.share') }}", {
|
||||||
|
shared: val
|
||||||
|
})
|
||||||
|
.then(function(response) {
|
||||||
|
self.$root.hideLoader();
|
||||||
|
|
||||||
|
self.isWishlistShared = response.data.isWishlistShared;
|
||||||
|
|
||||||
|
self.wishlistSharedLink = response.data.wishlistSharedLink;
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
self.$root.hideLoader();
|
||||||
|
|
||||||
|
window.location.reload();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
copyToClipboard: function() {
|
||||||
|
this.$refs.sharedLink.focus();
|
||||||
|
|
||||||
|
document.execCommand('copy');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,10 @@
|
||||||
@if (core()->getCurrentChannel()->currencies->count() > 1)
|
@if (core()->getCurrentChannel()->currencies->count() > 1)
|
||||||
<div class="d-inline-block">
|
<div class="d-inline-block">
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
|
<span class="currency-icon">
|
||||||
|
{{ core()->getCurrentCurrency()->symbol }}
|
||||||
|
</span>
|
||||||
|
|
||||||
<select
|
<select
|
||||||
class="btn btn-link dropdown-toggle control locale-switcher styled-select"
|
class="btn btn-link dropdown-toggle control locale-switcher styled-select"
|
||||||
onchange="window.location.href = this.value" aria-label="Locale">
|
onchange="window.location.href = this.value" aria-label="Locale">
|
||||||
|
|
|
||||||
|
|
@ -4,47 +4,47 @@ use Illuminate\Support\Facades\Route;
|
||||||
use Webkul\Velocity\Http\Controllers\Admin\ConfigurationController;
|
use Webkul\Velocity\Http\Controllers\Admin\ConfigurationController;
|
||||||
use Webkul\Velocity\Http\Controllers\Admin\ContentController;
|
use Webkul\Velocity\Http\Controllers\Admin\ContentController;
|
||||||
|
|
||||||
Route::group(['middleware' => ['web', 'admin_locale']], function () {
|
Route::group(['middleware' => ['web']], function () {
|
||||||
Route::prefix(config('app.admin_url') . '/velocity')->group(function () {
|
Route::prefix(config('app.admin_url') . '/velocity')->group(function () {
|
||||||
Route::group(['middleware' => ['admin']], function () {
|
Route::group(['middleware' => ['admin']], function () {
|
||||||
Route::get('/content', [ContentController::class, 'index'])->defaults('_config', [
|
Route::get('/content', [ContentController::class, 'index'])->defaults('_config', [
|
||||||
'view' => 'velocity::admin.content.index'
|
'view' => 'velocity::admin.content.index',
|
||||||
])->name('velocity.admin.content.index');
|
])->name('velocity.admin.content.index');
|
||||||
|
|
||||||
Route::get('/content/search', [ContentController::class, 'search'])->name('velocity.admin.content.search');
|
Route::get('/content/search', [ContentController::class, 'search'])->name('velocity.admin.content.search');
|
||||||
|
|
||||||
Route::get('/content/create', [ContentController::class, 'create'])->defaults('_config', [
|
Route::get('/content/create', [ContentController::class, 'create'])->defaults('_config', [
|
||||||
'view' => 'velocity::admin.content.create'
|
'view' => 'velocity::admin.content.create',
|
||||||
])->name('velocity.admin.content.create');
|
])->name('velocity.admin.content.create');
|
||||||
|
|
||||||
Route::post('/content/create', [ContentController::class, 'store'])->defaults('_config', [
|
Route::post('/content/create', [ContentController::class, 'store'])->defaults('_config', [
|
||||||
'redirect' => 'velocity.admin.content.index'
|
'redirect' => 'velocity.admin.content.index',
|
||||||
])->name('velocity.admin.content.store');
|
])->name('velocity.admin.content.store');
|
||||||
|
|
||||||
Route::get('/content/edit/{id}', [ContentController::class, 'edit'])->defaults('_config', [
|
Route::get('/content/edit/{id}', [ContentController::class, 'edit'])->defaults('_config', [
|
||||||
'view' => 'velocity::admin.content.edit'
|
'view' => 'velocity::admin.content.edit',
|
||||||
])->name('velocity.admin.content.edit');
|
])->name('velocity.admin.content.edit');
|
||||||
|
|
||||||
Route::put('/content/edit/{id}', [ContentController::class, 'update'])->defaults('_config', [
|
Route::put('/content/edit/{id}', [ContentController::class, 'update'])->defaults('_config', [
|
||||||
'redirect' => 'velocity.admin.content.index'
|
'redirect' => 'velocity.admin.content.index',
|
||||||
])->name('velocity.admin.content.update');
|
])->name('velocity.admin.content.update');
|
||||||
|
|
||||||
Route::post('/content/delete/{id}', [ContentController::class, 'destroy'])->name('velocity.admin.content.delete');
|
Route::post('/content/delete/{id}', [ContentController::class, 'destroy'])->name('velocity.admin.content.delete');
|
||||||
|
|
||||||
Route::post('/content/masssdelete', [ContentController::class, 'massDestroy'])->defaults('_config', [
|
Route::post('/content/masssdelete', [ContentController::class, 'massDestroy'])->defaults('_config', [
|
||||||
'redirect' => 'velocity.admin.content.index'
|
'redirect' => 'velocity.admin.content.index',
|
||||||
])->name('velocity.admin.content.mass-delete');
|
])->name('velocity.admin.content.mass-delete');
|
||||||
|
|
||||||
Route::post('/content/masss-update', [ContentController::class, 'massUpdate'])->defaults('_config', [
|
Route::post('/content/masss-update', [ContentController::class, 'massUpdate'])->defaults('_config', [
|
||||||
'redirect' => 'velocity.admin.content.index'
|
'redirect' => 'velocity.admin.content.index',
|
||||||
])->name('velocity.admin.content.mass-update');
|
])->name('velocity.admin.content.mass-update');
|
||||||
|
|
||||||
Route::get('/meta-data', [ConfigurationController::class, 'renderMetaData'])->defaults('_config', [
|
Route::get('/meta-data', [ConfigurationController::class, 'renderMetaData'])->defaults('_config', [
|
||||||
'view' => 'velocity::admin.meta-info.meta-data'
|
'view' => 'velocity::admin.meta-info.meta-data',
|
||||||
])->name('velocity.admin.meta-data');
|
])->name('velocity.admin.meta-data');
|
||||||
|
|
||||||
Route::post('/meta-data/{id}', [ConfigurationController::class, 'storeMetaData'])->defaults('_config', [
|
Route::post('/meta-data/{id}', [ConfigurationController::class, 'storeMetaData'])->defaults('_config', [
|
||||||
'redirect' => 'velocity.admin.meta-data'
|
'redirect' => 'velocity.admin.meta-data',
|
||||||
])->name('velocity.admin.store.meta-data');
|
])->name('velocity.admin.store.meta-data');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue