1 parent bc1aa3b commit 0d9b486Copy full SHA for 0d9b486
1 file changed
resources/views/profile/edit.blade.php
@@ -298,8 +298,15 @@
298
299
const index = accounts.findIndex(acc => acc.name === account.name);
300
if (index !== -1) {
301
- accounts[index] = { ...accounts[index], enabled: $event };
+ // Update existing account
302
+ accounts[index] = {
303
+ ...accounts[index],
304
+ enabled: $event,
305
+ // Update enabled_at when re-enabling
306
+ enabled_at: $event ? new Date().toISOString() : accounts[index].enabled_at
307
+ };
308
} else {
309
+ // Create new account
310
const newAccount = {
311
name: account.name,
312
description: account.description,
0 commit comments