Merge branch 'master' of https://github.com/openclassify/openclassify into muammertop

This commit is contained in:
muammertop 2021-05-22 13:42:58 +03:00
commit 6bdcf4eed9
21 changed files with 274 additions and 79 deletions

View File

@ -24,6 +24,7 @@ return [
'ads' => [ 'ads' => [
'title' => 'visiosoft.module.advs::section.ads', 'title' => 'visiosoft.module.advs::section.ads',
'fields' => [ 'fields' => [
'show_finish_and_publish_date',
'latest-limit', 'latest-limit',
'popular_ads_limit', 'popular_ads_limit',
'ads_image_limit', 'ads_image_limit',

View File

@ -455,4 +455,11 @@ return [
'default_value' => false, 'default_value' => false,
] ]
], ],
'show_finish_and_publish_date' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
],
],
]; ];

View File

@ -1,3 +1,66 @@
.editContact { .editContact {
font-size: 13px; font-size: 13px;
} }
.input-group {
position: relative;
width: 100%;
display: flex;
}
.input-group .form-control {
position: relative;
z-index: 2;
flex: 1;
margin-bottom: 0;
}
.input-group .form-control:focus, .input-group .form-control:active, .input-group .form-control:hover {
z-index: 3;
}
.input-group-addon:not(:first-child):not(:last-child),
.input-group-btn:not(:first-child):not(:last-child),
.input-group .form-control:not(:first-child):not(:last-child) {
border-radius: 0;
}
.input-group-addon,
.input-group-btn {
white-space: nowrap;
vertical-align: middle;
}
.input-group-addon {
padding: 0.5rem 0.75rem;
margin-bottom: 0;
font-size: 1rem;
font-weight: normal;
line-height: 1.25;
color: #55595c;
text-align: center;
background-color: #eceeef;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 0.1rem;
}
.input-group-addon.form-control-sm,
.input-group-sm > .input-group-addon,
.input-group-sm > .input-group-btn > .input-group-addon.btn {
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
border-radius: 0.1rem;
}
.input-group-addon.form-control-lg,
.input-group-lg > .input-group-addon,
.input-group-lg > .input-group-btn > .input-group-addon.btn {
padding: 0.75rem 1.5rem;
font-size: 1.25rem;
border-radius: 0.25rem;
}
.input-group-addon input[type=radio],
.input-group-addon input[type=checkbox] {
margin-top: 0;
}

View File

@ -44,12 +44,12 @@ $('.editInformationUser').on('click', function () {
success: function (response) { success: function (response) {
if (response.status == "success") { if (response.status == "success") {
var profile = response.data; var profile = response.data;
$('input[name="first_name"]').val(profile.first_name) $('input[name="first_name"]').val(profile.first_name);
$('input[name="last_name"]').val(profile.last_name) $('input[name="last_name"]').val(profile.last_name);
intlTelInput(document.querySelector("input[name='gsm_phone']")).setNumber(profile.gsm_phone) intlTelInput(document.querySelector("input[name='gsm_phone']")).setNumber(profile.gsm_phone);
intlTelInput(document.querySelector("input[name='office_phone']")).setNumber(profile.office_phone) intlTelInput(document.querySelector("input[name='office_phone']")).setNumber(profile.office_phone);
intlTelInput(document.querySelector("input[name='land_phone']")).setNumber(profile.land_phone) intlTelInput(document.querySelector("input[name='land_phone']")).setNumber(profile.land_phone);
} }
} }
}); });
}) });

View File

@ -108,7 +108,7 @@ return [
'name' => 'Unpublished' 'name' => 'Unpublished'
], ],
'finish_at' => [ 'finish_at' => [
'name' => 'Finish At' 'name' => 'Finish Date'
], ],
'cover_photo' => [ 'cover_photo' => [
'name' => 'Cover Photo' 'name' => 'Cover Photo'
@ -370,4 +370,7 @@ return [
'name' => 'Old Price' 'name' => 'Old Price'
], ],
'save_search' => 'Save Search', 'save_search' => 'Save Search',
'publish_at' => [
'name' => 'Publish Date'
],
]; ];

View File

