Browse Source

geo map: work on popup

pull/5247/head
Daniel Spaude 2 years ago
parent
commit
855a5d0c88
No known key found for this signature in database
GPG Key ID: 654A3D1FA4F35FFE
  1. 56
      packages/nc-gui/components/smartsheet/MyPopupComponent.vue

56
packages/nc-gui/components/smartsheet/MyPopupComponent.vue

@ -2,6 +2,33 @@
import type { ColumnType, TableType } from 'nocodb-sdk'
import { isVirtualCol } from 'nocodb-sdk'
import type { Ref } from 'vue'
import {
ActiveViewInj,
ChangePageInj,
FieldsInj,
IsFormInj,
IsGalleryInj,
IsGridInj,
MetaInj,
NavigateDir,
OpenNewRecordFormHookInj,
PaginationDataInj,
ReloadRowDataHookInj,
ReloadViewDataHookInj,
ReloadViewMetaHookInj,
computed,
createEventHook,
extractPkFromRow,
inject,
isImage,
isLTAR,
nextTick,
onMounted,
provide,
ref,
useAttachment,
useViewData,
} from '#imports'
// import type { Row } from '~/lib'
// const props =
const props = defineProps<{
@ -46,6 +73,13 @@ console.log('rowStore', row.value.row)
// set() {},
// }
// }
const isRowEmpty = (record: any, col: any) => {
const val = record.row[col.title]
if (!val) return true
return Array.isArray(val) && val.length === 0
}
</script>
<template>
@ -58,8 +92,26 @@ console.log('rowStore', row.value.row)
<!-- FOO
{{ JSON.stringify(row) }} -->
<div v-for="col in fields" :key="col.id">
<LazySmartsheetVirtualCell v-if="isVirtualCol(col)" v-model="row.row[col.title]" :column="col" :row="row" />
<LazySmartsheetCell v-else v-model="row.row[col.title]" :column="col" :edit-enabled="false" :read-only="true" />
<div
v-if="!isRowEmpty(row, col) || isLTAR(col.uidt)"
class="flex flex-col space-y-1 px-4 mb-6 bg-gray-50 rounded-lg w-full"
>
<div class="flex flex-row w-full justify-start border-b-1 border-gray-100 py-2.5">
<div class="w-full text-gray-600">
<LazySmartsheetHeaderVirtualCell v-if="isVirtualCol(col)" :column="col" :hide-menu="true" />
<LazySmartsheetHeaderCell v-else :column="col" :hide-menu="true" />
</div>
</div>
<div class="flex flex-row w-full pb-3 pt-2 pl-2 items-center justify-start">
<LazySmartsheetVirtualCell v-if="isVirtualCol(col)" v-model="row.row[col.title]" :column="col" :row="row" />
<LazySmartsheetCell v-else v-model="row.row[col.title]" :column="col" :edit-enabled="false" :read-only="true" />
</div>
</div>
<!-- <LazySmartsheetVirtualCell v-if="isVirtualCol(col)" v-model="row.row[col.title]" :column="col" :row="row" />
<LazySmartsheetCell v-else v-model="row.row[col.title]" :column="col" :edit-enabled="false" :read-only="true" /> -->
<!-- {{ JSON.stringify(column) }} -->
<!-- <LazySmartsheetCell v-else v-model="row.row[column.title]" :column="column" :edit-enabled="false" :read-only="true" /> -->

Loading…
Cancel
Save