@timardex/cluemart-shared 1.0.28 → 1.0.29
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-GMCWFVU5.mjs → chunk-BDJVSBRT.mjs} +2 -2
- package/dist/{chunk-GMOTXE7A.mjs → chunk-OXXSIU3M.mjs} +1 -7
- package/dist/chunk-OXXSIU3M.mjs.map +1 -0
- package/dist/enums/index.cjs +0 -7
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.mts +1 -5
- package/dist/enums/index.d.ts +1 -5
- package/dist/enums/index.mjs +1 -3
- package/dist/formFields/index.cjs +97 -16
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +3 -3
- package/dist/formFields/index.d.ts +3 -3
- package/dist/formFields/index.mjs +98 -14
- package/dist/formFields/index.mjs.map +1 -1
- package/dist/{global-DwhGi-4q.d.mts → global-BwS9p10K.d.mts} +11 -4
- package/dist/{global-BRfKKan0.d.ts → global-lB32aPz_.d.ts} +11 -4
- package/dist/graphql/index.cjs +7 -1
- 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 +7 -1
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +62 -57
- 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 +57 -48
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +166 -71
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +11 -8
- package/dist/index.d.ts +11 -8
- package/dist/index.mjs +165 -69
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/index.cjs.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-GMOTXE7A.mjs.map +0 -1
- /package/dist/{chunk-GMCWFVU5.mjs.map → chunk-BDJVSBRT.mjs.map} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -10,10 +10,6 @@ declare enum EnumInviteStatus {
|
|
|
10
10
|
REJECTED = "Rejected",
|
|
11
11
|
WAITING = "Waiting"
|
|
12
12
|
}
|
|
13
|
-
declare enum EnumRejectionPolicy {
|
|
14
|
-
SINGLE_DATE_ALLOWED = "single_date_allowed",
|
|
15
|
-
MULTI_DATE_ALLOWED = "multi_date_allowed"
|
|
16
|
-
}
|
|
17
13
|
declare enum EnumPaymentMethod {
|
|
18
14
|
CASH = "cash",
|
|
19
15
|
EFTPOS = "eftpos",
|
|
@@ -227,14 +223,21 @@ type PaymentTargetType = {
|
|
|
227
223
|
link?: string;
|
|
228
224
|
paymentMethod: EnumPaymentMethod;
|
|
229
225
|
};
|
|
226
|
+
type Requirement = {
|
|
227
|
+
category: "Food Safety" | "Environment" | "Operations" | "Legal & Safety";
|
|
228
|
+
label: string;
|
|
229
|
+
value: string;
|
|
230
|
+
};
|
|
230
231
|
interface MarketInfoFormData {
|
|
231
232
|
_id?: string;
|
|
232
233
|
applicationDeadlineHours: number;
|
|
233
234
|
dateTime: DateTimeWithPriceType[];
|
|
234
235
|
marketId: string;
|
|
236
|
+
packInTime: number;
|
|
237
|
+
packOutTime: number;
|
|
235
238
|
paymentDueHours: number;
|
|
236
239
|
paymentTarget: PaymentTargetType[];
|
|
237
|
-
|
|
240
|
+
requirements?: Requirement[];
|
|
238
241
|
stallCapacity: number;
|
|
239
242
|
}
|
|
240
243
|
interface MarketFormData extends BaseResourceTypeFormData {
|
|
@@ -467,7 +470,7 @@ interface FormField {
|
|
|
467
470
|
disabled?: boolean;
|
|
468
471
|
helperText?: string;
|
|
469
472
|
isTextArea?: boolean;
|
|
470
|
-
keyboardType?: "default" | "email-address" | "number-pad" | "url";
|
|
473
|
+
keyboardType?: "default" | "email-address" | "number-pad" | "url" | "decimal-pad";
|
|
471
474
|
name: string;
|
|
472
475
|
placeholder: string;
|
|
473
476
|
secureTextEntry?: boolean;
|
|
@@ -1012,7 +1015,7 @@ declare const tagOptions: OptionItem[];
|
|
|
1012
1015
|
declare const marketInfo: FormField[];
|
|
1013
1016
|
declare const marketInfoPaymentTarget: FormField[];
|
|
1014
1017
|
declare const marketPriceByDateFields: FormField[];
|
|
1015
|
-
declare const
|
|
1018
|
+
declare const requirementsOptions: Requirement[];
|
|
1016
1019
|
|
|
1017
1020
|
declare const loginFields: FormField[];
|
|
1018
1021
|
declare const registerFields: FormField[];
|
|
@@ -1027,4 +1030,4 @@ declare const categoryColors: Record<string, string>;
|
|
|
1027
1030
|
|
|
1028
1031
|
declare const socialMediaFields: FormField[];
|
|
1029
1032
|
|
|
1030
|
-
export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumPaymentMethod, EnumRegions,
|
|
1033
|
+
export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, 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, type SatllholderWithConnectionDatesType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type UserFormData, type UserType, type ValidateTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderApplyFormValues, defaultStallholderFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentTarget, marketPriceByDateFields, marketStartDateFields, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesByProximity, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUsers, useLocationSearch, useLogin, useLoginForm, useMarketForm, useMarketInfoForm, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateUser, useUserForm, useValidateToken, useValidateTokenForm, validateTokenFields };
|
package/dist/index.d.ts
CHANGED
|
@@ -10,10 +10,6 @@ declare enum EnumInviteStatus {
|
|
|
10
10
|
REJECTED = "Rejected",
|
|
11
11
|
WAITING = "Waiting"
|
|
12
12
|
}
|
|
13
|
-
declare enum EnumRejectionPolicy {
|
|
14
|
-
SINGLE_DATE_ALLOWED = "single_date_allowed",
|
|
15
|
-
MULTI_DATE_ALLOWED = "multi_date_allowed"
|
|
16
|
-
}
|
|
17
13
|
declare enum EnumPaymentMethod {
|
|
18
14
|
CASH = "cash",
|
|
19
15
|
EFTPOS = "eftpos",
|
|
@@ -227,14 +223,21 @@ type PaymentTargetType = {
|
|
|
227
223
|
link?: string;
|
|
228
224
|
paymentMethod: EnumPaymentMethod;
|
|
229
225
|
};
|
|
226
|
+
type Requirement = {
|
|
227
|
+
category: "Food Safety" | "Environment" | "Operations" | "Legal & Safety";
|
|
228
|
+
label: string;
|
|
229
|
+
value: string;
|
|
230
|
+
};
|
|
230
231
|
interface MarketInfoFormData {
|
|
231
232
|
_id?: string;
|
|
232
233
|
applicationDeadlineHours: number;
|
|
233
234
|
dateTime: DateTimeWithPriceType[];
|
|
234
235
|
marketId: string;
|
|
236
|
+
packInTime: number;
|
|
237
|
+
packOutTime: number;
|
|
235
238
|
paymentDueHours: number;
|
|
236
239
|
paymentTarget: PaymentTargetType[];
|
|
237
|
-
|
|
240
|
+
requirements?: Requirement[];
|
|
238
241
|
stallCapacity: number;
|
|
239
242
|
}
|
|
240
243
|
interface MarketFormData extends BaseResourceTypeFormData {
|
|
@@ -467,7 +470,7 @@ interface FormField {
|
|
|
467
470
|
disabled?: boolean;
|
|
468
471
|
helperText?: string;
|
|
469
472
|
isTextArea?: boolean;
|
|
470
|
-
keyboardType?: "default" | "email-address" | "number-pad" | "url";
|
|
473
|
+
keyboardType?: "default" | "email-address" | "number-pad" | "url" | "decimal-pad";
|
|
471
474
|
name: string;
|
|
472
475
|
placeholder: string;
|
|
473
476
|
secureTextEntry?: boolean;
|
|
@@ -1012,7 +1015,7 @@ declare const tagOptions: OptionItem[];
|
|
|
1012
1015
|
declare const marketInfo: FormField[];
|
|
1013
1016
|
declare const marketInfoPaymentTarget: FormField[];
|
|
1014
1017
|
declare const marketPriceByDateFields: FormField[];
|
|
1015
|
-
declare const
|
|
1018
|
+
declare const requirementsOptions: Requirement[];
|
|
1016
1019
|
|
|
1017
1020
|
declare const loginFields: FormField[];
|
|
1018
1021
|
declare const registerFields: FormField[];
|
|
@@ -1027,4 +1030,4 @@ declare const categoryColors: Record<string, string>;
|
|
|
1027
1030
|
|
|
1028
1031
|
declare const socialMediaFields: FormField[];
|
|
1029
1032
|
|
|
1030
|
-
export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumPaymentMethod, EnumRegions,
|
|
1033
|
+
export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, 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, type SatllholderWithConnectionDatesType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type UserFormData, type UserType, type ValidateTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderApplyFormValues, defaultStallholderFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentTarget, marketPriceByDateFields, marketStartDateFields, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesByProximity, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUsers, useLocationSearch, useLogin, useLoginForm, useMarketForm, useMarketInfoForm, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateUser, useUserForm, useValidateToken, useValidateTokenForm, validateTokenFields };
|
package/dist/index.mjs
CHANGED
|
@@ -16,18 +16,13 @@ var EnumInviteStatus = /* @__PURE__ */ ((EnumInviteStatus2) => {
|
|
|
16
16
|
EnumInviteStatus2["WAITING"] = "Waiting";
|
|
17
17
|
return EnumInviteStatus2;
|
|
18
18
|
})(EnumInviteStatus || {});
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
EnumPaymentMethod3["EFTPOS"] = "eftpos";
|
|
27
|
-
EnumPaymentMethod3["BANK_TRANSFER"] = "bank_transfer";
|
|
28
|
-
EnumPaymentMethod3["PAYPAL"] = "paypal";
|
|
29
|
-
EnumPaymentMethod3["STRIPE"] = "stripe";
|
|
30
|
-
return EnumPaymentMethod3;
|
|
19
|
+
var EnumPaymentMethod = /* @__PURE__ */ ((EnumPaymentMethod2) => {
|
|
20
|
+
EnumPaymentMethod2["CASH"] = "cash";
|
|
21
|
+
EnumPaymentMethod2["EFTPOS"] = "eftpos";
|
|
22
|
+
EnumPaymentMethod2["BANK_TRANSFER"] = "bank_transfer";
|
|
23
|
+
EnumPaymentMethod2["PAYPAL"] = "paypal";
|
|
24
|
+
EnumPaymentMethod2["STRIPE"] = "stripe";
|
|
25
|
+
return EnumPaymentMethod2;
|
|
31
26
|
})(EnumPaymentMethod || {});
|
|
32
27
|
var EnumResourceType = /* @__PURE__ */ ((EnumResourceType2) => {
|
|
33
28
|
EnumResourceType2["MARKET"] = "market";
|
|
@@ -404,45 +399,52 @@ var marketSchema = globalResourceSchema.shape({
|
|
|
404
399
|
tags: yup2.array().of(yup2.string().defined()).min(1, "Tags are required").required("Tags are required")
|
|
405
400
|
});
|
|
406
401
|
var paymentTargetSchema = yup2.object({
|
|
407
|
-
paymentMethod: yup2.mixed().oneOf(Object.values(EnumPaymentMethod)).required("Please select a Payment method")
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
"
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
(value) => typeof value === "string" ? value.toLowerCase() : value
|
|
429
|
-
).notRequired()
|
|
430
|
-
});
|
|
431
|
-
} else {
|
|
432
|
-
return schema.shape({
|
|
433
|
-
accountHolderName: yup2.string().notRequired(),
|
|
434
|
-
accountNumber: yup2.string().notRequired(),
|
|
435
|
-
link: yup2.string().notRequired()
|
|
436
|
-
});
|
|
437
|
-
}
|
|
402
|
+
paymentMethod: yup2.mixed().oneOf(Object.values(EnumPaymentMethod)).required("Please select a Payment method"),
|
|
403
|
+
accountHolderName: yup2.string().when("paymentMethod", {
|
|
404
|
+
is: "bank_transfer" /* BANK_TRANSFER */,
|
|
405
|
+
then: (schema) => schema.required("Account holder name is required for bank transfer").trim(),
|
|
406
|
+
otherwise: (schema) => schema.notRequired()
|
|
407
|
+
}),
|
|
408
|
+
accountNumber: yup2.string().when("paymentMethod", {
|
|
409
|
+
is: "bank_transfer" /* BANK_TRANSFER */,
|
|
410
|
+
then: (schema) => schema.required("Account number is required for bank transfer").matches(
|
|
411
|
+
nzBankAccountRegex,
|
|
412
|
+
"Account number must be in format: XX-XXXX-XXXXXXX-XX"
|
|
413
|
+
).trim(),
|
|
414
|
+
otherwise: (schema) => schema.notRequired()
|
|
415
|
+
}),
|
|
416
|
+
link: yup2.string().when("paymentMethod", {
|
|
417
|
+
is: (val) => val !== "bank_transfer" /* BANK_TRANSFER */,
|
|
418
|
+
then: (schema) => schema.trim().url("Link must be a valid URL").required("Link is required for PayPal/Stripe").transform(
|
|
419
|
+
(value) => typeof value === "string" ? value.toLowerCase() : value
|
|
420
|
+
),
|
|
421
|
+
otherwise: (schema) => schema.notRequired()
|
|
422
|
+
})
|
|
438
423
|
});
|
|
439
424
|
var marketInfoSchema = yup2.object().shape({
|
|
440
|
-
applicationDeadlineHours: yup2.number().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")),
|
|
425
|
+
applicationDeadlineHours: yup2.number().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")),
|
|
441
426
|
dateTime: yup2.array().of(dateTimeWithPriceSchema).required("DateTime is required"),
|
|
442
427
|
marketId: yup2.string().trim().required("Market ID is required"),
|
|
428
|
+
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")),
|
|
429
|
+
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")),
|
|
430
|
+
/* requirements: yup
|
|
431
|
+
.array()
|
|
432
|
+
.of(
|
|
433
|
+
yup.object({
|
|
434
|
+
category: yup
|
|
435
|
+
.mixed<
|
|
436
|
+
"Food Safety" | "Environment" | "Operations" | "Legal & Safety"
|
|
437
|
+
>()
|
|
438
|
+
.oneOf(["Food Safety", "Environment", "Operations", "Legal & Safety"])
|
|
439
|
+
.required("Category is required"),
|
|
440
|
+
label: yup.string().trim().required("Label is required"),
|
|
441
|
+
value: yup.string().trim().required("Value is required"),
|
|
442
|
+
}),
|
|
443
|
+
)
|
|
444
|
+
.min(1, "At least one requirement is required")
|
|
445
|
+
.required("Requirements are required"), */
|
|
443
446
|
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")),
|
|
444
447
|
paymentTarget: yup2.array().of(paymentTargetSchema).min(1, "At least one payment target is required").required("Payment target is required"),
|
|
445
|
-
rejectionPolicy: yup2.mixed().oneOf(Object.values(EnumRejectionPolicy)).required("Rejection policy is required"),
|
|
446
448
|
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"))
|
|
447
449
|
});
|
|
448
450
|
|
|
@@ -620,16 +622,13 @@ var defaultMarketInfoFormValues = {
|
|
|
620
622
|
}
|
|
621
623
|
],
|
|
622
624
|
marketId: "",
|
|
625
|
+
packInTime: 0,
|
|
626
|
+
// e.g., 2 hours before market opens
|
|
627
|
+
packOutTime: 0,
|
|
628
|
+
// e.g., 1 hour after market closes
|
|
623
629
|
paymentDueHours: 0,
|
|
624
|
-
paymentTarget: [
|
|
625
|
-
|
|
626
|
-
accountHolderName: "",
|
|
627
|
-
accountNumber: "",
|
|
628
|
-
link: "",
|
|
629
|
-
paymentMethod: ""
|
|
630
|
-
}
|
|
631
|
-
],
|
|
632
|
-
rejectionPolicy: "multi_date_allowed" /* MULTI_DATE_ALLOWED */,
|
|
630
|
+
paymentTarget: [],
|
|
631
|
+
requirements: [],
|
|
633
632
|
stallCapacity: 0
|
|
634
633
|
};
|
|
635
634
|
var defaultStallholderFormValues = {
|
|
@@ -926,9 +925,11 @@ function useMarketInfoForm(data) {
|
|
|
926
925
|
applicationDeadlineHours: data.applicationDeadlineHours,
|
|
927
926
|
dateTime: data.dateTime,
|
|
928
927
|
marketId: data.marketId,
|
|
928
|
+
packInTime: data.packInTime,
|
|
929
|
+
packOutTime: data.packOutTime,
|
|
929
930
|
paymentDueHours: data.paymentDueHours,
|
|
930
931
|
paymentTarget: data.paymentTarget,
|
|
931
|
-
|
|
932
|
+
requirements: data.requirements,
|
|
932
933
|
stallCapacity: data.stallCapacity
|
|
933
934
|
});
|
|
934
935
|
} else {
|
|
@@ -940,9 +941,11 @@ function useMarketInfoForm(data) {
|
|
|
940
941
|
applicationDeadlineHours,
|
|
941
942
|
dateTime,
|
|
942
943
|
marketId,
|
|
944
|
+
packInTime,
|
|
945
|
+
packOutTime,
|
|
943
946
|
paymentDueHours,
|
|
944
947
|
paymentTarget,
|
|
945
|
-
|
|
948
|
+
requirements,
|
|
946
949
|
stallCapacity
|
|
947
950
|
} = getValues();
|
|
948
951
|
return {
|
|
@@ -952,9 +955,11 @@ function useMarketInfoForm(data) {
|
|
|
952
955
|
applicationDeadlineHours,
|
|
953
956
|
dateTime,
|
|
954
957
|
marketId,
|
|
958
|
+
packInTime,
|
|
959
|
+
packOutTime,
|
|
955
960
|
paymentDueHours,
|
|
956
961
|
paymentTarget,
|
|
957
|
-
|
|
962
|
+
requirements,
|
|
958
963
|
stallCapacity
|
|
959
964
|
},
|
|
960
965
|
formState: { errors },
|
|
@@ -1598,6 +1603,8 @@ var MARKET_INFO = gql5`
|
|
|
1598
1603
|
startTime
|
|
1599
1604
|
}
|
|
1600
1605
|
marketId
|
|
1606
|
+
packInTime
|
|
1607
|
+
packOutTime
|
|
1601
1608
|
paymentDueHours
|
|
1602
1609
|
paymentTarget {
|
|
1603
1610
|
accountHolderName
|
|
@@ -1605,8 +1612,12 @@ var MARKET_INFO = gql5`
|
|
|
1605
1612
|
link
|
|
1606
1613
|
paymentMethod
|
|
1607
1614
|
}
|
|
1608
|
-
rejectionPolicy
|
|
1609
1615
|
stallCapacity
|
|
1616
|
+
requirements {
|
|
1617
|
+
category
|
|
1618
|
+
label
|
|
1619
|
+
value
|
|
1620
|
+
}
|
|
1610
1621
|
}
|
|
1611
1622
|
`;
|
|
1612
1623
|
var MARKET = gql5`
|
|
@@ -3086,22 +3097,34 @@ var tagOptions = availableTagTypes.map((tag) => ({
|
|
|
3086
3097
|
// src/formFields/market/marketInfo.ts
|
|
3087
3098
|
var marketInfo = [
|
|
3088
3099
|
{
|
|
3089
|
-
helperText: "Application Deadline
|
|
3100
|
+
helperText: "Application Deadline *",
|
|
3090
3101
|
keyboardType: "number-pad",
|
|
3091
3102
|
name: "applicationDeadlineHours",
|
|
3092
|
-
placeholder: "Application Deadline
|
|
3103
|
+
placeholder: "Application Deadline (in hours)"
|
|
3093
3104
|
},
|
|
3094
3105
|
{
|
|
3095
|
-
helperText: "Stall Capacity
|
|
3106
|
+
helperText: "Stall Capacity *",
|
|
3096
3107
|
keyboardType: "number-pad",
|
|
3097
3108
|
name: "stallCapacity",
|
|
3098
3109
|
placeholder: "Stall Capacity"
|
|
3099
3110
|
},
|
|
3100
3111
|
{
|
|
3101
|
-
helperText: "Payment Due Hours
|
|
3112
|
+
helperText: "Payment Due Hours *",
|
|
3102
3113
|
keyboardType: "number-pad",
|
|
3103
3114
|
name: "paymentDueHours",
|
|
3104
|
-
placeholder: "Payment Due
|
|
3115
|
+
placeholder: "Payment Due (in hours)"
|
|
3116
|
+
},
|
|
3117
|
+
{
|
|
3118
|
+
helperText: "Pack In Time *",
|
|
3119
|
+
keyboardType: "number-pad",
|
|
3120
|
+
name: "packInTime",
|
|
3121
|
+
placeholder: "Pack In Time (in hours)"
|
|
3122
|
+
},
|
|
3123
|
+
{
|
|
3124
|
+
helperText: "Pack Out Time *",
|
|
3125
|
+
keyboardType: "number-pad",
|
|
3126
|
+
name: "packOutTime",
|
|
3127
|
+
placeholder: "Pack Out Time (in hours)"
|
|
3105
3128
|
}
|
|
3106
3129
|
];
|
|
3107
3130
|
var marketInfoPaymentTarget = [
|
|
@@ -3125,14 +3148,88 @@ var marketInfoPaymentTarget = [
|
|
|
3125
3148
|
var marketPriceByDateFields = [
|
|
3126
3149
|
{
|
|
3127
3150
|
helperText: "Market Price for this date *",
|
|
3128
|
-
keyboardType: "
|
|
3151
|
+
keyboardType: "decimal-pad",
|
|
3129
3152
|
name: "marketPrice",
|
|
3130
3153
|
placeholder: "Market Price"
|
|
3131
3154
|
}
|
|
3132
3155
|
];
|
|
3133
|
-
var
|
|
3134
|
-
|
|
3135
|
-
|
|
3156
|
+
var requirementsOptions = [
|
|
3157
|
+
{
|
|
3158
|
+
category: "Food Safety",
|
|
3159
|
+
label: "The stallholder must display a current food grade certificate",
|
|
3160
|
+
value: "food_grade_certificate"
|
|
3161
|
+
},
|
|
3162
|
+
{
|
|
3163
|
+
category: "Food Safety",
|
|
3164
|
+
label: "Food must be prepared and stored according to your food regulation",
|
|
3165
|
+
value: "food_preparation_regulations"
|
|
3166
|
+
},
|
|
3167
|
+
{
|
|
3168
|
+
category: "Legal & Safety",
|
|
3169
|
+
label: "All electrical equipment must be tested and tagged",
|
|
3170
|
+
value: "electrical_safety"
|
|
3171
|
+
},
|
|
3172
|
+
{
|
|
3173
|
+
category: "Operations",
|
|
3174
|
+
label: "You must be self-sufficient in all operations",
|
|
3175
|
+
value: "self_sufficient_operations"
|
|
3176
|
+
},
|
|
3177
|
+
{
|
|
3178
|
+
category: "Environment",
|
|
3179
|
+
label: "You must provide bins at your site for rubbish and recycling, and take away all bins including rubbish, to dispose of outside of the town centre",
|
|
3180
|
+
value: "rubbish_and_recycling_responsibility"
|
|
3181
|
+
},
|
|
3182
|
+
{
|
|
3183
|
+
category: "Legal & Safety",
|
|
3184
|
+
label: "You must secure your gazebo and equipment to withstand wind or bad weather",
|
|
3185
|
+
value: "stall_safety_and_weather_protection"
|
|
3186
|
+
},
|
|
3187
|
+
{
|
|
3188
|
+
category: "Legal & Safety",
|
|
3189
|
+
label: "You are responsible for the safety of your setup and any potential hazards",
|
|
3190
|
+
value: "stallholder_safety_responsibility"
|
|
3191
|
+
},
|
|
3192
|
+
{
|
|
3193
|
+
category: "Operations",
|
|
3194
|
+
label: "Stallholders must arrive and be fully set up by the designated opening time",
|
|
3195
|
+
value: "setup_on_time"
|
|
3196
|
+
},
|
|
3197
|
+
{
|
|
3198
|
+
category: "Operations",
|
|
3199
|
+
label: "You may not pack down your stall before the event officially ends",
|
|
3200
|
+
value: "no_early_packdown"
|
|
3201
|
+
},
|
|
3202
|
+
{
|
|
3203
|
+
category: "Environment",
|
|
3204
|
+
label: "All packaging must be eco-friendly or recyclable where possible",
|
|
3205
|
+
value: "eco_friendly_packaging"
|
|
3206
|
+
},
|
|
3207
|
+
{
|
|
3208
|
+
category: "Legal & Safety",
|
|
3209
|
+
label: "Stallholders must hold valid liability insurance where required",
|
|
3210
|
+
value: "liability_insurance_required"
|
|
3211
|
+
},
|
|
3212
|
+
{
|
|
3213
|
+
category: "Environment",
|
|
3214
|
+
label: "No single-use plastic bags are to be handed out",
|
|
3215
|
+
value: "no_single_use_plastics"
|
|
3216
|
+
},
|
|
3217
|
+
{
|
|
3218
|
+
category: "Legal & Safety",
|
|
3219
|
+
label: "Noise levels must be kept to a minimum unless part of a permitted performance",
|
|
3220
|
+
value: "noise_restrictions"
|
|
3221
|
+
},
|
|
3222
|
+
{
|
|
3223
|
+
category: "Operations",
|
|
3224
|
+
label: "Generators must be quiet and pre-approved by the event organiser",
|
|
3225
|
+
value: "generator_policy"
|
|
3226
|
+
},
|
|
3227
|
+
{
|
|
3228
|
+
category: "Legal & Safety",
|
|
3229
|
+
label: "Pets at the stall must be secured and well-behaved at all times",
|
|
3230
|
+
value: "pets_policy"
|
|
3231
|
+
}
|
|
3232
|
+
];
|
|
3136
3233
|
|
|
3137
3234
|
// src/formFields/auth.ts
|
|
3138
3235
|
var loginFields = [
|
|
@@ -3600,7 +3697,6 @@ export {
|
|
|
3600
3697
|
EnumNotification,
|
|
3601
3698
|
EnumPaymentMethod,
|
|
3602
3699
|
EnumRegions,
|
|
3603
|
-
EnumRejectionPolicy,
|
|
3604
3700
|
EnumRelationResource,
|
|
3605
3701
|
EnumResourceType,
|
|
3606
3702
|
EnumResourceTypeIcon,
|
|
@@ -3640,9 +3736,9 @@ export {
|
|
|
3640
3736
|
producedIngOptions,
|
|
3641
3737
|
profileFields,
|
|
3642
3738
|
registerFields,
|
|
3643
|
-
rejectionPolicyOptions,
|
|
3644
3739
|
removeTypename,
|
|
3645
3740
|
requestPasswordResetFields,
|
|
3741
|
+
requirementsOptions,
|
|
3646
3742
|
resetPasswordFields,
|
|
3647
3743
|
socialMediaFields,
|
|
3648
3744
|
sortDatesByProximity,
|