@dev.smartpricing/message-composer-layer 4.2.4 → 4.2.6

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.
@@ -91,11 +91,13 @@ const defaultSenderEmail = computed(
91
91
  () => composerContext.organizationData?.value?.senderEmail ?? '',
92
92
  )
93
93
 
94
- const accommodationName = computed(() => composerContext.accommodationName?.value ?? '')
94
+ const accommodationName = computed(
95
+ () => composerContext.organizationData?.value?.accommodationName ?? '',
96
+ )
95
97
 
96
98
  const state = ref<Schema>({
97
99
  to: '',
98
- sender_name: accommodationName.value,
100
+ sender_name: '',
99
101
  from: '',
100
102
  })
101
103
 
@@ -109,6 +111,16 @@ watch(
109
111
  { immediate: true },
110
112
  )
111
113
 
114
+ watch(
115
+ accommodationName,
116
+ (name) => {
117
+ if (!state.value.sender_name) {
118
+ state.value.sender_name = name
119
+ }
120
+ },
121
+ { immediate: true },
122
+ )
123
+
112
124
  const schema = z.object({
113
125
  to: z
114
126
  .string()
@@ -3,6 +3,8 @@ import type { AppContextConfig } from '@dev.smartpricing/message-composer-utils/
3
3
 
4
4
  export interface OrganizationData {
5
5
  senderEmail: string
6
+ /** Tenant accommodation/property name — defaults the test-email sender name */
7
+ accommodationName?: string
6
8
  }
7
9
 
8
10
  export interface ComposerContext {
@@ -18,7 +20,6 @@ export interface ComposerContext {
18
20
  default_tags?: Ref<string[]>
19
21
  metaWabaId?: Ref<string>
20
22
  metaAccessToken?: Ref<string>
21
- accommodationName?: Ref<string>
22
23
  isAdmin?: Ref<boolean>
23
24
  organizationData?: Ref<OrganizationData>
24
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev.smartpricing/message-composer-layer",
3
- "version": "4.2.4",
3
+ "version": "4.2.6",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",
@@ -36,7 +36,7 @@
36
36
  "vue-router": "^5.0.7",
37
37
  "vue3-emoji-picker": "^1.1.8",
38
38
  "zod": "^4.4.3",
39
- "@dev.smartpricing/message-composer-utils": "4.2.4"
39
+ "@dev.smartpricing/message-composer-utils": "4.2.6"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@nuxt/eslint": "^1.15.2",