Vistas sección pedidos #77

Merged
jsegarra merged 14 commits from wbuezas/hedera-web-mindshore:feature/Pedidos into 4922-vueMigration 2024-08-16 06:52:22 +00:00
6 changed files with 91 additions and 43 deletions
Showing only changes of commit ad2d494481 - Show all commits

View File

@ -0,0 +1,44 @@
<script setup>
const props = defineProps({
clickable: { type: Boolean, default: true },
rounded: { type: Boolean, default: true }
});
const emit = defineEmits(['click']);
const handleClick = () => {
if (props.clickable) {
emit('click');
}
};
</script>
<template>
<QCard
v-bind="$attrs"
v-ripple="clickable"
flat
class="full-width row items-center justify-between card no-border-radius"
:class="{ 'cursor-pointer': clickable, 'no-radius': !rounded }"
@click="handleClick()"
>
<QCardSection class="no-padding">
<div class="row">
<slot name="prepend" />
<div>
<slot name="content" />
</div>
</div>
</QCardSection>
<QCardSection class="no-padding" side>
<slot name="actions" />
</QCardSection>
</QCard>
</template>
<style lang="scss" scoped>
.card {
border-bottom: 1px solid $gray-light;
padding: 20px;
}
</style>

View File

@ -36,3 +36,9 @@ a.link {
.q-page-sticky.fixed-bottom-right {
margin: 18px;
}
.no-border-radius {
border-radius: 0 !important;
}
.no-padding {
padding: 0 !important;
}

View File

@ -15,7 +15,7 @@
$primary: #1a1a1a;
$secondary: #26a69a;
$accent: #8cc63f;
$gray-light: #ddd;
$dark: #1d1d1d;
$dark-page: #121212;

View File

@ -3,6 +3,8 @@ import { useI18n } from 'vue-i18n';
import { ref, onMounted, inject } from 'vue';
import { useRouter } from 'vue-router';
import CardList from 'src/components/ui/CardList.vue';
import useNotify from 'src/composables/useNotify.js';
import { useVnConfirm } from 'src/composables/useVnConfirm.js';
@ -99,23 +101,21 @@ onMounted(async () => {
style="max-width: 544px"
separator
>
<QItem
<CardList
v-for="(address, index) in addresses"
:key="index"
clickable
v-ripple
:rounded="false"
tag="label"
class="full-width row items-center justify-between address-item"
style="padding: 20px"
>
<QItemSection>
<div class="row">
<template #prepend>
<QRadio
v-model="defaultAddress"
:val="address.id"
class="q-mr-sm"
@update:model-value="changeDefaultAddress"
/>
</template>
<template #content>
<div>
<QItemLabel class="text-bold q-mb-sm">
{{ address.nickname }}
@ -126,9 +126,8 @@ onMounted(async () => {
{{ address.city }}
</QItemLabel>
</div>
</div>
</QItemSection>
<QItemSection class="actions-wrapper" side>
</template>
<template #actions>
<QBtn
icon="delete"
flat
@ -147,25 +146,12 @@ onMounted(async () => {
rounded
@click.stop="goToAddressDetails(address.id)"
/>
</QItemSection>
</QItem>
</template>
</CardList>
</QList>
</QPage>
</template>
<style lang="scss" scoped>
.address-item {
.actions-wrapper {
visibility: hidden;
}
&:hover {
.actions-wrapper {
visibility: visible;
}
}
}
</style>
<i18n lang="yaml">
en-US:
addAddress: Add address

View File

@ -0,0 +1,7 @@
<script setup></script>
<template></template>
<style lang="scss" scoped></style>
<i18n lang="yaml"></i18n>

View File

@ -49,6 +49,11 @@ const routes = [
path: '/ecomerce/invoices',
component: () => import('pages/Ecomerce/Invoices.vue')
},
{
name: 'PendingOrders',
path: '/ecomerce/pending',
component: () => import('pages/Ecomerce/PendingOrders.vue')
},
{
name: 'catalog',
path: '/ecomerce/catalog/:category?/:type?',