-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feat/bulk-editor-improvements-part-two
- Loading branch information
Showing
70 changed files
with
933 additions
and
462 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ | |
- "@sradevski" | ||
- "@edast" | ||
- "@thetutlage" | ||
- "@christiananese" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 14 additions & 9 deletions
23
packages/admin-next/dashboard/src/hooks/table/columns/use-return-reason-table-columns.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,30 @@ | ||
import { HttpTypes } from "@medusajs/types" | ||
import { Badge } from "@medusajs/ui" | ||
import { createColumnHelper } from "@tanstack/react-table" | ||
import { useMemo } from "react" | ||
import { useTranslation } from "react-i18next" | ||
import { TextCell } from "../../../components/table/table-cells/common/text-cell" | ||
|
||
const columnHelper = createColumnHelper<HttpTypes.AdminReturnReason>() | ||
|
||
export const useReturnReasonTableColumns = () => { | ||
const { t } = useTranslation() | ||
|
||
return useMemo( | ||
() => [ | ||
columnHelper.accessor("value", { | ||
header: () => t("fields.value"), | ||
cell: ({ getValue }) => <TextCell text={getValue()} />, | ||
cell: ({ getValue }) => <Badge size="2xsmall">{getValue()}</Badge>, | ||
}), | ||
columnHelper.accessor("label", { | ||
header: () => t("fields.createdAt"), | ||
cell: ({ getValue }) => <TextCell text={getValue()} />, | ||
cell: ({ row }) => { | ||
const { label, description } = row.original | ||
return ( | ||
<div className="flex h-full w-full flex-col justify-center py-4"> | ||
<span className="truncate font-medium">{label}</span> | ||
<span className="truncate"> | ||
{description ? description : "-"} | ||
</span> | ||
</div> | ||
) | ||
}, | ||
}), | ||
], | ||
[t] | ||
[] | ||
) | ||
} |
Oops, something went wrong.