Skip to content

Commit

Permalink
FEATURE/HCMPRE-1642 : Show TotalCount next to tab name in UI (#2043)
Browse files Browse the repository at this point in the history
* For showing count next to tab

* package update

* Changes

* putting showTabLabels in config

* Removed extra logic

* Removed extra logic

* Changed name from Tablabel to Tabcount

* changes
  • Loading branch information
abishekTa-egov authored Dec 16, 2024
1 parent 882a9f8 commit 64ea409
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion micro-ui/web/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@egovernments/digit-ui-module-open-payment":"0.0.1",
"@egovernments/digit-ui-module-hrms": "1.8.10",
"@egovernments/digit-ui-module-pgr": "1.8.10",
"@egovernments/digit-ui-react-components": "1.8.12",
"@egovernments/digit-ui-react-components": "1.8.13",
"babel-loader": "8.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion micro-ui/web/micro-ui-internals/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@egovernments/digit-ui-module-open-payment":"0.0.1",
"@egovernments/digit-ui-module-engagement": "1.5.20",
"@egovernments/digit-ui-components":"0.0.2-beta.58",
"@egovernments/digit-ui-react-components": "1.8.12",
"@egovernments/digit-ui-react-components": "1.8.13",
"@egovernments/digit-ui-module-sandbox": "0.0.1",
"http-proxy-middleware": "^1.0.5",
"react": "17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion micro-ui/web/micro-ui-internals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"lodash": "4.17.21",
"microbundle-crl": "0.13.11",
"@egovernments/digit-ui-components":"0.0.2-beta.58",
"@egovernments/digit-ui-react-components": "1.8.12",
"@egovernments/digit-ui-react-components": "1.8.13",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-hook-form": "6.15.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"dependencies": {
"@egovernments/digit-ui-components":"0.0.2-beta.58",
"@egovernments/digit-ui-react-components": "1.8.12",
"@egovernments/digit-ui-react-components": "1.8.13",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-i18next": "11.16.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"react-router-dom": "5.3.0"
},
"dependencies": {
"@egovernments/digit-ui-react-components": "1.8.12",
"@egovernments/digit-ui-react-components": "1.8.13",
"@egovernments/digit-ui-components":"0.0.2-beta.58",
"react": "17.0.2",
"react-date-range": "^1.4.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"dependencies": {
"@cyntler/react-doc-viewer": "1.10.3",
"@egovernments/digit-ui-components":"0.0.2-beta.58",
"@egovernments/digit-ui-react-components": "1.8.12",
"@egovernments/digit-ui-react-components": "1.8.13",
"axios": "^1.7.2",
"react": "17.0.2",
"react-date-range": "^1.4.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-react-components",
"version": "1.8.12",
"version": "1.8.13",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.modern.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const setUIConf = (uiConfig) => {
return [{uiConfig}]
}

const SearchComponent = ({ uiConfig, header = "", screenType = "search", fullConfig, data,activeLink,setActiveLink,browserSession,showTab, tabData, onTabChange}) => {
const SearchComponent = ({ uiConfig, header = "", screenType = "search", fullConfig, data,activeLink,setActiveLink,browserSession,showTab,showTabCount=false, tabData, onTabChange}) => {

//whenever activeLink changes we'll change uiConfig
// const [activeLink,setActiveLink] = useState(uiConfig?.configNavItems?.filter(row=>row.activeByDefault)?.[0]?.name)
Expand Down Expand Up @@ -171,7 +171,8 @@ const SearchComponent = ({ uiConfig, header = "", screenType = "search", fullCon
clearSearch({});
onTabChange(num);
}}>
{t(i?.label)}
{showTabCount? `${t(i?.label)}(${data?.count || data?.TotalCount || data?.totalCount})`
: t(i?.label)}
</button>
))}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ const InboxSearchComposer = ({configs,headerLabel,additionalConfig,onFormValueCh
fullConfig={configs}
data={data}
showTab={showTab}
showTabCount={configs?.sections?.search?.uiConfig?.showTabCount}
tabData={tabData}
onTabChange={onTabChange}
/>
Expand All @@ -200,6 +201,7 @@ const InboxSearchComposer = ({configs,headerLabel,additionalConfig,onFormValueCh
screenType={configs.type}
fullConfig={configs}
data={data}
showTabCount={configs?.sections?.filter?.uiConfig?.showTabCount}
/>
</div>
}
Expand All @@ -213,6 +215,7 @@ const InboxSearchComposer = ({configs,headerLabel,additionalConfig,onFormValueCh
screenType={configs.type}
fullConfig={configs}
data={data}
showTabCount={configs?.sections?.search?.uiConfig?.showTabCount}
/>
</div>
</MediaQuery>
Expand All @@ -227,6 +230,7 @@ const InboxSearchComposer = ({configs,headerLabel,additionalConfig,onFormValueCh
screenType={configs.type}
fullConfig={configs}
data={data}
showTabCount={configs?.sections?.filter?.uiConfig?.showTabCount}
/>
</div>
</MediaQuery>
Expand Down
2 changes: 1 addition & 1 deletion micro-ui/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@egovernments/digit-ui-module-open-payment":"0.0.1",
"@egovernments/digit-ui-module-engagement": "1.5.20",
"@egovernments/digit-ui-components":"0.0.2-beta.58",
"@egovernments/digit-ui-react-components": "1.8.12",
"@egovernments/digit-ui-react-components": "1.8.13",
"babel-loader": "8.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion micro-ui/web/sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@egovernments/digit-ui-module-engagement": "1.5.20",
"@egovernments/digit-ui-components":"0.0.2-beta.58",
"@egovernments/digit-ui-module-sandbox": "0.0.1",
"@egovernments/digit-ui-react-components": "1.8.12",
"@egovernments/digit-ui-react-components": "1.8.13",
"babel-loader": "8.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion micro-ui/web/workbench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@egovernments/digit-ui-components":"0.0.2-beta.58",
"@egovernments/digit-ui-module-core": "1.8.12",
"@egovernments/digit-ui-module-utilities": "1.0.1-beta.41",
"@egovernments/digit-ui-react-components": "1.8.12",
"@egovernments/digit-ui-react-components": "1.8.13",
"babel-loader": "8.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down

0 comments on commit 64ea409

Please sign in to comment.