forked from verdnatura/salix-front
Merge branch 'dev' of https://gitea.verdnatura.es/hyervoni/salix-front-mindshore into feature/ms-16-GlobalInvoices
This commit is contained in:
commit
ae577794d7
|
@ -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>
|
|
@ -10,7 +10,7 @@ import { toDate, toCurrency } from 'src/filters/index';
|
|||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||
import InvoiceOutFilter from './InvoiceOutFilter.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 router = useRouter();
|
||||
|
@ -73,7 +73,7 @@ function viewSummary(id) {
|
|||
auto-load
|
||||
>
|
||||
<template #body="{ rows }">
|
||||
<CardList
|
||||
<CardList2
|
||||
v-for="row of rows"
|
||||
:key="row.id"
|
||||
:title="row.ref"
|
||||
|
@ -111,21 +111,21 @@ function viewSummary(id) {
|
|||
</template>
|
||||
<template #actions>
|
||||
<QBtn
|
||||
flat
|
||||
icon="arrow_circle_right"
|
||||
:label="t('components.smartCard.openCard')"
|
||||
@click.stop="navigate(row.id)"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('components.smartCard.openCard') }}
|
||||
</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn flat icon="preview" @click.stop="viewSummary(row.id)">
|
||||
<QTooltip>
|
||||
{{ t('components.smartCard.openSummary') }}
|
||||
</QTooltip>
|
||||
</QBtn>
|
||||
color="primary"
|
||||
type="submit"
|
||||
/>
|
||||
<QBtn
|
||||
:label="t('components.smartCard.openSummary')"
|
||||
@click.stop="viewSummary(row.id)"
|
||||
color="primary"
|
||||
flat
|
||||
style="margin-top: 15px"
|
||||
type="reset"
|
||||
/>
|
||||
</template>
|
||||
</CardList>
|
||||
</CardList2>
|
||||
</template>
|
||||
</VnPaginate>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue