Skip to content

Commit

Permalink
type errors fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix-Asante committed Jan 6, 2024
1 parent 2431cca commit 0a9d58f
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ const columns = [
key: "Status",
label: "Status",
},
{
key: "",
label: "",
},
];

export default function BookingListTable({ bookings }: Props) {
Expand Down Expand Up @@ -106,13 +110,12 @@ export default function BookingListTable({ bookings }: Props) {
shadow='none'
radius='none'
>
{/* @ts-ignore */}
<TableHeader>
{columns.map((column) => (
<TableHeader columns={columns}>
{(column) => (
<TableColumn key={column.key}>{column.label}</TableColumn>
))}
)}

<TableColumn>{null}</TableColumn>
{/* <TableColumn>{null}</TableColumn> */}
</TableHeader>
<TableBody
emptyContent={
Expand Down
12 changes: 7 additions & 5 deletions src/app/(dashboard)/places/sections/PlaceTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ const columns = [
key: "delivery fee",
label: "DELIVERY FEE",
},
{
key: "",
label: "",
},
];

interface TableProps {
Expand Down Expand Up @@ -90,12 +94,10 @@ export default function PlaceTable({
selectedKeys={selectedKeys}
onSelectionChange={onSelectionChange}
>
<TableHeader>
{columns.map((column) => (
<TableHeader columns={columns}>
{(column) => (
<TableColumn key={column.key}>{column.label}</TableColumn>
))}

<TableColumn />
)}
</TableHeader>
<TableBody
emptyContent={
Expand Down
10 changes: 5 additions & 5 deletions src/app/(dashboard)/specials/_sections/OffersTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const columns = [
{ key: "discount", label: "Discount" },
{ key: "price", label: "Price" },
{ key: "type", label: "Type" },
{ key: "", label: "" },
];
export default function OffersTable({ offers }: Props) {
const { control, watch } = useForm();
Expand Down Expand Up @@ -118,14 +119,13 @@ export default function OffersTable({ offers }: Props) {
shadow='none'
radius='none'
selectedKeys={selectedOffers}
// @ts-ignore
onSelectionChange={setSelectedOffers}
>
<TableHeader>
{columns.map((column) => (
<TableHeader columns={columns}>
{(column) => (
<TableColumn key={column.key}>{column.label}</TableColumn>
))}

<TableColumn>{null}</TableColumn>
)}
</TableHeader>
<TableBody
emptyContent={<EmptyContent title='' description='Users not found' />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ export default function UpdateOfferSection({ offer }: { offer: Special }) {
setValue("placeId", place?.id);
Object.keys(offerDetails).forEach((key: any) => {
if (key.includes("date")) {
// @ts-ignore
setValue(key, new Date(offerDetails[key]?.toString()), {
shouldTouch: true,
});
} else {
// @ts-ignore
setValue(key, offerDetails[key]?.toString() ?? "", {
shouldTouch: true,
});
Expand Down
10 changes: 5 additions & 5 deletions src/app/(dashboard)/users/_sections/UsersTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const columns = [
{ label: "Email", key: "email" },
{ label: "Status", key: "status" },
{ label: "Place", key: "place" },
{ label: "", key: "" },
];

interface UsersTableProps {
Expand Down Expand Up @@ -118,14 +119,13 @@ export default function UsersTable({ users }: UsersTableProps) {
shadow='none'
radius='none'
selectedKeys={selectedUsers}
// @ts-ignore
onSelectionChange={setSelectedUsers}
>
<TableHeader>
{columns.map((column) => (
<TableHeader columns={columns}>
{(column) => (
<TableColumn key={column.key}>{column.label}</TableColumn>
))}

<TableColumn>{null}</TableColumn>
)}
</TableHeader>
<TableBody
emptyContent={<EmptyContent title='' description='Users not found' />}
Expand Down
1 change: 1 addition & 0 deletions src/components/shared/input/InfiniteScrollSelectInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const InfiniteScrollSelect = React.forwardRef(function Input(
<div>
<FormControl.Label className='mb-1'>{label}</FormControl.Label>
<AsyncPaginate
// @ts-ignore
loadOptions={loadOptions}
onChange={(option) => {
setSelectedOption(option);
Expand Down

0 comments on commit 0a9d58f

Please sign in to comment.