Removed deprecated transfer pages
All checks were successful
Continuous Integration / Update Development (push) Successful in 2m8s
All checks were successful
Continuous Integration / Update Development (push) Successful in 2m8s
This commit is contained in:
@@ -1,106 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import Badge from '@/components/ui/badge/Badge.vue';
|
||||
import Button from '@/components/ui/button/Button.vue';
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardFooter,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from '@/components/ui/card'
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@/components/ui/dialog'
|
||||
import { Combobox, ComboboxAnchor, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxItemIndicator, ComboboxList } from "@/components/ui/combobox"
|
||||
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { getRanks } from '@/api/rank';
|
||||
|
||||
const setRankDialog = ref(false);
|
||||
const rankOnTransfer = ref();
|
||||
const ranks = ref(null);
|
||||
|
||||
onMounted(async () => {
|
||||
ranks.value = await getRanks();
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<Dialog :open="setRankDialog" @update:open="setRankDialog = false">
|
||||
<DialogContent>
|
||||
<DialogHeader>
|
||||
<DialogTitle>Set Rank on Transfer</DialogTitle>
|
||||
<DialogDescription>
|
||||
Assign MEMBER a rank on transfer completion.
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
<!-- Rank Combobox -->
|
||||
<Combobox v-model="rankOnTransfer">
|
||||
<ComboboxAnchor class="w-[300px]">
|
||||
<ComboboxInput placeholder="Search ranks..." class="w-full pl-9"
|
||||
:display-value="(v) => v ? v.short_name : ''" />
|
||||
</ComboboxAnchor>
|
||||
<ComboboxList class="w-[300px]">
|
||||
<ComboboxEmpty class="text-muted-foreground">No results</ComboboxEmpty>
|
||||
<ComboboxGroup>
|
||||
<template v-for="rank in ranks" :key="rank.id">
|
||||
<ComboboxItem :value="rank"
|
||||
class="data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative cursor-pointer select-none px-2 py-1.5">
|
||||
{{ rank.short_name }}
|
||||
<ComboboxItemIndicator class="absolute left-2 inline-flex items-center">
|
||||
<Check class="h-4 w-4" />
|
||||
</ComboboxItemIndicator>
|
||||
</ComboboxItem>
|
||||
</template>
|
||||
</ComboboxGroup>
|
||||
</ComboboxList>
|
||||
</Combobox>
|
||||
<DialogFooter>
|
||||
<Button variant="outline" @click="setRankDialog = false">Cancel</Button>
|
||||
<Button>Confirm</Button>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
<div class="max-w-5xl w-full mx-auto">
|
||||
Active
|
||||
<div>
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle class="flex justify-between">
|
||||
<div class="flex items-center gap-3">
|
||||
<Badge class="">Pending</Badge>
|
||||
<p>Name</p>
|
||||
</div>
|
||||
<div class="text-muted-foreground font-normal flex gap-2">
|
||||
Transfer To: <p class="text-white">Company</p>
|
||||
</div>
|
||||
</CardTitle>
|
||||
<CardDescription class="flex gap-2">Approved by: <p class="text-white">Someone, Someone?</p>
|
||||
</CardDescription>
|
||||
<CardDescription class="flex gap-2">Rank on transfer: <p class="text-white">Rank</p>
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<!-- <CardContent>
|
||||
Card Content
|
||||
</CardContent> -->
|
||||
<CardFooter class="flex justify-between">
|
||||
<p class="text-muted-foreground">Request Date:</p>
|
||||
<div class="flex gap-4">
|
||||
<Button variant="success">Approve</Button>
|
||||
<Button variant="destructive">Deny</Button>
|
||||
</div>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
</div>
|
||||
<div>
|
||||
Inactive
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,95 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { Check, Search } from "lucide-vue-next"
|
||||
import { Combobox, ComboboxAnchor, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxItemIndicator, ComboboxList } from "@/components/ui/combobox"
|
||||
|
||||
import { onMounted, ref } from "vue";
|
||||
import { Member, getMembers } from "@/api/member";
|
||||
import Button from "@/components/ui/button/Button.vue";
|
||||
import { Status, getAllStatuses, assignStatus } from "@/api/status";
|
||||
import { Rank, getRanks } from "@/api/rank";
|
||||
|
||||
const members = ref<Member[]>([])
|
||||
const statuses = ref<Status[]>([])
|
||||
const allRanks = ref<Rank[]>([])
|
||||
|
||||
const currentMember = ref<Member | null>(null);
|
||||
const currentStatus = ref<Status | null>(null);
|
||||
const currentRank = ref<Rank | null>(null);
|
||||
|
||||
onMounted(async () => {
|
||||
members.value = await getMembers();
|
||||
statuses.value = await getAllStatuses();
|
||||
allRanks.value = await getRanks();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-row gap-6 mx-auto m-10 max-w-5xl">
|
||||
<Combobox v-model="currentMember">
|
||||
<ComboboxAnchor class="w-[300px]">
|
||||
<ComboboxInput placeholder="Search members..." class="w-full pl-9"
|
||||
:display-value="(v) => v ? v.member_name : ''" />
|
||||
</ComboboxAnchor>
|
||||
<ComboboxList class="w-[300px]">
|
||||
<ComboboxEmpty class="text-muted-foreground">No results</ComboboxEmpty>
|
||||
<ComboboxGroup>
|
||||
<template v-for="member in members" :key="member.member_id">
|
||||
<ComboboxItem :value="member"
|
||||
class="data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative cursor-pointer select-none px-2 py-1.5">
|
||||
{{ member.member_name }}
|
||||
<ComboboxItemIndicator class="absolute left-2 inline-flex items-center">
|
||||
<Check class="h-4 w-4" />
|
||||
</ComboboxItemIndicator>
|
||||
</ComboboxItem>
|
||||
</template>
|
||||
</ComboboxGroup>
|
||||
</ComboboxList>
|
||||
</Combobox>
|
||||
|
||||
<!-- Status Combobox -->
|
||||
<Combobox v-model="currentStatus">
|
||||
<ComboboxAnchor class="w-[300px]">
|
||||
<ComboboxInput placeholder="Search statuses..." class="w-full pl-9"
|
||||
:display-value="(v) => v ? v.name : ''" />
|
||||
</ComboboxAnchor>
|
||||
<ComboboxList class="w-[300px]">
|
||||
<ComboboxEmpty class="text-muted-foreground">No results</ComboboxEmpty>
|
||||
<ComboboxGroup>
|
||||
<template v-for="status in statuses" :key="status.id">
|
||||
<ComboboxItem :value="status"
|
||||
class="data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative cursor-pointer select-none px-2 py-1.5">
|
||||
{{ status.name }}
|
||||
<ComboboxItemIndicator class="absolute left-2 inline-flex items-center">
|
||||
<Check class="h-4 w-4" />
|
||||
</ComboboxItemIndicator>
|
||||
</ComboboxItem>
|
||||
</template>
|
||||
</ComboboxGroup>
|
||||
</ComboboxList>
|
||||
</Combobox>
|
||||
|
||||
<!-- rank -->
|
||||
<Combobox v-model="currentRank">
|
||||
<ComboboxAnchor class="w-[300px]">
|
||||
<ComboboxInput placeholder="Search ranks..." class="w-full pl-9"
|
||||
:display-value="(v) => v ? v.short_name : ''" />
|
||||
</ComboboxAnchor>
|
||||
<ComboboxList class="w-[300px]">
|
||||
<ComboboxEmpty class="text-muted-foreground">No results</ComboboxEmpty>
|
||||
<ComboboxGroup>
|
||||
<template v-for="rank in allRanks" :key="rank.id">
|
||||
<ComboboxItem :value="rank"
|
||||
class="data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative cursor-pointer select-none px-2 py-1.5">
|
||||
{{ rank.short_name }}
|
||||
<ComboboxItemIndicator class="absolute left-2 inline-flex items-center">
|
||||
<Check class="h-4 w-4" />
|
||||
</ComboboxItemIndicator>
|
||||
</ComboboxItem>
|
||||
</template>
|
||||
</ComboboxGroup>
|
||||
</ComboboxList>
|
||||
</Combobox>
|
||||
<Button :onClick="() => { }">Submit</Button>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user