Introduced address management functionality, including address creation, deletion, and display with full localization support. Integrated GraphQL queries, mutations, and reusable composables for backend communication. - Added `addresses.vue` to profile for managing user addresses. - Implemented `useAddressCreate`, `useAddressDelete`, and `useAddressAutocomplete` composables. - Created reusable components: `forms/address.vue` and `cards/address.vue`. - Updated `navigation.vue` to include addresses in profile navigation. - Enhanced localization files for address-related translations. This improves user experience by enabling comprehensive address management in the profile section. No breaking changes.
41 lines
668 B
TypeScript
41 lines
668 B
TypeScript
export const CREATE_ADDRESS = gql`
|
|
mutation createAddress(
|
|
$rawData: String!
|
|
$addressLine1: String!,
|
|
$addressLine2: String
|
|
) {
|
|
createAddress(
|
|
rawData: $rawData
|
|
addressLine1: $addressLine1,
|
|
addressLine2: $addressLine2
|
|
) {
|
|
uuid
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const DELETE_ADDRESS = gql`
|
|
mutation deleteAddress(
|
|
$uuid: UUID!
|
|
) {
|
|
deleteAddress(
|
|
uuid: $uuid
|
|
) {
|
|
success
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const AUTOCOMPLETE_ADDRESS = gql`
|
|
mutation autocompleteAddress(
|
|
$limit: Int,
|
|
$q: String
|
|
) {
|
|
autocompleteAddress(
|
|
limit: $limit,
|
|
q: $q
|
|
) {
|
|
suggestions
|
|
}
|
|
}
|
|
`;
|