@7365admin1/core 3.54.0 → 3.55.0

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/index.mjs CHANGED
@@ -13658,6 +13658,8 @@ var NotificationModule = /* @__PURE__ */ ((NotificationModule2) => {
13658
13658
  NotificationModule2["FACILITY_BOOKING"] = "facilityBooking";
13659
13659
  NotificationModule2["ONLINE_FORM"] = "onlineForm";
13660
13660
  NotificationModule2["PRELOVED_MARKETPLACE"] = "prelovedMarketplace";
13661
+ NotificationModule2["MARKETPLACE_ORDER"] = "marketplace-order";
13662
+ NotificationModule2["MARKETPLACE_VENDOR_ORDER"] = "marketplace-vendor-order";
13661
13663
  NotificationModule2["INCIDENT_REPORT"] = "incidentReport";
13662
13664
  NotificationModule2["EMERGENCY_CONTACT"] = "emergencyContact";
13663
13665
  NotificationModule2["VIRTUAL_PATROL"] = "virtualPatrol";
@@ -14126,7 +14128,7 @@ var NOTIFICATION_CATEGORIES = [
14126
14128
  {
14127
14129
  key: "facilityBooking",
14128
14130
  label: "Facility Bookings",
14129
- description: "When a facility booking is made or its status changes.",
14131
+ description: "When a facility booking is made or its status changes. The confirmation email goes to the address entered on the booking form itself.",
14130
14132
  channels: { inApp: true, push: true, email: false },
14131
14133
  channelNote: {
14132
14134
  email: "Booking confirmations go to the email address entered on the booking form itself. To change where a confirmation lands, change that address when the booking is made."
@@ -14138,7 +14140,7 @@ var NOTIFICATION_CATEGORIES = [
14138
14140
  {
14139
14141
  key: "visitors",
14140
14142
  label: "Visitors",
14141
- description: "When a visitor you invited checks in or checks out.",
14143
+ description: "When a visitor you invited checks in or checks out. The invitation email goes to the address entered for the visitor.",
14142
14144
  channels: { inApp: true, push: true, email: false },
14143
14145
  channelNote: {
14144
14146
  email: "Visitor invitations go to the email address entered for the visitor when they are invited. To change where one lands, change that address on the invitation."
@@ -14212,7 +14214,7 @@ var NOTIFICATION_CATEGORIES = [
14212
14214
  {
14213
14215
  key: "serviceProviderInvite",
14214
14216
  label: "Service Provider Invitations",
14215
- description: "When a property manager invites your company to provide services at a site.",
14217
+ description: "When a property manager invites your company to provide services at a site. The invitation email is the invitation itself and is always sent to the address it was addressed to; these settings control the copy that reaches you inside the app.",
14216
14218
  channels: { inApp: true, push: true, email: false },
14217
14219
  channelNote: {
14218
14220
  email: "The invitation email is the invitation itself \u2014 for a company that has no account here yet it is the only copy, so it is always sent to the address the invitation was addressed to. The switches above control the copy that reaches you inside the app."
@@ -92182,8 +92184,10 @@ function useNotificationPreferenceService() {
92182
92184
  categoriesForUser(id)
92183
92185
  ]);
92184
92186
  const isOff = (category, channel) => off.some((o) => o.category === category && o.channel === channel);
92187
+ const supportedIn = (category) => NOTIFICATION_CHANNELS.filter((channel) => category.channels[channel]);
92188
+ const offered = new Set(categories.flatMap((c) => supportedIn(c)));
92185
92189
  return {
92186
- channels: NOTIFICATION_CHANNELS.map((c) => ({
92190
+ channels: NOTIFICATION_CHANNELS.filter((c) => offered.has(c)).map((c) => ({
92187
92191
  key: c,
92188
92192
  label: NOTIFICATION_CHANNEL_LABELS[c]
92189
92193
  })),
@@ -92192,16 +92196,14 @@ function useNotificationPreferenceService() {
92192
92196
  label: category.label,
92193
92197
  description: category.description,
92194
92198
  safety: Boolean(category.safety),
92195
- channels: NOTIFICATION_CHANNELS.map((channel) => {
92196
- const supported = category.channels[channel];
92197
- return {
92198
- key: channel,
92199
- label: NOTIFICATION_CHANNEL_LABELS[channel],
92200
- supported,
92201
- note: supported ? void 0 : category.channelNote?.[channel],
92202
- enabled: supported && !isOff(category.key, channel)
92203
- };
92204
- })
92199
+ channels: supportedIn(category).map((channel) => ({
92200
+ key: channel,
92201
+ label: NOTIFICATION_CHANNEL_LABELS[channel],
92202
+ // kept so a client written against the old shape still filters
92203
+ // correctly; every channel sent is now a supported one.
92204
+ supported: true,
92205
+ enabled: !isOff(category.key, channel)
92206
+ }))
92205
92207
  }))
92206
92208
  };
92207
92209
  }