Conversation
44b9ccd to
ee32423
Compare
shundread
left a comment
There was a problem hiding this comment.
It's mostly fine, but I have a couple of questions
| </> | ||
| )} | ||
| {content_s && ( | ||
| {content_s_rows && Array.isArray(content_s_rows) && content_s_rows.length > 0 && ( |
There was a problem hiding this comment.
nitpick: The standalone content_s_rows is needless since Array.isArray already returns false for all falsy values:
> [null, undefined, false, NaN, 0, -0, 0n, "", document.all].map(v => Array.isArray(v))
[false, false, false, false, false, false, false, false, false]
> Array.isArray([])
true
map-view/src/models.ts
Outdated
| device_plan_id: string; | ||
| mount_type_description_fi: string; | ||
| content_s: Object; | ||
| content_s_rows: Object; |
There was a problem hiding this comment.
according to the documentation of the get_content_s_rows method in traffic_control/models/additional_sign.py this looks like it could be at least some kind of Record<string, object>[] if nothing more specific than that.
Also, prefer object to Object here and on other places where Object is being used: https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html
| <dt>{{ field.verbose_name }}</dt> | ||
| <dd> | ||
| <dl class="content-s-nested"> | ||
| {% for title, display_value in additional_sign.object.get_content_s_rows %} |
There was a problem hiding this comment.
Would it be considered excessive to make a template inclusion tag for this? The <dl> is almost identical to the diff above.
There was a problem hiding this comment.
It is not intentional.
4ee80b4 to
8fa41f3
Compare
Refs: LIIK-881
* content_s_rows also added WFS for AddtitionalSignPlan and Real features. * Show content_s row by row instead of raw data. Refs: LIIK-881
8fa41f3 to
c3ef988
Compare
|




No description provided.