@timardex/cluemart-shared 1.1.78 → 1.1.79
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/{ad-ByaFgKCJ.d.ts → ad-Ce7cLdiv.d.ts} +4 -4
- package/dist/{ad-BoyPTKzO.d.mts → ad-DwRLMLYf.d.mts} +4 -4
- package/dist/{auth-CatvNkT_.d.ts → auth-D0DRigoH.d.ts} +1 -1
- package/dist/{auth-CsMldwsP.d.mts → auth-waRIlEXb.d.mts} +1 -1
- package/dist/{chunk-ERBPRUAF.mjs → chunk-MVZHKSTO.mjs} +12 -12
- package/dist/chunk-MVZHKSTO.mjs.map +1 -0
- package/dist/{chunk-JFIG6CV2.mjs → chunk-YOGSPGDV.mjs} +2 -2
- package/dist/chunk-YOGSPGDV.mjs.map +1 -0
- package/dist/{chunk-JZMSWUO5.mjs → chunk-Z4MFANBF.mjs} +2 -2
- package/dist/enums/index.cjs +11 -11
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.mts +11 -11
- package/dist/enums/index.d.ts +11 -11
- package/dist/enums/index.mjs +1 -1
- package/dist/formFields/index.cjs +26 -26
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +7 -7
- package/dist/formFields/index.d.ts +7 -7
- package/dist/formFields/index.mjs +23 -23
- package/dist/formFields/index.mjs.map +1 -1
- package/dist/{global-BsANkXhj.d.ts → global-SUox6kvO.d.ts} +14 -14
- package/dist/{global-Dt-vAIF9.d.mts → global-yFmN7ypZ.d.mts} +14 -14
- package/dist/graphql/index.cjs +249 -248
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +33 -33
- package/dist/graphql/index.d.ts +33 -33
- package/dist/graphql/index.mjs +236 -235
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +36 -36
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +15 -15
- package/dist/hooks/index.d.ts +15 -15
- package/dist/hooks/index.mjs +33 -33
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +321 -320
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +74 -74
- package/dist/index.d.ts +74 -74
- package/dist/index.mjs +298 -297
- package/dist/index.mjs.map +1 -1
- package/dist/{resourceViews-C2CYUMC0.d.ts → resourceViews-CcElRvU6.d.ts} +2 -2
- package/dist/{resourceViews-ja9Qif1X.d.mts → resourceViews-Xr7sq5z4.d.mts} +2 -2
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.d.ts +4 -4
- package/dist/types/index.mjs +1 -1
- 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 +2 -2
- package/package.json +1 -1
- package/dist/chunk-ERBPRUAF.mjs.map +0 -1
- package/dist/chunk-JFIG6CV2.mjs.map +0 -1
- /package/dist/{chunk-JZMSWUO5.mjs.map → chunk-Z4MFANBF.mjs.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -63,11 +63,16 @@ __export(index_exports, {
|
|
|
63
63
|
contactUsFields: () => contactUsFields,
|
|
64
64
|
darkColors: () => darkColors,
|
|
65
65
|
dateFormat: () => dateFormat,
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
defaultEventFormValues: () => defaultEventFormValues,
|
|
67
|
+
defaultEventInfoFormValues: () => defaultEventInfoFormValues,
|
|
68
68
|
defaultRegion: () => defaultRegion,
|
|
69
69
|
defaultStallholderFormValues: () => defaultStallholderFormValues,
|
|
70
70
|
defaultStallholderInfoFormValues: () => defaultStallholderInfoFormValues,
|
|
71
|
+
eventBasicInfoFields: () => eventBasicInfoFields,
|
|
72
|
+
eventEndDateFields: () => eventEndDateFields,
|
|
73
|
+
eventInfo: () => eventInfo,
|
|
74
|
+
eventInfoPaymentInfo: () => eventInfoPaymentInfo,
|
|
75
|
+
eventStartDateFields: () => eventStartDateFields,
|
|
71
76
|
fonts: () => fonts,
|
|
72
77
|
formatDate: () => formatDate,
|
|
73
78
|
formatTimestamp: () => formatTimestamp,
|
|
@@ -78,11 +83,6 @@ __export(index_exports, {
|
|
|
78
83
|
loginFields: () => loginFields,
|
|
79
84
|
mapArrayToOptions: () => mapArrayToOptions,
|
|
80
85
|
mapBaseResourceTypeToFormData: () => mapBaseResourceTypeToFormData,
|
|
81
|
-
marketBasicInfoFields: () => marketBasicInfoFields,
|
|
82
|
-
marketEndDateFields: () => marketEndDateFields,
|
|
83
|
-
marketInfo: () => marketInfo,
|
|
84
|
-
marketInfoPaymentInfo: () => marketInfoPaymentInfo,
|
|
85
|
-
marketStartDateFields: () => marketStartDateFields,
|
|
86
86
|
normalizeUrl: () => normalizeUrl,
|
|
87
87
|
packagingOptions: () => packagingOptions,
|
|
88
88
|
paymentMethodOptions: () => paymentMethodOptions,
|
|
@@ -122,8 +122,8 @@ __export(index_exports, {
|
|
|
122
122
|
useContactUsForm: () => useContactUsForm,
|
|
123
123
|
useCreateAd: () => useCreateAd,
|
|
124
124
|
useCreateBulkNotifications: () => useCreateBulkNotifications,
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
useCreateEvent: () => useCreateEvent,
|
|
126
|
+
useCreateEventInfo: () => useCreateEventInfo,
|
|
127
127
|
useCreatePoster: () => useCreatePoster,
|
|
128
128
|
useCreatePushToken: () => useCreatePushToken,
|
|
129
129
|
useCreateRelation: () => useCreateRelation,
|
|
@@ -135,27 +135,29 @@ __export(index_exports, {
|
|
|
135
135
|
useDeleteAd: () => useDeleteAd,
|
|
136
136
|
useDeleteAllNotifications: () => useDeleteAllNotifications,
|
|
137
137
|
useDeleteChat: () => useDeleteChat,
|
|
138
|
-
|
|
138
|
+
useDeleteEvent: () => useDeleteEvent,
|
|
139
139
|
useDeleteNotification: () => useDeleteNotification,
|
|
140
140
|
useDeleteRelation: () => useDeleteRelation,
|
|
141
141
|
useDeleteStallholder: () => useDeleteStallholder,
|
|
142
142
|
useDeleteTester: () => useDeleteTester,
|
|
143
143
|
useDeleteUser: () => useDeleteUser,
|
|
144
|
+
useEventForm: () => useEventForm,
|
|
145
|
+
useEventInfoForm: () => useEventInfoForm,
|
|
144
146
|
useGetAd: () => useGetAd,
|
|
145
147
|
useGetAds: () => useGetAds,
|
|
146
148
|
useGetAdsByRegion: () => useGetAdsByRegion,
|
|
147
149
|
useGetChat: () => useGetChat,
|
|
148
150
|
useGetChatSubscription: () => useGetChatSubscription,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
useGetEvent: () => useGetEvent,
|
|
152
|
+
useGetEventInfo: () => useGetEventInfo,
|
|
153
|
+
useGetEventRelations: () => useGetEventRelations,
|
|
154
|
+
useGetEvents: () => useGetEvents,
|
|
155
|
+
useGetEventsByRegion: () => useGetEventsByRegion,
|
|
156
|
+
useGetEventsNearMe: () => useGetEventsNearMe,
|
|
155
157
|
useGetNotificationCount: () => useGetNotificationCount,
|
|
156
158
|
useGetNotificationCountSubscription: () => useGetNotificationCountSubscription,
|
|
157
159
|
useGetRelation: () => useGetRelation,
|
|
158
|
-
|
|
160
|
+
useGetRelationByEventAndStallholder: () => useGetRelationByEventAndStallholder,
|
|
159
161
|
useGetResourceConnections: () => useGetResourceConnections,
|
|
160
162
|
useGetResourceViews: () => useGetResourceViews,
|
|
161
163
|
useGetStallholder: () => useGetStallholder,
|
|
@@ -167,8 +169,8 @@ __export(index_exports, {
|
|
|
167
169
|
useGetTesters: () => useGetTesters,
|
|
168
170
|
useGetUser: () => useGetUser,
|
|
169
171
|
useGetUserChats: () => useGetUserChats,
|
|
172
|
+
useGetUserEvents: () => useGetUserEvents,
|
|
170
173
|
useGetUserFavourites: () => useGetUserFavourites,
|
|
171
|
-
useGetUserMarkets: () => useGetUserMarkets,
|
|
172
174
|
useGetUserNotifications: () => useGetUserNotifications,
|
|
173
175
|
useGetUserNotificationsSubscription: () => useGetUserNotificationsSubscription,
|
|
174
176
|
useGetUserStallholder: () => useGetUserStallholder,
|
|
@@ -179,8 +181,6 @@ __export(index_exports, {
|
|
|
179
181
|
useLogout: () => useLogout,
|
|
180
182
|
useMarkAllNotificationsRead: () => useMarkAllNotificationsRead,
|
|
181
183
|
useMarkNotificationRead: () => useMarkNotificationRead,
|
|
182
|
-
useMarketForm: () => useMarketForm,
|
|
183
|
-
useMarketInfoForm: () => useMarketInfoForm,
|
|
184
184
|
useRefreshToken: () => useRefreshToken,
|
|
185
185
|
useRegister: () => useRegister,
|
|
186
186
|
useRegisterForm: () => useRegisterForm,
|
|
@@ -190,7 +190,7 @@ __export(index_exports, {
|
|
|
190
190
|
useRequestPasswordResetForm: () => useRequestPasswordResetForm,
|
|
191
191
|
useResetPassword: () => useResetPassword,
|
|
192
192
|
useResetPasswordForm: () => useResetPasswordForm,
|
|
193
|
-
|
|
193
|
+
useSearchEvents: () => useSearchEvents,
|
|
194
194
|
useSearchStallholders: () => useSearchStallholders,
|
|
195
195
|
useSelectPackage: () => useSelectPackage,
|
|
196
196
|
useSendChatMessage: () => useSendChatMessage,
|
|
@@ -198,8 +198,8 @@ __export(index_exports, {
|
|
|
198
198
|
useStallholderInfoForm: () => useStallholderInfoForm,
|
|
199
199
|
useTestersForm: () => useTestersForm,
|
|
200
200
|
useUpdateAd: () => useUpdateAd,
|
|
201
|
-
|
|
202
|
-
|
|
201
|
+
useUpdateEvent: () => useUpdateEvent,
|
|
202
|
+
useUpdateEventInfo: () => useUpdateEventInfo,
|
|
203
203
|
useUpdateRelation: () => useUpdateRelation,
|
|
204
204
|
useUpdateStallholder: () => useUpdateStallholder,
|
|
205
205
|
useUpdateStallholderInfo: () => useUpdateStallholderInfo,
|
|
@@ -240,7 +240,7 @@ var EnumPaymentMethod = /* @__PURE__ */ ((EnumPaymentMethod2) => {
|
|
|
240
240
|
return EnumPaymentMethod2;
|
|
241
241
|
})(EnumPaymentMethod || {});
|
|
242
242
|
var EnumResourceType = /* @__PURE__ */ ((EnumResourceType2) => {
|
|
243
|
-
EnumResourceType2["
|
|
243
|
+
EnumResourceType2["EVENT"] = "event";
|
|
244
244
|
EnumResourceType2["STALLHOLDER"] = "stallholder";
|
|
245
245
|
return EnumResourceType2;
|
|
246
246
|
})(EnumResourceType || {});
|
|
@@ -251,22 +251,22 @@ var EnumOSPlatform = /* @__PURE__ */ ((EnumOSPlatform2) => {
|
|
|
251
251
|
return EnumOSPlatform2;
|
|
252
252
|
})(EnumOSPlatform || {});
|
|
253
253
|
var EnumRelationResource = /* @__PURE__ */ ((EnumRelationResource2) => {
|
|
254
|
-
EnumRelationResource2["
|
|
255
|
-
EnumRelationResource2["
|
|
254
|
+
EnumRelationResource2["EVENT_INVITE_STALLHOLDER"] = "event_invite_stallholder";
|
|
255
|
+
EnumRelationResource2["STALLHOLDER_APPLICATION_TO_EVENT"] = "stallholder_application_to_event";
|
|
256
256
|
return EnumRelationResource2;
|
|
257
257
|
})(EnumRelationResource || {});
|
|
258
258
|
var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceType2) => {
|
|
259
|
-
EnumNotificationResourceType2["
|
|
259
|
+
EnumNotificationResourceType2["CREATED_EVENT"] = "created_event";
|
|
260
260
|
EnumNotificationResourceType2["CREATED_STALLHOLDER"] = "created_stallholder";
|
|
261
|
-
EnumNotificationResourceType2["
|
|
261
|
+
EnumNotificationResourceType2["APPROVED_EVENT"] = "approved_event";
|
|
262
262
|
EnumNotificationResourceType2["APPROVED_STALLHOLDER"] = "approved_stallholder";
|
|
263
263
|
EnumNotificationResourceType2["NEW_CHAT_MESSAGE"] = "new_chat_message";
|
|
264
|
-
EnumNotificationResourceType2["
|
|
265
|
-
EnumNotificationResourceType2["
|
|
264
|
+
EnumNotificationResourceType2["EVENT_INVITE_STALLHOLDER"] = "event_invite_stallholder" /* EVENT_INVITE_STALLHOLDER */;
|
|
265
|
+
EnumNotificationResourceType2["STALLHOLDER_APPLICATION_TO_EVENT"] = "stallholder_application_to_event" /* STALLHOLDER_APPLICATION_TO_EVENT */;
|
|
266
266
|
return EnumNotificationResourceType2;
|
|
267
267
|
})(EnumNotificationResourceType || {});
|
|
268
268
|
var EnumNotificationType = /* @__PURE__ */ ((EnumNotificationType2) => {
|
|
269
|
-
EnumNotificationType2["
|
|
269
|
+
EnumNotificationType2["EVENT"] = "event" /* EVENT */;
|
|
270
270
|
EnumNotificationType2["STALLHOLDER"] = "stallholder" /* STALLHOLDER */;
|
|
271
271
|
EnumNotificationType2["RELATION"] = "relation";
|
|
272
272
|
EnumNotificationType2["CHAT"] = "chat";
|
|
@@ -296,11 +296,11 @@ var ImageTypeEnum = /* @__PURE__ */ ((ImageTypeEnum2) => {
|
|
|
296
296
|
return ImageTypeEnum2;
|
|
297
297
|
})(ImageTypeEnum || {});
|
|
298
298
|
var EnumUserLicence = /* @__PURE__ */ ((EnumUserLicence2) => {
|
|
299
|
-
EnumUserLicence2["
|
|
300
|
-
EnumUserLicence2["
|
|
299
|
+
EnumUserLicence2["PRO_EVENT"] = "pro_event";
|
|
300
|
+
EnumUserLicence2["PRO_PLUS_EVENT"] = "pro_plus_event";
|
|
301
301
|
EnumUserLicence2["PRO_PLUS_STALLHOLDER"] = "pro_plus_stallholder";
|
|
302
302
|
EnumUserLicence2["PRO_STALLHOLDER"] = "pro_stallholder";
|
|
303
|
-
EnumUserLicence2["
|
|
303
|
+
EnumUserLicence2["STANDARD_EVENT"] = "standard_event";
|
|
304
304
|
EnumUserLicence2["STANDARD_STALLHOLDER"] = "standard_stallholder";
|
|
305
305
|
return EnumUserLicence2;
|
|
306
306
|
})(EnumUserLicence || {});
|
|
@@ -452,7 +452,7 @@ var stallholderBasicInfoFields = [
|
|
|
452
452
|
}
|
|
453
453
|
];
|
|
454
454
|
var stallholderMultiLocation = {
|
|
455
|
-
helperText: "Usefull when you are not only selling products on
|
|
455
|
+
helperText: "Usefull when you are not only selling products on Events but also providing services at other locations.",
|
|
456
456
|
name: "multiLocation",
|
|
457
457
|
placeholder: "Enable multi location"
|
|
458
458
|
};
|
|
@@ -596,10 +596,10 @@ var producedIngTypes = [
|
|
|
596
596
|
var packagingOptions = mapArrayToOptions(packagingTypes);
|
|
597
597
|
var producedIngOptions = mapArrayToOptions(producedIngTypes);
|
|
598
598
|
|
|
599
|
-
// src/formFields/
|
|
600
|
-
var
|
|
599
|
+
// src/formFields/event/event.ts
|
|
600
|
+
var eventBasicInfoFields = [
|
|
601
601
|
{
|
|
602
|
-
helperText: "Name of the
|
|
602
|
+
helperText: "Name of the Event *",
|
|
603
603
|
name: "name",
|
|
604
604
|
placeholder: "Name"
|
|
605
605
|
},
|
|
@@ -609,7 +609,7 @@ var marketBasicInfoFields = [
|
|
|
609
609
|
placeholder: "Provider"
|
|
610
610
|
},
|
|
611
611
|
{
|
|
612
|
-
helperText: "Description of the
|
|
612
|
+
helperText: "Description of the Event *",
|
|
613
613
|
isTextArea: true,
|
|
614
614
|
name: "description",
|
|
615
615
|
placeholder: "Description"
|
|
@@ -620,30 +620,30 @@ var marketBasicInfoFields = [
|
|
|
620
620
|
placeholder: "Promo code"
|
|
621
621
|
}
|
|
622
622
|
];
|
|
623
|
-
var
|
|
623
|
+
var eventStartDateFields = [
|
|
624
624
|
{
|
|
625
625
|
dateMode: "date",
|
|
626
|
-
helperText: "Start Date of the
|
|
626
|
+
helperText: "Start Date of the Event *",
|
|
627
627
|
name: "startDate",
|
|
628
628
|
placeholder: "Start Date"
|
|
629
629
|
},
|
|
630
630
|
{
|
|
631
631
|
dateMode: "time",
|
|
632
|
-
helperText: "Start Time of the
|
|
632
|
+
helperText: "Start Time of the Event *",
|
|
633
633
|
name: "startTime",
|
|
634
634
|
placeholder: "Start Time"
|
|
635
635
|
}
|
|
636
636
|
];
|
|
637
|
-
var
|
|
637
|
+
var eventEndDateFields = [
|
|
638
638
|
{
|
|
639
639
|
dateMode: "date",
|
|
640
|
-
helperText: "End Date of the
|
|
640
|
+
helperText: "End Date of the Event *",
|
|
641
641
|
name: "endDate",
|
|
642
642
|
placeholder: "End Date"
|
|
643
643
|
},
|
|
644
644
|
{
|
|
645
645
|
dateMode: "time",
|
|
646
|
-
helperText: "End Time of the
|
|
646
|
+
helperText: "End Time of the Event *",
|
|
647
647
|
name: "endTime",
|
|
648
648
|
placeholder: "End Time"
|
|
649
649
|
}
|
|
@@ -671,10 +671,10 @@ var tagOptions = availableTagTypes.map((tag) => ({
|
|
|
671
671
|
value: tag.label
|
|
672
672
|
}));
|
|
673
673
|
|
|
674
|
-
// src/formFields/
|
|
675
|
-
var
|
|
674
|
+
// src/formFields/event/eventInfo.ts
|
|
675
|
+
var eventInfo = [
|
|
676
676
|
{
|
|
677
|
-
helperText: "Application Deadline (hours before
|
|
677
|
+
helperText: "Application Deadline (hours before event start) \u2013 Stallholders cannot apply after this time. *",
|
|
678
678
|
keyboardType: "number-pad",
|
|
679
679
|
name: "applicationDeadlineHours",
|
|
680
680
|
placeholder: "Application Deadline (in hours)"
|
|
@@ -686,13 +686,13 @@ var marketInfo = [
|
|
|
686
686
|
placeholder: "Payment Due (in hours)"
|
|
687
687
|
},
|
|
688
688
|
{
|
|
689
|
-
helperText: "Pack-In Time (hours before
|
|
689
|
+
helperText: "Pack-In Time (hours before event start) \u2013 Stallholders can set up before the event begins. *",
|
|
690
690
|
keyboardType: "number-pad",
|
|
691
691
|
name: "packInTime",
|
|
692
692
|
placeholder: "Pack In Time (in hours)"
|
|
693
693
|
}
|
|
694
694
|
];
|
|
695
|
-
var
|
|
695
|
+
var eventInfoPaymentInfo = [
|
|
696
696
|
{
|
|
697
697
|
helperText: "Account holder name *",
|
|
698
698
|
name: "accountHolderName",
|
|
@@ -2027,7 +2027,7 @@ var ADMIN_UPDATE_RESOURCE_TYPE_MUTATION = import_client.gql`
|
|
|
2027
2027
|
}
|
|
2028
2028
|
`;
|
|
2029
2029
|
|
|
2030
|
-
// src/graphql/queries/
|
|
2030
|
+
// src/graphql/queries/event.ts
|
|
2031
2031
|
var import_client3 = require("@apollo/client");
|
|
2032
2032
|
|
|
2033
2033
|
// src/graphql/queries/global.ts
|
|
@@ -2083,13 +2083,13 @@ var USER_FIELDS_FRAGMENT = import_client2.gql`
|
|
|
2083
2083
|
email
|
|
2084
2084
|
isTester
|
|
2085
2085
|
favourites {
|
|
2086
|
-
|
|
2086
|
+
events
|
|
2087
2087
|
stallholders
|
|
2088
2088
|
}
|
|
2089
2089
|
firstName
|
|
2090
2090
|
lastName
|
|
2091
2091
|
licences
|
|
2092
|
-
|
|
2092
|
+
events
|
|
2093
2093
|
platform
|
|
2094
2094
|
preferredRegion
|
|
2095
2095
|
refreshToken
|
|
@@ -2111,17 +2111,17 @@ var STALL_TYPE_FIELDS_FRAGMENT = import_client2.gql`
|
|
|
2111
2111
|
}
|
|
2112
2112
|
`;
|
|
2113
2113
|
|
|
2114
|
-
// src/graphql/queries/
|
|
2115
|
-
var
|
|
2116
|
-
fragment
|
|
2114
|
+
// src/graphql/queries/event.ts
|
|
2115
|
+
var EVENT_DATETIME_FIELDS_FRAGMENT = import_client3.gql`
|
|
2116
|
+
fragment EventDateTimeFields on EventDateTimeType {
|
|
2117
2117
|
endDate
|
|
2118
2118
|
endTime
|
|
2119
2119
|
startDate
|
|
2120
2120
|
startTime
|
|
2121
2121
|
}
|
|
2122
2122
|
`;
|
|
2123
|
-
var
|
|
2124
|
-
fragment
|
|
2123
|
+
var EVENT_LOCATION_FIELDS_FRAGMENT = import_client3.gql`
|
|
2124
|
+
fragment EventLocationFields on EventLocationType {
|
|
2125
2125
|
city
|
|
2126
2126
|
coordinates
|
|
2127
2127
|
country
|
|
@@ -2132,8 +2132,8 @@ var MARKET_LOCATION_FIELDS_FRAGMENT = import_client3.gql`
|
|
|
2132
2132
|
type
|
|
2133
2133
|
}
|
|
2134
2134
|
`;
|
|
2135
|
-
var
|
|
2136
|
-
fragment
|
|
2135
|
+
var EVENT_INFO = import_client3.gql`
|
|
2136
|
+
fragment EventInfoFields on EventInfoType {
|
|
2137
2137
|
_id
|
|
2138
2138
|
applicationDeadlineHours
|
|
2139
2139
|
contactDetails {
|
|
@@ -2150,7 +2150,7 @@ var MARKET_INFO = import_client3.gql`
|
|
|
2150
2150
|
startDate
|
|
2151
2151
|
startTime
|
|
2152
2152
|
}
|
|
2153
|
-
|
|
2153
|
+
eventId
|
|
2154
2154
|
packInTime
|
|
2155
2155
|
paymentDueHours
|
|
2156
2156
|
paymentInfo {
|
|
@@ -2167,8 +2167,8 @@ var MARKET_INFO = import_client3.gql`
|
|
|
2167
2167
|
}
|
|
2168
2168
|
${STALL_TYPE_FIELDS_FRAGMENT}
|
|
2169
2169
|
`;
|
|
2170
|
-
var
|
|
2171
|
-
fragment
|
|
2170
|
+
var EVENT = import_client3.gql`
|
|
2171
|
+
fragment EventFields on EventType {
|
|
2172
2172
|
_id
|
|
2173
2173
|
active
|
|
2174
2174
|
adIds
|
|
@@ -2177,7 +2177,7 @@ var MARKET = import_client3.gql`
|
|
|
2177
2177
|
}
|
|
2178
2178
|
createdAt
|
|
2179
2179
|
dateTime {
|
|
2180
|
-
...
|
|
2180
|
+
...EventDateTimeFields
|
|
2181
2181
|
}
|
|
2182
2182
|
description
|
|
2183
2183
|
deletedAt
|
|
@@ -2185,12 +2185,12 @@ var MARKET = import_client3.gql`
|
|
|
2185
2185
|
...ResourceImageFields
|
|
2186
2186
|
}
|
|
2187
2187
|
location {
|
|
2188
|
-
...
|
|
2188
|
+
...EventLocationFields
|
|
2189
2189
|
}
|
|
2190
2190
|
logo {
|
|
2191
2191
|
...ResourceImageFields
|
|
2192
2192
|
}
|
|
2193
|
-
|
|
2193
|
+
eventInfoId
|
|
2194
2194
|
name
|
|
2195
2195
|
owner {
|
|
2196
2196
|
...OwnerFields
|
|
@@ -2209,60 +2209,60 @@ var MARKET = import_client3.gql`
|
|
|
2209
2209
|
tags
|
|
2210
2210
|
updatedAt
|
|
2211
2211
|
}
|
|
2212
|
-
${
|
|
2213
|
-
${
|
|
2212
|
+
${EVENT_DATETIME_FIELDS_FRAGMENT}
|
|
2213
|
+
${EVENT_LOCATION_FIELDS_FRAGMENT}
|
|
2214
2214
|
${OWNER_FIELDS_FRAGMENT}
|
|
2215
2215
|
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
2216
2216
|
${SOCIAL_MEDIA_FIELDS_FRAGMENT}
|
|
2217
2217
|
${POSTER_USAGE_FIELDS_FRAGMENT}
|
|
2218
2218
|
`;
|
|
2219
|
-
var
|
|
2220
|
-
query
|
|
2221
|
-
|
|
2222
|
-
...
|
|
2219
|
+
var GET_EVENTS = import_client3.gql`
|
|
2220
|
+
query getEvents {
|
|
2221
|
+
events {
|
|
2222
|
+
...EventFields
|
|
2223
2223
|
}
|
|
2224
2224
|
}
|
|
2225
|
-
${
|
|
2225
|
+
${EVENT}
|
|
2226
2226
|
`;
|
|
2227
|
-
var
|
|
2228
|
-
query
|
|
2229
|
-
|
|
2230
|
-
...
|
|
2227
|
+
var GET_EVENT = import_client3.gql`
|
|
2228
|
+
query getEvent($_id: ID!) {
|
|
2229
|
+
event(_id: $_id) {
|
|
2230
|
+
...EventFields
|
|
2231
2231
|
}
|
|
2232
2232
|
}
|
|
2233
|
-
${
|
|
2233
|
+
${EVENT}
|
|
2234
2234
|
`;
|
|
2235
|
-
var
|
|
2236
|
-
query
|
|
2237
|
-
|
|
2238
|
-
...
|
|
2235
|
+
var GET_EVENTS_BY_REGION = import_client3.gql`
|
|
2236
|
+
query getEventsByRegion($region: String!) {
|
|
2237
|
+
eventsByRegion(region: $region) {
|
|
2238
|
+
...EventFields
|
|
2239
2239
|
}
|
|
2240
2240
|
}
|
|
2241
|
-
${
|
|
2241
|
+
${EVENT}
|
|
2242
2242
|
`;
|
|
2243
|
-
var
|
|
2244
|
-
query
|
|
2245
|
-
|
|
2246
|
-
...
|
|
2243
|
+
var SEARCH_EVENTS = import_client3.gql`
|
|
2244
|
+
query searchEvents($search: String!, $region: String) {
|
|
2245
|
+
eventSearch(search: $search, region: $region) {
|
|
2246
|
+
...EventFields
|
|
2247
2247
|
}
|
|
2248
2248
|
}
|
|
2249
|
-
${
|
|
2249
|
+
${EVENT}
|
|
2250
2250
|
`;
|
|
2251
|
-
var
|
|
2252
|
-
query
|
|
2253
|
-
|
|
2254
|
-
...
|
|
2251
|
+
var GET_EVENTS_NEAR_ME = import_client3.gql`
|
|
2252
|
+
query getEventsNearMe($latitude: Float!, $longitude: Float!, $radius: Int) {
|
|
2253
|
+
eventsNearMe(latitude: $latitude, longitude: $longitude, radius: $radius) {
|
|
2254
|
+
...EventFields
|
|
2255
2255
|
}
|
|
2256
2256
|
}
|
|
2257
|
-
${
|
|
2257
|
+
${EVENT}
|
|
2258
2258
|
`;
|
|
2259
|
-
var
|
|
2260
|
-
query
|
|
2261
|
-
|
|
2262
|
-
...
|
|
2259
|
+
var GET_EVENT_INFO = import_client3.gql`
|
|
2260
|
+
query getEventInfo($eventId: ID!) {
|
|
2261
|
+
eventInfo(eventId: $eventId) {
|
|
2262
|
+
...EventInfoFields
|
|
2263
2263
|
}
|
|
2264
2264
|
}
|
|
2265
|
-
${
|
|
2265
|
+
${EVENT_INFO}
|
|
2266
2266
|
`;
|
|
2267
2267
|
|
|
2268
2268
|
// src/graphql/queries/stallholder.ts
|
|
@@ -2429,7 +2429,7 @@ var useAdminUpdateResourceType = () => {
|
|
|
2429
2429
|
const resourceId = adminUpdateResourceType2?.resourceId;
|
|
2430
2430
|
const resourceType = adminUpdateResourceType2?.resourceType;
|
|
2431
2431
|
if (!resourceId) return [];
|
|
2432
|
-
const detectQuery = resourceType === "
|
|
2432
|
+
const detectQuery = resourceType === "event" /* EVENT */ ? GET_EVENT : GET_STALLHOLDER;
|
|
2433
2433
|
return [
|
|
2434
2434
|
{
|
|
2435
2435
|
query: detectQuery,
|
|
@@ -2595,7 +2595,7 @@ var CHAT_FIELDS_FRAGMENT = import_client8.gql`
|
|
|
2595
2595
|
...ChatParticipantFields
|
|
2596
2596
|
}
|
|
2597
2597
|
resourceInfo {
|
|
2598
|
-
|
|
2598
|
+
eventId
|
|
2599
2599
|
stallholderId
|
|
2600
2600
|
}
|
|
2601
2601
|
updatedAt
|
|
@@ -2776,47 +2776,47 @@ var useContactUs = () => {
|
|
|
2776
2776
|
return { contactUs, error, loading };
|
|
2777
2777
|
};
|
|
2778
2778
|
|
|
2779
|
-
// src/graphql/hooks/
|
|
2779
|
+
// src/graphql/hooks/event/hooksMutation.ts
|
|
2780
2780
|
var import_client17 = require("@apollo/client");
|
|
2781
2781
|
|
|
2782
|
-
// src/graphql/mutations/
|
|
2782
|
+
// src/graphql/mutations/event.ts
|
|
2783
2783
|
var import_client15 = require("@apollo/client");
|
|
2784
|
-
var
|
|
2785
|
-
mutation
|
|
2786
|
-
|
|
2787
|
-
...
|
|
2784
|
+
var CREATE_EVENT_MUTATION = import_client15.gql`
|
|
2785
|
+
mutation createEvent($input: EventInputType!) {
|
|
2786
|
+
createEvent(input: $input) {
|
|
2787
|
+
...EventFields
|
|
2788
2788
|
}
|
|
2789
2789
|
}
|
|
2790
|
-
${
|
|
2790
|
+
${EVENT}
|
|
2791
2791
|
`;
|
|
2792
|
-
var
|
|
2793
|
-
mutation
|
|
2794
|
-
|
|
2795
|
-
...
|
|
2792
|
+
var UPDATE_EVENT_MUTATION = import_client15.gql`
|
|
2793
|
+
mutation updateEvent($_id: ID!, $input: EventInputType!) {
|
|
2794
|
+
updateEvent(_id: $_id, input: $input) {
|
|
2795
|
+
...EventFields
|
|
2796
2796
|
}
|
|
2797
2797
|
}
|
|
2798
|
-
${
|
|
2798
|
+
${EVENT}
|
|
2799
2799
|
`;
|
|
2800
|
-
var
|
|
2801
|
-
mutation
|
|
2802
|
-
|
|
2800
|
+
var DELETE_EVENT_MUTATION = import_client15.gql`
|
|
2801
|
+
mutation deleteEvent($_id: ID!) {
|
|
2802
|
+
deleteEvent(_id: $_id)
|
|
2803
2803
|
}
|
|
2804
2804
|
`;
|
|
2805
|
-
var
|
|
2806
|
-
mutation
|
|
2807
|
-
|
|
2808
|
-
...
|
|
2805
|
+
var CREATE_EVENT_INFO_MUTATION = import_client15.gql`
|
|
2806
|
+
mutation createEventInfo($input: EventInfoInputType!) {
|
|
2807
|
+
createEventInfo(input: $input) {
|
|
2808
|
+
...EventInfoFields
|
|
2809
2809
|
}
|
|
2810
2810
|
}
|
|
2811
|
-
${
|
|
2811
|
+
${EVENT_INFO}
|
|
2812
2812
|
`;
|
|
2813
|
-
var
|
|
2814
|
-
mutation
|
|
2815
|
-
|
|
2816
|
-
...
|
|
2813
|
+
var UPDATE_EVENT_INFO_MUTATION = import_client15.gql`
|
|
2814
|
+
mutation updateEventInfo($_id: ID!, $input: EventInfoInputType!) {
|
|
2815
|
+
updateEventInfo(_id: $_id, input: $input) {
|
|
2816
|
+
...EventInfoFields
|
|
2817
2817
|
}
|
|
2818
2818
|
}
|
|
2819
|
-
${
|
|
2819
|
+
${EVENT_INFO}
|
|
2820
2820
|
`;
|
|
2821
2821
|
|
|
2822
2822
|
// src/graphql/queries/user.ts
|
|
@@ -2837,13 +2837,13 @@ var GET_USER = import_client16.gql`
|
|
|
2837
2837
|
}
|
|
2838
2838
|
${USER_FIELDS_FRAGMENT}
|
|
2839
2839
|
`;
|
|
2840
|
-
var
|
|
2841
|
-
query
|
|
2842
|
-
|
|
2843
|
-
...
|
|
2840
|
+
var GET_USER_EVENTS = import_client16.gql`
|
|
2841
|
+
query getUserEvents {
|
|
2842
|
+
userEvents {
|
|
2843
|
+
...EventFields
|
|
2844
2844
|
}
|
|
2845
2845
|
}
|
|
2846
|
-
${
|
|
2846
|
+
${EVENT}
|
|
2847
2847
|
`;
|
|
2848
2848
|
var GET_USER_STALLHOLDER = import_client16.gql`
|
|
2849
2849
|
query getUserStallholder {
|
|
@@ -2856,139 +2856,130 @@ var GET_USER_STALLHOLDER = import_client16.gql`
|
|
|
2856
2856
|
var GET_USER_FAVOURITES = import_client16.gql`
|
|
2857
2857
|
query getUserFavourites {
|
|
2858
2858
|
userFavourites {
|
|
2859
|
-
|
|
2860
|
-
...
|
|
2859
|
+
events {
|
|
2860
|
+
...EventFields
|
|
2861
2861
|
}
|
|
2862
2862
|
stallholders {
|
|
2863
2863
|
...StallholderFields
|
|
2864
2864
|
}
|
|
2865
2865
|
}
|
|
2866
2866
|
}
|
|
2867
|
-
${
|
|
2867
|
+
${EVENT}
|
|
2868
2868
|
${STALLHOLDER}
|
|
2869
2869
|
`;
|
|
2870
2870
|
|
|
2871
|
-
// src/graphql/hooks/
|
|
2872
|
-
var
|
|
2873
|
-
const [
|
|
2874
|
-
|
|
2875
|
-
{
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
}
|
|
2879
|
-
);
|
|
2880
|
-
return { createMarket, error, loading };
|
|
2871
|
+
// src/graphql/hooks/event/hooksMutation.ts
|
|
2872
|
+
var useCreateEvent = () => {
|
|
2873
|
+
const [createEvent, { loading, error }] = (0, import_client17.useMutation)(CREATE_EVENT_MUTATION, {
|
|
2874
|
+
awaitRefetchQueries: true,
|
|
2875
|
+
refetchQueries: [{ fetchPolicy: "no-cache", query: GET_USER_EVENTS }]
|
|
2876
|
+
});
|
|
2877
|
+
return { createEvent, error, loading };
|
|
2881
2878
|
};
|
|
2882
|
-
var
|
|
2883
|
-
const [
|
|
2884
|
-
|
|
2885
|
-
{
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
}
|
|
2889
|
-
);
|
|
2890
|
-
return { error, loading, updateMarket };
|
|
2879
|
+
var useUpdateEvent = () => {
|
|
2880
|
+
const [updateEvent, { loading, error }] = (0, import_client17.useMutation)(UPDATE_EVENT_MUTATION, {
|
|
2881
|
+
awaitRefetchQueries: true,
|
|
2882
|
+
refetchQueries: [{ fetchPolicy: "no-cache", query: GET_USER_EVENTS }]
|
|
2883
|
+
});
|
|
2884
|
+
return { error, loading, updateEvent };
|
|
2891
2885
|
};
|
|
2892
|
-
var
|
|
2893
|
-
const [
|
|
2894
|
-
|
|
2895
|
-
{
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
}
|
|
2899
|
-
);
|
|
2900
|
-
return { deleteMarket, error, loading };
|
|
2886
|
+
var useDeleteEvent = () => {
|
|
2887
|
+
const [deleteEvent, { loading, error }] = (0, import_client17.useMutation)(DELETE_EVENT_MUTATION, {
|
|
2888
|
+
awaitRefetchQueries: true,
|
|
2889
|
+
refetchQueries: [{ fetchPolicy: "no-cache", query: GET_USER_EVENTS }]
|
|
2890
|
+
});
|
|
2891
|
+
return { deleteEvent, error, loading };
|
|
2901
2892
|
};
|
|
2902
|
-
var
|
|
2903
|
-
const [
|
|
2904
|
-
|
|
2893
|
+
var useCreateEventInfo = () => {
|
|
2894
|
+
const [createEventInfo, { loading, error }] = (0, import_client17.useMutation)(
|
|
2895
|
+
CREATE_EVENT_INFO_MUTATION,
|
|
2905
2896
|
{
|
|
2906
2897
|
awaitRefetchQueries: true,
|
|
2907
2898
|
refetchQueries: (mutationResult) => {
|
|
2908
|
-
const
|
|
2909
|
-
if (!
|
|
2899
|
+
const eventId = mutationResult?.data?.createEventInfo?.eventId;
|
|
2900
|
+
if (!eventId) return [];
|
|
2910
2901
|
return [
|
|
2911
2902
|
{
|
|
2912
|
-
query:
|
|
2913
|
-
variables: {
|
|
2914
|
-
// Pass the
|
|
2903
|
+
query: GET_EVENT_INFO,
|
|
2904
|
+
variables: { eventId }
|
|
2905
|
+
// Pass the eventId for refetching
|
|
2915
2906
|
},
|
|
2916
2907
|
{
|
|
2917
2908
|
fetchPolicy: "no-cache",
|
|
2918
|
-
query:
|
|
2919
|
-
variables: { _id:
|
|
2920
|
-
// Pass the
|
|
2909
|
+
query: GET_EVENT,
|
|
2910
|
+
variables: { _id: eventId }
|
|
2911
|
+
// Pass the eventId for refetching
|
|
2921
2912
|
}
|
|
2922
2913
|
];
|
|
2923
2914
|
}
|
|
2924
2915
|
}
|
|
2925
2916
|
);
|
|
2926
|
-
return {
|
|
2917
|
+
return { createEventInfo, error, loading };
|
|
2927
2918
|
};
|
|
2928
|
-
var
|
|
2929
|
-
const [
|
|
2930
|
-
|
|
2919
|
+
var useUpdateEventInfo = () => {
|
|
2920
|
+
const [updateEventInfo, { loading, error }] = (0, import_client17.useMutation)(
|
|
2921
|
+
UPDATE_EVENT_INFO_MUTATION,
|
|
2931
2922
|
{
|
|
2932
2923
|
awaitRefetchQueries: true,
|
|
2933
2924
|
refetchQueries: (mutationResult) => {
|
|
2934
|
-
const
|
|
2935
|
-
if (!
|
|
2925
|
+
const eventId = mutationResult?.data?.updateEventInfo?.eventId;
|
|
2926
|
+
if (!eventId) return [];
|
|
2936
2927
|
return [
|
|
2937
2928
|
{
|
|
2938
|
-
query:
|
|
2939
|
-
variables: {
|
|
2940
|
-
// Pass the
|
|
2929
|
+
query: GET_EVENT_INFO,
|
|
2930
|
+
variables: { eventId }
|
|
2931
|
+
// Pass the eventId for refetching
|
|
2941
2932
|
},
|
|
2942
2933
|
{
|
|
2943
|
-
query:
|
|
2944
|
-
variables: { _id:
|
|
2945
|
-
// Pass the
|
|
2934
|
+
query: GET_EVENT,
|
|
2935
|
+
variables: { _id: eventId }
|
|
2936
|
+
// Pass the eventId for refetching
|
|
2946
2937
|
}
|
|
2947
2938
|
];
|
|
2948
2939
|
}
|
|
2949
2940
|
}
|
|
2950
2941
|
);
|
|
2951
|
-
return { error, loading,
|
|
2942
|
+
return { error, loading, updateEventInfo };
|
|
2952
2943
|
};
|
|
2953
2944
|
|
|
2954
|
-
// src/graphql/hooks/
|
|
2945
|
+
// src/graphql/hooks/event/hooksQuery.ts
|
|
2955
2946
|
var import_client18 = require("@apollo/client");
|
|
2956
|
-
var
|
|
2957
|
-
const { loading, error, data, refetch } = (0, import_client18.useQuery)(
|
|
2947
|
+
var useGetEvents = () => {
|
|
2948
|
+
const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_EVENTS, {
|
|
2958
2949
|
fetchPolicy: "network-only"
|
|
2959
2950
|
});
|
|
2960
|
-
const
|
|
2961
|
-
return { error,
|
|
2951
|
+
const events = data?.events;
|
|
2952
|
+
return { error, events, loading, refetch };
|
|
2962
2953
|
};
|
|
2963
|
-
var
|
|
2964
|
-
const { loading, error, data, refetch } = (0, import_client18.useQuery)(
|
|
2954
|
+
var useGetEvent = (_id) => {
|
|
2955
|
+
const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_EVENT, {
|
|
2965
2956
|
fetchPolicy: "network-only",
|
|
2966
2957
|
skip: !_id,
|
|
2967
2958
|
variables: { _id }
|
|
2968
2959
|
});
|
|
2969
|
-
const
|
|
2970
|
-
return { error,
|
|
2960
|
+
const event = data?.event;
|
|
2961
|
+
return { error, event, loading, refetch };
|
|
2971
2962
|
};
|
|
2972
|
-
var
|
|
2973
|
-
const { loading, error, data, refetch } = (0, import_client18.useQuery)(
|
|
2963
|
+
var useGetEventsByRegion = (region) => {
|
|
2964
|
+
const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_EVENTS_BY_REGION, {
|
|
2974
2965
|
fetchPolicy: "no-cache",
|
|
2975
2966
|
skip: !region,
|
|
2976
2967
|
variables: { region }
|
|
2977
2968
|
});
|
|
2978
|
-
const
|
|
2979
|
-
return { error,
|
|
2969
|
+
const eventsByRegion = data?.eventsByRegion;
|
|
2970
|
+
return { error, eventsByRegion, loading, refetch };
|
|
2980
2971
|
};
|
|
2981
|
-
var
|
|
2982
|
-
const { loading, error, data, refetch } = (0, import_client18.useQuery)(
|
|
2972
|
+
var useSearchEvents = (search, region) => {
|
|
2973
|
+
const { loading, error, data, refetch } = (0, import_client18.useQuery)(SEARCH_EVENTS, {
|
|
2983
2974
|
fetchPolicy: "network-only",
|
|
2984
2975
|
skip: search.length < 3,
|
|
2985
2976
|
variables: { region, search }
|
|
2986
2977
|
});
|
|
2987
|
-
const
|
|
2988
|
-
return { error,
|
|
2978
|
+
const eventsSearch = data?.eventsSearch;
|
|
2979
|
+
return { error, eventsSearch, loading, refetch };
|
|
2989
2980
|
};
|
|
2990
|
-
var
|
|
2991
|
-
const { loading, error, data, refetch } = (0, import_client18.useQuery)(
|
|
2981
|
+
var useGetEventsNearMe = (location) => {
|
|
2982
|
+
const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_EVENTS_NEAR_ME, {
|
|
2992
2983
|
fetchPolicy: "network-only",
|
|
2993
2984
|
skip: !location.latitude || !location.longitude,
|
|
2994
2985
|
variables: {
|
|
@@ -2998,17 +2989,17 @@ var useGetMarketsNearMe = (location) => {
|
|
|
2998
2989
|
// Default to 10km if no radius is provided
|
|
2999
2990
|
}
|
|
3000
2991
|
});
|
|
3001
|
-
const
|
|
3002
|
-
return { error,
|
|
2992
|
+
const eventsNearMe = data?.eventsNearMe;
|
|
2993
|
+
return { error, eventsNearMe, loading, refetch };
|
|
3003
2994
|
};
|
|
3004
|
-
var
|
|
3005
|
-
const { loading, error, data, refetch } = (0, import_client18.useQuery)(
|
|
2995
|
+
var useGetEventInfo = (eventId) => {
|
|
2996
|
+
const { loading, error, data, refetch } = (0, import_client18.useQuery)(GET_EVENT_INFO, {
|
|
3006
2997
|
fetchPolicy: "network-only",
|
|
3007
|
-
skip: !
|
|
3008
|
-
variables: {
|
|
2998
|
+
skip: !eventId,
|
|
2999
|
+
variables: { eventId }
|
|
3009
3000
|
});
|
|
3010
|
-
const
|
|
3011
|
-
return { error,
|
|
3001
|
+
const eventInfo2 = data?.eventInfo;
|
|
3002
|
+
return { error, eventInfo: eventInfo2, loading, refetch };
|
|
3012
3003
|
};
|
|
3013
3004
|
|
|
3014
3005
|
// src/graphql/hooks/notifications/hooksMutation.ts
|
|
@@ -3258,7 +3249,7 @@ var useCreatePoster = () => {
|
|
|
3258
3249
|
{
|
|
3259
3250
|
fetchPolicy: "no-cache",
|
|
3260
3251
|
refetchQueries: [
|
|
3261
|
-
{ query:
|
|
3252
|
+
{ query: GET_USER_EVENTS },
|
|
3262
3253
|
{ query: GET_USER_STALLHOLDER }
|
|
3263
3254
|
]
|
|
3264
3255
|
}
|
|
@@ -3316,7 +3307,7 @@ var RELATION_FIELDS_FRAGMENT = import_client29.gql`
|
|
|
3316
3307
|
chatId
|
|
3317
3308
|
createdAt
|
|
3318
3309
|
lastUpdateBy
|
|
3319
|
-
|
|
3310
|
+
eventId
|
|
3320
3311
|
relationDates {
|
|
3321
3312
|
...RelationDates
|
|
3322
3313
|
}
|
|
@@ -3334,10 +3325,10 @@ var GET_RELATION = import_client29.gql`
|
|
|
3334
3325
|
}
|
|
3335
3326
|
${RELATION_FIELDS_FRAGMENT}
|
|
3336
3327
|
`;
|
|
3337
|
-
var
|
|
3338
|
-
query
|
|
3339
|
-
|
|
3340
|
-
|
|
3328
|
+
var GET_RELATION_BY_EVENT_AND_STALLHOLDER = import_client29.gql`
|
|
3329
|
+
query getRelationByEventAndStallholder($eventId: ID!, $stallholderId: ID!) {
|
|
3330
|
+
relationByEventAndStallholder(
|
|
3331
|
+
eventId: $eventId
|
|
3341
3332
|
stallholderId: $stallholderId
|
|
3342
3333
|
) {
|
|
3343
3334
|
...RelationFields
|
|
@@ -3345,9 +3336,9 @@ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client29.gql`
|
|
|
3345
3336
|
}
|
|
3346
3337
|
${RELATION_FIELDS_FRAGMENT}
|
|
3347
3338
|
`;
|
|
3348
|
-
var
|
|
3349
|
-
query
|
|
3350
|
-
|
|
3339
|
+
var GET_EVENT_RELATIONS = import_client29.gql`
|
|
3340
|
+
query getEventRelations($eventId: ID!) {
|
|
3341
|
+
eventRelations(eventId: $eventId) {
|
|
3351
3342
|
...RelationFields
|
|
3352
3343
|
}
|
|
3353
3344
|
}
|
|
@@ -3367,7 +3358,7 @@ var GET_RESOURCE_CONNECTIONS = import_client29.gql`
|
|
|
3367
3358
|
$resourceType: ResourceTypeEnum!
|
|
3368
3359
|
) {
|
|
3369
3360
|
resourceConnections(resourceId: $resourceId, resourceType: $resourceType) {
|
|
3370
|
-
|
|
3361
|
+
events {
|
|
3371
3362
|
_id
|
|
3372
3363
|
active
|
|
3373
3364
|
adIds
|
|
@@ -3376,7 +3367,7 @@ var GET_RESOURCE_CONNECTIONS = import_client29.gql`
|
|
|
3376
3367
|
}
|
|
3377
3368
|
createdAt
|
|
3378
3369
|
dateTime {
|
|
3379
|
-
...
|
|
3370
|
+
...EventDateTimeFields
|
|
3380
3371
|
}
|
|
3381
3372
|
description
|
|
3382
3373
|
deletedAt
|
|
@@ -3384,12 +3375,12 @@ var GET_RESOURCE_CONNECTIONS = import_client29.gql`
|
|
|
3384
3375
|
...ResourceImageFields
|
|
3385
3376
|
}
|
|
3386
3377
|
location {
|
|
3387
|
-
...
|
|
3378
|
+
...EventLocationFields
|
|
3388
3379
|
}
|
|
3389
3380
|
logo {
|
|
3390
3381
|
...ResourceImageFields
|
|
3391
3382
|
}
|
|
3392
|
-
|
|
3383
|
+
eventInfoId
|
|
3393
3384
|
name
|
|
3394
3385
|
owner {
|
|
3395
3386
|
...OwnerFields
|
|
@@ -3463,8 +3454,8 @@ var GET_RESOURCE_CONNECTIONS = import_client29.gql`
|
|
|
3463
3454
|
}
|
|
3464
3455
|
}
|
|
3465
3456
|
}
|
|
3466
|
-
${
|
|
3467
|
-
${
|
|
3457
|
+
${EVENT_DATETIME_FIELDS_FRAGMENT}
|
|
3458
|
+
${EVENT_LOCATION_FIELDS_FRAGMENT}
|
|
3468
3459
|
${OWNER_FIELDS_FRAGMENT}
|
|
3469
3460
|
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
3470
3461
|
${CATEGORY_FIELDS_FRAGMENT}
|
|
@@ -3510,20 +3501,25 @@ var useCreateRelation = () => {
|
|
|
3510
3501
|
awaitRefetchQueries: true,
|
|
3511
3502
|
refetchQueries: (mutationResult) => {
|
|
3512
3503
|
const createRelation2 = mutationResult?.data?.createRelation;
|
|
3513
|
-
const
|
|
3504
|
+
const eventId = createRelation2?.eventId;
|
|
3514
3505
|
const stallholderId = createRelation2?.stallholderId;
|
|
3515
3506
|
const resourceType = createRelation2?.lastUpdateBy;
|
|
3516
|
-
const resourceId = resourceType === "
|
|
3507
|
+
const resourceId = resourceType === "event" /* EVENT */ ? eventId : stallholderId;
|
|
3517
3508
|
return [
|
|
3518
3509
|
{
|
|
3519
3510
|
fetchPolicy,
|
|
3520
|
-
query:
|
|
3521
|
-
variables: {
|
|
3511
|
+
query: GET_EVENT_RELATIONS,
|
|
3512
|
+
variables: { eventId }
|
|
3522
3513
|
},
|
|
3523
3514
|
{
|
|
3524
3515
|
fetchPolicy,
|
|
3525
|
-
query:
|
|
3526
|
-
variables: { _id:
|
|
3516
|
+
query: GET_EVENT,
|
|
3517
|
+
variables: { _id: eventId }
|
|
3518
|
+
},
|
|
3519
|
+
{
|
|
3520
|
+
fetchPolicy,
|
|
3521
|
+
query: GET_EVENT_INFO,
|
|
3522
|
+
variables: { eventId }
|
|
3527
3523
|
},
|
|
3528
3524
|
{
|
|
3529
3525
|
fetchPolicy,
|
|
@@ -3537,8 +3533,8 @@ var useCreateRelation = () => {
|
|
|
3537
3533
|
},
|
|
3538
3534
|
{
|
|
3539
3535
|
fetchPolicy,
|
|
3540
|
-
query:
|
|
3541
|
-
variables: {
|
|
3536
|
+
query: GET_RELATION_BY_EVENT_AND_STALLHOLDER,
|
|
3537
|
+
variables: { eventId, stallholderId }
|
|
3542
3538
|
},
|
|
3543
3539
|
{
|
|
3544
3540
|
fetchPolicy,
|
|
@@ -3562,20 +3558,25 @@ var useUpdateRelation = () => {
|
|
|
3562
3558
|
awaitRefetchQueries: true,
|
|
3563
3559
|
refetchQueries: (mutationResult) => {
|
|
3564
3560
|
const updateRelation2 = mutationResult?.data?.updateRelation;
|
|
3565
|
-
const
|
|
3561
|
+
const eventId = updateRelation2?.eventId;
|
|
3566
3562
|
const stallholderId = updateRelation2?.stallholderId;
|
|
3567
3563
|
const resourceType = updateRelation2?.lastUpdateBy;
|
|
3568
|
-
const resourceId = resourceType === "
|
|
3564
|
+
const resourceId = resourceType === "event" /* EVENT */ ? eventId : stallholderId;
|
|
3569
3565
|
return [
|
|
3570
3566
|
{
|
|
3571
3567
|
fetchPolicy,
|
|
3572
|
-
query:
|
|
3573
|
-
variables: {
|
|
3568
|
+
query: GET_EVENT_RELATIONS,
|
|
3569
|
+
variables: { eventId }
|
|
3570
|
+
},
|
|
3571
|
+
{
|
|
3572
|
+
fetchPolicy,
|
|
3573
|
+
query: GET_EVENT,
|
|
3574
|
+
variables: { _id: eventId }
|
|
3574
3575
|
},
|
|
3575
3576
|
{
|
|
3576
3577
|
fetchPolicy,
|
|
3577
|
-
query:
|
|
3578
|
-
variables: {
|
|
3578
|
+
query: GET_EVENT_INFO,
|
|
3579
|
+
variables: { eventId }
|
|
3579
3580
|
},
|
|
3580
3581
|
{
|
|
3581
3582
|
fetchPolicy,
|
|
@@ -3589,8 +3590,8 @@ var useUpdateRelation = () => {
|
|
|
3589
3590
|
},
|
|
3590
3591
|
{
|
|
3591
3592
|
fetchPolicy,
|
|
3592
|
-
query:
|
|
3593
|
-
variables: {
|
|
3593
|
+
query: GET_RELATION_BY_EVENT_AND_STALLHOLDER,
|
|
3594
|
+
variables: { eventId, stallholderId }
|
|
3594
3595
|
},
|
|
3595
3596
|
{
|
|
3596
3597
|
fetchPolicy,
|
|
@@ -3610,20 +3611,20 @@ var useDeleteRelation = () => {
|
|
|
3610
3611
|
awaitRefetchQueries: true,
|
|
3611
3612
|
refetchQueries: (mutationResult) => {
|
|
3612
3613
|
const deleteRelation2 = mutationResult?.data?.deleteRelation;
|
|
3613
|
-
const
|
|
3614
|
+
const eventId = deleteRelation2?.eventId;
|
|
3614
3615
|
const stallholderId = deleteRelation2?.stallholderId;
|
|
3615
3616
|
const resourceType = deleteRelation2?.lastUpdateBy;
|
|
3616
|
-
const resourceId = resourceType === "
|
|
3617
|
+
const resourceId = resourceType === "event" /* EVENT */ ? eventId : stallholderId;
|
|
3617
3618
|
return [
|
|
3618
3619
|
{
|
|
3619
3620
|
fetchPolicy,
|
|
3620
|
-
query:
|
|
3621
|
-
variables: {
|
|
3621
|
+
query: GET_EVENT_INFO,
|
|
3622
|
+
variables: { eventId }
|
|
3622
3623
|
},
|
|
3623
3624
|
{
|
|
3624
3625
|
fetchPolicy,
|
|
3625
|
-
query:
|
|
3626
|
-
variables: {
|
|
3626
|
+
query: GET_EVENT_RELATIONS,
|
|
3627
|
+
variables: { eventId }
|
|
3627
3628
|
},
|
|
3628
3629
|
{
|
|
3629
3630
|
fetchPolicy,
|
|
@@ -3632,8 +3633,8 @@ var useDeleteRelation = () => {
|
|
|
3632
3633
|
},
|
|
3633
3634
|
{
|
|
3634
3635
|
fetchPolicy,
|
|
3635
|
-
query:
|
|
3636
|
-
variables: {
|
|
3636
|
+
query: GET_RELATION_BY_EVENT_AND_STALLHOLDER,
|
|
3637
|
+
variables: { eventId, stallholderId }
|
|
3637
3638
|
},
|
|
3638
3639
|
{
|
|
3639
3640
|
fetchPolicy,
|
|
@@ -3662,26 +3663,26 @@ var useGetRelation = (_id) => {
|
|
|
3662
3663
|
const relation = data?.relation;
|
|
3663
3664
|
return { error, loading, refetch, relation };
|
|
3664
3665
|
};
|
|
3665
|
-
var
|
|
3666
|
+
var useGetRelationByEventAndStallholder = (eventId, stallholderId) => {
|
|
3666
3667
|
const { loading, error, data, refetch } = (0, import_client32.useQuery)(
|
|
3667
|
-
|
|
3668
|
+
GET_RELATION_BY_EVENT_AND_STALLHOLDER,
|
|
3668
3669
|
{
|
|
3669
3670
|
fetchPolicy: "network-only",
|
|
3670
|
-
skip: !
|
|
3671
|
-
variables: {
|
|
3671
|
+
skip: !eventId || !stallholderId,
|
|
3672
|
+
variables: { eventId, stallholderId }
|
|
3672
3673
|
}
|
|
3673
3674
|
);
|
|
3674
|
-
const
|
|
3675
|
-
return { error, loading, refetch,
|
|
3675
|
+
const relationByEventAndStallholder = data?.relationByEventAndStallholder;
|
|
3676
|
+
return { error, loading, refetch, relationByEventAndStallholder };
|
|
3676
3677
|
};
|
|
3677
|
-
var
|
|
3678
|
-
const { loading, error, data, refetch } = (0, import_client32.useQuery)(
|
|
3678
|
+
var useGetEventRelations = (eventId) => {
|
|
3679
|
+
const { loading, error, data, refetch } = (0, import_client32.useQuery)(GET_EVENT_RELATIONS, {
|
|
3679
3680
|
fetchPolicy: "network-only",
|
|
3680
|
-
skip: !
|
|
3681
|
-
variables: {
|
|
3681
|
+
skip: !eventId,
|
|
3682
|
+
variables: { eventId }
|
|
3682
3683
|
});
|
|
3683
|
-
const
|
|
3684
|
-
return { error,
|
|
3684
|
+
const eventRelations = data?.eventRelations;
|
|
3685
|
+
return { error, eventRelations, loading, refetch };
|
|
3685
3686
|
};
|
|
3686
3687
|
var useGetStallholderRelations = (stallholderId) => {
|
|
3687
3688
|
const { loading, error, data, refetch } = (0, import_client32.useQuery)(
|
|
@@ -4131,7 +4132,7 @@ var useSelectPackage = () => {
|
|
|
4131
4132
|
if (!userId) return [];
|
|
4132
4133
|
return [
|
|
4133
4134
|
{ query: GET_USER, variables: { _id: userId } },
|
|
4134
|
-
{ query:
|
|
4135
|
+
{ query: GET_USER_EVENTS },
|
|
4135
4136
|
{ query: GET_USER_STALLHOLDER }
|
|
4136
4137
|
];
|
|
4137
4138
|
}
|
|
@@ -4156,12 +4157,12 @@ var useGetUser = (_id) => {
|
|
|
4156
4157
|
const user = data?.user;
|
|
4157
4158
|
return { error, loading, refetch, user };
|
|
4158
4159
|
};
|
|
4159
|
-
var
|
|
4160
|
-
const { loading, error, data, refetch } = (0, import_client42.useQuery)(
|
|
4160
|
+
var useGetUserEvents = () => {
|
|
4161
|
+
const { loading, error, data, refetch } = (0, import_client42.useQuery)(GET_USER_EVENTS, {
|
|
4161
4162
|
fetchPolicy: "network-only"
|
|
4162
4163
|
});
|
|
4163
|
-
const
|
|
4164
|
-
return { error, loading, refetch,
|
|
4164
|
+
const userEvents = data?.userEvents;
|
|
4165
|
+
return { error, loading, refetch, userEvents };
|
|
4165
4166
|
};
|
|
4166
4167
|
var useGetUserStallholder = () => {
|
|
4167
4168
|
const { loading, error, data, refetch } = (0, import_client42.useQuery)(GET_USER_STALLHOLDER, {
|
|
@@ -4174,10 +4175,10 @@ var useGetUserFavourites = () => {
|
|
|
4174
4175
|
const { loading, error, data, refetch } = (0, import_client42.useQuery)(GET_USER_FAVOURITES, {
|
|
4175
4176
|
fetchPolicy: "network-only"
|
|
4176
4177
|
});
|
|
4177
|
-
const
|
|
4178
|
+
const events = data?.userFavourites.events;
|
|
4178
4179
|
const stallholders = data?.userFavourites.stallholders;
|
|
4179
4180
|
const userFavourites = {
|
|
4180
|
-
|
|
4181
|
+
events,
|
|
4181
4182
|
stallholders
|
|
4182
4183
|
};
|
|
4183
4184
|
return { error, loading, refetch, userFavourites };
|
|
@@ -4670,11 +4671,11 @@ var contactDetailsSchema = yup.object({
|
|
|
4670
4671
|
)
|
|
4671
4672
|
}).nullable().optional().label("Contact Details");
|
|
4672
4673
|
|
|
4673
|
-
// src/yupSchema/
|
|
4674
|
+
// src/yupSchema/event.ts
|
|
4674
4675
|
var yup2 = __toESM(require("yup"));
|
|
4675
4676
|
var nzBankAccountRegex = /^\d{2}-\d{4}-\d{7}-\d{2}$/;
|
|
4676
|
-
var
|
|
4677
|
-
dateTime: yup2.array().of(dateTimeSchema).min(1, "At least one
|
|
4677
|
+
var eventSchema = globalResourceSchema.shape({
|
|
4678
|
+
dateTime: yup2.array().of(dateTimeSchema).min(1, "At least one Event date required").max(50, "You can only add up to 50 Event dates").required("DateTime is required").test(
|
|
4678
4679
|
"unique-start-date-time",
|
|
4679
4680
|
"Start Date and Time must be unique",
|
|
4680
4681
|
function(value) {
|
|
@@ -4692,7 +4693,7 @@ var marketSchema = globalResourceSchema.shape({
|
|
|
4692
4693
|
}
|
|
4693
4694
|
),
|
|
4694
4695
|
location: locationSchema,
|
|
4695
|
-
rainOrShine: yup2.boolean().label("Rain or Shine").required("Please specify if the
|
|
4696
|
+
rainOrShine: yup2.boolean().label("Rain or Shine").required("Please specify if the event is rain or shine"),
|
|
4696
4697
|
tags: yup2.array().of(yup2.string().defined()).min(1, "Tags are required").required("Tags are required")
|
|
4697
4698
|
});
|
|
4698
4699
|
var paymentInfoSchema = yup2.object({
|
|
@@ -4716,11 +4717,11 @@ var paymentInfoSchema = yup2.object({
|
|
|
4716
4717
|
otherwise: (schema) => schema.notRequired()
|
|
4717
4718
|
})
|
|
4718
4719
|
});
|
|
4719
|
-
var
|
|
4720
|
+
var eventInfoSchema = yup2.object().shape({
|
|
4720
4721
|
contactDetails: contactDetailsSchema,
|
|
4721
4722
|
applicationDeadlineHours: yup2.number().label("Application Deadline Hours").nullable().transform((value, originalValue) => originalValue === "" ? null : value).typeError("Application deadline hours must be a number").min(1, "Application deadline hours must be at least 1").required("Application deadline hours is required").test("no-leading-zeros", "", noLeadingZeros("Application deadline hours")),
|
|
4722
4723
|
dateTime: yup2.array().of(dateTimeWithPriceSchema).required("DateTime is required"),
|
|
4723
|
-
|
|
4724
|
+
eventId: yup2.string().trim().required("Event ID is required"),
|
|
4724
4725
|
packInTime: yup2.number().label("Pack In Time").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")),
|
|
4725
4726
|
paymentDueHours: yup2.number().label("Payment Due Hours").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")),
|
|
4726
4727
|
paymentInfo: yup2.array().of(paymentInfoSchema).min(1, "At least one payment info is required").required("Payment info is required")
|
|
@@ -4830,7 +4831,7 @@ var testersSchema = yup6.object().shape({
|
|
|
4830
4831
|
osType: yup6.mixed().oneOf(Object.values(EnumOSPlatform), "Please select Android or iOS device").required("OS Type is required"),
|
|
4831
4832
|
resourceType: yup6.mixed().oneOf(
|
|
4832
4833
|
Object.values(EnumResourceType),
|
|
4833
|
-
"Please select
|
|
4834
|
+
"Please select Event or Stallholder"
|
|
4834
4835
|
).required("Resource Type is required")
|
|
4835
4836
|
});
|
|
4836
4837
|
|
|
@@ -4840,7 +4841,7 @@ var yup7 = __toESM(require("yup"));
|
|
|
4840
4841
|
// src/types/ad.ts
|
|
4841
4842
|
var EnumAdShowOn = /* @__PURE__ */ ((EnumAdShowOn2) => {
|
|
4842
4843
|
EnumAdShowOn2["FRONT_PAGE"] = "Front_page";
|
|
4843
|
-
EnumAdShowOn2["
|
|
4844
|
+
EnumAdShowOn2["EVENTS_PAGE"] = "Events_page";
|
|
4844
4845
|
EnumAdShowOn2["STALLHOLDERS_PAGE"] = "Stallholders_page";
|
|
4845
4846
|
return EnumAdShowOn2;
|
|
4846
4847
|
})(EnumAdShowOn || {});
|
|
@@ -4892,7 +4893,7 @@ var adSchema = yup7.object().shape({
|
|
|
4892
4893
|
resourceRegion: yup7.string().required("Resource region is required"),
|
|
4893
4894
|
resourceType: yup7.mixed().oneOf(
|
|
4894
4895
|
Object.values(EnumResourceType),
|
|
4895
|
-
"Please select
|
|
4896
|
+
"Please select Event or Stallholder"
|
|
4896
4897
|
).required("Resource Type is required"),
|
|
4897
4898
|
showOn: yup7.mixed().oneOf(
|
|
4898
4899
|
Object.values(EnumAdShowOn),
|
|
@@ -4932,7 +4933,7 @@ var globalDefaultValues = {
|
|
|
4932
4933
|
region: "",
|
|
4933
4934
|
socialMedia: []
|
|
4934
4935
|
};
|
|
4935
|
-
var
|
|
4936
|
+
var defaultEventFormValues = {
|
|
4936
4937
|
...globalDefaultValues,
|
|
4937
4938
|
dateTime: [
|
|
4938
4939
|
{
|
|
@@ -4958,7 +4959,7 @@ var defaultMarketFormValues = {
|
|
|
4958
4959
|
rainOrShine: false,
|
|
4959
4960
|
tags: []
|
|
4960
4961
|
};
|
|
4961
|
-
var
|
|
4962
|
+
var defaultEventInfoFormValues = {
|
|
4962
4963
|
applicationDeadlineHours: 48,
|
|
4963
4964
|
contactDetails: {
|
|
4964
4965
|
email: null,
|
|
@@ -4974,9 +4975,9 @@ var defaultMarketInfoFormValues = {
|
|
|
4974
4975
|
startTime: ""
|
|
4975
4976
|
}
|
|
4976
4977
|
],
|
|
4977
|
-
|
|
4978
|
+
eventId: "",
|
|
4978
4979
|
packInTime: 2,
|
|
4979
|
-
// e.g., 2 hours before
|
|
4980
|
+
// e.g., 2 hours before event opens
|
|
4980
4981
|
paymentDueHours: 24,
|
|
4981
4982
|
paymentInfo: [],
|
|
4982
4983
|
requirements: []
|
|
@@ -5177,11 +5178,11 @@ function useStallholderInfoForm(data) {
|
|
|
5177
5178
|
};
|
|
5178
5179
|
}
|
|
5179
5180
|
|
|
5180
|
-
// src/hooks/
|
|
5181
|
+
// src/hooks/event/useEventForm.ts
|
|
5181
5182
|
var import_yup3 = require("@hookform/resolvers/yup");
|
|
5182
5183
|
var React3 = __toESM(require("react"));
|
|
5183
5184
|
var import_react_hook_form3 = require("react-hook-form");
|
|
5184
|
-
function
|
|
5185
|
+
function useEventForm(data) {
|
|
5185
5186
|
const {
|
|
5186
5187
|
control,
|
|
5187
5188
|
formState: { errors },
|
|
@@ -5191,8 +5192,8 @@ function useMarketForm(data) {
|
|
|
5191
5192
|
setValue,
|
|
5192
5193
|
watch
|
|
5193
5194
|
} = (0, import_react_hook_form3.useForm)({
|
|
5194
|
-
defaultValues:
|
|
5195
|
-
resolver: (0, import_yup3.yupResolver)(
|
|
5195
|
+
defaultValues: defaultEventFormValues,
|
|
5196
|
+
resolver: (0, import_yup3.yupResolver)(eventSchema)
|
|
5196
5197
|
});
|
|
5197
5198
|
React3.useEffect(() => {
|
|
5198
5199
|
if (data) {
|
|
@@ -5205,7 +5206,7 @@ function useMarketForm(data) {
|
|
|
5205
5206
|
tags: data.tags
|
|
5206
5207
|
});
|
|
5207
5208
|
} else {
|
|
5208
|
-
reset(
|
|
5209
|
+
reset(defaultEventFormValues);
|
|
5209
5210
|
}
|
|
5210
5211
|
}, [data]);
|
|
5211
5212
|
const {
|
|
@@ -5258,11 +5259,11 @@ function useMarketForm(data) {
|
|
|
5258
5259
|
};
|
|
5259
5260
|
}
|
|
5260
5261
|
|
|
5261
|
-
// src/hooks/
|
|
5262
|
+
// src/hooks/event/useEventInfoForm.ts
|
|
5262
5263
|
var import_yup4 = require("@hookform/resolvers/yup");
|
|
5263
5264
|
var React4 = __toESM(require("react"));
|
|
5264
5265
|
var import_react_hook_form4 = require("react-hook-form");
|
|
5265
|
-
function
|
|
5266
|
+
function useEventInfoForm(data) {
|
|
5266
5267
|
const {
|
|
5267
5268
|
control,
|
|
5268
5269
|
formState: { errors },
|
|
@@ -5272,8 +5273,8 @@ function useMarketInfoForm(data) {
|
|
|
5272
5273
|
setValue,
|
|
5273
5274
|
watch
|
|
5274
5275
|
} = (0, import_react_hook_form4.useForm)({
|
|
5275
|
-
defaultValues:
|
|
5276
|
-
resolver: (0, import_yup4.yupResolver)(
|
|
5276
|
+
defaultValues: defaultEventInfoFormValues,
|
|
5277
|
+
resolver: (0, import_yup4.yupResolver)(eventInfoSchema)
|
|
5277
5278
|
});
|
|
5278
5279
|
React4.useEffect(() => {
|
|
5279
5280
|
if (data) {
|
|
@@ -5282,14 +5283,14 @@ function useMarketInfoForm(data) {
|
|
|
5282
5283
|
applicationDeadlineHours: data.applicationDeadlineHours,
|
|
5283
5284
|
contactDetails: data.contactDetails,
|
|
5284
5285
|
dateTime: data.dateTime,
|
|
5285
|
-
|
|
5286
|
+
eventId: data.eventId,
|
|
5286
5287
|
packInTime: data.packInTime,
|
|
5287
5288
|
paymentDueHours: data.paymentDueHours,
|
|
5288
5289
|
paymentInfo: data.paymentInfo,
|
|
5289
5290
|
requirements: data.requirements
|
|
5290
5291
|
});
|
|
5291
5292
|
} else {
|
|
5292
|
-
reset(
|
|
5293
|
+
reset(defaultEventInfoFormValues);
|
|
5293
5294
|
}
|
|
5294
5295
|
}, [data]);
|
|
5295
5296
|
const {
|
|
@@ -5297,7 +5298,7 @@ function useMarketInfoForm(data) {
|
|
|
5297
5298
|
applicationDeadlineHours,
|
|
5298
5299
|
contactDetails,
|
|
5299
5300
|
dateTime,
|
|
5300
|
-
|
|
5301
|
+
eventId,
|
|
5301
5302
|
packInTime,
|
|
5302
5303
|
paymentDueHours,
|
|
5303
5304
|
paymentInfo,
|
|
@@ -5310,7 +5311,7 @@ function useMarketInfoForm(data) {
|
|
|
5310
5311
|
applicationDeadlineHours,
|
|
5311
5312
|
contactDetails,
|
|
5312
5313
|
dateTime,
|
|
5313
|
-
|
|
5314
|
+
eventId,
|
|
5314
5315
|
packInTime,
|
|
5315
5316
|
paymentDueHours,
|
|
5316
5317
|
paymentInfo,
|
|
@@ -5740,7 +5741,7 @@ var defaultValues9 = {
|
|
|
5740
5741
|
resourceName: "",
|
|
5741
5742
|
resourceRegion: "",
|
|
5742
5743
|
resourceType: "",
|
|
5743
|
-
// default to
|
|
5744
|
+
// default to event
|
|
5744
5745
|
showOn: "Front_page" /* FRONT_PAGE */,
|
|
5745
5746
|
// default to front page
|
|
5746
5747
|
socialMedia: [],
|
|
@@ -5913,11 +5914,16 @@ var fonts = {
|
|
|
5913
5914
|
contactUsFields,
|
|
5914
5915
|
darkColors,
|
|
5915
5916
|
dateFormat,
|
|
5916
|
-
|
|
5917
|
-
|
|
5917
|
+
defaultEventFormValues,
|
|
5918
|
+
defaultEventInfoFormValues,
|
|
5918
5919
|
defaultRegion,
|
|
5919
5920
|
defaultStallholderFormValues,
|
|
5920
5921
|
defaultStallholderInfoFormValues,
|
|
5922
|
+
eventBasicInfoFields,
|
|
5923
|
+
eventEndDateFields,
|
|
5924
|
+
eventInfo,
|
|
5925
|
+
eventInfoPaymentInfo,
|
|
5926
|
+
eventStartDateFields,
|
|
5921
5927
|
fonts,
|
|
5922
5928
|
formatDate,
|
|
5923
5929
|
formatTimestamp,
|
|
@@ -5928,11 +5934,6 @@ var fonts = {
|
|
|
5928
5934
|
loginFields,
|
|
5929
5935
|
mapArrayToOptions,
|
|
5930
5936
|
mapBaseResourceTypeToFormData,
|
|
5931
|
-
marketBasicInfoFields,
|
|
5932
|
-
marketEndDateFields,
|
|
5933
|
-
marketInfo,
|
|
5934
|
-
marketInfoPaymentInfo,
|
|
5935
|
-
marketStartDateFields,
|
|
5936
5937
|
normalizeUrl,
|
|
5937
5938
|
packagingOptions,
|
|
5938
5939
|
paymentMethodOptions,
|
|
@@ -5972,8 +5973,8 @@ var fonts = {
|
|
|
5972
5973
|
useContactUsForm,
|
|
5973
5974
|
useCreateAd,
|
|
5974
5975
|
useCreateBulkNotifications,
|
|
5975
|
-
|
|
5976
|
-
|
|
5976
|
+
useCreateEvent,
|
|
5977
|
+
useCreateEventInfo,
|
|
5977
5978
|
useCreatePoster,
|
|
5978
5979
|
useCreatePushToken,
|
|
5979
5980
|
useCreateRelation,
|
|
@@ -5985,27 +5986,29 @@ var fonts = {
|
|
|
5985
5986
|
useDeleteAd,
|
|
5986
5987
|
useDeleteAllNotifications,
|
|
5987
5988
|
useDeleteChat,
|
|
5988
|
-
|
|
5989
|
+
useDeleteEvent,
|
|
5989
5990
|
useDeleteNotification,
|
|
5990
5991
|
useDeleteRelation,
|
|
5991
5992
|
useDeleteStallholder,
|
|
5992
5993
|
useDeleteTester,
|
|
5993
5994
|
useDeleteUser,
|
|
5995
|
+
useEventForm,
|
|
5996
|
+
useEventInfoForm,
|
|
5994
5997
|
useGetAd,
|
|
5995
5998
|
useGetAds,
|
|
5996
5999
|
useGetAdsByRegion,
|
|
5997
6000
|
useGetChat,
|
|
5998
6001
|
useGetChatSubscription,
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6002
|
+
useGetEvent,
|
|
6003
|
+
useGetEventInfo,
|
|
6004
|
+
useGetEventRelations,
|
|
6005
|
+
useGetEvents,
|
|
6006
|
+
useGetEventsByRegion,
|
|
6007
|
+
useGetEventsNearMe,
|
|
6005
6008
|
useGetNotificationCount,
|
|
6006
6009
|
useGetNotificationCountSubscription,
|
|
6007
6010
|
useGetRelation,
|
|
6008
|
-
|
|
6011
|
+
useGetRelationByEventAndStallholder,
|
|
6009
6012
|
useGetResourceConnections,
|
|
6010
6013
|
useGetResourceViews,
|
|
6011
6014
|
useGetStallholder,
|
|
@@ -6017,8 +6020,8 @@ var fonts = {
|
|
|
6017
6020
|
useGetTesters,
|
|
6018
6021
|
useGetUser,
|
|
6019
6022
|
useGetUserChats,
|
|
6023
|
+
useGetUserEvents,
|
|
6020
6024
|
useGetUserFavourites,
|
|
6021
|
-
useGetUserMarkets,
|
|
6022
6025
|
useGetUserNotifications,
|
|
6023
6026
|
useGetUserNotificationsSubscription,
|
|
6024
6027
|
useGetUserStallholder,
|
|
@@ -6029,8 +6032,6 @@ var fonts = {
|
|
|
6029
6032
|
useLogout,
|
|
6030
6033
|
useMarkAllNotificationsRead,
|
|
6031
6034
|
useMarkNotificationRead,
|
|
6032
|
-
useMarketForm,
|
|
6033
|
-
useMarketInfoForm,
|
|
6034
6035
|
useRefreshToken,
|
|
6035
6036
|
useRegister,
|
|
6036
6037
|
useRegisterForm,
|
|
@@ -6040,7 +6041,7 @@ var fonts = {
|
|
|
6040
6041
|
useRequestPasswordResetForm,
|
|
6041
6042
|
useResetPassword,
|
|
6042
6043
|
useResetPasswordForm,
|
|
6043
|
-
|
|
6044
|
+
useSearchEvents,
|
|
6044
6045
|
useSearchStallholders,
|
|
6045
6046
|
useSelectPackage,
|
|
6046
6047
|
useSendChatMessage,
|
|
@@ -6048,8 +6049,8 @@ var fonts = {
|
|
|
6048
6049
|
useStallholderInfoForm,
|
|
6049
6050
|
useTestersForm,
|
|
6050
6051
|
useUpdateAd,
|
|
6051
|
-
|
|
6052
|
-
|
|
6052
|
+
useUpdateEvent,
|
|
6053
|
+
useUpdateEventInfo,
|
|
6053
6054
|
useUpdateRelation,
|
|
6054
6055
|
useUpdateStallholder,
|
|
6055
6056
|
useUpdateStallholderInfo,
|