Skip to content
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

rebase #27

Merged
merged 4 commits into from
Aug 20, 2024
Merged
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
8 changes: 7 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
if ! has nix_direnv_version || ! nix_direnv_version 3.0.5; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.5/direnvrc" "sha256-RuwIS+QKFj/T9M2TFXScjBsLR6V3A17YVoEW/Q6AZ1w="
fi
if id "alex" >/dev/null 2>&1; then
echo 'Hello Alex!'
use flake

else
export_alias sail 'sh $([ -f sail ] && echo sail || echo vendor/bin/sail)'
use flake github:loophp/nix-shell#env-php83 --impure
use flake "github:the-nix-way/dev-templates?dir=node"
fi
27 changes: 25 additions & 2 deletions resources/js/Components/POS/DashboardButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,37 @@ const props = defineProps({
route: {
type: String,
default: ''
},
icon: {
type: String,
default: ''
}
});
</script>

<template>
<Link :href="route">
<div class="px-10 py-8 rounded-lg bg-primary text-white font-semibold text-xl active:bg-primary-active-color cursor-pointer select-none">
<div class="
h-full
px-10
py-8
rounded-lg
bg-white
shadow
border-gray-400
text-black
font-semibold
text-xl
cursor-pointer
select-none
relative
text-right
hover:bg-gray-100
duration-200
overflow-hidden
">
<span class="absolute opacity-10 left-5 text-[4rem] -bottom-4 lg:-bottom-10 lg:text-[9rem]" :class="icon"></span>
{{ label }}
</div>
</Link>
</template>
</template>
8 changes: 5 additions & 3 deletions resources/js/Layouts/POSLayout.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script setup lang="ts">
<script setup>
import Button from "primevue/button";
import Menu from "primevue/menu";
import { Link } from "@inertiajs/vue3";
Expand All @@ -17,7 +17,7 @@ const toggleUserMenu = (event) => {
</script>

<template>
<div class="min-h-screen w-full flex flex-col bg-gray-200">
<div class="min-h-screen lg:h-screen w-full flex flex-col bg-gray-200">
<div class="p-4 flex flex-row items-center">
<!-- <Button icon="pi pi-bars" class="p-button-rounded p-button-text" /> -->
<div class="flex-grow text-center text-slate-500 font-semibold text-lg">
Expand All @@ -35,6 +35,8 @@ const toggleUserMenu = (event) => {
</template>
</Menu>
</div>
<slot></slot>
<div class="flex-1">
<slot></slot>
</div>
</div>
</template>
20 changes: 12 additions & 8 deletions resources/js/Pages/POS/Dashboard.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
<script lang="ts" setup>
<script setup>
import { Head, Link } from "@inertiajs/vue3";
import POSLayout from "@/Layouts/POSLayout.vue";
import DashboardButton from "@/Components/POS/DashboardButton.vue";

defineOptions({
layout: POSLayout,
});
</script>

const buttons = [
{ label: "Lookup Attendee", route: '#', icon: 'pi pi-id-card' },
{ label: "Badge List", route: '#', icon: 'pi pi-database' },
{ label: "Cash Register", route: '#', icon: 'pi pi-euro' },
{ label: "Logout", route: '#', icon: 'pi pi-wallet' },
];
</script>sd

<template>
<Head>
<title>POS - Dashboard</title>
</Head>
<div class="grow flex flex-col">
<div class="grow flex flex-wrap gap-10 justify-center items-center">
<DashboardButton label="Lookup Attendee" />
<DashboardButton label="Badge List" />
<DashboardButton label="Cash Register" />
</div>
<!-- Grid System for POS -->
<div class="grid lg:grid-cols-4 lg:grid-rows-4 gap-2 h-full px-4 pb-4">
<DashboardButton :label="i.label" :icon="i.icon" :route="i.route" v-for="i in buttons">test</DashboardButton>
</div>
</template>
Loading