Changed the status and moved the payload to the users-services
This commit is contained in:
@@ -75,13 +75,13 @@ function ReferralDisplay() {
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.data.internal_return < 0) {
|
if (res.data.internal_return < 0) {
|
||||||
setError({
|
setError({
|
||||||
message: "Email already referred",
|
message: res.data.status,
|
||||||
loading: false,
|
loading: false,
|
||||||
status: false,
|
status: false,
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
toast.success("Message Sent");
|
toast.success(res.data.status | "Message Sent!");
|
||||||
setError({ message: "", loading: false, status: true });
|
setError({ message: "", loading: false, status: true });
|
||||||
setRefHistoryReload((prev) => !prev);
|
setRefHistoryReload((prev) => !prev);
|
||||||
}
|
}
|
||||||
@@ -98,16 +98,7 @@ function ReferralDisplay() {
|
|||||||
//FUNCTION TO HANDLE SUBMIT
|
//FUNCTION TO HANDLE SUBMIT
|
||||||
const handleSubmit = (values, helpers) => {
|
const handleSubmit = (values, helpers) => {
|
||||||
setError({ message: "", loading: true, status: false });
|
setError({ message: "", loading: true, status: false });
|
||||||
|
sendReferralMsg({...values}); // FUNCTION TO SEND REFERRAL MESSAGE
|
||||||
var postData = {
|
|
||||||
uid: localStorage.getItem("uid"),
|
|
||||||
member_id: localStorage.getItem("member_id"),
|
|
||||||
sessionid: localStorage.getItem("session_token"),
|
|
||||||
action: 11032,
|
|
||||||
...values,
|
|
||||||
};
|
|
||||||
|
|
||||||
sendReferralMsg(postData); // FUNCTION TO SEND REFERRAL MESSAGE
|
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@@ -444,7 +444,14 @@ class usersService {
|
|||||||
|
|
||||||
//END POINT CALL FOR SENDING REFERRAL MESSAGE
|
//END POINT CALL FOR SENDING REFERRAL MESSAGE
|
||||||
sendReferralMsg(postData) {
|
sendReferralMsg(postData) {
|
||||||
return this.postAuxEnd("/sendreferral", postData);
|
var reqData = {
|
||||||
|
uid: localStorage.getItem("uid"),
|
||||||
|
member_id: localStorage.getItem("member_id"),
|
||||||
|
sessionid: localStorage.getItem("session_token"),
|
||||||
|
action: 11032,
|
||||||
|
...postData
|
||||||
|
}
|
||||||
|
return this.postAuxEnd("/sendreferral", reqData);
|
||||||
}
|
}
|
||||||
|
|
||||||
StartResetPassword(reqData) {
|
StartResetPassword(reqData) {
|
||||||
|
|||||||
Reference in New Issue
Block a user