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

Support for FormItemEvent edit #32

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<Authors>EasyMicroservices</Authors>
<IsPackable>true</IsPackable>
<Version>0.0.0.27</Version>
<Version>0.0.0.28</Version>
<Description>TemplateGenerator UI compoents.</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>component,microcomponent,ui,core,templategenerator,generator,template,form,formgenerator</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<Authors>EasyMicroservices</Authors>
<IsPackable>true</IsPackable>
<Version>0.0.0.27</Version>
<Version>0.0.0.28</Version>
<Description>TemplateGenerator view model.</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>component,microcomponent,ui,core,templategenerator,generator,template,form,formgenerator</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,22 @@
Title = value.Title;
Type = value.Type;
DefaultValue = value.DefaultValue;
FormItems.Clear();
if (value.Items != null)
{
foreach (var item in value.Items)
{
FormItems.Add(item);
}
}
FormItemEvents.Clear();
if (value.Events != null)
{
foreach (var item in value.Events)
{
FormItemEvents.Add(item);
}
}
if (value.PrimaryFormItemId.HasValue)
SelectedNoParentFormItem = NoParentFormItems.FirstOrDefault(x => x.Id == value.PrimaryFormItemId);
}
Expand Down Expand Up @@ -180,7 +189,7 @@
};
}

public async Task Save()

Check warning on line 192 in src/CSharp/Cores/EasyMicroservices.UI.TemplateGenerator.ViewModels/ViewModels/FormItems/AddOrUpdateFormItemViewModel.cs

View workflow job for this annotation

GitHub Actions / os-tests

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 192 in src/CSharp/Cores/EasyMicroservices.UI.TemplateGenerator.ViewModels/ViewModels/FormItems/AddOrUpdateFormItemViewModel.cs

View workflow job for this annotation

GitHub Actions / os-tests

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 192 in src/CSharp/Cores/EasyMicroservices.UI.TemplateGenerator.ViewModels/ViewModels/FormItems/AddOrUpdateFormItemViewModel.cs

View workflow job for this annotation

GitHub Actions / os-tests

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
OnSuccess?.Invoke(GetContract());
}
Expand Down Expand Up @@ -252,6 +261,7 @@
Title = "";
DefaultValue = "";
FormItems.Clear();
FormItemEvents.Clear();
UpdateFormItemContract = default;
}

Expand Down
Loading