0
0
Fork 0

Merge branch 'dev' of https://gitea.verdnatura.es/hyervoni/salix-front-mindshore into feature/ms-16-GlobalInvoices

This commit is contained in:
William Buezas 2023-11-20 15:04:16 -03:00
commit ae577794d7
2 changed files with 100 additions and 15 deletions

View File

@ -0,0 +1,85 @@
<script setup>
const $props = defineProps({
id: { type: Number, default: null },
title: { type: String, default: null },
});
</script>
<template>
<QCard class="card q-mb-md cursor-pointer q-hoverable bg-white-7 q-pa-lg">
<div>
<slot name="title">
<div class="title text-primary text-weight-bold text-h5">
{{ $props.title ?? `#${$props.id}` }}
</div>
</slot>
<div class="card-list-body row">
<div class="list-items row flex-wrap-wrap q-mt-md">
<slot name="list-items" />
</div>
<div class="actions column justify-center">
<slot name="actions" />
</div>
</div>
</div>
</QCard>
</template>
<style lang="scss">
.card-list-body {
display: flex;
justify-content: center;
.vn-label-value {
display: flex;
justify-content: flex-start;
gap: 2%;
width: 50%;
.label {
width: 30%;
color: var(--vn-label);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.value {
width: 60%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.actions {
.q-btn {
width: 150px;
}
.q-icon {
color: $primary;
font-size: 25px;
}
}
}
@media (max-width: $breakpoint-xs) {
.card-list-body {
.vn-label-value {
width: 100%;
}
}
}
</style>
<style lang="scss" scoped>
.card {
transition: background-color 0.2s;
}
.card:hover {
background-color: var(--vn-gray);
}
.list-items {
width: 75%;
}
@media (max-width: $breakpoint-md) {
.actions {
margin-top: 30px;
}
}
</style>

View File

@ -10,7 +10,7 @@ import { toDate, toCurrency } from 'src/filters/index';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import InvoiceOutFilter from './InvoiceOutFilter.vue'; import InvoiceOutFilter from './InvoiceOutFilter.vue';
import VnLv from 'src/components/ui/VnLv.vue'; import VnLv from 'src/components/ui/VnLv.vue';
import CardList from 'src/components/ui/CardList.vue'; import CardList2 from 'src/components/ui/CardList2.vue';
const stateStore = useStateStore(); const stateStore = useStateStore();
const router = useRouter(); const router = useRouter();
@ -73,7 +73,7 @@ function viewSummary(id) {
auto-load auto-load
> >
<template #body="{ rows }"> <template #body="{ rows }">
<CardList <CardList2
v-for="row of rows" v-for="row of rows"
:key="row.id" :key="row.id"
:title="row.ref" :title="row.ref"
@ -111,21 +111,21 @@ function viewSummary(id) {
</template> </template>
<template #actions> <template #actions>
<QBtn <QBtn
flat :label="t('components.smartCard.openCard')"
icon="arrow_circle_right"
@click.stop="navigate(row.id)" @click.stop="navigate(row.id)"
> color="primary"
<QTooltip> type="submit"
{{ t('components.smartCard.openCard') }} />
</QTooltip> <QBtn
</QBtn> :label="t('components.smartCard.openSummary')"
<QBtn flat icon="preview" @click.stop="viewSummary(row.id)"> @click.stop="viewSummary(row.id)"
<QTooltip> color="primary"
{{ t('components.smartCard.openSummary') }} flat
</QTooltip> style="margin-top: 15px"
</QBtn> type="reset"
/>
</template> </template>
</CardList> </CardList2>
</template> </template>
</VnPaginate> </VnPaginate>
</div> </div>