Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dashboard): location UI fixes #7288

Merged
merged 8 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
},
"actions": {
"save": "Save",
"select": "Select",
"saveAsDraft": "Save as draft",
"publish": "Publish",
"create": "Create",
Expand Down Expand Up @@ -653,8 +654,8 @@
}
},
"shipping": {
"title": "Location & Shipping",
"domain": "Location & Shipping",
"title": "Locations & Shipping",
"domain": "Locations & Shipping",
"description": "Choose where you ship and how much you charge for shipping at checkout. Define shipping options specific for your locations.",
"createLocation": "Create location",
"createLocationDetailsHint": "Specify the details of the location.",
Expand Down Expand Up @@ -714,10 +715,12 @@
"edit": {
"title": "Edit Service Zone"
},
"editAreasTitle": "Manage {{zone}} areas",
"deleteWarning": "Are you sure you want to delete \"{{name}}\". This will also delete all assocciated shipping options.",
"toast": {
"delete": "Zone \"{{name}}\" deleted successfully."
},
"manageAreas": "Manage areas",
"editPrices": "Edit prices",
"editOption": "Edit option",
"optionsLength_one": "shipping option",
Expand Down Expand Up @@ -745,8 +748,8 @@
"allocation": "Shipping amount",
"fixed": "Fixed",
"fixedDescription": "Shipping option's price is always the same amount.",
"enable": "Enable in store",
"enableDescription": "Enable or disable the shipping option visiblity in store",
"enable": "Show publicly",
"enableDescription": "When disabled, the shipping option can only be applied by admins.",
"calculated": "Calculated",
"calculatedDescription": "Shipping option's price is calculated by the fulfillment provider.",
"profile": "Shipping profile"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const useStockLocation = (
) => {
const { data, ...rest } = useQuery({
queryFn: () => client.stockLocations.retrieve(id, query),
queryKey: stockLocationsQueryKeys.detail(id, query),
queryKey: stockLocationsQueryKeys.details(),
...options,
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,13 @@ export const RouteMap: RouteObject[] = [
"../../v2-routes/shipping/service-zone-edit"
),
},
{
path: "edit-areas",
lazy: () =>
import(
"../../v2-routes/shipping/service-zone-areas-edit"
),
},
{
path: "shipping-option",
children: [
Expand All @@ -764,6 +771,13 @@ export const RouteMap: RouteObject[] = [
"../../v2-routes/shipping/shipping-option-edit"
),
},
{
path: "edit-pricing",
lazy: () =>
import(
"../../v2-routes/shipping/shipping-options-edit-pricing"
),
},
],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function ShippingOption({
{
label: t("shipping.serviceZone.editPrices"),
icon: <CurrencyDollar />,
disabled: true,
to: `/settings/shipping/${locationId}/fulfillment-set/${fulfillmentSetId}/service-zone/${option.service_zone_id}/shipping-option/${option.id}/edit-pricing`,
},
{
label: t("actions.delete"),
Expand Down Expand Up @@ -199,7 +199,7 @@ function ServiceZoneOptions({
{t("shipping.serviceZone.shippingOptions")}
</span>
<Button
className="text-ui-fg-interactive txt-small px-0 font-medium hover:bg-transparent"
className="text-ui-fg-interactive txt-small px-0 font-medium hover:bg-transparent active:bg-transparent"
variant="transparent"
onClick={() =>
navigate(
Expand Down Expand Up @@ -231,7 +231,7 @@ function ServiceZoneOptions({
{t("shipping.serviceZone.returnOptions")}
</span>
<Button
className="text-ui-fg-interactive txt-small px-0 font-medium hover:bg-transparent"
className="text-ui-fg-interactive txt-small px-0 font-medium hover:bg-transparent active:bg-transparent"
variant="transparent"
onClick={() =>
navigate(
Expand Down Expand Up @@ -385,16 +385,16 @@ function ServiceZone({ zone, locationId, fulfillmentSetId }: ServiceZoneProps) {
groups={[
{
actions: [
// {
// label: t("shipping.serviceZone.addOption"),
// icon: <Plus />,
// to: `/settings/shipping/${locationId}/fulfillment-set/${fulfillmentSetId}/service-zone/${zone.id}/shipping-option/create`,
// },
{
label: t("actions.edit"),
icon: <PencilSquare />,
to: `/settings/shipping/${locationId}/fulfillment-set/${fulfillmentSetId}/service-zone/${zone.id}/edit`,
},
{
label: t("shipping.serviceZone.manageAreas"),
icon: <Map />,
to: `/settings/shipping/${locationId}/fulfillment-set/${fulfillmentSetId}/service-zone/${zone.id}/edit-areas`,
},
{
label: t("actions.delete"),
icon: <Trash />,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function Location(props: LocationProps) {
]}
/>
<Button
className="text-ui-fg-interactive rounded-none pl-5 hover:bg-transparent"
className="text-ui-fg-interactive rounded-none pl-5 hover:bg-transparent active:bg-transparent"
onClick={() => navigate(`/settings/shipping/${location.id}`)}
variant="transparent"
>
Expand Down
Loading
Loading