chore: add v16 support

This commit is contained in:
Ritvik Sardana
2025-11-28 15:21:26 +05:30
parent d15fefd620
commit 825ec55d80
8 changed files with 29 additions and 23 deletions

View File

@@ -41,8 +41,8 @@
</template>
<script setup>
import { Popover, createResource } from "frappe-ui";
import AppsIcon from "./icons/AppsIcon.vue";
import ChevronRight from "~icons/lucide/chevron-right";
import AppsIcon from "./icons/AppsIcon.vue";
const apps = createResource({
url: "frappe.apps.get_apps",
@@ -54,7 +54,7 @@ const apps = createResource({
name: "frappe",
logo: "/assets/helpdesk/desk/desk.png",
title: "Desk",
route: "/app",
route: "/desk/helpdesk",
},
];
data.map((app) => {

View File

@@ -22,7 +22,7 @@
</template>
</Button>
</div>
<div class="text-gray-600 w-4/6" v-else>
<div class="text-gray-600 w-4/6 text-p-base" v-else>
<span class="font-medium text-gray-800">
{{ user }}
</span>

View File

@@ -136,7 +136,16 @@
<script setup lang="ts">
import { Link } from "@/components";
import { useAuthStore } from "@/stores/auth";
import { AxisChart, DonutChart, NumberChart } from "frappe-ui";
import {
AxisChart,
DateRangePicker,
DonutChart,
Dropdown,
NumberChart,
createResource,
dayjs,
usePageMeta,
} from "frappe-ui";
import { computed, h, onMounted, reactive, ref, watch } from "vue";
const { isManager, userId } = useAuthStore();

View File

@@ -1,5 +1,17 @@
{
"extends": "frappe-ui/tsconfig.base.json",
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
},
"types": [
"unplugin-icons/types/vue",
"vite/client"
],
},
"extends":"frappe-ui/tsconfig.base.json",
"include": ["src","src/*","src/**/*.d.ts", "src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx","src/**/*.vue"],
"exclude": ["node_modules"]
}

View File

@@ -4,7 +4,7 @@ from frappe import _
from helpdesk.utils import agent_only
HD_TICKET = "HD Ticket"
COUNT_NAME = "count(name) as count"
COUNT_NAME = {"COUNT": "name", "as": "count"}
COUNT_DESC = "count desc"

View File

@@ -217,9 +217,7 @@ def get_list_data(
"columns": columns,
"rows": rows,
"fields": fields if doctype == "HD Ticket" else [],
"total_count": frappe.get_list(
doctype, filters=filters, fields="count(*) as count"
)[0].count,
"total_count": frappe.db.count(doctype, filters=filters),
"row_count": len(data),
"group_by_field": group_by_field,
"view_type": view_type,

View File

@@ -1,19 +1,6 @@
import frappe
@frappe.whitelist()
def get_first_sla():
"""Get SLA created by the current user except the default SLA"""
sla = frappe.get_all(
"HD Service Level Agreement",
filters={"name": ["!=", "Default"], "owner": ["=", frappe.session.user]},
fields=["name"],
order_by="creation asc",
limit=1,
)
return bool(sla)
@frappe.whitelist()
def get_first_ticket():
"""Get first ticket created except the default ticket"""

View File

@@ -34,7 +34,7 @@ class TicketSummary:
"HD Ticket Status",
filters={"enabled": 1},
fields=["label_agent", "color"],
order_by="`order` asc, label_agent asc",
order_by="order asc, label_agent asc",
)
self.statuses = [status.label_agent for status in status_data]