From a190caa8af219ca2813b57f837324c13d169d2a1 Mon Sep 17 00:00:00 2001 From: Abu Taher Muhamamd Date: Fri, 19 Jan 2024 11:07:42 +0600 Subject: [PATCH] style: added responsive support --- public/sw.js | 2 +- .../PageRootComponent.tsx | 2 +- .../[id]/PageRootComponent.tsx | 0 src/app/{donations => funds}/[id]/page.tsx | 0 src/app/{donations => funds}/new/page.tsx | 4 +- src/app/{donations => funds}/page.tsx | 4 +- src/app/team/PageRootComponent.tsx | 41 ----------- src/app/team/page.tsx | 28 -------- src/app/teams/[id]/PageRootComponent.tsx | 41 +++++++++-- src/app/teams/[id]/page.tsx | 28 ++++++-- src/app/{team => teams}/new/page.tsx | 0 .../data/{donations.json => funds.json} | 0 .../BloodRequestTableMenu.tsx | 47 ------------- .../BloodRequestTable/TableMenu.tsx | 50 +++++++++++++ .../blood-request/BloodRequestTable/data.tsx | 19 ++++- .../blood-request/BloodRequestTable/index.tsx | 70 +++---------------- .../DonationForm => funds/FundForm}/index.tsx | 16 ++--- .../FundTable/FundTableMenu.tsx} | 4 +- .../FundTable}/data.tsx | 2 +- .../FundTable}/index.tsx | 16 ++--- .../ui/DataGrid/DataTableToolbar.tsx | 56 --------------- src/components/ui/DataGrid/index.tsx | 4 +- src/components/ui/button.tsx | 5 +- .../ui/dashboard/DashboardMenuBar/index.tsx | 17 ++--- 24 files changed, 174 insertions(+), 282 deletions(-) rename src/app/{donations => funds}/PageRootComponent.tsx (96%) rename src/app/{donations => funds}/[id]/PageRootComponent.tsx (100%) rename src/app/{donations => funds}/[id]/page.tsx (100%) rename src/app/{donations => funds}/new/page.tsx (92%) rename src/app/{donations => funds}/page.tsx (85%) delete mode 100644 src/app/team/PageRootComponent.tsx delete mode 100644 src/app/team/page.tsx rename src/app/{team => teams}/new/page.tsx (100%) rename src/assets/data/{donations.json => funds.json} (100%) delete mode 100644 src/components/blood-request/BloodRequestTable/BloodRequestTableMenu.tsx create mode 100644 src/components/blood-request/BloodRequestTable/TableMenu.tsx rename src/components/{donations/DonationForm => funds/FundForm}/index.tsx (97%) rename src/components/{donations/DonationTable/DonationTableMenu.tsx => funds/FundTable/FundTableMenu.tsx} (92%) rename src/components/{donations/DonationTable => funds/FundTable}/data.tsx (98%) rename src/components/{donations/DonationTable => funds/FundTable}/index.tsx (90%) diff --git a/public/sw.js b/public/sw.js index a61ad5e..ac2af94 100644 --- a/public/sw.js +++ b/public/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const t=(t,n)=>(t=new URL(t+".js",n).href,s[t]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=t,e.onload=s,document.head.appendChild(e)}else e=t,importScripts(t),s()})).then((()=>{let e=s[t];if(!e)throw new Error(`Module ${t} didn’t register its module`);return e})));self.define=(n,a)=>{const i=e||("document"in self?document.currentScript.src:"")||location.href;if(s[i])return;let c={};const r=e=>t(e,i),d={module:{uri:i},exports:c,require:r};s[i]=Promise.all(n.map((e=>d[e]||r(e)))).then((e=>(a(...e),c)))}}define(["./workbox-9b4d2a02"],(function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/_next/app-build-manifest.json",revision:"8da8207e589be76d51b223923c5db4d1"},{url:"/_next/static/chunks/08e32899-4dc32a50b805514c.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/0e5ce63c-7fd9b7f19dc821f1.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/1768-86ded08b9524cab0.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/2323-223dccd0362f7d1f.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/2430-34f315d03ce8bb52.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/29d61979-105f1dc9d48d9bfe.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/2bc40315-600f0a8a726d2591.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/3046-b72e2e796c33f0bb.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/3406-7d87780e9bbe04af.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/3706-0be7ada16e1dac16.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/3794-35b23c763ea7c9f8.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/3939862f-6423aeb21d74155a.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/3db6e918-c1b293e63382677c.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/41230c25-7981e50ccadaf3da.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/4130.f958a065fc28420a.js",revision:"f958a065fc28420a"},{url:"/_next/static/chunks/4296-e2a5008e061a6336.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/4459-6adfde6017338b6b.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/4592-edf7f4c2d4e14691.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/4777.6bf9607115a77002.js",revision:"6bf9607115a77002"},{url:"/_next/static/chunks/4893-b6eeea4eeaacf161.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/493-deadbe5e499df3ac.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/4938-ccb28c4005f9efe4.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/5250-9dd6a100b1193a2f.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/5414-7889d732c2f291e2.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/5afae9cd-6ea09ff946b1ff5a.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/5c4a068a-7e8966df4b5d79fa.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/6626-1e08119940debf15.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/6691-1da1fb425aac2387.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/6947-821201bc87961003.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/6c3d43bb-2a01e690fef2ff50.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/758a8f17-6ae99216c9abf856.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/7803-62a7286981089b5d.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/7816-7d735086bad1695d.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/7b0fbde8-ec7c215460d669d7.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/8098-e6dba986614b79a6.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/8529-824d8fa82eca32ab.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/8808b817-f5e0ff04001a3837.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/8929-0ef5d905bf83bc26.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/8bd30861-1adfaf9617b73f35.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/9124.c5583a11902a20a3.js",revision:"c5583a11902a20a3"},{url:"/_next/static/chunks/9252-d33e68205239d45d.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/9948.ef74c3a37802453e.js",revision:"ef74c3a37802453e"},{url:"/_next/static/chunks/af164d00-06523487236bd9e6.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/about/page-00f24e1ede9ad086.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/auth/error/page-475fd53a7e799906.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/auth/login/page-6eec2342f2209667.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/auth/recovery/page-8dd6323aec72e5ed.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/auth/register/page-1e990b04a27cb4f8.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/auth/verification/page-fbe5da949e6402e6.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/blood-requests/%5Bid%5D/page-dde3496fd29583c2.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/blood-requests/new/page-a2850499e265b55e.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/blood-requests/page-d528bcfe15263204.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/clubs/%5Bid%5D/page-8703e9169d579611.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/clubs/new/page-b5c27a28499e953f.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/clubs/page-cc53831098b4f0a8.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/collection-centers/%5Bid%5D/page-f01d153e36b99954.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/collection-centers/new/page-119472f8f5086c1c.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/collection-centers/page-c69ee5a5063093c6.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/contacts/%5Bid%5D/page-83e28d85fbf1a5c5.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/contacts/new/page-ce950c4185ef254d.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/contacts/page-e05a96d806a3812a.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/dashboard/page-dc357f45f5e051a4.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/donations/%5Bid%5D/page-620fabf3582e20bd.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/donations/new/page-b9deceb207363a7e.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/donations/page-4bbdcc7c6e7fd4c7.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/events/%5Bid%5D/page-8a8d6bddb767c370.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/events/new/page-bc84cf86399b4653.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/events/page-981798bf4e1661be.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/layout-898db79e4dea7ff0.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/members/%5Bid%5D/page-5487d8d5907a26a6.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/members/new/page-bead541f72619cad.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/members/page-64faa2fbfdf07965.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/not-found-2be31c07d4c4f4d7.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/page-d715cd15cb2bd0bc.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/profile/page-8c4a7366a1dc31e1.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/settings/page-6fc0df1d45b28a01.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/supports/%5Bid%5D/page-8ab6421bdfeaa1d9.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/supports/page-6fd2a99a700b7860.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/system-status/page-c447c8bf1e479bfe.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/team/new/page-dca0b4ea478e66a4.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/team/page-5dd1ebe0c595843d.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/teams/%5Bid%5D/page-720daf8fa1d41bce.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/teams/page-a4e39a863693ecc4.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/template-19991ed639416e8a.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/updates/%5Bid%5D/page-2a970f93ab620d4f.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/updates/page-03e91c9d62b72c5d.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/users/%5Bid%5D/page-737840ce63c4e33e.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/app/users/page-788d2243aeec512a.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/bc9585cc-efeea0a8f64a6496.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/bc9c7fc9-0a81ef0f2047f9ed.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/bd8d7054-0a7f5415a3be3aec.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/c36591c5-ac6675b99e13b07d.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/fd9d1056-d1c67a117fee380b.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/framework-08aa667e5202eed8.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/main-0e4bb5896ca3cf34.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/main-app-1716ea9587512bf4.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/pages/_app-31397adcb4d2b835.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/pages/_error-b225d4412fb76f89.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js",revision:"837c0df77fd5009c9e46d446188ecfd0"},{url:"/_next/static/chunks/webpack-6d98c0d93d1ed898.js",revision:"m0Pf_ykLPJrU10htpzM2d"},{url:"/_next/static/css/f28c55d9134d3cac.css",revision:"f28c55d9134d3cac"},{url:"/_next/static/m0Pf_ykLPJrU10htpzM2d/_buildManifest.js",revision:"a27b2b7607326fa26b144e657011ec52"},{url:"/_next/static/m0Pf_ykLPJrU10htpzM2d/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/_next/static/media/bg.86ac577b.svg",revision:"bc3d32a696895f78c19df6c717586a5d"},{url:"/_next/static/media/excel.c7062cd0.svg",revision:"34cf935682b191a067d4ff73b6c7f327"},{url:"/_next/static/media/simbio-color.f63f6e4e.svg",revision:"e0e42a4910d487f72d921441275452bd"},{url:"/_next/static/media/simbio-full-white.06b0c7e3.svg",revision:"4e2882ac080016bfbed85ef7f12b5dab"},{url:"/favicon.svg",revision:"304206e624e919ea42e9303468a9d467"},{url:"/image/branding/simbio-color.svg",revision:"e0e42a4910d487f72d921441275452bd"},{url:"/image/logo/bss.jpg",revision:"c1bb0f7efff7cd6eeade2909567e1968"},{url:"/image/logo/rcs.svg",revision:"6d87fc00f2c0c4a648bd8c2c62b063b3"},{url:"/manifest.json",revision:"eda0e74adca523815b81bdb7d96287a2"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:s,event:t,state:n})=>s&&"opaqueredirect"===s.type?new Response(s.body,{status:200,statusText:"OK",headers:s.headers}):s}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;const s=e.pathname;return!s.startsWith("/api/auth/")&&!!s.startsWith("/api/")}),new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")}),new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>!(self.origin===e.origin)),new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")})); +if(!self.define){let e,s={};const a=(a,t)=>(a=new URL(a+".js",t).href,s[a]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=a,e.onload=s,document.head.appendChild(e)}else e=a,importScripts(a),s()})).then((()=>{let e=s[a];if(!e)throw new Error(`Module ${a} didn’t register its module`);return e})));self.define=(t,n)=>{const i=e||("document"in self?document.currentScript.src:"")||location.href;if(s[i])return;let c={};const g=e=>a(e,i),u={module:{uri:i},exports:c,require:g};s[i]=Promise.all(t.map((e=>u[e]||g(e)))).then((e=>(n(...e),c)))}}define(["./workbox-9b4d2a02"],(function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/_next/app-build-manifest.json",revision:"694574bd07d197ca0359ac16805acd1a"},{url:"/_next/static/4H4JggqMByW6uvJ3gaSvD/_buildManifest.js",revision:"a27b2b7607326fa26b144e657011ec52"},{url:"/_next/static/4H4JggqMByW6uvJ3gaSvD/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/_next/static/chunks/08e32899-4dc32a50b805514c.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/0e5ce63c-a0977ceabe13a931.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/1768-86ded08b9524cab0.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/2323-223dccd0362f7d1f.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/2430-34f315d03ce8bb52.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/29d61979-105f1dc9d48d9bfe.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/2bc40315-600f0a8a726d2591.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/3046-b72e2e796c33f0bb.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/3406-7d87780e9bbe04af.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/3706-0be7ada16e1dac16.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/3794-35b23c763ea7c9f8.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/3939862f-6423aeb21d74155a.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/3db6e918-c1b293e63382677c.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/41230c25-7981e50ccadaf3da.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/4130.f958a065fc28420a.js",revision:"f958a065fc28420a"},{url:"/_next/static/chunks/4296-c0dd40766eb564ac.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/4459-6adfde6017338b6b.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/4592-edf7f4c2d4e14691.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/4777.6bf9607115a77002.js",revision:"6bf9607115a77002"},{url:"/_next/static/chunks/4893-b6eeea4eeaacf161.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/493-c08449f959f8f3c4.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/4938-ccb28c4005f9efe4.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/5250-9dd6a100b1193a2f.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/5414-7889d732c2f291e2.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/5afae9cd-6ea09ff946b1ff5a.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/5c4a068a-7e8966df4b5d79fa.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/6626-1e08119940debf15.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/6691-1da1fb425aac2387.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/6947-821201bc87961003.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/6c3d43bb-2a01e690fef2ff50.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/758a8f17-6ae99216c9abf856.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/7803-62a7286981089b5d.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/7816-7d735086bad1695d.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/7b0fbde8-ec7c215460d669d7.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/8098-e6dba986614b79a6.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/8529-824d8fa82eca32ab.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/8808b817-f5e0ff04001a3837.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/8929-0ef5d905bf83bc26.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/8bd30861-1adfaf9617b73f35.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/9124.c5583a11902a20a3.js",revision:"c5583a11902a20a3"},{url:"/_next/static/chunks/9252-d33e68205239d45d.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/9948.ef74c3a37802453e.js",revision:"ef74c3a37802453e"},{url:"/_next/static/chunks/af164d00-06523487236bd9e6.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/about/page-00f24e1ede9ad086.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/auth/error/page-475fd53a7e799906.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/auth/login/page-6c7b7ded1c7988f4.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/auth/recovery/page-37fdbb9e344b6aa7.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/auth/register/page-38ba29b930a3b723.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/auth/verification/page-3e3ba25f32f6556e.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/blood-requests/%5Bid%5D/page-7ab17f50eaedfd79.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/blood-requests/new/page-27843af4cbf42aca.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/blood-requests/page-fd85fde9ab24c412.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/clubs/%5Bid%5D/page-431c56bd3af2e392.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/clubs/new/page-e99e81c8edb43c07.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/clubs/page-27e3442fb2337b32.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/collection-centers/%5Bid%5D/page-4ce5996c470c4543.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/collection-centers/new/page-c3b7a02edc0c2b96.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/collection-centers/page-3ae9ea7585b4e0ba.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/contacts/%5Bid%5D/page-1ad9057a83037b29.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/contacts/new/page-28d8c7018a0d1244.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/contacts/page-356d5255bcb14fef.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/dashboard/page-a88f287d16b4f205.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/events/%5Bid%5D/page-0f3c5bf1bec7a89e.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/events/new/page-8da71b4094234442.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/events/page-00c608e5381c1632.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/funds/%5Bid%5D/page-fc598f5e47b7841b.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/funds/new/page-685f060d870d8120.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/funds/page-796359a40c3654e4.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/layout-b2e77ec395b9def5.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/members/%5Bid%5D/page-986d981c75fc9259.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/members/new/page-393a10846ea7b1c0.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/members/page-73c3f887f29236ff.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/not-found-eac827e89f3a7420.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/page-d715cd15cb2bd0bc.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/profile/page-731cc10fb4ca4263.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/settings/page-6fc0df1d45b28a01.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/supports/%5Bid%5D/page-4978cdc992a68552.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/supports/page-6fd2a99a700b7860.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/system-status/page-3f409ce62545cfc5.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/teams/%5Bid%5D/page-d4784736ad1ccfa9.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/teams/new/page-5e61b0929438359c.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/teams/page-49f7d5c342d55e55.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/template-19991ed639416e8a.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/updates/%5Bid%5D/page-f21f64567083690d.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/updates/page-9bc0ee680071f4cb.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/users/%5Bid%5D/page-a1846e8466eb02de.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/app/users/page-e5d45b0d52696f97.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/bc9585cc-efeea0a8f64a6496.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/bc9c7fc9-0a81ef0f2047f9ed.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/bd8d7054-0a7f5415a3be3aec.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/c36591c5-ac6675b99e13b07d.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/fd9d1056-d1c67a117fee380b.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/framework-08aa667e5202eed8.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/main-061330a4d02ba8d9.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/main-app-1716ea9587512bf4.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/pages/_app-31397adcb4d2b835.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/pages/_error-b225d4412fb76f89.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js",revision:"837c0df77fd5009c9e46d446188ecfd0"},{url:"/_next/static/chunks/webpack-c48d1e8f72746c0a.js",revision:"4H4JggqMByW6uvJ3gaSvD"},{url:"/_next/static/css/38ab6147cc5a0b40.css",revision:"38ab6147cc5a0b40"},{url:"/_next/static/media/bg.86ac577b.svg",revision:"bc3d32a696895f78c19df6c717586a5d"},{url:"/_next/static/media/excel.c7062cd0.svg",revision:"34cf935682b191a067d4ff73b6c7f327"},{url:"/_next/static/media/simbio-color.f63f6e4e.svg",revision:"e0e42a4910d487f72d921441275452bd"},{url:"/_next/static/media/simbio-full-white.06b0c7e3.svg",revision:"4e2882ac080016bfbed85ef7f12b5dab"},{url:"/favicon.svg",revision:"304206e624e919ea42e9303468a9d467"},{url:"/image/branding/simbio-color.svg",revision:"e0e42a4910d487f72d921441275452bd"},{url:"/image/logo/bss.jpg",revision:"c1bb0f7efff7cd6eeade2909567e1968"},{url:"/image/logo/rcs.svg",revision:"6d87fc00f2c0c4a648bd8c2c62b063b3"},{url:"/manifest.json",revision:"eda0e74adca523815b81bdb7d96287a2"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:s,event:a,state:t})=>s&&"opaqueredirect"===s.type?new Response(s.body,{status:200,statusText:"OK",headers:s.headers}):s}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;const s=e.pathname;return!s.startsWith("/api/auth/")&&!!s.startsWith("/api/")}),new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")}),new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>!(self.origin===e.origin)),new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")})); diff --git a/src/app/donations/PageRootComponent.tsx b/src/app/funds/PageRootComponent.tsx similarity index 96% rename from src/app/donations/PageRootComponent.tsx rename to src/app/funds/PageRootComponent.tsx index f2dee1d..149e108 100644 --- a/src/app/donations/PageRootComponent.tsx +++ b/src/app/funds/PageRootComponent.tsx @@ -6,7 +6,7 @@ import ChartMemberActivity from "@/components/charts/ChartMemberActivity"; import ChartMemberAgeDemographic from "@/components/charts/ChartMemberAgeDemographic"; import DonationTable, { TDonationItem, -} from "@/components/donations/DonationTable"; +} from "@/components/funds/FundTable"; export type DonationResponseType = { data: TDonationItem[]; diff --git a/src/app/donations/[id]/PageRootComponent.tsx b/src/app/funds/[id]/PageRootComponent.tsx similarity index 100% rename from src/app/donations/[id]/PageRootComponent.tsx rename to src/app/funds/[id]/PageRootComponent.tsx diff --git a/src/app/donations/[id]/page.tsx b/src/app/funds/[id]/page.tsx similarity index 100% rename from src/app/donations/[id]/page.tsx rename to src/app/funds/[id]/page.tsx diff --git a/src/app/donations/new/page.tsx b/src/app/funds/new/page.tsx similarity index 92% rename from src/app/donations/new/page.tsx rename to src/app/funds/new/page.tsx index 0d15ad3..6fdbe88 100644 --- a/src/app/donations/new/page.tsx +++ b/src/app/funds/new/page.tsx @@ -1,5 +1,5 @@ "use client"; -import DonationForm from "@/components/donations/DonationForm"; +import DonationForm from "@/components/funds/FundForm"; import Layout from "@/components/ui/Layout"; // import Alert from "@/components/ui/Alert"; import { PeopleAdd24Regular } from "@fluentui/react-icons"; @@ -12,7 +12,7 @@ const BREADCRUMB_MENU = [ }, { title: "Donations", - url: "/donations", + url: "funds", }, { title: "New", diff --git a/src/app/donations/page.tsx b/src/app/funds/page.tsx similarity index 85% rename from src/app/donations/page.tsx rename to src/app/funds/page.tsx index f62dd4f..976ffde 100644 --- a/src/app/donations/page.tsx +++ b/src/app/funds/page.tsx @@ -1,6 +1,6 @@ import PageRootComponent, { TPageConfig } from "./PageRootComponent"; import { memo } from "react"; -import data from "@/assets/data/donations.json"; +import data from "@/assets/data/funds.json"; /** * Retrieves data from the specified URL. @@ -8,7 +8,7 @@ import data from "@/assets/data/donations.json"; * @return {Promise} The retrieved data. */ // async function getData(): Promise { -// const res = await fetch("/data/donations.json"); +// const res = await fetch("/datafunds.json"); // const data = await res.json(); // return data; diff --git a/src/app/team/PageRootComponent.tsx b/src/app/team/PageRootComponent.tsx deleted file mode 100644 index b43c9e9..0000000 --- a/src/app/team/PageRootComponent.tsx +++ /dev/null @@ -1,41 +0,0 @@ -"use client"; -import TeamTable, { TTeamItem } from "@/components/team/TeamTable"; -import DashboardLayout from "@/components/ui/dashboard/DashboardLayout"; -import { FC, memo } from "react"; - -export type TeamResponseType = { - data: TTeamItem[]; - offset: number; - total: number; - limit: number; -}; - -export type TPageConfig = { - analytics?: boolean; - settings?: boolean; - table?: boolean; -}; - -interface PageRootComponentPropsType { - data: TeamResponseType; - config: TPageConfig; -} - -const PageRootComponent: FC = ({ - data, - config, -}: PageRootComponentPropsType) => { - return ( - -
- -
-
- ); -}; - -export default memo(PageRootComponent); diff --git a/src/app/team/page.tsx b/src/app/team/page.tsx deleted file mode 100644 index b189f51..0000000 --- a/src/app/team/page.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import PageRootComponent, { TPageConfig } from "./PageRootComponent"; -import { memo } from "react"; -import data from "@/assets/data/team.json"; - -/** - * Retrieves data from the specified URL. - * - * @return {Promise} The retrieved data. - */ -// async function getData(): Promise { -// const res = await fetch("/data/team.json"); -// const data = await res.json(); - -// return data; -// } - -const PageTeam = async () => { - // const data = await getData(); - const config: TPageConfig = { - analytics: false, - settings: false, - table: true, - }; - - return ; -}; - -export default memo(PageTeam); diff --git a/src/app/teams/[id]/PageRootComponent.tsx b/src/app/teams/[id]/PageRootComponent.tsx index 264f510..b43c9e9 100644 --- a/src/app/teams/[id]/PageRootComponent.tsx +++ b/src/app/teams/[id]/PageRootComponent.tsx @@ -1,11 +1,40 @@ -import Layout from "@/components/ui/Layout"; -import { memo } from "react"; +"use client"; +import TeamTable, { TTeamItem } from "@/components/team/TeamTable"; +import DashboardLayout from "@/components/ui/dashboard/DashboardLayout"; +import { FC, memo } from "react"; -const PageRootComponent = () => { +export type TeamResponseType = { + data: TTeamItem[]; + offset: number; + total: number; + limit: number; +}; + +export type TPageConfig = { + analytics?: boolean; + settings?: boolean; + table?: boolean; +}; + +interface PageRootComponentPropsType { + data: TeamResponseType; + config: TPageConfig; +} + +const PageRootComponent: FC = ({ + data, + config, +}: PageRootComponentPropsType) => { return ( - -

