-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9340 from ohcnetwork/staging
Production Release 24.50.0
- Loading branch information
Showing
78 changed files
with
1,430 additions
and
1,308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,35 @@ | ||
Care is a React Typescript Project, built with Vite and styled with TailwindCSS. | ||
You are an expert in TypeScript, React, Shadcn UI, Tailwind. | ||
|
||
Care uses a Plugin Architecture. Apps are installed in /apps. | ||
Key Principles | ||
|
||
Care uses a custom useQuery hook to fetch data from the API. APIs are defined in the api.tsx file | ||
- Write concise, technical TypeScript code with accurate examples. | ||
- Use functional and declarative programming patterns; avoid classes. | ||
- Prefer iteration and modularization over code duplication. | ||
- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError). | ||
|
||
Here's an example of how to use the useQuery hook to fetch data from the API: | ||
Naming Conventions | ||
|
||
``` | ||
useQuery from "@/common/hooks/useQuery"; | ||
const { data, loading, error } = useQuery(routes.getFacilityUsers, { | ||
facility_id: "1", | ||
}); | ||
- Use lowercase with dashes for directories (e.g., components/auth-wizard). | ||
- Favor named exports for components. | ||
|
||
request from "@/common/utils/request"; | ||
const { res } = await request(routes.partialUpdateAsset, { | ||
pathParams: { external_id: assetId }, | ||
body: data, | ||
}); | ||
``` | ||
TypeScript Usage | ||
|
||
- Use TypeScript for all code; prefer interfaces over types. | ||
- Avoid enums; use maps instead. | ||
- Use functional components with TypeScript interfaces. | ||
|
||
Syntax and Formatting | ||
|
||
- Use the "function" keyword for pure functions. | ||
- Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements. | ||
- Use declarative JSX. | ||
|
||
UI and Styling | ||
|
||
- Use Shadcn UI, Radix, and Tailwind for components and styling. | ||
- Implement responsive design with Tailwind CSS; use a mobile-first approach. | ||
|
||
General Guidelines | ||
|
||
- Care uses a custom useQuery hook to fetch data from the API. (Docs @ /Utils/request/useQuery) | ||
- APIs are defined in the api.tsx file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,26 +18,20 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
script: | | ||
const thankyouNote = 'Your efforts have helped advance digital healthcare and TeleICU systems. :rocket: Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! :raised_hands:' | ||
const thankyouNote = 'Your efforts have helped advance digital healthcare and TeleICU systems. :rocket: Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! :raised_hands:'; | ||
const options = { | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
} | ||
}; | ||
const result = await github.rest.issues.get({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
}) | ||
const { assignees, user } = result.data | ||
const { data : { assignees, user } } = await github.rest.issues.get(options); | ||
const assignees_tagged = assignees.map((user) => '@' + user.login).join(' ') | ||
const owner_tagged = '@' + user.login | ||
const taggedUsers = [...new Set( | ||
assignees.map(u => "@"+u.login).concat("@"+user.login) | ||
)].join(" ") | ||
if (assignees.length == 0) { | ||
await github.rest.issues.createComment({ ...options, body: `${owner_tagged} ${thankyouNote}` }) | ||
} else { | ||
await github.rest.issues.createComment({ ...options, body: `${assignees_tagged} ${owner_tagged} ${thankyouNote}` }) | ||
} | ||
await github.rest.issues.createComment({ | ||
...options, | ||
body: `${taggedUsers} ${thankyouNote}` | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
files: | ||
- source: /src/Locale/en/*.json | ||
translation: /src/Locale/%two_letters_code%/%original_file_name% | ||
- source: /public/locale/{{lang}}.json | ||
translation: /public/locale/%two_letters_code%/%original_file_name% | ||
bundles: | ||
- 2 | ||
|
Oops, something went wrong.