@timardex/cluemart-shared 1.0.61 → 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-DYtTgWhw.d.ts → global-CXYMFrpW.d.ts} +2 -14
- package/dist/{global-BKglpM-a.d.mts → global-CuCE2tTS.d.mts} +2 -14
- package/dist/graphql/index.cjs +6 -33
- 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 +6 -33
- 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 +16 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +3 -15
- package/dist/index.d.ts +3 -15
- package/dist/index.mjs +16 -40
- 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,22 +189,11 @@ 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
|
-
toStatus: EnumInviteStatus;
|
|
202
|
-
};
|
|
203
|
-
};
|
|
204
192
|
type RelationDate = {
|
|
205
193
|
lastUpdateBy: string;
|
|
206
194
|
stallType: StallType | null;
|
|
207
195
|
startDate: string;
|
|
196
|
+
startTime: string;
|
|
208
197
|
status: EnumInviteStatus;
|
|
209
198
|
};
|
|
210
199
|
interface RelationType {
|
|
@@ -214,7 +203,6 @@ interface RelationType {
|
|
|
214
203
|
lastUpdateBy: EnumResourceType;
|
|
215
204
|
marketId: string;
|
|
216
205
|
relationDates: RelationDate[];
|
|
217
|
-
relationLogs?: RelationLog[] | null;
|
|
218
206
|
relationType: EnumRelationResource;
|
|
219
207
|
stallholderId: string;
|
|
220
208
|
updatedAt?: string;
|
|
@@ -1017,7 +1005,7 @@ declare const useGetUsers: () => {
|
|
|
1017
1005
|
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
1018
1006
|
users: UserType[];
|
|
1019
1007
|
};
|
|
1020
|
-
declare const useGetUser: (
|
|
1008
|
+
declare const useGetUser: (_id: string) => {
|
|
1021
1009
|
error: _apollo_client.ApolloError | undefined;
|
|
1022
1010
|
loading: boolean;
|
|
1023
1011
|
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
@@ -1159,4 +1147,4 @@ declare const SAVED_TOKEN_KEY = "savedToken";
|
|
|
1159
1147
|
declare const SAVED_REFRESH_TOKEN_KEY = "savedRefreshToken";
|
|
1160
1148
|
declare const USER_STORAGE_KEY = "authUser";
|
|
1161
1149
|
|
|
1162
|
-
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,22 +189,11 @@ 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
|
-
toStatus: EnumInviteStatus;
|
|
202
|
-
};
|
|
203
|
-
};
|
|
204
192
|
type RelationDate = {
|
|
205
193
|
lastUpdateBy: string;
|
|
206
194
|
stallType: StallType | null;
|
|
207
195
|
startDate: string;
|
|
196
|
+
startTime: string;
|
|
208
197
|
status: EnumInviteStatus;
|
|
209
198
|
};
|
|
210
199
|
interface RelationType {
|
|
@@ -214,7 +203,6 @@ interface RelationType {
|
|
|
214
203
|
lastUpdateBy: EnumResourceType;
|
|
215
204
|
marketId: string;
|
|
216
205
|
relationDates: RelationDate[];
|
|
217
|
-
relationLogs?: RelationLog[] | null;
|
|
218
206
|
relationType: EnumRelationResource;
|
|
219
207
|
stallholderId: string;
|
|
220
208
|
updatedAt?: string;
|
|
@@ -1017,7 +1005,7 @@ declare const useGetUsers: () => {
|
|
|
1017
1005
|
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
1018
1006
|
users: UserType[];
|
|
1019
1007
|
};
|
|
1020
|
-
declare const useGetUser: (
|
|
1008
|
+
declare const useGetUser: (_id: string) => {
|
|
1021
1009
|
error: _apollo_client.ApolloError | undefined;
|
|
1022
1010
|
loading: boolean;
|
|
1023
1011
|
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
@@ -1159,4 +1147,4 @@ declare const SAVED_TOKEN_KEY = "savedToken";
|
|
|
1159
1147
|
declare const SAVED_REFRESH_TOKEN_KEY = "savedRefreshToken";
|
|
1160
1148
|
declare const USER_STORAGE_KEY = "authUser";
|
|
1161
1149
|
|
|
1162
|
-
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,34 +2288,11 @@ 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
|
-
stallType {
|
|
2295
|
-
label
|
|
2296
|
-
price
|
|
2297
|
-
stallCapacity
|
|
2298
|
-
}
|
|
2299
|
-
toStatus
|
|
2300
|
-
}
|
|
2301
|
-
`;
|
|
2302
|
-
var RELATION_LOGS_FRAGMENT = gql10`
|
|
2303
|
-
fragment RelationLogs on RelationLogType {
|
|
2304
|
-
createdAt
|
|
2305
|
-
updatedAt
|
|
2306
|
-
updatedBy {
|
|
2307
|
-
...RelationUpdateBy
|
|
2308
|
-
}
|
|
2309
|
-
}
|
|
2310
|
-
${RELATION_UPDATE_BY_FRAGMENT}
|
|
2311
|
-
`;
|
|
2312
2291
|
var RELATION_DATES_FRAGMENT = gql10`
|
|
2313
2292
|
fragment RelationDates on RelationDateType {
|
|
2314
2293
|
lastUpdateBy
|
|
2315
2294
|
startDate
|
|
2295
|
+
startTime
|
|
2316
2296
|
stallType {
|
|
2317
2297
|
label
|
|
2318
2298
|
price
|
|
@@ -2331,15 +2311,11 @@ var RELATION_FIELDS_FRAGMENT = gql10`
|
|
|
2331
2311
|
relationDates {
|
|
2332
2312
|
...RelationDates
|
|
2333
2313
|
}
|
|
2334
|
-
relationLogs {
|
|
2335
|
-
...RelationLogs
|
|
2336
|
-
}
|
|
2337
2314
|
relationType
|
|
2338
2315
|
stallholderId
|
|
2339
2316
|
updatedAt
|
|
2340
2317
|
}
|
|
2341
2318
|
${RELATION_DATES_FRAGMENT}
|
|
2342
|
-
${RELATION_LOGS_FRAGMENT}
|
|
2343
2319
|
`;
|
|
2344
2320
|
var GET_RELATION = gql10`
|
|
2345
2321
|
query getRelation($id: ID!) {
|
|
@@ -2624,7 +2600,7 @@ var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
|
|
|
2624
2600
|
const { loading, error, data, refetch } = useQuery3(
|
|
2625
2601
|
GET_RELATION_BY_MARKET_AND_STALLHOLDER,
|
|
2626
2602
|
{
|
|
2627
|
-
fetchPolicy: "
|
|
2603
|
+
fetchPolicy: "network-only",
|
|
2628
2604
|
skip: marketId === "" || stallholderId === "",
|
|
2629
2605
|
variables: { marketId, stallholderId }
|
|
2630
2606
|
}
|
|
@@ -3023,9 +2999,9 @@ var useGetUsers = () => {
|
|
|
3023
2999
|
const users = data?.users;
|
|
3024
3000
|
return { error, loading, refetch, users };
|
|
3025
3001
|
};
|
|
3026
|
-
var useGetUser = (
|
|
3002
|
+
var useGetUser = (_id) => {
|
|
3027
3003
|
const { loading, error, data, refetch } = useQuery5(GET_USER, {
|
|
3028
|
-
variables: {
|
|
3004
|
+
variables: { _id }
|
|
3029
3005
|
});
|
|
3030
3006
|
const user = data?.user;
|
|
3031
3007
|
return { error, loading, refetch, user };
|