fix(dashboard): fixes to strings (#7411)

* fix(dashboard): fix the text of manage areas

* add missing string

* add missing react import
This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-05-23 11:07:01 +03:00
1 parent 9a10adfd91
commit 6f1b90f207
3 files changed
+15 -8

No files matched your search

@@ -8,7 +8,13 @@ import {
} from "@medusajs/ui" } from "@medusajs/ui"
import * as LabelPrimitives from "@radix-ui/react-label" import * as LabelPrimitives from "@radix-ui/react-label"
import { Slot } from "@radix-ui/react-slot" import { Slot } from "@radix-ui/react-slot"
import { ReactNode, createContext, forwardRef, useContext, useId } from "react" import React, {
ReactNode,
createContext,
forwardRef,
useContext,
useId,
} from "react"
import { import {
Controller, Controller,
ControllerProps, ControllerProps,
@@ -24,7 +30,7 @@ const Provider = FormProvider
type FormFieldContextValue< type FormFieldContextValue<
TFieldValues extends FieldValues = FieldValues, TFieldValues extends FieldValues = FieldValues,
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
> = { > = {
name: TName name: TName
} }
@@ -35,7 +41,7 @@ const FormFieldContext = createContext<FormFieldContextValue>(
const Field = < const Field = <
TFieldValues extends FieldValues = FieldValues, TFieldValues extends FieldValues = FieldValues,
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
>({ >({
...props ...props
}: ControllerProps<TFieldValues, TName>) => { }: ControllerProps<TFieldValues, TName>) => {
@@ -81,7 +81,8 @@
"download": "Download", "download": "Download",
"clearAll": "Clear all", "clearAll": "Clear all",
"apply": "Apply", "apply": "Apply",
"add": "Add" "add": "Add",
"select": "Select"
}, },
"filters": { "filters": {
"date": { "date": {
@@ -331,14 +331,14 @@ function ServiceZone({ zone, locationId, fulfillmentSetId }: ServiceZoneProps) {
return ( return (
<div className="py-4"> <div className="py-4">
<div className="flex flex-row items-center justify-between gap-x-4 px-6"> <div className="flex flex-row items-center justify-between gap-x-4 px-6">
{/*ICON*/} {/* ICON*/}
<div className="grow-0 rounded-lg border"> <div className="grow-0 rounded-lg border">
<div className="bg-ui-bg-field m-1 rounded-md p-2"> <div className="bg-ui-bg-field m-1 rounded-md p-2">
<Map className="text-ui-fg-subtle" /> <Map className="text-ui-fg-subtle" />
</div> </div>
</div> </div>
{/*INFO*/} {/* INFO*/}
<div className="grow-1 flex flex-1 flex-col"> <div className="grow-1 flex flex-1 flex-col">
<Text weight="plus">{zone.name}</Text> <Text weight="plus">{zone.name}</Text>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
@@ -364,7 +364,7 @@ function ServiceZone({ zone, locationId, fulfillmentSetId }: ServiceZoneProps) {
</div> </div>
</div> </div>
{/*ACTION*/} {/* ACTION*/}
<div className="itemx-center flex grow-0 gap-1"> <div className="itemx-center flex grow-0 gap-1">
<Button <Button
onClick={() => setOpen((s) => !s)} onClick={() => setOpen((s) => !s)}
@@ -392,7 +392,7 @@ function ServiceZone({ zone, locationId, fulfillmentSetId }: ServiceZoneProps) {
to: `/settings/shipping/${locationId}/fulfillment-set/${fulfillmentSetId}/service-zone/${zone.id}/edit`, to: `/settings/shipping/${locationId}/fulfillment-set/${fulfillmentSetId}/service-zone/${zone.id}/edit`,
}, },
{ {
label: t("shipping.serviceZone.manageAreas"), label: t("shipping.serviceZone.areas.manage"),
icon: <Map />, icon: <Map />,
to: `/settings/shipping/${locationId}/fulfillment-set/${fulfillmentSetId}/service-zone/${zone.id}/edit-areas`, to: `/settings/shipping/${locationId}/fulfillment-set/${fulfillmentSetId}/service-zone/${zone.id}/edit-areas`,
}, },