Skip to content
Open
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
79013c8
feat: ai (cursor) implementation
yuskithedeveloper Oct 14, 2025
b8665a6
feat: ai (cursor) implementation, layout fix
yuskithedeveloper Oct 14, 2025
0d4fdee
feat: ai (cursor) implementation, localization
yuskithedeveloper Oct 14, 2025
fd06fd1
feat: ai (cursor) implementation, issues fix
yuskithedeveloper Oct 14, 2025
ab4eb8d
feat: types.ts regenerated
yuskithedeveloper Oct 14, 2025
6535147
Merge branch 'dev' into feat/VCST-3865-cart-pickup-locations-facet-se…
yuskithedeveloper Oct 14, 2025
9a71836
feat: map reload on addresses change
yuskithedeveloper Oct 14, 2025
c7898bd
feat: zoom to markers if selected address not found
yuskithedeveloper Oct 14, 2025
6d6f363
feat: not found block
yuskithedeveloper Oct 15, 2025
0ef16a7
feat: reset search button
yuskithedeveloper Oct 15, 2025
a8d464f
feat: pickup locations grid (without map)
yuskithedeveloper Oct 15, 2025
aa59525
feat: addresses fetch limit
yuskithedeveloper Oct 15, 2025
7034135
fix: locales
yuskithedeveloper Oct 15, 2025
68f9d8d
Merge branch 'dev' into feat/VCST-3865-cart-pickup-locations-facet-se…
yuskithedeveloper Oct 15, 2025
58e5cdb
refactor: filter countries, regions and cities moved to composable
yuskithedeveloper Oct 15, 2025
cfecaf8
refactor: filter countries, regions and cities moved to composable
yuskithedeveloper Oct 15, 2025
d9306df
refactor: facet keys moved to composable
yuskithedeveloper Oct 15, 2025
3470925
refactor: rename
yuskithedeveloper Oct 15, 2025
d554fbe
refactor: rename, resetFilter moved
yuskithedeveloper Oct 15, 2025
65df7dc
refactor: minor
yuskithedeveloper Oct 15, 2025
f02f203
Merge branch 'dev' into feat/VCST-3865-cart-pickup-locations-facet-se…
yuskithedeveloper Oct 16, 2025
3b11128
refactor: layout formatting
yuskithedeveloper Oct 16, 2025
0021eb4
refactor: types fix
yuskithedeveloper Oct 16, 2025
3874164
feat: aria-labels
yuskithedeveloper Oct 16, 2025
daa5677
feat: nextTick for unwatch-s
yuskithedeveloper Oct 16, 2025
642cd55
Merge branch 'dev' into feat/VCST-3865-cart-pickup-locations-facet-se…
yuskithedeveloper Oct 20, 2025
d534cfd
Merge branch 'dev' into feat/VCST-3865-cart-pickup-locations-facet-se…
yuskithedeveloper Oct 28, 2025
88d1165
Merge branch 'dev' into feat/VCST-3865-cart-pickup-locations-facet-se…
yuskithedeveloper Oct 29, 2025
dba6e53
Merge branch 'dev' into feat/VCST-3865-cart-pickup-locations-facet-se…
yuskithedeveloper Oct 29, 2025
a6ce242
Merge branch 'dev' into feat/VCST-3865-cart-pickup-locations-facet-se…
Lenajava1 Oct 30, 2025
0a404e9
Merge branch 'dev' into feat/VCST-3865-cart-pickup-locations-facet-se…
yuskithedeveloper Oct 30, 2025
80aed22
Merge branch 'dev' into feat/VCST-3865-cart-pickup-locations-facet-se…
yuskithedeveloper Oct 31, 2025
619595f
Merge branch 'dev' into feat/VCST-3865-cart-pickup-locations-facet-se…
yuskithedeveloper Nov 5, 2025
3c511d3
Merge branch 'dev' into feat/VCST-3865-cart-pickup-locations-facet-se…
yuskithedeveloper Nov 5, 2025
50ecb62
test: restored test ids
yuskithedeveloper Nov 5, 2025
bb88d56
fix: filters clearing on modal opening
yuskithedeveloper Nov 5, 2025
0c7eef0
fix: map popup scroll
yuskithedeveloper Nov 5, 2025
5fda1bc
fix: shipping cart section loader appearing over pickup locations popup
yuskithedeveloper Nov 5, 2025
572238c
feat: loaders
yuskithedeveloper Nov 5, 2025
4086271
fix: map markers reactivity and rendering issue
yuskithedeveloper Nov 5, 2025
f6f394a
feat: search button moved inside the keyword input
yuskithedeveloper Nov 6, 2025
1a553e5
Merge branch 'dev' into feat/VCST-3865-cart-pickup-locations-facet-se…
yuskithedeveloper Nov 6, 2025
4b4e4d0
feat: autocomplete and clearable (not yet supported) selects
yuskithedeveloper Nov 6, 2025
3257524
Merge branch 'feat/VCST-3865-cart-pickup-locations-facet-search' of h…
yuskithedeveloper Nov 6, 2025
d8340e5
fix: marker collapsing on multiple click issue
yuskithedeveloper Nov 6, 2025
e52d84d
feat: mobile layout
yuskithedeveloper Nov 6, 2025
f28958a
feat: reduced padding between header and content
yuskithedeveloper Nov 6, 2025
5e9477f
refactor: filter changed event
yuskithedeveloper Nov 6, 2025
f816363
fix: filtering from non-first list page issue
yuskithedeveloper Nov 7, 2025
22f85e3
feat: filter component extracted
yuskithedeveloper Nov 7, 2025
d0366cb
feat: filter multi-selects
yuskithedeveloper Nov 7, 2025
2c7b382
feat: filter multi-selects
yuskithedeveloper Nov 7, 2025
5c6425f
feat: facet filter component usage
yuskithedeveloper Nov 7, 2025
52212a7
fix: redundant div removed
yuskithedeveloper Nov 7, 2025
71f2a5f
feat: minor style improvements
yuskithedeveloper Nov 7, 2025
de7df3c
fix: redundant aria-labels removed
yuskithedeveloper Nov 7, 2025
35c748f
feat: filters combination logic
yuskithedeveloper Nov 7, 2025
929e51e
feat: applied filters chips
yuskithedeveloper Nov 7, 2025
f68ac26
feat: style improvements, moblie layout
yuskithedeveloper Nov 7, 2025
b51a04a
feat: applied filters chips mobile layout
yuskithedeveloper Nov 7, 2025
283ed9f
fix: applied filters chips removing
yuskithedeveloper Nov 7, 2025
050e89b
feat: style improvements
yuskithedeveloper Nov 7, 2025
4f7a62e
feat: reset filter mobile button
yuskithedeveloper Nov 10, 2025
a06b99f
fix: empty facet handling
yuskithedeveloper Nov 10, 2025
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 @@ -3,18 +3,22 @@ query GetCartPickupLocations(
$cultureName: String!
$cartId: String!
$keyword: String
$filter: String
$first: Int
$after: String
$sort: String
$facet: String
) {
cartPickupLocations(
storeId: $storeId
cultureName: $cultureName
cartId: $cartId
keyword: $keyword
filter: $filter
first: $first
after: $after
sort: $sort
facet: $facet
) {
totalCount
items {
Expand All @@ -40,5 +44,13 @@ query GetCartPickupLocations(
phone
}
}
term_facets {
name
terms {
term
label
count
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { globals } from "@/core/globals";
import { graphqlClient } from "../../../client";
import getCartPickupLocationsQueryDocument from "./getCartPickupLocationsQuery.graphql";
import type { Query, QueryCartPickupLocationsArgs, ProductPickupLocationConnection } from "@/core/api/graphql/types";
import type { Query, QueryCartPickupLocationsArgs, CartPickupLocationConnection } from "@/core/api/graphql/types";

export async function getCartPickupLocations(
payload: Omit<QueryCartPickupLocationsArgs, "storeId" | "cultureName">,
): Promise<ProductPickupLocationConnection> {
): Promise<CartPickupLocationConnection> {
const { storeId, cultureName } = globals;

const { data } = await graphqlClient.query<
Expand Down
28 changes: 25 additions & 3 deletions client-app/core/api/graphql/types.ts

Large diffs are not rendered by default.

80 changes: 75 additions & 5 deletions client-app/shared/cart/composables/useCartPickupLocations.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,77 @@
import { ref } from "vue";
import { createSharedComposable } from "@vueuse/core";
import { ref, computed } from "vue";
import { getCartPickupLocations } from "@/core/api/graphql/cart";
import { Logger } from "@/core/utilities";
import type { ProductPickupLocation, QueryCartPickupLocationsArgs } from "@/core/api/graphql/types";
import type {
ProductPickupLocation,
QueryCartPickupLocationsArgs,
TermFacet,
FacetTermType,
} from "@/core/api/graphql/types";

export function useCartPickupLocations() {
const COUNTRY_NAME_FACET = "address_countryname";
const REGION_NAME_FACET = "address_regionname";
const CITY_FACET = "address_city";

export type PickupLocationsFilterOptionsType = {
countries: FacetTermType[];
regions: FacetTermType[];
cities: FacetTermType[];
};

export function _useCartPickupLocations() {
const pickupLocationsLoading = ref(false);

const pickupLocations = ref<ProductPickupLocation[]>([]);
const termFacets = ref<TermFacet[] | undefined>();

const filterOptions = computed(
() =>
({
countries: termFacets.value?.find((f) => f.name === COUNTRY_NAME_FACET)?.terms ?? [],
regions: termFacets.value?.find((f) => f.name === REGION_NAME_FACET)?.terms ?? [],
cities: termFacets.value?.find((f) => f.name === CITY_FACET)?.terms ?? [],
}) as PickupLocationsFilterOptionsType,
);

const filterKeyword = ref<string>("");
const filterCountry = ref<string | undefined>();
const filterRegion = ref<string | undefined>();
const filterCity = ref<string | undefined>();

const filterApplied = ref(false);

function buildFilter(): string | undefined {
if (filterCity.value) {
return `${CITY_FACET}:"${filterCity.value}"`;
}
if (filterRegion.value) {
return `${REGION_NAME_FACET}:"${filterRegion.value}"`;
}
if (filterCountry.value) {
return `${COUNTRY_NAME_FACET}:"${filterCountry.value}"`;
}
return undefined;
}

async function fetchPickupLocations(payload: Omit<QueryCartPickupLocationsArgs, "storeId" | "cultureName">) {
function resetFilter() {
filterKeyword.value = "";
filterCountry.value = undefined;
filterRegion.value = undefined;
filterCity.value = undefined;
}

async function fetchPickupLocations(
payload: Omit<QueryCartPickupLocationsArgs, "storeId" | "cultureName" | "facet">,
) {
pickupLocationsLoading.value = true;
try {
const data = await getCartPickupLocations(payload);
const data = await getCartPickupLocations({
facet: `${COUNTRY_NAME_FACET} ${REGION_NAME_FACET} ${CITY_FACET}`,
...payload,
});
pickupLocations.value = data.items ?? [];
termFacets.value = data.term_facets ?? undefined;
} catch (e) {
Logger.error(`${useCartPickupLocations.name}.${fetchPickupLocations.name}`, e);
throw e;
Expand All @@ -24,5 +83,16 @@ export function useCartPickupLocations() {
pickupLocationsLoading,
pickupLocations,
fetchPickupLocations,

filterOptions,
filterKeyword,
filterCountry,
filterRegion,
filterCity,
filterApplied,
buildFilter,
resetFilter,
};
}

export const useCartPickupLocations = createSharedComposable(_useCartPickupLocations);
Loading
Loading