fix: allow adding/editing icon from view modal
This commit is contained in:
parent
fa93cacd9e
commit
79fc7572bc
@ -21,20 +21,37 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<template #body-content>
|
<template #body-content>
|
||||||
<FormControl
|
<div class="mb-1.5 block text-base text-gray-600">
|
||||||
variant="outline"
|
{{ __('View Name') }}
|
||||||
size="md"
|
</div>
|
||||||
type="text"
|
<div class="flex gap-2">
|
||||||
:label="__('View Name')"
|
<IconPicker v-model="view.icon" v-slot="{ isOpen, togglePopover }">
|
||||||
:placeholder="__('My Open Deals')"
|
<Button
|
||||||
v-model="view.label"
|
variant="outline"
|
||||||
/>
|
size="md"
|
||||||
|
class="flex size-8 text-2xl leading-none"
|
||||||
|
:class="isOpen ? 'bg-gray-200' : 'hover:bg-gray-100'"
|
||||||
|
@click="togglePopover"
|
||||||
|
>
|
||||||
|
{{ view.icon }}
|
||||||
|
</Button>
|
||||||
|
</IconPicker>
|
||||||
|
<TextInput
|
||||||
|
class="flex-1"
|
||||||
|
variant="outline"
|
||||||
|
size="md"
|
||||||
|
type="text"
|
||||||
|
:placeholder="__('My Open Deals')"
|
||||||
|
v-model="view.label"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { call } from 'frappe-ui'
|
import IconPicker from '@/components/IconPicker.vue'
|
||||||
|
import { call, TextInput } from 'frappe-ui'
|
||||||
import { ref, watch, nextTick } from 'vue'
|
import { ref, watch, nextTick } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -60,6 +77,7 @@ const duplicateMode = ref(false)
|
|||||||
const _view = ref({
|
const _view = ref({
|
||||||
name: '',
|
name: '',
|
||||||
label: '',
|
label: '',
|
||||||
|
icon: '',
|
||||||
filters: {},
|
filters: {},
|
||||||
order_by: 'modified desc',
|
order_by: 'modified desc',
|
||||||
columns: '',
|
columns: '',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user