|
|
|
@@ -499,6 +499,13 @@ export default function AdminDashboard() { |
|
|
|
|
|
|
|
const handleSaveCard = async () => {
|
|
|
|
if (!isEditing) return;
|
|
|
|
|
|
|
|
// External Link: URL obbligatorio (feedback immediato, ribadito anche lato server)
|
|
|
|
if (isEditing.cardType === 'EXTERNAL_LINK' && !isEditing.actionUrl?.trim()) {
|
|
|
|
showToast("L'URL è obbligatorio per le card External Link", 'error');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
const generateSafeId = () => 'card-' + Date.now().toString(36) + Math.random().toString(36).substring(2);
|
|
|
|
const newCard = { ...isEditing, id: isEditing.id || generateSafeId() } as Card;
|
|
|
|
|
|
|
|
@@ -997,7 +1004,7 @@ export default function AdminDashboard() { |
|
|
|
{isEditing.cardType !== 'FULLSCREEN_LOCK' && (isEditing.cardType === 'EXTERNAL_LINK' ? (
|
|
|
|
<>
|
|
|
|
<div>
|
|
|
|
<label className="block text-sm font-semibold text-gray-800 mb-1">URL</label>
|
|
|
|
<label className="block text-sm font-semibold text-gray-800 mb-1">URL <span className="text-red-600">*</span></label>
|
|
|
|
<input
|
|
|
|
type="url"
|
|
|
|
maxLength={CARD_LIMITS.actionUrl}
|
|
|
|
|