fix: data import issues

This commit is contained in:
Jannat Patel
2025-11-26 14:14:09 +05:30
parent a98e8025c4
commit c846e36032
11 changed files with 144 additions and 5543 deletions

View File

@@ -17,7 +17,7 @@
"@editorjs/checklist": "^1.6.0",
"@editorjs/code": "^2.9.0",
"@editorjs/editorjs": "^2.29.0",
"@editorjs/embed": "^2.7.0",
"@editorjs/embed": "2.7.0",
"@editorjs/header": "^2.8.1",
"@editorjs/inline-code": "^1.5.0",
"@editorjs/nested-list": "^1.4.2",
@@ -33,7 +33,7 @@
"dayjs": "^1.11.6",
"dompurify": "^3.2.6",
"feather-icons": "^4.28.0",
"frappe-ui": "^0.1.216",
"frappe-ui": "github:frappe/frappe-ui#5e976a1753524030f93bc2a5880764ecdd135328",
"highlight.js": "^11.11.1",
"lucide-vue-next": "^0.383.0",
"markdown-it": "^14.0.0",

View File

@@ -1,44 +1,26 @@
<template>
<Popover placement="right-start" class="flex w-full" trigger="hover">
<template #target="{ togglePopover }">
<button
:class="[
'group w-full flex h-7 items-center justify-between rounded px-2 text-base text-ink-gray-7 hover:bg-surface-gray-2',
]"
<div
class="grid grid-cols-3 justify-between bg-surface-white"
>
<div key="name" class="py-1 px-2 hover:bg-surface-gray-2 rounded">
<router-link
:to="{
name: 'DataImportList',
query: {
step: 'list',
},
}"
>
<div class="flex gap-2">
<Wrench class="size-4 stroke-1.5 text-ink-gray-7" />
<span class="whitespace-nowrap">
{{ __('Configuration') }}
</span>
</div>
<ChevronRight class="h-4 w-4 stroke-1.5" />
</button>
</template>
<template #body-main>
<div class="text-base p-2">
<router-link
:to="{
name: 'DataImportList',
query: {
step: 'list',
},
}"
>
<div
class="flex items-center space-x-2 hover:bg-surface-gray-2 px-2 py-1 rounded-sm"
>
<ArrowDownToLine class="size-4 stroke-1.5 text-ink-gray-7" />
<div class="text-sm text-ink-gray-7">
{{ __('Data Import') }}
</div>
<div class="flex flex-col items-center space-y-1">
<ArrowDownToLine class="size-9 text-ink-gray-7 p-2 bg-surface-gray-2 rounded-md" />
<div class="text-sm text-ink-gray-7">
{{ __('Import') }}
</div>
</router-link>
</div>
</template>
</Popover>
</div>
</router-link>
</div>
</div>
</template>
<script setup>
import { Popover } from 'frappe-ui'
import { ArrowDownToLine, ChevronRight, Wrench } from 'lucide-vue-next'
</script>
<script setup lang="ts">
import { ArrowDownToLine } from 'lucide-vue-next'
</script>

View File

@@ -85,6 +85,7 @@ import {
User,
Settings,
Sun,
Wrench,
Zap,
} from 'lucide-vue-next'
@@ -170,7 +171,13 @@ const userDropdownOptions = computed(() => {
},
},
{
component: markRaw(Configuration),
label: "Configuration",
icon: Wrench,
submenu: [
{
component: markRaw(Configuration),
}
],
condition: () => {
return userResource.data?.is_moderator
},

View File

@@ -1,3 +1,3 @@
@import './assets/Inter/inter.css';
@import 'frappe-ui/src/style.css';
@import 'frappe-ui/style.css';
@import './styles/codemirror.css';

View File

@@ -1,7 +1,5 @@
import { io } from 'socket.io-client'
import { socketio_port } from '../../../../sites/common_site_config.json'
import { getCachedListResource } from 'frappe-ui/src/resources/listResource'
import { getCachedResource } from 'frappe-ui/src/resources/resources'
export function initSocket() {
let host = window.location.hostname
@@ -14,15 +12,6 @@ export function initSocket() {
withCredentials: true,
reconnectionAttempts: 5,
})
socket.on('refetch_resource', (data) => {
if (data.cache_key) {
let resource =
getCachedResource(data.cache_key) ||
getCachedListResource(data.cache_key)
if (resource) {
resource.reload()
}
}
})
return socket
}

View File

@@ -1,4 +1,4 @@
import frappeUIPreset from 'frappe-ui/src/tailwind/preset'
import frappeUIPreset from "frappe-ui/tailwind";
export default {
presets: [frappeUIPreset],

View File

@@ -16,6 +16,7 @@
"@/*": ["src/*"]
}
},
"extends": "frappe-ui/tsconfig.base.json",
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "src/*.d.ts"],
"references": [{ "path": "./tsconfig.node.json" }]
}

File diff suppressed because it is too large Load Diff