Skip to content

Commit 97be93f

Browse files
committed
fix: update single select field display logic in markdown views
1 parent 389b69b commit 97be93f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

resources/views/md/comment.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@php
22
$fieldName = $payload['projects_v2_item']['field_name'];
3-
$fromValue = $payload['from']['name'] ?? 'Unknown';
4-
$toValue = $payload['to']['name'] ?? 'Unknown';
3+
$fromValue = $payload['from']['name'] ?? null;
4+
$toValue = $payload['to']['name'] ?? null;
55
@endphp
66
@include(
77
'github-project::md.field_types.' . $payload['projects_v2_item']['field_type'],
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@if($fromValue != null)
2+
**{{ $fieldName }}** has been changed from $${\color{{{ $payload['from']['color'] }}}{{ $fromValue }}$$ to $${\color{{{ $payload['to']['color'] }}}{{ $toValue }}$$.
3+
@else
4+
**{{ $fieldName }}** has been set to $${\color{{{ $payload['to']['color'] }}}{{ $toValue }}$$.
5+
@endif

0 commit comments

Comments
 (0)