diff --git a/resources/views/livewire/molecule-history-timeline.blade.php b/resources/views/livewire/molecule-history-timeline.blade.php index 27da7e88..702cb219 100644 --- a/resources/views/livewire/molecule-history-timeline.blade.php +++ b/resources/views/livewire/molecule-history-timeline.blade.php @@ -34,26 +34,46 @@ @switch(explode('.',$column_name)[0]) @case('comment') - {{$column_values['new_value'][0]['comment'] ?? 'N/A'}} + {{$column_values['new_value'][0]['comment'] ?? 'N/A'}} @break @case('active') - @if ($column_values['new_value']) - Activated - @else - Deactivated - @endif + @if ($column_values['new_value']) + Activated + @else + Deactivated + @endif @break @case('created') - Initial creation of the compound on COCONUT + Initial creation of the compound on COCONUT @break @case('organisms') @case('sampleLocations') - Detached from:
{{$column_values['old_value']?:'N/A'}}
- Attached to:
{{$column_values['new_value']?:'N/A'}}
+ @if ($column_values['old_value']) + Detached from:
{{$column_values['old_value']?:'N/A'}}
+ @endif + @if ($column_values['new_value']) + Attached to:
{{$column_values['new_value']?:'N/A'}}
+ @endif + @break + @case('synonyms') + @if (array_diff($column_values['old_value'], $column_values['new_value'])) + Removed:
{{implode(', ',array_diff($column_values['old_value'], $column_values['new_value']))}}
+ @endif + @if (array_diff($column_values['new_value'], $column_values['old_value'])) + Added:
{{implode(', ',array_diff($column_values['new_value'], $column_values['old_value']))}}
+ @endif + @break + @case('cas') + @if (array_diff($column_values['old_value'], $column_values['new_value'])) + Removed:
{{implode(', ',array_diff($column_values['old_value'], $column_values['new_value']))}}
+ @endif + @if (array_diff($column_values['new_value'], $column_values['old_value'])) + Added:
{{implode(', ',array_diff($column_values['new_value'], $column_values['old_value']))}}
+ @endif @break @default - Old Value:
{{$column_values['old_value']??'N/A'}}
- New Value:
{{$column_values['new_value']??'N/A'}} + Old Value:
{{$column_values['old_value']??'N/A'}}
+ New Value:
{{$column_values['new_value']??'N/A'}} @endswitch