diff --git a/Design.sketch b/Design.sketch index 3d99f7a..3e71942 100644 Binary files a/Design.sketch and b/Design.sketch differ diff --git a/src/components/avatar/BaseAvatar.vue b/src/components/avatar/BaseAvatar.vue new file mode 100644 index 0000000..26f1b32 --- /dev/null +++ b/src/components/avatar/BaseAvatar.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/src/components/icon/BaseIcon.vue b/src/components/icon/BaseIcon.vue index 840f358..7e2e1d6 100644 --- a/src/components/icon/BaseIcon.vue +++ b/src/components/icon/BaseIcon.vue @@ -14,7 +14,7 @@ withDefaults(defineProps(), { \ No newline at end of file + diff --git a/src/components/input/BaseInput.vue b/src/components/input/BaseInput.vue index 37ffc23..0ece555 100644 --- a/src/components/input/BaseInput.vue +++ b/src/components/input/BaseInput.vue @@ -7,10 +7,10 @@ import { ButtonForm, ButtonMode } from '@/components/button/BaseButton.types.ts' import { hasSlotContent } from '@/utils/helpers.ts'; interface Props { - inputType?: InputType; /* The type of the input. @defaults InputForm.BLOCK */ - form?: InputForm; /* The form of the input. @defaults InputForm.TEXT */ + inputType?: InputType; /* The type of the input. @defaults InputForm.TEXT */ + form?: InputForm; /* The form of the input. @defaults InputForm.BLOCK */ hasError?: boolean; /* Indicates if the input has an error. Determines if the `error` slot will be shown */ - customValidity?: string; /* The error message of the input */ + customValidity?: string; /* The error message of the input. It is the default value for the `error` slot */ loading?: boolean; /* Indicates if the input is loading */ isClearable?: boolean; /* Indicates if the input is clearable. @defaults true */ } @@ -140,7 +140,7 @@ watch(() => props.hasError, (value) => {

@@ -162,6 +162,7 @@ watch(() => props.hasError, (value) => { diff --git a/src/components/radio/BaseRadioGroup.vue b/src/components/radio/BaseRadioGroup.vue new file mode 100644 index 0000000..0b36025 --- /dev/null +++ b/src/components/radio/BaseRadioGroup.vue @@ -0,0 +1,121 @@ + + + + + diff --git a/src/components/select/BaseSelect.vue b/src/components/select/BaseSelect.vue index 446f976..0ba1f5a 100644 --- a/src/components/select/BaseSelect.vue +++ b/src/components/select/BaseSelect.vue @@ -138,7 +138,7 @@ function selectItem(item: T) {

diff --git a/src/layouts/OnboardingLayout.vue b/src/layouts/OnboardingLayout.vue index b67517a..75842c5 100644 --- a/src/layouts/OnboardingLayout.vue +++ b/src/layouts/OnboardingLayout.vue @@ -15,7 +15,7 @@ import { ButtonForm, ButtonMode } from '@/components/button/BaseButton.types.ts' Saltar @@ -32,4 +32,4 @@ header { padding: 8px 16px; margin-bottom: 32px; } - \ No newline at end of file + diff --git a/src/modules/app/components/ErrorMessage.vue b/src/modules/app/components/ErrorMessage.vue new file mode 100644 index 0000000..b1a80ee --- /dev/null +++ b/src/modules/app/components/ErrorMessage.vue @@ -0,0 +1,32 @@ + + + diff --git a/src/modules/app/components/TheHeader.vue b/src/modules/app/components/TheHeader.vue new file mode 100644 index 0000000..fad786d --- /dev/null +++ b/src/modules/app/components/TheHeader.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/src/modules/app/composables/useDB.ts b/src/modules/app/composables/useDB.ts index 73ca1da..88e3c44 100644 --- a/src/modules/app/composables/useDB.ts +++ b/src/modules/app/composables/useDB.ts @@ -6,6 +6,7 @@ import type { } from 'firebase/firestore'; import { Timestamp, + addDoc, collection, doc, getDoc, @@ -104,10 +105,9 @@ export function useDB(collectionName: string) { const { user } = useAuth(); const collectionRef = collection(db, collectionName).withConverter(getConverter()); - const elementRef = doc(collectionRef); if (typeof element === 'object') { const date: Timestamp = Timestamp.now(); - await setDoc(elementRef, { + return await addDoc(collectionRef, { ...element, user_uuid: user.value?.uid, created_at: date, @@ -123,7 +123,7 @@ export function useDB(collectionName: string) { const elementSnap = await getDoc(elementRef); if (elementSnap.exists() && typeof element === 'object') { const date: Timestamp = Timestamp.now(); - await setDoc(elementRef, { + return await setDoc(elementRef, { ...element, updated_at: date, }); @@ -132,9 +132,9 @@ export function useDB(collectionName: string) { async function upsert(element: WithFieldValue, uuid?: string) { if (!uuid) { - await create(element); + return await create(element); } else { - await update(element, uuid); + return await update(element, uuid); } } diff --git a/src/modules/app/pages/HomePage.vue b/src/modules/app/pages/HomePage.vue index b3f2d6c..438b0d8 100644 --- a/src/modules/app/pages/HomePage.vue +++ b/src/modules/app/pages/HomePage.vue @@ -1,34 +1,35 @@