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 { .q-page-sticky.fixed-bottom-right {
margin: 18px; margin: 18px;
} }
.no-border-radius {
border-radius: 0 !important;
}
.no-padding {
padding: 0 !important;
}

View File

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

View File

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