Skip to content

modified: src/components/layout/AppSidebar.vue #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .idx/dev.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{pkgs}: {
channel = "stable-24.05";
packages = [
pkgs.nodejs_20
];
idx.extensions = [
"svelte.svelte-vscode"
"vue.volar"
];
idx.previews = {
previews = {
web = {
command = [
"npm"
"run"
"dev"
"--"
"--port"
"$PORT"
"--host"
"0.0.0.0"
];
manager = "web";
};
};
};
}
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<template>
<ThemeProvider>
<SidebarProvider>
<RouterView />
</SidebarProvider>
<RouterView />
</ThemeProvider>
</template>

<script setup lang="ts">
import ThemeProvider from './components/layout/ThemeProvider.vue'
import SidebarProvider from './components/layout/SidebarProvider.vue'
import { RouterView } from 'vue-router';

</script>
86 changes: 86 additions & 0 deletions src/components/cases/RecentCases.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<template>
<div class="overflow-x-auto">
<table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
<thead class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
<tr>
<th scope="col" class="px-6 py-3">
Case ID
</th>
<th scope="col" class="px-6 py-3">
Case Type
</th>
<th scope="col" class="px-6 py-3">
Date Reported
</th>
<th scope="col" class="px-6 py-3">
Status
</th>
<th scope="col" class="px-6 py-3">
Assignee
</th>
</tr>
</thead>
<tbody>
<tr v-for="caseItem in recentCases" :key="caseItem.caseId" class="bg-white border-b dark:bg-gray-800 dark:border-gray-700">
<td class="px-6 py-4">
{{ caseItem.caseId }}
</td>
<td class="px-6 py-4">
{{ caseItem.caseType }}
</td>
<td class="px-6 py-4">
{{ caseItem.dateReported }}
</td>
<td class="px-6 py-4">
{{ caseItem.status }}
</td>
<td class="px-6 py-4">
{{ caseItem.assignee }}
</td>
</tr>
</tbody>
</table>
</div>
</template>

<script setup>
import { ref } from 'vue';

const recentCases = ref([
{
caseId: 'CASE-001',
caseType: 'Injury',
dateReported: '2023-11-20',
status: 'Investigating',
assignee: 'John Doe',
},
{
caseId: 'CASE-002',
caseType: 'HR Violation',
dateReported: '2023-11-18',
status: 'Reported',
assignee: 'Jane Smith',
},
{
caseId: 'CASE-003',
caseType: 'Legal Issue',
dateReported: '2023-11-15',
status: 'Pending Review',
assignee: 'Mike Johnson',
},
{
caseId: 'CASE-004',
caseType: 'Property Damage',
dateReported: '2023-11-12',
status: 'Resolved',
assignee: 'Emily Davis',
},
{
caseId: 'CASE-005',
caseType: 'Safety Hazard',
dateReported: '2023-11-10',
status: 'Closed',
assignee: 'David Wilson',
},
]);
</script>
28 changes: 12 additions & 16 deletions src/components/layout/AdminLayout.vue
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
<template>
<div class="min-h-screen xl:flex">
<app-sidebar />
<Backdrop />
<div
class="flex-1 transition-all duration-300 ease-in-out"
:class="[isExpanded || isHovered ? 'lg:ml-[290px]' : 'lg:ml-[90px]']"
>
<app-header />
<div class="p-4 mx-auto max-w-(--breakpoint-2xl) md:p-6">
<slot></slot>
</div>
<div class="relative flex">
<div class="flex-none">
<AppSidebar class="block"/>
</div>
<div class="flex-1">
<AppHeader />
<div class="p-5">
<RouterView />
</div>
</div>
</div>
</template>

<script setup>
import AppSidebar from './AppSidebar.vue'
import AppHeader from './AppHeader.vue'
import { useSidebar } from '@/composables/useSidebar'
import Backdrop from './Backdrop.vue'
const { isExpanded, isHovered } = useSidebar()
import AppHeader from './AppHeader.vue';
import AppSidebar from './AppSidebar.vue';
import { RouterView } from 'vue-router'
</script>
Loading