After further investigation, the problem is not related to parsing or serialization. The problem is with JSON.stringify
I wrote it to console log to get the above JSON and it is wrong. console.log("benefit " + JSON.stringify(this.benefitOption))
Hi aaron,
Here are the definitions as requested.
DependentEnrolmentRuleOutputDto
public int TenantId { get; set; }
public int BenefitEnrolmentRuleId { get; set; }
public short Dependent { get; set; }
public string WaitingPeriod { get; set; }
public short StartDateCalc { get; set; }
public int TerminationAge { get; set; }
public short TerminationDateCalc { get; set; }
public bool isEligible { get; set; }
EmploymentRuleOutputDto
public int TenantId { get; set; }
public int BenefitEnrolmentRuleId { get; set; }
public short EmploymentType { get; set; }
public decimal MinHours { get; set; }
public short Frequency { get; set; }
TrappingRuleOutputDto
public int TenantId { get; set; }
public int BenefitEnrolmentRuleId { get; set; }
public short TrappingCondition { get; set; }
public short CovBeforeDecision { get; set; }
BenefitEnrolmentRuleId is propogated to the above entities from BenefitEnrolmentRuleOutputDto Id.
PS: It works if I changed the signature of the method (removed async Task) from public async Task BenefitOptionOutputDto GetBenefitOption(BenefitOptionGetInputDto input) to public BenefitOptionOutputDto GetBenefitOption(BenefitOptionGetInputDto input) I am not sure that it is the solution. It has to be a better way I guess.
Thanks for quick reply.
Hi aaron,
BenefitOptionOutputDto public int TenantId { get; set; } public long Id { get; set; } public string OptionCode { get; set; } public bool IsActive { get; set; } public List<BenefitOptionPlanOutputDto> BenefitOptionPlans { get; set; }
BenefitOptionPlanOutputDto public int TenantId { get; set; } public long Id { get; set; } public long BenefitOptionId { get; set; } public DateTime FromDate { get; set; } public short RuleType { get; set; } public int? RuleId { get; set; } public BenefitEnrolmentRuleOutputDto BenefitEnrolmentRule;
BenefitOptionPlanOutputDto is generic table we have where all the rules are attached. One of the rule is BenefitEnrolmentRuleOutputDto which is identfied by RuleType and RuleId. So there is no FK association defined between RuleId and BenefitEnrolmentRuleOutputDto.
BenefitEnrolmentRuleOutputDto public int TenantId { get; set; } public int Id { get; set; } public string GracePeriod { get; set; } public List<DependentEnrolmentRuleOutputDto> DependentEnrolmentRules { get; set; } public List<EmploymentRuleOutputDto> EmploymentRules { get; set; } public List<TrappingRuleOutputDto> TrappingRules { get; set; }
Hope this helps!
Thanks
I don't know why it didn't close. Is it because of first line in the code I posted.. var benefitOption = await _benefitOptionRepository.GetAsync(input.Id);
Thanks for the response though.
I have responded in the other issue I started and closed...below is the response.
@tugrulkarakaya, where did you add these below lines?
I have added to the .module.ts file below lines... Import { BsDropdownModule } from 'ngx-bootstrap'; and in @NgModule({ imports: [ BsDropdownModule.forRoot()
@tugrulkarakaya, where did you add these below lines?
I have added to the .module.ts file below lines... Import { BsDropdownModule } from 'ngx-bootstrap'; and in @NgModule({ imports: [ BsDropdownModule.forRoot()
adding BsDropdownModule from 'ngx-bootstrap' to the module fixed the issue.
@BobIngham, did you get metronic portlets working? I have the same issue when I tried to incorporate mWizard. I gave up finally. I feel Metronic is bloated to carry around in the project for limited usage overall. Wish I can completely get rid of it from ANZ and use just bootstrap.
Thanks for the pointer. I have looked at it and Metronic Angular Demo still used JS file and it is loaded as
this._script.loadScripts('app-wizard-wizard-4',
['assets/demo/default/custom/crud/wizard/wizard.js']);
Even then I don't see form on the right... [attachment=0:31jjo1wn]3.PNG[/attachment:31jjo1wn]
I was tried to recreate with typescript and getting following error... "mWizard is not defined at...."
I went through Metronic forums and found this....I implemented the same, but no use. [https://keenthemes.com/forums/topic/how-to-implement-form-wizard-in-my-angular-5-application-with-metronic-5-theme/ ])
Hope to solve this problem. Any help would be appreciated.
In addition to the above message. After getting latest sample html code for wizard from metronic website, color schema picked up now in the wizard but wizard.js methods are not executed.
Anyone know how to define anchors in the page (on div) and navigate with to the anchor section in angular.
Thanks