refactor: new data import flow
This commit is contained in:
@@ -17,20 +17,24 @@
|
||||
</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>
|
||||
</router-link>
|
||||
</div>
|
||||
<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>
|
||||
</router-link>
|
||||
</div>
|
||||
</template>
|
||||
</Popover>
|
||||
</template>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
class="sticky flex items-center justify-between top-0 z-10 border-b bg-surface-white px-3 py-2.5 sm:px-5"
|
||||
>
|
||||
<Breadcrumbs :items="breadcrumbs" />
|
||||
|
||||
|
||||
<Dropdown
|
||||
placement="start"
|
||||
side="bottom"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<DataImport
|
||||
:doctype="route.params.doctype"
|
||||
:importName="route.params.importName"
|
||||
:doctypeMap="doctypeMap"
|
||||
/>
|
||||
<DataImport
|
||||
:doctype="route.params.doctype"
|
||||
:importName="route.params.importName"
|
||||
:doctypeMap="doctypeMap"
|
||||
/>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { usePageMeta } from "frappe-ui"
|
||||
import { DataImport } from "frappe-ui/frappe"
|
||||
import { usePageMeta } from 'frappe-ui'
|
||||
import { DataImport } from 'frappe-ui/frappe'
|
||||
import { sessionStore } from '../stores/session'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
@@ -15,19 +15,19 @@ const { brand } = sessionStore()
|
||||
const route = useRoute()
|
||||
|
||||
const doctypeMap = {
|
||||
"LMS Course": {
|
||||
title: "Courses",
|
||||
listRoute: "/courses",
|
||||
pageRoute: `/courses/docname`
|
||||
},
|
||||
"LMS Batch": {
|
||||
title: "Batches",
|
||||
listRoute: "/batches"
|
||||
},
|
||||
"LMS Category": {
|
||||
title: "Categories",
|
||||
listRoute: "/lms"
|
||||
}
|
||||
'LMS Course': {
|
||||
title: 'Courses',
|
||||
listRoute: '/courses',
|
||||
pageRoute: `/courses/docname`,
|
||||
},
|
||||
'LMS Batch': {
|
||||
title: 'Batches',
|
||||
listRoute: '/batches',
|
||||
},
|
||||
'LMS Category': {
|
||||
title: 'Categories',
|
||||
listRoute: '/lms',
|
||||
},
|
||||
}
|
||||
|
||||
usePageMeta(() => {
|
||||
@@ -36,4 +36,4 @@ usePageMeta(() => {
|
||||
icon: brand.favicon,
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -259,7 +259,7 @@ const routes = [
|
||||
name: 'DataImport',
|
||||
component: () => import('@/pages/DataImport.vue'),
|
||||
props: true,
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
let router = createRouter({
|
||||
|
||||
Reference in New Issue
Block a user