[admin] add grant props

This commit is contained in:
xiaomlove
2022-08-11 17:12:36 +08:00
parent 72908e38f4
commit 9332b676b4
18 changed files with 156 additions and 18 deletions
+9
View File
@@ -42,4 +42,13 @@ class NexusModel extends Model
return $d && $d->format($format) === $date;
}
public function getDeadlineText($field = 'deadline')
{
$raw = $this->getRawOriginal($field);
if (in_array($raw, [null, '0000-00-00 00:00:00', ''], true)) {
return nexus_trans("label.permanent");
}
return sprintf('%s: %s', nexus_trans('label.deadline'), $raw);
}
}