Skip to content

Commit

Permalink
AAAAA
Browse files Browse the repository at this point in the history
  • Loading branch information
shamith09 committed Nov 5, 2024
1 parent ace3c49 commit 2c7daec
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 12 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"react-beautiful-dnd": "13.1.1",
"react-dom": "18.2.0",
"react-helmet-async": "1.3.0",
"react-hot-toast": "2.4.1",
"react-i18next": "11.18.6",
"react-is": "18.2.0",
"react-redux": "7.2.8",
Expand Down
3 changes: 0 additions & 3 deletions server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,6 @@ def login_signup_add_PIC():
return {"error": "Incorrect email"}, 401

if form["method"] == "login":
access_token = create_access_token(identity=str(user["_id"]))
res = {"access_token": access_token}
return res
# login success
if not user["registered"]:
return {}, 404
Expand Down
21 changes: 12 additions & 9 deletions src/app/components/ReimbursementForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { apiRequest } from 'utils/apiRequest';
import { Error } from '../../../types/types';
import { getToken } from 'utils/useToken';
import { categories } from '../../pages/CategoriesPage/index';
import { toast, Toaster } from 'react-hot-toast';

interface Props {
setRequests: any;
Expand Down Expand Up @@ -207,6 +208,7 @@ export function ReimbursementForm(props: Props) {
};

const onSubmit = async (event: any) => {
toast.success('Submitted!');
event.preventDefault();
if (
isLoading ||
Expand Down Expand Up @@ -318,6 +320,7 @@ export function ReimbursementForm(props: Props) {

return (
<Form elevation={3}>
<Toaster />
<DeleteDialog
open={deleteModal}
onClose={() => setDeleteModal(false)}
Expand Down Expand Up @@ -512,6 +515,15 @@ export function ReimbursementForm(props: Props) {
<StyledStack direction="row" justifyContent="space-between">
<Stack spacing={1} direction="row">
{/* Submit Button */}
<Button
variant="outlined"
onClick={() => {
handleReset();
props.onClose();
}}
>
Cancel
</Button>
<Button
variant="contained"
onClick={onSubmit}
Expand All @@ -530,15 +542,6 @@ export function ReimbursementForm(props: Props) {
Reset
</Button>
</Stack>
<Button
variant="contained"
onClick={() => {
handleReset();
props.onClose();
}}
>
Cancel
</Button>
</StyledStack>
</Stack>
</form>
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6821,6 +6821,11 @@ globjoin@^0.1.4:
resolved "https://registry.yarnpkg.com/globjoin/-/globjoin-0.1.4.tgz#2f4494ac8919e3767c5cbb691e9f463324285d43"
integrity sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==

goober@^2.1.10:
version "2.1.16"
resolved "https://registry.yarnpkg.com/goober/-/goober-2.1.16.tgz#7d548eb9b83ff0988d102be71f271ca8f9c82a95"
integrity sha512-erjk19y1U33+XAMe1VTvIONHYoSqE4iS7BYUZfHaqeohLmnC0FdxEh7rQU+6MZ4OajItzjZFSRtVANrQwNq6/g==

gopd@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c"
Expand Down Expand Up @@ -11218,6 +11223,13 @@ [email protected]:
react-fast-compare "^3.2.0"
shallowequal "^1.1.0"

[email protected]:
version "2.4.1"
resolved "https://registry.yarnpkg.com/react-hot-toast/-/react-hot-toast-2.4.1.tgz#df04295eda8a7b12c4f968e54a61c8d36f4c0994"
integrity sha512-j8z+cQbWIM5LY37pR6uZR6D4LfseplqnuAO4co4u8917hBUvXlEqyP1ZzqVLcqoyUesZZv/ImreoCeHVDpE5pQ==
dependencies:
goober "^2.1.10"

[email protected]:
version "11.18.6"
resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.18.6.tgz#e159c2960c718c1314f1e8fcaa282d1c8b167887"
Expand Down

0 comments on commit 2c7daec

Please sign in to comment.