Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "feat:update payment section in register page" #225

Merged
merged 1 commit into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 5 additions & 26 deletions src/app/register/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import {
UndertakingLink,
PaymentPolicyInfo,
PaymentHeading,
DisclaimerPara,
Heading,
} from './register.styles';
import Link from 'next/link';
import InputField from '@/components/Register/InputField/InputField';
Expand All @@ -28,13 +26,7 @@ import { PrimaryButton } from '@/components/shared/Typography/Buttons';
import { AuthContext } from '@/context/auth-context';
import { RegistrationModal } from './RegistrationModal';
import toast from 'react-hot-toast';
// import { QrButton } from '@/components/Register/PaymentComponents/QrButton';
import { MerchantInfo } from '@/components/Register/PaymentComponents/MerchantInfo';
import { Qr } from '@/components/Register/PaymentComponents/Qr';
import { Heading3 } from '../events/page.style';
// import { Paragraph, SmallParagraph } from '@/components/shared/Typography/Paragraphs';
// import { Heading1 } from '@/components/shared/Typography/Headings';
// import { Heading3 } from '../codeofconduct/page.styles';
import { QrButton } from '@/components/Register/Qrscanner/QrButton';

function Page() {
const [userDetails, setUserDetails] = useState({
Expand Down Expand Up @@ -159,26 +151,13 @@ function Page() {
error={errors[field.id]}
/>
);

case 'Head':
return <PaymentHeading>{field.content}</PaymentHeading>;

case 'or':
return <Heading>{field.content}</Heading>;

case 'Title':
case 'button':
return (
<>
{/* <PaymentHeading>Payment Section </PaymentHeading> */}
<MerchantInfo label={field.label} labelInfo={field.labelInfo} />
<PaymentHeading>Payment Section </PaymentHeading>
<QrButton label={field.label} />
</>
);
case 'Image':
return <Qr QrUrl={field.QrUrl} />;

case 'Disclaimer':
return <DisclaimerPara>{field.content}</DisclaimerPara>;

case 'checkbox':
return (
<CheckBox
Expand Down Expand Up @@ -208,7 +187,7 @@ function Page() {
<RegisterContainer>
<Moon />

{isLoggedIn ? (
{!isLoggedIn ? (
<RegisterInnerContainer>
<RegisterHeading>Register</RegisterHeading>
<RegisterForm>
Expand Down
20 changes: 4 additions & 16 deletions src/app/register/register.styles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,16 @@ import styled from 'styled-components';
import tw from 'twin.macro';
import { Heading1, Heading2 } from '@/components/shared/Typography/Headings';
import { PrimaryButton } from '@/components/shared/Typography/Buttons';
import { SmallParagraph } from '@/components/shared/Typography/Paragraphs';
import { Heading3 } from '../events/page.style';

export const RegisterHeading = styled(Heading1)`
${tw`text-center text-2xl xxs:text-3xl ssm:text-4xl md:text-5xl lg:text-6xl my-0 py-0 font-spaceX text-white`}
`;

export const PaymentHeading = styled(Heading2)`
${tw`m-0 p-3 border-[#00FFD1] border-2 rounded-lg`}
`;

export const Heading = styled(Heading3)`
${tw`pb-0 mb-0`}
export const PaymentContainer = styled.div`
${tw`w-auto h-auto p-5 border-[#00FFD1] border-2`}
`;
export const MerchantLabel = styled(Heading2)`
${tw`text-left text-[#00FFD1] p-0 m-0`}
`;
export const MerchantLabelInfo = styled(Heading2)`
${tw`text-left text-gray-200 m-0 p-0 `}
`;
export const DisclaimerPara = styled(SmallParagraph)`
${tw`text-red-500 `}
export const PaymentHeading = styled(Heading2)`
${tw`text-left`}
`;

export const RegisterContainer = styled.div`
Expand Down
13 changes: 0 additions & 13 deletions src/components/Register/PaymentComponents/MerchantInfo.jsx

This file was deleted.

11 changes: 0 additions & 11 deletions src/components/Register/PaymentComponents/Qr.jsx

This file was deleted.

44 changes: 4 additions & 40 deletions src/config/content/Registration/details.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,48 +222,12 @@ export const formFields = [
id: 'gender',
className: 'oneliner',
},

{ type: 'Head', content: 'pay via Qr' },

{
label: 'Merchant Name',
type: 'Title',
labelInfo: 'PLAN FUND NIT ROURKELA',
},
{
label: 'UPI ID',
type: 'Title',
labelInfo: '85002429435@sbi',
},
{
type: 'Image',
QrUrl:
'https://res.cloudinary.com/dfe8sdlkc/image/upload/v1729940616/Pay_for_Registration_oqdgsq.png',
},
{
type: 'Disclaimer',
content: '{Please ensure the amount is exactly INR 899}',
},
{ type: 'or', content: 'or' },

{ type: 'Head', content: 'pay through bank' },

{
label: 'Bank Account Name',
type: 'Title',
labelInfo: 'STUDENT ACTIVITY CENTRE NIT - ROURKELA',
},
{
label: 'Bank Account Number',
type: 'Title',
labelInfo: '_00000037377186107',
},
{
label: 'IFSC Code',
type: 'Title',
labelInfo: 'SBIN0002109',
label: 'Click to Pay',
type: 'button',
id: 'qr',
className: 'w-full',
},

{
label: 'Upload Payment Screenshot',
type: 'file',
Expand Down
Loading