fixes
This commit is contained in:
parent
00c25dac54
commit
252307e241
|
|
@ -170,7 +170,7 @@ return [
|
|||
'mark' => 'Product mark',
|
||||
'manufacturer' => 'Vendor',
|
||||
'category_id' => 'Category',
|
||||
'country_id' => "Vendor's country",
|
||||
'country' => "Vendor's country",
|
||||
'measure_id' => 'Measure',
|
||||
'quantity' => 'Quantity',
|
||||
'currency_id' => 'Currency',
|
||||
|
|
@ -186,6 +186,8 @@ return [
|
|||
'market_type' => 'Market type',
|
||||
'password' => 'Password',
|
||||
'email' => 'Email',
|
||||
'name' => 'Name',
|
||||
'surname' => 'Surname',
|
||||
],
|
||||
|
||||
];
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ return [
|
|||
'mark' => 'Марка товара',
|
||||
'manufacturer' => 'Производитель',
|
||||
'category_id' => 'Категория',
|
||||
'country_id' => 'Страна производителя',
|
||||
'country' => 'Страна производителя',
|
||||
'measure_id' => 'Единицы измерения',
|
||||
'quantity' => 'Количество товара',
|
||||
'currency_id' => 'Валюта',
|
||||
|
|
@ -186,6 +186,8 @@ return [
|
|||
'market_type' => 'Тип рынка',
|
||||
'password' => 'пароль',
|
||||
'email' => 'эл. адрес',
|
||||
'name' => 'Имя',
|
||||
'surname' => 'Фаимилия',
|
||||
],
|
||||
|
||||
];
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ return [
|
|||
'mark' => 'Harydyň markasy',
|
||||
'manufacturer' => 'Öndüriji',
|
||||
'category_id' => 'Kategoriýa',
|
||||
'country_id' => 'Öndürijiniň yurdy',
|
||||
'country' => 'Öndürijiniň yurdy',
|
||||
'measure_id' => 'Birlikler',
|
||||
'quantity' => 'Harydyň mukdary',
|
||||
'currency_id' => 'Pul birligi',
|
||||
|
|
@ -188,6 +188,8 @@ return [
|
|||
'market_type' => 'Bazaryň gornüşi',
|
||||
'password' => 'Açar söz',
|
||||
'email' => 'El. bukjaňyz',
|
||||
'name' => 'At',
|
||||
'surname' => 'Familiýa',
|
||||
],
|
||||
|
||||
];
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ class ProductsAPIController extends Controller
|
|||
],
|
||||
'mark' => 'required',
|
||||
'manufacturer' => 'required',
|
||||
'country_id' => 'required|exists:tps_birzha_countries,id',
|
||||
'country' => 'required',
|
||||
|
||||
// if product is being edited - not added
|
||||
'productForEditing' => [
|
||||
|
|
@ -182,7 +182,7 @@ class ProductsAPIController extends Controller
|
|||
$product->status = 'draft';
|
||||
$product->mark = $data['mark'];
|
||||
$product->manufacturer = $data['manufacturer'];
|
||||
$product->country_id = $data['country_id'];
|
||||
$product->country = $data['country'];
|
||||
|
||||
$product->vendor_id = \JWTAuth::parseToken()->authenticate()->id;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,11 @@ use Exception;
|
|||
*/
|
||||
class Account extends ComponentBase
|
||||
{
|
||||
/**
|
||||
* Validation messages
|
||||
*/
|
||||
public $accountValidationMsgs;
|
||||
|
||||
public function componentDetails()
|
||||
{
|
||||
return [
|
||||
|
|
@ -363,9 +368,11 @@ class Account extends ComponentBase
|
|||
/*
|
||||
* Redirect to the intended page after successful sign in
|
||||
*/
|
||||
if ($redirect = $this->makeRedirection(true)) {
|
||||
return $redirect;
|
||||
}
|
||||
// if ($redirect = $this->makeRedirection(true)) {
|
||||
// return $redirect;
|
||||
// }
|
||||
|
||||
return \Redirect::to('/profile');
|
||||
}
|
||||
catch (Exception $ex) {
|
||||
if (Request::ajax()) throw $ex;
|
||||
|
|
@ -434,11 +441,21 @@ class Account extends ComponentBase
|
|||
$rules = [
|
||||
'email' => 'required|between:6,191|email',
|
||||
'username' => 'required|digits_between:8,20|numeric',
|
||||
'name' => 'required',
|
||||
'surname' => 'required',
|
||||
'username' => 'required|digits_between:8,20|numeric',
|
||||
'iu_company' => 'max:191',
|
||||
'iu_about' => 'digits:6|numeric',
|
||||
];
|
||||
|
||||
$validation = Validator::make($data, $rules,(new UserModel)->messages);
|
||||
$validation = Validator::make($data, $rules, [
|
||||
'username.required' => trans('validation.auth_profile.phone_number_required'),
|
||||
'username.numeric' => trans('validation.auth_profile.phone_number_numeric'),
|
||||
'username.digits_between' => trans('validation.auth_profile.phone_number_digits_between'),
|
||||
'username.unique' => trans('validation.auth_profile.phone_number_unique'),
|
||||
'iu_about.digits' => trans('validation.auth_profile.iu_about_digits'),
|
||||
'iu_company.max' => trans('validation.auth_profile.iu_company_max'),
|
||||
]);
|
||||
if ($validation->fails()) {
|
||||
throw new ValidationException($validation);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,11 +18,14 @@ class Balance extends ComponentBase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* On online payment
|
||||
*/
|
||||
public function onSend() {
|
||||
$data = post();
|
||||
|
||||
$rules = [
|
||||
'payment_type' => 'required',
|
||||
// 'payment_type' => 'required',
|
||||
'amount' => 'required|numeric'
|
||||
];
|
||||
|
||||
|
|
@ -70,6 +73,9 @@ class Balance extends ComponentBase
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* On bank transfer payment
|
||||
*/
|
||||
public function onPayByBankTransfer() {
|
||||
$data = input();
|
||||
|
||||
|
|
@ -81,7 +87,7 @@ class Balance extends ComponentBase
|
|||
|
||||
$newPayment = new Payment;
|
||||
$newPayment->user_id = \Auth::user()->id;
|
||||
$newPayment->amount = $data['amount'];
|
||||
$newPayment->amount = 0;
|
||||
$newPayment->payment_type = "bank";
|
||||
$newPayment->status = "new";
|
||||
$newPayment->save();
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class OfferForm extends ComponentBase
|
|||
'category_id' => 'exists:tps_birzha_categories,id',
|
||||
'mark' => 'required',
|
||||
'manufacturer' => 'required',
|
||||
'country_id' => 'exists:tps_birzha_countries,id',
|
||||
'country' => 'required',
|
||||
'market_type' => 'required|in:in,out'
|
||||
];
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ class OfferForm extends ComponentBase
|
|||
$product->status = 'draft';
|
||||
$product->mark = $data['mark'];
|
||||
$product->manufacturer = $data['manufacturer'];
|
||||
$product->country_id = $data['country_id'];
|
||||
$product->country = $data['country'];
|
||||
$product->market_type = $data['market_type'];
|
||||
|
||||
$product->vendor_id = \Auth::user()->id;
|
||||
|
|
|
|||
|
|
@ -1,74 +0,0 @@
|
|||
<div class="contact_title">
|
||||
{{'account.bank_transfer'|_}}
|
||||
</div>
|
||||
<form class="post_form bank_form" data-request="onPayByBankTransfer" data-request-validate data-request-flash data-request-files
|
||||
data-request-data="amount: {{amount}}">
|
||||
|
||||
<div class="bank">
|
||||
<div class="bank_group">
|
||||
<div class="bank_title">
|
||||
{{'account.bank_details'|_}}:
|
||||
</div>
|
||||
<div class="bank_text">
|
||||
- 1234-1234-1234-1234
|
||||
</div>
|
||||
<div class="bank_text">
|
||||
- 1234-1234-1234-1234
|
||||
</div>
|
||||
</div>
|
||||
<div class="bank_group">
|
||||
<div class="bank_title">
|
||||
{{'account.bank_address'|_}}:
|
||||
</div>
|
||||
<div class="bank_text">
|
||||
{{'account.bank_1'|_}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="bank_group">
|
||||
<div class="bank_title">
|
||||
{{'account.our_bank_details'|_}}:
|
||||
</div>
|
||||
<div class="bank_text">
|
||||
- 1234-1234-1234-1234
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- <div class="post_input">
|
||||
<label for="good-count">{{'account.amount'|_}} (TMT)<span>*</span> </label>
|
||||
<input type="text" placeholder="100" id="good-count" disabled value="{{amount}}">
|
||||
<span data-validate-for="amount" style="color: red;"></span>
|
||||
</div> -->
|
||||
|
||||
<div class="post_upload_box">
|
||||
<div class="post_upload_item">
|
||||
<label class="upload_label" >{{'account.upload_file'|_}}<span>*</span></label>
|
||||
<div class="upload_group">
|
||||
<label for="file-1">{{'account.upload_file'|_}}</label>
|
||||
<div class="form_group">
|
||||
<label class="additional">
|
||||
<span>{{'account.nothing_chosen'|_}}</span>
|
||||
</label>
|
||||
<input type="file" name="bank_file" id="file-1" class="inputfile inputfile-1"
|
||||
data-multiple-caption="{count} files selected" />
|
||||
</div>
|
||||
</div>
|
||||
<span data-validate-for="bank_file" style="color: red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="send_btn" type="submit">
|
||||
{{'account.send'|_}}
|
||||
</button>
|
||||
|
||||
<!-- <div class="btn_bg">
|
||||
<button class="post_btn" type="submit">
|
||||
{{'account.send'|_}}
|
||||
</button>
|
||||
</div> -->
|
||||
</form>
|
||||
|
||||
|
||||
<script src="{{ 'assets/js/custom-file-input.js'|theme }}"></script>
|
||||
|
|
@ -12,10 +12,10 @@
|
|||
{{'account.fill_up_balance'|_}}
|
||||
</div>
|
||||
<div class="post_in">
|
||||
<label for="good-count">Выберите метод оплаты<span>*</span> </label>
|
||||
<label for="good-count">{{'account.payment_type'|_}}<span>*</span> </label>
|
||||
<div class="balance_tabs">
|
||||
<h3 class="balance_link open_link active" data-tab="#balance-1">Онлайн оплата</h3>
|
||||
<h3 class="balance_link open_link" data-tab="#balance-2">Банковский перевод</h3>
|
||||
<h3 class="balance_link open_link active" data-tab="#balance-1">{{'account.online_payment'|_}}</h3>
|
||||
<h3 class="balance_link open_link" data-tab="#balance-2">{{'account.bank_transfer'|_}}</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -26,6 +26,7 @@
|
|||
data-request-validate
|
||||
data-request-flash
|
||||
class="post_form-3 first-step-form">
|
||||
|
||||
<div class="post_input">
|
||||
<label for="good-count">{{'account.amount'|_}} (TMT)<span>*</span> </label>
|
||||
<input type="number" step="0.01" name="amount" placeholder="100" id="good-count" required>
|
||||
|
|
@ -33,17 +34,20 @@
|
|||
</div>
|
||||
|
||||
<button type="submit" class="send_btn">
|
||||
Send
|
||||
{{'account.pay'|_}}
|
||||
</button>
|
||||
|
||||
<p class="post_footer-text">
|
||||
<span>*</span> Перед отправкой убедитесь что перевод был осуществлен верно и у вас имеется чек
|
||||
</p>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="balance_source open_info" id="balance-2">
|
||||
<form class="post_form-3 bank_form" data-request="onPayByBankTransfer" data-request-validate data-request-flash data-request-files
|
||||
data-request-data="amount: {{amount}}">
|
||||
<form class="post_form-3 bank_form" enctype="multipart/form-data"
|
||||
|
||||
method="post"
|
||||
|
||||
data-request="onPayByBankTransfer"
|
||||
data-request-validate
|
||||
data-request-flash
|
||||
data-request-files>
|
||||
|
||||
<div class="bank">
|
||||
<div class="bank_group">
|
||||
|
|
@ -88,7 +92,6 @@
|
|||
data-multiple-caption="{count} files selected" />
|
||||
</div>
|
||||
</div>
|
||||
<span data-validate-for="bank_file" style="color: red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -96,8 +99,10 @@
|
|||
{{'account.send'|_}}
|
||||
</button>
|
||||
|
||||
<p class="post_footer-text"><span data-validate-for="bank_file" style="color: red;"></span></p>
|
||||
|
||||
<p class="post_footer-text">
|
||||
<span>*</span> Перед отправкой убедитесь что перевод был осуществлен верно и у вас имеется чек
|
||||
<span>*</span> {{ 'account.balance_warning'|_ }}
|
||||
</p>
|
||||
</form>
|
||||
|
||||
|
|
@ -115,4 +120,6 @@
|
|||
</section>
|
||||
<!-- Add post end ========================================================= -->
|
||||
|
||||
<script src="{{ 'assets/js/custom-file-input.js'|theme }}"></script>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -90,21 +90,14 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="post_input p-b">
|
||||
<label>{{'page.prod_vendor_country'|_}} <span>*</span> </label>
|
||||
<div class="my-select">
|
||||
<select name="country_id" data-belongsto="product">
|
||||
<option value="0">{{'page.prod_vendor_country'|_}}</option>
|
||||
{% for country in countries %}
|
||||
<option value="{{ country.id }}"
|
||||
{% if productForEditing and productForEditing.country.id == country.id %}
|
||||
selected
|
||||
{% endif %}
|
||||
>{{country.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<span class="error_span" data-validate-for="country_id" style="color: red;"></span>
|
||||
</div>
|
||||
<div class="post_input">
|
||||
<label>{{'page.prod_vendor_country'|_}} <span>*</span></label>
|
||||
<input type="text" name="country" data-belongsto="product" placeholder="{{'page.example'|_}}: Türkmenistan"
|
||||
{% if productForEditing %}
|
||||
value="{{ productForEditing.country }}"
|
||||
{% endif %}
|
||||
>
|
||||
<span class="error_span" data-validate-for="country" style="color: red;"></span>
|
||||
</div>
|
||||
|
||||
<div class="post_input p-b">
|
||||
|
|
|
|||
|
|
@ -91,12 +91,12 @@
|
|||
{% if product.packaging == "yes" %}
|
||||
selected
|
||||
{% endif %}
|
||||
>Bar</option>
|
||||
>{{'page.packaging_yes'|_}}</option>
|
||||
<option value="no"
|
||||
{% if product.packaging == "no" %}
|
||||
selected
|
||||
{% endif %}
|
||||
>Ýok</option>
|
||||
>{{'page.packaging_no'|_}}</option>
|
||||
</select>
|
||||
<span class="error_span" data-validate-for="packaging" style="color: red;"></span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@
|
|||
{{'page.prod_vendor_country'|_}} :
|
||||
</div>
|
||||
<div class="detail_value">
|
||||
{{offer.country.name}}
|
||||
{{offer.country}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail_row">
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class Payment extends Model
|
|||
* @var array Validation rules
|
||||
*/
|
||||
public $rules = [
|
||||
'amount' => 'required'
|
||||
'amount' => 'required|gt:0'
|
||||
];
|
||||
|
||||
public $hasMany = [
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class Product extends Model
|
|||
];
|
||||
|
||||
public $belongsTo = [
|
||||
'country' => ['TPS\Birzha\Models\Country'],
|
||||
// 'country' => ['TPS\Birzha\Models\Country'],
|
||||
'measure' => ['TPS\Birzha\Models\Measure','key' => 'measure_id'],
|
||||
'currency' => ['TPS\Birzha\Models\Currency'],
|
||||
'payment_term' => ['TPS\Birzha\Models\Term','key' => 'payment_term_id'],
|
||||
|
|
|
|||
|
|
@ -27,11 +27,9 @@ fields:
|
|||
span: auto
|
||||
type: text
|
||||
country:
|
||||
label: 'Maufactured country'
|
||||
nameFrom: name
|
||||
descriptionFrom: description
|
||||
label: 'Manufacturer country'
|
||||
span: auto
|
||||
type: relation
|
||||
type: text
|
||||
quantity:
|
||||
label: Quantity
|
||||
span: auto
|
||||
|
|
@ -83,7 +81,7 @@ fields:
|
|||
type: text
|
||||
vendor:
|
||||
label: Seller
|
||||
nameFrom: name
|
||||
nameFrom: email
|
||||
descriptionFrom: description
|
||||
span: auto
|
||||
type: relation
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
<?php namespace TPS\Birzha\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableUpdateTpsBirzhaProducts24 extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('tps_birzha_products', function($table)
|
||||
{
|
||||
$table->string('country', 191)->nullable();
|
||||
$table->dropColumn('country_id');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('tps_birzha_products', function($table)
|
||||
{
|
||||
$table->dropColumn('country');
|
||||
$table->integer('country_id')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -227,3 +227,6 @@
|
|||
1.0.79:
|
||||
- 'Updated table tps_birzha_products'
|
||||
- builder_table_update_tps_birzha_products_23.php
|
||||
1.0.80:
|
||||
- 'Updated table tps_birzha_products'
|
||||
- builder_table_update_tps_birzha_products_24.php
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ en:
|
|||
account.new_password: New password
|
||||
account.info: Account info
|
||||
account.balance: Balance
|
||||
account.balance_warning: Перед отправкой убедитесь что перевод был осуществлен верно и у вас имеется чек
|
||||
account.fill_up_balance: Fill up balance
|
||||
account.bank_details: Банковские реквизиты
|
||||
account.bank_address: Bank address
|
||||
|
|
@ -106,6 +107,8 @@ en:
|
|||
page.delivery_cond: Условия поставки
|
||||
page.delivery_point: Пункт
|
||||
page.packaging: Упаковка
|
||||
page.packaging_yes: Yes
|
||||
page.packaging_no: No
|
||||
page.seller_cont: Контакты продавца
|
||||
page.buy_now: Купить сейчас
|
||||
page.send_prod_request: Отправить запрос на лот
|
||||
|
|
@ -149,6 +152,7 @@ ru:
|
|||
account.new_password: Täze açar söz
|
||||
account.info: Персональные данные
|
||||
account.balance: Balance
|
||||
account.balance_warning: Перед отправкой убедитесь что перевод был осуществлен верно и у вас имеется чек
|
||||
account.fill_up_balance: Fill up balance
|
||||
account.bank_details: Банковские реквизиты
|
||||
account.bank_address: Bank address
|
||||
|
|
@ -230,6 +234,8 @@ ru:
|
|||
page.delivery_cond: Условия поставки
|
||||
page.delivery_point: Пункт
|
||||
page.packaging: Упаковка
|
||||
page.packaging_yes: Есть
|
||||
page.packaging_no: Нет
|
||||
page.seller_cont: Контакты продавца
|
||||
page.buy_now: Купить сейчас
|
||||
page.send_prod_request: Отправить запрос на лот
|
||||
|
|
@ -275,6 +281,7 @@ tm:
|
|||
account.new_password: Täze açar söz
|
||||
account.info: Şahsy maglumatlar
|
||||
account.balance: Balance
|
||||
account.balance_warning: Перед отправкой убедитесь что перевод был осуществлен верно и у вас имеется чек
|
||||
account.fill_up_balance: Fill up balance
|
||||
account.bank_details: Банковские реквизиты
|
||||
account.bank_address: Bank address
|
||||
|
|
@ -373,6 +380,8 @@ tm:
|
|||
page.delivery_cond: Условия поставки
|
||||
page.delivery_point: Пункт
|
||||
page.packaging: Упаковка
|
||||
page.packaging_yes: Bar
|
||||
page.packaging_no: Ýok
|
||||
page.seller_cont: Контакты продавца
|
||||
page.buy_now: Купить сейчас
|
||||
page.send_prod_request: Отправить запрос на лот
|
||||
|
|
|
|||
Loading…
Reference in New Issue