add chat-card

1. add chat card
2. fix settings (output object)
3. add input phone and email to user
4. fix empty string to null
This commit is contained in:
2025-07-29 13:26:46 +03:00
parent 462ed2b671
commit feb351424e
14 changed files with 215 additions and 118 deletions

View File

@@ -80,11 +80,12 @@ export const useSettingsStore = defineStore('settings', () => {
if (authStore.isAuth) {
try {
const { data } = await api.get('/customer/settings')
console.log(data.data)
settings.value = {
fontSize: data.data.settings.fontSize || defaultSettings.fontSize,
locale: data.data.settings.locale || detectLocale(),
timeZoneBot: data.data.settings.timeZone || defaultSettings.timeZoneBot,
localeBot: data.data.settings.localeBot || detectLocale()
fontSize: data.data.fontSize || defaultSettings.fontSize,
locale: data.data.locale || detectLocale(),
timeZoneBot: data.data.timeZone || defaultSettings.timeZoneBot,
localeBot: data.data.localeBot || detectLocale()
}
} catch {
settings.value.locale = detectLocale()
@@ -101,7 +102,7 @@ export const useSettingsStore = defineStore('settings', () => {
}
const saveSettings = async () => {
await api.put('/customer/settings', { settings: settings.value })
await api.put('/customer/settings', settings.value)
}
const updateSettings = async (newSettings: Partial<AppSettings>) => {