~arx10/procustodibus-app

7a40dae5e2d992c76143c882f0ff30cf4d00b6af — Justin Ludwig 2 months ago 1654aa6
hide not-applicable contact uses for on-prem
1 files changed, 11 insertions(+), 1 deletions(-)

M src/components/user/user-contact-uses-field.vue
M src/components/user/user-contact-uses-field.vue => src/components/user/user-contact-uses-field.vue +11 -1
@@ 38,6 38,8 @@
</template>

<script>
import { env } from '@/utils/env'

const TYPED_USES = {
  local: ['login'],
  email: [


@@ 63,6 65,10 @@ export default {
  },
  emits: ['update:modelValue'],
  computed: {
    hiddenForEnv() {
      const saas = env.edition === 'saas'
      return saas ? [] : ['service_alert', 'product_announcement']
    },
    uses: {
      get() {
        return this.modelValue


@@ 74,7 80,11 @@ export default {
  },
  methods: {
    showValue(v) {
      return !this.hideValues.includes(v) && TYPED_USES[this.type].includes(v)
      return (
        !this.hideValues.includes(v) &&
        !this.hiddenForEnv.includes(v) &&
        TYPED_USES[this.type].includes(v)
      )
    },
  },
}