edits for other screen sizes

This commit is contained in:
Md Asif 2024-12-23 15:22:20 +05:30
parent 44112f91bd
commit c1df68b27a
10 changed files with 21 additions and 29 deletions

View File

@ -78,5 +78,6 @@
"confirmNewKeyId": "Confirm New Key ID", "confirmNewKeyId": "Confirm New Key ID",
"highlightedFieldsInvalid": "Highlighted fields are invalid", "highlightedFieldsInvalid": "Highlighted fields are invalid",
"changeStatus": "Change Status", "changeStatus": "Change Status",
"keySwap": "Key Swap" "keySwap": "Key Swap",
"chargeEdit": "Edit Charges"
} }

View File

@ -5,7 +5,7 @@ import clsx from "clsx";
function FormField({ label, children, icon }) { function FormField({ label, children, icon }) {
return ( return (
<div className="flex"> <div className="flex">
<label className="mr-4 text-lg text-black dark:text-primary-dark w-[17%]"> <label className="mr-4 text-lg text-black dark:text-primary-dark md:w-[30%] xl:w-[20%] 2xl:w-[17%]">
{label} {label}
</label> </label>
<div className="flex w-full gap-4 items-center"> <div className="flex w-full gap-4 items-center">

View File

@ -12,7 +12,7 @@ function FormInput({
<input <input
readOnly={readOnly} readOnly={readOnly}
value={value} value={value}
className={`w-1/4 h-10 px-2 rounded-full dark:bg-white dark:text-grey border-2 text-grey focus:outline-grey ${className}`} className={`w-1/2 md:w-1/3 lg:w-1/4 h-10 px-2 rounded-full dark:bg-white dark:text-grey border-2 text-grey focus:outline-grey ${className}`}
onChange={onChange} onChange={onChange}
type={type} type={type}
maxLength={maxLength} maxLength={maxLength}

View File

@ -5,7 +5,7 @@ function FormSelect({ value, onChange, options, className }) {
<select <select
value={value} value={value}
className={ className={
"w-1/4 h-10 px-2 rounded-full dark:bg-white dark:text-grey border-2 text-grey focus:outline-grey " + "w-1/2 md:w-1/3 lg:w-1/4 h-10 px-2 rounded-full dark:bg-white dark:text-grey border-2 text-grey focus:outline-grey " +
className className
} }
onChange={onChange} onChange={onChange}

View File

@ -62,16 +62,10 @@ function AccountCreation() {
subType: "number", subType: "number",
readOnly: true, readOnly: true,
validate: (value) => value !== "", validate: (value) => value !== "",
icon: ( icon: {
<PackageSearch icon: <PackageSearch size={18} />,
size={18} onClick: () => setShowProductModal(true),
onClick={() => { },
console.log("Product search clicked");
console.log(showProductModal);
setShowProductModal(true);
}}
/>
),
}, },
{ {
label: t("interestCategory"), label: t("interestCategory"),
@ -114,7 +108,7 @@ function AccountCreation() {
subType: "number", subType: "number",
maxLength: 17, maxLength: 17,
validate: (value) => /^[0-9]{17}$/.test(value), validate: (value) => /^[0-9]{17}$/.test(value),
icon: <UserSearch size={18} />, icon: { icon: <UserSearch size={18} /> },
}, },
{ {
label: t("nomineeCifNumber"), label: t("nomineeCifNumber"),

View File

@ -40,7 +40,7 @@ function CabinetCreation() {
<FormBox title={t("cabinetCreation")}> <FormBox title={t("cabinetCreation")}>
<div className="p-2 pt-7 flex flex-col gap-4"> <div className="p-2 pt-7 flex flex-col gap-4">
<div className="flex"> <div className="flex">
<label className="mr-4 text-lg text-black dark:text-primary-dark w-[10%]"> <label className="mr-4 text-lg text-black dark:text-primary-dark w-[15%]">
{t("cabinetId")} {t("cabinetId")}
</label> </label>
<div className="w-full"> <div className="w-full">
@ -75,7 +75,7 @@ function CabinetCreation() {
</div> </div>
</div> </div>
<div className="flex"> <div className="flex">
<label className="mr-4 text-lg text-black dark:text-primary-dark w-[10%]"> <label className="mr-4 text-lg text-black dark:text-primary-dark w-[15%]">
{t("cabinetKeyId")} {t("cabinetKeyId")}
</label> </label>
<div className="w-full"> <div className="w-full">
@ -102,7 +102,7 @@ function CabinetCreation() {
</div> </div>
</div> </div>
<div className="flex"> <div className="flex">
<label className="mr-4 text-lg text-black dark:text-primary-dark w-[10%]"> <label className="mr-4 text-lg text-black dark:text-primary-dark w-[15%]">
{t("noOfLockers")} {t("noOfLockers")}
</label> </label>
<div className="w-full"> <div className="w-full">

View File

@ -41,9 +41,9 @@ function ChargeEdit() {
if (response.status === 200) { if (response.status === 200) {
const { rent, penalty } = response.data; const { rent, penalty } = response.data;
setChargeDetails({ setChargeDetails({
rentAmount: rent, rentAmount: rent.toString(),
rentAmountEdit: false, rentAmountEdit: false,
penaltyAmount: penalty, penaltyAmount: penalty.toString(),
penaltyAmountEdit: false, penaltyAmountEdit: false,
}); });
} else { } else {
@ -170,7 +170,7 @@ function ChargeEdit() {
animate={{ opacity: 1 }} animate={{ opacity: 1 }}
exit={{ opacity: 0 }} exit={{ opacity: 0 }}
className={clsx( className={clsx(
"p-4 mb-8 font-body text-center text-xl rounded-2xl flex items-center justify-center gap-2", "p-4 mb-8 font-body text-center text-lg 2xl:text-xl rounded-2xl flex items-center justify-center gap-2",
notification.type === "error" notification.type === "error"
? "bg-error-surface text-error" ? "bg-error-surface text-error"
: "bg-success-surface text-success" : "bg-success-surface text-success"

View File

@ -176,7 +176,7 @@ function KeySwap() {
animate={{ opacity: 1 }} animate={{ opacity: 1 }}
exit={{ opacity: 0 }} exit={{ opacity: 0 }}
className={clsx( className={clsx(
"p-4 mb-8 font-body text-center text-xl rounded-2xl flex items-center justify-center gap-2", "p-4 mb-8 font-body text-center text-lg rounded-2xl flex items-center justify-center gap-2",
notification.type === "error" notification.type === "error"
? "bg-error-surface text-error" ? "bg-error-surface text-error"
: "bg-success-surface text-success" : "bg-success-surface text-success"

View File

@ -14,7 +14,6 @@ function LockersRegistration() {
const location = useLocation(); const location = useLocation();
const showToast = useToast(); const showToast = useToast();
const { setIsLoading } = useLoading(); const { setIsLoading } = useLoading();
const { noOfLockers, cabinetId } = location.state; const { noOfLockers, cabinetId } = location.state;
const [submitting, setSubmitting] = useState(false); const [submitting, setSubmitting] = useState(false);
const [notification, setNotification] = useState({ const [notification, setNotification] = useState({
@ -34,7 +33,9 @@ function LockersRegistration() {
keyIdValid: true, keyIdValid: true,
})); }));
const [lockerValues, setLockerValues] = useState(initLockers); const [lockerValues, setLockerValues] = useState(initLockers);
if(!location.state) {
return <></>
}
const handleSubmit = async (e) => { const handleSubmit = async (e) => {
console.log("submitting"); console.log("submitting");
e.preventDefault(); e.preventDefault();
@ -218,7 +219,7 @@ function LockersRegistration() {
: "bg-success-surface text-success" : "bg-success-surface text-success"
)} )}
> >
{notification.message.split(":").map((msg, index) => { {notification.type === "error" ? notification.message : notification.message.split(":").map((msg, index) => {
return index === 1 ? ( return index === 1 ? (
<span key={index} className="border-b border-dashed"> <span key={index} className="border-b border-dashed">
{msg} {msg}

View File

@ -4,9 +4,5 @@ const productInfo = [
{ productCode: '1101', productCodeDescription: 'SAVINGS DEPOSIT', interestCategory: '1007', interestCategoryDescription: 'NON MEMBER', payableGl: '16301', paidGl: '62117' }, { productCode: '1101', productCodeDescription: 'SAVINGS DEPOSIT', interestCategory: '1007', interestCategoryDescription: 'NON MEMBER', payableGl: '16301', paidGl: '62117' },
{ productCode: '2002', productCodeDescription: 'CASH CERTIFICATE -GENERAL', interestCategory: '1047', interestCategoryDescription: 'COMPOUNDING', payableGl: '16011', paidGl: '62111' }, { productCode: '2002', productCodeDescription: 'CASH CERTIFICATE -GENERAL', interestCategory: '1047', interestCategoryDescription: 'COMPOUNDING', payableGl: '16011', paidGl: '62111' },
{ productCode: '2002', productCodeDescription: 'CASH CERTIFICATE', interestCategory: '1005', interestCategoryDescription: 'NON MEMBER - SENIOR CITIZEN', payableGl: '16011', paidGl: '62111' }, { productCode: '2002', productCodeDescription: 'CASH CERTIFICATE', interestCategory: '1005', interestCategoryDescription: 'NON MEMBER - SENIOR CITIZEN', payableGl: '16011', paidGl: '62111' },
{ productCode: '2001', productCodeDescription: 'MIS', interestCategory: '1003', interestCategoryDescription: 'NON MEMBER - SENIOR CITIZEN', payableGl: '16137', paidGl: '62125' },
{ productCode: '2002', productCodeDescription: 'FIXED DEPOSIT', interestCategory: '1006', interestCategoryDescription: 'NONMEMBER - SENIOR CITIZEN', payableGl: '16009', paidGl: '62109' },
{ productCode: '2002', productCodeDescription: 'CASH CERTIFICATE', interestCategory: '1001', interestCategoryDescription: 'MEMBER', payableGl: '16011', paidGl: '62111' },
{ productCode: '1101', productCodeDescription: 'SAVINGS DEPOSIT- MEMBER', interestCategory: '1347', interestCategoryDescription: 'COMPOUNDING', payableGl: '16301', paidGl: '62117' }
] ]
export default productInfo; export default productInfo;