add: save emails in alert_list

This commit is contained in:
Alexandro Uc Santos
2025-06-03 20:36:34 -06:00
parent 8eeb750e91
commit 457bca1ddd
2 changed files with 10 additions and 7 deletions

View File

@@ -78,6 +78,7 @@
locationForm.address = props.location.address;
locationForm.description = props.location.description;
locationForm.zipcode = props.location.zipcode;
console.log(props.location);
} else {
Object.assign(locationForm, initState);
}
@@ -104,10 +105,12 @@
description: locationForm.description,
company: authStore.user.company,
type: locationForm.location_type,
zipcode: locationForm.zipcode
zipcode: locationForm.zipcode,
alert_list: emails.value.length > 0 ? emails.value : null
}
console.log(branchData);
let result = 'error';
let action = t('directory.msgLocationCreated');
loading.value = true;
@@ -286,7 +289,7 @@
<div class="box-input">
<div class="input-observer">
<CustomInput
label="Agregar observador de bodega"
label="Agregar correo de bodega"
name="email"
type="email"
v-model:field="emailInput"
@@ -302,7 +305,7 @@
Agregar
</button>
</div>
<h5 v-if="emails.length > 0">Lista de observadores:</h5>
<h5 v-if="emails.length > 0">Lista correos de usuarios de bodega:</h5>
<div class="box-emails" v-if="emails.length > 0">
<div
v-for="(email, index) in emails"

View File

@@ -37,7 +37,6 @@ import { validateEmail } from '../helpers/validations';
const submited = ref(false);
const { geocodeAddress, getDirections } = useDirectionsRender();
const formRef = ref(null);
const filterQueryVehicles = ref([]);
const checkLocationLoad = ref(false);
const checkLocationDownload = ref(false);
const locationLoadSelected = ref(null)
@@ -253,6 +252,7 @@ import { validateEmail } from '../helpers/validations';
posted_by: auth.user._id,
posted_by_name: formLoad.owner,
shipper_warehouse: locationLoadSelected.value?._id || null,
alert_list: emails.value.length > 0 ? emails.value : null
};
return loadData;
@@ -487,7 +487,7 @@ import { validateEmail } from '../helpers/validations';
<div class="box-input">
<div class="input-observer">
<Custominput
label="Agregar cliente observador"
label="Agregar correo del cliente"
name="email"
type="email"
v-model:field="emailInput"
@@ -503,7 +503,7 @@ import { validateEmail } from '../helpers/validations';
Agregar
</button>
</div>
<h5 v-if="emails.length > 0">Lista de observadores:</h5>
<h5 v-if="emails.length > 0">Lista de correos de clientes:</h5>
<div class="box-emails" v-if="emails.length > 0">
<div
v-for="(email, index) in emails"