|
@@ -55,7 +55,7 @@
|
|
|
|
|
|
|
|
<template v-if="justificationRequired">
|
|
<template v-if="justificationRequired">
|
|
|
<label for="justification">Justification:</label>
|
|
<label for="justification">Justification:</label>
|
|
|
- <input id="justification" name="justification" type="text" v-model="justificationValue" required />
|
|
|
|
|
|
|
+ <input id="justification" name="justification" type="text" :value="justificationValue" required @input="handleJustificationInput" />
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<div v-if="actionArguments.length === 0 && !justificationRequired">
|
|
<div v-if="actionArguments.length === 0 && !justificationRequired">
|
|
@@ -105,6 +105,7 @@ const popupOnStart = ref('')
|
|
|
const formReady = ref(false)
|
|
const formReady = ref(false)
|
|
|
const justificationConfig = ref('')
|
|
const justificationConfig = ref('')
|
|
|
const justificationValue = ref('')
|
|
const justificationValue = ref('')
|
|
|
|
|
+const justificationEditedManually = ref(false)
|
|
|
const justificationRequired = computed(() => actionRequiresJustification(justificationConfig.value))
|
|
const justificationRequired = computed(() => actionRequiresJustification(justificationConfig.value))
|
|
|
const justificationTemplate = computed(() => actionJustificationTemplate(justificationConfig.value))
|
|
const justificationTemplate = computed(() => actionJustificationTemplate(justificationConfig.value))
|
|
|
let isComponentMounted = true
|
|
let isComponentMounted = true
|
|
@@ -136,6 +137,7 @@ async function setup() {
|
|
|
actionArguments.value = action.arguments || []
|
|
actionArguments.value = action.arguments || []
|
|
|
justificationConfig.value = action.justification || ''
|
|
justificationConfig.value = action.justification || ''
|
|
|
justificationValue.value = ''
|
|
justificationValue.value = ''
|
|
|
|
|
+ justificationEditedManually.value = false
|
|
|
argValues.value = {}
|
|
argValues.value = {}
|
|
|
formErrors.value = {}
|
|
formErrors.value = {}
|
|
|
confirmationChecked.value = false
|
|
confirmationChecked.value = false
|
|
@@ -246,6 +248,11 @@ function getArgumentValue(arg) {
|
|
|
return argValues.value[arg.name] || ''
|
|
return argValues.value[arg.name] || ''
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function handleJustificationInput(event) {
|
|
|
|
|
+ justificationValue.value = event.target.value
|
|
|
|
|
+ justificationEditedManually.value = true
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function handleInput(arg, event) {
|
|
function handleInput(arg, event) {
|
|
|
const value = event.target.type === 'checkbox' ? event.target.checked : event.target.value
|
|
const value = event.target.type === 'checkbox' ? event.target.checked : event.target.value
|
|
|
argValues.value[arg.name] = value
|
|
argValues.value[arg.name] = value
|
|
@@ -408,7 +415,7 @@ function getArgumentMapForTemplate() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function updateJustificationFromTemplate() {
|
|
function updateJustificationFromTemplate() {
|
|
|
- if (!justificationTemplate.value) {
|
|
|
|
|
|
|
+ if (!justificationTemplate.value || justificationEditedManually.value) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -619,12 +626,12 @@ onUnmounted(() => {
|
|
|
display: inline-flex;
|
|
display: inline-flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
gap: 0.5rem;
|
|
gap: 0.5rem;
|
|
|
- color: inherit;
|
|
|
|
|
- text-decoration: none;
|
|
|
|
|
|
|
+ color: var(--link-color, #0066cc);
|
|
|
|
|
+ text-decoration: underline;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.action-details-title-link:hover {
|
|
.action-details-title-link:hover {
|
|
|
- text-decoration: underline;
|
|
|
|
|
|
|
+ color: var(--link-hover-color, #004499);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
form {
|
|
form {
|