forked from verdnatura/salix-front
Compare commits
2 Commits
dev
...
7380_subst
Author | SHA1 | Date |
---|---|---|
|
4b21500ad6 | |
|
0c14eecf57 |
|
@ -81,6 +81,22 @@ const setData = (entity) => (data.value = useCardDescription(entity.name, entity
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('customer.card.isDisabled') }}</QTooltip>
|
<QTooltip>{{ t('customer.card.isDisabled') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
|
<QIcon
|
||||||
|
v-if="!entity.substitutionAllowed"
|
||||||
|
name="help"
|
||||||
|
size="xs"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('Disabled substitution') }}</QTooltip>
|
||||||
|
</QIcon>
|
||||||
|
<QIcon
|
||||||
|
v-if="entity.substitutionAllowed"
|
||||||
|
name="help"
|
||||||
|
size="xs"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('Allowed substitution') }}</QTooltip>
|
||||||
|
</QIcon>
|
||||||
<QIcon v-if="entity.isFreezed" name="vn:frozen" size="xs" color="primary">
|
<QIcon v-if="entity.isFreezed" name="vn:frozen" size="xs" color="primary">
|
||||||
<QTooltip>{{ t('customer.card.isFrozen') }}</QTooltip>
|
<QTooltip>{{ t('customer.card.isFrozen') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
|
|
|
@ -40,6 +40,16 @@ const sendSms = async (payload) => {
|
||||||
notify(error.message, 'positive');
|
notify(error.message, 'positive');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const updateSubstitutionAllowed = async () => {
|
||||||
|
try {
|
||||||
|
await axios.patch(`Clients/${route.params.id}`, {
|
||||||
|
substitutionAllowed: !$props.customer.substitutionAllowed,
|
||||||
|
});
|
||||||
|
notify('globals.notificationSent', 'positive');
|
||||||
|
} catch (error) {
|
||||||
|
notify(error.message, 'positive');
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -56,6 +66,13 @@ const sendSms = async (payload) => {
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
<QItem v-ripple clickable>
|
||||||
|
<QItemSection @click="updateSubstitutionAllowed()">{{
|
||||||
|
$props.customer.substitutionAllowed
|
||||||
|
? t('Disable substitution')
|
||||||
|
: t('Allow substitution')
|
||||||
|
}}</QItemSection>
|
||||||
|
</QItem>
|
||||||
<QItem v-ripple clickable>
|
<QItem v-ripple clickable>
|
||||||
<QItemSection @click="showSmsDialog()">{{ t('Send SMS') }}</QItemSection>
|
<QItemSection @click="showSmsDialog()">{{ t('Send SMS') }}</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
|
Loading…
Reference in New Issue