Skip to content

Commit

Permalink
added title for all buttons (#1985)
Browse files Browse the repository at this point in the history
  • Loading branch information
Swathi-eGov authored Dec 6, 2024
1 parent d1a4c20 commit ac1899c
Show file tree
Hide file tree
Showing 36 changed files with 104 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ export const UICustomizations = {
<div>
{microplanFileId && row?.status == "RESOURCE_ESTIMATIONS_APPROVED" ? (
<div>
<ButtonNew style={{ width: "20rem" }} onClick={handleDownload} icon="DownloadIcon" label={t("WBH_DOWNLOAD_MICROPLAN")} />
<ButtonNew style={{ width: "20rem" }} onClick={handleDownload} icon="DownloadIcon" label={t("WBH_DOWNLOAD_MICROPLAN")} title={t("WBH_DOWNLOAD_MICROPLAN")} />
</div>
) : (
<div className={"action-button-open-microplan"}>
Expand All @@ -850,6 +850,7 @@ export const UICustomizations = {
type="actionButton"
variation="secondary"
label={t("MP_ACTIONS_FOR_MICROPLAN_SEARCH")}
title={t("MP_ACTIONS_FOR_MICROPLAN_SEARCH")}
options={options}
style={{ width: "20rem" }}
optionsKey="name"
Expand Down Expand Up @@ -1025,6 +1026,7 @@ export const UICustomizations = {
return row.status === "EXECUTION_TO_BE_DONE" ? (
<ButtonNew
label={t("START")}
title={t("START")}
variation="primary"
icon={"ArrowForward"}
type="button"
Expand All @@ -1037,6 +1039,7 @@ export const UICustomizations = {
) : row.status === "RESOURCE_ESTIMATIONS_APPROVED" ? (
<ButtonNew
label={t("WBH_DOWNLOAD_MICROPLAN")}
title={t("WBH_DOWNLOAD_MICROPLAN")}
variation="primary"
icon={"FileDownload"}
style={{width:"290px"}}
Expand All @@ -1047,6 +1050,7 @@ export const UICustomizations = {
) : (
<ButtonNew
label={t("WBH_EDIT")}
title={t("WBH_EDIT")}
variation="primary"
icon={"Edit"}
style={{width:"290px"}}
Expand Down Expand Up @@ -1322,7 +1326,7 @@ export const UICustomizations = {
optionsKey=""
size="medium"
style={{}}
title=""
title={t(key)}
variation="primary"
/>
{showPopup && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ const AssumptionsForm = ({ onSelect, ...props }) => {
size={"large"}
variation={"secondary"}
label={t("MP_ACK")}
title={t("MP_ACK")}
onClick={() => {
setShowPopup(false);
// setCanUpdate(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const AssumptionsList = ({ customProps, setupCompleted }) => {
{!(setupCompleted === 'true') &&
<Button
label={t("WBH_EDIT")}
title={t("WBH_EDIT")}
variation="secondary"
icon={"Edit"}
size="medium"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ const BoundaryFilter = ({
icon="FilterAlt"
variation="secondary"
className="button-primary"
title={t("BUTTON_FILTER_BY_BOUNDARY")}
label={t("BUTTON_FILTER_BY_BOUNDARY")}
onClick={() => setIsboundarySelectionSelected((previous) => !previous)}
/>
Expand All @@ -186,6 +187,7 @@ const BoundaryFilter = ({
<Button
variation="secondary"
icon={"AutoRenew"}
title={t("CLEAR_ALL_FILTERS")}
label={t("CLEAR_ALL_FILTERS")}
// onClick={handleClearAll}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ const BoundarySelection = ({ onSelect, props: customProps, ...props }) => {
size={"large"}
variation={"secondary"}
label={t("MP_ACK")}
title={t("MP_ACK")}
onClick={() => {
setShowPopup(false);
// setCanUpdate(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ const CampaignBoundary = ({ customProps, setupCompleted }) => {
{!(setupCompleted === "true") && (
<Button
label={t("WBH_EDIT")}
title={t("WBH_EDIT")}
variation="secondary"
icon={"Edit"}
type="button"
Expand All @@ -337,6 +338,7 @@ const CampaignBoundary = ({ customProps, setupCompleted }) => {
{boundaryStatus?.[ind + 2] && parent_group[item]?.length > 2 ? (
<Button
label={t("VIEW_MORE")}
title={t("VIEW_MORE")}
onClick={() => handleViewMore(ind + 2)}
variation="link"
icon="ArrowDropDown"
Expand All @@ -347,6 +349,7 @@ const CampaignBoundary = ({ customProps, setupCompleted }) => {
<Button
isSuffix={true}
label={t("VIEW_LESS")}
title={t("VIEW_LESS")}
icon="ArrowDropUp"
onClick={() => handleViewMore(ind + 2)}
variation="link"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const ChoroplethSelection = memo(
}}
icon={"AutoRenew"}
label={t("CLEAR_FILTER")}
title={t("CLEAR_FILTER")}
onClick={() => setChoroplethProperty()}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const ConfirmationPopUp = ({ onClose, alertHeading, alertMessage, submitLabel, u
size="large"
variation="secondary"
label={t(submitLabel)}
title={t(submitLabel)}
onClick={handleSave}
isDisabled={isSubmitting || mutation.isLoading} // Disable button during submission
/>,
Expand All @@ -67,6 +68,7 @@ const ConfirmationPopUp = ({ onClose, alertHeading, alertMessage, submitLabel, u
size="large"
variation="primary"
label={t(cancelLabel)}
title={t(cancelLabel)}
onClick={onClose}
isDisabled={isSubmitting || mutation.isLoading} // Disable button during submission
/>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const DataMgmtComponent = ({ customProps, setupCompleted }) => {
{!(setupCompleted === 'true') &&
<Button
label={t("WBH_EDIT")}
title={t("WBH_EDIT")}
variation="secondary"
icon={"Edit"}
size="medium"
Expand Down Expand Up @@ -83,6 +84,7 @@ export const DataMgmtComponent = ({ customProps, setupCompleted }) => {

<Button
label={t("WBH_EDIT")}
title={t("WBH_EDIT")}
variation="secondary"
icon={"Edit"}
size="medium"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,14 @@ const FacilityPopUp = ({ detail, onClose }) => {
{
name: t("MP_VILLAGE_ACCESSIBILITY_LEVEL"), // Change to your column type
cell: (row) => (
<Button label={t("VIEW_DETAILS")} onClick={() => handleViewDetailsForAccessibility(row)} variation="link" size={"medium"} style={{}} />
<Button label={t("VIEW_DETAILS")} title={t("VIEW_DETAILS")} onClick={() => handleViewDetailsForAccessibility(row)} variation="link" size={"medium"} style={{}} />
), // Replace with the appropriate field from your data
sortable: false,
},
{
name: t("MP_VILLAGE_SECURITY_LEVEL"), // Change to your column type
cell: (row) => (
<Button label={t("VIEW_DETAILS")} onClick={() => handleViewDetailsForSecurity(row)} variation="link" size={"medium"} style={{}} />
<Button label={t("VIEW_DETAILS")} title={t("VIEW_DETAILS")} onClick={() => handleViewDetailsForSecurity(row)} variation="link" size={"medium"} style={{}} />
), // Replace with the appropriate field from your data
sortable: false,
},
Expand Down Expand Up @@ -591,6 +591,7 @@ const FacilityPopUp = ({ detail, onClose }) => {
size={"large"}
variation={"secondary"}
label={t(`MICROPLAN_CLOSE_BUTTON`)}
title={t(`MICROPLAN_CLOSE_BUTTON`)}
onClick={onClose}
style={{ width: "200px" }}
/>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const FileComponent = ({ title, fileName, status, auditDetails, editHandler, del
{editHandler &&
<Button
label={t("WBH_EDIT")}
title={t("WBH_EDIT")}
variation="secondary"
icon={<EditIcon styles={{ height: "1.25rem", width: "2.5rem" }} />}
type="button"
Expand All @@ -83,6 +84,7 @@ const FileComponent = ({ title, fileName, status, auditDetails, editHandler, del
{deleteHandler &&
<Button
label={t("WBH_DELETE")}
title={t("WBH_DELETE")}
variation="secondary"
icon={<DeleteIconv2 styles={{ height: "1.25rem", width: "2.5rem" }} />}
type="button"
Expand All @@ -96,6 +98,7 @@ const FileComponent = ({ title, fileName, status, auditDetails, editHandler, del
{(downloadHandler && status === "completed") && (
<Button
label={t("WBH_DOWNLOAD")}
title={t("WBH_DOWNLOAD")}
variation="secondary"
icon={"FileDownload"}
type="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const FilterSection = memo(
}}
icon={"AutoRenew"}
label={t("CLEAR_ALL_FILTERS")}
title={t("CLEAR_ALL_FILTERS")}
onClick={() => setFilterSelections([])}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const FormulaConfigScreen = ({ customProps, setupCompleted }) => {
{!(setupCompleted === 'true') &&
<Button
label={t("WBH_EDIT")}
title={t("WBH_EDIT")}
variation="secondary"
icon={"Edit"}
size="medium"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@ const FormulaConfigWrapper = ({ onSelect, props: customProps }) => {

{formulaInternalKey > 0 && formulaInternalKey < ruleConfigurationCategories?.length && (
<ActionBar>
<Button className="previous-button" variation="secondary" label={t("BACK")} onClick={handleBack} />
<Button className="previous-button" variation="primary" label={t("NEXT")} onClick={handleNext} />
<Button className="previous-button" variation="secondary" label={t("BACK")} title={t("BACK")} onClick={handleBack} />
<Button className="previous-button" variation="primary" label={t("NEXT")} title={t("NEXT")} onClick={handleNext} />
</ActionBar>
)}
</FormulaContext.Provider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,9 @@ const FormulaConfiguration = ({ onSelect, category, customProps, formulas: initi
icon="Delete"
iconFill=""
label={t("DELETE")}
title={t("DELETE")}
size=""
style={{ padding: "0px" }}
title=""
variation="secondary"
onClick={() => handleDeleteClick(index, formula)}
/>
Expand All @@ -402,6 +402,7 @@ const FormulaConfiguration = ({ onSelect, category, customProps, formulas: initi
<Button
icon="Add"
label={t("ADD_NEW_FORMULA")}
title={t("ADD_NEW_FORMULA")}
onClick={() => setFormulasPopUp(true)}
variation="secondary"
// isDisabled={isAddNewDisabled}
Expand Down Expand Up @@ -435,11 +436,12 @@ const FormulaConfiguration = ({ onSelect, category, customProps, formulas: initi
size={"large"}
variation={"secondary"}
label={t("YES")}
title={t("YES")}
onClick={() => {
handleConfirmDelete();
}}
/>,
<Button type={"button"} size={"large"} variation={"primary"} label={t("NO")} onClick={handleCancelDelete} />,
<Button type={"button"} size={"large"} variation={"primary"} label={t("NO")} title={t("NO")} onClick={handleCancelDelete} />,
]}
sortFooterChildren={true}
onClose={() => {
Expand Down Expand Up @@ -497,6 +499,7 @@ const FormulaConfiguration = ({ onSelect, category, customProps, formulas: initi
size={"large"}
variation={"secondary"}
label={t("CANCEL")}
title={t("CANCEL")}
onClick={() => {
setFormulasPopUp(false);
setSelectedDeletedFormula(null);
Expand All @@ -507,6 +510,7 @@ const FormulaConfiguration = ({ onSelect, category, customProps, formulas: initi
size={"large"}
variation={"primary"}
label={t("ADD")}
title={t("ADD")}
onClick={() => {
if(!selectedDeletedFormula){
setShowToast({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ const Hypothesis = ({ category, assumptions: initialAssumptions, setShowToast, a
<Button
icon="Delete"
label={t("DELETE")}
title={t("DELETE")}
onClick={() => handleDeleteClick(index, item)}
variation="link"
isDisabled={assumptions?.length === 1 && category !== "CAMPAIGN_VEHICLES" ? true : false}
Expand All @@ -211,6 +212,7 @@ const Hypothesis = ({ category, assumptions: initialAssumptions, setShowToast, a

<Button
icon="Add"
title={category === "CAMPAIGN_VEHICLES" ? t(`ADD_ASSUMPTION_${category}`) : t("ADD_ASSUMPTION")}
label={category === "CAMPAIGN_VEHICLES" ? t(`ADD_ASSUMPTION_${category}`) : t("ADD_ASSUMPTION")}
onClick={() => setAssumptionsPopUp(true)}
variation="secondary"
Expand Down Expand Up @@ -245,11 +247,12 @@ const Hypothesis = ({ category, assumptions: initialAssumptions, setShowToast, a
size={"large"}
variation={"secondary"}
label={t("YES")}
title={t("YES")}
onClick={() => {
handleConfirmDelete();
}}
/>,
<Button type={"button"} size={"large"} variation={"primary"} label={t("NO")} onClick={handleCancelDelete} />,
<Button type={"button"} size={"large"} variation={"primary"} label={t("NO")} title={t("NO")} onClick={handleCancelDelete} />,
]}
sortFooterChildren={true}
onClose={() => {
Expand Down Expand Up @@ -330,6 +333,7 @@ const Hypothesis = ({ category, assumptions: initialAssumptions, setShowToast, a
size={"large"}
variation={"secondary"}
label={t("CANCEL")}
title={t("CANCEL")}
onClick={() => {
setAssumptionsPopUp(false);
setSelectedDeletedAssumption(null);
Expand All @@ -340,6 +344,7 @@ const Hypothesis = ({ category, assumptions: initialAssumptions, setShowToast, a
size={"large"}
variation={"primary"}
label={t("ADD")}
title={t("ADD")}
onClick={() => {
//here if assumption name is not given then show a toast message and return
if (category !== "CAMPAIGN_VEHICLES" && assumptions?.includes(selectedDeletedAssumption?.name)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,8 @@ const HypothesisWrapper = ({ onSelect, props: customProps }) => {

{internalKey > 0 && internalKey < assumptionCategories.length && (
<ActionBar>
<Button className="previous-button" variation="secondary" label={t("BACK")} onClick={handleBack} />
<Button className="previous-button" variation="primary" label={t("NEXT")} onClick={handleNext} />
<Button className="previous-button" variation="secondary" label={t("BACK")} title={t("BACK")} onClick={handleBack} />
<Button className="previous-button" variation="primary" label={t("NEXT")} title={t("NEXT")} onClick={handleNext} />
</ActionBar>
)}
</AssumptionContext.Provider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ const PopInboxTable = ({ ...props }) => {
cell: (row, index, column, id) => (
<Button
label={t(`VIEW_LOGS`)}
title={t(`VIEW_LOGS`)}
onClick={() => {
setSelectedBusinessId(row.id); // Set the row.id to state
setSelectedBoundaryCode(row.boundaryCode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -602,11 +602,12 @@ function RoleTableComposer({ nationalRoles }) {
size={"large"}
variation={"primary"}
label={t("YES")}
title={t("YES")}
onClick={() => {
handleUpdateAssignEmployee(unassignPopup);
}}
/>,
<Button type={"button"} size={"large"} variation={"secondary"} label={t("NO")} onClick={() => { setUnassignPopup(false); }} />,
<Button type={"button"} size={"large"} variation={"secondary"} label={t("NO")} title={t("NO")} onClick={() => { setUnassignPopup(false); }} />,
]}
sortFooterChildren={true}
onClose={() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ const UploadDataCustom = React.memo(({ formData, onSelect, ...props }) => {
</Header>
<Button
label={t("WBH_DOWNLOAD_TEMPLATE")}
title={t("WBH_DOWNLOAD_TEMPLATE")}
variation="secondary"
icon={"FileDownload"}
type="button"
Expand Down
Loading

0 comments on commit ac1899c

Please sign in to comment.