Merge pull request 'WIP Creacion de la seccion de datos personales' (#2) from dataSection into master
Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
Generated
+45
@@ -6749,6 +6749,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"jquery": {
|
||||
"version": "3.5.1",
|
||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz",
|
||||
"integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg=="
|
||||
},
|
||||
"js-message": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/js-message/-/js-message-1.0.5.tgz",
|
||||
@@ -10963,6 +10968,30 @@
|
||||
}
|
||||
},
|
||||
"vue-loader-v16": {
|
||||
<<<<<<< HEAD
|
||||
"version": "npm:vue-loader@16.0.0-beta.7",
|
||||
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.0.0-beta.7.tgz",
|
||||
"integrity": "sha512-xQ8/GZmRPdQ3EinnE0IXwdVoDzh7Dowo0MowoyBuScEBXrRabw6At5/IdtD3waKklKW5PGokPsm8KRN6rvQ1cw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"@types/mini-css-extract-plugin": "^0.9.1",
|
||||
"chalk": "^3.0.0",
|
||||
"hash-sum": "^2.0.0",
|
||||
"loader-utils": "^1.2.3",
|
||||
"merge-source-map": "^1.1.0",
|
||||
"source-map": "^0.6.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-styles": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
|
||||
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"@types/color-name": "^1.1.1",
|
||||
=======
|
||||
"version": "npm:vue-loader@16.0.0-beta.8",
|
||||
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.0.0-beta.8.tgz",
|
||||
"integrity": "sha512-oouKUQWWHbSihqSD7mhymGPX1OQ4hedzAHyvm8RdyHh6m3oIvoRF+NM45i/bhNOlo8jCnuJhaSUf/6oDjv978g==",
|
||||
@@ -10981,13 +11010,20 @@
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
>>>>>>> origin
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
<<<<<<< HEAD
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
|
||||
"integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
|
||||
=======
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
|
||||
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
|
||||
>>>>>>> origin
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
@@ -11019,6 +11055,14 @@
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
=======
|
||||
"loader-utils": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
|
||||
@@ -11030,6 +11074,7 @@
|
||||
"emojis-list": "^3.0.0",
|
||||
"json5": "^2.1.2"
|
||||
}
|
||||
>>>>>>> origin
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.2.0",
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
"bootstrap": "^4.5.2",
|
||||
"bootstrap-vue": "^2.17.1",
|
||||
"core-js": "^3.6.5",
|
||||
"jquery": "^3.5.1",
|
||||
"sweetalert2": "^10.1.0",
|
||||
"vue": "^2.6.11",
|
||||
"vue-router": "^3.4.3"
|
||||
|
||||
+8
-13
@@ -1,14 +1,11 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<Header />
|
||||
<router-view></router-view>
|
||||
<Footer />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Header from './components/Header'
|
||||
import Footer from './components/Footer'
|
||||
|
||||
|
||||
import Vue from 'vue'
|
||||
import BootstrapVue from 'bootstrap-vue'
|
||||
@@ -20,18 +17,16 @@ import 'bootstrap/dist/css/bootstrap.css'
|
||||
import 'bootstrap-vue/dist/bootstrap-vue.css'
|
||||
|
||||
export default {
|
||||
name: 'app',
|
||||
components: {
|
||||
Header,
|
||||
Footer
|
||||
},
|
||||
name: 'app'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
#app {
|
||||
|
||||
<style>
|
||||
|
||||
.row {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<div id="BotonesShopping" class="row ">
|
||||
<div class="col-sm-3 col-md-3 col-lg-3 col-xl-3 col-12 mt-1 d-flex align-items-center navshop "> <router-link to="/datosPersonales" class="btn colores gris prueba text-white"> Datos Personales </router-link></div>
|
||||
<div class="col-sm-3 col-md-3 col-lg-3 col-xl-3 col-12 mt-1 d-flex align-items-center navshop "> <router-link to="/datosPersonales" class="btn colores gris text-white"> Direcciones </router-link></div>
|
||||
<div class="col-sm-3 col-md-3 col-lg-3 col-xl-3 col-12 mt-1 d-flex align-items-center navshop "> <router-link to="/datosPersonales" class="btn colores gris text-white"> Envio </router-link></div>
|
||||
<div class="col-sm-3 col-md-3 col-lg-3 col-xl-3 col-12 mt-1 d-flex align-items-center navshop "> <router-link to="/datosPersonales" class="btn colores gris text-white"> Pago </router-link></div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const $ = require('jquery')
|
||||
|
||||
|
||||
export default {
|
||||
props:['currentStep'],
|
||||
data(){
|
||||
return{
|
||||
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
|
||||
color(etapa){
|
||||
|
||||
var result = $(".colores:first")
|
||||
|
||||
result.removeClass("gris").toggleClass("azul")
|
||||
|
||||
console.log(result)
|
||||
console.log(etapa)
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
created(){
|
||||
|
||||
this.color(this.currentStep)
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style >
|
||||
|
||||
.verde{
|
||||
background-color: #29B026 !important;
|
||||
}
|
||||
.azul{
|
||||
background-color: #1B3D70 !important;
|
||||
}
|
||||
.gris{
|
||||
background-color: #C4C4C4 !important;
|
||||
}
|
||||
|
||||
.navshop a {
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
@media screen and (max-width:1023px ) and (min-width: 760px) {
|
||||
.navshop a {
|
||||
font-size: .6rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,190 @@
|
||||
<template>
|
||||
<form class="mt-4" role="form" data-toggle="validator" @submit.prevent="checkForm">
|
||||
|
||||
<div class="my-3">
|
||||
<div class="row ">
|
||||
<div class="form-check col-4 ">
|
||||
<input class="form-check-input" type="radio" id="exampleRadios1" v-model="select" value="invitado" checked>
|
||||
<label class="form-check-label" for="exampleRadios1">
|
||||
Invitado
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-4">
|
||||
<input class="form-check-input" type="radio" id="exampleRadios2" v-model="select" value="cuenta">
|
||||
<label class="form-check-label" for="exampleRadios2">
|
||||
Ya Tengo Cuenta
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-4">
|
||||
<input class="form-check-input" type="radio" id="exampleRadios3" v-model="select" value="newCuenta">
|
||||
<label class="form-check-label" for="exampleRadios2">
|
||||
Crear Cuenta
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="submitted === true">
|
||||
<div v-if="hasErrors" class="error">
|
||||
<strong>Se han producido los siguientes errores:</strong>
|
||||
<ul>
|
||||
<li v-bind:key="error" v-for="error in errors">{{ error }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div v-else class="correcto">
|
||||
<strong>Enviado!</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="select == 'invitado' ">
|
||||
<div class="form-group">
|
||||
<label for="InputNombre1">Nombres</label>
|
||||
<input type="text" class="form-control" id="InputNombre1" placeholder="Ingresa tu nombre" v-model="invitado.nombre">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="InputApellido1">Apellidos</label>
|
||||
<input type="text" class="form-control" id="InputApellido1" placeholder="Ingresa tus apellidos" v-model="invitado.apellido">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="InputCorreo1">Correo</label>
|
||||
<input type="email" class="form-control" id="InputCorreo1" placeholder="Enter email" v-model="invitado.correo">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div v-if="select == 'cuenta' ">
|
||||
<div class="form-group">
|
||||
<label for="InputCorreo2" >Correo</label>
|
||||
<input type="email" class="form-control" id="InputCorreo2" placeholder="Enter email" v-model="cuenta.correo">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="InputPassword2">Contraseña</label>
|
||||
<input type="password" class="form-control" id="InputPassword1" placeholder="Password" v-model="cuenta.contrasena">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div v-if="select == 'newCuenta' ">
|
||||
<div class="form-group">
|
||||
<label for="InputNombre3">Nombres</label>
|
||||
<input type="email" class="form-control" id="InputNombre3" v-model="newCuenta.nombre" placeholder="Ingresa tu nombre">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="InputApellido3">Apellidos</label>
|
||||
<input type="email" class="form-control" id="InputApellido3" v-model="newCuenta.apellido" placeholder="Ingresa tus apellidos">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="InputCorreo3">Correo</label>
|
||||
<input type="email" class="form-control" id="InputCorreo3" v-model="newCuenta.correo" placeholder="Ingresa tu correo">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Fecha de Nacimiento</label>
|
||||
<input class="form-control" type="date" value="2011-08-19" id="dataEjemploFecha" v-model="newCuenta.nacimiento">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Contraseña</label>
|
||||
<input type="email" class="form-control" id="exampleInputEmail1" v-model="newCuenta.contrasena" placeholder="Enter email">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="select != ''">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="exampleCheck1" v-model="check.ofertas" >
|
||||
<label class="form-check-label" for="exampleCheck1">Recibir ofertas de nuestros socios</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="exampleCheck2" v-model="check.suscribirse" >
|
||||
<label class="form-check-label" for="exampleCheck2">Suscribirse a nuestro boletín de noticias</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <pre>{{$data}}</pre> -->
|
||||
|
||||
<div v-if="(invitado.nombre && invitado.apellido && invitado.correo)
|
||||
|| (cuenta.correo && cuenta.contrasena)
|
||||
|| (newCuenta.nombre && newCuenta.apellido && newCuenta.correo && newCuenta.nacimiento && newCuenta.contrasena) != ''">
|
||||
<button type="submit" @click="NextStep()" class="btn btn-success">continuar</button>
|
||||
</div>
|
||||
</form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
continuar:false,
|
||||
select:'',
|
||||
errors:[], submitted:false,
|
||||
invitado:{
|
||||
nombre:'',
|
||||
apellido:'',
|
||||
correo:''
|
||||
},
|
||||
cuenta:{
|
||||
correo:'',
|
||||
contrasena:''
|
||||
},
|
||||
newCuenta:{
|
||||
nombre:'',
|
||||
apellido:'',
|
||||
correo:'',
|
||||
nacimiento:'',
|
||||
contrasena:''
|
||||
},
|
||||
check:{
|
||||
ofertas:false,
|
||||
suscribirse:false
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
checkForm() {
|
||||
this.submitted = true;
|
||||
switch(this.select){
|
||||
case 'invitado':
|
||||
console.log(this.select)
|
||||
break
|
||||
|
||||
case 'cuenta':
|
||||
console.log(this.select)
|
||||
break
|
||||
|
||||
case 'newCuenta':
|
||||
console.log(this.select)
|
||||
break
|
||||
}
|
||||
this.continuar = true
|
||||
},
|
||||
NextStep(){
|
||||
let pagina = this.$router.currentRoute.name
|
||||
switch(pagina){
|
||||
case 'personalData':
|
||||
this.$router.push({name:'home'})
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
hasError(){
|
||||
return this.errors.length;
|
||||
}
|
||||
},
|
||||
created(){
|
||||
console.log(this.$router.currentRoute)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,30 @@
|
||||
import {library} from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
faUserSecret,
|
||||
faUser,
|
||||
faLock,
|
||||
faGraduationCap,
|
||||
faExternalLinkAlt,
|
||||
faKey,
|
||||
faExclamationCircle,
|
||||
faEnvelope,
|
||||
faShoppingCart,
|
||||
faTrash,
|
||||
faMapMarkerAlt,
|
||||
faPhoneAlt
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
|
||||
library.add(faUserSecret)
|
||||
library.add(faUser)
|
||||
library.add(faLock)
|
||||
library.add(faExternalLinkAlt)
|
||||
library.add(faGraduationCap)
|
||||
library.add(faExclamationCircle)
|
||||
library.add(faKey)
|
||||
library.add(faEnvelope)
|
||||
library.add(faShoppingCart)
|
||||
library.add(faTrash)
|
||||
library.add(faMapMarkerAlt)
|
||||
library.add(faPhoneAlt)
|
||||
|
||||
+3
-28
@@ -1,36 +1,11 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from './routes'
|
||||
import "bootstrap"
|
||||
import "bootstrap/dist/css/bootstrap.min.css"
|
||||
|
||||
import {library} from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
faUserSecret,
|
||||
faUser,
|
||||
faLock,
|
||||
faGraduationCap,
|
||||
faExternalLinkAlt,
|
||||
faKey,
|
||||
faExclamationCircle,
|
||||
faEnvelope,
|
||||
faShoppingCart,
|
||||
faTrash,
|
||||
faMapMarkerAlt,
|
||||
faPhoneAlt
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome'
|
||||
|
||||
library.add(faUserSecret)
|
||||
library.add(faUser)
|
||||
library.add(faLock)
|
||||
library.add(faExternalLinkAlt)
|
||||
library.add(faGraduationCap)
|
||||
library.add(faExclamationCircle)
|
||||
library.add(faKey)
|
||||
library.add(faEnvelope)
|
||||
library.add(faShoppingCart)
|
||||
library.add(faTrash)
|
||||
library.add(faMapMarkerAlt)
|
||||
library.add(faPhoneAlt)
|
||||
import "./icons"
|
||||
|
||||
Vue.component('font-awesome-icon', FontAwesomeIcon)
|
||||
|
||||
|
||||
@@ -2,7 +2,11 @@ import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
|
||||
import Home from './view/Home.vue'
|
||||
<<<<<<< HEAD
|
||||
import PersonalData from './view/PersonalData.vue'
|
||||
=======
|
||||
import Cart from './view/Cart.vue'
|
||||
>>>>>>> origin
|
||||
|
||||
const routes = [
|
||||
{
|
||||
@@ -16,9 +20,15 @@ const routes = [
|
||||
name: 'home'
|
||||
},
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
path: '/datosPersonales',
|
||||
component: PersonalData,
|
||||
name: 'personalData'
|
||||
=======
|
||||
path: '/cart',
|
||||
component: Cart,
|
||||
name: 'cart'
|
||||
>>>>>>> origin
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
+13
-6
@@ -1,15 +1,22 @@
|
||||
<template>
|
||||
<div>
|
||||
<Header></Header>
|
||||
<div class="container my-5">
|
||||
<h1>Hola</h1>
|
||||
<h1 class="text-center">Home</h1>
|
||||
</div>
|
||||
<Footer></Footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
import Header from '../components/Header'
|
||||
import Footer from '../components/Footer'
|
||||
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Header,
|
||||
Footer
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<div>
|
||||
<Header></Header>
|
||||
|
||||
<div class="my-5">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<section class="col-10 col-sm-7 col-md-7 col-lg-7 col-xl-7 offset-1">
|
||||
<ShoppingNav currentStep=2></ShoppingNav>
|
||||
|
||||
<DataSection></DataSection>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
<aside id="CompraStatus" class="col-10 col-sm-2 col-md-2 col-lg-2 col-xl-2 offset-1 bg-primary">
|
||||
<h3 class="text-center">status</h3>
|
||||
</aside>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<Footer></Footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Header from '../components/Header'
|
||||
import Footer from '../components/Footer'
|
||||
import ShoppingNav from '../components/ShoppingNav'
|
||||
import DataSection from '../components/dataSection'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Header,
|
||||
Footer,
|
||||
ShoppingNav,
|
||||
DataSection
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@media screen and (max-width:760px ) {
|
||||
#CompraStatus{
|
||||
margin-top: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user