This commit is contained in:
vedatakd 2020-10-02 18:09:36 +03:00
commit 3943cf36dd
17 changed files with 500 additions and 188 deletions

View File

@ -4,7 +4,10 @@
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Visiosoft\\AdvsModule\\": "src/" "Visiosoft\\AdvsModule\\": "src/"
} },
"files": [
"src/Support/_helpers.php"
]
}, },
"require": { "require": {
"wirelab/language_switcher-plugin": "^1.3", "wirelab/language_switcher-plugin": "^1.3",

View File

@ -115,8 +115,11 @@
font-size: 13px; font-size: 13px;
} }
.result-text span:first-child { .result-text h1 {
font-weight: 500; font-size: 13px;
margin: 0;
line-height: 1.5;
max-width: 330px;
} }
.result-text span:last-child { .result-text span:last-child {
@ -124,6 +127,69 @@
font-weight: 500; font-weight: 500;
} }
.result-text .filter-tabs > div {
margin: 3px 16px 4px 0;
}
.result-text .filter-tabs div > span {
font-weight: 500;
color: #292d2e;
}
.result-text .filter-tabs a {
background-color: #eee;
font-size: 12px;
padding: 4px 7px;
border-radius: 2px;
text-decoration: none;
max-width: 400px;
}
.result-text .filter-tabs div:last-child a {
background-color: unset;
font-size: 10px;
padding: 0;
text-decoration: none;
color: #039;
}
.result-text .filter-tabs div:last-child a:hover {
text-decoration: underline;
}
.result-text .filter-tabs a:hover {
background-color: #e0e0e0;
}
.result-text .filter-tabs a span {
color: #666;
}
.result-text .filter-tabs a:hover span {
color: #444;
}
.result-text .filter-tabs a:hover button {
background-color: #CD7D22;
}
.result-text .filter-tabs a button {
height: 12px;
width: 12px;
background-color: #EC9C4A;
border-radius: 2px;
}
.result-text .filter-tabs a button:focus {
outline: none;
}
.result-text .filter-tabs a svg {
flex-shrink: 0;
height: 6px;
width: 6px;
}
a.sort-by-open-dropdown:hover { a.sort-by-open-dropdown:hover {
color: #8598AA !important; color: #8598AA !important;
} }

View File

@ -0,0 +1,2 @@
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" width="512" height="512" x="0" y="0" viewBox="0 0 512.001 512.001" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g><g xmlns="http://www.w3.org/2000/svg"><path d="m512.001 84.853-84.853-84.853-171.147 171.147-171.148-171.147-84.853 84.853 171.148 171.147-171.148 171.148 84.853 84.853 171.148-171.147 171.147 171.147 84.853-84.853-171.148-171.148z" fill="#ffffff" data-original="#000000" style="" class=""/></g></g></svg>

After

Width:  |  Height:  |  Size: 604 B

View File

@ -248,6 +248,9 @@ return [
'in_the_last_24_hours' => [ 'in_the_last_24_hours' => [
'name' => 'In The Last 24 Hours' 'name' => 'In The Last 24 Hours'
], ],
'in_the_last_day' => [
'name' => 'In The Last 24 Hours'
],
'in_the_last_week' => [ 'in_the_last_week' => [
'name' => 'In The Last Week' 'name' => 'In The Last Week'
], ],
@ -297,5 +300,10 @@ return [
// New create page // New create page
'options' => 'Options', 'options' => 'Options',
'free' => 'Free' 'free' => 'Free',
'ad_date' => 'Ad Date',
'photo_video' => 'Photo, Video',
'and_above' => 'and above',
'and_below' => 'and below',
'clear_all' => 'Clear All',
]; ];

View File

@ -19,15 +19,45 @@
</div> </div>
<div class="col-md-9"> <div class="col-md-9">
<div class="section recommended-classified"> <div class="section recommended-classified">
{% if catText %} <div class="result-text border d-none d-sm-block">
<div class="result-text border py-2 px-3 mb-3 d-none d-sm-block"> <div class="mx-3 py-2">
<p class="mb-0"> {% if catText %}
<span>"{{ catText }}"</span> <h1 class="d-inline text-truncate">
<span>{{ advs.total }} {{ trans('visiosoft.module.advs::field.ads')|lower }}</span> "{{ catText }}"
{{ trans('visiosoft.module.advs::field.were_found') }} </h1>
</p> {% endif %}
<span>
{{ advs.total }} {{ trans('visiosoft.module.advs::field.ads')|lower }}
</span>
{{ trans('visiosoft.module.advs::field.were_found') }}
</div> </div>
{% endif %}
{% if count(cFArray) %}
<div class="mx-3 border-top py-2 filter-tabs d-flex flex-wrap">
{% for customParam in cFArray %}
<div class="d-flex align-items-center">
<span class="mr-1">{{ customParam['name'] }}</span>
{% for customValue in customParam['value'] %}
<a href="{{ customValue['removalLink'] }}"
class="text-truncate d-flex align-items-center mr-1">
<span class="mr-2">{{ customValue['name'] }}</span>
<button class="border-0 d-flex align-items-center justify-content-center">
{{ img('visiosoft.module.advs::images/close.svg').data|raw }}
</button>
</a>
{% endfor %}
</div>
{% endfor %}
<div class="d-flex align-items-center">
<a href="{{ app.request.pathinfo }}"
class="text-truncate d-flex align-items-center mr-1">
{{ trans('visiosoft.module.advs::field.clear_all') }}
</a>
</div>
</div>
{% endif %}
</div>
<div class="row breadcrumb list-header"> <div class="row breadcrumb list-header">
<div class="col-md-6 my-2 d-none d-sm-block"> <div class="col-md-6 my-2 d-none d-sm-block">

