Merge pull request #818 from openclassify/vedat

fixed status problem
This commit is contained in:
Fatih Alp 2020-11-25 15:44:06 +03:00 committed by GitHub
commit 95b501e484
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -391,7 +391,7 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
return $this->product_options_value;
}
public function status()
public function getStatus()
{
return $this->status;
}

View File

@ -84,5 +84,5 @@ interface AdvInterface extends EntryInterface
public function getProductOptionsValues();
public function status();
public function getStatus();
}

View File

@ -10,19 +10,19 @@ class AdvTableButtons
$builder->setButtons([
'status' => [
'text' => function (EntryInterface $entry) {
$text_type = ($entry->status() == 'approved') ? 'decline' : 'approve';
$text_type = ($entry->getStatus() == 'approved') ? 'decline' : 'approve';
return "<font class='hidden-xs-down'>" . trans('visiosoft.module.advs::button.' . $text_type) . "</font>";
},
'icon' => function (EntryInterface $entry) {
return ($entry->status() == 'approved') ? "fa fa-eye-slash" : "fa fa-eye";
return ($entry->getStatus() == 'approved') ? "fa fa-eye-slash" : "fa fa-eye";
},
'href' => function (EntryInterface $entry) {
$action_type = ($entry->status() == 'approved') ? 'declined' : 'approved';
$action_type = ($entry->getStatus() == 'approved') ? 'declined' : 'approved';
return "/admin/class/actions/{entry.id}/" . $action_type;
},
'type' => function (EntryInterface $entry) {
return ($entry->status() == 'approved') ? "danger" : "success";
return ($entry->getStatus() == 'approved') ? "danger" : "success";
},
],