Browse Source

refactor(gui-v2): move component into a folder

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3025/head
Pranav C 2 years ago
parent
commit
e991193a55
  1. 16
      packages/nc-gui-v2/components/smartsheet/expanded-form/Comments.vue
  2. 6
      packages/nc-gui-v2/components/smartsheet/expanded-form/index.vue
  3. 16
      packages/nc-gui-v2/composables/useExpandedFormStore.ts

16
packages/nc-gui-v2/components/smartsheet/expanded-form/Comments.vue

@ -0,0 +1,16 @@
<script setup lang="ts">
const loadComments = async () => {
const data = await this.$api.utils.commentList({
row_id: this.meta.columns
.filter((c) => c.pk)
.map((c) => this.localState[c.title])
.join('___'),
fk_model_id: this.meta.id,
comments_only: this.commentsOnly,
})
}
</script>
<template></template>
<style scoped></style>

6
packages/nc-gui-v2/components/smartsheet/ExpandedForm.vue → packages/nc-gui-v2/components/smartsheet/expanded-form/index.vue

@ -58,9 +58,7 @@ const drawerToggleIcon = computed(() => (commentsDrawer.value ? MdiDoorOpen : Md
</div>
<div class="nc-comments-drawer min-w-0 h-full" :class="{ active: commentsDrawer }">
<div class="w-[250px]">
dsdsssdsdsdd
</div>
<div class="w-[250px]">dsdsssdsdsdd</div>
</div>
</div>
</a-card>
@ -73,7 +71,7 @@ const drawerToggleIcon = computed(() => (commentsDrawer.value ? MdiDoorOpen : Md
}
:deep(.ant-modal-body) {
@apply !bg-gray-100
@apply !bg-gray-100;
}
.nc-comments-drawer {

16
packages/nc-gui-v2/composables/useExpandedFormStore.ts

@ -0,0 +1,16 @@
import { useInjectionState, } from '#imports'
const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState(() => {
},'expanded-form-store')
export { useProvideExpandedFormStore }
export function useExpandedFormStoreOrThrow() {
const expandedFormStore = useExpandedFormStore()
if (expandedFormStore == null) throw new Error('Please call `useExpandedFormStore` on the appropriate parent component')
return expandedFormStore
}
Loading…
Cancel
Save