You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

131 lines
4.2 KiB

import { takeLatest } from "redux-saga/effects";
import {
SEND_REGISTER_REQUEST,
SEND_EMAIL_VERIFICATION_REQUEST,
SEND_LOGIN_REQUEST,
SEND_LOGOUT_REQUEST,
SEND_CHANGE_PASSWORD_REQUEST,
SEND_FORGOT_PASSWORD_REQUEST,
SEND_RESET_PASSWORD_REQUEST
} from "../constants/auth.constants";
import {
registerUserFlow,
verifyEmailFlow,
loginUserFlow,
logoutUserFlow,
changePasswordFlow,
forgotPasswordFlow,
resetPasswordFlow
} from "./auth.sagas";
import {
GET_SELF_USER_REQUEST,
CREATE_USER_INFO_REQUEST,
UPDATE_USER_INFO_REQUEST,
CREATE_CLIENT_REQUEST,
UPDATE_CLIENT_REQUEST,
CREATE_PROVIDER_REQUEST,
UPDATE_PROVIDER_REQUEST
} from "../constants/user.constants";
import {
getSelfUserFlow,
createUserInfoFlow,
updateUserInfoFlow,
createClientFlow,
updateClientFlow,
createProviderFlow,
updateProviderFlow
} from "./user.sagas";
import {
CREATE_WORKTYPE_REQUEST,
READ_WORKTYPE_REQUEST,
UPDATE_WORKTYPE_REQUEST,
DELETE_WORKTYPE_REQUEST
} from "../constants/worktype.constants";
import {
createWorktypeFlow,
readWorktypeFlow,
updateWorktypeFlow,
deleteWorktypeFlow
} from "./worktype.sagas";
import {
CREATE_EMPLOYEE_REQUEST,
READ_EMPLOYEE_REQUEST,
DELETE_EMPLOYEE_REQUEST
} from "../constants/employee.constants";
import {
addEmployeeFlow,
readEmployeeFlow,
deleteEmployeeFlow
} from "./employee.sagas";
import { UPDATE_EMPLOYER_REQUEST } from "../constants/employer.constants";
import { updateEmployerFlow } from "./employer.sagas";
import {
CREATE_PRICE_REQUEST,
UPDATE_PRICE_REQUEST,
DELETE_PRICE_REQUEST
} from "../constants/price.constants";
import {
createPriceFlow,
updatePriceFlow,
deletePriceFlow
} from "./price.sagas";
import {
CREATE_MULTIPLE_CSHIFT_REQUEST,
GET_CSHIFTS_REQUEST,
GET_CSHIFT_REQUEST,
EDIT_CSHIFT_REQUEST,
DELETE_CSHIFT_REQUEST
} from "../constants/cShift.constants";
import {
createCShiftsFlow,
getCShiftsFlow,
getCShiftFlow,
editCShiftFlow,
deleteCShiftFlow
} from "./cShift.sagas";
import {
GET_PSHIFTS_REQUEST,
GET_PSHIFT_REQUEST,
UPDATE_PSHIFT_REQUEST
} from "../constants/pShift.constants";
import {
getPShiftsFlow,
getPShiftFlow,
updatePShiftFlow
} from "./pShift.sagas";
export default function* rootSaga() {
yield takeLatest(SEND_REGISTER_REQUEST, registerUserFlow);
yield takeLatest(SEND_EMAIL_VERIFICATION_REQUEST, verifyEmailFlow);
yield takeLatest(SEND_LOGIN_REQUEST, loginUserFlow);
yield takeLatest(SEND_LOGOUT_REQUEST, logoutUserFlow);
yield takeLatest(SEND_CHANGE_PASSWORD_REQUEST, changePasswordFlow);
yield takeLatest(SEND_FORGOT_PASSWORD_REQUEST, forgotPasswordFlow);
yield takeLatest(SEND_RESET_PASSWORD_REQUEST, resetPasswordFlow);
yield takeLatest(GET_SELF_USER_REQUEST, getSelfUserFlow);
yield takeLatest(CREATE_USER_INFO_REQUEST, createUserInfoFlow);
yield takeLatest(UPDATE_USER_INFO_REQUEST, updateUserInfoFlow);
yield takeLatest(CREATE_CLIENT_REQUEST, createClientFlow);
yield takeLatest(UPDATE_CLIENT_REQUEST, updateClientFlow);
yield takeLatest(CREATE_PROVIDER_REQUEST, createProviderFlow);
yield takeLatest(UPDATE_PROVIDER_REQUEST, updateProviderFlow);
yield takeLatest(CREATE_WORKTYPE_REQUEST, createWorktypeFlow);
yield takeLatest(READ_WORKTYPE_REQUEST, readWorktypeFlow);
yield takeLatest(UPDATE_WORKTYPE_REQUEST, updateWorktypeFlow);
yield takeLatest(DELETE_WORKTYPE_REQUEST, deleteWorktypeFlow);
yield takeLatest(CREATE_EMPLOYEE_REQUEST, addEmployeeFlow);
yield takeLatest(READ_EMPLOYEE_REQUEST, readEmployeeFlow);
yield takeLatest(DELETE_EMPLOYEE_REQUEST, deleteEmployeeFlow);
yield takeLatest(UPDATE_EMPLOYER_REQUEST, updateEmployerFlow);
yield takeLatest(CREATE_PRICE_REQUEST, createPriceFlow);
yield takeLatest(UPDATE_PRICE_REQUEST, updatePriceFlow);
yield takeLatest(DELETE_PRICE_REQUEST, deletePriceFlow);
yield takeLatest(CREATE_MULTIPLE_CSHIFT_REQUEST, createCShiftsFlow);
yield takeLatest(GET_CSHIFTS_REQUEST, getCShiftsFlow);
yield takeLatest(GET_CSHIFT_REQUEST, getCShiftFlow);
yield takeLatest(EDIT_CSHIFT_REQUEST, editCShiftFlow);
yield takeLatest(DELETE_CSHIFT_REQUEST, deleteCShiftFlow);
yield takeLatest(GET_PSHIFTS_REQUEST, getPShiftsFlow);
yield takeLatest(GET_PSHIFT_REQUEST, getPShiftFlow);
yield takeLatest(UPDATE_PSHIFT_REQUEST, updatePShiftFlow);
}