2
0
mirror of https://github.com/frappe/books.git synced 2024-09-20 03:29:00 +00:00

hide Make Entry if can not create

This commit is contained in:
Abdallah A. Zaqout 2023-06-03 17:14:19 +03:00 committed by Alan
parent ba7f80eeeb
commit a956d74679

View File

@ -82,7 +82,7 @@
>
<img src="@/assets/img/list-empty-state.svg" alt="" class="w-24" />
<p class="my-3 text-gray-800">{{ t`No entries found` }}</p>
<Button type="primary" class="text-white" @click="$emit('makeNewDoc')">
<Button type="primary" class="text-white" @click="$emit('makeNewDoc')" v-if="canCreate">
{{ t`Make Entry` }}
</Button>
</div>
@ -101,7 +101,7 @@ import ListCell from './ListCell';
export default defineComponent({
name: 'List',
props: { listConfig: Object, filters: Object, schemaName: String },
props: { listConfig: Object, filters: Object, schemaName: String, canCreate: Boolean },
emits: ['openDoc', 'makeNewDoc', 'updatedData'],
components: {
Row,