#2558 e-madencilik message bug

This commit is contained in:
Diatrex 2020-11-04 17:28:35 +03:00
parent 124af8de25
commit a20e7dfbb8
2 changed files with 10 additions and 1 deletions

View File

@ -56,5 +56,8 @@
</form>
</div>
</section>
{{ addBlock('post-cat/section') }}
{{ asset_add("scripts.js", "visiosoft.module.advs::js/cats.js") }}
{% endblock %}

View File

@ -801,7 +801,13 @@ class AdvsController extends PublicController
}
// Auto approve
if (setting_value('visiosoft.module.advs::auto_approve') && !$allowPendingAdCreation) {
$autoApprove = true;
if ($allowPendingAdCreation) {
$adLogExists = app('Visiosoft\PackagesModule\AdvsLog\Contract\AdvsLogRepositoryInterface')
->findByAdID($adv->id);
$autoApprove = $adLogExists ? false : true;
}
if (setting_value('visiosoft.module.advs::auto_approve') && $autoApprove) {
$defaultAdPublishTime = setting_value('visiosoft.module.advs::default_published_time');
$adv->update([
'status' => 'approved',