@timardex/cluemart-shared 1.0.27 → 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-DOcZmtHl.d.ts → global-BwS9p10K.d.mts} +12 -5
- package/dist/{global-BEyKhYx9.d.mts → global-lB32aPz_.d.ts} +12 -5
- package/dist/graphql/index.cjs +8 -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 +8 -2
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +63 -60
- 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 +58 -51
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +168 -75
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +12 -9
- package/dist/index.d.ts +12 -9
- package/dist/index.mjs +167 -73
- 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",
|
|
@@ -225,16 +221,23 @@ type PaymentTargetType = {
|
|
|
225
221
|
accountHolderName?: string;
|
|
226
222
|
accountNumber?: string;
|
|
227
223
|
link?: string;
|
|
224
|
+
paymentMethod: EnumPaymentMethod;
|
|
225
|
+
};
|
|
226
|
+
type Requirement = {
|
|
227
|
+
category: "Food Safety" | "Environment" | "Operations" | "Legal & Safety";
|
|
228
|
+
label: string;
|
|
229
|
+
value: string;
|
|
228
230
|
};
|
|
229
231
|
interface MarketInfoFormData {
|
|
230
232
|
_id?: string;
|
|
231
233
|
applicationDeadlineHours: number;
|
|
232
234
|
dateTime: DateTimeWithPriceType[];
|
|
233
235
|
marketId: string;
|
|
236
|
+
packInTime: number;
|
|
237
|
+
packOutTime: number;
|
|
234
238
|
paymentDueHours: number;
|
|
235
|
-
paymentMethod: EnumPaymentMethod;
|
|
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",
|
|
@@ -225,16 +221,23 @@ type PaymentTargetType = {
|
|
|
225
221
|
accountHolderName?: string;
|
|
226
222
|
accountNumber?: string;
|
|
227
223
|
link?: string;
|
|
224
|
+
paymentMethod: EnumPaymentMethod;
|
|
225
|
+
};
|
|
226
|
+
type Requirement = {
|
|
227
|
+
category: "Food Safety" | "Environment" | "Operations" | "Legal & Safety";
|
|
228
|
+
label: string;
|
|
229
|
+
value: string;
|
|
228
230
|
};
|
|
229
231
|
interface MarketInfoFormData {
|
|
230
232
|
_id?: string;
|
|
231
233
|
applicationDeadlineHours: number;
|
|
232
234
|
dateTime: DateTimeWithPriceType[];
|
|
233
235
|
marketId: string;
|
|
236
|
+
packInTime: number;
|
|
237
|
+
packOutTime: number;
|
|
234
238
|
paymentDueHours: number;
|
|
235
|
-
paymentMethod: EnumPaymentMethod;
|
|
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";
|
|
@@ -403,45 +398,53 @@ var marketSchema = globalResourceSchema.shape({
|
|
|
403
398
|
provider: yup2.string().trim().min(3).required("Provider is required"),
|
|
404
399
|
tags: yup2.array().of(yup2.string().defined()).min(1, "Tags are required").required("Tags are required")
|
|
405
400
|
});
|
|
406
|
-
var paymentTargetSchema = yup2.object(
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
)
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
});
|
|
429
|
-
} else {
|
|
430
|
-
return schema.shape({
|
|
431
|
-
accountHolderName: yup2.string().notRequired(),
|
|
432
|
-
accountNumber: yup2.string().notRequired(),
|
|
433
|
-
link: yup2.string().notRequired()
|
|
434
|
-
});
|
|
435
|
-
}
|
|
401
|
+
var paymentTargetSchema = yup2.object({
|
|
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
|
+
})
|
|
436
423
|
});
|
|
437
424
|
var marketInfoSchema = yup2.object().shape({
|
|
438
|
-
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")),
|
|
439
426
|
dateTime: yup2.array().of(dateTimeWithPriceSchema).required("DateTime is required"),
|
|
440
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"), */
|
|
441
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")),
|
|
442
|
-
paymentMethod: yup2.mixed().oneOf(Object.values(EnumPaymentMethod)).required("Please select a Payment method"),
|
|
443
447
|
paymentTarget: yup2.array().of(paymentTargetSchema).min(1, "At least one payment target is required").required("Payment target is required"),
|
|
444
|
-
rejectionPolicy: yup2.mixed().oneOf(Object.values(EnumRejectionPolicy)).required("Rejection policy is required"),
|
|
445
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"))
|
|
446
449
|
});
|
|
447
450
|
|
|
@@ -619,16 +622,13 @@ var defaultMarketInfoFormValues = {
|
|
|
619
622
|
}
|
|
620
623
|
],
|
|
621
624
|
marketId: "",
|
|
625
|
+
packInTime: 0,
|
|
626
|
+
// e.g., 2 hours before market opens
|
|
627
|
+
packOutTime: 0,
|
|
628
|
+
// e.g., 1 hour after market closes
|
|
622
629
|
paymentDueHours: 0,
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
{
|
|
626
|
-
accountHolderName: "",
|
|
627
|
-
accountNumber: "",
|
|
628
|
-
link: ""
|
|
629
|
-
}
|
|
630
|
-
],
|
|
631
|
-
rejectionPolicy: "multi_date_allowed" /* MULTI_DATE_ALLOWED */,
|
|
630
|
+
paymentTarget: [],
|
|
631
|
+
requirements: [],
|
|
632
632
|
stallCapacity: 0
|
|
633
633
|
};
|
|
634
634
|
var defaultStallholderFormValues = {
|
|
@@ -925,10 +925,11 @@ function useMarketInfoForm(data) {
|
|
|
925
925
|
applicationDeadlineHours: data.applicationDeadlineHours,
|
|
926
926
|
dateTime: data.dateTime,
|
|
927
927
|
marketId: data.marketId,
|
|
928
|
+
packInTime: data.packInTime,
|
|
929
|
+
packOutTime: data.packOutTime,
|
|
928
930
|
paymentDueHours: data.paymentDueHours,
|
|
929
|
-
paymentMethod: data.paymentMethod,
|
|
930
931
|
paymentTarget: data.paymentTarget,
|
|
931
|
-
|
|
932
|
+
requirements: data.requirements,
|
|
932
933
|
stallCapacity: data.stallCapacity
|
|
933
934
|
});
|
|
934
935
|
} else {
|
|
@@ -940,10 +941,11 @@ function useMarketInfoForm(data) {
|
|
|
940
941
|
applicationDeadlineHours,
|
|
941
942
|
dateTime,
|
|
942
943
|
marketId,
|
|
944
|
+
packInTime,
|
|
945
|
+
packOutTime,
|
|
943
946
|
paymentDueHours,
|
|
944
|
-
paymentMethod,
|
|
945
947
|
paymentTarget,
|
|
946
|
-
|
|
948
|
+
requirements,
|
|
947
949
|
stallCapacity
|
|
948
950
|
} = getValues();
|
|
949
951
|
return {
|
|
@@ -953,10 +955,11 @@ function useMarketInfoForm(data) {
|
|
|
953
955
|
applicationDeadlineHours,
|
|
954
956
|
dateTime,
|
|
955
957
|
marketId,
|
|
958
|
+
packInTime,
|
|
959
|
+
packOutTime,
|
|
956
960
|
paymentDueHours,
|
|
957
|
-
paymentMethod,
|
|
958
961
|
paymentTarget,
|
|
959
|
-
|
|
962
|
+
requirements,
|
|
960
963
|
stallCapacity
|
|
961
964
|
},
|
|
962
965
|
formState: { errors },
|
|
@@ -1600,15 +1603,21 @@ var MARKET_INFO = gql5`
|
|
|
1600
1603
|
startTime
|
|
1601
1604
|
}
|
|
1602
1605
|
marketId
|
|
1606
|
+
packInTime
|
|
1607
|
+
packOutTime
|
|
1603
1608
|
paymentDueHours
|
|
1604
|
-
paymentMethod
|
|
1605
1609
|
paymentTarget {
|
|
1606
1610
|
accountHolderName
|
|
1607
1611
|
accountNumber
|
|
1608
1612
|
link
|
|
1613
|
+
paymentMethod
|
|
1609
1614
|
}
|
|
1610
|
-
rejectionPolicy
|
|
1611
1615
|
stallCapacity
|
|
1616
|
+
requirements {
|
|
1617
|
+
category
|
|
1618
|
+
label
|
|
1619
|
+
value
|
|
1620
|
+
}
|
|
1612
1621
|
}
|
|
1613
1622
|
`;
|
|
1614
1623
|
var MARKET = gql5`
|
|
@@ -3088,22 +3097,34 @@ var tagOptions = availableTagTypes.map((tag) => ({
|
|
|
3088
3097
|
// src/formFields/market/marketInfo.ts
|
|
3089
3098
|
var marketInfo = [
|
|
3090
3099
|
{
|
|
3091
|
-
helperText: "Application Deadline
|
|
3100
|
+
helperText: "Application Deadline *",
|
|
3092
3101
|
keyboardType: "number-pad",
|
|
3093
3102
|
name: "applicationDeadlineHours",
|
|
3094
|
-
placeholder: "Application Deadline
|
|
3103
|
+
placeholder: "Application Deadline (in hours)"
|
|
3095
3104
|
},
|
|
3096
3105
|
{
|
|
3097
|
-
helperText: "Stall Capacity
|
|
3106
|
+
helperText: "Stall Capacity *",
|
|
3098
3107
|
keyboardType: "number-pad",
|
|
3099
3108
|
name: "stallCapacity",
|
|
3100
3109
|
placeholder: "Stall Capacity"
|
|
3101
3110
|
},
|
|
3102
3111
|
{
|
|
3103
|
-
helperText: "Payment Due Hours
|
|
3112
|
+
helperText: "Payment Due Hours *",
|
|
3104
3113
|
keyboardType: "number-pad",
|
|
3105
3114
|
name: "paymentDueHours",
|
|
3106
|
-
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)"
|
|
3107
3128
|
}
|
|
3108
3129
|
];
|
|
3109
3130
|
var marketInfoPaymentTarget = [
|
|
@@ -3127,14 +3148,88 @@ var marketInfoPaymentTarget = [
|
|
|
3127
3148
|
var marketPriceByDateFields = [
|
|
3128
3149
|
{
|
|
3129
3150
|
helperText: "Market Price for this date *",
|
|
3130
|
-
keyboardType: "
|
|
3151
|
+
keyboardType: "decimal-pad",
|
|
3131
3152
|
name: "marketPrice",
|
|
3132
3153
|
placeholder: "Market Price"
|
|
3133
3154
|
}
|
|
3134
3155
|
];
|
|
3135
|
-
var
|
|
3136
|
-
|
|
3137
|
-
|
|
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
|
+
];
|
|
3138
3233
|
|
|
3139
3234
|
// src/formFields/auth.ts
|
|
3140
3235
|
var loginFields = [
|
|
@@ -3602,7 +3697,6 @@ export {
|
|
|
3602
3697
|
EnumNotification,
|
|
3603
3698
|
EnumPaymentMethod,
|
|
3604
3699
|
EnumRegions,
|
|
3605
|
-
EnumRejectionPolicy,
|
|
3606
3700
|
EnumRelationResource,
|
|
3607
3701
|
EnumResourceType,
|
|
3608
3702
|
EnumResourceTypeIcon,
|
|
@@ -3642,9 +3736,9 @@ export {
|
|
|
3642
3736
|
producedIngOptions,
|
|
3643
3737
|
profileFields,
|
|
3644
3738
|
registerFields,
|
|
3645
|
-
rejectionPolicyOptions,
|
|
3646
3739
|
removeTypename,
|
|
3647
3740
|
requestPasswordResetFields,
|
|
3741
|
+
requirementsOptions,
|
|
3648
3742
|
resetPasswordFields,
|
|
3649
3743
|
socialMediaFields,
|
|
3650
3744
|
sortDatesByProximity,
|