refactor: Change codebase as per requirement
This commit is contained in:
@@ -16,7 +16,7 @@ interface accountData {
|
||||
|
||||
export default function QuickPay() {
|
||||
const router = useRouter();
|
||||
const [bankType, setBankType] = useState("own");
|
||||
// const [bankType, setBankType] = useState("own");
|
||||
const [authorized, setAuthorized] = useState<boolean | null>(null);
|
||||
const [accountData, setAccountData] = useState<accountData[]>([]);
|
||||
const [selectedAccNo, setSelectedAccNo] = useState<string | null>(null);
|
||||
@@ -150,7 +150,7 @@ export default function QuickPay() {
|
||||
};
|
||||
|
||||
async function handleProceed() {
|
||||
if (!selectedAccNo || !beneficiaryAcc || !confirmBeneficiaryAcc || !beneficiaryType || !amount ) {
|
||||
if (!selectedAccNo || !beneficiaryAcc || !confirmBeneficiaryAcc || !beneficiaryType || !amount || !remarks) {
|
||||
notifications.show({
|
||||
title: "Validation Error",
|
||||
message: "Please fill all required fields",
|
||||
@@ -174,7 +174,6 @@ export default function QuickPay() {
|
||||
color: "red",
|
||||
});
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
if (!showOtpField && !showTxnPassword && !showConfirmModel) {
|
||||
@@ -316,14 +315,7 @@ export default function QuickPay() {
|
||||
<Title order={3} mb="md">
|
||||
Quick Pay
|
||||
</Title>
|
||||
<Radio.Group value={bankType} onChange={setBankType} name="bankType" withAsterisk mb="md">
|
||||
<Group justify="center">
|
||||
<Radio value="own" label="Own Bank" />
|
||||
<Radio value="outside" label="Outside Bank" />
|
||||
</Group>
|
||||
</Radio.Group>
|
||||
|
||||
{bankType === "own" ? (
|
||||
<div style={{ maxHeight: "320px", overflowY: "auto" }}>
|
||||
<Stack gap="xs">
|
||||
<Group grow>
|
||||
@@ -414,6 +406,7 @@ export default function QuickPay() {
|
||||
onChange={(e) => setRemarks(e.currentTarget.value)}
|
||||
// withAsterisk
|
||||
readOnly={showOtpField}
|
||||
withAsterisk
|
||||
/>
|
||||
</Group>
|
||||
<Group grow>
|
||||
@@ -456,11 +449,11 @@ export default function QuickPay() {
|
||||
</Group>
|
||||
</Stack>
|
||||
</div>
|
||||
) : (
|
||||
{/* ) : (
|
||||
<div>
|
||||
<OutsideQuickPay />
|
||||
</div>
|
||||
)}
|
||||
)} */}
|
||||
</Paper>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user