Add cutting month and date of purchase to sorting list

This commit is contained in:
Daniel Brendel
2025-10-15 02:00:20 +02:00
parent f58a78991d
commit 6733f09b42
13 changed files with 39 additions and 11 deletions

View File

@@ -401,6 +401,8 @@ class UtilsModule {
return date('Y-m-d', strtotime($content));
} else if ($type === 'last_fertilised') {
return date('Y-m-d', strtotime($content));
} else if ($type === 'date_of_purchase') {
return date('Y-m-d', strtotime($content));
} else if ($type === 'health_state') {
return __('app.' . $content);
} else if (($type === 'perennial') || ($type === 'annual') || ($type === 'hardy')) {
@@ -413,6 +415,8 @@ class UtilsModule {
return __('app.' . $content);
} else if ($type === 'humidity') {
return $content . '%';
} else if ($type === 'cutting_month') {
return UtilsModule::getMonthList()[$content];
} else {
return $content;
}