-
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
#1367 add columns to sites list view #223
Conversation
udmif/api/src/server/datasources.ts
Outdated
@@ -5,7 +5,16 @@ import { Site } from '../site/model'; | |||
import { DeviceDataSource } from '../device/DeviceDataSource'; | |||
import { SiteDataSource } from '../site/SiteDataSource'; | |||
|
|||
export default function dataSources(deviceDAO: DAO<Device>, siteDAO: DAO<Site>): () => DataSources<object> { | |||
interface DS { |
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.
I'd prefer DataSources as an interface name. Although that will conflict with DataSources. :)
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.
Maybe ApiDataSources
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.
sure
export interface SitesArgs { | ||
searchOptions: SearchOptions; | ||
} | ||
|
||
export interface SiteArgs { | ||
id: 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.
We may want to add docs to highlight the differences between Site and Sites
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.
What do you mean?
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.
Why is a singular site only accepting an id while the plural site interface accepting an object with more args?
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.
I thought is what typescript is for, just go see where this interface is used. if we do this, then we should comment all the interfaces everywhere. also, take a look at the device resolver, no types were ever provided into these functions params
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.
should i just remove the types from the site resolver?
udmif/api/src/site/resolvers.ts
Outdated
site.validation?.summary.correct_devices.length, | ||
site.validation?.summary.missing_devices.length, | ||
site.validation?.summary.error_devices.length, | ||
site.validation?.summary.extra_devices.length, |
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.
site.validation?.summary can be extracted to a local var and reused.
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.
sure
"resolveJsonModule": true, | ||
"esModuleInterop": true, |
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.
What do these do?
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.
They allow json to be imported as an es module like all the ways we import instead of requiring.
No description provided.