@timardex/cluemart-shared 1.0.62 → 1.0.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-P6GA67G6.mjs → chunk-NKXNZPXS.mjs} +7 -4
- package/dist/chunk-NKXNZPXS.mjs.map +1 -0
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +1 -1
- package/dist/formFields/index.d.ts +1 -1
- package/dist/formFields/index.mjs +1 -1
- package/dist/{global-D2WubVns.d.ts → global-CXYMFrpW.d.ts} +1 -15
- package/dist/{global-CWHCGp1G.d.mts → global-CuCE2tTS.d.mts} +1 -15
- package/dist/graphql/index.cjs +5 -34
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +2 -2
- package/dist/graphql/index.d.ts +2 -2
- package/dist/graphql/index.mjs +5 -34
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +4 -4
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.mjs +5 -5
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +15 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -16
- package/dist/index.d.ts +2 -16
- package/dist/index.mjs +15 -41
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/index.cjs +6 -3
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-P6GA67G6.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -189,19 +189,6 @@ declare enum EnumSocialMedia {
|
|
|
189
189
|
YOUTUBE = "youtube"
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
type RelationLog = {
|
|
193
|
-
createdAt?: string;
|
|
194
|
-
updatedAt?: string;
|
|
195
|
-
updatedBy: {
|
|
196
|
-
resourceId: string;
|
|
197
|
-
resourceName: string;
|
|
198
|
-
resourceType: EnumResourceType;
|
|
199
|
-
stallType: StallType | null;
|
|
200
|
-
startDate: string;
|
|
201
|
-
startTime: string;
|
|
202
|
-
toStatus: EnumInviteStatus;
|
|
203
|
-
};
|
|
204
|
-
};
|
|
205
192
|
type RelationDate = {
|
|
206
193
|
lastUpdateBy: string;
|
|
207
194
|
stallType: StallType | null;
|
|
@@ -216,7 +203,6 @@ interface RelationType {
|
|
|
216
203
|
lastUpdateBy: EnumResourceType;
|
|
217
204
|
marketId: string;
|
|
218
205
|
relationDates: RelationDate[];
|
|
219
|
-
relationLogs?: RelationLog[] | null;
|
|
220
206
|
relationType: EnumRelationResource;
|
|
221
207
|
stallholderId: string;
|
|
222
208
|
updatedAt?: string;
|
|
@@ -1019,7 +1005,7 @@ declare const useGetUsers: () => {
|
|
|
1019
1005
|
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
1020
1006
|
users: UserType[];
|
|
1021
1007
|
};
|
|
1022
|
-
declare const useGetUser: (
|
|
1008
|
+
declare const useGetUser: (_id: string) => {
|
|
1023
1009
|
error: _apollo_client.ApolloError | undefined;
|
|
1024
1010
|
loading: boolean;
|
|
1025
1011
|
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
@@ -1161,4 +1147,4 @@ declare const SAVED_TOKEN_KEY = "savedToken";
|
|
|
1161
1147
|
declare const SAVED_REFRESH_TOKEN_KEY = "savedRefreshToken";
|
|
1162
1148
|
declare const USER_STORAGE_KEY = "authUser";
|
|
1163
1149
|
|
|
1164
|
-
export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateContactUsFormData, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderFormData, type CreateStallholderInfoFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumOSType, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumSocialMedia, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PaymentInfoType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type
|
|
1150
|
+
export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateContactUsFormData, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderFormData, type CreateStallholderInfoFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumOSType, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumSocialMedia, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PaymentInfoType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationType, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SatllholderWithConnectionDatesType, type SocialMediaType, type StallType, type StallholderAttributes, type StallholderFormData, type StallholderInfoFormData, type StallholderInfoType, type StallholderLocation, type StallholderType, type Subcategory, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserFormData, type UserType, type ValidateVerificationTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, contactUsFields, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderFormValues, defaultStallholderInfoFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentInfo, marketStartDateFields, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, testersFields, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useContactUs, useContactUsForm, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderInfo, useCreateTester, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useDeleteTester, useDeleteUser, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderInfo, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetTester, useGetTesters, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUserStallholder, useGetUsers, useLocationSearch, useLogin, useLoginForm, useLogout, useMarketForm, useMarketInfoForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderForm, useStallholderInfoForm, useTestersForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderInfo, useUpdateTester, useUpdateUser, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, validateVerificationTokenFields };
|
package/dist/index.d.ts
CHANGED
|
@@ -189,19 +189,6 @@ declare enum EnumSocialMedia {
|
|
|
189
189
|
YOUTUBE = "youtube"
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
type RelationLog = {
|
|
193
|
-
createdAt?: string;
|
|
194
|
-
updatedAt?: string;
|
|
195
|
-
updatedBy: {
|
|
196
|
-
resourceId: string;
|
|
197
|
-
resourceName: string;
|
|
198
|
-
resourceType: EnumResourceType;
|
|
199
|
-
stallType: StallType | null;
|
|
200
|
-
startDate: string;
|
|
201
|
-
startTime: string;
|
|
202
|
-
toStatus: EnumInviteStatus;
|
|
203
|
-
};
|
|
204
|
-
};
|
|
205
192
|
type RelationDate = {
|
|
206
193
|
lastUpdateBy: string;
|
|
207
194
|
stallType: StallType | null;
|
|
@@ -216,7 +203,6 @@ interface RelationType {
|
|
|
216
203
|
lastUpdateBy: EnumResourceType;
|
|
217
204
|
marketId: string;
|
|
218
205
|
relationDates: RelationDate[];
|
|
219
|
-
relationLogs?: RelationLog[] | null;
|
|
220
206
|
relationType: EnumRelationResource;
|
|
221
207
|
stallholderId: string;
|
|
222
208
|
updatedAt?: string;
|
|
@@ -1019,7 +1005,7 @@ declare const useGetUsers: () => {
|
|
|
1019
1005
|
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
1020
1006
|
users: UserType[];
|
|
1021
1007
|
};
|
|
1022
|
-
declare const useGetUser: (
|
|
1008
|
+
declare const useGetUser: (_id: string) => {
|
|
1023
1009
|
error: _apollo_client.ApolloError | undefined;
|
|
1024
1010
|
loading: boolean;
|
|
1025
1011
|
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
@@ -1161,4 +1147,4 @@ declare const SAVED_TOKEN_KEY = "savedToken";
|
|
|
1161
1147
|
declare const SAVED_REFRESH_TOKEN_KEY = "savedRefreshToken";
|
|
1162
1148
|
declare const USER_STORAGE_KEY = "authUser";
|
|
1163
1149
|
|
|
1164
|
-
export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateContactUsFormData, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderFormData, type CreateStallholderInfoFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumOSType, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumSocialMedia, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PaymentInfoType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type
|
|
1150
|
+
export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateContactUsFormData, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderFormData, type CreateStallholderInfoFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumOSType, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumSocialMedia, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PaymentInfoType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationType, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SatllholderWithConnectionDatesType, type SocialMediaType, type StallType, type StallholderAttributes, type StallholderFormData, type StallholderInfoFormData, type StallholderInfoType, type StallholderLocation, type StallholderType, type Subcategory, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserFormData, type UserType, type ValidateVerificationTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, contactUsFields, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderFormValues, defaultStallholderInfoFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentInfo, marketStartDateFields, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, testersFields, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useContactUs, useContactUsForm, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderInfo, useCreateTester, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useDeleteTester, useDeleteUser, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderInfo, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetTester, useGetTesters, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUserStallholder, useGetUsers, useLocationSearch, useLogin, useLoginForm, useLogout, useMarketForm, useMarketInfoForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderForm, useStallholderInfoForm, useTestersForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderInfo, useUpdateTester, useUpdateUser, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, validateVerificationTokenFields };
|
package/dist/index.mjs
CHANGED
|
@@ -124,10 +124,13 @@ var formatDate = (dateStr, display = "datetime", timeStr) => {
|
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
var getCurrentAndFutureDates = (dates) => {
|
|
127
|
-
const
|
|
127
|
+
const now2 = dayjs();
|
|
128
128
|
return dates.filter((dateObj) => {
|
|
129
|
-
const dateTime = dayjs(
|
|
130
|
-
|
|
129
|
+
const dateTime = dayjs(
|
|
130
|
+
`${dateObj.startDate} ${dateObj.startTime}`,
|
|
131
|
+
`${dateFormat} ${timeFormat}`
|
|
132
|
+
);
|
|
133
|
+
return dateTime.isSameOrAfter(now2);
|
|
131
134
|
});
|
|
132
135
|
};
|
|
133
136
|
var isFutureDatesBeforeThreshold = (date, minHoursFromNow) => {
|
|
@@ -624,7 +627,7 @@ var defaultMarketFormValues = {
|
|
|
624
627
|
tags: []
|
|
625
628
|
};
|
|
626
629
|
var defaultMarketInfoFormValues = {
|
|
627
|
-
applicationDeadlineHours:
|
|
630
|
+
applicationDeadlineHours: 48,
|
|
628
631
|
dateTime: [
|
|
629
632
|
{
|
|
630
633
|
endDate: "04-05-2025",
|
|
@@ -642,11 +645,11 @@ var defaultMarketInfoFormValues = {
|
|
|
642
645
|
}
|
|
643
646
|
],
|
|
644
647
|
marketId: "",
|
|
645
|
-
packInTime:
|
|
648
|
+
packInTime: 2,
|
|
646
649
|
// e.g., 2 hours before market opens
|
|
647
|
-
packOutTime:
|
|
650
|
+
packOutTime: 1,
|
|
648
651
|
// e.g., 1 hour after market closes
|
|
649
|
-
paymentDueHours:
|
|
652
|
+
paymentDueHours: 24,
|
|
650
653
|
paymentInfo: [],
|
|
651
654
|
requirements: []
|
|
652
655
|
};
|
|
@@ -2071,8 +2074,8 @@ var GET_USERS = gql8`
|
|
|
2071
2074
|
${USER_FIELDS_FRAGMENT}
|
|
2072
2075
|
`;
|
|
2073
2076
|
var GET_USER = gql8`
|
|
2074
|
-
query getUser($
|
|
2075
|
-
user(_id: $
|
|
2077
|
+
query getUser($_id: ID!) {
|
|
2078
|
+
user(_id: $_id) {
|
|
2076
2079
|
...UserFields
|
|
2077
2080
|
}
|
|
2078
2081
|
}
|
|
@@ -2285,31 +2288,6 @@ import { gql as gql11 } from "@apollo/client";
|
|
|
2285
2288
|
|
|
2286
2289
|
// src/graphql/queries/relation.ts
|
|
2287
2290
|
import { gql as gql10 } from "@apollo/client";
|
|
2288
|
-
var RELATION_UPDATE_BY_FRAGMENT = gql10`
|
|
2289
|
-
fragment RelationUpdateBy on RelationUpdateByType {
|
|
2290
|
-
resourceId
|
|
2291
|
-
resourceName
|
|
2292
|
-
resourceType
|
|
2293
|
-
startDate
|
|
2294
|
-
startTime
|
|
2295
|
-
stallType {
|
|
2296
|
-
label
|
|
2297
|
-
price
|
|
2298
|
-
stallCapacity
|
|
2299
|
-
}
|
|
2300
|
-
toStatus
|
|
2301
|
-
}
|
|
2302
|
-
`;
|
|
2303
|
-
var RELATION_LOGS_FRAGMENT = gql10`
|
|
2304
|
-
fragment RelationLogs on RelationLogType {
|
|
2305
|
-
createdAt
|
|
2306
|
-
updatedAt
|
|
2307
|
-
updatedBy {
|
|
2308
|
-
...RelationUpdateBy
|
|
2309
|
-
}
|
|
2310
|
-
}
|
|
2311
|
-
${RELATION_UPDATE_BY_FRAGMENT}
|
|
2312
|
-
`;
|
|
2313
2291
|
var RELATION_DATES_FRAGMENT = gql10`
|
|
2314
2292
|
fragment RelationDates on RelationDateType {
|
|
2315
2293
|
lastUpdateBy
|
|
@@ -2333,15 +2311,11 @@ var RELATION_FIELDS_FRAGMENT = gql10`
|
|
|
2333
2311
|
relationDates {
|
|
2334
2312
|
...RelationDates
|
|
2335
2313
|
}
|
|
2336
|
-
relationLogs {
|
|
2337
|
-
...RelationLogs
|
|
2338
|
-
}
|
|
2339
2314
|
relationType
|
|
2340
2315
|
stallholderId
|
|
2341
2316
|
updatedAt
|
|
2342
2317
|
}
|
|
2343
2318
|
${RELATION_DATES_FRAGMENT}
|
|
2344
|
-
${RELATION_LOGS_FRAGMENT}
|
|
2345
2319
|
`;
|
|
2346
2320
|
var GET_RELATION = gql10`
|
|
2347
2321
|
query getRelation($id: ID!) {
|
|
@@ -2626,7 +2600,7 @@ var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
|
|
|
2626
2600
|
const { loading, error, data, refetch } = useQuery3(
|
|
2627
2601
|
GET_RELATION_BY_MARKET_AND_STALLHOLDER,
|
|
2628
2602
|
{
|
|
2629
|
-
fetchPolicy: "
|
|
2603
|
+
fetchPolicy: "network-only",
|
|
2630
2604
|
skip: marketId === "" || stallholderId === "",
|
|
2631
2605
|
variables: { marketId, stallholderId }
|
|
2632
2606
|
}
|
|
@@ -3025,9 +2999,9 @@ var useGetUsers = () => {
|
|
|
3025
2999
|
const users = data?.users;
|
|
3026
3000
|
return { error, loading, refetch, users };
|
|
3027
3001
|
};
|
|
3028
|
-
var useGetUser = (
|
|
3002
|
+
var useGetUser = (_id) => {
|
|
3029
3003
|
const { loading, error, data, refetch } = useQuery5(GET_USER, {
|
|
3030
|
-
variables: {
|
|
3004
|
+
variables: { _id }
|
|
3031
3005
|
});
|
|
3032
3006
|
const user = data?.user;
|
|
3033
3007
|
return { error, loading, refetch, user };
|