Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
suryansh-egov committed Jan 7, 2025
1 parent 04f6382 commit 704aaac
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@egovernments/digit-ui-module-utilities": "1.0.3",
"@egovernments/digit-ui-react-components": "1.8.12",
"@egovernments/digit-ui-module-hcmworkbench": "0.1.0",
"@egovernments/digit-ui-module-campaign-manager": "0.4.0",
"@egovernments/digit-ui-module-campaign-manager": "0.3.0",
"@egovernments/digit-ui-module-microplan": "0.0.1",
"@egovernments/digit-ui-module-health-payments": "0.0.1",
"http-proxy-middleware": "^1.0.5",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-module-campaign-manager",
"version": "0.4.0",
"version": "0.3.0",
"description": "Campaign",
"main": "dist/index.js",
"module": "dist/index.modern.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const SupervisorPopup = ({ setShowPopUp, supervisors }) => {
className="wrapper-popup-boundary-chips"
style={{ maxWidth: "40%" }}
type="default"
heading={t("SUPERVISORS_ASSIGNED")}
heading={t("REGISTER_SUPERVISORS_ASSIGNED")}
footerChildren={[]}
onOverlayClick={() => setShowPopUp(false)}
onClose={() => setShowPopUp(false)}
Expand Down Expand Up @@ -108,23 +108,23 @@ const IndividualUserTable = ({ tenantId, staffAttendeeIds = [], supervisorName =

const columns = [
{
name: t('Name'),
name: t('REGISTER_NAME'),
selector: row => row.name?.givenName || '',
sortable: true,
},
{
name: t('Mobile Number'),
name: t('REGISTER_MOBILE_NUMBER'),
selector: row => row.mobileNumber || '',
sortable: true,
},
{
name: t("USER_TYPE"),
name: t("REGISTER_USER_TYPE"),
selector: row => row?.userDetails?.type || '',
sortable: true
},
{
name: t('Assigned Supervisor'),
selector: row => row.isAssigned ? supervisorName : t('Not Assigned'),
name: t('REGISTER_ASSIGNED_SUPERVISOR'),
selector: row => row.isAssigned ? supervisorName : t('REGISTER_SUPERVISOR_NOT_ASSIGNED'),
sortable: true,
grow: 2,
cell: row => {
Expand Down Expand Up @@ -171,26 +171,26 @@ const IndividualUserTable = ({ tenantId, staffAttendeeIds = [], supervisorName =
)}
</div>
) : (
<span className="text-gray-400">{t('Not Assigned')}</span>
<span className="text-gray-400">{t('REGISTER_SUPERVISOR_NOT_ASSIGNED')}</span>
)}
</div>
);
},
},
{
name: t('Actions'),
name: t('REGISTER_ACTIONS'),
cell: row => (
<div>
{row.isAssigned ? (
<Button
label={t('Unassign')}
label={t('REGISTER_UNASSIGN')}
variation="secondary"
icon="Close"
onClick={() => handleUnassign(row.id)}
/>
) : (
<Button
label={t('Assign')}
label={t('REGISTER_ASSIGN')}
variation="primary"
icon="CheckCircle"
onClick={() => handleAssign(row.id)}
Expand All @@ -208,13 +208,13 @@ const IndividualUserTable = ({ tenantId, staffAttendeeIds = [], supervisorName =
<div>
<Card type={"secondary"} style={{ maxWidth: "100%", overflow: "auto", marginBottom: "1rem" }}>
<div>
<div style={{ marginBottom: "0.5rem" }}>{t("USER_NAME")}</div>
<div style={{ marginBottom: "0.5rem" }}>{t("REGISTER_USER_NAME")}</div>
<TextInput
style={{ maxWidth: "fit-content" }}
disabled={false}
className="textinput-example"
type="text"
name={t("USER_NAME")}
name={t("REGISTER_USER_NAME")}
value={searchQuery}
onChange={handleSearchChange}
placeholder={t("SEARCH_BY_NAME")}
Expand All @@ -236,7 +236,7 @@ const IndividualUserTable = ({ tenantId, staffAttendeeIds = [], supervisorName =
paginationPerPage={rowsPerPage}
sortIcon={<CustomSVG.SortUp width="16px" height="16px" fill="#0b4b66" />}
paginationRowsPerPageOptions={[5, 10, 15, 20]}
noDataComponent={<div>{t('No records found')}</div>}
noDataComponent={<div>{t('REGISTER_NO_RECORDS_FOUND')}</div>}
/>

{/* Progress Bar Section */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ const Attendance = () => {

const columns = [
{
name: t("NAME"),
name: t("REGISTER_NAME"),
selector: (row) => {
return (
<div className="ellipsis-cell" title={row?.name || t("NA")}>
<div className="ellipsis-cell" title={row?.name || t("REGISTER_NA")}>
{row.name || t("NA")}
</div>
);
Expand All @@ -114,21 +114,21 @@ const Attendance = () => {
},
},
{
name: t("EMAIL"),
name: t("REGISTER_EMAIL"),
selector: (row) => {
return (
<div className="ellipsis-cell" title={row?.email || t("NA")}>
<div className="ellipsis-cell" title={row?.email || t("REGISTER_NA")}>
{row.email || t("NA")}
</div>
);
},
sortable: false,
},
{
name: t("CONTACT_NUMBER"),
name: t("REGISTER_CONTACT_NUMBER"),
selector: (row) => {
return (
<div className="ellipsis-cell" title={row?.mobileNumber || t("NA")}>
<div className="ellipsis-cell" title={row?.mobileNumber || t("REGISTER_NA")}>
{row?.mobileNumber || t("NA")}
</div>
);
Expand All @@ -146,7 +146,7 @@ const Attendance = () => {
},
},
{
name: t("USERS_ASSIGNED"),
name: t("REGISTER_USERS_ASSIGNED"),
sortable: false,
grow: 2,
cell: (row) => {
Expand Down Expand Up @@ -203,7 +203,7 @@ const Attendance = () => {
)}
{userDetails?.staffAttendeeMap[row?.id]?.attendees.length === 0 && (
<div>
{t("USERS_NOT_ASSIGNED")}
{t("REGISTER_USERS_NOT_ASSIGNED")}
</div>
)}
</div>
Expand All @@ -212,16 +212,16 @@ const Attendance = () => {
},
},
{
name: t("ACTION"),
name: t("REGISTER_ACTION"),
sortable: false,
cell: (row) => {
return (
<Button
className={"roleTableCell"}
variation={"primary"}
label={t(`ASSIGN`)}
label={t(`REGISTER_ASSIGN`)}
size="medium"
title={t(`ASSIGN`)}
title={t(`REGISTER_ASSIGN`)}
style={{ padding: "1rem", width:"100%" }}
icon={"DoubleArrow"}
isSuffix={true}
Expand Down Expand Up @@ -253,7 +253,7 @@ const Attendance = () => {
<Card style={{ maxWidth: "100%", overflow: "auto", marginBottom: "1rem" }}>
<div style={{ display: "flex", justifyContent: "space-between", alignItems: "center" }}>
<div style={{ fontFamily: "Roboto Condensed", fontWeight: 800, fontSize: "2rem" }}>
{t("SUPERVISORS_AND_TEAM_MEMBERS")}
{t("REGISTER_SUPERVISORS_AND_TEAM_MEMBERS")}
</div>

<div>
Expand All @@ -267,7 +267,7 @@ const Attendance = () => {


<div style={{fontFamily: "Roboto Condensed", fontWeight: 500, fontSize: "1rem"}}>
{t("SUPERVISOR_BODY_TEXT")}
{t("REGISTER_SUPERVISOR_BODY_TEXT")}
</div>
</Card>
)}
Expand All @@ -281,7 +281,7 @@ const Attendance = () => {
name="searchSupervisor"
value={searchQuery}
onChange={handleSearchChange}
placeholder={t("SEARCH_BY_SUPERVISOR_NAME")}
placeholder={t("REGISTER_SEARCH_BY_SUPERVISOR_NAME")}
populators={{customIcon: 'Search'}}
/>
</div>
Expand All @@ -300,14 +300,14 @@ const Attendance = () => {
paginationPerPage={rowsPerPage}
sortIcon={<CustomSVG.SortUp width="16px" height="16px" fill="#0b4b66" />}
paginationRowsPerPageOptions={[5, 10, 15, 20]}
noDataComponent={<div style={{padding: "24px"}}>{t("NO_RECORDS_FOUND")}</div>}
noDataComponent={<div style={{padding: "24px"}}>{t("REGISTER_NO_RECORDS_FOUND")}</div>}
/>

{assignUsersPopup && (
<PopUp
className="roleComposer"
type="default"
heading={t(`ASSIGN_USERS_TO_SUPERVISOR ${curSupervisor}`)}
heading={t("REGISTER_ASSIGN_USERS_TO_SUPERVISOR") `${curSupervisor}`}
children={[
<IndividualUserTable
tenantId={tenantId}
Expand All @@ -321,7 +321,7 @@ const Attendance = () => {
type="button"
size="large"
variation="secondary"
label={t("CLOSE")}
label={t("REGISTER_CLOSE")}
onClick={() => setAssignUsersPopup(false)}
style={{ minWidth: "200px" }}
/>
Expand Down

0 comments on commit 704aaac

Please sign in to comment.