mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-05 05:29:13 +01:00
Fix some missing account names
- egw().accounts() were not cleaned - accounts not in normal cache did not call requestUpdate() properly
This commit is contained in:
parent
c4feb6c36f
commit
7d94692dfd
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import {Et2Select} from "./Et2Select";
|
import {Et2Select} from "./Et2Select";
|
||||||
import {SelectOption} from "./FindSelectOptions";
|
import {cleanSelectOptions, SelectOption} from "./FindSelectOptions";
|
||||||
import {Et2Image} from "../Et2Image/Et2Image";
|
import {Et2Image} from "../Et2Image/Et2Image";
|
||||||
import {SelectAccountMixin} from "./SelectAccountMixin";
|
import {SelectAccountMixin} from "./SelectAccountMixin";
|
||||||
import {Et2StaticSelectMixin} from "./StaticOptions";
|
import {Et2StaticSelectMixin} from "./StaticOptions";
|
||||||
@ -58,14 +58,14 @@ export class Et2SelectAccount extends SelectAccountMixin(Et2StaticSelectMixin(Et
|
|||||||
{
|
{
|
||||||
if(this.accountType === 'both')
|
if(this.accountType === 'both')
|
||||||
{
|
{
|
||||||
fetch.push(this.egw().accounts('accounts').then(options => {this.static_options = this.static_options.concat(options)}));
|
fetch.push(this.egw().accounts('accounts').then(options => {this.static_options = this.static_options.concat(cleanSelectOptions(options))}));
|
||||||
}
|
}
|
||||||
|
|
||||||
fetch.push(this.egw().accounts('owngroups').then(options => {this.static_options = this.static_options.concat(options)}));
|
fetch.push(this.egw().accounts('owngroups').then(options => {this.static_options = this.static_options.concat(cleanSelectOptions(options))}));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fetch.push(this.egw().accounts(this.accountType).then(options => {this.static_options = this.static_options.concat(options)}));
|
fetch.push(this.egw().accounts(this.accountType).then(options => {this.static_options = this.static_options.concat(cleanSelectOptions(options))}));
|
||||||
}
|
}
|
||||||
this.fetchComplete = Promise.all(fetch)
|
this.fetchComplete = Promise.all(fetch)
|
||||||
.then(() => this._renderOptions());
|
.then(() => this._renderOptions());
|
||||||
|
@ -79,7 +79,7 @@ export const SelectAccountMixin = <T extends Constructor<LitElement>>(superclass
|
|||||||
this.egw().link_title('api-accounts', id, true).then(title =>
|
this.egw().link_title('api-accounts', id, true).then(title =>
|
||||||
{
|
{
|
||||||
option.label = title;
|
option.label = title;
|
||||||
this.requestUpdate();
|
this.requestUpdate('select_options');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user