Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what's the plan to implement the support for UserSettingManagementProvider #39

Closed
NiceLisan opened this issue Sep 30, 2020 · 3 comments
Closed

Comments

@NiceLisan
Copy link

and can you support the below function:

the smart property recognition for the following codes,
for example: the boolean property should smart work with si.WithProperty(SettingUiConst.Type, bool) ;

private List<SettingInfo> SetSettingDefinitionProperties(IDictionary<string, IDictionary<string, string>> settingProperties)
        {
            var settingInfos = new List<SettingInfo>();
            var settingDefinitions = _settingDefinitionManager.GetAll();
            foreach (var settingDefinition in settingDefinitions)
            {
                var si = CreateSettingInfo(settingDefinition);
                if (settingProperties.ContainsKey(si.Name))
                {
                    // This Setting is defined in the property file,
                    // set its property values from the dictionary
                    var properties = settingProperties[si.Name];
                    foreach (var kv in properties)
                    {
                        // Do not assign the property if it has already been set by the user.
                        if (!si.Properties.ContainsKey(kv.Key))
                        {
                            si.WithProperty(kv.Key, kv.Value);
                        }
                    }
                }

                // Default group1: Others
                if (!si.Properties.ContainsKey(SettingUiConst.Group1))
                {
                    si.WithProperty(SettingUiConst.Group1, SettingUiConst.DefaultGroup);
                }

                // Default group2: Others
                if (!si.Properties.ContainsKey(SettingUiConst.Group2))
                {
                    si.WithProperty(SettingUiConst.Group2, SettingUiConst.DefaultGroup);
                }

                // Default type: text
                if (!si.Properties.ContainsKey(SettingUiConst.Type))
                {
                    si.WithProperty(SettingUiConst.Type, SettingUiConst.DefaultType);
                }

                settingInfos.Add(si);
            }

            return settingInfos;
        }
@wakuflair
Copy link
Member

I'm not very clear about your problem, would you explain it more?

If you have two or more questions, you should split them to individual issue.

@NiceLisan
Copy link
Author

NiceLisan commented Oct 9, 2020

thanks for your reply.
yeah, sorry, i supposed the two questions.
the main question is that i found abp.settingui currently don's support the usersettingManagementProvider, will you plan to add the feature for usersettingManagement?
i mean the settingdefintion created by the usersetting doesn't have the editable pages now.
sincere thanks.

@wakuflair
Copy link
Member

the main question is that i found abp.settingui currently don's support the usersettingManagementProvider, will you plan to add the feature for usersettingManagement?

Yes that's on the plan.

i mean the settingdefintion created by the usersetting doesn't have the editable pages now.

It should work fine, are you following the tutorial to create the SettingDefinition?
For boolean value, you should use checkbox as the type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants