Avisos registro
This commit is contained in:
@@ -103,10 +103,16 @@
|
||||
<script setup>
|
||||
import { ref, computed } from "vue";
|
||||
import { useListaStore } from "../stores/lista.js";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
const listaStore = useListaStore();
|
||||
const $q = useQuasar();
|
||||
const $router = useRouter();
|
||||
|
||||
const email = ref("");
|
||||
const password = ref("");
|
||||
const username = ref(""); //No exista en la bd, tamaño mínimo
|
||||
const username = ref("");
|
||||
const confirmpassword = ref("");
|
||||
const nombre = ref("");
|
||||
const usuarios = ref([]);
|
||||
@@ -115,6 +121,7 @@ const recibeDatos = () => {
|
||||
listaStore.getUsers().then(function (item) {
|
||||
usuarios.value = item;
|
||||
});
|
||||
console.log(usuarios.value);
|
||||
};
|
||||
const comprobarUsername = computed(() => {
|
||||
let filtro = usuarios.value?.filter(
|
||||
@@ -170,7 +177,14 @@ const registrar = () => {
|
||||
passwordConfirm: confirmpassword.value,
|
||||
name: nombre.value,
|
||||
};
|
||||
listaStore.register(data);
|
||||
listaStore.register(data).then((r) => {
|
||||
$q.dialog({
|
||||
title: "Aviso",
|
||||
message: "Se le ha enviado un correo electrónico que debe verificar",
|
||||
}).onOk(() => {
|
||||
$router.push("/");
|
||||
});
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user