Skip to content

Commit

Permalink
RAIN-6612- PT: UI : moving Radio buttons to check box. (#2289)
Browse files Browse the repository at this point in the history
  • Loading branch information
vamshikrishnakole-wtt-egov authored and gajendran.c committed Mar 31, 2022
1 parent 2fe1d30 commit cf213c9
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from "react";
import { FormStep, RadioButtons, LabelFieldPair, CardLabel, Dropdown, Loader, TextInput } from "@egovernments/digit-ui-react-components";
import { FormStep, RadioButtons, LabelFieldPair, CardLabel, Dropdown, Loader, TextInput, CheckBox } from "@egovernments/digit-ui-react-components";

const IsMutationPending = (props) => {
const { t, config, onSelect, userType, formData, setError, clearErrors, errors } = props;
Expand All @@ -25,15 +25,30 @@ const IsMutationPending = (props) => {

const onSkip = () => {};

function setIsMutationInCourt(e) {
if (e.target.checked == true) {
setMutationInCourt({ code: "YES"});
} else {
setMutationInCourt({ code: "NO"});
}
}

if (userType === "employee") {
return (
<React.Fragment>
<LabelFieldPair style={{ display: "flex", flexDirection: "column", alignItems: "flex-start" }}>
<CardLabel style={{ fontWeight: "bold" }} className="card-label-smaller">
{/* <CardLabel style={{ fontWeight: "bold" }} className="card-label-smaller">
{t("PT_MUTATION_COURT_PENDING_OR_NOT") + " *"}
</CardLabel>
<div className="field">
<RadioButtons
</CardLabel> */}
<div className="field" style={{width: "55%"}}>
<CheckBox
label={`${t("PT_MUTATION_COURT_PENDING_OR_NOT")}*`}
name={"isMutationInCourt"}
onChange={setIsMutationInCourt}
checked={isMutationInCourt?.code === "YES" ? true : false}
style={{ paddingBottom: "10px", paddingTop: "3px", fontWeight: "bold", fontSize: "16px", lineHeight: "19px", color: "#0b0c0c" }}
/>
{/* <RadioButtons
style={{ display: "flex" }}
innerStyles={{ paddingRight: "250px" }}
t={t}
Expand All @@ -46,7 +61,7 @@ const IsMutationPending = (props) => {
}}
labelKey="PT_MUTATION_PENDING"
isDependent={true}
/>
/> */}
</div>
</LabelFieldPair>
<LabelFieldPair style={{ marginBottom: "50px" }}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from "react";
import { FormStep, RadioButtons, LabelFieldPair, CardLabel, TextInput } from "@egovernments/digit-ui-react-components";
import { FormStep, RadioButtons, LabelFieldPair, CardLabel, TextInput, CheckBox } from "@egovernments/digit-ui-react-components";

const PTPropertyUnderStateAquire = ({ ...props }) => {
const { t, config, onSelect, userType, formData, setError, clearErrors, errors } = props;
Expand All @@ -25,15 +25,30 @@ const PTPropertyUnderStateAquire = ({ ...props }) => {

const onSkip = () => {};

function setPropertyUnderGovtPossession(e) {
if (e.target.checked == true) {
setSelected({ code: "YES"});
} else {
setSelected({ code: "NO"});
}
}

if (userType === "employee") {
return (
<React.Fragment>
<LabelFieldPair style={{ display: "flex", flexDirection: "column", alignItems: "flex-start" }}>
<CardLabel style={{ fontWeight: "bold" }} className="card-label-smaller">
{/* <CardLabel style={{ fontWeight: "bold" }} className="card-label-smaller">
{t("PT_MUTATION_STATE_ACQUISITION") + " *"}
</CardLabel>
<div className="field">
<RadioButtons
</CardLabel> */}
<div className="field" style={{width: "55%"}}>
<CheckBox
label={`${t("PT_MUTATION_STATE_ACQUISITION")}*`}
name={"isPropertyUnderGovtPossession"}
onChange={setPropertyUnderGovtPossession}
checked={isPropertyUnderGovtPossession?.code === "YES" ? true : false}
style={{ paddingBottom: "10px", paddingTop: "3px", fontWeight: "bold", fontSize: "16px", lineHeight: "19px", color: "#0b0c0c" }}
/>
{/* <RadioButtons
style={{ display: "flex" }}
innerStyles={{ paddingRight: "250px" }}
t={t}
Expand All @@ -46,7 +61,7 @@ const PTPropertyUnderStateAquire = ({ ...props }) => {
}}
labelKey="PT_MUTATION_STATE_ACQUISITION"
isDependent={true}
/>
/> */}
</div>
</LabelFieldPair>

Expand Down

0 comments on commit cf213c9

Please sign in to comment.