Skip to content

Commit

Permalink
Update 23-11-2023 21:01
Browse files Browse the repository at this point in the history
  • Loading branch information
elmojerry88 committed Nov 23, 2023
1 parent d0f70e5 commit eb63806
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 65 deletions.
2 changes: 1 addition & 1 deletion src/components/card-dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
CardTitle,
} from "@/components/ui/card"
import { Overview } from "@/components/dashboard-components/overview"
import { RecentSales } from "@/components/dashboard-components/recent-sales"
import { RecentSales } from "@/components/dashboard-components/saidas"
import TotalOfficers from "./TotalOfficers";
import TotalUsers from "./TotalUsers";
import TotalWeapons from "./TotalWeapons";
Expand Down
38 changes: 12 additions & 26 deletions src/components/dashboard-components/date-range-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

import * as React from "react"
import { CalendarIcon } from "@radix-ui/react-icons"
import { addDays, format } from "date-fns"
import { DateRange } from "react-day-picker"

import { cn } from "@/lib/utils"
import { Button } from "@/components/ui/button"
import { Calendar } from "@/components/ui/calendar"
Expand All @@ -17,10 +14,7 @@ import {
export function CalendarDateRangePicker({
className,
}: React.HTMLAttributes<HTMLDivElement>) {
const [date, setDate] = React.useState<DateRange | undefined>({
from: new Date(2023, 0, 20),
to: addDays(new Date(2023, 0, 20), 20),
})
const [date, setDate] = React.useState<Date | undefined>(new Date())

return (
<div className={cn("grid gap-2", className)}>
Expand All @@ -31,33 +25,25 @@ export function CalendarDateRangePicker({
variant={"outline"}
className={cn(
"w-[260px] justify-start text-left font-normal",
!date && "text-muted-foreground"
!date && ""
)}
>
<CalendarIcon className="mr-2 h-4 w-4" />
{date?.from ? (
date.to ? (
<>
{format(date.from, "LLL dd, y")} -{" "}
{format(date.to, "LLL dd, y")}
</>
) : (
format(date.from, "LLL dd, y")
)
) : (
<span>Pick a date</span>
)}
<CalendarIcon className="mr-2 h-4 w-4"
/>

<span>Calendário</span>

</Button>
</PopoverTrigger>
<PopoverContent className="w-auto p-0" align="end">
<Calendar
initialFocus
mode="range"
defaultMonth={date?.from}
mode="single"
selected={date}
onSelect={setDate}
numberOfMonths={2}
/>
className="rounded-md text-white border shadow"
/>


</PopoverContent>
</Popover>
</div>
Expand Down
21 changes: 2 additions & 19 deletions src/components/dashboard-components/main-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,9 @@ export function MainNav({
href=""
className="text-sm font-medium transition-colors hover:text-slate-500"
>
Overview
</Link>
<Link
href=""
className="text-sm font-medium text-muted-foreground transition-colors hover:text-slate-500"
>
Customers
</Link>
<Link
href=""
className="text-sm font-medium text-muted-foreground transition-colors hover:text-slate-500"
>
Products
</Link>
<Link
href=""
className="text-sm font-medium text-muted-foreground transition-colors hover:text-slate-500"
>
Settings
Polícia Nacional de Angola
</Link>

</div>

</nav>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import {
} from "@/components/ui/avatar";
import { api } from '@/app/api/api_stock';
import { useQuery } from "react-query";
import Image from 'next/image'
import Table from "@/components/Table";

export function RecentSales() {

Expand Down
13 changes: 0 additions & 13 deletions src/components/dashboard-components/search.tsx

This file was deleted.

5 changes: 3 additions & 2 deletions src/components/dashboard-components/user-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { HiOutlineLogout } from "react-icons/hi";
import { FaHouseUser } from "react-icons/fa";

import { getServerSession } from "next-auth"
import Link from "next/link"

export async function UserNav() {

Expand All @@ -46,11 +47,11 @@ export async function UserNav() {
<DropdownMenuSeparator />
<DropdownMenuGroup>
<DropdownMenuItem>
Perfil
<Link href="https://github.com/elmojerry88/stock-app">Código fonte Front-End</Link>
<DropdownMenuShortcut>⇧⌘P</DropdownMenuShortcut>
</DropdownMenuItem>
<DropdownMenuItem>
Definições
<Link href="https://github.com/elmojerry88/api_stock">Código font Back-End</Link>
<DropdownMenuShortcut>⌘S</DropdownMenuShortcut>
</DropdownMenuItem>
<DropdownMenuItem> </DropdownMenuItem>
Expand Down
4 changes: 2 additions & 2 deletions src/components/ui/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ function Calendar({
day_range_start: "day-range-start",
day_range_end: "day-range-end",
day_selected:
"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
day_today: "bg-accent text-accent-foreground",
"bg-primary text-blue-500 hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
day_today: "bg-white text-black",
day_outside:
"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
day_disabled: "text-muted-foreground opacity-50",
Expand Down

0 comments on commit eb63806

Please sign in to comment.