mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-13 05:07:43 +02:00
viewlet fixes (#7934)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -42,11 +42,12 @@
|
||||
(res) => {
|
||||
configurationRaw = res
|
||||
configurationsLoading = false
|
||||
loading = configurationsLoading || preferencesLoading
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
function fetchPreferences (viewlet: Viewlet): void {
|
||||
function fetchPreferences (configurationRaw: Viewlet[]): void {
|
||||
preferencesLoading = preferenceQuery.query(
|
||||
view.class.ViewletPreference,
|
||||
{
|
||||
@@ -56,6 +57,7 @@
|
||||
(res) => {
|
||||
preference = res
|
||||
preferencesLoading = false
|
||||
loading = configurationsLoading || preferencesLoading
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -81,7 +83,7 @@
|
||||
}
|
||||
|
||||
$: fetchConfigurations(viewlet)
|
||||
$: fetchPreferences(viewlet)
|
||||
$: fetchPreferences(configurationRaw)
|
||||
|
||||
$: updateConfiguration(configurationRaw, preference)
|
||||
|
||||
@@ -90,6 +92,8 @@
|
||||
|
||||
{#if viewlet?.$lookup?.descriptor?.component}
|
||||
{#if loading}
|
||||
{configurationsLoading}
|
||||
{preferencesLoading}
|
||||
<Loading />
|
||||
{:else}
|
||||
<Component
|
||||
|
||||
Reference in New Issue
Block a user