Merge pull request 'Implementing_limitListing' (#26) from Implementing_limitListing into main
Deploy to S3 / deploy (push) Successful in 40s
Details
Deploy to S3 / deploy (push) Successful in 40s
Details
Reviewed-on: #26pull/27/head
commit
39af6445b4
|
|
@ -0,0 +1,4 @@
|
||||||
|
# Copy to `.env` at the repo root (gitignored) if you want plain
|
||||||
|
# `docker compose up -d --build` to interpolate ${FRONTEND_PORT} etc.
|
||||||
|
# from backend/.env. Secrets stay in backend/.env only — never commit .env.
|
||||||
|
COMPOSE_ENV_FILES=./backend/.env
|
||||||
|
|
@ -34,13 +34,13 @@ __pycache__/
|
||||||
venv/
|
venv/
|
||||||
env/
|
env/
|
||||||
|
|
||||||
# Environment / secrets — app secrets only in backend/.env (never commit it).
|
# Environment / secrets — NEVER commit real .env files
|
||||||
# Root .env is a Compose pointer (COMPOSE_ENV_FILES) with no secrets; keep it.
|
.env
|
||||||
backend/.env
|
**/.env
|
||||||
.env.*
|
.env.*
|
||||||
!.env
|
**/.env.*
|
||||||
!.env.example
|
!.env.example
|
||||||
!backend/.env.example
|
!**/.env.example
|
||||||
!frontend/.env.development
|
!frontend/.env.development
|
||||||
!frontend/.env.production
|
!frontend/.env.production
|
||||||
|
|
||||||
|
|
@ -71,3 +71,7 @@ tests/**
|
||||||
# Paper form source documents (Annexure A/E/J) — reference material, not code.
|
# Paper form source documents (Annexure A/E/J) — reference material, not code.
|
||||||
# Root-anchored: backend/candidate_forms/ is the forms domain package and IS tracked.
|
# Root-anchored: backend/candidate_forms/ is the forms domain package and IS tracked.
|
||||||
/candidate_forms/
|
/candidate_forms/
|
||||||
|
frontend/dist/** */
|
||||||
|
docker.local.frontend/dist/** */
|
||||||
|
frontend/dist/index.html
|
||||||
|
frontend/dist/index.html
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Belleza&family=Inter:wght@400;500;600;700;800&display=swap" />
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Belleza&family=Inter:wght@400;500;600;700;800&display=swap" />
|
||||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect width='100' height='100' rx='22' fill='%23004d43'/><g transform='translate(14 32) scale(0.72)'><path d='M100 3.65C97.86 20.99 91.89 43.03 79.48 55.33 76 58.77 71.84 61.46 66.96 62.14 50.4 64.46 41.84 47.5 29.07 42.7 21.85 39.98 14.5 42.02 9.66 47.95 6.54 51.78 4.49 56.35 2.97 61.13 2.41 61.64 0.97 61.66 0 61.31L0 0.13C1.05 0 2.27 0.02 3.09 0.28 14.9 15.86 26.77 30.82 40.15 45.28L60.79 24.7C67.38 18.22 74.41 12.74 82.59 8.51 88.11 5.83 93.64 3.93 100 3.65Z' fill='%23ceff71'/></g></svg>" />
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect width='100' height='100' rx='22' fill='%23004d43'/><g transform='translate(14 32) scale(0.72)'><path d='M100 3.65C97.86 20.99 91.89 43.03 79.48 55.33 76 58.77 71.84 61.46 66.96 62.14 50.4 64.46 41.84 47.5 29.07 42.7 21.85 39.98 14.5 42.02 9.66 47.95 6.54 51.78 4.49 56.35 2.97 61.13 2.41 61.64 0.97 61.66 0 61.31L0 0.13C1.05 0 2.27 0.02 3.09 0.28 14.9 15.86 26.77 30.82 40.15 45.28L60.79 24.7C67.38 18.22 74.41 12.74 82.59 8.51 88.11 5.83 93.64 3.93 100 3.65Z' fill='%23ceff71'/></g></svg>" />
|
||||||
<script type="module" crossorigin src="/assets/index-B8pMatmW.js"></script>
|
<script type="module" crossorigin src="/assets/index-CsixWp5R.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index--H0MdQBQ.css">
|
<link rel="stylesheet" crossorigin href="/assets/index--H0MdQBQ.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,17 @@ function css(name) { return getComputedStyle(document.documentElement).getProper
|
||||||
const dpr = window.devicePixelRatio || 1;
|
const dpr = window.devicePixelRatio || 1;
|
||||||
const rect = canvas.getBoundingClientRect();
|
const rect = canvas.getBoundingClientRect();
|
||||||
const w = rect.width || canvas.clientWidth || 600;
|
const w = rect.width || canvas.clientWidth || 600;
|
||||||
const h = parseInt(canvas.getAttribute('height')) || 260;
|
// The LOGICAL height, remembered on first setup. Reading the `height`
|
||||||
|
// attribute here instead would read back the DEVICE-pixel value written
|
||||||
|
// below (h * dpr): with dpr > 1 every redraw multiplied the canvas by dpr,
|
||||||
|
// and the ResizeObserver on the auto-height .chart-wrap fed each growth
|
||||||
|
// straight back in — canvases reached millions of px tall and the chart
|
||||||
|
// became an invisible speck at the top of a giant blank canvas.
|
||||||
|
let h = Number(canvas.dataset.baseHeight);
|
||||||
|
if (!h) {
|
||||||
|
h = parseInt(canvas.getAttribute('height')) || 260;
|
||||||
|
canvas.dataset.baseHeight = String(h);
|
||||||
|
}
|
||||||
canvas.width = w * dpr; canvas.height = h * dpr;
|
canvas.width = w * dpr; canvas.height = h * dpr;
|
||||||
canvas.style.height = h + 'px';
|
canvas.style.height = h + 'px';
|
||||||
const ctx = canvas.getContext('2d');
|
const ctx = canvas.getContext('2d');
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,11 @@ export default function Chart({ type, data, options, height = 260, className = '
|
||||||
const canvas = ref.current
|
const canvas = ref.current
|
||||||
if (!canvas || typeof Charts[type] !== 'function') return undefined
|
if (!canvas || typeof Charts[type] !== 'function') return undefined
|
||||||
|
|
||||||
|
// setup() caches the logical height on first draw (dataset.baseHeight) so a
|
||||||
|
// redraw never reads back the device-pixel height it wrote. Clear it here so
|
||||||
|
// a changed `height` prop is picked up rather than the stale cached value.
|
||||||
|
delete canvas.dataset.baseHeight
|
||||||
|
|
||||||
const draw = () => {
|
const draw = () => {
|
||||||
if (canvas.isConnected && canvas.getBoundingClientRect().width > 0) {
|
if (canvas.isConnected && canvas.getBoundingClientRect().width > 0) {
|
||||||
Charts[type](canvas, data, options)
|
Charts[type](canvas, data, options)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue