fix: refs #8790 format code and update default SMS message in SendSmsDialog component
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
BENJAMIN ESTEVE DIAZ CANO 2025-03-21 11:09:56 +01:00
parent f2e65a7e65
commit d279d284c2
1 changed files with 12 additions and 10 deletions

View File

@ -1,15 +1,15 @@
<script setup>
import {useDialogPluginComponent} from 'quasar';
import {useI18n} from 'vue-i18n';
import {computed, ref} from 'vue';
import { useDialogPluginComponent } from 'quasar';
import { useI18n } from 'vue-i18n';
import { computed, ref } from 'vue';
import VnInput from 'components/common/VnInput.vue';
import axios from 'axios';
import useNotify from "composables/useNotify";
import useNotify from 'composables/useNotify';
const MESSAGE_MAX_LENGTH = 160;
const {t} = useI18n();
const {notify} = useNotify();
const { t } = useI18n();
const { notify } = useNotify();
const props = defineProps({
title: {
type: String,
@ -34,7 +34,7 @@ const props = defineProps({
});
const emit = defineEmits([...useDialogPluginComponent.emits, 'sent']);
const {dialogRef, onDialogHide} = useDialogPluginComponent();
const { dialogRef, onDialogHide } = useDialogPluginComponent();
const smsRules = [
(val) => (val && val.length > 0) || t("The message can't be empty"),
@ -43,10 +43,12 @@ const smsRules = [
t("The message it's too long"),
];
const message = ref('');
const message = ref(
'Retraso en ruta.\nInformamos que la ruta que lleva su pedido ha sufrido un retraso y la entrega se hará a lo largo del día.\nDisculpe las molestias.',
);
const charactersRemaining = computed(
() => MESSAGE_MAX_LENGTH - new Blob([message.value]).size
() => MESSAGE_MAX_LENGTH - new Blob([message.value]).size,
);
const charactersChipColor = computed(() => {
@ -114,7 +116,7 @@ const onSubmit = async () => {
<QTooltip>
{{
t(
'Special characters like accents counts as a multiple'
'Special characters like accents counts as a multiple',
)
}}
</QTooltip>