Files
luos/resources/assets/js/components/dataViews/vueCardView/VueCardView.vue

95 lines
2.1 KiB
Vue
Raw Normal View History

2021-07-07 14:37:35 +00:00
<template>
2021-07-13 15:10:59 +00:00
<div class="pm-vue-card-view" :height="height">
2021-07-08 15:00:07 +00:00
<div class="pm-vue-card-view-container">
2021-07-13 15:10:59 +00:00
<div
class="pm-vue-card-view-body"
:style="{height: height + 'px'}"
>
2021-07-21 15:09:39 +00:00
<vue-card v-for="item in data" :key="item.id" :item="item" :options="options">
<b-row>
<b-col sm="9">
<slot
v-for="column in options.columns"
:name="column"
:item="item"
:column="column"
:headings="options.headings"
></slot>
2021-10-05 21:29:50 +00:00
<!-- <slot
name="send_by"
:item="item"
column="send_by"
:headings="options.headings"
2021-10-05 21:29:50 +00:00
></slot> -->
</b-col>
<b-col sm="3">
<slot
name="actions"
:item="item"
></slot>
</b-col>
</b-row>
2021-07-08 20:20:05 +00:00
</vue-card>
2021-07-08 15:00:07 +00:00
</div>
2021-07-13 15:10:59 +00:00
<div class="pm-vue-card-view-footer">
2021-08-31 20:49:23 +00:00
<a @click="viewMore" class="list-group-item">{{loadMore}}</a>
2021-07-13 15:10:59 +00:00
</div>
2021-07-08 15:00:07 +00:00
</div>
2021-07-07 14:37:35 +00:00
</div>
</template>
<script>
2021-07-08 15:00:07 +00:00
import VueCard from "./VueCard.vue";
2021-07-08 20:20:05 +00:00
import DefaultMixins from "./VueCardViewMixins";
2021-07-07 14:37:35 +00:00
export default {
name: "VueCardView",
2021-07-08 20:20:05 +00:00
mixins: [DefaultMixins],
2021-07-08 15:00:07 +00:00
components: {
VueCard,
},
2021-07-08 20:20:05 +00:00
props: ["options"],
2021-07-07 14:37:35 +00:00
data() {
return {
2021-08-31 20:49:23 +00:00
loadMore: this.$t("ID_LOAD_MORE")
2021-07-07 14:37:35 +00:00
};
},
2021-07-08 20:20:05 +00:00
mounted() {
2021-10-05 21:29:50 +00:00
// this.filterOptions();
2021-07-08 15:00:07 +00:00
},
2021-07-07 14:37:35 +00:00
methods: {
classBtn(cls) {
return "btn btn-slim btn-force-radius v-btn-header " + cls;
},
/**
* Filter the column send_by
*/
filterOptions() {
2021-10-05 21:29:50 +00:00
debugger;
this.options.columns = this.options.columns.filter(function(item) {
return item !== "send_by";
});
}
2021-07-07 14:37:35 +00:00
},
};
</script>
<style>
.pm-vue-card-view {
2021-07-13 15:10:59 +00:00
font-family: "proxima-nova", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 0.9rem;
}
.pm-vue-card-view-body {
border: 1px solid rgba(0, 0, 0, 0.125);
padding-bottom: 5px;
margin-top: 5px;
overflow-y: auto;
2021-07-07 14:37:35 +00:00
}
2021-07-13 15:10:59 +00:00
.pm-vue-card-view-footer {
text-align: center;
line-height: 1.25;
2021-07-08 15:00:07 +00:00
}
2021-07-07 14:37:35 +00:00
</style>