Skip to content

Commit 179efd8

Browse files
committed
fix: update field change messages for better clarity and consistency
1 parent 98a88f7 commit 179efd8

File tree

5 files changed

+31
-9
lines changed

5 files changed

+31
-9
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@php
2+
$fromValue = $fromValue ? \Carbon\Carbon::parse($fromValue)->format('Y-m-d') : null;
3+
$toValue = $toValue ? \Carbon\Carbon::parse($toValue)->format('Y-m-d') : null;
4+
@endphp
5+
6+
@if($fromValue != null && $toValue != null)
7+
**`{{ $fieldName }}`** has been changed:
8+
- From **`{{ $fromValue }}`**
9+
- To **`{{ $toValue }}`**.
10+
@elseif ($toValue == null)
11+
The value of **`{{ $fieldName }}`** has been removed.
12+
@else
13+
**`{{ $fieldName }}`** has been set to **`{{ $toValue }}`**.
14+
@endif

resources/views/md/field_types/interation.blade.php renamed to resources/views/md/field_types/iteration.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- From **`{{ $fromValue }}`**
44
- To **`{{ $toValue }}`**.
55
@elseif ($toValue == null)
6-
**`{{ $fieldName }}`** has been removed from **`{{ $fromValue }}`**.
6+
The value of **`{{ $fieldName }}`** has been removed.
77
@else
88
**`{{ $fieldName }}`** has been set to **`{{ $toValue }}`**.
99
@endif
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@if($fromValue != null && $toValue != null)
2+
**`{{ $fieldName }}`** has been changed From **`{{ $fromValue }}`** To **`{{ $toValue }}`**.
3+
@elseif ($toValue == null)
4+
The value of **`{{ $fieldName }}`** has been removed.
5+
@else
6+
**`{{ $fieldName }}`** has been set to **`{{ $toValue }}`**.
7+
@endif

resources/views/md/field_types/single_select.blade.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
$fromColor = $fieldData['from']['color'] ?? null;
33
$toColor = $fieldData['to']['color'] ?? null;
44
@endphp
5+
56
@if($fromValue != null && $toValue != null)
6-
**`{{ $fieldName }}`** has been changed from $${\color{<?= $fromColor ?>}{{ $fromValue }}}$$ to $${\color{<?= $toColor ?>}{{ $toValue }}}$$.
7+
**`{{ $fieldName }}`** has been changed from $${\color{<?= $fromColor ?>}{{ $fromValue }}}$$ to $${\color{<?= $toColor ?>}{{ $toValue }}}$$.
78
@elseif ($toValue == null)
8-
**`{{ $fieldName }}`** has been removed from $${\color{<?= $fromColor ?>}{{ $fromValue }}}$$.
9+
The value of **`{{ $fieldName }}`** has been removed.
910
@else
10-
**`{{ $fieldName }}`** has been set to $${\color{<?= $toColor ?>}{{ $toValue }}}$$.
11+
**`{{ $fieldName }}`** has been set to $${\color{<?= $toColor ?>}{{ $toValue }}}$$.
1112
@endif
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
@if($fromValue != null && $toValue != null)
2-
**`{{ $fieldName }}`** has been changed:
3-
- From **`{{ $fromValue }}`**
4-
- To **`{{ $toValue }}`**.
2+
**`{{ $fieldName }}`** has been changed:
3+
- From **`{{ $fromValue }}`**
4+
- To **`{{ $toValue }}`**.
55
@elseif ($toValue == null)
6-
**`{{ $fieldName }}`** has been removed from **`{{ $fromValue }}`**.
6+
The value of **`{{ $fieldName }}`** has been removed.
77
@else
8-
**`{{ $fieldName }}`** has been set to **`{{ $toValue }}`**.
8+
**`{{ $fieldName }}`** has been set to **`{{ $toValue }}`**.
99
@endif

0 commit comments

Comments
 (0)