Skip to content

Commit 951132a

Browse files
committed
updated all files to use new naming convention
1 parent 3c3b8e8 commit 951132a

65 files changed

Lines changed: 698 additions & 698 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/components/cards/ApplicationCard.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
<DotsHorizontal :size="20" />
1515
</template>
1616
<NcActionButton close-after-click
17-
@click="applicationStore.setApplicationItem(item); navigationStore.setModal('editApplication')">
17+
@click="applicationStore.setItem(item); navigationStore.setModal('editApplication')">
1818
<template #icon>
1919
<Pencil :size="20" />
2020
</template>
2121
Edit
2222
</NcActionButton>
2323
<NcActionButton close-after-click
24-
@click="applicationStore.setApplicationItem(item); navigationStore.setDialog('deleteApplication')">
24+
@click="applicationStore.setItem(item); navigationStore.setDialog('deleteApplication')">
2525
<template #icon>
2626
<TrashCanOutline :size="20" />
2727
</template>

src/components/cards/ConfigurationCard.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ export default {
359359
if (!this.importedConfigId) return null
360360
361361
// Try to find in store first (fast)
362-
const found = configurationStore.configurationList.find(
362+
const found = configurationStore.list.find(
363363
config => config.id === this.importedConfigId,
364364
)
365365
@@ -627,11 +627,11 @@ export default {
627627
this.importedConfigId = importedConfig.id
628628
629629
// Add to store if not already there (for pagination support)
630-
const existsInStore = configurationStore.configurationList.find(
630+
const existsInStore = configurationStore.list.find(
631631
c => c.id === importedConfig.id,
632632
)
633633
if (!existsInStore) {
634-
configurationStore.configurationList.push(importedConfig)
634+
configurationStore.list.push(importedConfig)
635635
}
636636
} else {
637637
// Not imported
@@ -702,7 +702,7 @@ export default {
702702
handleView() {
703703
if (this.isDiscovered && this.existingConfiguration) {
704704
// For discovered configs that are imported, open the local one
705-
configurationStore.setConfigurationItem(this.existingConfiguration)
705+
configurationStore.setItem(this.existingConfiguration)
706706
navigationStore.setModal('viewConfiguration')
707707
} else {
708708
this.$emit('view', this.existingConfiguration || this.displayConfiguration)
@@ -713,7 +713,7 @@ export default {
713713
*/
714714
handleEdit() {
715715
if (this.isDiscovered && this.existingConfiguration) {
716-
configurationStore.setConfigurationItem(this.existingConfiguration)
716+
configurationStore.setItem(this.existingConfiguration)
717717
navigationStore.setModal('editConfiguration')
718718
} else {
719719
this.$emit('edit', this.existingConfiguration || this.displayConfiguration)
@@ -724,7 +724,7 @@ export default {
724724
*/
725725
handleExport() {
726726
if (this.isDiscovered && this.existingConfiguration) {
727-
configurationStore.setConfigurationItem(this.existingConfiguration)
727+
configurationStore.setItem(this.existingConfiguration)
728728
navigationStore.setModal('exportConfiguration')
729729
} else {
730730
this.$emit('export', this.existingConfiguration || this.displayConfiguration)
@@ -735,7 +735,7 @@ export default {
735735
*/
736736
handlePublish() {
737737
const config = this.existingConfiguration || this.displayConfiguration
738-
configurationStore.setConfigurationItem(config)
738+
configurationStore.setItem(config)
739739
navigationStore.setModal('publishConfiguration')
740740
},
741741
/**
@@ -755,7 +755,7 @@ export default {
755755
*/
756756
handlePreviewUpdate() {
757757
if (this.isDiscovered && this.existingConfiguration) {
758-
configurationStore.setConfigurationItem(this.existingConfiguration)
758+
configurationStore.setItem(this.existingConfiguration)
759759
navigationStore.setModal('previewConfiguration')
760760
} else {
761761
this.$emit('preview-update', this.existingConfiguration || this.displayConfiguration)

src/components/cards/RegisterSchemaCard.vue

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ import { dashboardStore, registerStore, schemaStore, navigationStore, configurat
5555
</NcActionButton>
5656
<!-- Register-only actions -->
5757
<template v-if="type === 'register'">
58-
<NcActionButton close-after-click @click="registerStore.setRegisterItem(item); navigationStore.setModal('publishRegister')">
58+
<NcActionButton close-after-click @click="registerStore.setItem(item); navigationStore.setModal('publishRegister')">
5959
<template #icon>
6060
<CloudUploadOutline :size="20" />
6161
</template>
6262
Publish OAS
6363
</NcActionButton>
64-
<NcActionButton close-after-click @click="registerStore.setRegisterItem(item); navigationStore.setModal('importRegister')">
64+
<NcActionButton close-after-click @click="registerStore.setItem(item); navigationStore.setModal('importRegister')">
6565
<template #icon>
6666
<Upload :size="20" />
6767
</template>
@@ -195,15 +195,15 @@ import { dashboardStore, registerStore, schemaStore, navigationStore, configurat
195195
</NcActionButton>
196196
<NcActionButton
197197
close-after-click
198-
@click="registerStore.setRegisterItem(item); schemaStore.setSchemaItem(schema); navigationStore.setModal('exportRegister')">
198+
@click="registerStore.setItem(item); schemaStore.setItem(schema); navigationStore.setModal('exportRegister')">
199199
<template #icon>
200200
<Export :size="20" />
201201
</template>
202202
{{ t('openregister', 'Export') }}
203203
</NcActionButton>
204204
<NcActionButton
205205
close-after-click
206-
@click="registerStore.setRegisterItem(item); schemaStore.setSchemaItem(schema); navigationStore.setModal('importRegister')">
206+
@click="registerStore.setItem(item); schemaStore.setItem(schema); navigationStore.setModal('importRegister')">
207207
<template #icon>
208208
<Upload :size="20" />
209209
</template>
@@ -418,12 +418,12 @@ export default {
418418
managingConfiguration() {
419419
if (!this.item || !this.item.id) return null
420420
if (this.type === 'register') {
421-
return configurationStore.configurationList.find(
421+
return configurationStore.list.find(
422422
config => config.registers && config.registers.includes(this.item.id),
423423
) || null
424424
}
425425
// Schema: config.schemas is an array of objects with .id
426-
return configurationStore.configurationList.find(
426+
return configurationStore.list.find(
427427
config => config.schemas && config.schemas.some(s => s.id === this.item.id),
428428
) || null
429429
},
@@ -516,7 +516,7 @@ export default {
516516
if (this.type === 'register') {
517517
this.showEditRegisterDialog = true
518518
} else {
519-
schemaStore.setSchemaItem(this.item)
519+
schemaStore.setItem(this.item)
520520
navigationStore.setModal('editSchema')
521521
}
522522
},
@@ -551,8 +551,8 @@ export default {
551551
async loadSchemaOptions() {
552552
this.schemasLoading = true
553553
try {
554-
await schemaStore.refreshSchemaList()
555-
this.schemaSelectOptions = schemaStore.schemaList.map(s => ({ id: s.id, label: s.title }))
554+
await schemaStore.refreshList()
555+
this.schemaSelectOptions = schemaStore.list.map(s => ({ id: s.id, label: s.title }))
556556
} catch (error) {
557557
console.error('Failed to load schemas:', error)
558558
} finally {
@@ -569,7 +569,7 @@ export default {
569569
},
570570
async onSaveRegister(formData) {
571571
try {
572-
await registerStore.saveRegister({
572+
await registerStore.save({
573573
...formData,
574574
schemas: (formData.schemas || []).map(s => typeof s === 'object' ? s.id : s),
575575
})
@@ -581,10 +581,10 @@ export default {
581581
},
582582
openDelete() {
583583
if (this.type === 'register') {
584-
registerStore.setRegisterItem(this.item)
584+
registerStore.setItem(this.item)
585585
navigationStore.setDialog('deleteRegister')
586586
} else {
587-
schemaStore.setSchemaItem(this.item)
587+
schemaStore.setItem(this.item)
588588
navigationStore.setDialog('deleteSchema')
589589
}
590590
},
@@ -596,7 +596,7 @@ export default {
596596
597597
// Register-only methods
598598
viewRegisterDetails() {
599-
registerStore.setRegisterItem({ id: this.item.id })
599+
registerStore.setItem({ id: this.item.id })
600600
this.$router.push(`/registers/${this.item.id}`)
601601
},
602602
@@ -888,7 +888,7 @@ export default {
888888
}
889889
890890
await Promise.all([
891-
registerStore.refreshRegisterList(),
891+
registerStore.refreshList(),
892892
dashboardStore.fetchRegisters(),
893893
])
894894
} catch (error) {

src/modals/agent/DeleteAgent.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { agentStore, navigationStore } from '../../store/store.js'
99
:can-close="true"
1010
@update:open="closeDialog">
1111
<div class="dialog-content">
12-
<p>Are you sure you want to delete the agent <strong>{{ agentStore.agentItem?.name }}</strong>?</p>
12+
<p>Are you sure you want to delete the agent <strong>{{ agentStore.item?.name }}</strong>?</p>
1313
<p class="warning-text">
1414
This action cannot be undone.
1515
</p>
@@ -60,7 +60,7 @@ export default {
6060
this.loading = true
6161
6262
try {
63-
await agentStore.deleteAgent(agentStore.agentItem)
63+
await agentStore.deleteOne(agentStore.item)
6464
this.closeDialog()
6565
} catch (error) {
6666
console.error('Error deleting agent:', error)

src/modals/agent/EditAgent.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import { agentStore, navigationStore } from '../../store/store.js'
44
</script>
55

66
<template>
7-
<NcDialog :name="agentStore.agentItem?.uuid ? 'Edit Agent' : 'Create Agent'"
7+
<NcDialog :name="agentStore.item?.uuid ? 'Edit Agent' : 'Create Agent'"
88
size="large"
99
:can-close="true"
1010
@update:open="handleDialogClose">
1111
<NcNoteCard v-if="success" type="success">
12-
<p>Agent successfully {{ agentStore.agentItem?.uuid ? 'updated' : 'created' }}</p>
12+
<p>Agent successfully {{ agentStore.item?.uuid ? 'updated' : 'created' }}</p>
1313
</NcNoteCard>
1414
<NcNoteCard v-if="error" type="error">
1515
<p>{{ error }}</p>
@@ -360,7 +360,7 @@ import { agentStore, navigationStore } from '../../store/store.js'
360360
<NcLoadingIcon v-if="loading" :size="20" />
361361
<ContentSaveOutline v-else :size="20" />
362362
</template>
363-
{{ agentStore.agentItem?.uuid ? 'Update' : 'Create' }}
363+
{{ agentStore.item?.uuid ? 'Update' : 'Create' }}
364364
</NcButton>
365365
</template>
366366
</NcDialog>
@@ -477,12 +477,12 @@ export default {
477477
},
478478
methods: {
479479
initializeAgent() {
480-
if (agentStore.agentItem) {
480+
if (agentStore.item) {
481481
// Deep copy to avoid reactivity issues
482-
const sourceTools = agentStore.agentItem.tools || []
482+
const sourceTools = agentStore.item.tools || []
483483
const toolsArray = Array.isArray(sourceTools) ? [...sourceTools] : []
484484
485-
this.agentItem = { ...agentStore.agentItem }
485+
this.agentItem = { ...agentStore.item }
486486
// Force set the tools array to ensure reactivity
487487
this.$set(this.agentItem, 'tools', toolsArray)
488488
this.selectedType = this.agentTypes.find(t => t.value === this.agentItem.type)
@@ -757,7 +757,7 @@ export default {
757757
this.error = null
758758
759759
try {
760-
await agentStore.saveAgent(this.agentItem)
760+
await agentStore.save(this.agentItem)
761761
this.success = true
762762
setTimeout(() => {
763763
this.closeModal()

src/modals/application/DeleteApplication.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ export default {
4343
computed: {
4444
deleteMessage() {
4545
return t('openregister', 'Are you sure you want to delete the application "{name}"? This action cannot be undone.', {
46-
name: applicationStore.applicationItem?.name || t('openregister', 'this application'),
46+
name: applicationStore.item?.name || t('openregister', 'this application'),
4747
})
4848
},
4949
},
5050
methods: {
5151
async deleteApplication() {
5252
try {
53-
await applicationStore.deleteApplication(applicationStore.applicationItem)
53+
await applicationStore.deleteOne(applicationStore.item)
5454
navigationStore.setDialog(false)
5555
} catch (error) {
5656
console.error('Error deleting application:', error)

src/modals/application/EditApplication.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { applicationStore, organisationStore, navigationStore } from '../../stor
77
<CnTabbedFormDialog
88
ref="dialog"
99
:tabs="dialogTabs"
10-
:item="applicationStore.applicationItem?.uuid ? applicationStore.applicationItem : null"
10+
:item="applicationStore.item?.uuid ? applicationStore.item : null"
1111
entity-name="Application"
1212
:show-create-another="true"
1313
:disable-save="!applicationItem.name.trim()"
@@ -216,7 +216,7 @@ export default {
216216
* @return {Promise<void>}
217217
*/
218218
async fetchOrganisations() {
219-
await organisationStore.refreshOrganisationList()
219+
await organisationStore.refreshList()
220220
},
221221
222222
/**
@@ -313,10 +313,10 @@ export default {
313313
* @return {void}
314314
*/
315315
initializeApplicationItem() {
316-
if (applicationStore.applicationItem?.uuid) {
316+
if (applicationStore.item?.uuid) {
317317
this.applicationItem = {
318318
...this.applicationItem, // Keep default structure
319-
...applicationStore.applicationItem,
319+
...applicationStore.item,
320320
}
321321
322322
// Organisation is automatically set by backend based on active organisation
@@ -520,7 +520,7 @@ export default {
520520
}
521521
522522
try {
523-
const { response } = await applicationStore.saveApplication({
523+
const { response } = await applicationStore.save({
524524
...this.applicationItem,
525525
})
526526

src/modals/configuration/DeleteConfiguration.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</NcNoteCard>
99

1010
<div class="formContainer">
11-
<p>Are you sure you want to delete the configuration "{{ configurationStore.configurationItem?.title }}"?</p>
11+
<p>Are you sure you want to delete the configuration "{{ configurationStore.item?.title }}"?</p>
1212
<p>This action cannot be undone.</p>
1313
</div>
1414

@@ -77,7 +77,7 @@ export default {
7777
this.error = null
7878
7979
try {
80-
await configurationStore.deleteConfiguration(configurationStore.configurationItem)
80+
await configurationStore.deleteOne(configurationStore.item)
8181
this.closeModal()
8282
} catch (error) {
8383
this.error = error.message || 'Failed to delete configuration'

src/modals/configuration/EditConfiguration.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { configurationStore, navigationStore, organisationStore, applicationStor
77
<CnTabbedFormDialog
88
ref="dialog"
99
:tabs="dialogTabs"
10-
:item="configurationStore.configurationItem?.id ? configurationStore.configurationItem : null"
10+
:item="configurationStore.item?.id ? configurationStore.item : null"
1111
entity-name="Configuration"
1212
:show-create-another="true"
1313
:disable-save="!configurationItem.title.trim()"
@@ -590,11 +590,11 @@ export default {
590590
},
591591
mounted() {
592592
// Refresh stores if empty
593-
if (!organisationStore.organisationList || organisationStore.organisationList.length === 0) {
594-
organisationStore.refreshOrganisationList()
593+
if (!organisationStore.list || organisationStore.list.length === 0) {
594+
organisationStore.refreshList()
595595
}
596-
if (!applicationStore.applicationList || applicationStore.applicationList.length === 0) {
597-
applicationStore.refreshApplicationList()
596+
if (!applicationStore.list || applicationStore.list.length === 0) {
597+
applicationStore.refreshList()
598598
}
599599
600600
// Perform initial searches for Configuration tab entities
@@ -610,10 +610,10 @@ export default {
610610
},
611611
methods: {
612612
initializeConfigurationItem() {
613-
if (configurationStore.configurationItem?.id) {
613+
if (configurationStore.item?.id) {
614614
this.configurationItem = {
615615
...this.configurationItem,
616-
...configurationStore.configurationItem,
616+
...configurationStore.item,
617617
}
618618
619619
// Load Settings tab selections
@@ -639,7 +639,7 @@ export default {
639639
640640
// Load selected application
641641
if (this.configurationItem.application) {
642-
this.selectedApplication = applicationStore.applicationList.find(
642+
this.selectedApplication = applicationStore.list.find(
643643
a => a.uuid === this.configurationItem.application,
644644
) || null
645645
}
@@ -1023,7 +1023,7 @@ export default {
10231023
}
10241024
10251025
try {
1026-
const { response } = await configurationStore.saveConfiguration({
1026+
const { response } = await configurationStore.save({
10271027
...this.configurationItem,
10281028
})
10291029

0 commit comments

Comments
 (0)