mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
Merge pull request #839 from openclassify/dia
#2773 emlak24 edit all area
This commit is contained in:
commit
e9deba945c
@ -27,4 +27,6 @@ return [
|
||||
'ad_doesnt_exist' => "This ad doesn't exist!",
|
||||
'select_location_error' => "Please select a location on the map!",
|
||||
'this_ad_is_not_valid_anymore' => "This ad is not valid anymore!",
|
||||
'approve_status_change' => "Your Ad's Status Has Been Set to Active!",
|
||||
'passive_status_change' => "Your Ad's Status Has Been Set to Passive!",
|
||||
];
|
||||
|
||||
@ -484,7 +484,7 @@ class AdvsController extends PublicController
|
||||
|
||||
$adv = $this->adv_repository->getListItemAdv($id);
|
||||
|
||||
if ($adv && (!$adv->expired() || $adv->created_by_id === \auth()->id())) {
|
||||
if ($adv && ((!$adv->expired() && $adv->getStatus() === 'approved') || $adv->created_by_id === \auth()->id())) {
|
||||
// Check if created by exists
|
||||
if (!$adv->created_by) {
|
||||
$this->messages->error('visiosoft.module.advs::message.this_ad_is_not_valid_anymore');
|
||||
@ -980,7 +980,10 @@ class AdvsController extends PublicController
|
||||
|
||||
$this->adv_model->statusAds($id, $type);
|
||||
event(new ChangedStatusAd($ad));//Create Notify
|
||||
$this->messages->success(trans('streams::message.edit_success', ['name' => trans('visiosoft.module.advs::field.status.name')]));
|
||||
$message = $type === 'approved' ?
|
||||
trans('visiosoft.module.advs::message.approve_status_change')
|
||||
: trans('visiosoft.module.advs::message.passive_status_change');
|
||||
$this->messages->success($message);
|
||||
return back();
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user