chore: use vite plugins from frappe-ui

This commit is contained in:
Jannat Patel
2025-03-19 22:26:58 +05:30
parent c6e658e26b
commit 04cbd6a1d8
16 changed files with 619 additions and 1609 deletions

View File

@@ -5,6 +5,7 @@ import AssignmentBlock from '@/components/AssignmentBlock.vue'
import translationPlugin from '../translation'
import { usersStore } from '@/stores/user'
import router from '../router'
import { FrappeUI, setConfig, frappeRequest, pageMetaPlugin } from 'frappe-ui'
export class Assignment {
constructor({ data, api, readOnly }) {
@@ -46,8 +47,11 @@ export class Assignment {
const app = createApp(AssignmentBlock, {
assignmentID: assignment,
})
app.use(FrappeUI)
setConfig('resourceFetcher', frappeRequest)
app.use(translationPlugin)
app.use(router)
app.use(pageMetaPlugin)
const { userResource } = usersStore()
app.provide('$user', userResource)
app.mount(this.wrapper)