-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add fleet management grid sample #10
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
If running the app with the latest changes after the "Refactor structure of data and data handling" commit you should delete the |
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.
Not sure if the images under public/photos/.old are used anywhere. If not they can be removed. Other than that LGTM.
|
private driverOverlayId: string | null = null; | ||
|
||
//overlay toggle flags | ||
public isLocationOverlayActive = false; |
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.
For consistency can you assign type boolean to these two variables as well
|
||
//chart periods | ||
public periods = { | ||
costPerTypePeriod: "ytd", |
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.
These values are used in several places ("ytd", "3months", "6months", "12months") . Can you put them in an Enum or some shared object?
} | ||
|
||
//driver details for detail overlay | ||
public driverDetails = { |
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.
Interface for this so that you can assign a type to it
|
||
//handling for chart periods | ||
public onPeriodChange(event: any, chart: string): void { | ||
if (chart == "costsPerType") { |
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.
Is there any reason to use ==
instead of ===
?
Also can you put all flying around strings in variables? If they are repeating over different files, please put them in a shared location.
|
||
const driverDetails = this.dataService.getDriverData(driverName); | ||
|
||
this.driverDetails.name = driverDetails?.name as string; |
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 use driverDetails?.name || ""
instead of "as string".
This will ensure us that we have an empty string if driverDetails.name has a falsy value. Same goes for all of the fields following
…minchev/master-detail-grid
To-do: