@timardex/cluemart-shared 1.5.512 → 1.5.514
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-YHE6M5DD.mjs → chunk-3WSV6DBG.mjs} +151 -3
- package/dist/chunk-3WSV6DBG.mjs.map +1 -0
- package/dist/{chunk-KPO6ZYQ4.mjs → chunk-TL6OY4BM.mjs} +1 -1
- package/dist/graphql/index.cjs +153 -0
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +35 -2
- package/dist/graphql/index.d.ts +35 -2
- package/dist/graphql/index.mjs +11 -1
- package/dist/hooks/index.cjs +180 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +5 -2
- package/dist/hooks/index.d.ts +5 -2
- package/dist/hooks/index.mjs +96 -4
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +249 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +59 -2
- package/dist/index.d.ts +59 -2
- package/dist/index.mjs +242 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{post-CdBp2FwH.d.ts → post-BdZppiSg.d.ts} +24 -3
- package/dist/{post-DHlHtpG9.d.mts → post-DJUVmC92.d.mts} +24 -3
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-YHE6M5DD.mjs.map +0 -1
- /package/dist/{chunk-KPO6ZYQ4.mjs.map → chunk-TL6OY4BM.mjs.map} +0 -0
package/dist/graphql/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _apollo_client from '@apollo/client';
|
|
|
2
2
|
import { EnumResourceType } from '../enums/index.mjs';
|
|
3
3
|
import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-CqrscA5x.mjs';
|
|
4
4
|
import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-MMBYi34A.mjs';
|
|
5
|
-
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-
|
|
5
|
+
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType, e as SchoolType } from '../post-DJUVmC92.mjs';
|
|
6
6
|
import { G as GameDocType, a as GameLeaderboard } from '../game-BunlgBR3.mjs';
|
|
7
7
|
import 'react-hook-form';
|
|
8
8
|
|
|
@@ -1035,4 +1035,37 @@ declare const useGetGameLeaderboard: () => {
|
|
|
1035
1035
|
}>>;
|
|
1036
1036
|
};
|
|
1037
1037
|
|
|
1038
|
-
|
|
1038
|
+
declare const useCreateSchool: () => {
|
|
1039
|
+
createSchool: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
1040
|
+
error: _apollo_client.ApolloError | undefined;
|
|
1041
|
+
loading: boolean;
|
|
1042
|
+
};
|
|
1043
|
+
declare const useUpdateSchool: () => {
|
|
1044
|
+
error: _apollo_client.ApolloError | undefined;
|
|
1045
|
+
loading: boolean;
|
|
1046
|
+
updateSchool: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
1047
|
+
};
|
|
1048
|
+
declare const useDeleteSchool: () => {
|
|
1049
|
+
deleteSchool: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
1050
|
+
error: _apollo_client.ApolloError | undefined;
|
|
1051
|
+
loading: boolean;
|
|
1052
|
+
};
|
|
1053
|
+
|
|
1054
|
+
declare const useGetSchools: () => {
|
|
1055
|
+
error: _apollo_client.ApolloError | undefined;
|
|
1056
|
+
loading: boolean;
|
|
1057
|
+
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
|
|
1058
|
+
schools: SchoolType[];
|
|
1059
|
+
}>>;
|
|
1060
|
+
schools: SchoolType[];
|
|
1061
|
+
};
|
|
1062
|
+
declare const useGetSchool: (_id: string) => {
|
|
1063
|
+
error: _apollo_client.ApolloError | undefined;
|
|
1064
|
+
loading: boolean;
|
|
1065
|
+
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
|
|
1066
|
+
school: SchoolType | null;
|
|
1067
|
+
}>>;
|
|
1068
|
+
school: SchoolType | null;
|
|
1069
|
+
};
|
|
1070
|
+
|
|
1071
|
+
export { type UseGetEventsByRegionOptions, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useCancelSubscription, useContactUs, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, useRefreshToken, useRegister, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestPasswordReset, useResetPassword, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSchool, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useValidateVerificationToken };
|
package/dist/graphql/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _apollo_client from '@apollo/client';
|
|
|
2
2
|
import { EnumResourceType } from '../enums/index.js';
|
|
3
3
|
import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-2FaGRW-i.js';
|
|
4
4
|
import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-B0WdAD-8.js';
|
|
5
|
-
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-
|
|
5
|
+
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType, e as SchoolType } from '../post-BdZppiSg.js';
|
|
6
6
|
import { G as GameDocType, a as GameLeaderboard } from '../game-BkJDVMMI.js';
|
|
7
7
|
import 'react-hook-form';
|
|
8
8
|
|
|
@@ -1035,4 +1035,37 @@ declare const useGetGameLeaderboard: () => {
|
|
|
1035
1035
|
}>>;
|
|
1036
1036
|
};
|
|
1037
1037
|
|
|
1038
|
-
|
|
1038
|
+
declare const useCreateSchool: () => {
|
|
1039
|
+
createSchool: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
1040
|
+
error: _apollo_client.ApolloError | undefined;
|
|
1041
|
+
loading: boolean;
|
|
1042
|
+
};
|
|
1043
|
+
declare const useUpdateSchool: () => {
|
|
1044
|
+
error: _apollo_client.ApolloError | undefined;
|
|
1045
|
+
loading: boolean;
|
|
1046
|
+
updateSchool: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
1047
|
+
};
|
|
1048
|
+
declare const useDeleteSchool: () => {
|
|
1049
|
+
deleteSchool: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
1050
|
+
error: _apollo_client.ApolloError | undefined;
|
|
1051
|
+
loading: boolean;
|
|
1052
|
+
};
|
|
1053
|
+
|
|
1054
|
+
declare const useGetSchools: () => {
|
|
1055
|
+
error: _apollo_client.ApolloError | undefined;
|
|
1056
|
+
loading: boolean;
|
|
1057
|
+
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
|
|
1058
|
+
schools: SchoolType[];
|
|
1059
|
+
}>>;
|
|
1060
|
+
schools: SchoolType[];
|
|
1061
|
+
};
|
|
1062
|
+
declare const useGetSchool: (_id: string) => {
|
|
1063
|
+
error: _apollo_client.ApolloError | undefined;
|
|
1064
|
+
loading: boolean;
|
|
1065
|
+
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
|
|
1066
|
+
school: SchoolType | null;
|
|
1067
|
+
}>>;
|
|
1068
|
+
school: SchoolType | null;
|
|
1069
|
+
};
|
|
1070
|
+
|
|
1071
|
+
export { type UseGetEventsByRegionOptions, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useCancelSubscription, useContactUs, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, useRefreshToken, useRegister, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestPasswordReset, useResetPassword, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSchool, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useValidateVerificationToken };
|
package/dist/graphql/index.mjs
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
useCreatePushToken,
|
|
24
24
|
useCreateRelation,
|
|
25
25
|
useCreateResourceActivity,
|
|
26
|
+
useCreateSchool,
|
|
26
27
|
useCreateUnregisteredVendor,
|
|
27
28
|
useCreateUser,
|
|
28
29
|
useCreateVendor,
|
|
@@ -35,6 +36,7 @@ import {
|
|
|
35
36
|
useDeletePartner,
|
|
36
37
|
useDeletePost,
|
|
37
38
|
useDeleteRelation,
|
|
39
|
+
useDeleteSchool,
|
|
38
40
|
useDeleteUnregisteredVendor,
|
|
39
41
|
useDeleteUser,
|
|
40
42
|
useDeleteVendor,
|
|
@@ -68,6 +70,8 @@ import {
|
|
|
68
70
|
useGetReportedChatUsers,
|
|
69
71
|
useGetResourceActivity,
|
|
70
72
|
useGetResourceConnections,
|
|
73
|
+
useGetSchool,
|
|
74
|
+
useGetSchools,
|
|
71
75
|
useGetSubscriptionPlans,
|
|
72
76
|
useGetSubscriptionStatus,
|
|
73
77
|
useGetUnregisteredVendor,
|
|
@@ -120,13 +124,14 @@ import {
|
|
|
120
124
|
useUpdatePartner,
|
|
121
125
|
useUpdatePost,
|
|
122
126
|
useUpdateRelation,
|
|
127
|
+
useUpdateSchool,
|
|
123
128
|
useUpdateSubscriptionPlan,
|
|
124
129
|
useUpdateUnregisteredVendor,
|
|
125
130
|
useUpdateUser,
|
|
126
131
|
useUpdateVendor,
|
|
127
132
|
useUpdateVendorInfo,
|
|
128
133
|
useValidateVerificationToken
|
|
129
|
-
} from "../chunk-
|
|
134
|
+
} from "../chunk-3WSV6DBG.mjs";
|
|
130
135
|
import "../chunk-534WN2SR.mjs";
|
|
131
136
|
export {
|
|
132
137
|
useAddParticipantToChat,
|
|
@@ -153,6 +158,7 @@ export {
|
|
|
153
158
|
useCreatePushToken,
|
|
154
159
|
useCreateRelation,
|
|
155
160
|
useCreateResourceActivity,
|
|
161
|
+
useCreateSchool,
|
|
156
162
|
useCreateUnregisteredVendor,
|
|
157
163
|
useCreateUser,
|
|
158
164
|
useCreateVendor,
|
|
@@ -165,6 +171,7 @@ export {
|
|
|
165
171
|
useDeletePartner,
|
|
166
172
|
useDeletePost,
|
|
167
173
|
useDeleteRelation,
|
|
174
|
+
useDeleteSchool,
|
|
168
175
|
useDeleteUnregisteredVendor,
|
|
169
176
|
useDeleteUser,
|
|
170
177
|
useDeleteVendor,
|
|
@@ -198,6 +205,8 @@ export {
|
|
|
198
205
|
useGetReportedChatUsers,
|
|
199
206
|
useGetResourceActivity,
|
|
200
207
|
useGetResourceConnections,
|
|
208
|
+
useGetSchool,
|
|
209
|
+
useGetSchools,
|
|
201
210
|
useGetSubscriptionPlans,
|
|
202
211
|
useGetSubscriptionStatus,
|
|
203
212
|
useGetUnregisteredVendor,
|
|
@@ -250,6 +259,7 @@ export {
|
|
|
250
259
|
useUpdatePartner,
|
|
251
260
|
useUpdatePost,
|
|
252
261
|
useUpdateRelation,
|
|
262
|
+
useUpdateSchool,
|
|
253
263
|
useUpdateSubscriptionPlan,
|
|
254
264
|
useUpdateUnregisteredVendor,
|
|
255
265
|
useUpdateUser,
|
package/dist/hooks/index.cjs
CHANGED
|
@@ -32,6 +32,7 @@ var hooks_exports = {};
|
|
|
32
32
|
__export(hooks_exports, {
|
|
33
33
|
defaultEventFormValues: () => defaultEventFormValues,
|
|
34
34
|
defaultEventInfoFormValues: () => defaultEventInfoFormValues,
|
|
35
|
+
defaultLocation: () => defaultLocation,
|
|
35
36
|
defaultPartnerFormValues: () => defaultPartnerFormValues,
|
|
36
37
|
defaultUnregisteredVendorFormValues: () => defaultUnregisteredVendorFormValues,
|
|
37
38
|
defaultVendorFormValues: () => defaultVendorFormValues,
|
|
@@ -50,6 +51,7 @@ __export(hooks_exports, {
|
|
|
50
51
|
useRegisterForm: () => useRegisterForm,
|
|
51
52
|
useRequestPasswordResetForm: () => useRequestPasswordResetForm,
|
|
52
53
|
useResetPasswordForm: () => useResetPasswordForm,
|
|
54
|
+
useSchoolForm: () => useSchoolForm,
|
|
53
55
|
useUserForm: () => useUserForm,
|
|
54
56
|
useValidateVerificationTokenForm: () => useValidateVerificationTokenForm,
|
|
55
57
|
useVendorForm: () => useVendorForm,
|
|
@@ -741,8 +743,8 @@ var yup4 = __toESM(require("yup"));
|
|
|
741
743
|
var userSchema = yup4.object().shape({
|
|
742
744
|
active: yup4.boolean().required("Active is required"),
|
|
743
745
|
email: emailRequiredSchema,
|
|
744
|
-
firstName: yup4.string().label("First Name").required("First name is required"),
|
|
745
|
-
lastName: yup4.string().label("Last Name").required("Last name is required"),
|
|
746
|
+
firstName: yup4.string().label("First Name").trim().required("First name is required"),
|
|
747
|
+
lastName: yup4.string().label("Last Name").trim().required("Last name is required"),
|
|
746
748
|
isTester: yup4.boolean().required("Tester status is required"),
|
|
747
749
|
password: yup4.string().nullable().trim().label("Password").min(8, "Password must be at least 8 characters long").notRequired(),
|
|
748
750
|
preferredRegion: yup4.string().label("Preferred Region").required("Preferred region is required"),
|
|
@@ -2321,6 +2323,7 @@ var USER_FIELDS_FRAGMENT = import_client2.gql`
|
|
|
2321
2323
|
promoCodes
|
|
2322
2324
|
refreshToken
|
|
2323
2325
|
role
|
|
2326
|
+
school
|
|
2324
2327
|
termsAgreement {
|
|
2325
2328
|
...TermsAgreementFields
|
|
2326
2329
|
}
|
|
@@ -4362,6 +4365,89 @@ var UPDATE_DAILY_CLUE_MUTATION = import_client64.gql`
|
|
|
4362
4365
|
// src/graphql/hooks/game/hooksQuery.ts
|
|
4363
4366
|
var import_client66 = require("@apollo/client");
|
|
4364
4367
|
|
|
4368
|
+
// src/graphql/hooks/school/hooksMutation.ts
|
|
4369
|
+
var import_client69 = require("@apollo/client");
|
|
4370
|
+
|
|
4371
|
+
// src/graphql/mutations/school.ts
|
|
4372
|
+
var import_client68 = require("@apollo/client");
|
|
4373
|
+
|
|
4374
|
+
// src/graphql/queries/school.ts
|
|
4375
|
+
var import_client67 = require("@apollo/client");
|
|
4376
|
+
var SCHOOL = import_client67.gql`
|
|
4377
|
+
fragment SchoolFields on SchoolType {
|
|
4378
|
+
_id
|
|
4379
|
+
active
|
|
4380
|
+
contactDetails {
|
|
4381
|
+
...ContactDetailsFields
|
|
4382
|
+
}
|
|
4383
|
+
location {
|
|
4384
|
+
...LocationFields
|
|
4385
|
+
}
|
|
4386
|
+
createdAt
|
|
4387
|
+
deletedAt
|
|
4388
|
+
logo {
|
|
4389
|
+
...ResourceImageFields
|
|
4390
|
+
}
|
|
4391
|
+
name
|
|
4392
|
+
owner {
|
|
4393
|
+
...OwnerFields
|
|
4394
|
+
}
|
|
4395
|
+
region
|
|
4396
|
+
studentCount
|
|
4397
|
+
termsAgreement {
|
|
4398
|
+
...TermsAgreementFields
|
|
4399
|
+
}
|
|
4400
|
+
updatedAt
|
|
4401
|
+
}
|
|
4402
|
+
${OWNER_FIELDS_FRAGMENT}
|
|
4403
|
+
${LOCATION_FIELDS_FRAGMENT}
|
|
4404
|
+
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
4405
|
+
${CONTACT_DETAILS_FIELDS_FRAGMENT}
|
|
4406
|
+
${TERMS_AGREEMENT_FIELDS_FRAGMENT}
|
|
4407
|
+
`;
|
|
4408
|
+
var GET_SCHOOL = import_client67.gql`
|
|
4409
|
+
query getSchool($_id: ID!) {
|
|
4410
|
+
school(_id: $_id) {
|
|
4411
|
+
...SchoolFields
|
|
4412
|
+
}
|
|
4413
|
+
}
|
|
4414
|
+
${SCHOOL}
|
|
4415
|
+
`;
|
|
4416
|
+
var GET_SCHOOLS = import_client67.gql`
|
|
4417
|
+
query getSchools {
|
|
4418
|
+
schools {
|
|
4419
|
+
...SchoolFields
|
|
4420
|
+
}
|
|
4421
|
+
}
|
|
4422
|
+
${SCHOOL}
|
|
4423
|
+
`;
|
|
4424
|
+
|
|
4425
|
+
// src/graphql/mutations/school.ts
|
|
4426
|
+
var CREATE_SCHOOL_MUTATION = import_client68.gql`
|
|
4427
|
+
mutation createSchool($input: SchoolInputType!) {
|
|
4428
|
+
createSchool(input: $input) {
|
|
4429
|
+
...SchoolFields
|
|
4430
|
+
}
|
|
4431
|
+
}
|
|
4432
|
+
${SCHOOL}
|
|
4433
|
+
`;
|
|
4434
|
+
var UPDATE_SCHOOL_MUTATION = import_client68.gql`
|
|
4435
|
+
mutation updateSchool($_id: ID!, $input: SchoolInputType!) {
|
|
4436
|
+
updateSchool(_id: $_id, input: $input) {
|
|
4437
|
+
...SchoolFields
|
|
4438
|
+
}
|
|
4439
|
+
}
|
|
4440
|
+
${SCHOOL}
|
|
4441
|
+
`;
|
|
4442
|
+
var DELETE_SCHOOL_MUTATION = import_client68.gql`
|
|
4443
|
+
mutation deleteSchool($_id: ID!) {
|
|
4444
|
+
deleteSchool(_id: $_id)
|
|
4445
|
+
}
|
|
4446
|
+
`;
|
|
4447
|
+
|
|
4448
|
+
// src/graphql/hooks/school/hooksQuery.ts
|
|
4449
|
+
var import_client70 = require("@apollo/client");
|
|
4450
|
+
|
|
4365
4451
|
// src/types/post.ts
|
|
4366
4452
|
var EnumPostType = /* @__PURE__ */ ((EnumPostType2) => {
|
|
4367
4453
|
EnumPostType2["DAILY_MEETS"] = "daily_meets";
|
|
@@ -5483,10 +5569,101 @@ function useAppSettingsForm(data) {
|
|
|
5483
5569
|
watch
|
|
5484
5570
|
};
|
|
5485
5571
|
}
|
|
5572
|
+
|
|
5573
|
+
// src/hooks/useSchoolForm.ts
|
|
5574
|
+
var import_yup16 = require("@hookform/resolvers/yup");
|
|
5575
|
+
var import_react5 = require("react");
|
|
5576
|
+
var import_react_hook_form16 = require("react-hook-form");
|
|
5577
|
+
|
|
5578
|
+
// src/yupSchema/school.ts
|
|
5579
|
+
var yup11 = __toESM(require("yup"));
|
|
5580
|
+
var schoolSchema = yup11.object().shape({
|
|
5581
|
+
active: yup11.boolean().required("Active is required"),
|
|
5582
|
+
contactDetails: contactDetailsSchema,
|
|
5583
|
+
location: locationSchema,
|
|
5584
|
+
name: yup11.string().trim().required("Name is required"),
|
|
5585
|
+
region: yup11.string().trim().required("Region is required"),
|
|
5586
|
+
studentCount: yup11.number().label("Student Count").min(0, "Student count cannot be negative").required("Student count is required").test("no-leading-zeros", "", noLeadingZeros("Student Count"))
|
|
5587
|
+
});
|
|
5588
|
+
|
|
5589
|
+
// src/hooks/useSchoolForm.ts
|
|
5590
|
+
var defaultSchoolFormValues = {
|
|
5591
|
+
active: false,
|
|
5592
|
+
contactDetails: null,
|
|
5593
|
+
location: defaultLocation,
|
|
5594
|
+
logo: null,
|
|
5595
|
+
logoUpload: null,
|
|
5596
|
+
name: "",
|
|
5597
|
+
region: "",
|
|
5598
|
+
studentCount: 0,
|
|
5599
|
+
termsAgreement: null
|
|
5600
|
+
};
|
|
5601
|
+
function useSchoolForm(data) {
|
|
5602
|
+
const {
|
|
5603
|
+
control,
|
|
5604
|
+
formState,
|
|
5605
|
+
getValues,
|
|
5606
|
+
handleSubmit,
|
|
5607
|
+
reset,
|
|
5608
|
+
setValue,
|
|
5609
|
+
watch
|
|
5610
|
+
} = (0, import_react_hook_form16.useForm)({
|
|
5611
|
+
defaultValues: defaultSchoolFormValues,
|
|
5612
|
+
resolver: (0, import_yup16.yupResolver)(schoolSchema)
|
|
5613
|
+
});
|
|
5614
|
+
(0, import_react5.useEffect)(() => {
|
|
5615
|
+
if (data) {
|
|
5616
|
+
reset({
|
|
5617
|
+
active: data.active,
|
|
5618
|
+
contactDetails: data.contactDetails,
|
|
5619
|
+
location: data.location,
|
|
5620
|
+
logo: data.logo,
|
|
5621
|
+
logoUpload: data.logoUpload,
|
|
5622
|
+
name: data.name,
|
|
5623
|
+
region: data.region,
|
|
5624
|
+
studentCount: data.studentCount,
|
|
5625
|
+
termsAgreement: data.termsAgreement
|
|
5626
|
+
});
|
|
5627
|
+
} else {
|
|
5628
|
+
reset(defaultSchoolFormValues);
|
|
5629
|
+
}
|
|
5630
|
+
}, [data]);
|
|
5631
|
+
const {
|
|
5632
|
+
active,
|
|
5633
|
+
contactDetails,
|
|
5634
|
+
location,
|
|
5635
|
+
logo,
|
|
5636
|
+
logoUpload,
|
|
5637
|
+
name,
|
|
5638
|
+
region,
|
|
5639
|
+
studentCount,
|
|
5640
|
+
termsAgreement
|
|
5641
|
+
} = getValues();
|
|
5642
|
+
return {
|
|
5643
|
+
control,
|
|
5644
|
+
fields: {
|
|
5645
|
+
active,
|
|
5646
|
+
contactDetails,
|
|
5647
|
+
location,
|
|
5648
|
+
logo,
|
|
5649
|
+
logoUpload,
|
|
5650
|
+
name,
|
|
5651
|
+
region,
|
|
5652
|
+
studentCount,
|
|
5653
|
+
termsAgreement
|
|
5654
|
+
},
|
|
5655
|
+
formState,
|
|
5656
|
+
handleSubmit,
|
|
5657
|
+
reset,
|
|
5658
|
+
setValue,
|
|
5659
|
+
watch
|
|
5660
|
+
};
|
|
5661
|
+
}
|
|
5486
5662
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5487
5663
|
0 && (module.exports = {
|
|
5488
5664
|
defaultEventFormValues,
|
|
5489
5665
|
defaultEventInfoFormValues,
|
|
5666
|
+
defaultLocation,
|
|
5490
5667
|
defaultPartnerFormValues,
|
|
5491
5668
|
defaultUnregisteredVendorFormValues,
|
|
5492
5669
|
defaultVendorFormValues,
|
|
@@ -5505,6 +5682,7 @@ function useAppSettingsForm(data) {
|
|
|
5505
5682
|
useRegisterForm,
|
|
5506
5683
|
useRequestPasswordResetForm,
|
|
5507
5684
|
useResetPasswordForm,
|
|
5685
|
+
useSchoolForm,
|
|
5508
5686
|
useUserForm,
|
|
5509
5687
|
useValidateVerificationTokenForm,
|
|
5510
5688
|
useVendorForm,
|