-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* can be used to show onboarding steps * pin important charts & dashboards
- Loading branch information
1 parent
40228b4
commit 705628d
Showing
11 changed files
with
214 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script setup> | ||
import auth from '@/utils/auth' | ||
import HomeQuickActions from './HomeQuickActions.vue' | ||
import HomePinnedItems from './HomePinnedItems.vue' | ||
import HomeRecentActivity from './HomeRecentActivity.vue' | ||
import { inject } from 'vue' | ||
const $dayjs = inject('$dayjs') | ||
const today = $dayjs().format('dddd, D MMMM') | ||
</script> | ||
|
||
<template> | ||
<div class="flex flex-1 flex-col space-y-8 overflow-hidden bg-white p-8"> | ||
<div class="space-y-2"> | ||
<div class="text-3xl font-bold text-gray-900">Hello {{ auth.user.first_name }}, 👋</div> | ||
<div class="text-lg text-gray-600">{{ today }}</div> | ||
</div> | ||
<HomeQuickActions></HomeQuickActions> | ||
<HomePinnedItems></HomePinnedItems> | ||
<HomeRecentActivity></HomeRecentActivity> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<template> | ||
<div> | ||
<div class="flex items-center space-x-2"> | ||
<div class="rounded bg-gray-100 p-1"> | ||
<FeatherIcon name="bookmark" class="h-4 w-4" /> | ||
</div> | ||
<div class="text-lg">Pinned Items</div> | ||
</div> | ||
<div class="mt-4 grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-4"> | ||
<div | ||
class="col-span-1 flex cursor-pointer items-center space-x-2 rounded border border-dashed bg-gray-50 p-4 transition-all hover:border-gray-400" | ||
> | ||
<div class="rounded p-1"> | ||
<FeatherIcon name="plus" class="h-4 w-4 text-gray-600" /> | ||
</div> | ||
<div class="text-lg font-medium text-gray-600">Pin an item</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<template> | ||
<div> | ||
<div class="flex items-center space-x-2"> | ||
<div class="rounded bg-gray-100 p-1"> | ||
<FeatherIcon name="arrow-up-right" class="h-4 w-4" /> | ||
</div> | ||
<div class="text-lg">Quick Actions</div> | ||
</div> | ||
<div class="mt-4 grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-4"> | ||
<div | ||
class="col-span-1 flex cursor-pointer items-center justify-between rounded border border-transparent bg-white p-4 shadow transition-all hover:border-gray-400" | ||
> | ||
<div class="text-lg font-medium text-gray-900">Create a Query</div> | ||
<div class="rounded bg-gray-100 p-1"> | ||
<FeatherIcon name="plus" class="h-4 w-4 text-gray-900" /> | ||
</div> | ||
</div> | ||
<div | ||
class="col-span-1 flex cursor-pointer items-center justify-between rounded border border-transparent bg-white p-4 shadow transition-all hover:border-gray-400" | ||
> | ||
<div class="text-lg font-medium text-gray-900">Create a Page</div> | ||
<div class="rounded bg-gray-100 p-1"> | ||
<FeatherIcon name="plus" class="h-4 w-4 text-gray-900" /> | ||
</div> | ||
</div> | ||
<div | ||
class="col-span-1 flex cursor-pointer items-center justify-between rounded border border-transparent bg-white p-4 shadow transition-all hover:border-gray-400" | ||
> | ||
<div class="text-lg font-medium text-gray-900">Create a Dashboard</div> | ||
<div class="rounded bg-gray-100 p-1"> | ||
<FeatherIcon name="plus" class="h-4 w-4 text-gray-900" /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<script setup> | ||
import { ref, inject } from 'vue' | ||
import { call } from 'frappe-ui' | ||
const $dayjs = inject('$dayjs') | ||
const activities = ref([]) | ||
call('insights.api.get_recent_activity').then((data) => { | ||
activities.value = data.map((d) => { | ||
return { | ||
...d, | ||
modified: $dayjs(d.modified).fromNow(), | ||
} | ||
}) | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div class="flex flex-col overflow-hidden"> | ||
<div class="flex items-center space-x-2"> | ||
<div class="rounded bg-gray-100 p-1"> | ||
<FeatherIcon name="clock" class="h-4 w-4" /> | ||
</div> | ||
<div class="text-lg">Activity</div> | ||
</div> | ||
<div class="mt-4 flex-1 space-y-6 overflow-y-scroll"> | ||
<div | ||
v-for="(activity, i) in activities" | ||
:key="i" | ||
class="flex w-fit cursor-pointer items-center space-x-4" | ||
> | ||
<div class="flex-shrink-0"> | ||
<Avatar size="xl" :label="activity.owner" /> | ||
</div> | ||
<div class="flex flex-1 flex-col space-y-1"> | ||
<div class="flex items-center space-x-1"> | ||
<div class="font-medium text-gray-900">{{ activity.owner }}</div> | ||
<div class="text-gray-600">updated</div> | ||
<div class="font-medium text-gray-900"> | ||
{{ activity.ref_doctype }} | ||
{{ | ||
activity.docname !== activity.ref_doctype | ||
? `-- ${activity.docname}` | ||
: '' | ||
}} | ||
</div> | ||
</div> | ||
<div class="text-sm text-gray-600">{{ activity.modified }}</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.