Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/php8' into php8
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomlove committed Jul 11, 2024
2 parents 389bd54 + 84c6f6c commit 08df2d6
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
14 changes: 13 additions & 1 deletion app/Filament/Resources/User/ExamUserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public static function table(Table $table): Table
->formatStateUsing(fn ($record) => new HtmlString(get_username($record->uid, false, true, true, true)))
,
Tables\Columns\TextColumn::make('exam.name')->label(__('label.exam.label')),
Tables\Columns\TextColumn::make('exam.typeText')->label(__('exam.type')),
Tables\Columns\TextColumn::make('begin')->label(__('label.begin'))->dateTime(),
Tables\Columns\TextColumn::make('end')->label(__('label.end'))->dateTime(),
Tables\Columns\BooleanColumn::make('is_done')->label(__('label.exam_user.is_done')),
Expand All @@ -78,9 +79,20 @@ public static function table(Table $table): Table
return $query->when($data['uid'], fn (Builder $query, $uid) => $query->where("uid", $uid));
})
,
Tables\Filters\SelectFilter::make('exam_type')
->options(Exam::listTypeOptions())
->label(__('exam.type'))
->query(function (Builder $query, array $data) {
$query->when($data['value'], function (Builder $query) use ($data) {
$query->whereHas("exam", function (Builder $query) use ($data) {
$query->where("type", $data['value']);
});
});
})
,
Tables\Filters\SelectFilter::make('exam_id')
->options(Exam::query()->pluck('name', 'id')->toArray())
->label(__('exam.label'))
->label(__('label.exam.label'))
,
Tables\Filters\SelectFilter::make('status')->options(ExamUser::listStatus(true))->label(__("label.status")),
Tables\Filters\SelectFilter::make('is_done')->options(['0' => 'No', '1' => 'yes'])->label(__('label.exam_user.is_done')),
Expand Down
2 changes: 1 addition & 1 deletion include/constants.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.12');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-07-06');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-07-10');
defined('IN_TRACKER') || define('IN_TRACKER', false);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
Expand Down
2 changes: 1 addition & 1 deletion public/task.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
$claimClass, $row->id, $claimBtnText, $claimDisabled
);
$columns = [];
$columns[] = sprintf('<td><strong>%s</strong></td>', $row->name);
$columns[] = sprintf('<td class="nowrap"><strong>%s</strong></td>', $row->name);
$columns[] = sprintf('<td>%s</td>', $row->indexFormatted);
$columns[] = sprintf('<td>%s</td>', $row->getBeginForUser());
$columns[] = sprintf('<td>%s</td>', $row->getEndForUser());
Expand Down
2 changes: 1 addition & 1 deletion resources/lang/en/label.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
'label' => 'User medal',
],
'exam' => [
'label' => 'Exam',
'label' => 'Exam & Task',
'is_done' => 'Is done',
'is_discovered' => 'Discovered',
'register_time_range' => [
Expand Down
2 changes: 1 addition & 1 deletion resources/lang/zh_CN/label.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
'label' => '用户勋章',
],
'exam' => [
'label' => '考核',
'label' => '考核 & 任务',
'is_done' => '是否完成',
'is_discovered' => '自动发现',
'register_time_range' => [
Expand Down
2 changes: 1 addition & 1 deletion resources/lang/zh_TW/label.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
'label' => '用戶勛章',
],
'exam' => [
'label' => '考核',
'label' => '考核 & 任務',
'is_done' => '是否完成',
'is_discovered' => '自動發現',
'register_time_range' => [
Expand Down

0 comments on commit 08df2d6

Please sign in to comment.