diff --git a/src/modals/JobArgument/EditJobArgument.vue b/src/modals/JobArgument/EditJobArgument.vue
index 3712b9b11..64eb65d1c 100644
--- a/src/modals/JobArgument/EditJobArgument.vue
+++ b/src/modals/JobArgument/EditJobArgument.vue
@@ -20,7 +20,10 @@ import { jobStore, navigationStore } from '../../store/store.js'
@@ -103,6 +106,12 @@ export default {
this.isEdit = true
}
},
+ checkIfKeyIsUnique(key) {
+ const keys = Object.keys(jobStore.jobItem.arguments)
+ if (this.oldKey === key) return false
+ if (keys.includes(key)) return true
+ return false
+ },
closeModal() {
navigationStore.setModal(false)
this.success = false
@@ -110,6 +119,7 @@ export default {
this.error = false
this.hasUpdated = false
this.isEdit = false
+ this.oldKey = ''
this.argumentItem = {
key: '',
value: '',
@@ -129,7 +139,7 @@ export default {
},
}
- if (this.oldKey !== this.argumentItem.key) {
+ if (this.oldKey !== '' && this.oldKey !== this.argumentItem.key) {
delete newJobItem.arguments[this.oldKey]
}
@@ -144,7 +154,7 @@ export default {
} catch (error) {
this.loading = false
this.success = false
- this.error = error.message || 'An error occurred while saving the mapping'
+ this.error = error.message || 'An error occurred while saving the job argument'
}
},
},
diff --git a/src/modals/Modals.vue b/src/modals/Modals.vue
index 2d0f5eca4..6b3c1826d 100644
--- a/src/modals/Modals.vue
+++ b/src/modals/Modals.vue
@@ -14,6 +14,8 @@
+
+
@@ -33,6 +35,8 @@ import EditSynchronization from './Synchronization/EditSynchronization.vue'
import DeleteSynchronization from './Synchronization/DeleteSynchronization.vue'
import EditJobArgument from './JobArgument/EditJobArgument.vue'
import DeleteJobArgument from './JobArgument/DeleteJobArgument.vue'
+import EditSourceConfiguration from './SourceConfiguration/EditSourceConfiguration.vue'
+import DeleteSourceConfiguration from './SourceConfiguration/DeleteSourceConfiguration.vue'
export default {
name: 'Modals',
@@ -51,6 +55,8 @@ export default {
EditSynchronization,
EditJobArgument,
DeleteJobArgument,
+ EditSourceConfiguration,
+ DeleteSourceConfiguration,
},
setup() {
return {
diff --git a/src/modals/SourceConfiguration/DeleteSourceConfiguration.vue b/src/modals/SourceConfiguration/DeleteSourceConfiguration.vue
new file mode 100644
index 000000000..1ff825d7c
--- /dev/null
+++ b/src/modals/SourceConfiguration/DeleteSourceConfiguration.vue
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+ Successfully deleted source configuration
+
+
+ Something went wrong deleting the source configuration
+
+
+ {{ error }}
+
+
+
+ Do you want to delete {{ sourceStore.sourceConfigurationKey }}? This action cannot be undone.
+
+
+
+
+
+
+ {{ success !== null ? 'Close' : 'Cancel' }}
+
+
+
+
+
+
+ Delete
+
+
+
+
+
+
+
+
diff --git a/src/modals/SourceConfiguration/EditSourceConfiguration.vue b/src/modals/SourceConfiguration/EditSourceConfiguration.vue
new file mode 100644
index 000000000..9a84683bc
--- /dev/null
+++ b/src/modals/SourceConfiguration/EditSourceConfiguration.vue
@@ -0,0 +1,160 @@
+
+
+
+
+
+
{{ isEdit ? 'Edit' : 'Add' }} Configuration
+
+ Configuration successfully added
+
+
+ {{ error }}
+
+
+
+
+
+
+
+
+
+ Save
+
+
+
+
+
+
diff --git a/src/store/modules/source.js b/src/store/modules/source.js
index 24c668437..4a7b7c54c 100644
--- a/src/store/modules/source.js
+++ b/src/store/modules/source.js
@@ -10,6 +10,7 @@ export const useSourceStore = defineStore(
sourceList: [],
sourceLog: false,
sourceLogs: [],
+ sourceConfigurationKey: null,
}),
actions: {
setSourceItem(sourceItem) {
@@ -34,6 +35,10 @@ export const useSourceStore = defineStore(
this.sourceLogs = sourceLogs
console.log('Source logs set to ' + sourceLogs.length + ' items')
},
+ setSourceConfigurationKey(sourceConfigurationKey) {
+ this.sourceConfigurationKey = sourceConfigurationKey
+ console.log('Source configuration key set to ' + sourceConfigurationKey)
+ },
/* istanbul ignore next */ // ignore this for Jest until moved into a service
async refreshSourceList(search = null) {
// @todo this might belong in a service?
diff --git a/src/views/Source/SourceDetails.vue b/src/views/Source/SourceDetails.vue
index 975346542..e653fdda7 100644
--- a/src/views/Source/SourceDetails.vue
+++ b/src/views/Source/SourceDetails.vue
@@ -27,6 +27,12 @@ import { sourceStore, navigationStore } from '../../store/store.js'
Test
+
+
+
+
+ Add Configuration
+
@@ -45,6 +51,44 @@ import { sourceStore, navigationStore } from '../../store/store.js'
+
+
+
+
+
+
+
+ {{ value }}
+
+
+
+
+
+
+ Edit
+
+
+
+
+
+ Delete
+
+
+
+
+
+ No configurations found
+
+