1
0
forked from test/crm

fix: replaced contacts listview with frappeui listview component

This commit is contained in:
Shariq Ansari 2023-10-16 14:01:35 +05:30
parent ec6f2210ce
commit f23cef83a6

View File

@ -36,46 +36,42 @@
<Button icon="more-horizontal" /> <Button icon="more-horizontal" />
</div> </div>
</div> </div>
<ListView :list="list" :columns="columns" :rows="rows" row-key="name" /> <ListView
v-if="rows"
class="mt-0"
:columns="columns"
:rows="rows"
row-key="name"
/>
</template> </template>
<script setup> <script setup>
import ListView from '@/components/ListView.vue'
import LayoutHeader from '@/components/LayoutHeader.vue' import LayoutHeader from '@/components/LayoutHeader.vue'
import SortIcon from '@/components/Icons/SortIcon.vue' import SortIcon from '@/components/Icons/SortIcon.vue'
import FilterIcon from '@/components/Icons/FilterIcon.vue' import FilterIcon from '@/components/Icons/FilterIcon.vue'
import { FeatherIcon, Button, Dropdown, Breadcrumbs } from 'frappe-ui' import { FeatherIcon, Button, Dropdown, Breadcrumbs, ListView } from 'frappe-ui'
import { ref, computed } from 'vue' import { ref, computed } from 'vue'
import { contactsStore } from '@/stores/contacts.js' import { contactsStore } from '@/stores/contacts.js'
const { contacts } = contactsStore() const { contacts } = contactsStore()
const list = { const breadcrumbs = [{ label: 'Contacts', route: { name: 'Contacts' } }]
title: 'Contacts',
plural_label: 'Contacts',
singular_label: 'Contact',
}
const breadcrumbs = [{ label: list.title, route: { name: 'Contacts' } }]
const columns = [ const columns = [
{ {
label: 'Full name', label: 'Full name',
key: 'full_name', key: 'full_name',
type: 'avatar', width: '12rem',
size: 'w-44',
}, },
{ {
label: 'Email', label: 'Email',
key: 'email', key: 'email',
type: 'email', width: '12rem',
size: 'w-44',
}, },
{ {
label: 'Phone', label: 'Phone',
key: 'mobile_no', key: 'mobile_no',
type: 'phone', width: '12rem',
size: 'w-44',
}, },
] ]