Compare commits

..

3 Commits

Author SHA1 Message Date
DESKTOP-QHP1O2H\MIKE 44627c34dd Merge branch 'master' of https://gitlab.chiefsoft.net/MyFit/users-myfit into straight-underline-no-curvy_michael 2023-01-30 03:51:16 -05:00
DESKTOP-QHP1O2H\MIKE 5064fb6d88 Merge branch 'master' of https://gitlab.chiefsoft.net/MyFit/users-myfit into straight-underline-no-curvy_michael
# Conflicts:
#	src/components/AuthPages/Login/index.jsx
2023-01-30 03:50:38 -05:00
DESKTOP-QHP1O2H\MIKE 10e8f9fa67 straight underline-no curvy 2023-01-24 11:29:17 -05:00
4 changed files with 22 additions and 50 deletions
-1
View File
@@ -9,6 +9,5 @@ REACT_APP_APPSITE=" https://myfitapp.mermsemr.com"
REACT_APP_AUX_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfit"
REACT_APP_USERS_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
# REACT_APP_PASSWORD_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfituser/resetpass"
REACT_APP_SESSION_EXPIRE_MINUTES = 5
+12 -1
View File
@@ -1,5 +1,5 @@
<svg width="174" height="31" viewBox="0 0 174 31" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1 17.9998C10.5 7.5 56.6856 24.9909 78 28C120.5 34 162 24 173 1" stroke="url(#paint0_linear_4_1797)" stroke-width="2" stroke-linecap="round"/>
<path d="M0,0 173,0" stroke="url(#paint0_linear_4_1797)" stroke-width="4" stroke-linecap="round"/>
<defs>
<linearGradient id="paint0_linear_4_1797" x1="1" y1="1" x2="11.0515" y2="59.9411" gradientUnits="userSpaceOnUse">
<stop stop-color="#F539F8"/>
@@ -8,3 +8,14 @@
</linearGradient>
</defs>
</svg>
<!-- <svg width="174" height="31" viewBox="0 0 174 31" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1 17.9998C10.5 7.5 56.6856 24.9909 78 28C120.5 34 162 24 173 1" stroke="url(#paint0_linear_4_1797)" stroke-width="2" stroke-linecap="round"/>
<defs>
<linearGradient id="paint0_linear_4_1797" x1="1" y1="1" x2="11.0515" y2="59.9411" gradientUnits="userSpaceOnUse">
<stop stop-color="#F539F8"/>
<stop offset="0.416763" stop-color="#C342F9"/>
<stop offset="1" stop-color="#5356FB"/>
</linearGradient>
</defs>
</svg> -->

Before

Width:  |  Height:  |  Size: 520 B

After

Width:  |  Height:  |  Size: 997 B

@@ -1,40 +1,10 @@
import React, { useState, useEffect } from "react";
import { Link, useNavigate } from 'react-router-dom';
import React from "react";
import { Link } from 'react-router-dom';
import titleShape from "../../../assets/images/shape/title-shape-two.svg";
import InputCom from "../../Helpers/Inputs/InputCom";
import AuthLayout from "../AuthLayout";
export default function ForgotPassword() {
const navigate = useNavigate();
const [validation, setValidation] = useState("")
const [buttonDisabled, setButtonDisabled] = useState(true)
// email
const [email, setEmail] = useState("");
const handleEmail = (e) => {
setEmail(e.target.value);
};
function validationChecker(email) {
const emailCheck = /^[^0-9][a-zA-Z0-9._%+-]+@[a-zA-Z]+(\.[a-zA-Z]+)+$/;
if (email === "") {
setValidation("email is required");
} else if (!email.match(emailCheck)) {
setValidation('Please input a valid email address');
} else {
setValidation("");
setButtonDisabled(false)
}
}
useEffect(() => {
validationChecker(email)
}, [email])
return (
<>
<AuthLayout
@@ -58,24 +28,19 @@ export default function ForgotPassword() {
name="email"
type="email"
iconName="message"
inputHandler={handleEmail}
value={email}
/>
{validation && <p className="my-5 font-bold text-red-500">{validation}</p>}
</div>
<div className="signin-area mb-3.5">
<button
<a
href="/verify-you"
className="w-full rounded-[50px] mb-5 h-[58px] text-xl text-white font-bold flex justify-center bg-purple items-center"
disabled={buttonDisabled}
onClick={() => navigate("/verify-you")}
>
Send Code
</button>
</a>
<Link to="/"
className="my-40 font-bold flex justify-center text-red-500 items-center"
className=" my-40 font-bold flex justify-center text-red-500 items-center"
>
Back to Home
</Link>
+3 -6
View File
@@ -15,7 +15,6 @@ class usersService {
return this.postAuxEnd("/login", reqData);
}
getUserReminders(){
return this.getAuxEnd("/reminders", null);
}
@@ -56,16 +55,14 @@ class usersService {
});
}
postAuxEnd(uri, reqData) {
const endPoint = process.env.REACT_APP_USERS_ENDPOINT + uri;
const token = '..your token..'
const session_token = localStorage.getItem("session_token");
let axiosConfig = {
headers: {
'Accept': 'application/json',
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json;charset=UTF-8',
'Authorization': `Basic ${token}`,
'Authorization': `Basic ${session_token}`,
}
};
//Access-Control-Allow-Origin
@@ -75,7 +72,7 @@ class usersService {
};
// Axios.defaults.headers.post['Content-Type'] ='application/json;charset=utf-8';
// Axios.defaults.headers.post['Access-Control-Allow-Origin'] = '*'; //,axiosConfig
return Axios.post(endPoint, reqData)
return Axios.post(endPoint, reqData,axiosConfig)
.then((response) => {
console.log(response);
// res = response;