forked from verdnatura/salix-front
Fix route ticket sms event
This commit is contained in:
parent
97f373626c
commit
988362ab69
|
@ -1,13 +1,15 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useDialogPluginComponent } from 'quasar';
|
import {useDialogPluginComponent} from 'quasar';
|
||||||
import { useI18n } from 'vue-i18n';
|
import {useI18n} from 'vue-i18n';
|
||||||
import { computed, ref } from 'vue';
|
import {computed, ref} from 'vue';
|
||||||
import VnInput from 'components/common/VnInput.vue';
|
import VnInput from 'components/common/VnInput.vue';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
import useNotify from "composables/useNotify";
|
||||||
|
|
||||||
const MESSAGE_MAX_LENGTH = 160;
|
const MESSAGE_MAX_LENGTH = 160;
|
||||||
|
|
||||||
const { t } = useI18n();
|
const {t} = useI18n();
|
||||||
|
const {notify} = useNotify();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -32,7 +34,7 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits([...useDialogPluginComponent.emits, 'sent']);
|
const emit = defineEmits([...useDialogPluginComponent.emits, 'sent']);
|
||||||
const { dialogRef, onDialogHide } = useDialogPluginComponent();
|
const {dialogRef, onDialogHide} = useDialogPluginComponent();
|
||||||
|
|
||||||
const smsRules = [
|
const smsRules = [
|
||||||
(val) => (val && val.length > 0) || t("The message can't be empty"),
|
(val) => (val && val.length > 0) || t("The message can't be empty"),
|
||||||
|
@ -79,6 +81,7 @@ const onSubmit = async () => {
|
||||||
|
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
emit('sent', response.data);
|
emit('sent', response.data);
|
||||||
|
notify('globals.smsSent', 'positive');
|
||||||
}
|
}
|
||||||
emit('ok', response.data);
|
emit('ok', response.data);
|
||||||
emit('hide', response.data);
|
emit('hide', response.data);
|
||||||
|
|
|
@ -64,6 +64,7 @@ export default {
|
||||||
markAll: 'Mark all',
|
markAll: 'Mark all',
|
||||||
noResults: 'No results',
|
noResults: 'No results',
|
||||||
system: 'System',
|
system: 'System',
|
||||||
|
smsSent: 'SMS sent',
|
||||||
},
|
},
|
||||||
errors: {
|
errors: {
|
||||||
statusUnauthorized: 'Access denied',
|
statusUnauthorized: 'Access denied',
|
||||||
|
|
|
@ -70,6 +70,7 @@ export default {
|
||||||
system: 'Sistema',
|
system: 'Sistema',
|
||||||
fieldRequired: 'Campo requerido',
|
fieldRequired: 'Campo requerido',
|
||||||
allowedFilesText: 'Tipos de archivo permitidos: { allowedContentTypes }',
|
allowedFilesText: 'Tipos de archivo permitidos: { allowedContentTypes }',
|
||||||
|
smsSent: 'SMS enviado',
|
||||||
},
|
},
|
||||||
errors: {
|
errors: {
|
||||||
statusUnauthorized: 'Acceso denegado',
|
statusUnauthorized: 'Acceso denegado',
|
||||||
|
|
Loading…
Reference in New Issue