fix: load dashboard layout from CRM Dashboard doctype and render
This commit is contained in:
parent
ed2208fe75
commit
fd38f0ac98
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="h-full w-full">
|
||||
<div
|
||||
v-if="item.type == 'number-card'"
|
||||
v-if="item.type == 'number_card'"
|
||||
class="rounded shadow overflow-hidden cursor-pointer"
|
||||
>
|
||||
<Tooltip :text="item.tooltip">
|
||||
@ -9,20 +9,20 @@
|
||||
</Tooltip>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="item.type == 'blank-card'"
|
||||
v-else-if="item.type == 'blank_card'"
|
||||
class="rounded bg-surface-white h-full overflow-hidden text-ink-gray-5 flex items-center justify-center"
|
||||
:class="editing ? 'border border-dashed border-outline-gray-2' : ''"
|
||||
>
|
||||
{{ editing ? __('Blank card') : '' }}
|
||||
</div>
|
||||
<div
|
||||
v-else-if="item.type == 'axis-card'"
|
||||
v-else-if="item.type == 'axis_card'"
|
||||
class="h-full w-full rounded-md bg-surface-white shadow"
|
||||
>
|
||||
<AxisChart v-if="item.data" :config="item.data" />
|
||||
</div>
|
||||
<div
|
||||
v-else-if="item.type == 'donut-card'"
|
||||
v-else-if="item.type == 'donut_card'"
|
||||
class="h-full w-full rounded-md bg-surface-white shadow overflow-hidden"
|
||||
>
|
||||
<DonutChart v-if="item.data" :config="item.data" />
|
||||
|
||||
@ -19,7 +19,6 @@
|
||||
<LucidePenLine class="size-4" />
|
||||
</template>
|
||||
</Button>
|
||||
<Button v-if="editing" :label="__('Cancel')" @click="cancel" />
|
||||
<Button
|
||||
v-if="editing"
|
||||
variant="solid"
|
||||
@ -215,8 +214,8 @@ const options = computed(() => [
|
||||
])
|
||||
|
||||
const dashboardItems = createResource({
|
||||
url: 'crm.api.dashboard.get_dashboard_items',
|
||||
cache: ['Analytics', 'DashboardItems'],
|
||||
url: 'crm.api.dashboard.get_dashboard',
|
||||
cache: ['Analytics', 'ManagerDashboard'],
|
||||
makeParams() {
|
||||
return {
|
||||
from_date: fromDate.value,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user