Web:Client:Add greetingSettingsIsDefault, getGreetingSettingsIsDefault.

This commit is contained in:
Vlada Gazizova 2022-10-20 14:09:11 +03:00
parent 285c831477
commit e49b5b5945

View File

@ -18,9 +18,10 @@ class CommonStore {
isLoadedCustomizationNavbar = false;
isLoadedWelcomePageSettings = false;
isLoadedAdditionalResources = false;
isLoadedCompanyInfoSettingsData = false;
greetingSettingsIsDefault = true;
constructor() {
this.authStore = authStore;
makeAutoObservable(this);
@ -35,7 +36,8 @@ class CommonStore {
authStore.settingsStore.getPortalTimezones(),
authStore.settingsStore.getPortalCultures(),
this.getWhiteLabelLogoText(),
this.getWhiteLabelLogoSizes()
this.getWhiteLabelLogoSizes(),
this.getGreetingSettingsIsDefault()
);
return Promise.all(requests).finally(() => this.setIsLoaded(true));
@ -49,6 +51,10 @@ class CommonStore {
this.whiteLabelLogoSizes = sizes;
};
getGreetingSettingsIsDefault = async () => {
this.greetingSettingsIsDefault = await api.settings.getGreetingSettingsIsDefault();
};
getWhiteLabelLogoText = async () => {
const res = await api.settings.getLogoText();
this.setLogoText(res);