-
Notifications
You must be signed in to change notification settings - Fork 56
Compatibility with hangfire beta (1.7.0) #9
Compatibility with hangfire beta (1.7.0) #9
Conversation
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.
- the defaults should stay as they currently are, those describe the most common scenario the library is used
- the /docs folder (used by Github Pages to serve the demo) should be manually updated with the latest app build as this is not done automatically yet (use
npm run docs
command) - when setting
hideSeconds: false, hideYears: false
we get an error: "Uncaught (in promise): Invalid cron expression, there must be 7 segments" - please double check your changes and ensure no breaking changes are introduced
57a9177
to
303ffb2
Compare
hideSeconds: boolean; | ||
hideSeconds: boolean; //hides the seconds field in the UI | ||
|
||
removeSeconds: false; // removes seconds from the CRON expression |
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.
Please make these two members boolean
, otherwise you can only assign false to them
@@ -295,5 +295,8 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<div clas="row" *ngIf="!state.validation.isValid"> |
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.
class
instead of clas
here
private cronIsValid(cron: string): boolean { | ||
if (cron) { | ||
const cronParts = cron.split(" "); | ||
private cronIsValid(cron: string): void { |
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.
Please note that this method is called on line 230 and a return value is expected there, therefore void
is not appropriate. Decide upon returning a value or not and name the method accordingly
303ffb2
to
2a03906
Compare
2a03906
to
c4da518
Compare
Added new option hideYears; the generated cron expression now takes hideSeconds and hideYears into account - i.e. when they are set to true the generated cron will omit seconds and years from the expression, thus making the expression compatible with Hangfire beta