View File

@ -100,17 +100,19 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
if (!empty($param['user'])) { if (!empty($param['user'])) {
$query = $query->where('advs_advs.created_by_id', $param['user']); $query = $query->where('advs_advs.created_by_id', $param['user']);
} }
if (!empty($param['min_price'])) { if (!empty($param['currency'])) {
$num = $param['min_price']; if (!empty($param['min_price'])) {
$int = (int)$num; $num = $param['min_price'];
$column = "JSON_EXTRACT(foreign_currencies, '$." . $param['currency'] . "') >=" . $int; $int = (int)$num;
$query = $query->whereRaw($column); $column = "JSON_EXTRACT(foreign_currencies, '$." . $param['currency'] . "') >=" . $int;
} $query = $query->whereRaw($column);
if (!empty($param['max_price'])) { }
$num = $param['max_price']; if (!empty($param['max_price'])) {
$int = (int)$num; $num = $param['max_price'];
$column = "JSON_EXTRACT(foreign_currencies, '$." . $param['currency'] . "') <=" . $int; $int = (int)$num;
$query = $query->whereRaw($column); $column = "JSON_EXTRACT(foreign_currencies, '$." . $param['currency'] . "') <=" . $int;
$query = $query->whereRaw($column);
}
} }
if (!empty($param['date'])) { if (!empty($param['date'])) {
if ($param['date'] === 'day') { if ($param['date'] === 'day') {
@ -147,22 +149,6 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
$query = app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->filterSearch($customParameters, $param, $query); $query = app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->filterSearch($customParameters, $param, $query);
} }
if (!empty($param['max_price'])) {
$num = $param['max_price'];
$int = (int)$num;
$column = "JSON_EXTRACT(foreign_currencies, '$." . $param['currency'] . "') <=" . $int;
$query = $query->whereRaw($column);
}
if (!empty($param['max_price'])) {
$num = $param['max_price'];
$int = (int)$num;
$column = "JSON_EXTRACT(foreign_currencies, '$." . $param['currency'] . "') <=" . $int;
$query = $query->whereRaw($column);
}
// //UPDATE `default_advs_advs` SET `coor` = (PointFromText('POINT(41.085022 28.804754)')) WHERE `default_advs_advs`.`id` = 8 // //UPDATE `default_advs_advs` SET `coor` = (PointFromText('POINT(41.085022 28.804754)')) WHERE `default_advs_advs`.`id` = 8
// //SELECT * FROM `default_advs_advs` WHERE ST_DISTANCE(ST_GeomFromText('POINT(41.0709052 28.829627)'), coor) < 20 // //SELECT * FROM `default_advs_advs` WHERE ST_DISTANCE(ST_GeomFromText('POINT(41.0709052 28.829627)'), coor) < 20

View File

@ -4,31 +4,25 @@ use Anomaly\SettingsModule\Setting\Contract\SettingRepositoryInterface;
use Anomaly\Streams\Platform\Http\Controller\PublicController; use Anomaly\Streams\Platform\Http\Controller\PublicController;
use Anomaly\Streams\Platform\Message\MessageBag; use Anomaly\Streams\Platform\Message\MessageBag;
use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel; use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel;
use Anomaly\Streams\Platform\Model\Advs\PurchasePurchaseEntryModel;
use Anomaly\Streams\Platform\Model\Complaints\ComplaintsComplainTypesEntryModel; use Anomaly\Streams\Platform\Model\Complaints\ComplaintsComplainTypesEntryModel;
use Anomaly\Streams\Platform\Model\Options\OptionsAdvertisementEntryModel;
use Anomaly\UsersModule\User\Contract\UserRepositoryInterface; use Anomaly\UsersModule\User\Contract\UserRepositoryInterface;
use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Cookie; use Illuminate\Support\Facades\Cookie;
use Visiosoft\AdvsModule\Adv\AdvModel; use Visiosoft\AdvsModule\Adv\AdvModel;
use Visiosoft\AdvsModule\Adv\Command\appendRequestURL;
use Visiosoft\AdvsModule\Adv\Contract\AdvRepositoryInterface; use Visiosoft\AdvsModule\Adv\Contract\AdvRepositoryInterface;
use Visiosoft\AdvsModule\Adv\Event\ChangedStatusAd; use Visiosoft\AdvsModule\Adv\Event\ChangedStatusAd;
use Visiosoft\AdvsModule\Adv\Event\CreatedAd; use Visiosoft\AdvsModule\Adv\Event\CreatedAd;
use Visiosoft\AdvsModule\Adv\Event\priceChange; use Visiosoft\AdvsModule\Adv\Event\priceChange;
use Visiosoft\AdvsModule\Adv\Event\showAdPhone; use Visiosoft\AdvsModule\Adv\Event\showAdPhone;
use Visiosoft\AdvsModule\Adv\Event\UpdateAd;
use Visiosoft\AdvsModule\Adv\Event\viewAd; use Visiosoft\AdvsModule\Adv\Event\viewAd;
use Visiosoft\AdvsModule\Adv\Form\AdvFormBuilder; use Visiosoft\AdvsModule\Adv\Form\AdvFormBuilder;
use Visiosoft\AdvsModule\Option\Contract\OptionRepositoryInterface; use Visiosoft\AdvsModule\Option\Contract\OptionRepositoryInterface;
use Visiosoft\AlgoliaModule\Search\SearchModel; use Visiosoft\AlgoliaModule\Search\SearchModel;
use Visiosoft\AlgoliatestModule\Http\Controller\Admin\IndexController;
use Visiosoft\CatsModule\Category\CategoryModel; use Visiosoft\CatsModule\Category\CategoryModel;
use Visiosoft\CatsModule\Category\Contract\CategoryRepositoryInterface; use Visiosoft\CatsModule\Category\Contract\CategoryRepositoryInterface;
use Visiosoft\CloudinaryModule\Video\VideoModel; use Visiosoft\CloudinaryModule\Video\VideoModel;
use Visiosoft\CommentsModule\Comment\Events\CreateNewComment;
use Visiosoft\FavsModule\Http\Controller\FavsController; use Visiosoft\FavsModule\Http\Controller\FavsController;
use Visiosoft\LocationModule\City\CityModel; use Visiosoft\LocationModule\City\CityModel;
use Visiosoft\LocationModule\City\CityRepository; use Visiosoft\LocationModule\City\CityRepository;
@ -36,11 +30,8 @@ use Visiosoft\LocationModule\Country\Contract\CountryRepositoryInterface;
use Visiosoft\LocationModule\District\DistrictModel; use Visiosoft\LocationModule\District\DistrictModel;
use Visiosoft\LocationModule\Neighborhood\NeighborhoodModel; use Visiosoft\LocationModule\Neighborhood\NeighborhoodModel;
use Visiosoft\LocationModule\Village\VillageModel; use Visiosoft\LocationModule\Village\VillageModel;
use Visiosoft\PackagesModule\Http\Controller\PackageFEController;
use Visiosoft\PackagesModule\Package\PackageModel; use Visiosoft\PackagesModule\Package\PackageModel;
use Visiosoft\ProfileModule\Adress\Contract\AdressRepositoryInterface; use Visiosoft\ProfileModule\Adress\Contract\AdressRepositoryInterface;
use Visiosoft\QrcontactModule\Qr\QrModel;
use Visiosoft\StoreModule\Ad\AdModel;
class AdvsController extends PublicController class AdvsController extends PublicController
{ {
@ -123,8 +114,8 @@ class AdvsController extends PublicController
$this->requestHttp = $request; $this->requestHttp = $request;
parent::__construct();
$this->optionRepository = $optionRepository; $this->optionRepository = $optionRepository;
parent::__construct();
} }
@ -153,10 +144,9 @@ class AdvsController extends PublicController
} }
if (isset($param['cat'])) { if (isset($param['cat'])) {
unset($param['cat']); unset($param['cat']);
return redirect($this->fullLink( return redirect(fullLink(
$param, $param,
route('adv_list_seo', [$categoryId->slug]), route('adv_list_seo', [$categoryId->slug])
array()
)); ));
} }
} elseif (isset($param['cat']) && !empty($param['cat'])) { // Only Param } elseif (isset($param['cat']) && !empty($param['cat'])) { // Only Param
@ -166,10 +156,9 @@ class AdvsController extends PublicController
return redirect('/'); return redirect('/');
} }
unset($param['cat']); unset($param['cat']);
return redirect($this->fullLink( return redirect(fullLink(
$param, $param,
route('adv_list_seo', [$categoryId->slug]), route('adv_list_seo', [$categoryId->slug])
array()
)); ));
} }
@ -186,23 +175,21 @@ class AdvsController extends PublicController
if (is_null($city) && $isOneCity) { // Param and no slug if (is_null($city) && $isOneCity) { // Param and no slug
$cityId = $this->cityRepository->find($param['city'][0]); $cityId = $this->cityRepository->find($param['city'][0]);
unset($param['city']); unset($param['city']);
return redirect($this->fullLink( return redirect(fullLink(
$param, $param,
route('adv_list_seo', [$categoryId->slug, $cityId->slug]), route('adv_list_seo', [$categoryId->slug, $cityId->slug])
array()
)); ));
} elseif ($isOneCity) { // Param and slug } elseif ($isOneCity) { // Param and slug
$cityId = $this->cityRepository->find($param['city'][0]); $cityId = $this->cityRepository->find($param['city'][0]);
if ($city !== $cityId->slug) { if ($city !== $cityId->slug) {
unset($param['city']); unset($param['city']);
return redirect($this->fullLink( return redirect(fullLink(
$param, $param,
route('adv_list_seo', [$categoryId->slug, $cityId->slug]), route('adv_list_seo', [$categoryId->slug, $cityId->slug])
array()
)); ));
} }
} elseif ($city && $isMultipleCity) { // Slug and multiple param cities } elseif ($city && $isMultipleCity) { // Slug and multiple param cities
return redirect($this->fullLink( return redirect(fullLink(
$param, $param,
route('adv_list_seo', [$categoryId->slug]), route('adv_list_seo', [$categoryId->slug]),
array() array()
@ -210,18 +197,16 @@ class AdvsController extends PublicController
} elseif ($city) { } elseif ($city) {
if (isset($param['city'][0]) && empty($param['city'][0])) { // Slug and empty param if (isset($param['city'][0]) && empty($param['city'][0])) { // Slug and empty param
unset($param['city']); unset($param['city']);
return redirect($this->fullLink( return redirect(fullLink(
$param, $param,
route('adv_list_seo', [$categoryId->slug]), route('adv_list_seo', [$categoryId->slug])
array()
)); ));
} else { // Only slug } else { // Only slug
$cityId = $this->cityRepository->findBy('slug', $city); $cityId = $this->cityRepository->findBy('slug', $city);
if (!$cityId) { if (!$cityId) {
return redirect($this->fullLink( return redirect(fullLink(
$param, $param,
route('adv_list_seo', [$categoryId->slug]), route('adv_list_seo', [$categoryId->slug])
array()
), 301); ), 301);
} }
} }
@ -244,10 +229,9 @@ class AdvsController extends PublicController
if ($advs->currentPage() > $advs->lastPage()) { if ($advs->currentPage() > $advs->lastPage()) {
unset($param['page']); unset($param['page']);
return redirect($this->fullLink( return redirect(fullLink(
$param, $param,
\request()->url(), \request()->url()
array()
), 301); ), 301);
} }
@ -293,6 +277,7 @@ class AdvsController extends PublicController
$allCats = true; $allCats = true;
} }
$cFArray = array();
if ($isActiveCustomFields) { if ($isActiveCustomFields) {
$returnvalues = app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->index($mainCats, $subCats); $returnvalues = app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->index($mainCats, $subCats);
$checkboxes = $returnvalues['checkboxes']; $checkboxes = $returnvalues['checkboxes'];
@ -302,6 +287,82 @@ class AdvsController extends PublicController
$selectImage = $returnvalues['selectImage']; $selectImage = $returnvalues['selectImage'];
$ranges = $returnvalues['ranges']; $ranges = $returnvalues['ranges'];
$radio = $returnvalues['radio']; $radio = $returnvalues['radio'];
$cFArray = app('Visiosoft\CustomfieldsModule\CustomField\Contract\CustomFieldRepositoryInterface')
->getCFParamValues($param);
}
$photoVideoParams = ['photo', 'video'];
$photoExists = false;
foreach ($photoVideoParams as $pV) {
if (\request()->{$pV} === 'true') {
$removalLink = array_filter($param, function ($singleParam) use ($pV) {
return $singleParam !== $pV;
}, ARRAY_FILTER_USE_KEY);
$removalLink = fullLink($removalLink, \request()->url());
if ($photoExists) {
$cFArray['photoVideo']['value'][] = [
'name' => trans('visiosoft.module.advs::field.ads_with_' . $pV . '.name'),
'removalLink' => $removalLink
];
} else {
$cFArray['photoVideo'] = [
'name' => trans('visiosoft.module.advs::field.photo_video'),
'value' => [
[
'name' => trans('visiosoft.module.advs::field.ads_with_' . $pV . '.name'),
'removalLink' => $removalLink
]
]
];
$photoExists = true;
}
}
}
if ($dateParam = \request()->date) {
$removalLink = array_filter($param, function ($singleParam) {
return $singleParam !== 'date';
}, ARRAY_FILTER_USE_KEY);
$removalLink = fullLink($removalLink, \request()->url());
$cFArray[] = [
'name' => trans('visiosoft.module.advs::field.ad_date'),
'value' => [
[
'name' => trans('visiosoft.module.advs::field.in_the_last_' . $dateParam . '.name'),
'removalLink' => $removalLink
]
]
];
}
$minPrice = \request()->min_price;
$maxPrice = \request()->max_price;
if ($minPrice || $maxPrice) {
$removalLink = array_filter($param, function ($singleParam) {
return $singleParam !== 'min_price' && $singleParam !== 'max_price' && $singleParam !== 'currency';
}, ARRAY_FILTER_USE_KEY);
$removalLink = fullLink($removalLink, \request()->url());
if ($minPrice && $maxPrice) {
$name = "$minPrice - $maxPrice";
} elseif ($minPrice) {
$name = "$minPrice " . trans('visiosoft.module.advs::field.and_above');
} elseif ($maxPrice) {
$name = "$maxPrice " . trans('visiosoft.module.advs::field.and_below');
}
$cFArray[] = [
'name' => trans('visiosoft.module.advs::field.price.name'),
'value' => [
[
'name' => $name,
'removalLink' => $removalLink
]
]
];
} }
Cookie::queue(Cookie::make('last_search', $this->requestHttp->getRequestUri(), 84000)); Cookie::queue(Cookie::make('last_search', $this->requestHttp->getRequestUri(), 84000));
@ -339,16 +400,11 @@ class AdvsController extends PublicController
$compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'param', $compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'param',
'user', 'featured_advs', 'viewType', 'topfields', 'selectDropdown', 'selectRange', 'selectImage', 'ranges', 'user', 'featured_advs', 'viewType', 'topfields', 'selectDropdown', 'selectRange', 'selectImage', 'ranges',
'seenList', 'radio', 'categoryId', 'cityId', 'allCats', 'catText'); 'seenList', 'radio', 'categoryId', 'cityId', 'allCats', 'catText', 'cFArray');
return $this->viewTypeBasedRedirect($viewType, $compact); return $this->viewTypeBasedRedirect($viewType, $compact);
} }
public function fullLink($request, $url, $newParameters)
{
return $this->dispatch(new appendRequestURL($request, $url, $newParameters));
}
public function viewTypeBasedRedirect($viewType, $compact) public function viewTypeBasedRedirect($viewType, $compact)
{ {
if (!$viewType) { if (!$viewType) {

View File

@ -0,0 +1,10 @@
<?php
use Illuminate\Contracts\Bus\Dispatcher;
use Visiosoft\AdvsModule\Adv\Command\appendRequestURL;
if (!function_exists('fullLink')) {
function fullLink($request, $url, $newParameters = array()) {
return app(Dispatcher::class)->dispatch(new appendRequestURL($request, $url, $newParameters));
}
}

View File

@ -1,5 +1,117 @@
.profile-section .nav-link.active { .profile-section {
background-color: #343a40 !important; .nav-tabs {
border-color: #343a40 #343a40 #343a40; border-bottom: 1px solid #dee2e6;
color: white!important; padding-bottom: 10px;
}
.nav-link {
border: none;
border-radius: 0;
font-size: 16px;
color: #BCBDC3;
padding: 0;
margin-bottom: 5px;
margin-top: 15px;
outline: none;
&.active {
font-size: 17px;
font-weight: bold;
color: #505050;
background-color: transparent;
svg path {
fill: rgba(#000, 1);
}
}
&:not(:last-child) {
border-right: 1px solid #dee2e6;
}
svg {
margin-right: 5px;
width: 15px;
path {
fill: rgba(#000, .4);
}
}
}
}
.tab-content {
color: #707070;
#nav-profile {
.username {
font-size: 19px;
font-weight: 600;
@media (max-width: 992px) {
justify-content: center;
}
}
.last-login {
font-weight: 400;
@media (max-width: 992px) {
justify-content: center;
}
}
img {
width: 165px;
height: 130px;
object-fit: cover;
border-radius: 20px;
@media (max-width: 992px) {
display: flex;
justify-content: center;
}
}
.profile--form--area {
display: flex;
justify-content: space-between;
@media (max-width: 992px) {
display: block;
}
.form-group {
width: 100%;
&:not(:last-child) {
margin-right: 10px;
}
input {
border-radius: 4px;
font-size: 13px;
border: 1px solid #E5E5E5;
@media (max-width: 992px) {
width: 100%;
}
}
}
}
.account--disable--content {
width: 80%;
height: 58px;
background-color: #f3f5f6;
border-radius: 20px;
margin-top: 50px;
padding: 10px;
font-size: .7em;
@media (max-width: 992px) {
width: 100%;
height: auto;
}
button {
font-size: 14px;
height: 34px;
}
}
}
} }

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="17.372" height="19.384" viewBox="0 0 17.372 19.384">
<path id="Path_6076" data-name="Path 6076" d="M6892.426,1441.155a.756.756,0,0,1-.183-.749l.905-2.98a.76.76,0,0,1,.189-.316l4.157-4.148a2.272,2.272,0,0,1,3.212,3.213l-4.148,4.14a.752.752,0,0,1-.333.194l-3.056.847a.756.756,0,0,1-.744-.2Zm2.116-3.107-.449,1.481,1.537-.426,2.789-2.783-1.071-1.071Zm4.023-4.014-.146.146,1.071,1.071.146-.146a.757.757,0,0,0-1.071-1.071Zm-11.537,7.35a3.033,3.033,0,0,1-3.029-3.028v-13.326a3.033,3.033,0,0,1,3.029-3.029h9.31a3.032,3.032,0,0,1,3.028,3.029v4.657a.757.757,0,0,1-1.515,0v-4.657a1.516,1.516,0,0,0-1.514-1.515h-9.31a1.517,1.517,0,0,0-1.515,1.515v13.326a1.516,1.516,0,0,0,1.515,1.514h2.532a.757.757,0,0,1,0,1.514Zm.753-7.269a.757.757,0,0,1,0-1.514h4.736a.757.757,0,0,1,0,1.514Zm0-3.029a.757.757,0,0,1,0-1.515h7.8a.757.757,0,1,1,0,1.515Zm0-3.029a.757.757,0,0,1,0-1.514h7.8a.757.757,0,1,1,0,1.514Z" transform="translate(-6883.999 -1422)" fill="#505050"/>
</svg>

After

Width:  |  Height:  |  Size: 998 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="17.372" height="19.384" viewBox="0 0 17.372 19.384">
<path id="Path_6076" data-name="Path 6076" d="M6892.426,1441.155a.756.756,0,0,1-.183-.749l.905-2.98a.76.76,0,0,1,.189-.316l4.157-4.148a2.272,2.272,0,0,1,3.212,3.213l-4.148,4.14a.752.752,0,0,1-.333.194l-3.056.847a.756.756,0,0,1-.744-.2Zm2.116-3.107-.449,1.481,1.537-.426,2.789-2.783-1.071-1.071Zm4.023-4.014-.146.146,1.071,1.071.146-.146a.757.757,0,0,0-1.071-1.071Zm-11.537,7.35a3.033,3.033,0,0,1-3.029-3.028v-13.326a3.033,3.033,0,0,1,3.029-3.029h9.31a3.032,3.032,0,0,1,3.028,3.029v4.657a.757.757,0,0,1-1.515,0v-4.657a1.516,1.516,0,0,0-1.514-1.515h-9.31a1.517,1.517,0,0,0-1.515,1.515v13.326a1.516,1.516,0,0,0,1.515,1.514h2.532a.757.757,0,0,1,0,1.514Zm.753-7.269a.757.757,0,0,1,0-1.514h4.736a.757.757,0,0,1,0,1.514Zm0-3.029a.757.757,0,0,1,0-1.515h7.8a.757.757,0,1,1,0,1.515Zm0-3.029a.757.757,0,0,1,0-1.514h7.8a.757.757,0,1,1,0,1.514Z" transform="translate(-6883.999 -1422)" fill="#505050"/>
</svg>

After

Width:  |  Height:  |  Size: 998 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16.974" height="19.397" viewBox="0 0 16.974 19.397">
<path id="Path_6075" data-name="Path 6075" d="M6887.03,1441.4a3.035,3.035,0,0,1-3.031-3.031v-6.213a3.035,3.035,0,0,1,3.031-3.031h.908v-2.672a4.547,4.547,0,0,1,9.092,0v2.672h.911a3.035,3.035,0,0,1,3.031,3.031v2.8a.758.758,0,0,1-1.516,0v-2.8a1.517,1.517,0,0,0-1.516-1.516H6887.03a1.517,1.517,0,0,0-1.516,1.516v6.213a1.517,1.517,0,0,0,1.516,1.515h10.911a1.517,1.517,0,0,0,1.516-1.515.758.758,0,0,1,1.516,0,3.035,3.035,0,0,1-3.031,3.031Zm2.424-14.947v2.672h6.062v-2.672a3.032,3.032,0,0,0-6.062,0Zm6.538,8.671a.784.784,0,1,1,.784.785A.784.784,0,0,1,6895.992,1435.121Zm-2.915,0a.785.785,0,1,1,.785.785A.785.785,0,0,1,6893.077,1435.121Zm-2.689,0a.731.731,0,1,1,.729.785A.758.758,0,0,1,6890.388,1435.121Zm-2.914,0a.785.785,0,1,1,.785.785A.785.785,0,0,1,6887.474,1435.121Z" transform="translate(-6883.999 -1422)" fill="#505050"/>
</svg>

After

Width:  |  Height:  |  Size: 930 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16.974" height="19.397" viewBox="0 0 16.974 19.397">
<path id="Path_6075" data-name="Path 6075" d="M6887.03,1441.4a3.035,3.035,0,0,1-3.031-3.031v-6.213a3.035,3.035,0,0,1,3.031-3.031h.908v-2.672a4.547,4.547,0,0,1,9.092,0v2.672h.911a3.035,3.035,0,0,1,3.031,3.031v2.8a.758.758,0,0,1-1.516,0v-2.8a1.517,1.517,0,0,0-1.516-1.516H6887.03a1.517,1.517,0,0,0-1.516,1.516v6.213a1.517,1.517,0,0,0,1.516,1.515h10.911a1.517,1.517,0,0,0,1.516-1.515.758.758,0,0,1,1.516,0,3.035,3.035,0,0,1-3.031,3.031Zm2.424-14.947v2.672h6.062v-2.672a3.032,3.032,0,0,0-6.062,0Zm6.538,8.671a.784.784,0,1,1,.784.785A.784.784,0,0,1,6895.992,1435.121Zm-2.915,0a.785.785,0,1,1,.785.785A.785.785,0,0,1,6893.077,1435.121Zm-2.689,0a.731.731,0,1,1,.729.785A.758.758,0,0,1,6890.388,1435.121Zm-2.914,0a.785.785,0,1,1,.785.785A.785.785,0,0,1,6887.474,1435.121Z" transform="translate(-6883.999 -1422)" fill="#505050"/>
</svg>

After

Width:  |  Height:  |  Size: 930 B

View File

@ -0,0 +1,5 @@
<svg id="social" xmlns="http://www.w3.org/2000/svg" width="19.395" height="19.395" viewBox="0 0 19.395 19.395">
<g id="Group_2839" data-name="Group 2839" transform="translate(0)">
<path id="Path_4053" data-name="Path 4053" d="M19.346,16.619a.758.758,0,0,0-1.483.309.792.792,0,0,1-.16.664.77.77,0,0,1-.606.288H2.3a.77.77,0,0,1-.606-.288.791.791,0,0,1-.16-.664A8.371,8.371,0,0,1,9.5,10.3q.1,0,.2,0t.2,0A8.334,8.334,0,0,1,16.63,14a.758.758,0,1,0,1.259-.844,9.855,9.855,0,0,0-5.106-3.88,5.152,5.152,0,1,0-6.167,0A9.854,9.854,0,0,0,.05,16.619,2.3,2.3,0,0,0,2.3,19.395H17.1a2.3,2.3,0,0,0,2.25-2.776ZM6.061,5.152A3.637,3.637,0,1,1,9.882,8.784l-.184,0-.183,0A3.641,3.641,0,0,1,6.061,5.152Z" transform="translate(0)" fill="#505050"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 745 B

View File

@ -0,0 +1,5 @@
<svg id="social" xmlns="http://www.w3.org/2000/svg" width="19.395" height="19.395" viewBox="0 0 19.395 19.395">
<g id="Group_2839" data-name="Group 2839" transform="translate(0)">
<path id="Path_4053" data-name="Path 4053" d="M19.346,16.619a.758.758,0,0,0-1.483.309.792.792,0,0,1-.16.664.77.77,0,0,1-.606.288H2.3a.77.77,0,0,1-.606-.288.791.791,0,0,1-.16-.664A8.371,8.371,0,0,1,9.5,10.3q.1,0,.2,0t.2,0A8.334,8.334,0,0,1,16.63,14a.758.758,0,1,0,1.259-.844,9.855,9.855,0,0,0-5.106-3.88,5.152,5.152,0,1,0-6.167,0A9.854,9.854,0,0,0,.05,16.619,2.3,2.3,0,0,0,2.3,19.395H17.1a2.3,2.3,0,0,0,2.25-2.776ZM6.061,5.152A3.637,3.637,0,1,1,9.882,8.784l-.184,0-.183,0A3.641,3.641,0,0,1,6.061,5.152Z" transform="translate(0)" fill="#505050"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 745 B

View File

@ -1,5 +1,11 @@
{% extends "theme::layouts/default" %} {% extends "theme::layouts/default" %}
{% block styles %}
<style>
{{ asset_inline("visiosoft.module.profile::assets/css/profile.scss") }}
</style>
{% endblock %}
{% block content %} {% block content %}
{% embed 'visiosoft.module.profile::profile/index' %} {% embed 'visiosoft.module.profile::profile/index' %}
{% block detail %} {% block detail %}
@ -12,45 +18,26 @@
<div class="row px-3"> <div class="row px-3">
<!-- User Profile Detail Section-->
<div class="col-md-12 bg-dark">
<div class="row">
<div class="col-md-4 p-5">
<div class="row">
{% if setting_value('visiosoft.module.profile::upload_avatar') %}
<div class="col-md-12 text-center align-middle">
<img src="{{ profile_photo }}" class="img-responsive w-100"
style="max-width: 150px">
</div>
{% endif %}
<div class="col-md-12 text-center align-middle text-white p-2 text-truncate">
<h3>{{ user.name }}</h3>
<small>{{ auth_user().last_login_at|date("d/m/Y H:i:s") }}</small>
</div>
</div>
</div>
</div>
</div>
<!-- User Profile Detail Section-->
<!-- User Profile Form Section--> <!-- User Profile Form Section-->
<div class="col-md-12 mt-5 bg-light profile-section pb-4"> <div class="col-md-12 bg-light profile-section pb-4">
<nav> <nav>
<div class="nav nav-tabs nav-fill" id="nav-tab" role="tablist"> <div class="nav nav-tabs nav-fill" id="nav-tab" role="tablist">
<a class="nav-item nav-link active text-dark" id="nav-profile-tab" data-toggle="tab" <a class="nav-item nav-link active text-dark d-flex justify-content-center align-items-center" id="nav-profile-tab" data-toggle="tab"
href="#nav-profile" href="#nav-profile"
role="tab" aria-controls="nav-profile" aria-selected="true"> role="tab" aria-controls="nav-profile" aria-selected="true">
{{ img('visiosoft.module.profile::images/profile2.svg').data|raw }}
{{ trans('visiosoft.module.profile::field.profile.name') }} {{ trans('visiosoft.module.profile::field.profile.name') }}
</a> </a>
<a class="nav-item nav-link text-dark" id="nav-details-tab" data-toggle="tab" <a class="nav-item nav-link text-dark d-flex justify-content-center align-items-center" id="nav-details-tab" data-toggle="tab"
href="#nav-details" href="#nav-details"
role="tab" aria-controls="nav-details" aria-selected="false"> role="tab" aria-controls="nav-details" aria-selected="false">
{{ img('visiosoft.module.profile::images/detail2.svg').data|raw }}
{{ trans('visiosoft.module.profile::field.details.name') }} {{ trans('visiosoft.module.profile::field.details.name') }}
</a> </a>
<a class="nav-item nav-link text-dark" id="nav-password-tab" data-toggle="tab" <a class="nav-item nav-link text-dark d-flex justify-content-center align-items-center" id="nav-password-tab" data-toggle="tab"
href="#nav-password" href="#nav-password"
role="tab" aria-controls="nav-password" aria-selected="false"> role="tab" aria-controls="nav-password" aria-selected="false">
{{ img('visiosoft.module.profile::images/password2.svg').data|raw }}
{{ trans('visiosoft.module.profile::field.password.name') }} {{ trans('visiosoft.module.profile::field.password.name') }}
</a> </a>
{{ addBlock('profile/detail/content-tab')|raw }} {{ addBlock('profile/detail/content-tab')|raw }}
@ -63,103 +50,130 @@
<div> <div>
{% set userForm = form('userProfile').entry(user.id).get() %} {% set userForm = form('userProfile').entry(user.id).get() %}
{{ userForm.open()|raw }} {{ userForm.open()|raw }}
<div class="form-group"> <div class="mt-4 d-flex profile--desc flex-column flex-lg-row text-lg-center">
<label class="control-label font-weight-bold"> <div class="d-flex d-sm-block m-auto m-sm-0 mr-sm-3">
{{ trans("visiosoft.module.profile::field.first_name.name") }} <img src="{{ profile_photo }}">
</label> </div>
{{ userForm.fields.first_name.input|raw }} <div class="pt-2 d-flex flex-column flex-sm-row d-sm-block m-auto m-sm-0">
<p class="mb-1 username">{{ user.name }}</p>
<p class="mb-1 last-login d-flex d-sm-block m-auto m-sm-0">{{ auth_user().last_login_at|date("d.m.Y - H:i") }}</p>
</div>
</div> </div>
<div class="form-group"> <div class="mt-4">
<label class="control-label font-weight-bold"> <div class="profile--form--area">
{{ trans("visiosoft.module.profile::field.last_name.name") }} <div class="form-group">
</label> <label class="control-label font-weight-bold">
{{ userForm.fields.last_name.input|raw }} {{ trans("visiosoft.module.profile::field.first_name.name") }}
</div> </label>
<div class="form-group"> {{ userForm.fields.first_name.input|raw }}
<label class="control-label font-weight-bold">
{{ trans("visiosoft.module.profile::field.email.name") }}
</label>
{{ userForm.fields.email.input|raw }}
</div>
<div class="form-group">
{{ userForm.actions|raw }}
</div>
{{ userForm.close()|raw }}
<div class="d-flex align-items-center justify-content-between flex-wrap">
<label class="text-muted">
{{ trans('visiosoft.module.profile::message.disable_account') }}
</label>
<button type="button" class="btn btn-danger"
onclick="window.location.href='/profile/closeAccount'">
{{ trans("visiosoft.module.profile::field.disable_account.name") }}
</button>
</div> </div>
<div class="form-group">
<label class="control-label font-weight-bold">
{{ trans("visiosoft.module.profile::field.last_name.name") }}
</label>
{{ userForm.fields.last_name.input|raw }}
</div>
<div class="form-group">
<label class="control-label font-weight-bold">
{{ trans("visiosoft.module.profile::field.email.name") }}
</label>
{{ userForm.fields.email.input|raw }}
</div>
</div>
<div class="form-group text-right">
{{ userForm.actions|raw }}
</div>
<div class="account--disable--content d-flex align-item-center justify-content-center mx-auto">
<div class="d-flex justify-content-center align-items-center">
<p class="mb-0 mr-4">
{{ trans('visiosoft.module.profile::message.disable_account') }}
</p>
<a href="{{ url_route("visiosoft.module.profile::profile_close_account") }}" class="btn btn-danger text-white">
{{ trans("visiosoft.module.profile::field.disable_account.name") }}
</a>
</div>
</div>
</div>
</div> </div>
</div> </div>
<div class="tab-pane fade" id="nav-details" role="tabpanel" <div class="tab-pane fade" id="nav-details" role="tabpanel"
aria-labelledby="nav-details-tab"> aria-labelledby="nav-details-tab">
<div class="col-12"> {% set profileForm = form('profile').entry(user.id).get() %}
{% set profileForm = form('profile').entry(user.id).get() %} {{ profileForm.open()|raw }}
<div class="row">
{{ profileForm.open()|raw }} <div class="col-md-12">
{% if setting_value('visiosoft.module.profile::upload_avatar') %}
{% if setting_value('visiosoft.module.profile::upload_avatar') %} <div class="form-group">
<div class="form-group"> {{ profileForm.fields.file|raw }}
{{ profileForm.fields.file|raw }} </div>
{% endif %}
</div>
<div class="col-md-6">
<div class=" form-group">
<label class="control-label font-weight-bold">{{ trans("visiosoft.module.profile::field.identification_number.name") }}</label>
{{ profileForm.fields.identification_number.input|raw }}
</div>
</div>
<div class="col-md-6">
<div class="form-group required-profile-phone-field">
<label class="control-label font-weight-bold">
{{ profileForm.fields.gsm_phone.label }}
</label>
{{ profileForm.fields.gsm_phone.input|raw }}
</div>
</div>
<div class="col-md-6">
<div class="form-group required-profile-phone-field">
<label class="control-label font-weight-bold">
{{ profileForm.fields.office_phone.label }}
</label>
{{ profileForm.fields.office_phone.input|raw }}
</div>
</div>
<div class="col-md-6">
<div class="form-group required-profile-phone-field">
<label class="control-label font-weight-bold">
{{ profileForm.fields.land_phone.label }}
</label>
{{ profileForm.fields.land_phone.input|raw }}
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label class="control-label font-weight-bold">{{ trans("visiosoft.module.profile::field.register_type.name") }}</label>
{{ profileForm.fields.register_type.input|raw }}
</div>
</div>
<div class="col-md-12 text-right">
<div class="form-group">
{{ profileForm.actions|raw }}
</div> </div>
{% endif %}
<div class="form-group required-profile-phone-field">
<label class="control-label font-weight-bold">
{{ profileForm.fields.gsm_phone.label }}
</label>
{{ profileForm.fields.gsm_phone.input|raw }}
</div> </div>
<div class="form-group required-profile-phone-field">
<label class="control-label font-weight-bold">
{{ profileForm.fields.office_phone.label }}
</label>
{{ profileForm.fields.office_phone.input|raw }}
</div>
<div class="form-group required-profile-phone-field">
<label class="control-label font-weight-bold">
{{ profileForm.fields.land_phone.label }}
</label>
{{ profileForm.fields.land_phone.input|raw }}
</div>
<div class=" form-group">
<label class="control-label font-weight-bold">{{ trans("visiosoft.module.profile::field.identification_number.name") }}</label>
{{ profileForm.fields.identification_number.input|raw }}
</div>
<div class="form-group">
<label class="control-label font-weight-bold">{{ trans("visiosoft.module.profile::field.register_type.name") }}</label>
{{ profileForm.fields.register_type.input|raw }}
</div>
<div class="form-group">
{{ profileForm.actions|raw }}
</div>
{{ profileForm.close()|raw }}
</div> </div>
{{ profileForm.close()|raw }}
</div> </div>
<div class="tab-pane fade" id="nav-password" role="tabpanel" aria-labelledby="nav-password-tab"> <div class="tab-pane fade" id="nav-password" role="tabpanel" aria-labelledby="nav-password-tab">
{% set passwordForm = form('updatePassword').get() %} {% set passwordForm = form('updatePassword').get() %}
{{ passwordForm.open()|raw }} {{ passwordForm.open()|raw }}
<div class="row">
<div class="form-group"> <div class="col-md-6">
<label class="font-weight-bold">{{ trans("visiosoft.module.profile::field.new_password.name") }}</label> <div class="form-group">
{{ passwordForm.fields.new_password.input|raw }} <label class="font-weight-bold">{{ trans("visiosoft.module.profile::field.new_password.name") }}</label>
{{ passwordForm.fields.new_password.input|raw }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="font-weight-bold">{{ trans("visiosoft.module.profile::field.re_new_password.name") }}</label>
{{ passwordForm.fields.re_new_password.input|raw }}
</div>
</div>
</div> </div>
<div class="form-group text-right">
<div class="form-group">
<label class="font-weight-bold">{{ trans("visiosoft.module.profile::field.re_new_password.name") }}</label>
{{ passwordForm.fields.re_new_password.input|raw }}
</div>
<div class="form-group">
{{ passwordForm.actions|raw }} {{ passwordForm.actions|raw }}
</div> </div>
</div> </div>

View File

@ -94,7 +94,10 @@ class ProfileModuleServiceProvider extends AddonServiceProvider
'profile/class/status/{id},{type}' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@statusAds', 'profile/class/status/{id},{type}' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@statusAds',
'profile/class/extendTime/{id},{type}' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@extendAds', 'profile/class/extendTime/{id},{type}' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@extendAds',
'profile/message/show/{id}' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@showMessage', 'profile/message/show/{id}' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@showMessage',
'profile/closeAccount' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@disableAccount', 'profile/close-account' => [
'as' => 'visiosoft.module.profile::profile_close_account',
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@disableAccount'
],
'profile/notification' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@notification', 'profile/notification' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@notification',
'ajax/update-user-info' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@updateAjaxProfile', 'ajax/update-user-info' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@updateAjaxProfile',