@timardex/cluemart-shared 1.0.48 → 1.0.50
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/formFields/index.cjs +22 -27
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +2 -3
- package/dist/formFields/index.d.ts +2 -3
- package/dist/formFields/index.mjs +22 -26
- package/dist/formFields/index.mjs.map +1 -1
- package/dist/{global-CXknaniY.d.ts → global-BUKNOhE_.d.ts} +4 -5
- package/dist/{global-K_y4U9DZ.d.mts → global-PEJ9GGhs.d.mts} +4 -5
- package/dist/graphql/index.cjs +1 -2
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +1 -1
- package/dist/graphql/index.d.ts +1 -1
- package/dist/graphql/index.mjs +1 -2
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +14 -29
- 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 +14 -29
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +37 -58
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +5 -7
- package/dist/index.d.ts +5 -7
- package/dist/index.mjs +37 -57
- 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.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -219,12 +219,12 @@ interface RelationType {
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
type SiteType = {
|
|
222
|
-
label
|
|
223
|
-
price
|
|
222
|
+
label: string;
|
|
223
|
+
price: number;
|
|
224
|
+
stallCapacity: number;
|
|
224
225
|
};
|
|
225
226
|
interface DateTimeWithPriceType extends DateTimeType {
|
|
226
|
-
|
|
227
|
-
siteTypes?: SiteType[] | null;
|
|
227
|
+
siteTypes: SiteType[];
|
|
228
228
|
}
|
|
229
229
|
type PaymentTargetType = {
|
|
230
230
|
accountHolderName?: string;
|
|
@@ -247,7 +247,6 @@ interface MarketInfoFormData {
|
|
|
247
247
|
paymentDueHours: number;
|
|
248
248
|
paymentTarget: PaymentTargetType[];
|
|
249
249
|
requirements?: Requirement[];
|
|
250
|
-
stallCapacity: number;
|
|
251
250
|
}
|
|
252
251
|
interface MarketFormData extends BaseResourceTypeFormData {
|
|
253
252
|
dateTime: DateTimeType[];
|
|
@@ -1130,7 +1129,6 @@ declare const tagOptions: OptionItem[];
|
|
|
1130
1129
|
|
|
1131
1130
|
declare const marketInfo: FormField[];
|
|
1132
1131
|
declare const marketInfoPaymentTarget: FormField[];
|
|
1133
|
-
declare const marketPriceByDateFields: FormField[];
|
|
1134
1132
|
declare const requirementsOptions: Requirement[];
|
|
1135
1133
|
declare const siteTypeOptions: SiteType[];
|
|
1136
1134
|
|
|
@@ -1157,4 +1155,4 @@ declare const SAVED_TOKEN_KEY = "savedToken";
|
|
|
1157
1155
|
declare const SAVED_REFRESH_TOKEN_KEY = "savedRefreshToken";
|
|
1158
1156
|
declare const USER_STORAGE_KEY = "authUser";
|
|
1159
1157
|
|
|
1160
|
-
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 CreateStallholderApplyFormFormData, type CreateStallholderFormData, 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 PaymentTargetType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, 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 SiteType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, 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, defaultStallholderApplyFormValues, defaultStallholderFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentTarget,
|
|
1158
|
+
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 CreateStallholderApplyFormFormData, type CreateStallholderFormData, 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 PaymentTargetType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, 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 SiteType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, 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, defaultStallholderApplyFormValues, defaultStallholderFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentTarget, marketStartDateFields, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, siteTypeOptions, socialMediaFields, sortDatesByProximity, 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, useCreateStallholderApplyForm, useCreateTester, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useDeleteTester, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, 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, useStallholderApplyForm, useStallholderForm, useTestersForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateTester, useUpdateUser, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, validateVerificationTokenFields };
|
package/dist/index.d.ts
CHANGED
|
@@ -219,12 +219,12 @@ interface RelationType {
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
type SiteType = {
|
|
222
|
-
label
|
|
223
|
-
price
|
|
222
|
+
label: string;
|
|
223
|
+
price: number;
|
|
224
|
+
stallCapacity: number;
|
|
224
225
|
};
|
|
225
226
|
interface DateTimeWithPriceType extends DateTimeType {
|
|
226
|
-
|
|
227
|
-
siteTypes?: SiteType[] | null;
|
|
227
|
+
siteTypes: SiteType[];
|
|
228
228
|
}
|
|
229
229
|
type PaymentTargetType = {
|
|
230
230
|
accountHolderName?: string;
|
|
@@ -247,7 +247,6 @@ interface MarketInfoFormData {
|
|
|
247
247
|
paymentDueHours: number;
|
|
248
248
|
paymentTarget: PaymentTargetType[];
|
|
249
249
|
requirements?: Requirement[];
|
|
250
|
-
stallCapacity: number;
|
|
251
250
|
}
|
|
252
251
|
interface MarketFormData extends BaseResourceTypeFormData {
|
|
253
252
|
dateTime: DateTimeType[];
|
|
@@ -1130,7 +1129,6 @@ declare const tagOptions: OptionItem[];
|
|
|
1130
1129
|
|
|
1131
1130
|
declare const marketInfo: FormField[];
|
|
1132
1131
|
declare const marketInfoPaymentTarget: FormField[];
|
|
1133
|
-
declare const marketPriceByDateFields: FormField[];
|
|
1134
1132
|
declare const requirementsOptions: Requirement[];
|
|
1135
1133
|
declare const siteTypeOptions: SiteType[];
|
|
1136
1134
|
|
|
@@ -1157,4 +1155,4 @@ declare const SAVED_TOKEN_KEY = "savedToken";
|
|
|
1157
1155
|
declare const SAVED_REFRESH_TOKEN_KEY = "savedRefreshToken";
|
|
1158
1156
|
declare const USER_STORAGE_KEY = "authUser";
|
|
1159
1157
|
|
|
1160
|
-
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 CreateStallholderApplyFormFormData, type CreateStallholderFormData, 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 PaymentTargetType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, 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 SiteType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, 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, defaultStallholderApplyFormValues, defaultStallholderFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentTarget,
|
|
1158
|
+
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 CreateStallholderApplyFormFormData, type CreateStallholderFormData, 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 PaymentTargetType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, 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 SiteType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, 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, defaultStallholderApplyFormValues, defaultStallholderFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentTarget, marketStartDateFields, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, siteTypeOptions, socialMediaFields, sortDatesByProximity, 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, useCreateStallholderApplyForm, useCreateTester, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useDeleteTester, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, 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, useStallholderApplyForm, useStallholderForm, useTestersForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateTester, useUpdateUser, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, validateVerificationTokenFields };
|
package/dist/index.mjs
CHANGED
|
@@ -371,24 +371,16 @@ var dateTimeSchema = yup.object().shape({
|
|
|
371
371
|
startTime: yup.string().label("Start Time").concat(startTimeCannotBeInPastTest).required("Start time is required")
|
|
372
372
|
});
|
|
373
373
|
var siteTypesSchema = yup.object({
|
|
374
|
-
label: yup.string().trim().label("Site Label").
|
|
375
|
-
price: yup.number().
|
|
376
|
-
is: (label) => !!label,
|
|
377
|
-
then: (schema) => schema.typeError("Site price must be a number").label("Site Price").min(0.1, "Site price must be at least 0.1").required("Site price is required").test(
|
|
378
|
-
"no-leading-zeros",
|
|
379
|
-
"",
|
|
380
|
-
noLeadingZeros("Site price", { allowDecimal: true })
|
|
381
|
-
),
|
|
382
|
-
otherwise: (schema) => schema.notRequired()
|
|
383
|
-
})
|
|
384
|
-
});
|
|
385
|
-
var dateTimeWithPriceSchema = dateTimeSchema.shape({
|
|
386
|
-
marketPrice: yup.number().typeError("Market price must be a number").label("Market Price").min(0.1, "Market price must be at least 0.1").required("Market price is required").test(
|
|
374
|
+
label: yup.string().trim().label("Site Label").required("Site label is required"),
|
|
375
|
+
price: yup.number().label("Site Price").min(0.1, "Site price must be at least 0.1").required("Site price is required").test(
|
|
387
376
|
"no-leading-zeros",
|
|
388
377
|
"",
|
|
389
|
-
noLeadingZeros("
|
|
378
|
+
noLeadingZeros("Site price", { allowDecimal: true })
|
|
390
379
|
),
|
|
391
|
-
|
|
380
|
+
stallCapacity: yup.number().typeError("Stall capacity must be a number").min(1, "Stall capacity must be at least 1").integer("Stall capacity must be a whole number").required("Stall capacity is required").test("no-leading-zeros", "", noLeadingZeros("Stall capacity"))
|
|
381
|
+
});
|
|
382
|
+
var dateTimeWithPriceSchema = dateTimeSchema.shape({
|
|
383
|
+
siteTypes: yup.array().of(siteTypesSchema).required("Site types are required")
|
|
392
384
|
});
|
|
393
385
|
var locationSchema = yup.object().shape({
|
|
394
386
|
city: yup.string().label("City").required("City is required"),
|
|
@@ -465,8 +457,7 @@ var marketInfoSchema = yup2.object().shape({
|
|
|
465
457
|
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")),
|
|
466
458
|
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")),
|
|
467
459
|
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")),
|
|
468
|
-
paymentTarget: yup2.array().of(paymentTargetSchema).min(1, "At least one payment target is required").required("Payment target is required")
|
|
469
|
-
stallCapacity: yup2.number().typeError("Stall capacity must be a number").min(1, "Stall capacity must be at least 1").integer("Stall capacity must be a whole number").required("Stall capacity is required").test("no-leading-zeros", "", noLeadingZeros("Stall capacity"))
|
|
460
|
+
paymentTarget: yup2.array().of(paymentTargetSchema).min(1, "At least one payment target is required").required("Payment target is required")
|
|
470
461
|
});
|
|
471
462
|
|
|
472
463
|
// src/yupSchema/stallholder.ts
|
|
@@ -577,10 +568,10 @@ var testersSchema = yup6.object().shape({
|
|
|
577
568
|
email: emailSchema,
|
|
578
569
|
firstName: yup6.string().required("First name is required"),
|
|
579
570
|
lastName: yup6.string().required("Last name is required"),
|
|
580
|
-
osType: yup6.mixed().oneOf(Object.values(EnumOSType), "Please select
|
|
571
|
+
osType: yup6.mixed().oneOf(Object.values(EnumOSType), "Please select Android or iOS device").required("OS Type is required"),
|
|
581
572
|
resourceType: yup6.mixed().oneOf(
|
|
582
573
|
Object.values(EnumResourceType),
|
|
583
|
-
"Please select
|
|
574
|
+
"Please select Market or Stallholder"
|
|
584
575
|
).required("Resource Type is required")
|
|
585
576
|
});
|
|
586
577
|
|
|
@@ -642,7 +633,6 @@ var defaultMarketInfoFormValues = {
|
|
|
642
633
|
{
|
|
643
634
|
endDate: "04-05-2025",
|
|
644
635
|
endTime: "15:00",
|
|
645
|
-
marketPrice: 0,
|
|
646
636
|
siteTypes: [],
|
|
647
637
|
startDate: "04-05-2025",
|
|
648
638
|
startTime: "09:00"
|
|
@@ -650,7 +640,6 @@ var defaultMarketInfoFormValues = {
|
|
|
650
640
|
{
|
|
651
641
|
endDate: "05-05-2025",
|
|
652
642
|
endTime: "15:00",
|
|
653
|
-
marketPrice: 0,
|
|
654
643
|
siteTypes: [],
|
|
655
644
|
startDate: "05-05-2025",
|
|
656
645
|
startTime: "09:00"
|
|
@@ -663,8 +652,7 @@ var defaultMarketInfoFormValues = {
|
|
|
663
652
|
// e.g., 1 hour after market closes
|
|
664
653
|
paymentDueHours: 0,
|
|
665
654
|
paymentTarget: [],
|
|
666
|
-
requirements: []
|
|
667
|
-
stallCapacity: 0
|
|
655
|
+
requirements: []
|
|
668
656
|
};
|
|
669
657
|
var defaultStallholderFormValues = {
|
|
670
658
|
...globalDefaultValues,
|
|
@@ -964,8 +952,7 @@ function useMarketInfoForm(data) {
|
|
|
964
952
|
packOutTime: data.packOutTime,
|
|
965
953
|
paymentDueHours: data.paymentDueHours,
|
|
966
954
|
paymentTarget: data.paymentTarget,
|
|
967
|
-
requirements: data.requirements
|
|
968
|
-
stallCapacity: data.stallCapacity
|
|
955
|
+
requirements: data.requirements
|
|
969
956
|
});
|
|
970
957
|
} else {
|
|
971
958
|
reset(defaultMarketInfoFormValues);
|
|
@@ -980,8 +967,7 @@ function useMarketInfoForm(data) {
|
|
|
980
967
|
packOutTime,
|
|
981
968
|
paymentDueHours,
|
|
982
969
|
paymentTarget,
|
|
983
|
-
requirements
|
|
984
|
-
stallCapacity
|
|
970
|
+
requirements
|
|
985
971
|
} = getValues();
|
|
986
972
|
return {
|
|
987
973
|
control,
|
|
@@ -994,8 +980,7 @@ function useMarketInfoForm(data) {
|
|
|
994
980
|
packOutTime,
|
|
995
981
|
paymentDueHours,
|
|
996
982
|
paymentTarget,
|
|
997
|
-
requirements
|
|
998
|
-
stallCapacity
|
|
983
|
+
requirements
|
|
999
984
|
},
|
|
1000
985
|
formState: { errors },
|
|
1001
986
|
handleSubmit,
|
|
@@ -1779,10 +1764,10 @@ var MARKET_INFO = gql5`
|
|
|
1779
1764
|
dateTime {
|
|
1780
1765
|
endDate
|
|
1781
1766
|
endTime
|
|
1782
|
-
marketPrice
|
|
1783
1767
|
siteTypes {
|
|
1784
1768
|
label
|
|
1785
1769
|
price
|
|
1770
|
+
stallCapacity
|
|
1786
1771
|
}
|
|
1787
1772
|
startDate
|
|
1788
1773
|
startTime
|
|
@@ -1797,7 +1782,6 @@ var MARKET_INFO = gql5`
|
|
|
1797
1782
|
link
|
|
1798
1783
|
paymentMethod
|
|
1799
1784
|
}
|
|
1800
|
-
stallCapacity
|
|
1801
1785
|
requirements {
|
|
1802
1786
|
category
|
|
1803
1787
|
label
|
|
@@ -3442,12 +3426,6 @@ var marketInfo = [
|
|
|
3442
3426
|
name: "applicationDeadlineHours",
|
|
3443
3427
|
placeholder: "Application Deadline (in hours)"
|
|
3444
3428
|
},
|
|
3445
|
-
{
|
|
3446
|
-
helperText: "Stall Capacity *",
|
|
3447
|
-
keyboardType: "number-pad",
|
|
3448
|
-
name: "stallCapacity",
|
|
3449
|
-
placeholder: "Stall Capacity"
|
|
3450
|
-
},
|
|
3451
3429
|
{
|
|
3452
3430
|
helperText: "Payment Due Hours *",
|
|
3453
3431
|
keyboardType: "number-pad",
|
|
@@ -3486,14 +3464,6 @@ var marketInfoPaymentTarget = [
|
|
|
3486
3464
|
placeholder: "Link to payment target"
|
|
3487
3465
|
}
|
|
3488
3466
|
];
|
|
3489
|
-
var marketPriceByDateFields = [
|
|
3490
|
-
{
|
|
3491
|
-
helperText: "Market Price for this date *",
|
|
3492
|
-
keyboardType: "decimal-pad",
|
|
3493
|
-
name: "marketPrice",
|
|
3494
|
-
placeholder: "Market Price"
|
|
3495
|
-
}
|
|
3496
|
-
];
|
|
3497
3467
|
var requirementsOptions = [
|
|
3498
3468
|
{
|
|
3499
3469
|
category: "Environment",
|
|
@@ -3654,47 +3624,58 @@ var requirementsOptions = [
|
|
|
3654
3624
|
var siteTypeOptions = [
|
|
3655
3625
|
{
|
|
3656
3626
|
label: "3x3m tent site",
|
|
3657
|
-
price: 0
|
|
3627
|
+
price: 0,
|
|
3628
|
+
stallCapacity: 0
|
|
3658
3629
|
},
|
|
3659
3630
|
{
|
|
3660
3631
|
label: "2x2m mini stall",
|
|
3661
|
-
price: 0
|
|
3632
|
+
price: 0,
|
|
3633
|
+
stallCapacity: 0
|
|
3662
3634
|
},
|
|
3663
3635
|
{
|
|
3664
3636
|
label: "1.8m table only",
|
|
3665
|
-
price: 0
|
|
3637
|
+
price: 0,
|
|
3638
|
+
stallCapacity: 0
|
|
3666
3639
|
},
|
|
3667
3640
|
{
|
|
3668
3641
|
label: "Food truck site",
|
|
3669
|
-
price: 0
|
|
3642
|
+
price: 0,
|
|
3643
|
+
stallCapacity: 0
|
|
3670
3644
|
},
|
|
3671
3645
|
{
|
|
3672
3646
|
label: "Wall-based vendor",
|
|
3673
|
-
price: 0
|
|
3647
|
+
price: 0,
|
|
3648
|
+
stallCapacity: 0
|
|
3674
3649
|
},
|
|
3675
3650
|
{
|
|
3676
3651
|
label: "Workshop/seating area",
|
|
3677
|
-
price: 0
|
|
3652
|
+
price: 0,
|
|
3653
|
+
stallCapacity: 0
|
|
3678
3654
|
},
|
|
3679
3655
|
{
|
|
3680
3656
|
label: "Shared table space",
|
|
3681
|
-
price: 0
|
|
3657
|
+
price: 0,
|
|
3658
|
+
stallCapacity: 0
|
|
3682
3659
|
},
|
|
3683
3660
|
{
|
|
3684
3661
|
label: "Corner stall",
|
|
3685
|
-
price: 0
|
|
3662
|
+
price: 0,
|
|
3663
|
+
stallCapacity: 0
|
|
3686
3664
|
},
|
|
3687
3665
|
{
|
|
3688
3666
|
label: "Double stall (6x3m)",
|
|
3689
|
-
price: 0
|
|
3667
|
+
price: 0,
|
|
3668
|
+
stallCapacity: 0
|
|
3690
3669
|
},
|
|
3691
3670
|
{
|
|
3692
3671
|
label: "Inside hall stall",
|
|
3693
|
-
price: 0
|
|
3672
|
+
price: 0,
|
|
3673
|
+
stallCapacity: 0
|
|
3694
3674
|
},
|
|
3695
3675
|
{
|
|
3696
3676
|
label: "Outdoor open area",
|
|
3697
|
-
price: 0
|
|
3677
|
+
price: 0,
|
|
3678
|
+
stallCapacity: 0
|
|
3698
3679
|
}
|
|
3699
3680
|
];
|
|
3700
3681
|
|
|
@@ -4261,7 +4242,6 @@ export {
|
|
|
4261
4242
|
marketEndDateFields,
|
|
4262
4243
|
marketInfo,
|
|
4263
4244
|
marketInfoPaymentTarget,
|
|
4264
|
-
marketPriceByDateFields,
|
|
4265
4245
|
marketStartDateFields,
|
|
4266
4246
|
normalizeUrl,
|
|
4267
4247
|
packagingOptions,
|