Merge pull request 'fix: content property' (#5) from fix/content-property into main

Reviewed-on: #5
This commit was merged in pull request #5.
This commit is contained in:
2026-03-05 00:56:53 +00:00
2 changed files with 6 additions and 6 deletions

View File

@@ -22,9 +22,9 @@ const filteredCollections = computed(() => {
return props.collections.filter(collection => { return props.collections.filter(collection => {
if (props.type === 'calendar') { if (props.type === 'calendar') {
return collection.properties.contents?.event return collection.properties.content?.includes('event')
} else if (props.type === 'tasklist') { } else if (props.type === 'tasklist') {
return collection.properties.contents?.task return collection.properties.content?.includes('task')
} }
return true return true
}) })

View File

@@ -68,11 +68,11 @@ export const useChronoStore = defineStore('chronoStore', () => {
const entities = computed(() => entitiesStore.entities) const entities = computed(() => entitiesStore.entities)
const calendars = computed(() => { const calendars = computed(() => {
return collections.value.filter(col => col.properties.contents?.event) return collectionsStore.collections.filter(col => col.properties.content?.includes('event'))
}) })
const taskLists = computed(() => { const taskLists = computed(() => {
return collections.value.filter(col => col.properties.contents?.task) return collectionsStore.collections.filter(col => col.properties.content?.includes('task'))
}) })
const events = computed(() => { const events = computed(() => {
@@ -146,7 +146,7 @@ export const useChronoStore = defineStore('chronoStore', () => {
editingCollection.value = new CollectionObject() editingCollection.value = new CollectionObject()
editingCollection.value.properties.fromJson({ editingCollection.value.properties.fromJson({
...editingCollection.value.properties.toJson(), ...editingCollection.value.properties.toJson(),
contents: { event: true }, content: ['event'],
}) })
collectionEditorMode.value = 'create' collectionEditorMode.value = 'create'
collectionEditorType.value = 'calendar' collectionEditorType.value = 'calendar'
@@ -157,7 +157,7 @@ export const useChronoStore = defineStore('chronoStore', () => {
editingCollection.value = new CollectionObject() editingCollection.value = new CollectionObject()
editingCollection.value.properties.fromJson({ editingCollection.value.properties.fromJson({
...editingCollection.value.properties.toJson(), ...editingCollection.value.properties.toJson(),
contents: { task: true }, content: ['task'],
}) })
collectionEditorMode.value = 'create' collectionEditorMode.value = 'create'
collectionEditorType.value = 'tasklist' collectionEditorType.value = 'tasklist'