feat: refine content calendar experience

This commit is contained in:
2026-05-05 23:25:58 -04:00
parent b66c10b681
commit a7535d460d
72 changed files with 3233 additions and 1310 deletions

View File

@@ -128,6 +128,29 @@ export const useCalendarIntegrationsStore = defineStore('calendar-integrations',
}
}
async function updateSource(sourceId, payload) {
if (!sourceId) {
return null;
}
error.value = null;
try {
const response = await client.put(`/api/calendar-integrations/sources/${sourceId}`, payload);
const updatedSource = response.data;
if (updatedSource) {
sources.value = sources.value.map(source =>
source.id === updatedSource.id ? updatedSource : source
);
}
return updatedSource;
} catch (updateError) {
console.error('Failed to update calendar source:', updateError);
error.value = 'Failed to update calendar source.';
throw updateError;
}
}
async function refreshSource(sourceId) {
if (!sourceId) {
return null;
@@ -176,6 +199,7 @@ export const useCalendarIntegrationsStore = defineStore('calendar-integrations',
fetchEvents,
searchCatalog,
createSource,
updateSource,
refreshSource,
toggleSourceVisibility,
};