diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index 2dc14160f..b18433d4e 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -81,6 +81,7 @@ const emit = defineEmits(['onFetch', 'onDataSaved']); const componentIsRendered = ref(false); onMounted(async () => { + originalData.value = $props.formInitialData; nextTick(() => { componentIsRendered.value = true; }); @@ -126,7 +127,7 @@ const isLoading = ref(false); // Si elegimos observar los cambios del form significa que inicialmente las actions estaran deshabilitadas const isResetting = ref(false); const hasChanges = ref(!$props.observeFormChanges); -const originalData = ref({ ...$props.formInitialData }); +const originalData = ref({}); const formData = computed(() => state.get($props.model)); const formUrl = computed(() => $props.url); const defaultButtons = computed(() => ({ @@ -154,14 +155,18 @@ const startFormWatcher = () => { }; async function fetch() { - const { data } = await axios.get($props.url, { - params: { filter: JSON.stringify($props.filter) }, - }); + try { + const { data } = await axios.get($props.url, { + params: { filter: JSON.stringify($props.filter) }, + }); + state.set($props.model, data); + originalData.value = data && JSON.parse(JSON.stringify(data)); - state.set($props.model, data); - originalData.value = data && JSON.parse(JSON.stringify(data)); - - emit('onFetch', state.get($props.model)); + emit('onFetch', state.get($props.model)); + } catch (error) { + state.set($props.model, {}); + originalData.value = {}; + } } async function save() { diff --git a/src/components/LeftMenu.vue b/src/components/LeftMenu.vue index 278a67129..3cccd0d2f 100644 --- a/src/components/LeftMenu.vue +++ b/src/components/LeftMenu.vue @@ -1,6 +1,6 @@ diff --git a/src/components/LeftMenuItemGroup.vue b/src/components/LeftMenuItemGroup.vue index 1fdb41e7c..dfd0bf615 100644 --- a/src/components/LeftMenuItemGroup.vue +++ b/src/components/LeftMenuItemGroup.vue @@ -1,6 +1,7 @@ + diff --git a/src/components/common/VnDmsList.vue b/src/components/common/VnDmsList.vue index f70146c58..e3cb2874a 100644 --- a/src/components/common/VnDmsList.vue +++ b/src/components/common/VnDmsList.vue @@ -187,7 +187,7 @@ const columns = computed(() => [ downloadFile( prop.row.id, $props.downloadModel, - null, + undefined, prop.row.download ), }, diff --git a/src/components/common/VnSmsDialog.vue b/src/components/common/VnSmsDialog.vue index 59021cef4..e858ba8a6 100644 --- a/src/components/common/VnSmsDialog.vue +++ b/src/components/common/VnSmsDialog.vue @@ -21,7 +21,8 @@ const props = defineProps({ }, template: { type: String, - required: true, + required: false, + default: '', }, locale: { type: String, @@ -49,7 +50,7 @@ updateMessage(); function updateMessage() { const params = props.data; - const key = `templates['${props.template}']`; + const key = props.template ? `templates['${props.template}']` : ''; message.value = t(key, params, { locale: locale.value }); } @@ -104,15 +105,14 @@ async function send() { map-options :input-debounce="0" rounded - outlined dense /> - + - + + + +es: + In case of a company succession, specify the grantor company: En el caso de que haya habido una sucesión de empresa, indicar la empresa cedente + Comercial name: Nombre comercial + diff --git a/src/pages/Customer/Card/CustomerBillingData.vue b/src/pages/Customer/Card/CustomerBillingData.vue index fa926e2ad..a47dae71f 100644 --- a/src/pages/Customer/Card/CustomerBillingData.vue +++ b/src/pages/Customer/Card/CustomerBillingData.vue @@ -1,10 +1,8 @@ @@ -60,17 +59,13 @@ const getBankEntities = () => { />
- +
- +