feat(dashboard,types): Translate all OrderBy filters (#9691)

Resolves CC-616

**Note**
- I have added some missing fields to a couple of types, to resolve TS errors in the dashboard.
- For the ApiKey types I have left the created_at, updated_at, etc. as type Date, as changing them to string, caused @medusajs/medusa to fail building. We need to clean up the types at a later time.
This commit is contained in:
Kasper Fabricius Kristensen
2024-10-21 18:09:55 +00:00
committed by GitHub
parent e81dbc754c
commit 9f53683508
66 changed files with 474 additions and 188 deletions
@@ -117,7 +117,20 @@ export const ApiKeySalesChannelSection = ({
isLoading={isLoading}
queryObject={raw}
navigateTo={(row) => `/settings/sales-channels/${row.id}`}
orderBy={["name", "created_at", "updated_at"]}
orderBy={[
{
key: "name",
label: t("fields.name"),
},
{
key: "created_at",
label: t("fields.createdAt"),
},
{
key: "updated_at",
label: t("fields.updatedAt"),
},
]}
commands={[
{
action: handleRemove,
@@ -76,7 +76,12 @@ export const ApiKeyManagementListTable = ({
columns={columns}
count={count}
pageSize={PAGE_SIZE}
orderBy={["title", "created_at", "updated_at", "revoked_at"]}
orderBy={[
{ key: "title", label: t("fields.title") },
{ key: "created_at", label: t("fields.createdAt") },
{ key: "updated_at", label: t("fields.updatedAt") },
{ key: "revoked_at", label: t("fields.revokedAt") },
]}
navigateTo={(row) => row.id}
pagination
search
@@ -149,7 +149,11 @@ export const ApiKeySalesChannelsForm = ({
search="autofocus"
isLoading={isLoading}
queryObject={raw}
orderBy={["name", "created_at", "updated_at"]}
orderBy={[
{ key: "name", label: t("fields.name") },
{ key: "created_at", label: t("fields.createdAt") },
{ key: "updated_at", label: t("fields.updatedAt") },
]}
layout="fill"
noRecords={{
message: t(