Skip to content

Commit

Permalink
feat: add functions to table mobile design
Browse files Browse the repository at this point in the history
  • Loading branch information
phojie committed Jan 11, 2023
1 parent af3383b commit 6e03539
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions resources/js/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ declare module '@vue/runtime-core' {
HeroiconsCheck: typeof import('~icons/heroicons/check')['default']
HeroiconsCheck20Solid: typeof import('~icons/heroicons/check20-solid')['default']
HeroiconsCheckCircle20Solid: typeof import('~icons/heroicons/check-circle20-solid')['default']
HeroiconsChevronDoubleRight20Solid: typeof import('~icons/heroicons/chevron-double-right20-solid')['default']
HeroiconsChevronDown: typeof import('~icons/heroicons/chevron-down')['default']
HeroiconsChevronDown20Solid: typeof import('~icons/heroicons/chevron-down20-solid')['default']
HeroiconsChevronUpDown: typeof import('~icons/heroicons/chevron-up-down')['default']
Expand Down
12 changes: 9 additions & 3 deletions resources/js/components/Admin/Index/AdminIndexTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,24 @@ const getById = async (id: string) => {
<div class="shadow sm:hidden">
<ul role="list" class="overflow-hidden divide-y divide-gray-200 shadow sm:hidden">
<li v-for="transaction in transactions" :key="transaction.id">
<a :href="transaction.href" class="block px-4 py-4 bg-white hover:bg-gray-50">
<a
v-if="useGate().can('order-update')"
v-tooltip="'Open order'"
href="#"
class="block px-4 py-4 bg-white hover:bg-gray-50"
@click="getById(transaction.id)"
>
<span class="flex items-center space-x-4">
<span class="flex flex-1 space-x-2 truncate">
<heroicons-banknotes class="flex-shrink-0 w-5 h-5 text-gray-400" aria-hidden="true" />
<heroicons-shopping-cart class="flex-shrink-0 w-5 h-5 text-gray-400" aria-hidden="true" />
<span class="flex flex-col text-sm text-gray-500 truncate">
<span class="truncate">{{ transaction.name }}</span>
<span><span class="font-medium text-gray-900">{{ transaction.amount }}</span> {{
transaction.currency }}</span>
<time :datetime="transaction.datetime">{{ useDateFormat(transaction.date, 'MMM DD, YYYY | hh:mm a ').value }}</time>
</span>
</span>
<heroicons-banknotes-20-solid class="flex-shrink-0 w-5 h-5 text-gray-400" aria-hidden="true" />
<heroicons-chevron-double-right-20-solid class="flex-shrink-0 w-5 h-5 text-gray-400" aria-hidden="true" />
</span>
</a>
</li>
Expand Down
1 change: 1 addition & 0 deletions resources/js/components/Chart/ChartBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const chartOptions = computed(() => {
rect.highcharts-point.highcharts-color-0 {
@apply !fill-current !text-primary-500;
}
svg.highcharts-root {
@apply !font-sans;
}
Expand Down

0 comments on commit 6e03539

Please sign in to comment.