@monkeyplus/payscope 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD-PARTY-LICENSES.md +41 -0
- package/dist/_chunks/auth.d.mts +707 -0
- package/dist/_chunks/database.mjs +831 -0
- package/dist/_chunks/db.d.mts +7100 -0
- package/dist/_chunks/index.d.mts +178 -0
- package/dist/_chunks/lib.mjs +3073 -0
- package/dist/_chunks/libs/better-call.d.mts +478 -0
- package/dist/_chunks/libs/postgres.d.mts +1 -0
- package/dist/_chunks/rolldown-runtime.mjs +11 -0
- package/dist/server/db.d.mts +2 -0
- package/dist/server/db.mjs +108 -0
- package/dist/server/env.d.mts +21 -0
- package/dist/server/env.mjs +22 -0
- package/dist/server/lib.d.mts +362 -0
- package/dist/server/lib.mjs +2 -0
- package/dist/server/router.d.mts +1218 -0
- package/dist/server/router.mjs +1157 -0
- package/dist/server/schemas/auth.d.mts +2 -0
- package/dist/server/schemas/auth.mjs +62 -0
- package/package.json +58 -0
- package/storefront/Readme.md +0 -0
- package/storefront/auth.ts +29 -0
- package/storefront/cart/ResumeCart.vue +217 -0
- package/storefront/cart/ResumeCartSelect.vue +32 -0
- package/storefront/cart/ShoppinCart.vue +100 -0
- package/storefront/cart/ShoppinCartItem.vue +99 -0
- package/storefront/checkout/App.vue +36 -0
- package/storefront/checkout/AppCart.vue +72 -0
- package/storefront/checkout/AppCartDiscount.vue +74 -0
- package/storefront/checkout/AppCartTotals.vue +72 -0
- package/storefront/checkout/AppLoading.vue +55 -0
- package/storefront/checkout/composables.ts +28 -0
- package/storefront/checkout/constants.ts +0 -0
- package/storefront/checkout/main.ts +11 -0
- package/storefront/checkout/pages/Address/Address.vue +95 -0
- package/storefront/checkout/pages/Info/Info.vue +94 -0
- package/storefront/checkout/pages/Info/InfoUser.vue +38 -0
- package/storefront/checkout/pages/Pay/Pay.vue +115 -0
- package/storefront/checkout/pages/Pay/Providers/BancoEconomico/BancoEconomico.vue +9 -0
- package/storefront/checkout/pages/Pay/Providers/Cybersource/Cybersource.vue +9 -0
- package/storefront/checkout/pages/Pay/Providers/Datafast/Datafast.vue +9 -0
- package/storefront/checkout/pages/Pay/Providers/Multipago/Multipago.vue +9 -0
- package/storefront/checkout/pages/Pay/Providers/Pagomedios/Pagomedios.vue +93 -0
- package/storefront/checkout/pages/Pay/Providers/Pagomedios/composable.ts +23 -0
- package/storefront/checkout/pages/Pay/Providers/Paypal/Paypal.vue +168 -0
- package/storefront/checkout/pages/Pay/Providers/Paypal/composable.ts +33 -0
- package/storefront/checkout/pages/Pay/Providers/Placetopay/Placetopay.vue +9 -0
- package/storefront/checkout/pages/Pay/Providers/Wabi/Wabi.vue +9 -0
- package/storefront/checkout/pages/Pay/Providers/composable.ts +30 -0
- package/storefront/checkout/pages/Payment/Payment.vue +19 -0
- package/storefront/checkout/pages/Payment/PaymentStatus.vue +187 -0
- package/storefront/checkout/pages/Payment/PaymentStatusDetail.vue +77 -0
- package/storefront/checkout/pages/Payment/composable.ts +81 -0
- package/storefront/checkout/pages/Shipping/Shipping.vue +67 -0
- package/storefront/checkout/pages/StepInfo.vue +37 -0
- package/storefront/checkout/router.ts +59 -0
- package/storefront/index.ts +3 -0
- package/storefront/login/App.vue +9 -0
- package/storefront/login/main.ts +10 -0
- package/storefront/login/pages/SignIn/Login.vue +82 -0
- package/storefront/login/pages/SignUp/SignUp.vue +99 -0
- package/storefront/login/router.ts +15 -0
- package/storefront/product/AddProduct.vue +303 -0
- package/storefront/product/AddProductNumber.vue +62 -0
- package/storefront/product/AddProductVariant.vue +66 -0
- package/storefront/profile/App.vue +88 -0
- package/storefront/profile/main.ts +10 -0
- package/storefront/profile/pages/Addresses/Addresses.vue +79 -0
- package/storefront/profile/pages/Addresses/AddressesForm.vue +95 -0
- package/storefront/profile/pages/Addresses/AddressesModal.vue +24 -0
- package/storefront/profile/pages/Buys/Buys.vue +8 -0
- package/storefront/profile/pages/Me/Me.vue +15 -0
- package/storefront/profile/pages/Me/MeBilling.vue +79 -0
- package/storefront/profile/pages/Me/MeBillingForm.vue +66 -0
- package/storefront/profile/pages/Me/MeBillingModal.vue +24 -0
- package/storefront/profile/pages/Me/MeInfo.vue +75 -0
- package/storefront/profile/pages/Me/MePassword.vue +53 -0
- package/storefront/profile/pages/Me/MeSubscriptions.vue +15 -0
- package/storefront/profile/pages/Returns/Returns.vue +8 -0
- package/storefront/profile/pages/Whislist/Whislist.vue +8 -0
- package/storefront/profile/router.ts +32 -0
- package/storefront/stores.ts +320 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { ofetch } from 'ofetch';
|
|
2
|
+
import { ref } from 'vue';
|
|
3
|
+
import { useRoute } from 'vue-router';
|
|
4
|
+
|
|
5
|
+
export interface StatusPay {
|
|
6
|
+
status: string
|
|
7
|
+
customer: {
|
|
8
|
+
raw: any
|
|
9
|
+
body: any
|
|
10
|
+
}
|
|
11
|
+
transaction: {
|
|
12
|
+
responseTasks: {
|
|
13
|
+
nafinity: any
|
|
14
|
+
}
|
|
15
|
+
payloadTasks: {
|
|
16
|
+
success: { sign: string }[]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function useState() {
|
|
22
|
+
//
|
|
23
|
+
const query = new URLSearchParams(location.search);
|
|
24
|
+
const provider = query.get('provider') || '';
|
|
25
|
+
const uid = query.get('uid');
|
|
26
|
+
|
|
27
|
+
if (sessionStorage.getItem('eQuery') && !location.pathname.startsWith('/checkout/payment')) {
|
|
28
|
+
const p = `${sessionStorage.getItem('ePath') || '/checkout/payment'}${sessionStorage.getItem('eQuery')}`;
|
|
29
|
+
// console.log(p);
|
|
30
|
+
|
|
31
|
+
location.replace(p);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (provider && uid) {
|
|
35
|
+
sessionStorage.setItem('eQuery', location.search || '');
|
|
36
|
+
sessionStorage.setItem('ePath', location.pathname || '');
|
|
37
|
+
}
|
|
38
|
+
//
|
|
39
|
+
|
|
40
|
+
// const namespace = query.get('namespace');
|
|
41
|
+
const response = ref({} as StatusPay);
|
|
42
|
+
// const id = ref('');
|
|
43
|
+
const status = ref('loading');
|
|
44
|
+
const cleanStorage = () => {
|
|
45
|
+
sessionStorage.removeItem('eTransaction');
|
|
46
|
+
localStorage.removeItem('eTransaction');
|
|
47
|
+
};
|
|
48
|
+
const route = useRoute();
|
|
49
|
+
|
|
50
|
+
const getState = async () => {
|
|
51
|
+
if (!uid || !provider)
|
|
52
|
+
return undefined;
|
|
53
|
+
|
|
54
|
+
const storeId = route.params.store || '';
|
|
55
|
+
|
|
56
|
+
const storePath = storeId ? `/${storeId}` : '';
|
|
57
|
+
|
|
58
|
+
const data = await ofetch(`/payment${storePath}/verify/${provider}`, {
|
|
59
|
+
body: { uid },
|
|
60
|
+
method: 'POST',
|
|
61
|
+
params: {
|
|
62
|
+
// namespace,
|
|
63
|
+
override: true,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
status.value = data.status;
|
|
67
|
+
response.value = data;
|
|
68
|
+
// sendToGtag(uid, data.transaction);
|
|
69
|
+
if (status.value === 'pending')
|
|
70
|
+
runSonda();
|
|
71
|
+
else
|
|
72
|
+
cleanStorage();
|
|
73
|
+
return true;
|
|
74
|
+
};
|
|
75
|
+
function runSonda() {
|
|
76
|
+
setTimeout(() => {
|
|
77
|
+
getState();
|
|
78
|
+
}, 1000 * 12);
|
|
79
|
+
}
|
|
80
|
+
return { getState, status, response, uid, runSonda, provider };
|
|
81
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, ref, watch } from 'vue';
|
|
3
|
+
import { useCheckoutStore } from '../../../stores.ts';
|
|
4
|
+
import { useNavigation } from '../../composables.ts';
|
|
5
|
+
import StepInfo from '../StepInfo.vue';
|
|
6
|
+
|
|
7
|
+
const checkout = useCheckoutStore();
|
|
8
|
+
checkout.getShippings();
|
|
9
|
+
|
|
10
|
+
const { toNext } = useNavigation();
|
|
11
|
+
|
|
12
|
+
const items = computed(() => {
|
|
13
|
+
return checkout.shippings.map((item: any) => {
|
|
14
|
+
return {
|
|
15
|
+
label: item.name,
|
|
16
|
+
value: item.id,
|
|
17
|
+
description: item.price,
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
function onNext() {
|
|
22
|
+
toNext();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const select = ref(checkout.shipping.id || 0);
|
|
26
|
+
|
|
27
|
+
watch(select, (v) => {
|
|
28
|
+
const _a = checkout.shippings.find((a: any) => a.id === v);
|
|
29
|
+
checkout.setShipping(_a);
|
|
30
|
+
});
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<div class="space-y-5 mx-auto min-w-xl mt-6">
|
|
35
|
+
<div class="pt-3">
|
|
36
|
+
<StepInfo />
|
|
37
|
+
</div>
|
|
38
|
+
<div class="text-2xl font-bold leading-0 pt-3">
|
|
39
|
+
Información de envio
|
|
40
|
+
</div>
|
|
41
|
+
<div>
|
|
42
|
+
Selecciona un tipo de envio
|
|
43
|
+
</div>
|
|
44
|
+
<div>
|
|
45
|
+
<URadioGroup
|
|
46
|
+
v-model="select"
|
|
47
|
+
color="primary"
|
|
48
|
+
variant="table"
|
|
49
|
+
default-value="pro"
|
|
50
|
+
:items="items"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div class="flex items-center pt-4">
|
|
55
|
+
<!-- -->
|
|
56
|
+
<div class="flex-auto" />
|
|
57
|
+
|
|
58
|
+
<UButton
|
|
59
|
+
size="lg"
|
|
60
|
+
:disabled="!checkout.shipping?.id"
|
|
61
|
+
@click="onNext"
|
|
62
|
+
>
|
|
63
|
+
Continuar
|
|
64
|
+
</UButton>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useSession } from '../../auth';
|
|
3
|
+
import { useCheckoutStore } from '../../stores';
|
|
4
|
+
|
|
5
|
+
const { user } = useSession();
|
|
6
|
+
const checkout = useCheckoutStore();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<div class="rounded border-1 px-2 text-sm border">
|
|
11
|
+
<div class="text-gray-800 border-b-1 border-b p-3">
|
|
12
|
+
<span class="text-gray-500 mr-4 w-16 inline-block"> Contacto </span>
|
|
13
|
+
{{ user?.name }}
|
|
14
|
+
<span class="text-xs">
|
|
15
|
+
({{ user?.email }})
|
|
16
|
+
</span>
|
|
17
|
+
</div>
|
|
18
|
+
<div v-if="checkout.address?.id" class="text-gray-800 p-3 flex">
|
|
19
|
+
<div class="text-gray-500 mr-4 w-16 inline-block">
|
|
20
|
+
Enviar a
|
|
21
|
+
</div>
|
|
22
|
+
<div>
|
|
23
|
+
{{ checkout.address.formatted }}
|
|
24
|
+
<!-- <span v-if="checkout.customer.shippingIdentification">
|
|
25
|
+
<br>
|
|
26
|
+
Cedula:
|
|
27
|
+
{{ checkout.customer.shippingIdentification }}
|
|
28
|
+
</span> -->
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
<!-- <div v-if="isPay" class="text-gray-800 p-3">
|
|
32
|
+
<span class="text-gray-500 mr-4 w-16 inline-block"> Tipo envio </span>
|
|
33
|
+
{{ checkout?.customer?.shippingType?.name }} -
|
|
34
|
+
{{ checkout?.customer?.shippingType?.price }}
|
|
35
|
+
</div> -->
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { createRouter, createWebHistory } from 'vue-router';
|
|
2
|
+
|
|
3
|
+
console.log('createCheckout');
|
|
4
|
+
export const router = createRouter({
|
|
5
|
+
history: createWebHistory('/checkout'),
|
|
6
|
+
routes: [
|
|
7
|
+
{
|
|
8
|
+
path: '/',
|
|
9
|
+
redirect: '/address',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
path: '/address',
|
|
13
|
+
name: 'address',
|
|
14
|
+
component: () => import('./pages/Address/Address.vue'),
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
path: '/shipping',
|
|
18
|
+
name: 'shipping',
|
|
19
|
+
component: () => import('./pages/Shipping/Shipping.vue'),
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
path: '/payment',
|
|
23
|
+
name: 'payment',
|
|
24
|
+
component: () => import('./pages/Payment/Payment.vue'),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
path: '/pay',
|
|
28
|
+
component: () => import('./pages/Pay/Pay.vue'),
|
|
29
|
+
name: 'pay',
|
|
30
|
+
children: [
|
|
31
|
+
{
|
|
32
|
+
path: 'paypal',
|
|
33
|
+
component: () => import('./pages/Pay/Providers/Paypal/Paypal.vue'),
|
|
34
|
+
name: 'paypal',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
path: 'placetopay',
|
|
38
|
+
component: () => import('./pages/Pay/Providers/Placetopay/Placetopay.vue'),
|
|
39
|
+
name: 'placetopay',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
path: 'pagomedios',
|
|
43
|
+
component: () => import('./pages/Pay/Providers/Pagomedios/Pagomedios.vue'),
|
|
44
|
+
name: 'pagomedios',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
path: 'datafast',
|
|
48
|
+
component: () => import('./pages/Pay/Providers/Datafast/Datafast.vue'),
|
|
49
|
+
name: 'datafast',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
path: 'cybersource',
|
|
53
|
+
component: () => import('./pages/Pay/Providers/Cybersource/Cybersource.vue'),
|
|
54
|
+
name: 'cybersource',
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
});
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { AuthFormField, FormSubmitEvent } from '@nuxt/ui';
|
|
3
|
+
import { useAsyncState } from '@vueuse/core';
|
|
4
|
+
import * as v from 'valibot';
|
|
5
|
+
import { authClient } from '../../../auth';
|
|
6
|
+
|
|
7
|
+
const toast = useToast();
|
|
8
|
+
|
|
9
|
+
const fields: AuthFormField[] = [{
|
|
10
|
+
name: 'email',
|
|
11
|
+
type: 'email',
|
|
12
|
+
label: 'Email',
|
|
13
|
+
placeholder: 'Enter your email',
|
|
14
|
+
required: true,
|
|
15
|
+
}, {
|
|
16
|
+
name: 'password',
|
|
17
|
+
label: 'Password',
|
|
18
|
+
type: 'password',
|
|
19
|
+
placeholder: 'Enter your password',
|
|
20
|
+
required: true,
|
|
21
|
+
}, {
|
|
22
|
+
name: 'remember',
|
|
23
|
+
label: 'Remember me',
|
|
24
|
+
type: 'checkbox',
|
|
25
|
+
}];
|
|
26
|
+
|
|
27
|
+
const providers = [
|
|
28
|
+
{
|
|
29
|
+
label: 'Google',
|
|
30
|
+
icon: 'i-simple-icons-google',
|
|
31
|
+
onClick: () => {
|
|
32
|
+
toast.add({ title: 'Google', description: 'Login with Google' });
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
label: 'GitHub',
|
|
37
|
+
icon: 'i-simple-icons-github',
|
|
38
|
+
onClick: () => {
|
|
39
|
+
toast.add({ title: 'GitHub', description: 'Login with GitHub' });
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
const schema = v.object({
|
|
45
|
+
email: v.pipe(v.string(), v.email('Invalid email')),
|
|
46
|
+
password: v.pipe(v.string(), v.minLength(8, 'Must be at least 8 characters')),
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// type Schema = v.output<typeof schema>;
|
|
50
|
+
|
|
51
|
+
const { execute, isLoading } = useAsyncState(async (payload: any) => {
|
|
52
|
+
await authClient.signIn.email({
|
|
53
|
+
email: payload.data.email,
|
|
54
|
+
password: payload.data.password,
|
|
55
|
+
});
|
|
56
|
+
}, null, {
|
|
57
|
+
onSuccess() {
|
|
58
|
+
location.href = '/profile';
|
|
59
|
+
},
|
|
60
|
+
immediate: false,
|
|
61
|
+
});
|
|
62
|
+
async function onSubmit(payload: FormSubmitEvent<any>) {
|
|
63
|
+
await execute(0, payload);
|
|
64
|
+
}
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<template>
|
|
68
|
+
<div class="flex flex-col items-center justify-center gap-4 p-4">
|
|
69
|
+
<UPageCard class="w-full max-w-md">
|
|
70
|
+
<UAuthForm
|
|
71
|
+
:schema="schema"
|
|
72
|
+
title="Iniciar sesión"
|
|
73
|
+
description="Ingresa tus credenciales para acceder a tu cuenta"
|
|
74
|
+
icon="i-lucide-user"
|
|
75
|
+
:fields="fields"
|
|
76
|
+
:providers="providers"
|
|
77
|
+
:loading="isLoading"
|
|
78
|
+
@submit="onSubmit"
|
|
79
|
+
/>
|
|
80
|
+
</UPageCard>
|
|
81
|
+
</div>
|
|
82
|
+
</template>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { AuthFormField, FormSubmitEvent } from '@nuxt/ui';
|
|
3
|
+
import * as v from 'valibot';
|
|
4
|
+
import { authClient } from '../../../auth';
|
|
5
|
+
|
|
6
|
+
const toast = useToast();
|
|
7
|
+
|
|
8
|
+
const fields: AuthFormField[] = [
|
|
9
|
+
{
|
|
10
|
+
name: 'name',
|
|
11
|
+
type: 'name',
|
|
12
|
+
label: 'Nombre',
|
|
13
|
+
placeholder: 'Ingresa tu nombre',
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: 'email',
|
|
18
|
+
type: 'email',
|
|
19
|
+
label: 'Email',
|
|
20
|
+
placeholder: 'Ingresa tu email',
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'password',
|
|
25
|
+
label: 'Contraseña',
|
|
26
|
+
type: 'password',
|
|
27
|
+
placeholder: 'Ingresa tu contraseña',
|
|
28
|
+
required: true,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'confirmPassword',
|
|
32
|
+
label: 'Confirmar Contraseña',
|
|
33
|
+
type: 'password',
|
|
34
|
+
placeholder: 'Confirma tu contraseña',
|
|
35
|
+
required: true,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'acceptTerms',
|
|
39
|
+
label: 'Acepto los términos y condiciones',
|
|
40
|
+
type: 'checkbox',
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
const providers = [
|
|
45
|
+
{
|
|
46
|
+
label: 'Google',
|
|
47
|
+
icon: 'i-simple-icons-google',
|
|
48
|
+
onClick: () => {
|
|
49
|
+
toast.add({ title: 'Google', description: 'Login with Google' });
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
label: 'GitHub',
|
|
54
|
+
icon: 'i-simple-icons-github',
|
|
55
|
+
onClick: () => {
|
|
56
|
+
toast.add({ title: 'GitHub', description: 'Login with GitHub' });
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
const schema = v.pipe(v.object({
|
|
62
|
+
name: v.string('Name is required'),
|
|
63
|
+
email: v.pipe(v.string(), v.email('Invalid email')),
|
|
64
|
+
password: v.pipe(v.string(), v.minLength(8, 'Must be at least 8 characters')),
|
|
65
|
+
confirmPassword: v.string(),
|
|
66
|
+
|
|
67
|
+
}), v.forward(
|
|
68
|
+
v.partialCheck([['password'], ['confirmPassword']], input => input.password === input.confirmPassword, 'Passwords do not match'),
|
|
69
|
+
['confirmPassword'],
|
|
70
|
+
));
|
|
71
|
+
|
|
72
|
+
// type Schema = v.output<typeof schema>;
|
|
73
|
+
|
|
74
|
+
async function onSubmit(payload: FormSubmitEvent<any>) {
|
|
75
|
+
console.log('Submitted', payload.data);
|
|
76
|
+
// authClient.signUp({})
|
|
77
|
+
await authClient.signUp.email({
|
|
78
|
+
email: payload.data.email,
|
|
79
|
+
password: payload.data.password,
|
|
80
|
+
name: payload.data.name,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
</script>
|
|
84
|
+
|
|
85
|
+
<template>
|
|
86
|
+
<div class="flex flex-col items-center justify-center gap-4 p-4">
|
|
87
|
+
<UPageCard class="w-full max-w-md">
|
|
88
|
+
<UAuthForm
|
|
89
|
+
:schema="schema"
|
|
90
|
+
title="Registrarse"
|
|
91
|
+
description="Crea una nueva cuenta"
|
|
92
|
+
icon="i-lucide-user"
|
|
93
|
+
:fields="fields"
|
|
94
|
+
:providers="providers"
|
|
95
|
+
@submit="onSubmit"
|
|
96
|
+
/>
|
|
97
|
+
</UPageCard>
|
|
98
|
+
</div>
|
|
99
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createRouter, createWebHashHistory } from 'vue-router';
|
|
2
|
+
|
|
3
|
+
export const router = createRouter({
|
|
4
|
+
history: createWebHashHistory(),
|
|
5
|
+
routes: [
|
|
6
|
+
{
|
|
7
|
+
path: '/',
|
|
8
|
+
component: () => import('./pages/SignIn/Login.vue'),
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
path: '/sign-up',
|
|
12
|
+
component: () => import('./pages/SignUp/SignUp.vue'),
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
});
|