This commit is contained in:
einhornimmond 2025-03-04 17:08:06 +01:00
parent 096dd9586d
commit daddb5b63a

View File

@ -49,7 +49,7 @@
</template>
<script setup>
import { computed, watch, ref } from 'vue'
import { computed, watch } from 'vue'
import { useQuery } from '@vue/apollo-composable'
import { useStore } from 'vuex'
import { useAppToast } from '@/composables/useToast'
@ -62,20 +62,12 @@ const { result, loading, refetch, error } = useQuery(projectBrandingsQuery, null
fetchPolicy: 'network-only',
})
const projectBrandings = ref([])
const projectBrandings = computed(() => result.value?.projectBrandings || [])
const isAddButtonDisabled = computed(() => {
return projectBrandings.value.some((item) => item.id === undefined)
})
watch(
result,
() => {
projectBrandings.value = result.value?.projectBrandings || []
},
{ immediate: true },
)
function createEntry() {
projectBrandings.value.push({
id: undefined,