pgo-ui 1.1.47 → 1.1.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Radio-B_-QJSkx.js +4 -0
- package/dist/{index-BJ-lrjAf.js → index-HmqNPZr5.js} +6463 -6133
- package/dist/index.es.js +71 -68
- package/dist/index.umd.js +57 -57
- package/package.json +1 -1
- package/src/components/examples/BarChartExample.vue +66 -0
- package/src/components/examples/BubbleChartExample.vue +62 -0
- package/src/components/examples/TreemapChartExample.vue +83 -0
- package/src/components/pgo/charts/BarChart.vue +137 -0
- package/src/components/pgo/charts/BubbleChart.vue +146 -0
- package/src/components/pgo/charts/TreemapChart.vue +116 -0
- package/src/components/pgo/forms/DynamicForm.vue +5 -2
- package/src/components/pgo/index.ts +7 -1
- package/src/pgo-components/pages/Dashboard.vue +94 -3
- package/src/pgo-components/pages/ListView.vue +4 -1
- package/dist/Radio-BUt_d2pT.js +0 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="mx-auto m-4">
|
|
3
3
|
<Breadcrumb class="mb-3" />
|
|
4
4
|
|
|
5
|
-
<div class="grid grid-cols-1 md:grid-cols-
|
|
5
|
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
6
6
|
<Card
|
|
7
7
|
card-class="border-none"
|
|
8
8
|
bg="vts-bg-surface-elevated"
|
|
@@ -55,15 +55,83 @@
|
|
|
55
55
|
:height="280"
|
|
56
56
|
/>
|
|
57
57
|
</Card>
|
|
58
|
+
|
|
59
|
+
<Card
|
|
60
|
+
card-class="border-none"
|
|
61
|
+
bg="vts-bg-surface-elevated"
|
|
62
|
+
padding="p-4"
|
|
63
|
+
shadow="shadow-lg"
|
|
64
|
+
>
|
|
65
|
+
<h3 :class="['text-lg font-semibold mb-2', lang === 'dv' ? 'faruma text-right' : 'eng-font text-left']">
|
|
66
|
+
{{ lang === 'dv' ? 'ޑިޕާޓްމަންޓް ތަފާސް ހިސާބު' : 'Department Overview' }}
|
|
67
|
+
</h3>
|
|
68
|
+
<BarChart
|
|
69
|
+
:series="departmentStats"
|
|
70
|
+
:categories="departments"
|
|
71
|
+
:colors="['#3B82F6', '#F59E0B']"
|
|
72
|
+
:height="280"
|
|
73
|
+
/>
|
|
74
|
+
</Card>
|
|
75
|
+
|
|
76
|
+
<Card
|
|
77
|
+
card-class="border-none"
|
|
78
|
+
bg="vts-bg-surface-elevated"
|
|
79
|
+
padding="p-4"
|
|
80
|
+
shadow="shadow-lg"
|
|
81
|
+
>
|
|
82
|
+
<h3 :class="['text-lg font-semibold mb-2', lang === 'dv' ? 'faruma text-right' : 'eng-font text-left']">
|
|
83
|
+
{{ lang === 'dv' ? 'މައްސަލައިގެ ކޮމްޕްލެކްސިޓީ' : 'Case Complexity' }}
|
|
84
|
+
</h3>
|
|
85
|
+
<BubbleChart
|
|
86
|
+
:series="caseComplexity"
|
|
87
|
+
:xaxis-title="{ en: 'Duration (days)', dv: 'މުއްދަތު (ދުވަސް)' }"
|
|
88
|
+
:yaxis-title="{ en: 'Severity', dv: 'ސީރިއަސްކަން' }"
|
|
89
|
+
:colors="['#3B82F6', '#EF4444']"
|
|
90
|
+
:height="280"
|
|
91
|
+
/>
|
|
92
|
+
</Card>
|
|
93
|
+
|
|
94
|
+
<Card
|
|
95
|
+
card-class="border-none"
|
|
96
|
+
bg="vts-bg-surface-elevated"
|
|
97
|
+
padding="p-4"
|
|
98
|
+
shadow="shadow-lg"
|
|
99
|
+
>
|
|
100
|
+
<h3 :class="['text-lg font-semibold mb-2', lang === 'dv' ? 'faruma text-right' : 'eng-font text-left']">
|
|
101
|
+
{{ lang === 'dv' ? 'ބައިތައް' : 'Category Breakdown' }}
|
|
102
|
+
</h3>
|
|
103
|
+
<TreemapChart
|
|
104
|
+
:series="categoryBreakdown"
|
|
105
|
+
:height="280"
|
|
106
|
+
/>
|
|
107
|
+
</Card>
|
|
58
108
|
</div>
|
|
59
109
|
</div>
|
|
60
110
|
</template>
|
|
61
111
|
|
|
62
112
|
<script setup>
|
|
63
|
-
import { computed, inject } from 'vue'
|
|
64
|
-
import { Breadcrumb, DonutChart, LineChart } from '../../components/pgo'
|
|
113
|
+
import { computed, inject, onMounted, ref } from 'vue'
|
|
114
|
+
import { Breadcrumb, BarChart, BubbleChart, DonutChart, LineChart, TreemapChart } from '../../components/pgo'
|
|
65
115
|
import Card from '../../components/pgo/Card.vue'
|
|
66
116
|
|
|
117
|
+
// Mount charts only once the grid container has a real width.
|
|
118
|
+
// ResizeObserver fires after CSS layout (including drawer animations) settles,
|
|
119
|
+
// so ApexCharts always measures correct container dimensions on first mount.
|
|
120
|
+
const gridRef = ref(null)
|
|
121
|
+
const chartsReady = ref(false)
|
|
122
|
+
|
|
123
|
+
onMounted(() => {
|
|
124
|
+
let timer
|
|
125
|
+
const observer = new ResizeObserver(() => {
|
|
126
|
+
clearTimeout(timer)
|
|
127
|
+
timer = setTimeout(() => {
|
|
128
|
+
chartsReady.value = true
|
|
129
|
+
observer.disconnect()
|
|
130
|
+
}, 150)
|
|
131
|
+
})
|
|
132
|
+
if (gridRef.value) observer.observe(gridRef.value)
|
|
133
|
+
})
|
|
134
|
+
|
|
67
135
|
const { language } = inject('i18n')
|
|
68
136
|
|
|
69
137
|
const props = defineProps({
|
|
@@ -91,4 +159,27 @@ const monthlyTrend = [
|
|
|
91
159
|
{ name: { en: 'Letters', dv: 'ސިޓީ' }, data: [40, 55, 70, 48, 90, 60] },
|
|
92
160
|
{ name: { en: 'Cases', dv: 'މައްސަލަ' }, data: [20, 35, 25, 50, 45, 65] }
|
|
93
161
|
]
|
|
162
|
+
|
|
163
|
+
const departments = ['Dept A', 'Dept B', 'Dept C', 'Dept D', 'Dept E']
|
|
164
|
+
|
|
165
|
+
const departmentStats = [
|
|
166
|
+
{ name: { en: 'Letters', dv: 'ސިޓީ' }, data: [35, 50, 65, 40, 80] },
|
|
167
|
+
{ name: { en: 'Cases', dv: 'މައްސަލަ' }, data: [15, 30, 20, 45, 35] }
|
|
168
|
+
]
|
|
169
|
+
|
|
170
|
+
const caseComplexity = [
|
|
171
|
+
{ name: { en: 'Criminal', dv: 'ޖިނާއީ' }, data: [[10, 30, 20], [25, 50, 35], [40, 40, 25], [55, 60, 40], [70, 45, 30]] },
|
|
172
|
+
{ name: { en: 'Civil', dv: 'މަދަނީ' }, data: [[15, 25, 15], [30, 35, 25], [45, 55, 20], [60, 30, 35], [75, 50, 45]] }
|
|
173
|
+
]
|
|
174
|
+
|
|
175
|
+
const categoryBreakdown = [
|
|
176
|
+
{ data: [
|
|
177
|
+
{ x: { en: 'Criminal', dv: 'ޖިނާއީ' }, y: 120 },
|
|
178
|
+
{ x: { en: 'Civil', dv: 'މަދަނީ' }, y: 85 },
|
|
179
|
+
{ x: { en: 'Family', dv: 'ޢާއިލީ' }, y: 60 },
|
|
180
|
+
{ x: { en: 'Commercial', dv: 'ވިޔަފާރީ' }, y: 45 },
|
|
181
|
+
{ x: { en: 'Administrative', dv: 'އިދާރީ' }, y: 30 },
|
|
182
|
+
{ x: { en: 'Other', dv: 'އެހެނިހެން' }, y: 20 }
|
|
183
|
+
]}
|
|
184
|
+
]
|
|
94
185
|
</script>
|
|
@@ -561,11 +561,14 @@ const fetchData = async (queryParams = {}) => {
|
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
563
|
|
|
564
|
-
const formClose = () => {
|
|
564
|
+
const formClose = (hasChanges = false) => {
|
|
565
565
|
showDynamicForm.value = false
|
|
566
566
|
editItemId.value = null
|
|
567
567
|
LForm.value = {}
|
|
568
568
|
formMode.value = ''
|
|
569
|
+
if (hasChanges) {
|
|
570
|
+
fetchData({ page: options.value.page, per_page: options.value.itemsPerPage })
|
|
571
|
+
}
|
|
569
572
|
}
|
|
570
573
|
// Handle options update from DataTable
|
|
571
574
|
const handleOptionsUpdate = (newOptions) => {
|
package/dist/Radio-BUt_d2pT.js
DELETED