removed form disabling mechanism and fixed notification bug in CheckInOutManagement.jsx
This commit is contained in:
parent
2afefc7442
commit
dcfa7a46d8
@ -166,10 +166,7 @@ function ChargeEdit() {
|
||||
<AnimatePresence>
|
||||
{notification.message !== "" && <Notification {...notification} />}
|
||||
</AnimatePresence>
|
||||
<div className="relative">
|
||||
{notification.type === "success" && (
|
||||
<div className="absolute inset-0 bg-[#fff]/50 z-10 rounded-3xl" />
|
||||
)}
|
||||
|
||||
<FormBox title={t("chargeEdit")}>
|
||||
<FieldsWrapper>{formFields.map(renderField)}</FieldsWrapper>
|
||||
<Button
|
||||
@ -180,7 +177,6 @@ function ChargeEdit() {
|
||||
}
|
||||
/>
|
||||
</FormBox>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -14,11 +14,7 @@ import FieldsWrapper from "../components/FieldsWrapper";
|
||||
|
||||
function CheckInOutManagement() {
|
||||
const [accountNumber, setAccountNumber] = useState("");
|
||||
const [notification, setNotification] = useState({
|
||||
visible: false,
|
||||
message: "",
|
||||
type: "",
|
||||
});
|
||||
const [notification, setNotification] = useState({ message: "", type: "" });
|
||||
|
||||
const showToast = useToast();
|
||||
const { setIsLoading } = useLoading();
|
||||
@ -64,7 +60,7 @@ function CheckInOutManagement() {
|
||||
return (
|
||||
<div>
|
||||
<AnimatePresence>
|
||||
{notification.visible && <Notification notification={notification} />}
|
||||
{ notification.message !== "" && <Notification {...notification} /> }
|
||||
</AnimatePresence>
|
||||
<FormBox title="Check In/Out">
|
||||
<FieldsWrapper>
|
||||
@ -80,7 +76,7 @@ function CheckInOutManagement() {
|
||||
}}
|
||||
/>
|
||||
</FormField>
|
||||
</FieldsWrapper>
|
||||
</FieldsWrapper>
|
||||
<Button text="Next" onClick={handleNext} />
|
||||
</FormBox>
|
||||
</div>
|
||||
|
@ -166,15 +166,10 @@ function KeySwap() {
|
||||
<AnimatePresence>
|
||||
{notification.message !== "" && <Notification {...notification} />}
|
||||
</AnimatePresence>
|
||||
<div className="relative">
|
||||
{notification.type === "success" && (
|
||||
<div className="absolute inset-0 bg-[#fff]/50 z-10 rounded-3xl" />
|
||||
)}
|
||||
<FormBox title={t("lockerStatus")}>
|
||||
<FieldsWrapper>{formFields.map(renderField)}</FieldsWrapper>
|
||||
<Button text={t("submit")} onClick={handleKeySwap} />
|
||||
</FormBox>
|
||||
</div>
|
||||
<FormBox title={t("lockerStatus")}>
|
||||
<FieldsWrapper>{formFields.map(renderField)}</FieldsWrapper>
|
||||
<Button text={t("submit")} onClick={handleKeySwap} />
|
||||
</FormBox>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user