Skip to content

Commit

Permalink
Support for undocumented actions when getting the action summary.
Browse files Browse the repository at this point in the history
  • Loading branch information
igoramadas committed Jun 24, 2024
1 parent 335603a commit 57ca68c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion mixins/recipeMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@ export default {
methods: {
// Returns an action summary.
actionSummary(action) {
const actionType = _.find(this.$store.state.recipeActions, {value: action.type}).text
const actionObj = _.find(this.$store.state.recipeActions, {value: action.type})
if (!actionObj) {
return `Undocumented action: ${action.type} - ${action.value || action.friendlyValue}`
}

const actionType = actionObj.text
const valueText = action.friendlyValue || action.value
const isBoolean = this.booleanActions.includes(action.type)

Expand Down
2 changes: 1 addition & 1 deletion pages/automations/edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
</div>
</template>
</template>
<v-alert class="mt-3 mb-2 text-body-2" color="accent" dense v-if="needsDelay(recipe)">Some of these conditions might only work if the "Delayed processing" is enabled on your Account.</v-alert>
<v-alert class="mt-3 mb-2 text-body-2" color="accent" dense v-if="needsDelay(recipe)">Some of these conditions might work best if the "Delayed processing" is enabled on your Account.</v-alert>
<div>
<v-btn class="ml-n3 mt-2" color="primary" title="Add a new condition" :disabled="!!recipe.defaultFor" @click.stop="showConditionDialog" rounded text small>
<v-icon class="mr-2">mdi-plus-circle</v-icon>
Expand Down

0 comments on commit 57ca68c

Please sign in to comment.