Team Details

-
+ +
+ +
+
); }; diff --git a/src/app/teams/[id]/page.tsx b/src/app/teams/[id]/page.tsx index e607904..b189f51 100644 --- a/src/app/teams/[id]/page.tsx +++ b/src/app/teams/[id]/page.tsx @@ -1,8 +1,28 @@ -import PageRootComponent from "./PageRootComponent"; +import PageRootComponent, { TPageConfig } from "./PageRootComponent"; import { memo } from "react"; +import data from "@/assets/data/team.json"; -const PageTeamDetails = async () => { - return ; +/** + * Retrieves data from the specified URL. + * + * @return {Promise} The retrieved data. + */ +// async function getData(): Promise { +// const res = await fetch("/data/team.json"); +// const data = await res.json(); + +// return data; +// } + +const PageTeam = async () => { + // const data = await getData(); + const config: TPageConfig = { + analytics: false, + settings: false, + table: true, + }; + + return ; }; -export default memo(PageTeamDetails); +export default memo(PageTeam); diff --git a/src/app/team/new/page.tsx b/src/app/teams/new/page.tsx similarity index 100% rename from src/app/team/new/page.tsx rename to src/app/teams/new/page.tsx diff --git a/src/assets/data/donations.json b/src/assets/data/funds.json similarity index 100% rename from src/assets/data/donations.json rename to src/assets/data/funds.json diff --git a/src/components/blood-request/BloodRequestTable/BloodRequestTableMenu.tsx b/src/components/blood-request/BloodRequestTable/BloodRequestTableMenu.tsx deleted file mode 100644 index 7bce49f..0000000 --- a/src/components/blood-request/BloodRequestTable/BloodRequestTableMenu.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import { - Menu, - MenuItem, - MenuList, - MenuPopover, - MenuTrigger, - ToolbarButton, -} from "@fluentui/react-components"; -import { - MoreVertical16Regular, - BookQuestionMark24Regular, - Bug24Regular, -} from "@fluentui/react-icons"; -import Link from "next/link"; -import { FC, memo } from "react"; - -const BloodRequestTableMenu: FC = () => { - return ( - - - } - aria-label="More options" - /> - - - - - }> - - Help - - - - }> - - Report issue - - - - - - ); -}; - -export default memo(BloodRequestTableMenu); diff --git a/src/components/blood-request/BloodRequestTable/TableMenu.tsx b/src/components/blood-request/BloodRequestTable/TableMenu.tsx new file mode 100644 index 0000000..de28f9c --- /dev/null +++ b/src/components/blood-request/BloodRequestTable/TableMenu.tsx @@ -0,0 +1,50 @@ +import { Button } from "@/components/ui/button"; +import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "@/components/ui/dropdown-menu"; + + +import { + MoreVertical16Regular, + BookQuestionMark24Regular, + Bug24Regular, +} from "@fluentui/react-icons"; +import Link from "next/link"; +import { FC, memo } from "react"; + +const TableMenu: FC = () => { + return ( + + + + + + + My Account + + + + + + + + + Help + + + + + + + + + + Report issue + + + + + ); +}; + +export default memo(TableMenu); diff --git a/src/components/blood-request/BloodRequestTable/data.tsx b/src/components/blood-request/BloodRequestTable/data.tsx index 72325c4..4cd22f5 100644 --- a/src/components/blood-request/BloodRequestTable/data.tsx +++ b/src/components/blood-request/BloodRequestTable/data.tsx @@ -19,7 +19,7 @@ import { TRequestItem } from "."; export const columns: ColumnDef[] = [ { accessorKey: "name", - header: "User", + header: "Patient", cell: ({ row }) => { return (
@@ -41,9 +41,20 @@ export const columns: ColumnDef[] = [ ); }, }, + { + accessorKey: "blood_group", + enableHiding: true, + }, + { + accessorKey: "quantity", + }, { accessorKey: "blood_type", - header: "Blood Type", + enableHiding: true, + }, + { + id: "blood", + header: "Blood", cell: ({ row }) => { return (
@@ -110,6 +121,8 @@ export const columns: ColumnDef[] = [ }, ]; +export const hiddenColumns = { "blood_group": false, "quantity": false, "blood_type": false }; + // Filter: Telecom Operator export const gender = [ { @@ -223,7 +236,7 @@ export const filters = [ options: blood_groups, }, { - key: "substance", + key: "blood_type", label: "Substance", options: substance, }, diff --git a/src/components/blood-request/BloodRequestTable/index.tsx b/src/components/blood-request/BloodRequestTable/index.tsx index 66c804f..c521e3c 100644 --- a/src/components/blood-request/BloodRequestTable/index.tsx +++ b/src/components/blood-request/BloodRequestTable/index.tsx @@ -1,11 +1,11 @@ "use client"; -import { Button } from "@fluentui/react-components"; import { Add24Regular } from "@fluentui/react-icons"; import { useRouter } from "next/navigation"; import { FC, memo } from "react"; -import BloodRequestTableMenu from "./BloodRequestTableMenu"; +import TableMenu from "./TableMenu"; import { DataGrid } from "@/components/ui/DataGrid"; -import { columns, filters } from "./data"; +import { columns, filters, hiddenColumns } from "./data"; +import { Button } from "@/components/ui/button"; export type TRequestItem = { id: string; @@ -37,58 +37,6 @@ const BloodRequestTable: FC = ({ ...rest }: BloodRequestTablePropsType) => { const router = useRouter(); - const COLUMN = [ - { - key: "patient", - name: "Patient", - fieldName: "patient", - minWidth: 250, - maxWidth: 250, - className: "min-w-[255px]", - }, - { - key: "blood", - name: "Blood", - fieldName: "blood", - minWidth: 100, - maxWidth: 100, - }, - { - key: "delivery_date", - name: "Delivery", - fieldName: "delivery_date", - minWidth: 100, - maxWidth: 100, - }, - { - key: "healthIssue", - name: "Health issue", - fieldName: "healthIssue", - minWidth: 100, - maxWidth: 100, - }, - { - key: "location", - name: "Location", - fieldName: "location", - minWidth: 100, - maxWidth: 100, - }, - { - key: "status", - name: "Status", - fieldName: "status", - minWidth: 100, - maxWidth: 100, - }, - { - key: "phone", - name: "Phone", - fieldName: "phone", - minWidth: 100, - maxWidth: 100, - }, - ]; return (
= ({
- +
{/* Card Body */}
- +
); diff --git a/src/components/donations/DonationForm/index.tsx b/src/components/funds/FundForm/index.tsx similarity index 97% rename from src/components/donations/DonationForm/index.tsx rename to src/components/funds/FundForm/index.tsx index 0371268..52b3339 100644 --- a/src/components/donations/DonationForm/index.tsx +++ b/src/components/funds/FundForm/index.tsx @@ -8,13 +8,13 @@ import { createFormikYupSchema, } from "@/utils/formBuilder.util"; -interface TDonationFormProps { +interface TFundFormProps { className?: string; children?: React.ReactNode; rest?: object; } -interface TDonationForm { +interface TFundForm { // Reference refId: string; @@ -340,18 +340,18 @@ const FORM: TFormBuilderForm = { ], }; -const DonationForm: React.FC = ({ +const FundForm: React.FC = ({ className, children, ...rest -}: TDonationFormProps) => { +}: TFundFormProps) => { const classes = useStyles(); const initialValues = createFormikInitialValue(FORM); const validationSchema = createFormikYupSchema(FORM); const onSubmitHandler = ( - values: TDonationForm, - { setSubmitting }: FormikHelpers, + values: TFundForm, + { setSubmitting }: FormikHelpers, ): void => { setSubmitting(true); @@ -363,7 +363,7 @@ const DonationForm: React.FC = ({ return ( = ({ ); }; -export default memo(DonationForm); +export default memo(FundForm); diff --git a/src/components/donations/DonationTable/DonationTableMenu.tsx b/src/components/funds/FundTable/FundTableMenu.tsx similarity index 92% rename from src/components/donations/DonationTable/DonationTableMenu.tsx rename to src/components/funds/FundTable/FundTableMenu.tsx index 4c5df76..dee6e89 100644 --- a/src/components/donations/DonationTable/DonationTableMenu.tsx +++ b/src/components/funds/FundTable/FundTableMenu.tsx @@ -14,7 +14,7 @@ import { import Link from "next/link"; import { FC, memo } from "react"; -const DontaionTableMenu: FC = () => { +const FundTableMenu: FC = () => { return ( @@ -44,4 +44,4 @@ const DontaionTableMenu: FC = () => { ); }; -export default memo(DontaionTableMenu); +export default memo(FundTableMenu); diff --git a/src/components/donations/DonationTable/data.tsx b/src/components/funds/FundTable/data.tsx similarity index 98% rename from src/components/donations/DonationTable/data.tsx rename to src/components/funds/FundTable/data.tsx index e2bb0ab..bc1bc09 100644 --- a/src/components/donations/DonationTable/data.tsx +++ b/src/components/funds/FundTable/data.tsx @@ -30,7 +30,7 @@ export const columns: ColumnDef[] = [ /> {row.original.name} diff --git a/src/components/donations/DonationTable/index.tsx b/src/components/funds/FundTable/index.tsx similarity index 90% rename from src/components/donations/DonationTable/index.tsx rename to src/components/funds/FundTable/index.tsx index 482f55c..50b97b4 100644 --- a/src/components/donations/DonationTable/index.tsx +++ b/src/components/funds/FundTable/index.tsx @@ -4,8 +4,8 @@ import { tokens, typographyStyles, } from "@fluentui/react-components"; -import { FC, memo, useState } from "react"; -import DonationTableMenu from "./DonationTableMenu"; +import { FC, memo } from "react"; +import DonationTableMenu from "./FundTableMenu"; import { DataGrid } from "@/components/ui/DataGrid"; import { columns, filters } from "./data"; @@ -22,7 +22,7 @@ export type TDonationItem = { reference: string; }; -interface TDonationsTableProps { +interface TFundTableProps { className?: string; title: string; description?: string; @@ -117,15 +117,15 @@ const useStyles = makeStyles({ tbc_prefLocation: {}, }); -const DonationsTable: FC = ({ +const FundTable: FC = ({ className, title, description, data, ...rest -}: TDonationsTableProps) => { - const classes = useStyles(); - const [showSearch, setShowSearch] = useState(false); +}: TFundTableProps) => { + // const classes = useStyles(); + // const [showSearch, setShowSearch] = useState(false); return (
= ({ ); }; -export default memo(DonationsTable); +export default memo(FundTable); diff --git a/src/components/ui/DataGrid/DataTableToolbar.tsx b/src/components/ui/DataGrid/DataTableToolbar.tsx index a65c3cf..9ce0559 100644 --- a/src/components/ui/DataGrid/DataTableToolbar.tsx +++ b/src/components/ui/DataGrid/DataTableToolbar.tsx @@ -5,62 +5,6 @@ import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { DataTableFacetedFilter, TFilterItem } from "./DataTableFacetedFilter"; import { DataTableViewOptions } from "./DataTableViewOptions"; -import { - ArrowDownIcon, - ArrowRightIcon, - ArrowUpIcon, - CheckCircledIcon, - CircleIcon, - CrossCircledIcon, - QuestionMarkCircledIcon, - StopwatchIcon, -} from "@radix-ui/react-icons"; - -export const statuses = [ - { - value: "backlog", - label: "Backlog", - icon: QuestionMarkCircledIcon, - }, - { - value: "todo", - label: "Todo", - icon: CircleIcon, - }, - { - value: "in progress", - label: "In Progress", - icon: StopwatchIcon, - }, - { - value: "done", - label: "Done", - icon: CheckCircledIcon, - }, - { - value: "canceled", - label: "Canceled", - icon: CrossCircledIcon, - }, -]; - -export const priorities = [ - { - label: "Low", - value: "low", - icon: ArrowDownIcon, - }, - { - label: "Medium", - value: "medium", - icon: ArrowRightIcon, - }, - { - label: "High", - value: "high", - icon: ArrowUpIcon, - }, -]; export type DataGridFilter = { key: string; diff --git a/src/components/ui/DataGrid/index.tsx b/src/components/ui/DataGrid/index.tsx index dde67e1..6412e7e 100644 --- a/src/components/ui/DataGrid/index.tsx +++ b/src/components/ui/DataGrid/index.tsx @@ -21,16 +21,18 @@ interface DataGridProps { columns: ColumnDef[]; data: TData[]; filters?: DataGridFilters; + hiddenColumns?: VisibilityState; } export function DataGrid({ columns, data, filters = [], + hiddenColumns = {}, }: DataGridProps) { const [rowSelection, setRowSelection] = React.useState({}); const [columnVisibility, setColumnVisibility] = - React.useState({}); + React.useState({ ...hiddenColumns }); const [columnFilters, setColumnFilters] = React.useState( [], ); diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index f49fa9e..e2521a0 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -10,7 +10,8 @@ const buttonVariants = cva( variants: { variant: { default: - "bg-zinc-900 text-zinc-50 shadow hover:bg-zinc-900/90 dark:bg-zinc-50 dark:text-zinc-900 dark:hover:bg-zinc-50/90", + // "bg-zinc-900 text-zinc-50 shadow hover:bg-zinc-900/90 dark:bg-zinc-50 dark:text-zinc-900 dark:hover:bg-zinc-50/90", + "bg-[#466981] text-white shadow hover:bg-primary-900/90 dark:bg-primary-50 dark:text-primary-900 dark:hover:bg-primary-50/90", destructive: "bg-red-500 text-zinc-50 shadow-sm hover:bg-red-500/90 dark:bg-red-900 dark:text-zinc-50 dark:hover:bg-red-900/90", outline: @@ -37,7 +38,7 @@ const buttonVariants = cva( export interface ButtonProps extends React.ButtonHTMLAttributes, - VariantProps { + VariantProps { asChild?: boolean; } diff --git a/src/components/ui/dashboard/DashboardMenuBar/index.tsx b/src/components/ui/dashboard/DashboardMenuBar/index.tsx index f27fdca..6c0def5 100644 --- a/src/components/ui/dashboard/DashboardMenuBar/index.tsx +++ b/src/components/ui/dashboard/DashboardMenuBar/index.tsx @@ -46,19 +46,20 @@ const profileMenu: IMenuItem[] = [ url: "/clubs", icon: , }, - { - title: "Team", - url: "/team", - icon: , - }, + // Now `Team` is accessible through `Teams` directory. + // { + // title: "Team", + // url: "/team", + // icon: , + // }, { title: "Teams", url: "/teams", icon: , }, { - title: "Donations", - url: "/donations", + title: "Funds", + url: "/funds", icon: , }, { @@ -104,7 +105,7 @@ const profileActionMenu: IMenuItem[] = [ }, { title: "Add Donation", - url: "/donations/new ", + url: "funds/new ", icon: , }, {