Merge branch '1.1' of http://git.digital-tps.tk/TPS/birzha into 1.1
This commit is contained in:
commit
c80225882e
|
|
@ -158,6 +158,7 @@ return [
|
||||||
'phone_verification_code_invalid' => 'Invalid sms code',
|
'phone_verification_code_invalid' => 'Invalid sms code',
|
||||||
'phone_already_exists' => 'This phone number has already been taken.',
|
'phone_already_exists' => 'This phone number has already been taken.',
|
||||||
'email_already_exists' => 'This email has already been taken.',
|
'email_already_exists' => 'This email has already been taken.',
|
||||||
|
'bank_address_one' => '744013, Türkmenistan, Aşgabat ş., Türkmenistanyň Gahrymany Atamyrat Nyýazow şaýoly, 154',
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,7 @@ return [
|
||||||
'phone_verification_code_invalid' => 'Неверный СМС код',
|
'phone_verification_code_invalid' => 'Неверный СМС код',
|
||||||
'phone_already_exists' => 'Пользователь с таким номером уже существует.',
|
'phone_already_exists' => 'Пользователь с таким номером уже существует.',
|
||||||
'email_already_exists' => 'Пользователь с таким email уже существует.',
|
'email_already_exists' => 'Пользователь с таким email уже существует.',
|
||||||
|
'bank_address_one' => '744013, Türkmenistan, Aşgabat ş., Türkmenistanyň Gahrymany Atamyrat Nyýazow şaýoly, 154',
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,7 @@ return [
|
||||||
'phone_verification_code_invalid' => 'Nädogry SMS kody',
|
'phone_verification_code_invalid' => 'Nädogry SMS kody',
|
||||||
'phone_already_exists' => 'Bu belgi öňden hasaba alyndy.',
|
'phone_already_exists' => 'Bu belgi öňden hasaba alyndy.',
|
||||||
'email_already_exists' => 'Bu el. bukja öňden hasaba alyndy.',
|
'email_already_exists' => 'Bu el. bukja öňden hasaba alyndy.',
|
||||||
|
'bank_address_one' => '744013, Türkmenistan, Aşgabat ş., Türkmenistanyň Gahrymany Atamyrat Nyýazow şaýoly, 154',
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ class ProductsAPIController extends Controller
|
||||||
'currency.translations:locale,model_id,attribute_data'
|
'currency.translations:locale,model_id,attribute_data'
|
||||||
])
|
])
|
||||||
->approvedAndFreshEndDate()
|
->approvedAndFreshEndDate()
|
||||||
->orderBy('updated_at', $sortOrder);
|
->orderBy('ends_at', $sortOrder);
|
||||||
|
|
||||||
if($categoryId) { // fetch offers by the category of the product
|
if($categoryId) { // fetch offers by the category of the product
|
||||||
$category = Category::find($categoryId);
|
$category = Category::find($categoryId);
|
||||||
|
|
@ -64,7 +64,7 @@ class ProductsAPIController extends Controller
|
||||||
'currency.translations:locale,model_id,attribute_data'
|
'currency.translations:locale,model_id,attribute_data'
|
||||||
])
|
])
|
||||||
->approvedAndFreshEndDate()
|
->approvedAndFreshEndDate()
|
||||||
->orderBy('updated_at', $sortOrder);
|
->orderBy('ends_at', $sortOrder);
|
||||||
} else {
|
} else {
|
||||||
$query = null;
|
$query = null;
|
||||||
}
|
}
|
||||||
|
|
@ -87,7 +87,7 @@ class ProductsAPIController extends Controller
|
||||||
'currency.translations:locale,model_id,attribute_data'
|
'currency.translations:locale,model_id,attribute_data'
|
||||||
])
|
])
|
||||||
->approvedAndFreshEndDate()
|
->approvedAndFreshEndDate()
|
||||||
->orderBy('updated_at', $sortOrder);
|
->orderBy('ends_at', $sortOrder);
|
||||||
} else {
|
} else {
|
||||||
$query = null;
|
$query = null;
|
||||||
}
|
}
|
||||||
|
|
@ -101,7 +101,7 @@ class ProductsAPIController extends Controller
|
||||||
'measure.translations:locale,model_id,attribute_data',
|
'measure.translations:locale,model_id,attribute_data',
|
||||||
'currency.translations:locale,model_id,attribute_data'
|
'currency.translations:locale,model_id,attribute_data'
|
||||||
])
|
])
|
||||||
->orderBy('updated_at', $sortOrder);
|
->orderBy('ends_at', $sortOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = $query ? $query->paginate($perPage) : null;
|
$data = $query ? $query->paginate($perPage) : null;
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ use October\Rain\Support\Facades\Event;
|
||||||
use TPS\Birzha\Classes\TranslatedErrSucMsgResponseApi;
|
use TPS\Birzha\Classes\TranslatedErrSucMsgResponseApi;
|
||||||
use TPS\Birzha\Models\Payment;
|
use TPS\Birzha\Models\Payment;
|
||||||
use TPS\Birzha\Classes\TransactionResource;
|
use TPS\Birzha\Classes\TransactionResource;
|
||||||
|
use TPS\Birzha\Models\Settings;
|
||||||
|
|
||||||
class TransactionsApiController extends KabinetAPIController
|
class TransactionsApiController extends KabinetAPIController
|
||||||
{
|
{
|
||||||
|
|
@ -128,4 +129,22 @@ class TransactionsApiController extends KabinetAPIController
|
||||||
return $newPayment;
|
return $newPayment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getBankInfo(Request $request) {
|
||||||
|
$data = $request->only(['locale']);
|
||||||
|
$validator = Validator::make($data, [
|
||||||
|
'locale' => 'required|in:ru,tm,en',
|
||||||
|
]);
|
||||||
|
|
||||||
|
if($validator->fails()) {
|
||||||
|
return response()->json($validator->errors(), 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'tax_code' => Settings::getValue('tax_code'),
|
||||||
|
'bab' => Settings::getValue('bab'),
|
||||||
|
'manat_account' => Settings::getValue('manat_account'),
|
||||||
|
'correspondent_account' => Settings::getValue('correspondent_account'),
|
||||||
|
'bank_address' => trans("validation.api.bank_address_one", [], $data['locale'])
|
||||||
|
], 200);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,8 @@ Route::group(['prefix' =>'api/v1','namespace' =>'AhmadFatoni\ApiGenerator\Contro
|
||||||
|
|
||||||
Route::post('send-email-verification-link', 'EmailVerificationController@sendEmailVerificationLink');
|
Route::post('send-email-verification-link', 'EmailVerificationController@sendEmailVerificationLink');
|
||||||
|
|
||||||
|
Route::get('bank-info', 'TransactionsApiController@getBankInfo');
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,8 @@ Route::group(['prefix' =>'api/v1','namespace' =>'AhmadFatoni\ApiGenerator\Contro
|
||||||
|
|
||||||
Route::post('send-email-verification-link', 'EmailVerificationController@sendEmailVerificationLink');
|
Route::post('send-email-verification-link', 'EmailVerificationController@sendEmailVerificationLink');
|
||||||
|
|
||||||
|
Route::get('bank-info', 'TransactionsApiController@getBankInfo');
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ class Offers extends ComponentBase
|
||||||
$productSlug = $this->property('productSlug');
|
$productSlug = $this->property('productSlug');
|
||||||
$offerId = $this->property('offerId');
|
$offerId = $this->property('offerId');
|
||||||
|
|
||||||
$query = Product::where('status', 'approved')->where('ends_at','>=',\Carbon\Carbon::now())->orderBy('updated_at', $sortOrder);
|
$query = Product::where('status', 'approved')->where('ends_at','>=',\Carbon\Carbon::now())->orderBy('ends_at', $sortOrder);
|
||||||
|
|
||||||
if($cSlug != '') { //fetch offers by the category of the product
|
if($cSlug != '') { //fetch offers by the category of the product
|
||||||
$category = Category::transWhere('slug', $cSlug, Session::get('rainlab.translate.locale'))->first();
|
$category = Category::transWhere('slug', $cSlug, Session::get('rainlab.translate.locale'))->first();
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,29 @@
|
||||||
{% set slider = __SELF__.slider %}
|
{% set slider = __SELF__.slider %}
|
||||||
|
{% set lng = __SELF__.lng %}
|
||||||
|
|
||||||
<div class="advert">
|
<div class="advert">
|
||||||
{% for item in slider.slide_items %}
|
{% for item in slider.slide_items %}
|
||||||
|
|
||||||
|
<!-- Ru -->
|
||||||
|
{% if lng == 'ru' %}
|
||||||
<a href="{{ item.link ? item.link : '#' }}" class="advert_item">
|
<a href="{{ item.link ? item.link : '#' }}" class="advert_item">
|
||||||
<img src="{{ item.slide_img|media }}" alt="">
|
<img src="{{ item.slide_img_ru|media }}" alt="">
|
||||||
</a>
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<!-- Tm -->
|
||||||
|
{% if lng == 'tm' %}
|
||||||
|
<a href="{{ item.link ? item.link : '#' }}" class="advert_item">
|
||||||
|
<img src="{{ item.slide_img_tm|media }}" alt="">
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<!-- En -->
|
||||||
|
{% if lng == 'en' %}
|
||||||
|
<a href="{{ item.link ? item.link : '#' }}" class="advert_item">
|
||||||
|
<img src="{{ item.slide_img_en|media }}" alt="">
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,29 +4,42 @@
|
||||||
<div class="intro_slider">
|
<div class="intro_slider">
|
||||||
{% for item in slider.slide_items %}
|
{% for item in slider.slide_items %}
|
||||||
<div class="slider_item">
|
<div class="slider_item">
|
||||||
|
|
||||||
|
<!-- Ru -->
|
||||||
|
{% if lng == 'ru' %}
|
||||||
<div class="slider_content">
|
<div class="slider_content">
|
||||||
{% if lng == 'ru' %}
|
|
||||||
<a href="{{ item.link ? item.link : '#' }}" class="slider_title">
|
<a href="{{ item.link ? item.link : '#' }}" class="slider_title">
|
||||||
{{ item.slide_title_ru }}
|
{{ item.slide_title_ru }}
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
{% endif %}
|
<div class="slider_item-img">
|
||||||
{% if lng == 'en' %}
|
<img src="{{ item.slide_img_ru|media }}" alt="">
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<!-- En -->
|
||||||
|
{% if lng == 'en' %}
|
||||||
|
<div class="slider_content">
|
||||||
<a href="{{ item.link ? item.link : '#' }}" class="slider_title">
|
<a href="{{ item.link ? item.link : '#' }}" class="slider_title">
|
||||||
{{ item.slide_title_en }}
|
{{ item.slide_title_en }}
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
{% endif %}
|
<div class="slider_item-img">
|
||||||
{% if lng == 'tm' %}
|
<img src="{{ item.slide_img_en|media }}" alt="">
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<!-- Tm -->
|
||||||
|
{% if lng == 'tm' %}
|
||||||
|
<div class="slider_content">
|
||||||
<a href="{{ item.link ? item.link : '#' }}" class="slider_title">
|
<a href="{{ item.link ? item.link : '#' }}" class="slider_title">
|
||||||
{{ item.slide_title_tm }}
|
{{ item.slide_title_tm }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="slider_item-img">
|
<div class="slider_item-img">
|
||||||
<img src="{{ item.slide_img|media }}" alt="">
|
<img src="{{ item.slide_img_tm|media }}" alt="">
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,8 @@ fields:
|
||||||
label: 'Slide text EN'
|
label: 'Slide text EN'
|
||||||
span: auto
|
span: auto
|
||||||
type: text
|
type: text
|
||||||
slide_img:
|
slide_img_ru:
|
||||||
label: 'Slide image'
|
label: 'Slide image RU'
|
||||||
mode: image
|
mode: image
|
||||||
imageWidth: '80'
|
imageWidth: '80'
|
||||||
imageHeight: '80'
|
imageHeight: '80'
|
||||||
|
|
@ -46,7 +46,21 @@ fields:
|
||||||
label: 'Display time'
|
label: 'Display time'
|
||||||
span: auto
|
span: auto
|
||||||
type: number
|
type: number
|
||||||
|
slide_img_tm:
|
||||||
|
label: 'Slide image TM'
|
||||||
|
mode: image
|
||||||
|
imageWidth: '80'
|
||||||
|
imageHeight: '80'
|
||||||
|
span: auto
|
||||||
|
type: mediafinder
|
||||||
link:
|
link:
|
||||||
label: Link
|
label: Link
|
||||||
span: auto
|
span: auto
|
||||||
type: text
|
type: text
|
||||||
|
slide_img_en:
|
||||||
|
label: 'Slide image EN'
|
||||||
|
mode: image
|
||||||
|
imageWidth: '80'
|
||||||
|
imageHeight: '80'
|
||||||
|
span: auto
|
||||||
|
type: mediafinder
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ layout="birzha_empty"
|
||||||
<!-- Ru -->
|
<!-- Ru -->
|
||||||
<table class="mail" style="border: 1px solid #003197; border-radius: 5px; overflow: hidden; width: 100%; border-spacing: 0;">
|
<table class="mail" style="border: 1px solid #003197; border-radius: 5px; overflow: hidden; width: 100%; border-spacing: 0;">
|
||||||
|
|
||||||
<tr>
|
<tr style="background-image: url({{ asset('themes/birzha/assets/images/footer-bg.png') }})">
|
||||||
<th class="header" style="padding: 0; position: relative;">
|
<th class="header" style="padding: 0; position: relative;">
|
||||||
<div class="header_row" style=" display: flex; align-items: center; padding: 10px 20px;">
|
<div class="header_row" style=" display: flex; align-items: center; padding: 10px 20px;">
|
||||||
<div class="logo" style="width: 44px; height: 44px; margin-right: 20px; position: relative; z-index: 2;">
|
<div class="logo" style="width: 44px; height: 44px; margin-right: 20px; position: relative; z-index: 2;">
|
||||||
|
|
@ -142,7 +142,7 @@ layout="birzha_empty"
|
||||||
<!-- Eng -->
|
<!-- Eng -->
|
||||||
<table class="mail" style="border: 1px solid #003197; border-radius: 5px; overflow: hidden; width: 100%; border-spacing: 0;">
|
<table class="mail" style="border: 1px solid #003197; border-radius: 5px; overflow: hidden; width: 100%; border-spacing: 0;">
|
||||||
|
|
||||||
<tr>
|
<tr style="background-image: url({{ asset('themes/birzha/assets/images/footer-bg.png') }})">
|
||||||
<th class="header" style="padding: 0; position: relative;">
|
<th class="header" style="padding: 0; position: relative;">
|
||||||
<div class="header_row" style=" display: flex; align-items: center; padding: 10px 20px;">
|
<div class="header_row" style=" display: flex; align-items: center; padding: 10px 20px;">
|
||||||
<div class="logo" style="width: 44px; height: 44px; margin-right: 20px; position: relative; z-index: 2;">
|
<div class="logo" style="width: 44px; height: 44px; margin-right: 20px; position: relative; z-index: 2;">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue