@timardex/cluemart-shared 1.0.62 → 1.0.64
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 +0 -6
- 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 -7
- package/dist/formFields/index.mjs.map +1 -1
- package/dist/{global-CWHCGp1G.d.mts → global-OSozst0u.d.mts} +1 -16
- package/dist/{global-D2WubVns.d.ts → global-vK90VUq-.d.ts} +1 -16
- package/dist/graphql/index.cjs +5 -35
- 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 -35
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +3 -9
- 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 +4 -10
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +14 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -17
- package/dist/index.d.ts +2 -17
- package/dist/index.mjs +14 -53
- 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;
|
|
@@ -247,7 +233,6 @@ interface MarketInfoFormData {
|
|
|
247
233
|
dateTime: DateTimeWithPriceType[];
|
|
248
234
|
marketId: string;
|
|
249
235
|
packInTime: number;
|
|
250
|
-
packOutTime: number;
|
|
251
236
|
paymentDueHours: number;
|
|
252
237
|
paymentInfo: PaymentInfoType[];
|
|
253
238
|
requirements?: Requirement[];
|
|
@@ -1019,7 +1004,7 @@ declare const useGetUsers: () => {
|
|
|
1019
1004
|
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
1020
1005
|
users: UserType[];
|
|
1021
1006
|
};
|
|
1022
|
-
declare const useGetUser: (
|
|
1007
|
+
declare const useGetUser: (_id: string) => {
|
|
1023
1008
|
error: _apollo_client.ApolloError | undefined;
|
|
1024
1009
|
loading: boolean;
|
|
1025
1010
|
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
@@ -1161,4 +1146,4 @@ declare const SAVED_TOKEN_KEY = "savedToken";
|
|
|
1161
1146
|
declare const SAVED_REFRESH_TOKEN_KEY = "savedRefreshToken";
|
|
1162
1147
|
declare const USER_STORAGE_KEY = "authUser";
|
|
1163
1148
|
|
|
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
|
|
1149
|
+
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;
|
|
@@ -247,7 +233,6 @@ interface MarketInfoFormData {
|
|
|
247
233
|
dateTime: DateTimeWithPriceType[];
|
|
248
234
|
marketId: string;
|
|
249
235
|
packInTime: number;
|
|
250
|
-
packOutTime: number;
|
|
251
236
|
paymentDueHours: number;
|
|
252
237
|
paymentInfo: PaymentInfoType[];
|
|
253
238
|
requirements?: Requirement[];
|
|
@@ -1019,7 +1004,7 @@ declare const useGetUsers: () => {
|
|
|
1019
1004
|
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
1020
1005
|
users: UserType[];
|
|
1021
1006
|
};
|
|
1022
|
-
declare const useGetUser: (
|
|
1007
|
+
declare const useGetUser: (_id: string) => {
|
|
1023
1008
|
error: _apollo_client.ApolloError | undefined;
|
|
1024
1009
|
loading: boolean;
|
|
1025
1010
|
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
@@ -1161,4 +1146,4 @@ declare const SAVED_TOKEN_KEY = "savedToken";
|
|
|
1161
1146
|
declare const SAVED_REFRESH_TOKEN_KEY = "savedRefreshToken";
|
|
1162
1147
|
declare const USER_STORAGE_KEY = "authUser";
|
|
1163
1148
|
|
|
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
|
|
1149
|
+
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) => {
|
|
@@ -451,7 +454,6 @@ var marketInfoSchema = yup2.object().shape({
|
|
|
451
454
|
dateTime: yup2.array().of(dateTimeWithPriceSchema).required("DateTime is required"),
|
|
452
455
|
marketId: yup2.string().trim().required("Market ID is required"),
|
|
453
456
|
packInTime: yup2.number().typeError("Pack in time must be a number").min(1, "Pack in time must be at least 1").required("Pack in time is required").test("no-leading-zeros", "", noLeadingZeros("Pack in time")),
|
|
454
|
-
packOutTime: yup2.number().typeError("Pack out time must be a number").min(1, "Pack out time must be at least 1").required("Pack out time is required").test("no-leading-zeros", "", noLeadingZeros("Pack out time")),
|
|
455
457
|
paymentDueHours: yup2.number().typeError("Payment due hours must be a number").min(1, "Payment due hours must be at least 1").required("Payment due hours is required").test("no-leading-zeros", "", noLeadingZeros("Payment due hours")),
|
|
456
458
|
paymentInfo: yup2.array().of(paymentInfoSchema).min(1, "At least one payment info is required").required("Payment info is required")
|
|
457
459
|
});
|
|
@@ -624,7 +626,7 @@ var defaultMarketFormValues = {
|
|
|
624
626
|
tags: []
|
|
625
627
|
};
|
|
626
628
|
var defaultMarketInfoFormValues = {
|
|
627
|
-
applicationDeadlineHours:
|
|
629
|
+
applicationDeadlineHours: 48,
|
|
628
630
|
dateTime: [
|
|
629
631
|
{
|
|
630
632
|
endDate: "04-05-2025",
|
|
@@ -642,11 +644,9 @@ var defaultMarketInfoFormValues = {
|
|
|
642
644
|
}
|
|
643
645
|
],
|
|
644
646
|
marketId: "",
|
|
645
|
-
packInTime:
|
|
647
|
+
packInTime: 2,
|
|
646
648
|
// e.g., 2 hours before market opens
|
|
647
|
-
|
|
648
|
-
// e.g., 1 hour after market closes
|
|
649
|
-
paymentDueHours: 0,
|
|
649
|
+
paymentDueHours: 24,
|
|
650
650
|
paymentInfo: [],
|
|
651
651
|
requirements: []
|
|
652
652
|
};
|
|
@@ -945,7 +945,6 @@ function useMarketInfoForm(data) {
|
|
|
945
945
|
dateTime: data.dateTime,
|
|
946
946
|
marketId: data.marketId,
|
|
947
947
|
packInTime: data.packInTime,
|
|
948
|
-
packOutTime: data.packOutTime,
|
|
949
948
|
paymentDueHours: data.paymentDueHours,
|
|
950
949
|
paymentInfo: data.paymentInfo,
|
|
951
950
|
requirements: data.requirements
|
|
@@ -960,7 +959,6 @@ function useMarketInfoForm(data) {
|
|
|
960
959
|
dateTime,
|
|
961
960
|
marketId,
|
|
962
961
|
packInTime,
|
|
963
|
-
packOutTime,
|
|
964
962
|
paymentDueHours,
|
|
965
963
|
paymentInfo,
|
|
966
964
|
requirements
|
|
@@ -973,7 +971,6 @@ function useMarketInfoForm(data) {
|
|
|
973
971
|
dateTime,
|
|
974
972
|
marketId,
|
|
975
973
|
packInTime,
|
|
976
|
-
packOutTime,
|
|
977
974
|
paymentDueHours,
|
|
978
975
|
paymentInfo,
|
|
979
976
|
requirements
|
|
@@ -1770,7 +1767,6 @@ var MARKET_INFO = gql5`
|
|
|
1770
1767
|
}
|
|
1771
1768
|
marketId
|
|
1772
1769
|
packInTime
|
|
1773
|
-
packOutTime
|
|
1774
1770
|
paymentDueHours
|
|
1775
1771
|
paymentInfo {
|
|
1776
1772
|
accountHolderName
|
|
@@ -2071,8 +2067,8 @@ var GET_USERS = gql8`
|
|
|
2071
2067
|
${USER_FIELDS_FRAGMENT}
|
|
2072
2068
|
`;
|
|
2073
2069
|
var GET_USER = gql8`
|
|
2074
|
-
query getUser($
|
|
2075
|
-
user(_id: $
|
|
2070
|
+
query getUser($_id: ID!) {
|
|
2071
|
+
user(_id: $_id) {
|
|
2076
2072
|
...UserFields
|
|
2077
2073
|
}
|
|
2078
2074
|
}
|
|
@@ -2285,31 +2281,6 @@ import { gql as gql11 } from "@apollo/client";
|
|
|
2285
2281
|
|
|
2286
2282
|
// src/graphql/queries/relation.ts
|
|
2287
2283
|
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
2284
|
var RELATION_DATES_FRAGMENT = gql10`
|
|
2314
2285
|
fragment RelationDates on RelationDateType {
|
|
2315
2286
|
lastUpdateBy
|
|
@@ -2333,15 +2304,11 @@ var RELATION_FIELDS_FRAGMENT = gql10`
|
|
|
2333
2304
|
relationDates {
|
|
2334
2305
|
...RelationDates
|
|
2335
2306
|
}
|
|
2336
|
-
relationLogs {
|
|
2337
|
-
...RelationLogs
|
|
2338
|
-
}
|
|
2339
2307
|
relationType
|
|
2340
2308
|
stallholderId
|
|
2341
2309
|
updatedAt
|
|
2342
2310
|
}
|
|
2343
2311
|
${RELATION_DATES_FRAGMENT}
|
|
2344
|
-
${RELATION_LOGS_FRAGMENT}
|
|
2345
2312
|
`;
|
|
2346
2313
|
var GET_RELATION = gql10`
|
|
2347
2314
|
query getRelation($id: ID!) {
|
|
@@ -2626,7 +2593,7 @@ var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
|
|
|
2626
2593
|
const { loading, error, data, refetch } = useQuery3(
|
|
2627
2594
|
GET_RELATION_BY_MARKET_AND_STALLHOLDER,
|
|
2628
2595
|
{
|
|
2629
|
-
fetchPolicy: "
|
|
2596
|
+
fetchPolicy: "network-only",
|
|
2630
2597
|
skip: marketId === "" || stallholderId === "",
|
|
2631
2598
|
variables: { marketId, stallholderId }
|
|
2632
2599
|
}
|
|
@@ -3025,9 +2992,9 @@ var useGetUsers = () => {
|
|
|
3025
2992
|
const users = data?.users;
|
|
3026
2993
|
return { error, loading, refetch, users };
|
|
3027
2994
|
};
|
|
3028
|
-
var useGetUser = (
|
|
2995
|
+
var useGetUser = (_id) => {
|
|
3029
2996
|
const { loading, error, data, refetch } = useQuery5(GET_USER, {
|
|
3030
|
-
variables: {
|
|
2997
|
+
variables: { _id }
|
|
3031
2998
|
});
|
|
3032
2999
|
const user = data?.user;
|
|
3033
3000
|
return { error, loading, refetch, user };
|
|
@@ -3460,12 +3427,6 @@ var marketInfo = [
|
|
|
3460
3427
|
keyboardType: "number-pad",
|
|
3461
3428
|
name: "packInTime",
|
|
3462
3429
|
placeholder: "Pack In Time (in hours)"
|
|
3463
|
-
},
|
|
3464
|
-
{
|
|
3465
|
-
helperText: "Pack Out Time *",
|
|
3466
|
-
keyboardType: "number-pad",
|
|
3467
|
-
name: "packOutTime",
|
|
3468
|
-
placeholder: "Pack Out Time (in hours)"
|
|
3469
3430
|
}
|
|
3470
3431
|
];
|
|
3471
3432
|
var marketInfoPaymentInfo = [
|