Skip to content

Commit

Permalink
Merge pull request #162 from La-Fresca/top-level-manager
Browse files Browse the repository at this point in the history
View delivery persons - kitchen manager
  • Loading branch information
DasunThathsara authored Dec 1, 2024
2 parents d29d9f2 + d4b5559 commit 48e404c
Show file tree
Hide file tree
Showing 12 changed files with 746 additions and 4 deletions.
77 changes: 75 additions & 2 deletions package-lock.json

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

15 changes: 15 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import AddGrn_BM from '@/pages/BranchManager/Inventory/AddGrn';
import EditGrn_BM from '@/pages/BranchManager/Inventory/EditGrn';
import AssignWaiter from '@/pages/KitchenManager/AssignWaiters';
import AssignDelivery from '@/pages/KitchenManager/AssignDelivery';
import DeliveryPersonsList from '@/pages/KitchenManager/DeliveryPersons/index';
import DeliveryLayout from '@/layouts/DeliveryLayout';
import { OnDelivery } from '@/pages/DeliveryPerson/OnDelivery';
import KitchenManagerDashboard from '@/pages/KitchenManager/Dashboard';
Expand Down Expand Up @@ -124,6 +125,7 @@ const routes = createRoutesFromElements(
}
/>
</Route>

<Route path="/">
<Route
path="login"
Expand Down Expand Up @@ -180,6 +182,7 @@ const routes = createRoutesFromElements(
}
/>
</Route>

<Route element={<RequireAuth allowedRoles={['ADMIN']} />}>
<Route path="/" element={<UserLayout />}>
<Route
Expand Down Expand Up @@ -631,6 +634,18 @@ const routes = createRoutesFromElements(
}
/>
</Route>

<Route path="deliveryPersons">
<Route
index
element={
<>
<PageTitle title="Kitchen Manager | Delivery Persons List" />
<DeliveryPersonsList />
</>
}
/>
</Route>
</Route>

<Route path="waiter/*" element={<WaiterLayout />}>
Expand Down
4 changes: 2 additions & 2 deletions src/components/KitchenManager/Sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ const Sidebar = ({ sidebarOpen, setSidebarOpen }: SidebarProps) => {
</li>
<li>
<NavLink
to="/kitchen-manager/delivery-person"
to="/kitchen-manager/deliveryPersons"
className={`group relative flex items-center gap-2.5 rounded-xl py-2 px-4 font-medium text-black dark:text-white duration-300 ease-in-out hover:bg-yellow-100 dark:hover:bg-meta-4 ${
pathname.includes('/kitchen-manager/delivery-person') &&
pathname.includes('/kitchen-manager/deliveryPersons') &&
'bg-yellow-100 dark:bg-meta-4'
}`}
>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from "react";
export const ChevronDownIcon = ({strokeWidth = 1.5, ...otherProps}) => (
<svg
aria-hidden="true"
fill="none"
focusable="false"
height="1em"
role="presentation"
viewBox="0 0 24 24"
width="1em"
{...otherProps}
>
<path
d="m19.92 8.95-6.52 6.52c-.77.77-2.03.77-2.8 0L4.08 8.95"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeMiterlimit={10}
strokeWidth={strokeWidth}
/>
</svg>
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from "react";
export const PlusIcon = ({size = 24, width, height, ...props}) => (
<svg
aria-hidden="true"
fill="none"
focusable="false"
height={size || height}
role="presentation"
viewBox="0 0 24 24"
width={size || width}
{...props}
>
<g
fill="none"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
>
<path d="M6 12h12" />
<path d="M12 18V6" />
</g>
</svg>
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from "react";
export const SearchIcon = (props) => (
<svg
aria-hidden="true"
fill="none"
focusable="false"
height="1em"
role="presentation"
viewBox="0 0 24 24"
width="1em"
{...props}
>
<path
d="M11.5 21C16.7467 21 21 16.7467 21 11.5C21 6.25329 16.7467 2 11.5 2C6.25329 2 2 6.25329 2 11.5C2 16.7467 6.25329 21 11.5 21Z"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
/>
<path
d="M22 22L20 20"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
/>
</svg>
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import {IconSvgProps} from "./types";

export const VerticalDotsIcon = ({size = 24, width, height, ...props}: IconSvgProps) => (
<svg
aria-hidden="true"
fill="none"
focusable="false"
height={size || height}
role="presentation"
viewBox="0 0 24 24"
width={size || width}
{...props}
>
<path
d="M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 12c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
fill="currentColor"
/>
</svg>
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const columns = [
{name: "ID", uid: "id", sortable: true},
{name: "Name", uid: "name", sortable: true},
{name: "Price", uid: "price", sortable: true},
{name: "Availability", uid: "available", sortable: true},
{name: "Discount", uid: "discountStatus"},
{name: "Features", uid: "features", sortable: true},
{name: "Status", uid: "status", sortable: true},
{name: "Actions", uid: "actions"}
];

const statusOptions = [
{name: "Approved", uid: '0'},
{name: "Pending", uid: '2'},
];

export {columns, statusOptions};
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import {SVGProps} from "react";

export type IconSvgProps = SVGProps<SVGSVGElement> & {
size?: number;
};
Loading

0 comments on commit 48e404c

Please sign in to comment.