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