@ -27,7 +27,7 @@ return [
'favicon' => [ 'favicon' => [
'name' => 'Favicon', 'name' => 'Favicon',
] ]
,'map_coordinates_long' => [ , 'map_coordinates_long' => [
'name' => 'Map Long Coordinate', 'name' => 'Map Long Coordinate',
], ],
'map_coordinates_lat' => [ 'map_coordinates_lat' => [
@ -41,7 +41,7 @@ return [
], ],
'ogImage' => [ 'ogImage' => [
'name' => 'Social Share Logo', 'name' => 'Social Share Logo',
'warning' => 'It should be at a resolution of 1200 x 630. ', 'warning' => 'It should be at a resolution of 1200 x 630. ',
], ],
'currencies' => [ 'currencies' => [
@ -52,7 +52,7 @@ return [
], ],
'site_address' => [ 'site_address' => [
'name' => 'Site address', 'name' => 'Site address',
'warning' => 'Auto added www. www.<strong>sitename.com</strong> ', 'warning' => 'Auto added www. www.<strong>sitename.com</strong> ',
], ],
'google_map_key' => [ 'google_map_key' => [
'name' => 'Google Map Api Key', 'name' => 'Google Map Api Key',
@ -134,9 +134,9 @@ return [
'market_place' => [ 'market_place' => [
'name' => 'Market Place', 'name' => 'Market Place',
], ],
'price_area_hidden' => [ 'price_area_hidden' => [
'name' => 'Price Area Hidden', 'name' => 'Price Area Hidden',
], ],
'hide_price_filter' => [ 'hide_price_filter' => [
'name' => 'Hide Price Filter', 'name' => 'Hide Price Filter',
], ],
@ -215,18 +215,18 @@ return [
'name' => 'Hide Created Date', 'name' => 'Hide Created Date',
'instructions' => 'Hide created date in ads detail page', 'instructions' => 'Hide created date in ads detail page',
], ],
'hide_listing_header' => [ 'hide_listing_header' => [
'name' => 'Hide Listing Header', 'name' => 'Hide Listing Header',
'instructions' => 'Hiding to ordering and view types', 'instructions' => 'Hiding to ordering and view types',
], ],
'hide_filter_section' => [ 'hide_filter_section' => [
'name' => 'Hide Filter Section', 'name' => 'Hide Filter Section',
'instructions' => 'Hiding to left filter area in listing page', 'instructions' => 'Hiding to left filter area in listing page',
], ],
'hide_seller_info' => [ 'hide_seller_info' => [
'name' => 'Hide Seller Information', 'name' => 'Hide Seller Information',
'instructions' => 'Hiding to seller infos in ads detail page', 'instructions' => 'Hiding to seller infos in ads detail page',
], ],
'show_post_ad_agreement' => [ 'show_post_ad_agreement' => [
'name' => 'Show Post Ad Agreement', 'name' => 'Show Post Ad Agreement',
'instructions' => 'Turn this on if you want to display a privacy policy agreement on the ad creation page', 'instructions' => 'Turn this on if you want to display a privacy policy agreement on the ad creation page',
@ -251,9 +251,9 @@ return [
'name' => 'GET Categories', 'name' => 'GET Categories',
'instructions' => 'It represents the categories in which the GET property will be valid.' 'instructions' => 'It represents the categories in which the GET property will be valid.'
], ],
'disable_sentry' => [ 'disable_sentry' => [
'name' => 'Disable Sentry' 'name' => 'Disable Sentry'
], ],
'watermark' => [ 'watermark' => [
'name' => 'Watermark', 'name' => 'Watermark',
'instructions' => 'Is watermark active?' 'instructions' => 'Is watermark active?'
@ -265,11 +265,15 @@ return [
'show_subcats_mobile' => [ 'show_subcats_mobile' => [
'name' => 'Show subcategories on mobile view', 'name' => 'Show subcategories on mobile view',
], ],
'show_price_to_members_only' => [ 'show_price_to_members_only' => [
'name' => 'Show Price To Members Only', 'name' => 'Show Price To Members Only',
], ],
'hide_ad_cat' => [ 'hide_ad_cat' => [
'name' => 'Hide Categories', 'name' => 'Hide Categories',
'instructions' => 'Hide categories in ads list' 'instructions' => 'Hide categories in ads list'
] ],
'show_finish_and_publish_date' => [
'name' => 'Show Finish Date And Publish Date For Create',
'instructions' => 'Displays the publish_at and finish_at fields on the ad creation page.'
],
]; ];

View File

@ -108,7 +108,7 @@ return [
'name' => 'Yayınlanmamış' 'name' => 'Yayınlanmamış'
], ],
'finish_at' => [ 'finish_at' => [
'name' => 'Bitiş Saati' 'name' => 'Bitiş Tarihi'
], ],
'cover_photo' => [ 'cover_photo' => [
'name' => 'Kapak Fotoğrafı' 'name' => 'Kapak Fotoğrafı'
@ -371,4 +371,7 @@ return [
'name' => 'Eski fiyat' 'name' => 'Eski fiyat'
], ],
'save_search' => 'Aramayı Kaydet', 'save_search' => 'Aramayı Kaydet',
'publish_at' => [
'name' => 'Publish Date'
],
]; ];

View File

@ -2,7 +2,8 @@
{% block styles %} {% block styles %}
<link rel="preconnect" href="https://fonts.gstatic.com"> <link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
rel="stylesheet">
<style> <style>
{{ asset_inline("visiosoft.module.advs::css/new-create.css") }} {{ asset_inline("visiosoft.module.advs::css/new-create.css") }}
@ -96,7 +97,8 @@
<div class="d-flex"> <div class="d-flex">
{% set PriceValue = form.fields.price.value|split('.') %} {% set PriceValue = form.fields.price.value|split('.') %}
<input type="text" class="mt-3 border-0 text-right priceField whole-price flex-fill" <input type="text"
class="mt-3 border-0 text-right priceField whole-price flex-fill"
placeholder="0" value="{{ PriceValue|first }}"> placeholder="0" value="{{ PriceValue|first }}">
{% if setting_value('visiosoft.field_type.decimal::showDecimal') %} {% if setting_value('visiosoft.field_type.decimal::showDecimal') %}
<input class="mt-3 border-0 ml-2 text-center priceDecimalField decimal-price" <input class="mt-3 border-0 ml-2 text-center priceDecimalField decimal-price"
@ -104,10 +106,14 @@
{% endif %} {% endif %}
</div> </div>
</div> </div>
<div class="select-price{{ setting_value('visiosoft.module.advs::hide_standard_price_field') or setting_value('visiosoft.module.advs::market_place') != true ? ' d-none' }}"> <div class="select-price">
{% set HideStandardPrice = setting_value('visiosoft.module.advs::hide_standard_price_field') or setting_value('visiosoft.module.advs::market_place') != true ? ' d-none' %}
<label> <label>
{{ form.fields.standard_price.label }} <span class="{{ HideStandardPrice }}">
<span class="required">*</span> {{ form.fields.standard_price.label }}
<span class="required">*</span>
</span>
</label> </label>
<div class="col-12 standard-price-hidden d-none"> <div class="col-12 standard-price-hidden d-none">
@ -117,13 +123,16 @@
</div> </div>
<div class="d-flex"> <div class="d-flex">
{% set standardPriceValue = form.fields.standard_price.value|split('.') %} <span class="w-100 {{ HideStandardPrice }}">
<input class="mt-3 border-0 text-right standard-price-field whole-price flex-fill" {% set standardPriceValue = form.fields.standard_price.value|split('.') %}
placeholder="0" value="{{ standardPriceValue|first }}" type="text"> <input class="mt-3 border-0 text-right standard-price-field whole-price flex-fill w-100"
{% if setting_value('visiosoft.field_type.decimal::showDecimal') %} placeholder="0" value="{{ standardPriceValue|first }}" type="text">
<input class="mt-3 border-0 ml-2 text-center standard-price-decimal decimal-price" {% if setting_value('visiosoft.field_type.decimal::showDecimal') %}
placeholder="00" type="text" value="{{ standardPriceValue[1] }}" maxlength="2"> <input class="mt-3 border-0 ml-2 text-center standard-price-decimal decimal-price"
{% endif %} placeholder="00" type="text" value="{{ standardPriceValue[1] }}"
maxlength="2">
{% endif %}
</span>
<select name="currency" class="mt-3 border-0 ml-2" id="currency" required> <select name="currency" class="mt-3 border-0 ml-2" id="currency" required>
{% for currency in config_get('streams::currencies.enabled') %} {% for currency in config_get('streams::currencies.enabled') %}
<option value="{{ currency }}"> <option value="{{ currency }}">
@ -134,6 +143,31 @@
</div> </div>
</div> </div>
</div> </div>
{% if setting_value("visiosoft.module.advs::show_finish_and_publish_date") %}
<div class="row mx-0 my-3">
<div class="col-6 px-0">
<label>
{{ form.fields.publish_at.label|raw }}
<span class="required">*</span>
</label>
<div class="py-2 pr-3">
{{ form.fields.publish_at.input|raw }}
</div>
</div>
<div class="col-6 px-0">
<label>
{{ form.fields.finish_at.label|raw }}
<span class="required">*</span>
</label>
<div class="py-2 pr-2">
{{ form.fields.finish_at.input|raw }}
</div>
</div>
</div>
{% endif %}
{% if not setting_value('visiosoft.module.advs::hide_options_field') %} {% if not setting_value('visiosoft.module.advs::hide_options_field') %}
{% if not setting_value('visiosoft.module.advs::detailed_product_options') %} {% if not setting_value('visiosoft.module.advs::detailed_product_options') %}

View File

@ -12,13 +12,18 @@ class AdvsImport implements ToModel, WithHeadingRow
public function model(array $row) public function model(array $row)
{ {
if ($row['name'] !== null && $row['price'] !== null && $row['currency'] !== null) { if ($row['name'] !== null && $row['price'] !== null && $row['currency'] !== null) {
return new AdvModel([ return new AdvModel([
'name' => $row['name'], 'name' => $row['name'],
'slug' => Str::slug($row['name']), 'slug' => Str::slug($row['name']),
'advs_desc' => $row['description'], 'advs_desc' => $row['description'] ?? null,
'price' => $row['price'], 'standard_price' => $row['standard_price'] ?? null,
'currency' => $row['currency'], 'price' => $row['price'],
]); 'currency' => $row['currency'],
'country' => $row['country'] ?? null,
'city' => $row['city'] ?? null,
'cat1' => $row['cat1'] ?? null,
'cat2' => $row['cat2'] ?? null,
]);
} }
} }
} }

View File

@ -27,7 +27,7 @@ class AdvFormBuilder extends FormBuilder
{ {
$requiredFields = setting_value('visiosoft.module.advs::make_all_fields_required'); $requiredFields = setting_value('visiosoft.module.advs::make_all_fields_required');
return [ $fields = [
'name' => [ 'name' => [
'translatable' => true, 'translatable' => true,
'required' => true, 'required' => true,
@ -84,5 +84,18 @@ class AdvFormBuilder extends FormBuilder
'adv_day', 'adv_day',
'product_options_value' 'product_options_value'
]; ];
if (setting_value('visiosoft.module.advs::show_finish_and_publish_date')) {
$fields = array_merge($fields, [
'finish_at' => [
'required' => true,
],
'publish_at' => [
'required' => true,
],
]);
}
return $fields;
} }
} }

View File

@ -17,11 +17,18 @@ class Approve extends ActionHandler
if ($ad = $model->newQuery()->find($id)) { if ($ad = $model->newQuery()->find($id)) {
$ad->update([ $update = [
'status' => 'approved', 'status' => 'approved',
'finish_at' => date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s') . ' + ' . $defaultAdPublishTime . ' day')), ];
'publish_at' => date('Y-m-d H:i:s')
]); if (!setting_value('visiosoft.module.advs::show_finish_and_publish_date')) {
$update = array_merge($update, [
'finish_at' => date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s') . ' + ' . $defaultAdPublishTime . ' day')),
'publish_at' => date('Y-m-d H:i:s')
]);
}
$ad->update($update);
event(new ChangedStatusAd($ad));//Create Notify event(new ChangedStatusAd($ad));//Create Notify
} }

View File

@ -290,9 +290,12 @@ class AdvsController extends PublicController
if ($adv->cf_json) { if ($adv->cf_json) {
$tempFeatures = app('Visiosoft\CustomfieldsModule\Http\Controller\CustomFieldsController') $tempFeatures = app('Visiosoft\CustomfieldsModule\Http\Controller\CustomFieldsController')
->view($adv); ->view($adv);
$tempFeatures = array_values(array_filter($tempFeatures, function ($tempFeature) {
return !is_array($tempFeature['custom_field_value']);
}));
$features = array(); $features = array();
foreach ($listingCFs as $listingCF) { foreach ($listingCFs as $listingCF) {
if ($key = array_search($listingCF->slug, array_column($tempFeatures, 'slug'))) { if (($key = array_search($listingCF->slug, array_column($tempFeatures, 'slug'))) !== false) {
$features[$listingCF->slug] = $tempFeatures[$key]; $features[$listingCF->slug] = $tempFeatures[$key];
} }
} }
@ -844,11 +847,19 @@ class AdvsController extends PublicController
if (setting_value('visiosoft.module.advs::auto_approve') && $autoApprove) { if (setting_value('visiosoft.module.advs::auto_approve') && $autoApprove) {
$defaultAdPublishTime = setting_value('visiosoft.module.advs::default_published_time'); $defaultAdPublishTime = setting_value('visiosoft.module.advs::default_published_time');
$adv->update([
$update = [
'status' => 'approved', 'status' => 'approved',
'finish_at' => date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s') . ' + ' . $defaultAdPublishTime . ' day')), ];
'publish_at' => date('Y-m-d H:i:s')
]); if (!setting_value('visiosoft.module.advs::show_finish_and_publish_date')) {
$update = array_merge($update, [
'finish_at' => date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s') . ' + ' . $defaultAdPublishTime . ' day')),
'publish_at' => date('Y-m-d H:i:s')
]);
}
$adv->update($update);
} }
$form->render($this->request->update_id); $form->render($this->request->update_id);

View File

@ -1,7 +1,7 @@
<ul class="categories-list px-0 mr-2 d-block d-sm-none"> <ul class="categories-list px-0 mr-2 d-block d-sm-none">
<li class="categories-list-li category-icon text-truncate category-{{ main_category.slug }}"> <li class="categories-list-li category-icon text-truncate category-{{ main_category.slug }}">
<a href="{{ url_route('adv_list_seo', [main_category.slug]) }}" class="main-category"> <a href="{{ url_route('adv_list_seo', [main_category.slug]) }}" class="main-category">
{% set categoryIcon = (main_category.icon) ? main_category.icon : img('visiosoft.theme.base::images/default-categories-icon.png').url %} {% set categoryIcon = (main_category.icon) ? main_category.icon : img('visiosoft.module.advs::images/listing/sample-cat-icon.svg').url %}
<img src="{{ categoryIcon }}" alt="{{ main_category.name }}" class="img-responsive"> <img src="{{ categoryIcon }}" alt="{{ main_category.name }}" class="img-responsive">
<span>{{ main_category.name }}</span> <span>{{ main_category.name }}</span>
<p class="p-0 sub-categories"> <p class="p-0 sub-categories">

View File

@ -4,14 +4,14 @@ return [
'sitemap_dividing_number' => [ 'sitemap_dividing_number' => [
"type" => "anomaly.field_type.integer", "type" => "anomaly.field_type.integer",
"config" => [ "config" => [
"default_value" => 5000, "default_value" => 5000
] ]
], ],
"include_cities_sitemap" => [ "include_cities_sitemap" => [
"type" => "anomaly.field_type.boolean", "type" => "anomaly.field_type.boolean",
"config" => [ "config" => [
"default_value" => true, "default_value" => false,
"mode" => "checkbox", "mode" => "checkbox"
] ]
] ]
]; ];

View File

@ -33,4 +33,5 @@ return [
'please_wait' => 'Please wait.Deleting Sub Categories', 'please_wait' => 'Please wait.Deleting Sub Categories',
'category_selection' => 'Category Selection', 'category_selection' => 'Category Selection',
'go_to_parent' => 'Go To Parent', 'go_to_parent' => 'Go To Parent',
'preview' => 'Preview'
]; ];

View File

@ -30,7 +30,23 @@
{{ form.fields.slug|raw }} {{ form.fields.slug|raw }}
<input type="hidden" name="parent_category" <input type="hidden" name="parent_category"
value="{% if form.fields.parent_category.value.id is defined %}{{ form.fields.parent_category.value.id }}{% elseif app.request.get('parent') is defined %}{{ app.request.get('parent') }}{% endif %}"> value="{% if form.fields.parent_category.value.id is defined %}{{ form.fields.parent_category.value.id }}{% elseif app.request.get('parent') is defined %}{{ app.request.get('parent') }}{% endif %}">
{{ form.fields.icon|raw }} <div class="form-group icon-field input_file-field_type">
<label for="icon" class="control-label">
{{ form.fields.icon.label|raw }}
</label>
<p class="text-muted">
{{ form.fields.icon.instructions|raw }}
</p>
<div class="mb-1">
<span class="text-muted">
{{ trans('visiosoft.module.cats::field.preview') }}:
</span>
{{ form.fields.icon.value
? img(url(form.fields.icon.value)).width(24)|raw
: img('visiosoft.theme.base::images/default-categories-icon.png').width(24)|raw }}
</div>
{{ form.fields.icon.input|raw }}
</div>
{{ form.fields.seo_keyword|raw }} {{ form.fields.seo_keyword|raw }}
{{ form.fields.seo_description|raw }} {{ form.fields.seo_description|raw }}
</div><!-- section --> </div><!-- section -->

View File

@ -18,7 +18,7 @@
var imageCount = {{ field_type.value|length < setting_value('visiosoft.module.advs::ads_image_limit') var imageCount = {{ field_type.value|length < setting_value('visiosoft.module.advs::ads_image_limit')
? setting_value('visiosoft.module.advs::ads_image_limit') - field_type.value|length ? setting_value('visiosoft.module.advs::ads_image_limit') - field_type.value|length
: 0 }} : 0 }};
var settings_image = { var settings_image = {
'resize_width':"{{ setting_value('visiosoft.module.advs::full_image_width') }}", 'resize_width':"{{ setting_value('visiosoft.module.advs::full_image_width') }}",

View File

@ -0,0 +1,24 @@
<?php
use Anomaly\Streams\Platform\Database\Migration\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class VisiosoftModuleProfileEducationSortable extends Migration
{
public function up()
{
$this->streams()
->findBySlugAndNamespace('education', 'profile')
->setAttribute('sortable', true)
->save();
}
public function down()
{
$this->streams()
->findBySlugAndNamespace('education', 'profile')
->setAttribute('sortable', false)
->save();
}
}

View File

@ -66,6 +66,7 @@
margin-right: .75rem; margin-right: .75rem;
width: 1.5rem; width: 1.5rem;
height: 1.5rem; height: 1.5rem;
flex-shrink: 0;
path { path {
fill: rgb(80, 80, 80); fill: rgb(80, 80, 80);

View File

@ -6,6 +6,7 @@ use Anomaly\Streams\Platform\Model\Users\UsersUsersEntryModel;
use Anomaly\UsersModule\User\Contract\UserRepositoryInterface; use Anomaly\UsersModule\User\Contract\UserRepositoryInterface;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Visiosoft\AdvsModule\Adv\AdvModel; use Visiosoft\AdvsModule\Adv\AdvModel;
use Visiosoft\AdvsModule\Adv\Event\ChangeStatusAd; use Visiosoft\AdvsModule\Adv\Event\ChangeStatusAd;
use Visiosoft\AdvsModule\Status\Contract\StatusRepositoryInterface; use Visiosoft\AdvsModule\Status\Contract\StatusRepositoryInterface;
@ -56,14 +57,16 @@ class MyProfileController extends PublicController
compact('user', 'country', 'form', 'advs_count')); compact('user', 'country', 'form', 'advs_count'));
} }
public function detail(ProfileFormBuilder $form){ public function detail(ProfileFormBuilder $form)
$user = $this->userRepository->find(Auth::id()); {
$country = CountryModel::all(); $user = $this->userRepository->find(Auth::id());
return $this->view->make('visiosoft.module.profile::profile.detail', compact('user', 'country', 'form')); $country = CountryModel::all();
return $this->view->make('visiosoft.module.profile::profile.detail', compact('user', 'country', 'form'));
} }
public function password(){ public function password()
return $this->view->make('visiosoft.module.profile::profile.password'); {
return $this->view->make('visiosoft.module.profile::profile.password');
} }
public function extendAds($id, $type, SettingRepositoryInterface $settings) public function extendAds($id, $type, SettingRepositoryInterface $settings)
@ -272,7 +275,7 @@ class MyProfileController extends PublicController
public function changeEducation(Request $request) public function changeEducation(Request $request)
{ {
if ($request->info == 'education') { if ($request->info == 'education') {
$education = EducationPartModel::query()->where('education_id', $request->education)->get(); $education = EducationPartModel::query()->where('education_id', $request->education)->get()->sortBy('name');
} }
return response()->json(['data' => $education], 200); return response()->json(['data' => $education], 200);
} }

View File

@ -34,7 +34,6 @@ class ForgotPassFormHandler
$users->save($user); $users->save($user);
if (!is_null($user->gsm_phone)) { if (!is_null($user->gsm_phone)) {
event(new SendForgotPasswordSms($user, $password)); event(new SendForgotPasswordSms($user, $password));
$messages->success(trans('visiosoft.theme.base::message.send_forgot_sms'));
} else { } else {
$messages->error(trans('visiosoft.theme.base::message.found_phone')); $messages->error(trans('visiosoft.theme.base::message.found_phone'));
} }