Skip to content
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

Goal Resource rendering #30

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

tarekadel89
Copy link
Contributor

added rendering for Goal Resource.. Goal.svelte was newly added and IPSContent.svelte was updated

IPS

@jddamore
Copy link
Owner

jddamore commented Feb 7, 2025

@tarekadel89 Overall this looks good. 1 comment:

  1. I like the date function you use, although I think we've been simpler overall in the viewer. For consistency with other templates, we could change the function formatDate(dateStr: string): string {
    if (dateStr) {
    return dateStr.split("T")[0];
    }
    else return '??'
    // const options: Intl.DateTimeFormatOptions = { day: '2-digit', month: 'short', year: 'numeric' };
    // const date = new Date(dateStr);
    // return date.toLocaleDateString('en-GB', options);
    }
    This looks more consistent with what we do here https://github.com/jddamore/IPSviewer/blob/main/src/lib/components/resource-templates/Condition.svelte#L66 and in other templates

Alternatively, we could stick this function across other templates generally. I do like the DD-mmm-YYYY as it's more readable than the YYYY-mm-dd format. Asking @daniellrgn if he has a preference.

Thanks. Let me know on above and I'll work to get this pulled in and updated on ipsviewer.com next week.

@tarekadel89
Copy link
Contributor Author

I can align the dates of the Goal resource with the other resources for now. Then if we log another issue, I can go and update all the dates in the viewer and make sure they are in dd-mmm-yyyy format in another pull request. How does that sound?

@tarekadel89
Copy link
Contributor Author

The date has now been fixed

@jddamore
Copy link
Owner

Will work to get this integrated and online tomorrow (by end of business 2/11 US ET)

@jddamore jddamore merged commit e4fa8f8 into jddamore:main Feb 12, 2025
@jddamore
Copy link
Owner

#31

@jddamore
Copy link
Owner

@tarekadel89 I merged and updated online. Try out and let me know if anything not working. Any more work you want to do is welcome. I don't get much time to work on this, but it could be a lot better.

@tarekadel89
Copy link
Contributor Author

tarekadel89 commented Feb 12, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants