add updated_at fields

This commit is contained in:
2025-05-26 11:10:42 +02:00
parent 28db52dc2e
commit 5cd9d65e00
8 changed files with 438 additions and 4 deletions

View File

@@ -158,6 +158,15 @@ const ShopList: React.FC = () => {
</svg>
Added {new Date(shop.created_at).toLocaleDateString()}
</div>
{shop.updated_at && (
<div className="flex items-center text-sm text-gray-600">
<svg className="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
</svg>
Updated {new Date(shop.updated_at).toLocaleDateString()}
</div>
)}
</div>
</div>
))}

View File

@@ -133,9 +133,17 @@ const ShoppingEventList: React.FC = () => {
)}
<div className="flex justify-between items-center text-sm">
<span className="text-gray-500">
Event #{event.id} {new Date(event.created_at).toLocaleDateString()}
</span>
<div className="text-gray-500">
<div>Event #{event.id} Created {new Date(event.created_at).toLocaleDateString()}</div>
{event.updated_at && (
<div className="flex items-center mt-1">
<svg className="w-3 h-3 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
</svg>
Updated {new Date(event.updated_at).toLocaleDateString()}
</div>
)}
</div>
<div className="flex space-x-2">
<button
onClick={() => navigate(`/shopping-events/${event.id}/edit`)}