generated from antfu-collective/vitesse
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor orders section * ✨ implement recent orders list * ✨ add trending products section refactor products section add new render functions * 💄 improve card ui * 💄 change default font to Inter * 💄 improve dashboard design for dark-mode * fix linting issues
- Loading branch information
Showing
32 changed files
with
320 additions
and
175 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
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
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
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
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,45 @@ | ||
<script setup lang="ts"> | ||
import { type DataTableColumns } from 'naive-ui/es/components' | ||
import type { RowData } from 'naive-ui/es/data-table/src/interface' | ||
import { OrderStatus } from '~/models/Order' | ||
import useRender from '~/composables/render' | ||
const { t } = useI18n() | ||
const store = useOrderStore() | ||
const { getStatusColor } = useOrders() | ||
const { renderPrice, renderTag } = useRender() | ||
onMounted(getItems) | ||
function getItems() { | ||
store.getRecentOrders(7) | ||
} | ||
const columns: DataTableColumns<RowData> = [ | ||
{ | ||
title: 'Customer', | ||
key: 'customer', | ||
}, | ||
{ | ||
title: 'Price', | ||
key: 'price', | ||
render: row => renderPrice(row.totalPrice, t('currencySign')), | ||
}, | ||
{ | ||
title: 'Status', | ||
key: 'status', | ||
fixed: 'right', | ||
width: 80, | ||
render: row => renderTag(row.status, getStatusColor(row.status), OrderStatus), | ||
}, | ||
] | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<n-data-table | ||
:bordered="false" :columns="columns" :data="store.orders" :loading="store.isLoading" | ||
:scroll-x="500" | ||
/> | ||
</div> | ||
</template> |
Empty file.
Oops, something went wrong.