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:
@@ -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>) => {
|
||||
|
||||
Reference in New Issue
Block a user