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:
+14
-1
@@ -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,
|
||||
|
||||
+6
-1
@@ -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
|
||||
|
||||
+5
-1
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user