Browse Source

fix: enable attachment and belongsTo in shared view

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/743/head
Pranav C 3 years ago
parent
commit
4c84ce55d3
  1. 15
      packages/nc-gui/components/project/spreadsheet/components/editableCell/editableAttachmentCell.vue
  2. 8
      packages/nc-gui/components/project/spreadsheet/components/virtualCell/components/listChildItems.vue

15
packages/nc-gui/components/project/spreadsheet/components/editableCell/editableAttachmentCell.vue

@ -8,7 +8,7 @@
@dragend="dragOver = false"
@drop.prevent="onFileDrop"
>
<div v-show="_isUIAllowed('tableAttachment') && dragOver" class="drop-overlay">
<div v-show="(isForm || _isUIAllowed('tableAttachment')) && dragOver" class="drop-overlay">
<div>
<v-icon small>
mdi-cloud-upload-outline
@ -62,11 +62,16 @@
</v-tooltip>
</div>
<div v-if="active && !isPublicGrid" class="add d-flex align-center justify-center px-1" @click="addFile">
<v-icon v-if="uploading" small color="primary">
<div v-if="isForm || active && !isPublicGrid" class="add d-flex align-center justify-center px-1 nc-attachment-add" @click="addFile">
<v-icon v-if="uploading" small color="primary" class="nc-attachment-add-spinner">
mdi-loading mdi-spin
</v-icon>
<v-icon v-else-if="_isUIAllowed('tableAttachment')" v-show="active" small color="primary">
<v-btn v-else-if="isForm" outlined x-small class="nc-attachment-add-btn">
<v-icon x-small color="primary">
mdi-plus
</v-icon> Attachment
</v-btn>
<v-icon v-else-if="_isUIAllowed('tableAttachment')" v-show="active" small color="primary nc-attachment-add-icon">
mdi-plus
</v-icon>
</div>
@ -88,7 +93,7 @@
<v-card-text class="h-100 backgroundColor">
<div class="d-flex mx-2">
<v-btn
v-if="_isUIAllowed('tableAttachment') && !isPublicGrid"
v-if="(isForm || _isUIAllowed('tableAttachment')) && !isPublicGrid"
small
class="my-4 "
:loading="uploading"

8
packages/nc-gui/components/project/spreadsheet/components/virtualCell/components/listChildItems.vue

@ -8,7 +8,7 @@
mdi-reload
</v-icon>
<v-btn
v-if="(isForm || !isPublic) && !readOnly && _isUIAllowed('xcDatatableEditable')"
v-if="(isForm || !isPublic) && !readOnly && (isPublic || _isUIAllowed('xcDatatableEditable'))"
small
class="caption"
color="primary"
@ -24,7 +24,7 @@
</v-card-title>
<v-card-text>
<div class="items-container pt-2 mb-n4" :class="{'mx-n2' : isForm}">
<div v-if="!readOnly && _isUIAllowed('xcDatatableEditable')" class="text-right mb-2 mt-n2 mx-2">
<div v-if="!readOnly && (isPublic || _isUIAllowed('xcDatatableEditable'))" class="text-right mb-2 mt-n2 mx-2">
<v-btn
v-if="isForm"
x-small
@ -47,11 +47,11 @@
:key="i"
class="mx-2 mb-2 child-list-modal child-card"
outlined
@click="!readOnly && $emit('edit',ch) && _isUIAllowed('xcDatatableEditable')"
@click="!readOnly && $emit('edit',ch) "
>
<div class="remove-child-icon d-flex align-center">
<x-icon
v-if="(isForm || !isPublic) && !readOnly && _isUIAllowed('xcDatatableEditable')"
v-if="(isForm || !isPublic&& _isUIAllowed('xcDatatableEditable')) && !readOnly "
:tooltip="`Unlink this '${meta._tn}' from '${parentMeta._tn}'`"
:color="['error','grey']"
small

Loading…
Cancel
Save