mozrest-sdk-react-dev 0.3.75 → 0.3.76

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.
Files changed (2) hide show
  1. package/mozrest-sdk.es.js +118 -56
  2. package/package.json +1 -1
package/mozrest-sdk.es.js CHANGED
@@ -7828,6 +7828,8 @@ const widget$4 = "Widget";
7828
7828
  const maxPartySize$4 = "Max party size";
7829
7829
  const VENUE_MANAGEMENT$4 = "Venue management";
7830
7830
  const BRAND_MANAGEMENT$4 = "Brand management";
7831
+ const LEGAL_TEXT_MANAGEMENT$4 = "Legal text management";
7832
+ const OCCASION_MANAGEMENT$4 = "Occasion management";
7831
7833
  const BRAND_DETAIL$4 = "Brand detail";
7832
7834
  const IMPORTANT_NOTICE$4 = "Important notice";
7833
7835
  const TERMS_CONDITIONS_LINK$4 = "Terms & Conditions Link";
@@ -8491,6 +8493,8 @@ const en = {
8491
8493
  maxPartySize: maxPartySize$4,
8492
8494
  VENUE_MANAGEMENT: VENUE_MANAGEMENT$4,
8493
8495
  BRAND_MANAGEMENT: BRAND_MANAGEMENT$4,
8496
+ LEGAL_TEXT_MANAGEMENT: LEGAL_TEXT_MANAGEMENT$4,
8497
+ OCCASION_MANAGEMENT: OCCASION_MANAGEMENT$4,
8494
8498
  BRAND_DETAIL: BRAND_DETAIL$4,
8495
8499
  IMPORTANT_NOTICE: IMPORTANT_NOTICE$4,
8496
8500
  TERMS_CONDITIONS_LINK: TERMS_CONDITIONS_LINK$4,
@@ -9115,6 +9119,8 @@ const widget$3 = "Widget";
9115
9119
  const maxPartySize$3 = "Tamaño máximo de grupo";
9116
9120
  const VENUE_MANAGEMENT$3 = "Gestión de restaurantes";
9117
9121
  const BRAND_MANAGEMENT$3 = "Gestión de marcas";
9122
+ const LEGAL_TEXT_MANAGEMENT$3 = "Gestión de textos legales";
9123
+ const OCCASION_MANAGEMENT$3 = "Gestión de ocasiones";
9118
9124
  const BRAND_DETAIL$3 = "Detalle de marca";
9119
9125
  const IMPORTANT_NOTICE$3 = "Aviso importante";
9120
9126
  const TERMS_CONDITIONS_LINK$3 = "Enlace de Términos y Condiciones";
@@ -9779,6 +9785,8 @@ const es$2 = {
9779
9785
  maxPartySize: maxPartySize$3,
9780
9786
  VENUE_MANAGEMENT: VENUE_MANAGEMENT$3,
9781
9787
  BRAND_MANAGEMENT: BRAND_MANAGEMENT$3,
9788
+ LEGAL_TEXT_MANAGEMENT: LEGAL_TEXT_MANAGEMENT$3,
9789
+ OCCASION_MANAGEMENT: OCCASION_MANAGEMENT$3,
9782
9790
  BRAND_DETAIL: BRAND_DETAIL$3,
9783
9791
  IMPORTANT_NOTICE: IMPORTANT_NOTICE$3,
9784
9792
  TERMS_CONDITIONS_LINK: TERMS_CONDITIONS_LINK$3,
@@ -10404,6 +10412,8 @@ const widget$2 = "Widget";
10404
10412
  const maxPartySize$2 = "Nombre maximum de personnes";
10405
10413
  const VENUE_MANAGEMENT$2 = "Gestion des établissements";
10406
10414
  const BRAND_MANAGEMENT$2 = "Gestion des marques";
10415
+ const LEGAL_TEXT_MANAGEMENT$2 = "Gestion des textes légaux";
10416
+ const OCCASION_MANAGEMENT$2 = "Gestion des occasions";
10407
10417
  const BRAND_DETAIL$2 = "Détail de la marque";
10408
10418
  const IMPORTANT_NOTICE$2 = "Avis important";
10409
10419
  const TERMS_CONDITIONS_LINK$2 = "Lien des Conditions Générales";
@@ -11067,6 +11077,8 @@ const fr$1 = {
11067
11077
  maxPartySize: maxPartySize$2,
11068
11078
  VENUE_MANAGEMENT: VENUE_MANAGEMENT$2,
11069
11079
  BRAND_MANAGEMENT: BRAND_MANAGEMENT$2,
11080
+ LEGAL_TEXT_MANAGEMENT: LEGAL_TEXT_MANAGEMENT$2,
11081
+ OCCASION_MANAGEMENT: OCCASION_MANAGEMENT$2,
11070
11082
  BRAND_DETAIL: BRAND_DETAIL$2,
11071
11083
  IMPORTANT_NOTICE: IMPORTANT_NOTICE$2,
11072
11084
  TERMS_CONDITIONS_LINK: TERMS_CONDITIONS_LINK$2,
@@ -11690,6 +11702,8 @@ const widget$1 = "Widget";
11690
11702
  const maxPartySize$1 = "Max. Gästeanzahl";
11691
11703
  const VENUE_MANAGEMENT$1 = "Standortverwaltung";
11692
11704
  const BRAND_MANAGEMENT$1 = "Markenverwaltung";
11705
+ const LEGAL_TEXT_MANAGEMENT$1 = "Rechtstextverwaltung";
11706
+ const OCCASION_MANAGEMENT$1 = "Anlassverwaltung";
11693
11707
  const BRAND_DETAIL$1 = "Markendetails";
11694
11708
  const IMPORTANT_NOTICE$1 = "Wichtiger Hinweis";
11695
11709
  const TERMS_CONDITIONS_LINK$1 = "Link zu den Allgemeinen Geschäftsbedingungen";
@@ -12294,6 +12308,8 @@ const de$1 = {
12294
12308
  maxPartySize: maxPartySize$1,
12295
12309
  VENUE_MANAGEMENT: VENUE_MANAGEMENT$1,
12296
12310
  BRAND_MANAGEMENT: BRAND_MANAGEMENT$1,
12311
+ LEGAL_TEXT_MANAGEMENT: LEGAL_TEXT_MANAGEMENT$1,
12312
+ OCCASION_MANAGEMENT: OCCASION_MANAGEMENT$1,
12297
12313
  BRAND_DETAIL: BRAND_DETAIL$1,
12298
12314
  IMPORTANT_NOTICE: IMPORTANT_NOTICE$1,
12299
12315
  TERMS_CONDITIONS_LINK: TERMS_CONDITIONS_LINK$1,
@@ -12859,6 +12875,8 @@ const widget = "Widget";
12859
12875
  const maxPartySize = "Max. gasten";
12860
12876
  const VENUE_MANAGEMENT = "Locatiebeheer";
12861
12877
  const BRAND_MANAGEMENT = "Merkbeheer";
12878
+ const LEGAL_TEXT_MANAGEMENT = "Beheer van juridische teksten";
12879
+ const OCCASION_MANAGEMENT = "Beheer van gelegenheden";
12862
12880
  const BRAND_DETAIL = "Merkdetails";
12863
12881
  const IMPORTANT_NOTICE = "Belangrijke mededeling";
12864
12882
  const TERMS_CONDITIONS_LINK = "Link naar Algemene Voorwaarden";
@@ -13463,6 +13481,8 @@ const nl$1 = {
13463
13481
  maxPartySize,
13464
13482
  VENUE_MANAGEMENT,
13465
13483
  BRAND_MANAGEMENT,
13484
+ LEGAL_TEXT_MANAGEMENT,
13485
+ OCCASION_MANAGEMENT,
13466
13486
  BRAND_DETAIL,
13467
13487
  IMPORTANT_NOTICE,
13468
13488
  TERMS_CONDITIONS_LINK,
@@ -17741,6 +17761,7 @@ const Provider = ({
17741
17761
  lang: lang2,
17742
17762
  parentUserId,
17743
17763
  children: Children2,
17764
+ page,
17744
17765
  ...props
17745
17766
  }) => {
17746
17767
  return /* @__PURE__ */ jsx$1(AuthHandler, {
@@ -17752,7 +17773,8 @@ const Provider = ({
17752
17773
  lang: lang2,
17753
17774
  children: /* @__PURE__ */ jsx$1(Children2, {
17754
17775
  ...props,
17755
- lang: lang2
17776
+ lang: lang2,
17777
+ page
17756
17778
  })
17757
17779
  })
17758
17780
  })
@@ -195889,7 +195911,8 @@ const TableFilters = ({
195889
195911
  };
195890
195912
  const BrandManagement$1 = ({
195891
195913
  userEmail,
195892
- userFullName
195914
+ userFullName,
195915
+ mode = "brand"
195893
195916
  }) => {
195894
195917
  const {
195895
195918
  t: t2
@@ -195913,11 +195936,44 @@ const BrandManagement$1 = ({
195913
195936
  const onNavigateToBrandDetail = (data22) => {
195914
195937
  navigate(`/brand-management/${data22.id}`);
195915
195938
  };
195939
+ const headerTitleKey = mode === "legal" ? "LEGAL_TEXT_MANAGEMENT" : mode === "occasion" ? "OCCASION_MANAGEMENT" : "BRAND_MANAGEMENT";
195916
195940
  const truncateText = (text2, maxLength = 50) => {
195917
195941
  if (!text2) return "---";
195918
195942
  return text2.length > maxLength ? `${text2.slice(0, maxLength)}...` : text2;
195919
195943
  };
195920
- const tableHeader = [{
195944
+ const tableHeader = mode === "occasion" ? [{
195945
+ id: "name",
195946
+ label: t2("NAME"),
195947
+ render: (value2, item2) => /* @__PURE__ */ jsx$1("div", {
195948
+ className: styles$f.brandName,
195949
+ onClick: () => onNavigateToBrandDetail(item2),
195950
+ children: value2
195951
+ })
195952
+ }, {
195953
+ id: "occasions",
195954
+ label: t2("OCCASIONS"),
195955
+ render: (_value, item2) => {
195956
+ var _a2;
195957
+ const occasions = Array.isArray((_a2 = item2 == null ? void 0 : item2.extraData) == null ? void 0 : _a2.occasions) ? item2.extraData.occasions : [];
195958
+ if (!occasions.length) {
195959
+ return /* @__PURE__ */ jsx$1("div", {
195960
+ children: "---"
195961
+ });
195962
+ }
195963
+ const lines = occasions.map((occ, index2) => {
195964
+ const occasionName = occ.occasionName || occ.occasionId || "";
195965
+ const areaName = occ.occasionAreaName || occ.occasionAreaId || "";
195966
+ const menuName = occ.occasionMenuName || occ.occasionMenuId || "";
195967
+ const parts = [occasionName, areaName, menuName].filter(Boolean);
195968
+ return /* @__PURE__ */ jsx$1("div", {
195969
+ children: parts.join(" • ")
195970
+ }, index2);
195971
+ });
195972
+ return /* @__PURE__ */ jsx$1("div", {
195973
+ children: lines
195974
+ });
195975
+ }
195976
+ }] : [{
195921
195977
  id: "name",
195922
195978
  label: t2("NAME"),
195923
195979
  render: (value2, item2) => /* @__PURE__ */ jsx$1("div", {
@@ -195963,7 +196019,7 @@ const BrandManagement$1 = ({
195963
196019
  };
195964
196020
  return /* @__PURE__ */ jsx$1(LayoutPage$1, {
195965
196021
  header: /* @__PURE__ */ jsx$1("h1", {
195966
- children: t2("BRAND_MANAGEMENT")
196022
+ children: t2(headerTitleKey)
195967
196023
  }),
195968
196024
  children: /* @__PURE__ */ jsxs("div", {
195969
196025
  children: [/* @__PURE__ */ jsx$1(TableFilters, {
@@ -196085,7 +196141,9 @@ const OccasionsField = ({
196085
196141
  })]
196086
196142
  });
196087
196143
  };
196088
- const BrandDetail = () => {
196144
+ const BrandDetail = ({
196145
+ mode = "brand"
196146
+ }) => {
196089
196147
  const {
196090
196148
  t: t2
196091
196149
  } = useTranslation();
@@ -196093,6 +196151,7 @@ const BrandDetail = () => {
196093
196151
  const {
196094
196152
  brandId
196095
196153
  } = useParams();
196154
+ const backPath = "/brand-management";
196096
196155
  const {
196097
196156
  data: data2,
196098
196157
  isLoading,
@@ -196229,11 +196288,14 @@ const BrandDetail = () => {
196229
196288
  }, [data2, occasionsData, occasionOptions, reset]);
196230
196289
  const onSubmit = (formData) => {
196231
196290
  const occasionsList = (formData.occasions || []).map((row) => {
196232
- var _a2, _b, _c;
196291
+ var _a2, _b, _c, _d, _e2, _f;
196233
196292
  return {
196234
196293
  occasionId: ((_a2 = row.occasionId) == null ? void 0 : _a2.value) ?? null,
196235
- occasionAreaId: ((_b = row.occasionAreaId) == null ? void 0 : _b.value) ?? null,
196236
- occasionMenuId: ((_c = row.occasionMenuId) == null ? void 0 : _c.value) ?? null
196294
+ occasionName: ((_b = row.occasionId) == null ? void 0 : _b.label) ?? null,
196295
+ occasionAreaId: ((_c = row.occasionAreaId) == null ? void 0 : _c.value) ?? null,
196296
+ occasionAreaName: ((_d = row.occasionAreaId) == null ? void 0 : _d.label) ?? null,
196297
+ occasionMenuId: ((_e2 = row.occasionMenuId) == null ? void 0 : _e2.value) ?? null,
196298
+ occasionMenuName: ((_f = row.occasionMenuId) == null ? void 0 : _f.label) ?? null
196237
196299
  };
196238
196300
  });
196239
196301
  const submitData = {
@@ -196255,7 +196317,7 @@ const BrandDetail = () => {
196255
196317
  className: styles$e.brandDetailHeader,
196256
196318
  children: [/* @__PURE__ */ jsx$1(Button$1, {
196257
196319
  mode: "tertiary",
196258
- onClick: () => navigate("/brand-management"),
196320
+ onClick: () => navigate(backPath),
196259
196321
  icon: "arrowLeft"
196260
196322
  }), /* @__PURE__ */ jsx$1("h1", {
196261
196323
  children: t2("BRAND_DETAIL")
@@ -196271,7 +196333,7 @@ const BrandDetail = () => {
196271
196333
  className: styles$e.brandDetailHeader,
196272
196334
  children: [/* @__PURE__ */ jsx$1(Button$1, {
196273
196335
  mode: "tertiary",
196274
- onClick: () => navigate("/brand-management"),
196336
+ onClick: () => navigate(backPath),
196275
196337
  icon: "arrowLeft"
196276
196338
  }), /* @__PURE__ */ jsx$1("h1", {
196277
196339
  children: (data2 == null ? void 0 : data2.name) ?? t2("BRAND_DETAIL")
@@ -196284,38 +196346,40 @@ const BrandDetail = () => {
196284
196346
  onSubmit: handleSubmit(onSubmit),
196285
196347
  children: /* @__PURE__ */ jsxs("div", {
196286
196348
  className: styles$e.brandDetailContent,
196287
- children: [/* @__PURE__ */ jsxs("div", {
196288
- className: styles$e.brandDetailContentItem,
196349
+ children: [(mode === "legal" || mode === "brand") && /* @__PURE__ */ jsxs(Fragment, {
196289
196350
  children: [/* @__PURE__ */ jsxs("div", {
196290
- className: styles$e.brandDetailContentItemTitle,
196291
- children: [/* @__PURE__ */ jsx$1(Icon, {
196292
- icon: "clipBoardList"
196293
- }), /* @__PURE__ */ jsxs("h3", {
196294
- children: [t2("IMPORTANT_NOTICE"), ":"]
196351
+ className: styles$e.brandDetailContentItem,
196352
+ children: [/* @__PURE__ */ jsxs("div", {
196353
+ className: styles$e.brandDetailContentItemTitle,
196354
+ children: [/* @__PURE__ */ jsx$1(Icon, {
196355
+ icon: "clipBoardList"
196356
+ }), /* @__PURE__ */ jsxs("h3", {
196357
+ children: [t2("IMPORTANT_NOTICE"), ":"]
196358
+ })]
196359
+ }), /* @__PURE__ */ jsx$1(TextAreaField$1, {
196360
+ control,
196361
+ id: "rwgTc",
196362
+ name: "rwgTc",
196363
+ label: ""
196295
196364
  })]
196296
- }), /* @__PURE__ */ jsx$1(TextAreaField$1, {
196297
- control,
196298
- id: "rwgTc",
196299
- name: "rwgTc",
196300
- label: ""
196301
- })]
196302
- }), /* @__PURE__ */ jsxs("div", {
196303
- className: styles$e.brandDetailContentItem,
196304
- children: [/* @__PURE__ */ jsxs("div", {
196305
- className: styles$e.brandDetailContentItemTitle,
196306
- children: [/* @__PURE__ */ jsx$1(Icon, {
196307
- icon: "link"
196308
- }), /* @__PURE__ */ jsxs("h3", {
196309
- children: [t2("TERMS_CONDITIONS_LINK"), ":"]
196365
+ }), /* @__PURE__ */ jsxs("div", {
196366
+ className: styles$e.brandDetailContentItem,
196367
+ children: [/* @__PURE__ */ jsxs("div", {
196368
+ className: styles$e.brandDetailContentItemTitle,
196369
+ children: [/* @__PURE__ */ jsx$1(Icon, {
196370
+ icon: "link"
196371
+ }), /* @__PURE__ */ jsxs("h3", {
196372
+ children: [t2("TERMS_CONDITIONS_LINK"), ":"]
196373
+ })]
196374
+ }), /* @__PURE__ */ jsx$1(TextInputField, {
196375
+ control,
196376
+ id: "rwgTcLink",
196377
+ name: "rwgTcLink",
196378
+ label: "",
196379
+ radius: "md"
196310
196380
  })]
196311
- }), /* @__PURE__ */ jsx$1(TextInputField, {
196312
- control,
196313
- id: "rwgTcLink",
196314
- name: "rwgTcLink",
196315
- label: "",
196316
- radius: "md"
196317
196381
  })]
196318
- }), /* @__PURE__ */ jsxs("div", {
196382
+ }), (mode === "occasion" || mode === "brand") && /* @__PURE__ */ jsxs("div", {
196319
196383
  className: styles$e.brandDetailContentContainer,
196320
196384
  children: [/* @__PURE__ */ jsxs("div", {
196321
196385
  className: styles$e.brandDetailContentItemTitle,
@@ -196353,31 +196417,26 @@ const BrandDetail = () => {
196353
196417
  };
196354
196418
  const BrandManagement = ({
196355
196419
  userEmail,
196356
- userFullName
196420
+ userFullName,
196421
+ page
196357
196422
  }) => {
196358
- useEffect(() => {
196359
- const script = document.createElement("script");
196360
- script.src = "https://cdn.paddle.com/paddle/paddle.js";
196361
- script.async = true;
196362
- script.onload = () => {
196363
- };
196364
- document.body.appendChild(script);
196365
- return () => {
196366
- document.body.removeChild(script);
196367
- };
196368
- }, []);
196423
+ const mode = page === "LegalTextManagement" ? "legal" : page === "OccasionManagement" ? "occasion" : "brand";
196424
+ const basePath = "/brand-management";
196369
196425
  return /* @__PURE__ */ jsx$1(MemoryRouter, {
196370
- initialEntries: ["/brand-management"],
196426
+ initialEntries: [basePath],
196371
196427
  children: /* @__PURE__ */ jsxs(Routes, {
196372
196428
  children: [/* @__PURE__ */ jsx$1(Route, {
196373
- path: "/brand-management",
196429
+ path: basePath,
196374
196430
  element: /* @__PURE__ */ jsx$1(BrandManagement$1, {
196375
196431
  userEmail,
196376
- userFullName
196432
+ userFullName,
196433
+ mode
196377
196434
  })
196378
196435
  }), /* @__PURE__ */ jsx$1(Route, {
196379
- path: "/brand-management/:brandId",
196380
- element: /* @__PURE__ */ jsx$1(BrandDetail, {})
196436
+ path: `${basePath}/:brandId`,
196437
+ element: /* @__PURE__ */ jsx$1(BrandDetail, {
196438
+ mode
196439
+ })
196381
196440
  }), /* @__PURE__ */ jsx$1(Route, {
196382
196441
  path: "*",
196383
196442
  element: /* @__PURE__ */ jsx$1(WorkingPage, {})
@@ -199924,7 +199983,9 @@ const pages = {
199924
199983
  BrandManagement,
199925
199984
  PosNotifications,
199926
199985
  PosTableMatching,
199927
- PosCheckMatching
199986
+ PosCheckMatching,
199987
+ LegalTextManagement: BrandManagement,
199988
+ OccasionManagement: BrandManagement
199928
199989
  };
199929
199990
  console.log("Initializing Sentry...");
199930
199991
  init2({
@@ -199939,6 +200000,7 @@ const ComponentFactory = ({
199939
200000
  return /* @__PURE__ */ jsx$1(Provider, {
199940
200001
  children: Page,
199941
200002
  lang: props.lang,
200003
+ page,
199942
200004
  ...props
199943
200005
  });
199944
200006
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mozrest-sdk-react-dev",
3
- "version": "0.3.75",
3
+ "version": "0.3.76",
4
4
  "main": "mozrest-sdk.es.js",
5
5
  "keywords": [
6
6
  "mozrest"