-
Notifications
You must be signed in to change notification settings - Fork 17
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
Fix topic score rules #650
Conversation
Add DB migration 1.0.10
pageMax: yup | ||
.string() | ||
.optional() | ||
.when('pageMin', (pageMin: string, schema: any) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validation to ensure the max page is greater than the minimum page.
rPageMax !== undefined && | ||
(vPage === 0 || vPage < rPageMin || vPage > rPageMax)) || | ||
(cPageMin !== undefined && | ||
vcPage !== cPageMin && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle letter comparison too.
@@ -31,7 +31,7 @@ export const initialContentState: IContentState = { | |||
sort: [], | |||
}, | |||
filterAdvanced: { | |||
fieldType: fieldTypes[3].value, | |||
fieldType: fieldTypes[1].value, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default is source
@@ -11,8 +11,8 @@ public override void Configure(EntityTypeBuilder<TopicScoreRule> builder) | |||
builder.Property(m => m.SourceId).IsRequired(); | |||
builder.Property(m => m.SeriesId); | |||
builder.Property(m => m.Section).HasMaxLength(100); | |||
builder.Property(m => m.PageMin); | |||
builder.Property(m => m.PageMax); | |||
builder.Property(m => m.PageMin).HasMaxLength(5); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to string value. I don't know how this wasn't included in my prior PR. I think there was a git merge issue I must have run into because I did convert this to a string at one point.
Fixing topic score rules admin page validation. Also defaulting advanced filter to source.
Add DB migration 1.0.10.