Skip to content

Commit

Permalink
implemented new custom inputs in team-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
stackoverfloweth committed Oct 28, 2021
1 parent ae97e2a commit df5dbe1
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 306 deletions.
21 changes: 13 additions & 8 deletions src/pages/TeamSettings/Actions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import Alert from '@/components/Alert'
import ConfirmDialog from '@/components/ConfirmDialog'
import ExternalLink from '@/components/ExternalLink'
import ManagementLayout from '@/layouts/ManagementLayout'
import DictInput from '@/components/CustomInputs/DictInput'
import DictInput from '@/components/CustomInputs/DictInput2'
import { formatJson } from '@/utils/json'
export default {
components: {
Alert,
Expand Down Expand Up @@ -122,7 +124,9 @@ export default {
this.alertMessage = message
this.alertShow = true
},
formatItemValue(item) {
return formatJson(item?.action_config)
},
async removeAction() {
this.isRemovingAction = true
try {
Expand Down Expand Up @@ -264,17 +268,18 @@ export default {
</template>
<!-- ACTION CONFIG -->
<template v-slot:expanded-item="{ headers, item }">
<template #expanded-item="{ headers, item }">
<td
v-if="Object.keys(item.action_config).length"
:colspan="headers.length"
>
<DictInput
<dict-input
v-if="Object.keys(item.action_config).length"
:disableEdit="true"
disabled
:dict="item.action_config"
:rules="[1, 2]"
readonly-key
readonly-value
disable-add
disable-remove
:value="formatItemValue(item)"
/>
</td>
<td v-else :colspan="headers.length">
Expand Down
Loading

0 comments on commit df5dbe1

Please sign in to comment.