From bc1124c45cc41f6011ad81b7c7c09ebd0ad140b0 Mon Sep 17 00:00:00 2001 From: sanjaypinna Date: Tue, 25 Mar 2025 15:25:57 +0530 Subject: [PATCH 01/16] remove unnecessary data --- app/[locale]/(user)/datasets/data.tsx | 497 -------------------------- 1 file changed, 497 deletions(-) delete mode 100644 app/[locale]/(user)/datasets/data.tsx diff --git a/app/[locale]/(user)/datasets/data.tsx b/app/[locale]/(user)/datasets/data.tsx deleted file mode 100644 index f7af625f..00000000 --- a/app/[locale]/(user)/datasets/data.tsx +++ /dev/null @@ -1,497 +0,0 @@ -export const data = [ - { - id: 'cca765a3-a5cf-4bcd-bc8d-e5447cc498ca', - datasetTitle: - 'Assam, India : Historical Weather Data : 2011-2020 - Guwahati(name may extend upto two lines after which ...)', - description: - ' Daily weather summaries for Guwahati, Assam, India, covering 2011-2020. Variables available for this period include MaxTemperature, Min Temperature, and Total Precipitation.Evapotranspiration, Potential Evapotranspiration, Solar Radiation,& Total Hours of Sunshine are also available, but sometimes missing.', - metadata: { - update: 'Monthly', - category: 'Industrial', - tags: [ - { - title: 'HVD', - }, - { title: 'Must Explore' }, - ], - formats: [ - { - type: 'CSV', - }, - { type: 'JSON' }, - ], - accessModels: [ - { - type: 'Private', - }, - { type: 'Public' }, - ], - accessModelsCount: '8', - location: 'India', - source: 'OGD', - licence: 'Government Open Data License ', - policy: 'National Data Sharing and Accessibility Policy', - organization: 'Open Budget India', - }, - }, - { - id: 'f473c641-8c7e-4e3c-aa0a-16ca29505641', - datasetTitle: - 'Monthly Production of Petroleum Products by Refineries & Fractionators HVD of year 2023-2024', - description: - ' Source - RAJYA SABHA SESSION - 259 UNSTARRED QUESTION No 3106. ANSWERED ON, 28TH MARCH 2023. Data Figures are in Percentage. FY 2022-23 (April-February). Source - MOSPI. Note - Data for February 2023 is provisional.', - metadata: { - update: 'Monthly', - category: 'Petroleum', - tags: [ - { - title: 'HVD', - }, - { title: 'Most Viewed' }, - ], - formats: [ - { - type: 'PDF', - }, - { type: 'JSON' }, - ], - accessModels: [ - { - type: 'Private', - }, - { type: 'Public' }, - ], - - accessModelsCount: '2', - location: 'India', - source: 'OGD', - licence: 'Government Open Data License ', - policy: 'National Data Sharing and Accessibility Policy (NDSAP)', - organization: 'Open Budget India', - }, - visualization: [ - { - title: - 'Temperature and Precipitation (2011-2015) Guwahati, Assam - Preview', - description: - 'Daily weather summaries for Guwahati, Assam, India, covering 2011-2015. Variables available for this period include Max Temperature, Min Temperature, and Total Precipitation.', - images: [ - '/visualization.svg', - '/visualization.svg', - '/visualization.svg', - '/visualization.svg', - ], - }, - { - title: - 'Temperature and Precipitation (2011-2015) Guwahati, Assam - Preview', - description: - 'Daily weather summaries for Guwahati, Assam, India, covering 2011-2015. Variables available for this period include Max Temperature, Min Temperature, and Total Precipitation.', - images: ['/visualization.svg', '/visualization.svg'], - }, - ], - resources: [ - { - title: 'Telangana Budget 2020-21', - description: - 'Daily weather summaries for Guwahati, Assam, India, in the year 2011. Variables available for this period include Max Temperature, Min Temperature, and Total Precipitation.', - - schema: [], - accessModelData: [ - { - accessType: 'Open', - accessModelTitle: - 'Temperature and Precipitation (2011-2015) Guwahati, Assam - Open Access', - fields: [ - [ - { - accessorKey: 'title', - header: 'Title', - }, - { - accessorKey: 'description', - header: 'Description', - }, - ], - [ - { title: 'Res 1', description: 'Desc 1' }, - { title: 'Res 2', description: 'Desc 2' }, - ], - ], - rows: '1-10', - count: '10(out of 100)', - preview: [ - [ - { - accessorKey: 'title', - header: 'Title', - }, - { - accessorKey: 'description', - header: 'Description', - }, - ], - [ - { title: 'Res 11', description: 'Desc 11' }, - { title: 'Res 22', description: 'Desc 22' }, - ], - ], - }, - { - accessType: 'Registered', - accessModelTitle: - 'Temperature and Precipitation (2011-2015) Guwahati, Assam - Open Access', - fields: [ - [ - { - accessorKey: 'title', - header: 'Title', - }, - { - accessorKey: 'description', - header: 'Description', - }, - ], - [ - { title: 'Res 13', description: 'Desc 13' }, - { title: 'Res 23', description: 'Desc 23' }, - ], - ], - rows: '1-10', - count: '10(out of 100)', - preview: [ - [ - { - accessorKey: 'title', - header: 'Title', - }, - { - accessorKey: 'description', - header: 'Description', - }, - ], - [ - { title: 'Res 14', description: 'Desc 14' }, - { title: 'Res 24', description: 'Desc 24' }, - ], - ], - }, - { - accessType: 'Restricted', - accessModelTitle: - 'Temperature and Precipitation (2011-2015) Guwahati, Assam - Open Access', - fields: [ - [ - { - accessorKey: 'title', - header: 'Title', - }, - { - accessorKey: 'description', - header: 'Description', - }, - ], - [ - { title: 'Res 15', description: 'Desc 15' }, - { title: 'Res 25', description: 'Desc 25' }, - ], - ], - rows: '1-10', - count: '10(out of 100)', - preview: [ - [ - { - accessorKey: 'title', - header: 'Title', - }, - { - accessorKey: 'description', - header: 'Description', - }, - ], - [ - { title: 'Res 16', description: 'Desc 16' }, - { title: 'Res 26', description: 'Desc 26' }, - ], - ], - }, - ], - }, - { - title: 'Telangana Budget 2021-22', - description: - 'This section provides budget documents of Telangana for the year 2021-22', - accessModelData: [ - { - accessType: 'Open', - accessModelTitle: - 'Temperature and Precipitation (2011-2015) Guwahati, Assam - Open Access', - fields: [ - [ - { - accessorKey: 'title', - header: 'Title', - }, - { - accessorKey: 'description', - header: 'Description', - }, - ], - [ - { title: 'Res 1', description: 'Desc 1' }, - { title: 'Res 2', description: 'Desc 2' }, - ], - ], - rows: '1-10', - count: '10(out of 100)', - preview: [ - [ - { - accessorKey: 'title', - header: 'Title', - }, - { - accessorKey: 'description', - header: 'Description', - }, - ], - [ - { title: 'Res 1', description: 'Desc 1' }, - { title: 'Res 2', description: 'Desc 2' }, - ], - ], - }, - ], - }, - { - title: 'Telangana Budget 2023-24', - description: - 'This section provides budget documents of Telangana for the year 2023-24.', - accessModelData: [ - { - accessType: 'Open', - accessModelTitle: - 'Temperature and Precipitation (2011-2015) Guwahati, Assam - Open Access', - fields: [ - [ - { - accessorKey: 'title', - header: 'Title', - }, - { - accessorKey: 'description', - header: 'Description', - }, - ], - [ - { title: 'Res 1', description: 'Desc 1' }, - { title: 'Res 2', description: 'Desc 2' }, - ], - ], - rows: '1-10', - count: '10(out of 100)', - preview: [ - [ - { - accessorKey: 'title', - header: 'Title', - }, - { - accessorKey: 'description', - header: 'Description', - }, - ], - [ - { title: 'Res 1', description: 'Desc 1' }, - { title: 'Res 2', description: 'Desc 2' }, - ], - ], - }, - ], - }, - ], - accessModels: [ - { - title: 'Open Access model of Telangana Budget 2021-22 ', - description: - 'This section provides budget documents of Telangana for the fiscal year 2021-22, offering detailed insights into financial allocations, expenditures, and revenue projections for various sectors and initiatives within the state', - type: 'OPEN', - accessModelDescription: - 'Open access model helps you to view data without login', - resource: [ - { - resourceName: 'Telangana Budget 2021-22', - description: - 'This section provides budget documents of Telangana for the year 2021-22', - fields: [ - [ - { - accessorKey: 'title', - header: 'Title', - }, - { - accessorKey: 'description', - header: 'Description', - }, - ], - [ - { title: 'Res 1', description: 'Desc 1' }, - { title: 'Res 2', description: 'Desc 2' }, - ], - ], - preview: [ - [ - { - accessorKey: 'title', - header: 'Title', - }, - { - accessorKey: 'description', - header: 'Description', - }, - ], - [ - { title: 'Res 11', description: 'Desc 11' }, - { title: 'Res 22', description: 'Desc 22' }, - ], - ], - rows: '1-10', - count: '10(out of 100)', - }, - ], - }, - { - title: 'Registered Access model of Telangana Budget 2023-24 ', - description: - 'This section provides budget documents of Telangana for the fiscal year 2023-24, offering comprehensive insights into the financial allocations, expenditures, and priorities of the state government during that period.', - type: 'REGISTERED', - accessModelDescription: - 'Registered access model helps you to view data after login', - resource: [ - { - resourceName: 'Telangana Budget 2021-22', - description: - 'This section provides budget documents of Telangana for the year 2021-22', - fields: [ - [ - { - accessorKey: 'title', - header: 'Title', - }, - { - accessorKey: 'description', - header: 'Description', - }, - ], - [ - { title: 'Res 1', description: 'Desc 1' }, - { title: 'Res 2', description: 'Desc 2' }, - ], - ], - preview: [ - [ - { - accessorKey: 'title', - header: 'Title', - }, - { - accessorKey: 'description', - header: 'Description', - }, - ], - [ - { title: 'Res 11', description: 'Desc 11' }, - { title: 'Res 22', description: 'Desc 22' }, - ], - ], - rows: '1-10', - count: '10(out of 100)', - }, - ], - }, - { - title: 'Restricted Access model of Telangana Budget 2021-22 ', - description: - 'This section provides budget documents of Telangana for the fiscal year 2021-22, offering comprehensive insights into the financial allocations, expenditures, and priorities of the state government during that period.', - type: 'RESTRICTED', - accessModelDescription: - 'Restricted access model helps you to view data after login', - resource: [ - { - resourceName: 'Telangana Budget 2021-22', - description: - 'This section provides budget documents of Telangana for the year 2021-22', - fields: [ - [ - { - accessorKey: 'title', - header: 'Title', - }, - { - accessorKey: 'description', - header: 'Description', - }, - ], - [ - { title: 'Res 1', description: 'Desc 1' }, - { title: 'Res 2', description: 'Desc 2' }, - ], - ], - preview: [ - [ - { - accessorKey: 'title', - header: 'Title', - }, - { - accessorKey: 'description', - header: 'Description', - }, - ], - [ - { title: 'Res 11', description: 'Desc 11' }, - { title: 'Res 22', description: 'Desc 22' }, - ], - ], - rows: '1-10', - count: '10(out of 100)', - }, - ], - }, - ], - }, - { - id: '999', - datasetTitle: - 'Assam, India : Historical Weather Data : 2011-2020 - Guwahati(name may extend upto two lines after which ...)', - description: - ' Daily weather summaries for Guwahati, Assam, India, covering 2011-2020. Variables available for this period include MaxTemperature, Min Temperature, and Total Precipitation.Evapotranspiration, Potential Evapotranspiration, Solar Radiation,& Total Hours of Sunshine are also available, but sometimes missing.', - metadata: { - update: 'Monthly', - category: 'Industrial', - tags: [ - { - title: 'HVD', - }, - { title: 'Must Explore' }, - ], - formats: [ - { - type: 'CSV', - }, - { type: 'JSON' }, - ], - accessModels: [ - { - type: 'Private', - }, - { type: 'Public' }, - ], - accessModelsCount: '8', - location: 'India', - source: 'OGD', - licence: 'Government Open Data License ', - policy: 'National Data Sharing and Accessibility Policy', - }, - }, -]; From 38b7bcfec26374c1d049c92a7925290281e0c27e Mon Sep 17 00:00:00 2001 From: sanjaypinna Date: Tue, 25 Mar 2025 15:52:29 +0530 Subject: [PATCH 02/16] remove shadow --- app/[locale]/(user)/layout.tsx | 2 +- app/[locale]/dashboard/layout.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/[locale]/(user)/layout.tsx b/app/[locale]/(user)/layout.tsx index f6abaf33..88e7820c 100644 --- a/app/[locale]/(user)/layout.tsx +++ b/app/[locale]/(user)/layout.tsx @@ -21,7 +21,7 @@ export default function Layout({ children }: UserLayoutProps) { return (
-
+
<>{children} diff --git a/app/[locale]/dashboard/layout.tsx b/app/[locale]/dashboard/layout.tsx index a36fd15d..196aedd5 100644 --- a/app/[locale]/dashboard/layout.tsx +++ b/app/[locale]/dashboard/layout.tsx @@ -12,7 +12,7 @@ interface DashboardLayoutProps { export default function Layout({ children }: DashboardLayoutProps) { return (
-
+
<>{children} From a74ea0c31793953252cec0649466611c4563c34f Mon Sep 17 00:00:00 2001 From: sanjaypinna Date: Tue, 25 Mar 2025 15:52:46 +0530 Subject: [PATCH 03/16] update breadcrumbs as per the design --- components/BreadCrumbs/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/BreadCrumbs/index.tsx b/components/BreadCrumbs/index.tsx index c1d4fd2c..8b0ee9d2 100644 --- a/components/BreadCrumbs/index.tsx +++ b/components/BreadCrumbs/index.tsx @@ -14,18 +14,18 @@ interface BreadCrumbsProps { const BreadCrumbs: React.FC = ({ data }) => { return ( -
+
- + {data.map((item, index) => ( {index === data.length - 1 ? ( - {item.label} + {item.label} ) : ( - {item.label} + {item.label} )} {index < data.length - 1 && } From 08c1367fc9368eae17068feb818a8d277e87a05d Mon Sep 17 00:00:00 2001 From: sanjaypinna Date: Tue, 25 Mar 2025 17:36:22 +0530 Subject: [PATCH 04/16] add grey extralight color --- styles/tokens/_variables.css | 1 + styles/tokens/tailwind/color.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/styles/tokens/_variables.css b/styles/tokens/_variables.css index d9927eb3..77c85ea4 100644 --- a/styles/tokens/_variables.css +++ b/styles/tokens/_variables.css @@ -87,6 +87,7 @@ --base-pure-black: #000000; --blue-primary-color: #22699D; --orange-secondary-color:#FDB557; + --grey-extralight:#EEEEEE; --text-default: var(--base-gray-slate-solid-12); --text-medium: var(--base-gray-slate-solid-11); --text-subdued: #3e4346; diff --git a/styles/tokens/tailwind/color.js b/styles/tokens/tailwind/color.js index 816fb0fd..797bb5ad 100644 --- a/styles/tokens/tailwind/color.js +++ b/styles/tokens/tailwind/color.js @@ -274,5 +274,6 @@ module.exports = { transparent: '#FFFFFF00', borderOnBGSubdued: 'var(--base-gray-slate-solid-11)', primaryBlue: 'var(--blue-primary-color)', - secondaryOrange: 'var(--orange-secondary-color)' + secondaryOrange: 'var(--orange-secondary-color)', + greyExtralight: 'var( --grey-extralight)', }; From aa070a4bc076e91053816df253e80ba654b5e2d1 Mon Sep 17 00:00:00 2001 From: sanjaypinna Date: Tue, 25 Mar 2025 17:36:29 +0530 Subject: [PATCH 05/16] add css --- app/[locale]/(user)/datasets/dataset.module.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/[locale]/(user)/datasets/dataset.module.scss b/app/[locale]/(user)/datasets/dataset.module.scss index 561379be..5f3873b7 100644 --- a/app/[locale]/(user)/datasets/dataset.module.scss +++ b/app/[locale]/(user)/datasets/dataset.module.scss @@ -3,4 +3,9 @@ width: 80%; height: 36px; } +/* In your global CSS/SCSS file */ + div[class*="Input-module_Backdrop"] { + border-top-color: var(--border-subdued) ; + border-radius: 8px; +} } From 0b04fa14ece0396aa5311b950234bd0d3ddc98aa Mon Sep 17 00:00:00 2001 From: sanjaypinna Date: Tue, 25 Mar 2025 17:36:59 +0530 Subject: [PATCH 06/16] update sub header --- app/[locale]/(user)/datasets/page.tsx | 121 ++++++++++++++++---------- 1 file changed, 77 insertions(+), 44 deletions(-) diff --git a/app/[locale]/(user)/datasets/page.tsx b/app/[locale]/(user)/datasets/page.tsx index ceda0164..c83a8b43 100644 --- a/app/[locale]/(user)/datasets/page.tsx +++ b/app/[locale]/(user)/datasets/page.tsx @@ -43,7 +43,6 @@ interface QueryParams { filters: FilterOptions; query?: string; sort?: string; // Adding sort to QueryParams - } type Action = @@ -61,7 +60,6 @@ const initialState: QueryParams = { filters: {}, query: '', sort: 'recent', // Default sort is set to recent - }; const queryReducer = (state: QueryParams, action: Action): QueryParams => { @@ -141,7 +139,7 @@ const useUrlParams = ( const searchParam = queryParams.query ? `&query=${encodeURIComponent(queryParams.query)}` : ''; - const sortParam = queryParams.sort + const sortParam = queryParams.sort ? `&sort=${encodeURIComponent(queryParams.sort)}` : ''; const variablesString = `?${filtersString}&size=${queryParams.pageSize}&page=${queryParams.currentPage}${searchParam}${sortParam}`; @@ -235,9 +233,10 @@ const DatasetsListing = () => { }, {} ); + const pageSizeOptions = [5, 10, 20]; return ( -
+
{
) : ( -
-
-
- +
+
+ {/*
+ Showing {datasetDetails?.length} of {count} Datasets -
-
+
*/} +
handleSearch(value)} onClear={(value) => handleSearch(value)} />
-
- - Sort by: - - +
+
+ + Rows: + + void; onPageSizeChange: (newSize: number) => void; children: React.ReactNode; + view? : string } const GraphqlPagination: React.FC = ({ @@ -18,10 +19,13 @@ const GraphqlPagination: React.FC = ({ onPageChange, onPageSizeChange, children, + view }) => { return (
- {children} +
+ {children} +