-
Notifications
You must be signed in to change notification settings - Fork 491
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into issues/8264-VentilatorData-ConsultationPage
- Loading branch information
Showing
27 changed files
with
4,633 additions
and
4,371 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
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 |
---|---|---|
|
@@ -13,6 +13,8 @@ RUN npm install | |
|
||
COPY . . | ||
|
||
RUN npm run setup | ||
|
||
RUN npm run build | ||
|
||
|
||
|
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 |
---|---|---|
|
@@ -47,7 +47,8 @@ | |
"prepare": "husky install", | ||
"lint": "eslint ./src", | ||
"lint-fix": "eslint ./src --fix", | ||
"format": "prettier ./src --write" | ||
"format": "prettier ./src --write", | ||
"sort-locales": "node ./scripts/sort-locales.js" | ||
}, | ||
"dependencies": { | ||
"@fontsource/figtree": "^5.1.0", | ||
|
@@ -163,10 +164,13 @@ | |
"prettier --write --ignore-unknown --plugin prettier-plugin-tailwindcss", | ||
"eslint --fix", | ||
"git update-index --again" | ||
], | ||
"src/Locale/*.json": [ | ||
"npm run sort-locales" | ||
] | ||
}, | ||
"engines": { | ||
"node": ">=20.12.0" | ||
}, | ||
"packageManager": "[email protected]" | ||
} | ||
} |
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const fs = require("fs"); | ||
|
||
const file = "src/Locale/en.json"; | ||
|
||
const data = JSON.parse(fs.readFileSync(file, "utf8")); | ||
|
||
const sortedData = Object.keys(data) | ||
.sort() | ||
.reduce((acc, key) => { | ||
acc[key] = data[key]; | ||
return acc; | ||
}, {}); | ||
|
||
fs.writeFileSync(file, JSON.stringify(sortedData, null, 2) + "\n"); |
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
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,32 +1,41 @@ | ||
import { Link } from "raviger"; | ||
import { FacilityModel } from "./models"; | ||
import { ReactNode } from "react"; | ||
import { Avatar } from "@/Components/Common/Avatar"; | ||
|
||
export default function FacilityBlock(props: { facility: FacilityModel }) { | ||
const { facility } = props; | ||
export default function FacilityBlock(props: { | ||
facility: FacilityModel; | ||
redirect?: boolean; | ||
}) { | ||
const { facility, redirect = true } = props; | ||
|
||
const Element = (props: { children: ReactNode; className?: string }) => | ||
redirect ? ( | ||
<Link | ||
target="_blank" | ||
href={`/facility/${facility.id}`} | ||
className={props.className} | ||
> | ||
{props.children} | ||
</Link> | ||
) : ( | ||
<button className={props.className}>{props.children}</button> | ||
); | ||
|
||
return ( | ||
<Link | ||
className="flex items-center gap-4 text-inherit" | ||
target="_blank" | ||
href={`/facility/${facility.id}`} | ||
> | ||
<div className="flex aspect-square h-14 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-gray-400 bg-gray-200"> | ||
{facility.read_cover_image_url ? ( | ||
<img | ||
className="h-full w-full object-cover" | ||
src={facility.read_cover_image_url} | ||
/> | ||
) : ( | ||
<Avatar name={facility.name!} square={true} /> | ||
)} | ||
<Element className="flex items-center gap-4 text-left text-inherit"> | ||
<div className="flex aspect-square h-14 shrink-0 items-center justify-center overflow-hidden"> | ||
<Avatar | ||
name={facility.name!} | ||
imageUrl={facility.read_cover_image_url} | ||
/> | ||
</div> | ||
<div> | ||
<b className="font-semibold">{facility.name}</b> | ||
<p className="text-sm"> | ||
{facility.address} {facility.local_body_object?.name} | ||
</p> | ||
</div> | ||
</Link> | ||
</Element> | ||
); | ||
} |
Oops, something went wrong.