fix: replaced preview switch with button
This commit is contained in:
parent
e354ed5e55
commit
545b601852
@ -16,18 +16,19 @@
|
|||||||
<template #body-content>
|
<template #body-content>
|
||||||
<div class="flex flex-col gap-3">
|
<div class="flex flex-col gap-3">
|
||||||
<div class="flex justify-between gap-2">
|
<div class="flex justify-between gap-2">
|
||||||
<FormControl
|
<Button
|
||||||
type="select"
|
|
||||||
class="w-1/4"
|
|
||||||
v-model="_doctype"
|
|
||||||
:options="['CRM Lead', 'CRM Deal']"
|
|
||||||
@change="reload"
|
|
||||||
/>
|
|
||||||
<Switch
|
|
||||||
v-model="preview"
|
|
||||||
:label="preview ? __('Hide preview') : __('Show preview')"
|
:label="preview ? __('Hide preview') : __('Show preview')"
|
||||||
size="sm"
|
@click="preview = !preview"
|
||||||
/>
|
/>
|
||||||
|
<div class="flex flex-row-reverse gap-2">
|
||||||
|
<Button
|
||||||
|
:loading="loading"
|
||||||
|
:label="__('Save')"
|
||||||
|
variant="solid"
|
||||||
|
@click="saveChanges"
|
||||||
|
/>
|
||||||
|
<Button :label="__('Reset')" @click="reload" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="tabs?.data">
|
<div v-if="tabs?.data">
|
||||||
<FieldLayoutEditor
|
<FieldLayoutEditor
|
||||||
@ -39,17 +40,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #actions>
|
|
||||||
<div class="flex flex-row-reverse gap-2">
|
|
||||||
<Button
|
|
||||||
:loading="loading"
|
|
||||||
:label="__('Save')"
|
|
||||||
variant="solid"
|
|
||||||
@click="saveChanges"
|
|
||||||
/>
|
|
||||||
<Button :label="__('Reset')" @click="reload" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
@ -57,7 +47,7 @@ import FieldLayout from '@/components/FieldLayout.vue'
|
|||||||
import FieldLayoutEditor from '@/components/FieldLayoutEditor.vue'
|
import FieldLayoutEditor from '@/components/FieldLayoutEditor.vue'
|
||||||
import { useDebounceFn } from '@vueuse/core'
|
import { useDebounceFn } from '@vueuse/core'
|
||||||
import { capture } from '@/telemetry'
|
import { capture } from '@/telemetry'
|
||||||
import { Dialog, Badge, Switch, call, createResource } from 'frappe-ui'
|
import { Dialog, Badge, call, createResource } from 'frappe-ui'
|
||||||
import { ref, watch, onMounted, nextTick } from 'vue'
|
import { ref, watch, onMounted, nextTick } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@ -16,18 +16,19 @@
|
|||||||
<template #body-content>
|
<template #body-content>
|
||||||
<div class="flex flex-col gap-5.5">
|
<div class="flex flex-col gap-5.5">
|
||||||
<div class="flex justify-between gap-2">
|
<div class="flex justify-between gap-2">
|
||||||
<FormControl
|
<Button
|
||||||
type="select"
|
|
||||||
class="w-1/4"
|
|
||||||
v-model="_doctype"
|
|
||||||
:options="['CRM Lead', 'CRM Deal', 'Contact', 'CRM Organization']"
|
|
||||||
@change="reload"
|
|
||||||
/>
|
|
||||||
<Switch
|
|
||||||
v-model="preview"
|
|
||||||
:label="preview ? __('Hide preview') : __('Show preview')"
|
:label="preview ? __('Hide preview') : __('Show preview')"
|
||||||
size="sm"
|
@click="preview = !preview"
|
||||||
/>
|
/>
|
||||||
|
<div class="flex flex-row-reverse gap-2">
|
||||||
|
<Button
|
||||||
|
:loading="loading"
|
||||||
|
:label="__('Save')"
|
||||||
|
variant="solid"
|
||||||
|
@click="saveChanges"
|
||||||
|
/>
|
||||||
|
<Button :label="__('Reset')" @click="reload" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="tabs.data?.[0]?.sections" class="flex gap-4">
|
<div v-if="tabs.data?.[0]?.sections" class="flex gap-4">
|
||||||
<SidePanelLayoutEditor
|
<SidePanelLayoutEditor
|
||||||
@ -66,17 +67,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #actions>
|
|
||||||
<div class="flex flex-row-reverse gap-2">
|
|
||||||
<Button
|
|
||||||
:loading="loading"
|
|
||||||
:label="__('Save')"
|
|
||||||
variant="solid"
|
|
||||||
@click="saveChanges"
|
|
||||||
/>
|
|
||||||
<Button :label="__('Reset')" @click="reload" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
@ -85,7 +75,7 @@ import SidePanelLayout from '@/components/SidePanelLayout.vue'
|
|||||||
import SidePanelLayoutEditor from '@/components/SidePanelLayoutEditor.vue'
|
import SidePanelLayoutEditor from '@/components/SidePanelLayoutEditor.vue'
|
||||||
import { useDebounceFn } from '@vueuse/core'
|
import { useDebounceFn } from '@vueuse/core'
|
||||||
import { capture } from '@/telemetry'
|
import { capture } from '@/telemetry'
|
||||||
import { Dialog, Badge, Switch, call, createResource } from 'frappe-ui'
|
import { Dialog, Badge, call, createResource } from 'frappe-ui'
|
||||||
import { ref, watch, onMounted, nextTick } from 'vue'
|
import { ref, watch, onMounted, nextTick } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user