fix: show details that have value
This commit is contained in:
parent
fe6aaef206
commit
b691c6657f
@ -117,6 +117,7 @@
|
||||
import EditIcon from '@/components/Icons/EditIcon.vue'
|
||||
import OrganizationsIcon from '@/components/Icons/OrganizationsIcon.vue'
|
||||
import Link from '@/components/Controls/Link.vue'
|
||||
import { organizationsStore } from '@/stores/organizations'
|
||||
import { FormControl, Dialog, call, FeatherIcon } from 'frappe-ui'
|
||||
import { ref, defineModel, nextTick, watch, computed } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
@ -138,7 +139,7 @@ const props = defineProps({
|
||||
|
||||
const router = useRouter()
|
||||
const show = defineModel()
|
||||
const organizations = defineModel('reloadOrganizations')
|
||||
const { organizations } = organizationsStore()
|
||||
|
||||
const title = ref(null)
|
||||
const detailMode = ref(false)
|
||||
@ -240,7 +241,7 @@ const dialogOptions = computed(() => {
|
||||
})
|
||||
|
||||
const fields = computed(() => {
|
||||
return [
|
||||
let details = [
|
||||
{
|
||||
icon: OrganizationsIcon,
|
||||
name: 'organization_name',
|
||||
@ -267,6 +268,8 @@ const fields = computed(() => {
|
||||
value: _organization.value.industry,
|
||||
},
|
||||
]
|
||||
|
||||
return details.filter((field) => field.value)
|
||||
})
|
||||
|
||||
watch(
|
||||
|
||||
@ -219,7 +219,6 @@
|
||||
</div>
|
||||
<OrganizationModal
|
||||
v-model="showOrganizationModal"
|
||||
v-model:reloadOrganizations="organizations"
|
||||
:organization="organization"
|
||||
:options="{ detailMode }"
|
||||
/>
|
||||
|
||||
@ -40,7 +40,6 @@
|
||||
<OrganizationsListView :rows="rows" :columns="columns" />
|
||||
<OrganizationModal
|
||||
v-model="showOrganizationModal"
|
||||
v-model:reloadOrganizations="organizations"
|
||||
:organization="{}"
|
||||
/>
|
||||
</template>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user