Hi All,
I am designing an integration module to sync contacts and calendars from an external system. I am currently in the process of creating the configuration screen, and I need some advice on how to code the configuration interface as I am pretty new to NC and Vue development. I am currently stuck on how to use vue to produce the result I am looking for.
My source data comes from 3 arrays:
- availableRemoteCollections (columns: id, name, count)
- availableLocalCollections (columns: id, name, uri)
- linkedCollections (columns: remoteId, localId)
What I am trying to produce is a list of remote collections with a NcActionRadio list of local collections that can be linked to the remote ones. I am partially there (see image below).
What I am struggling with is how to:
- How to properly bind the NcActionRadio options to the array (id and name)
- How to use the bind and update:checkedto trigger my linking function
- How to disable the NcActionRadio options if they have already been selected for on another line (exist in linkedCollections array)
Here is the code I have so far:
<ul v-if="availableRemoteContactCollections.length > 0">
	<li v-for="ritem in availableRemoteContactCollections" :key="ritem.id" class="ews-collectionlist-item">
		<ContactIcon />
		<label>
			{{ ritem.name }} ({{ ritem.count }} Contacts)
		</label>
		<NcActions>
			<template #icon>
				<LinkIcon />
			</template>
			<template v-for="litem in availableLocalContactCollections">
				<NcActionRadio>
					{{ litem.name }}
				</NcActionRadio>
			</template>
		</NcActions>
	</li>
</ul>
Thank you in advance for any advice!
Sebastian
