@licklist/design 0.67.0 → 0.67.1
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/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +3 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts +2 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js +13 -11
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts +2 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +4 -2
- package/dist/product-set/control/ProductSetControl.d.ts +2 -1
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetControl.js +15 -2
- package/dist/product-set/hooks/useSortableTreeFunctions.d.ts +1 -1
- package/dist/product-set/hooks/useSortableTreeFunctions.d.ts.map +1 -1
- package/dist/product-set/hooks/useSortableTreeFunctions.js +1 -2
- package/package.json +3 -3
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +2 -0
- package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +18 -12
- package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +4 -0
- package/src/product-set/control/ProductSetControl.tsx +14 -0
- package/src/product-set/hooks/useSortableTreeFunctions.ts +0 -2
- package/yarn.lock +99 -73
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditEventForm.d.ts","sourceRoot":"","sources":["../../../../../src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,EACN,MAAM,sDAAsD,CAAC;AAM9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAGvF,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAI5E,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAS7D,OAAO,EAAiB,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAIzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAGnF,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;CACzC;AAED,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAClD,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,WAAW,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACnD,WAAW,CAAC,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACvD,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,4BAA4B,CAAC,EAAE,OAAO,CAAC;CACxC;AAOD,eAAO,MAAM,aAAa,qLAYvB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"EditEventForm.d.ts","sourceRoot":"","sources":["../../../../../src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,EACN,MAAM,sDAAsD,CAAC;AAM9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAGvF,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAI5E,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAS7D,OAAO,EAAiB,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAIzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAGnF,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;CACzC;AAED,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAClD,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,WAAW,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACnD,WAAW,CAAC,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACvD,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,4BAA4B,CAAC,EAAE,OAAO,CAAC;CACxC;AAOD,eAAO,MAAM,aAAa,qLAYvB,kBAAkB,4CAwVpB,CAAC"}
|
|
@@ -159,6 +159,7 @@ var EditEventForm = function(param) {
|
|
|
159
159
|
var visible = watch("visible");
|
|
160
160
|
var editedProductSet = watch("editedProductSet");
|
|
161
161
|
var productSetId = watch("productSetId");
|
|
162
|
+
var occurrenceStartAtDate = watch("start");
|
|
162
163
|
var _useMultipleImages = useMultipleImages(initialImages), images = _useMultipleImages.images, handleImageRemove = _useMultipleImages.handleImageRemove, handleImageUploading = _useMultipleImages.handleImageUploading, isImagesLoading = _useMultipleImages.isImagesLoading, isCoverImagesLoading = _useMultipleImages.isCoverImagesLoading;
|
|
163
164
|
var onErrorSubmit = function(submitErrors) {
|
|
164
165
|
scrollToError(getFirstErrorKey(submitErrors));
|
|
@@ -465,7 +466,8 @@ var EditEventForm = function(param) {
|
|
|
465
466
|
createProductSet: createProductSet,
|
|
466
467
|
setEditProductSetId: setEditProductSetId,
|
|
467
468
|
setShowEditProductSet: setShowEditProductSet,
|
|
468
|
-
showEditProductSet: showEditProductSet
|
|
469
|
+
showEditProductSet: showEditProductSet,
|
|
470
|
+
occurrenceStartAtDate: occurrenceStartAtDate
|
|
469
471
|
}),
|
|
470
472
|
hasPermission && !showEditProductSet && /*#__PURE__*/ jsx(Button, {
|
|
471
473
|
disabled: disabled || formState.isSubmitting || isImagesLoading || isCoverImagesLoading,
|
package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts
CHANGED
|
@@ -7,7 +7,8 @@ interface SelectEventProductSetProps extends HasPermissionProp {
|
|
|
7
7
|
setShowEditProductSet: (value: boolean) => void;
|
|
8
8
|
createProductSet: (props: EditEventFormValues) => void;
|
|
9
9
|
setEditProductSetId: (value: string) => void;
|
|
10
|
+
occurrenceStartAtDate: string;
|
|
10
11
|
}
|
|
11
|
-
export declare const SelectEventProductSet: ({ productSets, createProductSet, setEditProductSetId, showEditProductSet, setShowEditProductSet, }: SelectEventProductSetProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const SelectEventProductSet: ({ productSets, createProductSet, setEditProductSetId, showEditProductSet, setShowEditProductSet, occurrenceStartAtDate, }: SelectEventProductSetProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export {};
|
|
13
14
|
//# sourceMappingURL=SelectEventProductSet.d.ts.map
|
package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectEventProductSet.d.ts","sourceRoot":"","sources":["../../../../../src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAC;AAEzF,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAGrE,UAAU,0BAA2B,SAAQ,iBAAiB;IAC5D,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,gBAAgB,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACvD,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectEventProductSet.d.ts","sourceRoot":"","sources":["../../../../../src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAC;AAEzF,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAGrE,UAAU,0BAA2B,SAAQ,iBAAiB;IAC5D,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,gBAAgB,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACvD,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,qBAAqB,8HAO/B,0BAA0B,4CAsM5B,CAAC"}
|
package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js
CHANGED
|
@@ -132,8 +132,8 @@ function _ts_generator(thisArg, body) {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
var SelectEventProductSet = function(param) {
|
|
135
|
-
var productSets = param.productSets, createProductSet = param.createProductSet, setEditProductSetId = param.setEditProductSetId, showEditProductSet = param.showEditProductSet, setShowEditProductSet = param.setShowEditProductSet;
|
|
136
|
-
var _productSets_find;
|
|
135
|
+
var productSets = param.productSets, createProductSet = param.createProductSet, setEditProductSetId = param.setEditProductSetId, showEditProductSet = param.showEditProductSet, setShowEditProductSet = param.setShowEditProductSet, occurrenceStartAtDate = param.occurrenceStartAtDate;
|
|
136
|
+
var _productSets_find, _productSets_find1;
|
|
137
137
|
var t = useTranslation([
|
|
138
138
|
"Design"
|
|
139
139
|
]).t;
|
|
@@ -142,7 +142,7 @@ var SelectEventProductSet = function(param) {
|
|
|
142
142
|
var productSetsId = useId();
|
|
143
143
|
var productSetId = watch("productSetId");
|
|
144
144
|
var editedProductSet = watch("editedProductSet");
|
|
145
|
-
|
|
145
|
+
(_productSets_find = productSets.find(function(productSet) {
|
|
146
146
|
return productSet.id === productSetId;
|
|
147
147
|
})) === null || _productSets_find === void 0 ? void 0 : _productSets_find.parentMenuId;
|
|
148
148
|
var onEditProductSet = useCallback(function() {
|
|
@@ -206,7 +206,10 @@ var SelectEventProductSet = function(param) {
|
|
|
206
206
|
}
|
|
207
207
|
setValue("productSetId", value);
|
|
208
208
|
};
|
|
209
|
-
var showOverrideProductSet = !showEditProductSet && productSetId
|
|
209
|
+
var showOverrideProductSet = !showEditProductSet && productSetId;
|
|
210
|
+
var isOverrideProductSet = (_productSets_find1 = productSets.find(function(productSet) {
|
|
211
|
+
return productSet.id === productSetId;
|
|
212
|
+
})) === null || _productSets_find1 === void 0 ? void 0 : _productSets_find1.isOverride;
|
|
210
213
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
211
214
|
var onSubmit = function(value) {
|
|
212
215
|
setShowEditProductSet(false);
|
|
@@ -254,7 +257,7 @@ var SelectEventProductSet = function(param) {
|
|
|
254
257
|
var isCurrentEditedProductSet = editedProductSet && (editedProductSet === null || editedProductSet === void 0 ? void 0 : editedProductSet.id) === (productSet === null || productSet === void 0 ? void 0 : productSet.id);
|
|
255
258
|
return /*#__PURE__*/ jsx("option", {
|
|
256
259
|
value: productSet.id,
|
|
257
|
-
children: isCurrentEditedProductSet ||
|
|
260
|
+
children: isCurrentEditedProductSet || productSet.isOverride ? "[".concat(t("edited"), "] ").concat(isCurrentEditedProductSet ? editedProductSet === null || editedProductSet === void 0 ? void 0 : editedProductSet.name : productSet.name) : productSet.name
|
|
258
261
|
}, productSet.id);
|
|
259
262
|
})
|
|
260
263
|
]
|
|
@@ -274,7 +277,7 @@ var SelectEventProductSet = function(param) {
|
|
|
274
277
|
variant: "",
|
|
275
278
|
className: "btn product-set-button ",
|
|
276
279
|
onClick: onEditProductSet,
|
|
277
|
-
children: t("editProductSet")
|
|
280
|
+
children: isOverrideProductSet ? t("editOverrides") : t("editProductSet")
|
|
278
281
|
}),
|
|
279
282
|
showEditProductSet && /*#__PURE__*/ jsx(Button, {
|
|
280
283
|
variant: "",
|
|
@@ -303,11 +306,10 @@ var SelectEventProductSet = function(param) {
|
|
|
303
306
|
]
|
|
304
307
|
})
|
|
305
308
|
}),
|
|
306
|
-
showEditProductSet && productSetId && /*#__PURE__*/ jsx(
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
})
|
|
309
|
+
showEditProductSet && productSetId && /*#__PURE__*/ jsx(EditEventProductSet, {
|
|
310
|
+
onSubmit: onSubmit,
|
|
311
|
+
occurrenceStartAtDate: occurrenceStartAtDate,
|
|
312
|
+
defaultValues: productSetId === (editedProductSet === null || editedProductSet === void 0 ? void 0 : editedProductSet.id) && editedProductSet
|
|
311
313
|
})
|
|
312
314
|
]
|
|
313
315
|
});
|
|
@@ -8,7 +8,8 @@ export interface EventDates {
|
|
|
8
8
|
interface EditEventProductSetProps {
|
|
9
9
|
onSubmit: (value: EditEventFormValues["editedProductSet"]) => void;
|
|
10
10
|
defaultValues?: EditEventFormValues["editedProductSet"];
|
|
11
|
+
occurrenceStartAtDate: string;
|
|
11
12
|
}
|
|
12
|
-
export declare const EditEventProductSet: ({ onSubmit, defaultValues, }: EditEventProductSetProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const EditEventProductSet: ({ onSubmit, defaultValues, occurrenceStartAtDate, }: EditEventProductSetProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export {};
|
|
14
15
|
//# sourceMappingURL=EditEventProductSet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditEventProductSet.d.ts","sourceRoot":"","sources":["../../../../../../src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAG1D,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD,UAAU,wBAAwB;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;IACnE,aAAa,CAAC,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"EditEventProductSet.d.ts","sourceRoot":"","sources":["../../../../../../src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAG1D,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD,UAAU,wBAAwB;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;IACnE,aAAa,CAAC,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;IACxD,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,mBAAmB,wDAI7B,wBAAwB,4CAmH1B,CAAC"}
|
|
@@ -133,7 +133,7 @@ function _object_spread_props(target, source) {
|
|
|
133
133
|
}
|
|
134
134
|
var DEFAULT_FEE = 5;
|
|
135
135
|
var EditEventProductSet = function(param) {
|
|
136
|
-
var onSubmit = param.onSubmit, defaultValues = param.defaultValues;
|
|
136
|
+
var onSubmit = param.onSubmit, defaultValues = param.defaultValues, occurrenceStartAtDate = param.occurrenceStartAtDate;
|
|
137
137
|
var companyId = useParams().companyId;
|
|
138
138
|
var _useEventEditProductSetContext = useEventEditProductSetContext(), companies = _useEventEditProductSetContext.companies, isLoading = _useEventEditProductSetContext.isLoading, settings = _useEventEditProductSetContext.settings, smsTemplates = _useEventEditProductSetContext.smsTemplates, systemSettings = _useEventEditProductSetContext.systemSettings, productGroupsData = _useEventEditProductSetContext.productGroupsData, productSetData = _useEventEditProductSetContext.productSetData, venueMapSets = _useEventEditProductSetContext.venueMapSets, emailTemplates = _useEventEditProductSetContext.emailTemplates, fieldSetsData = _useEventEditProductSetContext.fieldSetsData;
|
|
139
139
|
var t = useTranslation("Design").t;
|
|
@@ -213,7 +213,9 @@ var EditEventProductSet = function(param) {
|
|
|
213
213
|
companyName: selectedCompany === null || selectedCompany === void 0 ? void 0 : selectedCompany.title,
|
|
214
214
|
fee: feeInPercent,
|
|
215
215
|
isEventEditProductSet: true,
|
|
216
|
-
isOverrides: true
|
|
216
|
+
isOverrides: true,
|
|
217
|
+
occurrenceStartAtDate: occurrenceStartAtDate,
|
|
218
|
+
workHours: undefined
|
|
217
219
|
}),
|
|
218
220
|
/*#__PURE__*/ jsx(Button, {
|
|
219
221
|
disabled: isLoading,
|
|
@@ -44,7 +44,8 @@ export interface ProductSetControlProps {
|
|
|
44
44
|
workHours?: WorkHour[];
|
|
45
45
|
providerHasBookingManagement?: boolean;
|
|
46
46
|
isOverrides?: boolean;
|
|
47
|
+
occurrenceStartAtDate?: string;
|
|
47
48
|
isCreateNewOverrides?: boolean;
|
|
48
49
|
}
|
|
49
|
-
export declare function ProductSetControl({ companyName, isLoading, fee, fieldSets, emailTemplates, smsTemplates, isEventEditProductSet, isCreateAction, showEmailTemplate, showSmsTemplate, workHours, providerHasBookingManagement, isOverrides, isCreateNewOverrides, }: ProductSetControlProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export declare function ProductSetControl({ companyName, isLoading, fee, fieldSets, emailTemplates, smsTemplates, isEventEditProductSet, isCreateAction, showEmailTemplate, showSmsTemplate, workHours, providerHasBookingManagement, isOverrides, occurrenceStartAtDate, isCreateNewOverrides, }: ProductSetControlProps): import("react/jsx-runtime").JSX.Element;
|
|
50
51
|
//# sourceMappingURL=ProductSetControl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductSetControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/ProductSetControl.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductSetControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/ProductSetControl.tsx"],"names":[],"mappings":"AAMA,OAAO,EAOL,mBAAmB,EACnB,cAAc,EAEd,gBAAgB,EACjB,MAAM,6DAA6D,CAAC;AAGrE,OAAO,EAAE,QAAQ,EAAE,MAAM,yDAAyD,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,mEAAmE,CAAC;AAGhG,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAIL,4BAA4B,EAC7B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAgBhC,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,aAAa,GAAG,WAAW,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAwB,SAAQ,4BAA4B;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,mBAAmB,CAAC;IACrC,aAAa,CAAC,EAAE,UAAU,EAAE,CAAC;IAC7B,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,SAAS,EACT,GAAU,EACV,SAAc,EACd,cAAmB,EACnB,YAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,4BAAoC,EACpC,WAAmB,EACnB,qBAAqB,EACrB,oBAA4B,GAC7B,EAAE,sBAAsB,2CAmUxB"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { useEffect } from 'react';
|
|
2
3
|
import { Row, Col, Form } from 'react-bootstrap';
|
|
3
4
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
4
5
|
import { useTranslation } from 'react-i18next';
|
|
5
6
|
import clsx from 'clsx';
|
|
7
|
+
import { DateTime } from 'luxon';
|
|
6
8
|
import { OPERATIONAL_COST_PROVIDER, OPERATIONAL_COST_CUSTOMER, RELY_ON_PEOPLE_PRODUCT_CAPACITY_QUANTITY, RELY_ON_PEOPLE_PRODUCT_QUANTITY, RELY_ON_PEOPLE_QUANTITY, OPERATIONAL_COST_TYPES, RELY_ON_PEOPLE_TYPES } from '@licklist/core/dist/DataMapper/Product/ProductSetDataMapper';
|
|
9
|
+
import { DATE_MONTH_LOCALE_FORMAT } from '@licklist/core/dist/Config';
|
|
7
10
|
import { useId } from '@react-aria/utils';
|
|
8
11
|
import HookFormService from '@licklist/plugins/dist/services/Form/HookFormService';
|
|
9
12
|
import { ruleForUrlWithProtocol } from '@licklist/plugins/dist/validation/Rules/urlRule';
|
|
@@ -73,15 +76,16 @@ var OPERATIONAL_COST_TITLES = (_obj = {}, _define_property(_obj, OPERATIONAL_COS
|
|
|
73
76
|
var _obj1;
|
|
74
77
|
var RELY_ON_PEOPLE_TYPE_TITLES = (_obj1 = {}, _define_property(_obj1, RELY_ON_PEOPLE_PRODUCT_CAPACITY_QUANTITY, "peopleProductCapacityQuantity"), _define_property(_obj1, RELY_ON_PEOPLE_PRODUCT_QUANTITY, "peopleProductQuantity"), _define_property(_obj1, RELY_ON_PEOPLE_QUANTITY, "peopleQuantity"), _obj1);
|
|
75
78
|
function ProductSetControl(param) {
|
|
76
|
-
var companyName = param.companyName, isLoading = param.isLoading, _param_fee = param.fee, fee = _param_fee === void 0 ? "5%" : _param_fee, _param_fieldSets = param.fieldSets, fieldSets = _param_fieldSets === void 0 ? [] : _param_fieldSets, _param_emailTemplates = param.emailTemplates, emailTemplates = _param_emailTemplates === void 0 ? [] : _param_emailTemplates, _param_smsTemplates = param.smsTemplates, smsTemplates = _param_smsTemplates === void 0 ? [] : _param_smsTemplates, isEventEditProductSet = param.isEventEditProductSet, isCreateAction = param.isCreateAction, showEmailTemplate = param.showEmailTemplate, showSmsTemplate = param.showSmsTemplate, workHours = param.workHours, _param_providerHasBookingManagement = param.providerHasBookingManagement, providerHasBookingManagement = _param_providerHasBookingManagement === void 0 ? false : _param_providerHasBookingManagement, _param_isOverrides = param.isOverrides, isOverrides = _param_isOverrides === void 0 ? false : _param_isOverrides, _param_isCreateNewOverrides = param.isCreateNewOverrides, isCreateNewOverrides = _param_isCreateNewOverrides === void 0 ? false : _param_isCreateNewOverrides;
|
|
79
|
+
var companyName = param.companyName, isLoading = param.isLoading, _param_fee = param.fee, fee = _param_fee === void 0 ? "5%" : _param_fee, _param_fieldSets = param.fieldSets, fieldSets = _param_fieldSets === void 0 ? [] : _param_fieldSets, _param_emailTemplates = param.emailTemplates, emailTemplates = _param_emailTemplates === void 0 ? [] : _param_emailTemplates, _param_smsTemplates = param.smsTemplates, smsTemplates = _param_smsTemplates === void 0 ? [] : _param_smsTemplates, isEventEditProductSet = param.isEventEditProductSet, isCreateAction = param.isCreateAction, showEmailTemplate = param.showEmailTemplate, showSmsTemplate = param.showSmsTemplate, workHours = param.workHours, _param_providerHasBookingManagement = param.providerHasBookingManagement, providerHasBookingManagement = _param_providerHasBookingManagement === void 0 ? false : _param_providerHasBookingManagement, _param_isOverrides = param.isOverrides, isOverrides = _param_isOverrides === void 0 ? false : _param_isOverrides, occurrenceStartAtDate = param.occurrenceStartAtDate, _param_isCreateNewOverrides = param.isCreateNewOverrides, isCreateNewOverrides = _param_isCreateNewOverrides === void 0 ? false : _param_isCreateNewOverrides;
|
|
77
80
|
var _errors_name;
|
|
78
81
|
var t = useTranslation([
|
|
79
82
|
"Design",
|
|
80
83
|
"Validation",
|
|
81
84
|
"Notification"
|
|
82
85
|
]).t;
|
|
83
|
-
var _useFormContext = useFormContext(), register = _useFormContext.register, control = _useFormContext.control, errors = _useFormContext.formState.errors, watch = _useFormContext.watch, setError = _useFormContext.setError, clearErrors = _useFormContext.clearErrors;
|
|
86
|
+
var _useFormContext = useFormContext(), register = _useFormContext.register, control = _useFormContext.control, errors = _useFormContext.formState.errors, watch = _useFormContext.watch, setError = _useFormContext.setError, setValue = _useFormContext.setValue, clearErrors = _useFormContext.clearErrors;
|
|
84
87
|
var steps = watch("steps");
|
|
88
|
+
var productSetName = watch("name");
|
|
85
89
|
var nameId = useId();
|
|
86
90
|
var termsAndConditionsId = useId();
|
|
87
91
|
var relyOnPeopleTypeId = useId();
|
|
@@ -94,6 +98,15 @@ function ProductSetControl(param) {
|
|
|
94
98
|
return checkIfZoneCategory(category === null || category === void 0 ? void 0 : category.type);
|
|
95
99
|
});
|
|
96
100
|
});
|
|
101
|
+
useEffect(function() {
|
|
102
|
+
if (!occurrenceStartAtDate) return;
|
|
103
|
+
var eventStartDate = DateTime.fromISO(occurrenceStartAtDate);
|
|
104
|
+
var eventStart = eventStartDate.toFormat(DATE_MONTH_LOCALE_FORMAT);
|
|
105
|
+
setValue("name", "".concat(productSetName, " (").concat(eventStart, ")"));
|
|
106
|
+
}, [
|
|
107
|
+
setValue,
|
|
108
|
+
occurrenceStartAtDate
|
|
109
|
+
]);
|
|
97
110
|
return /*#__PURE__*/ jsxs(Row, {
|
|
98
111
|
className: "product-set-form ".concat(isEventEditProductSet && "event-edit-product-set"),
|
|
99
112
|
children: [
|
|
@@ -3,7 +3,7 @@ interface useSortableTreeFunctionsProps {
|
|
|
3
3
|
remove: (index?: number | number[]) => void;
|
|
4
4
|
isOverrides?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export declare const useSortableTreeFunctions: ({ fieldName, remove,
|
|
6
|
+
export declare const useSortableTreeFunctions: ({ fieldName, remove, }: useSortableTreeFunctionsProps) => {
|
|
7
7
|
edit: (index: number) => void;
|
|
8
8
|
cancelChanges: (index: number) => void;
|
|
9
9
|
saveValidField: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSortableTreeFunctions.d.ts","sourceRoot":"","sources":["../../../src/product-set/hooks/useSortableTreeFunctions.ts"],"names":[],"mappings":"AAGA,UAAU,6BAA6B;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AACD,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"useSortableTreeFunctions.d.ts","sourceRoot":"","sources":["../../../src/product-set/hooks/useSortableTreeFunctions.ts"],"names":[],"mappings":"AAGA,UAAU,6BAA6B;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AACD,eAAO,MAAM,wBAAwB,2BAGlC,6BAA6B;kBAIT,MAAM;2BAMG,MAAM;;CAkBrC,CAAC"}
|
|
@@ -48,11 +48,10 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
48
48
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
49
49
|
}
|
|
50
50
|
var useSortableTreeFunctions = function(param) {
|
|
51
|
-
var fieldName = param.fieldName, remove = param.remove
|
|
51
|
+
var fieldName = param.fieldName, remove = param.remove;
|
|
52
52
|
var _useFormContext = useFormContext(), getValues = _useFormContext.getValues, setValue = _useFormContext.setValue;
|
|
53
53
|
var _useState = _sliced_to_array(useState(null), 2), previousValue = _useState[0], setEditValue = _useState[1];
|
|
54
54
|
var edit = function(index) {
|
|
55
|
-
if (isOverrides) return;
|
|
56
55
|
var currentCategoryProduct = getValues("".concat(fieldName, ".").concat(index));
|
|
57
56
|
var cloneCategoryProduct = structuredClone(currentCategoryProduct);
|
|
58
57
|
setEditValue(cloneCategoryProduct);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.67.
|
|
3
|
+
"version": "0.67.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@licklist/core": "0.29.
|
|
45
|
+
"@licklist/core": "0.29.1",
|
|
46
46
|
"@licklist/eslint-config": "0.5.5",
|
|
47
47
|
"@licklist/plugins": "0.32.0",
|
|
48
48
|
"lodash": "4.17.21",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@fortawesome/fontawesome-svg-core": "1.2.34",
|
|
63
63
|
"@fortawesome/free-solid-svg-icons": "5.15.2",
|
|
64
64
|
"@fortawesome/react-fontawesome": "0.1.9",
|
|
65
|
-
"@licklist/core": "0.29.
|
|
65
|
+
"@licklist/core": "0.29.1",
|
|
66
66
|
"@licklist/eslint-config": "0.5.5",
|
|
67
67
|
"@licklist/plugins": "0.32.0",
|
|
68
68
|
"@mdx-js/react": "1.6.22",
|
|
@@ -122,6 +122,7 @@ export const EditEventForm = ({
|
|
|
122
122
|
const visible = watch("visible");
|
|
123
123
|
const editedProductSet = watch("editedProductSet");
|
|
124
124
|
const productSetId = watch("productSetId");
|
|
125
|
+
const occurrenceStartAtDate = watch("start");
|
|
125
126
|
|
|
126
127
|
const {
|
|
127
128
|
images,
|
|
@@ -403,6 +404,7 @@ export const EditEventForm = ({
|
|
|
403
404
|
setEditProductSetId={setEditProductSetId}
|
|
404
405
|
setShowEditProductSet={setShowEditProductSet}
|
|
405
406
|
showEditProductSet={showEditProductSet}
|
|
407
|
+
occurrenceStartAtDate={occurrenceStartAtDate}
|
|
406
408
|
/>
|
|
407
409
|
|
|
408
410
|
{hasPermission && !showEditProductSet && (
|
package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx
CHANGED
|
@@ -15,6 +15,7 @@ interface SelectEventProductSetProps extends HasPermissionProp {
|
|
|
15
15
|
setShowEditProductSet: (value: boolean) => void;
|
|
16
16
|
createProductSet: (props: EditEventFormValues) => void;
|
|
17
17
|
setEditProductSetId: (value: string) => void;
|
|
18
|
+
occurrenceStartAtDate: string;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
export const SelectEventProductSet = ({
|
|
@@ -23,6 +24,7 @@ export const SelectEventProductSet = ({
|
|
|
23
24
|
setEditProductSetId,
|
|
24
25
|
showEditProductSet,
|
|
25
26
|
setShowEditProductSet,
|
|
27
|
+
occurrenceStartAtDate,
|
|
26
28
|
}: SelectEventProductSetProps) => {
|
|
27
29
|
const { t } = useTranslation(["Design"]);
|
|
28
30
|
const form = useFormContext<EditEventFormValues>();
|
|
@@ -88,8 +90,11 @@ export const SelectEventProductSet = ({
|
|
|
88
90
|
setValue("productSetId", value);
|
|
89
91
|
};
|
|
90
92
|
|
|
91
|
-
const showOverrideProductSet =
|
|
92
|
-
|
|
93
|
+
const showOverrideProductSet = !showEditProductSet && productSetId;
|
|
94
|
+
|
|
95
|
+
const isOverrideProductSet = productSets.find(
|
|
96
|
+
(productSet) => productSet.id === productSetId,
|
|
97
|
+
)?.isOverride;
|
|
93
98
|
|
|
94
99
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
95
100
|
const onSubmit = (value: EditEventFormValues["editedProductSet"]) => {
|
|
@@ -141,7 +146,7 @@ export const SelectEventProductSet = ({
|
|
|
141
146
|
value={productSet.id}
|
|
142
147
|
>
|
|
143
148
|
{isCurrentEditedProductSet ||
|
|
144
|
-
productSet
|
|
149
|
+
productSet.isOverride
|
|
145
150
|
? `[${t("edited")}] ${
|
|
146
151
|
isCurrentEditedProductSet
|
|
147
152
|
? editedProductSet?.name
|
|
@@ -172,7 +177,9 @@ export const SelectEventProductSet = ({
|
|
|
172
177
|
className="btn product-set-button "
|
|
173
178
|
onClick={onEditProductSet}
|
|
174
179
|
>
|
|
175
|
-
{
|
|
180
|
+
{isOverrideProductSet
|
|
181
|
+
? t("editOverrides")
|
|
182
|
+
: t("editProductSet")}
|
|
176
183
|
</Button>
|
|
177
184
|
)}
|
|
178
185
|
{showEditProductSet && (
|
|
@@ -206,14 +213,13 @@ export const SelectEventProductSet = ({
|
|
|
206
213
|
</Form.Group>
|
|
207
214
|
</div>
|
|
208
215
|
{showEditProductSet && productSetId && (
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
</>
|
|
216
|
+
<EditEventProductSet
|
|
217
|
+
onSubmit={onSubmit}
|
|
218
|
+
occurrenceStartAtDate={occurrenceStartAtDate}
|
|
219
|
+
defaultValues={
|
|
220
|
+
productSetId === editedProductSet?.id && editedProductSet
|
|
221
|
+
}
|
|
222
|
+
/>
|
|
217
223
|
)}
|
|
218
224
|
</>
|
|
219
225
|
);
|
|
@@ -22,11 +22,13 @@ export interface EventDates {
|
|
|
22
22
|
interface EditEventProductSetProps {
|
|
23
23
|
onSubmit: (value: EditEventFormValues["editedProductSet"]) => void;
|
|
24
24
|
defaultValues?: EditEventFormValues["editedProductSet"];
|
|
25
|
+
occurrenceStartAtDate: string;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
export const EditEventProductSet = ({
|
|
28
29
|
onSubmit,
|
|
29
30
|
defaultValues,
|
|
31
|
+
occurrenceStartAtDate,
|
|
30
32
|
}: EditEventProductSetProps) => {
|
|
31
33
|
const { companyId } = useParams<{
|
|
32
34
|
companyId: string;
|
|
@@ -125,6 +127,8 @@ export const EditEventProductSet = ({
|
|
|
125
127
|
fee={feeInPercent}
|
|
126
128
|
isEventEditProductSet
|
|
127
129
|
isOverrides
|
|
130
|
+
occurrenceStartAtDate={occurrenceStartAtDate}
|
|
131
|
+
workHours={undefined}
|
|
128
132
|
/>
|
|
129
133
|
<Button
|
|
130
134
|
disabled={isLoading}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
1
2
|
import { Col, Form, Row } from "react-bootstrap";
|
|
2
3
|
import { Controller, useFormContext } from "react-hook-form";
|
|
3
4
|
import { useTranslation } from "react-i18next";
|
|
4
5
|
import clsx from "clsx";
|
|
6
|
+
import { DateTime } from "luxon";
|
|
5
7
|
import {
|
|
6
8
|
OPERATIONAL_COST_CUSTOMER,
|
|
7
9
|
OPERATIONAL_COST_PROVIDER,
|
|
@@ -14,6 +16,7 @@ import {
|
|
|
14
16
|
RELY_ON_PEOPLE_TYPES,
|
|
15
17
|
RelyOnPeopleType,
|
|
16
18
|
} from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
|
|
19
|
+
import { DATE_MONTH_LOCALE_FORMAT } from "@licklist/core/dist/Config";
|
|
17
20
|
import { useId } from "@react-aria/utils";
|
|
18
21
|
import { FieldSet } from "@licklist/core/dist/DataMapper/Order/FieldSetDataMapper";
|
|
19
22
|
import { EmailTemplate } from "@licklist/core/dist/DataMapper/Notification/EmailTemplateDataMapper";
|
|
@@ -88,6 +91,7 @@ export interface ProductSetControlProps {
|
|
|
88
91
|
workHours?: WorkHour[];
|
|
89
92
|
providerHasBookingManagement?: boolean;
|
|
90
93
|
isOverrides?: boolean;
|
|
94
|
+
occurrenceStartAtDate?: string;
|
|
91
95
|
isCreateNewOverrides?: boolean;
|
|
92
96
|
}
|
|
93
97
|
|
|
@@ -105,6 +109,7 @@ export function ProductSetControl({
|
|
|
105
109
|
workHours,
|
|
106
110
|
providerHasBookingManagement = false,
|
|
107
111
|
isOverrides = false,
|
|
112
|
+
occurrenceStartAtDate,
|
|
108
113
|
isCreateNewOverrides = false,
|
|
109
114
|
}: ProductSetControlProps) {
|
|
110
115
|
const { t } = useTranslation(["Design", "Validation", "Notification"]);
|
|
@@ -114,10 +119,12 @@ export function ProductSetControl({
|
|
|
114
119
|
formState: { errors },
|
|
115
120
|
watch,
|
|
116
121
|
setError,
|
|
122
|
+
setValue,
|
|
117
123
|
clearErrors,
|
|
118
124
|
} = useFormContext<ProductSetControlValues>();
|
|
119
125
|
|
|
120
126
|
const steps = watch("steps");
|
|
127
|
+
const productSetName = watch("name");
|
|
121
128
|
|
|
122
129
|
const nameId = useId();
|
|
123
130
|
const termsAndConditionsId = useId();
|
|
@@ -131,6 +138,13 @@ export function ProductSetControl({
|
|
|
131
138
|
productCategories?.some((category) => checkIfZoneCategory(category?.type)),
|
|
132
139
|
);
|
|
133
140
|
|
|
141
|
+
useEffect(() => {
|
|
142
|
+
if (!occurrenceStartAtDate) return;
|
|
143
|
+
const eventStartDate = DateTime.fromISO(occurrenceStartAtDate);
|
|
144
|
+
const eventStart = eventStartDate.toFormat(DATE_MONTH_LOCALE_FORMAT);
|
|
145
|
+
setValue("name", `${productSetName} (${eventStart})`);
|
|
146
|
+
}, [setValue, occurrenceStartAtDate]);
|
|
147
|
+
|
|
134
148
|
return (
|
|
135
149
|
<Row
|
|
136
150
|
className={`product-set-form ${
|
|
@@ -9,13 +9,11 @@ interface useSortableTreeFunctionsProps {
|
|
|
9
9
|
export const useSortableTreeFunctions = ({
|
|
10
10
|
fieldName,
|
|
11
11
|
remove,
|
|
12
|
-
isOverrides,
|
|
13
12
|
}: useSortableTreeFunctionsProps) => {
|
|
14
13
|
const { getValues, setValue } = useFormContext();
|
|
15
14
|
const [previousValue, setEditValue] = useState(null);
|
|
16
15
|
|
|
17
16
|
const edit = (index: number) => {
|
|
18
|
-
if (isOverrides) return;
|
|
19
17
|
const currentCategoryProduct = getValues(`${fieldName}.${index}` as const);
|
|
20
18
|
const cloneCategoryProduct = structuredClone(currentCategoryProduct);
|
|
21
19
|
setEditValue(cloneCategoryProduct);
|
package/yarn.lock
CHANGED
|
@@ -2599,6 +2599,32 @@ __metadata:
|
|
|
2599
2599
|
languageName: node
|
|
2600
2600
|
linkType: hard
|
|
2601
2601
|
|
|
2602
|
+
"@licklist/core@npm:0.29.1":
|
|
2603
|
+
version: 0.29.1
|
|
2604
|
+
resolution: "@licklist/core@npm:0.29.1"
|
|
2605
|
+
dependencies:
|
|
2606
|
+
"@sentry/browser": "npm:6.2.0"
|
|
2607
|
+
axios: "npm:0.26.0"
|
|
2608
|
+
i18next: "npm:19.4.5"
|
|
2609
|
+
luxon: "npm:1.26.0"
|
|
2610
|
+
react: "npm:17.0.2"
|
|
2611
|
+
react-dom: "npm:17.0.2"
|
|
2612
|
+
react-i18next: "npm:11.8.8"
|
|
2613
|
+
react-intl: "npm:6.6.8"
|
|
2614
|
+
uuid: "npm:9.0.0"
|
|
2615
|
+
wait-for-expect: "npm:3.0.2"
|
|
2616
|
+
peerDependencies:
|
|
2617
|
+
"@licklist/eslint-config": 0.5.5
|
|
2618
|
+
axios: 0.26.0
|
|
2619
|
+
luxon: 1.26.0
|
|
2620
|
+
react: 17.0.2
|
|
2621
|
+
react-dom: 17.0.2
|
|
2622
|
+
react-i18next: 11.8.8
|
|
2623
|
+
react-intl: 6.6.8
|
|
2624
|
+
checksum: 10c0/90bfe0a2c1c6b57e4900b59827252bc7e1745d67f659ae7b2ccb4a323f142f2296864bc8025f864c9106cabc3a1893c9b88753706558997bb7305e57fa886868
|
|
2625
|
+
languageName: node
|
|
2626
|
+
linkType: hard
|
|
2627
|
+
|
|
2602
2628
|
"@licklist/design@workspace:.":
|
|
2603
2629
|
version: 0.0.0-use.local
|
|
2604
2630
|
resolution: "@licklist/design@workspace:."
|
|
@@ -2611,7 +2637,7 @@ __metadata:
|
|
|
2611
2637
|
"@fortawesome/fontawesome-svg-core": "npm:1.2.34"
|
|
2612
2638
|
"@fortawesome/free-solid-svg-icons": "npm:5.15.2"
|
|
2613
2639
|
"@fortawesome/react-fontawesome": "npm:0.1.9"
|
|
2614
|
-
"@licklist/core": "npm:0.29.
|
|
2640
|
+
"@licklist/core": "npm:0.29.1"
|
|
2615
2641
|
"@licklist/eslint-config": "npm:0.5.5"
|
|
2616
2642
|
"@licklist/plugins": "npm:0.32.0"
|
|
2617
2643
|
"@mdx-js/react": "npm:1.6.22"
|
|
@@ -2735,7 +2761,7 @@ __metadata:
|
|
|
2735
2761
|
vite-plugin-svgr: "npm:4.2.0"
|
|
2736
2762
|
vite-tsconfig-paths: "npm:5.0.1"
|
|
2737
2763
|
peerDependencies:
|
|
2738
|
-
"@licklist/core": 0.29.
|
|
2764
|
+
"@licklist/core": 0.29.1
|
|
2739
2765
|
"@licklist/eslint-config": 0.5.5
|
|
2740
2766
|
"@licklist/plugins": 0.32.0
|
|
2741
2767
|
lodash: 4.17.21
|
|
@@ -3213,114 +3239,114 @@ __metadata:
|
|
|
3213
3239
|
languageName: node
|
|
3214
3240
|
linkType: hard
|
|
3215
3241
|
|
|
3216
|
-
"@rollup/rollup-android-arm-eabi@npm:4.
|
|
3217
|
-
version: 4.
|
|
3218
|
-
resolution: "@rollup/rollup-android-arm-eabi@npm:4.
|
|
3242
|
+
"@rollup/rollup-android-arm-eabi@npm:4.22.0":
|
|
3243
|
+
version: 4.22.0
|
|
3244
|
+
resolution: "@rollup/rollup-android-arm-eabi@npm:4.22.0"
|
|
3219
3245
|
conditions: os=android & cpu=arm
|
|
3220
3246
|
languageName: node
|
|
3221
3247
|
linkType: hard
|
|
3222
3248
|
|
|
3223
|
-
"@rollup/rollup-android-arm64@npm:4.
|
|
3224
|
-
version: 4.
|
|
3225
|
-
resolution: "@rollup/rollup-android-arm64@npm:4.
|
|
3249
|
+
"@rollup/rollup-android-arm64@npm:4.22.0":
|
|
3250
|
+
version: 4.22.0
|
|
3251
|
+
resolution: "@rollup/rollup-android-arm64@npm:4.22.0"
|
|
3226
3252
|
conditions: os=android & cpu=arm64
|
|
3227
3253
|
languageName: node
|
|
3228
3254
|
linkType: hard
|
|
3229
3255
|
|
|
3230
|
-
"@rollup/rollup-darwin-arm64@npm:4.
|
|
3231
|
-
version: 4.
|
|
3232
|
-
resolution: "@rollup/rollup-darwin-arm64@npm:4.
|
|
3256
|
+
"@rollup/rollup-darwin-arm64@npm:4.22.0":
|
|
3257
|
+
version: 4.22.0
|
|
3258
|
+
resolution: "@rollup/rollup-darwin-arm64@npm:4.22.0"
|
|
3233
3259
|
conditions: os=darwin & cpu=arm64
|
|
3234
3260
|
languageName: node
|
|
3235
3261
|
linkType: hard
|
|
3236
3262
|
|
|
3237
|
-
"@rollup/rollup-darwin-x64@npm:4.
|
|
3238
|
-
version: 4.
|
|
3239
|
-
resolution: "@rollup/rollup-darwin-x64@npm:4.
|
|
3263
|
+
"@rollup/rollup-darwin-x64@npm:4.22.0":
|
|
3264
|
+
version: 4.22.0
|
|
3265
|
+
resolution: "@rollup/rollup-darwin-x64@npm:4.22.0"
|
|
3240
3266
|
conditions: os=darwin & cpu=x64
|
|
3241
3267
|
languageName: node
|
|
3242
3268
|
linkType: hard
|
|
3243
3269
|
|
|
3244
|
-
"@rollup/rollup-linux-arm-gnueabihf@npm:4.
|
|
3245
|
-
version: 4.
|
|
3246
|
-
resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.
|
|
3270
|
+
"@rollup/rollup-linux-arm-gnueabihf@npm:4.22.0":
|
|
3271
|
+
version: 4.22.0
|
|
3272
|
+
resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.22.0"
|
|
3247
3273
|
conditions: os=linux & cpu=arm & libc=glibc
|
|
3248
3274
|
languageName: node
|
|
3249
3275
|
linkType: hard
|
|
3250
3276
|
|
|
3251
|
-
"@rollup/rollup-linux-arm-musleabihf@npm:4.
|
|
3252
|
-
version: 4.
|
|
3253
|
-
resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.
|
|
3277
|
+
"@rollup/rollup-linux-arm-musleabihf@npm:4.22.0":
|
|
3278
|
+
version: 4.22.0
|
|
3279
|
+
resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.22.0"
|
|
3254
3280
|
conditions: os=linux & cpu=arm & libc=musl
|
|
3255
3281
|
languageName: node
|
|
3256
3282
|
linkType: hard
|
|
3257
3283
|
|
|
3258
|
-
"@rollup/rollup-linux-arm64-gnu@npm:4.
|
|
3259
|
-
version: 4.
|
|
3260
|
-
resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.
|
|
3284
|
+
"@rollup/rollup-linux-arm64-gnu@npm:4.22.0":
|
|
3285
|
+
version: 4.22.0
|
|
3286
|
+
resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.22.0"
|
|
3261
3287
|
conditions: os=linux & cpu=arm64 & libc=glibc
|
|
3262
3288
|
languageName: node
|
|
3263
3289
|
linkType: hard
|
|
3264
3290
|
|
|
3265
|
-
"@rollup/rollup-linux-arm64-musl@npm:4.
|
|
3266
|
-
version: 4.
|
|
3267
|
-
resolution: "@rollup/rollup-linux-arm64-musl@npm:4.
|
|
3291
|
+
"@rollup/rollup-linux-arm64-musl@npm:4.22.0":
|
|
3292
|
+
version: 4.22.0
|
|
3293
|
+
resolution: "@rollup/rollup-linux-arm64-musl@npm:4.22.0"
|
|
3268
3294
|
conditions: os=linux & cpu=arm64 & libc=musl
|
|
3269
3295
|
languageName: node
|
|
3270
3296
|
linkType: hard
|
|
3271
3297
|
|
|
3272
|
-
"@rollup/rollup-linux-powerpc64le-gnu@npm:4.
|
|
3273
|
-
version: 4.
|
|
3274
|
-
resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.
|
|
3298
|
+
"@rollup/rollup-linux-powerpc64le-gnu@npm:4.22.0":
|
|
3299
|
+
version: 4.22.0
|
|
3300
|
+
resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.22.0"
|
|
3275
3301
|
conditions: os=linux & cpu=ppc64 & libc=glibc
|
|
3276
3302
|
languageName: node
|
|
3277
3303
|
linkType: hard
|
|
3278
3304
|
|
|
3279
|
-
"@rollup/rollup-linux-riscv64-gnu@npm:4.
|
|
3280
|
-
version: 4.
|
|
3281
|
-
resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.
|
|
3305
|
+
"@rollup/rollup-linux-riscv64-gnu@npm:4.22.0":
|
|
3306
|
+
version: 4.22.0
|
|
3307
|
+
resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.22.0"
|
|
3282
3308
|
conditions: os=linux & cpu=riscv64 & libc=glibc
|
|
3283
3309
|
languageName: node
|
|
3284
3310
|
linkType: hard
|
|
3285
3311
|
|
|
3286
|
-
"@rollup/rollup-linux-s390x-gnu@npm:4.
|
|
3287
|
-
version: 4.
|
|
3288
|
-
resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.
|
|
3312
|
+
"@rollup/rollup-linux-s390x-gnu@npm:4.22.0":
|
|
3313
|
+
version: 4.22.0
|
|
3314
|
+
resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.22.0"
|
|
3289
3315
|
conditions: os=linux & cpu=s390x & libc=glibc
|
|
3290
3316
|
languageName: node
|
|
3291
3317
|
linkType: hard
|
|
3292
3318
|
|
|
3293
|
-
"@rollup/rollup-linux-x64-gnu@npm:4.
|
|
3294
|
-
version: 4.
|
|
3295
|
-
resolution: "@rollup/rollup-linux-x64-gnu@npm:4.
|
|
3319
|
+
"@rollup/rollup-linux-x64-gnu@npm:4.22.0":
|
|
3320
|
+
version: 4.22.0
|
|
3321
|
+
resolution: "@rollup/rollup-linux-x64-gnu@npm:4.22.0"
|
|
3296
3322
|
conditions: os=linux & cpu=x64 & libc=glibc
|
|
3297
3323
|
languageName: node
|
|
3298
3324
|
linkType: hard
|
|
3299
3325
|
|
|
3300
|
-
"@rollup/rollup-linux-x64-musl@npm:4.
|
|
3301
|
-
version: 4.
|
|
3302
|
-
resolution: "@rollup/rollup-linux-x64-musl@npm:4.
|
|
3326
|
+
"@rollup/rollup-linux-x64-musl@npm:4.22.0":
|
|
3327
|
+
version: 4.22.0
|
|
3328
|
+
resolution: "@rollup/rollup-linux-x64-musl@npm:4.22.0"
|
|
3303
3329
|
conditions: os=linux & cpu=x64 & libc=musl
|
|
3304
3330
|
languageName: node
|
|
3305
3331
|
linkType: hard
|
|
3306
3332
|
|
|
3307
|
-
"@rollup/rollup-win32-arm64-msvc@npm:4.
|
|
3308
|
-
version: 4.
|
|
3309
|
-
resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.
|
|
3333
|
+
"@rollup/rollup-win32-arm64-msvc@npm:4.22.0":
|
|
3334
|
+
version: 4.22.0
|
|
3335
|
+
resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.22.0"
|
|
3310
3336
|
conditions: os=win32 & cpu=arm64
|
|
3311
3337
|
languageName: node
|
|
3312
3338
|
linkType: hard
|
|
3313
3339
|
|
|
3314
|
-
"@rollup/rollup-win32-ia32-msvc@npm:4.
|
|
3315
|
-
version: 4.
|
|
3316
|
-
resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.
|
|
3340
|
+
"@rollup/rollup-win32-ia32-msvc@npm:4.22.0":
|
|
3341
|
+
version: 4.22.0
|
|
3342
|
+
resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.22.0"
|
|
3317
3343
|
conditions: os=win32 & cpu=ia32
|
|
3318
3344
|
languageName: node
|
|
3319
3345
|
linkType: hard
|
|
3320
3346
|
|
|
3321
|
-
"@rollup/rollup-win32-x64-msvc@npm:4.
|
|
3322
|
-
version: 4.
|
|
3323
|
-
resolution: "@rollup/rollup-win32-x64-msvc@npm:4.
|
|
3347
|
+
"@rollup/rollup-win32-x64-msvc@npm:4.22.0":
|
|
3348
|
+
version: 4.22.0
|
|
3349
|
+
resolution: "@rollup/rollup-win32-x64-msvc@npm:4.22.0"
|
|
3324
3350
|
conditions: os=win32 & cpu=x64
|
|
3325
3351
|
languageName: node
|
|
3326
3352
|
linkType: hard
|
|
@@ -7899,9 +7925,9 @@ __metadata:
|
|
|
7899
7925
|
linkType: hard
|
|
7900
7926
|
|
|
7901
7927
|
"caniuse-lite@npm:^1.0.30001109, caniuse-lite@npm:^1.0.30001125, caniuse-lite@npm:^1.0.30001646":
|
|
7902
|
-
version: 1.0.
|
|
7903
|
-
resolution: "caniuse-lite@npm:1.0.
|
|
7904
|
-
checksum: 10c0/
|
|
7928
|
+
version: 1.0.30001662
|
|
7929
|
+
resolution: "caniuse-lite@npm:1.0.30001662"
|
|
7930
|
+
checksum: 10c0/4af44610db30b9e63443d984be9d48ab93eef584609b3e87201c10972b9daff0b52674e3ed01f7b7b240460763428a3aa8ef7328d14b76ed31ed464203677007
|
|
7905
7931
|
languageName: node
|
|
7906
7932
|
linkType: hard
|
|
7907
7933
|
|
|
@@ -17885,25 +17911,25 @@ __metadata:
|
|
|
17885
17911
|
linkType: hard
|
|
17886
17912
|
|
|
17887
17913
|
"rollup@npm:^4.13.0":
|
|
17888
|
-
version: 4.
|
|
17889
|
-
resolution: "rollup@npm:4.
|
|
17890
|
-
dependencies:
|
|
17891
|
-
"@rollup/rollup-android-arm-eabi": "npm:4.
|
|
17892
|
-
"@rollup/rollup-android-arm64": "npm:4.
|
|
17893
|
-
"@rollup/rollup-darwin-arm64": "npm:4.
|
|
17894
|
-
"@rollup/rollup-darwin-x64": "npm:4.
|
|
17895
|
-
"@rollup/rollup-linux-arm-gnueabihf": "npm:4.
|
|
17896
|
-
"@rollup/rollup-linux-arm-musleabihf": "npm:4.
|
|
17897
|
-
"@rollup/rollup-linux-arm64-gnu": "npm:4.
|
|
17898
|
-
"@rollup/rollup-linux-arm64-musl": "npm:4.
|
|
17899
|
-
"@rollup/rollup-linux-powerpc64le-gnu": "npm:4.
|
|
17900
|
-
"@rollup/rollup-linux-riscv64-gnu": "npm:4.
|
|
17901
|
-
"@rollup/rollup-linux-s390x-gnu": "npm:4.
|
|
17902
|
-
"@rollup/rollup-linux-x64-gnu": "npm:4.
|
|
17903
|
-
"@rollup/rollup-linux-x64-musl": "npm:4.
|
|
17904
|
-
"@rollup/rollup-win32-arm64-msvc": "npm:4.
|
|
17905
|
-
"@rollup/rollup-win32-ia32-msvc": "npm:4.
|
|
17906
|
-
"@rollup/rollup-win32-x64-msvc": "npm:4.
|
|
17914
|
+
version: 4.22.0
|
|
17915
|
+
resolution: "rollup@npm:4.22.0"
|
|
17916
|
+
dependencies:
|
|
17917
|
+
"@rollup/rollup-android-arm-eabi": "npm:4.22.0"
|
|
17918
|
+
"@rollup/rollup-android-arm64": "npm:4.22.0"
|
|
17919
|
+
"@rollup/rollup-darwin-arm64": "npm:4.22.0"
|
|
17920
|
+
"@rollup/rollup-darwin-x64": "npm:4.22.0"
|
|
17921
|
+
"@rollup/rollup-linux-arm-gnueabihf": "npm:4.22.0"
|
|
17922
|
+
"@rollup/rollup-linux-arm-musleabihf": "npm:4.22.0"
|
|
17923
|
+
"@rollup/rollup-linux-arm64-gnu": "npm:4.22.0"
|
|
17924
|
+
"@rollup/rollup-linux-arm64-musl": "npm:4.22.0"
|
|
17925
|
+
"@rollup/rollup-linux-powerpc64le-gnu": "npm:4.22.0"
|
|
17926
|
+
"@rollup/rollup-linux-riscv64-gnu": "npm:4.22.0"
|
|
17927
|
+
"@rollup/rollup-linux-s390x-gnu": "npm:4.22.0"
|
|
17928
|
+
"@rollup/rollup-linux-x64-gnu": "npm:4.22.0"
|
|
17929
|
+
"@rollup/rollup-linux-x64-musl": "npm:4.22.0"
|
|
17930
|
+
"@rollup/rollup-win32-arm64-msvc": "npm:4.22.0"
|
|
17931
|
+
"@rollup/rollup-win32-ia32-msvc": "npm:4.22.0"
|
|
17932
|
+
"@rollup/rollup-win32-x64-msvc": "npm:4.22.0"
|
|
17907
17933
|
"@types/estree": "npm:1.0.5"
|
|
17908
17934
|
fsevents: "npm:~2.3.2"
|
|
17909
17935
|
dependenciesMeta:
|
|
@@ -17943,7 +17969,7 @@ __metadata:
|
|
|
17943
17969
|
optional: true
|
|
17944
17970
|
bin:
|
|
17945
17971
|
rollup: dist/bin/rollup
|
|
17946
|
-
checksum: 10c0/
|
|
17972
|
+
checksum: 10c0/8dd70e7f8d1f8f1a40328634ced7438daca5a7da113d60881bc743a8a601f23d6922488b33754f47c8acea29fda1b3085040ff261f9ee6820cfb4370b4a89528
|
|
17947
17973
|
languageName: node
|
|
17948
17974
|
linkType: hard
|
|
17949
17975
|
|