Updated employee login

This commit is contained in:
jfrye122
2023-04-20 10:38:57 -04:00
parent bd0ba5c0df
commit 95a53222e7
6 changed files with 69 additions and 67 deletions

View File

@@ -1,35 +1,21 @@
import EmployeeActionTypes from "./employee.types";
export const signInEmployeeStart = (employeeIdAndPin) => ({
type: EmployeeActionTypes.SIGN_IN_EMPLOYEE_START,
export const employeeSignInStart = (employeeIdAndPin) => ({
type: EmployeeActionTypes.EMPLOYEE_SIGN_IN_START,
payload: employeeIdAndPin,
});
export const signInEmployeeSuccess = (technician) => ({
type: EmployeeActionTypes.SIGN_IN_EMPLOYEE_SUCCESS,
export const employeeSignInSuccess = (technician) => ({
type: EmployeeActionTypes.EMPLOYEE_SIGN_IN_SUCCESS,
payload: technician,
});
export const signInEmployeeFailure = (error) => ({
type: EmployeeActionTypes.SIGN_IN_EMPLOYEE_FAILURE,
export const employeeSignInFailure = (error) => ({
type: EmployeeActionTypes.EMPLOYEE_SIGN_IN_FAILURE,
payload: error,
});
export function loginEmployee() {
return {
type: EmployeeActionTypes.AUTHORIZING_EMPLOYEE_REQUEST,
payload:"text"
}
}
export function loginEmployeeSuccess(technician) {
return {
type: EmployeeActionTypes.AUTHORIZING_EMPLOYEE_SUCCESS,
payload: technician
}
}
export function loginEmployeeFal(error) {
return {
type: EmployeeActionTypes.AUTHORIZING_EMPLOYEE_FALURE,
error: error
}
}
export const employeeSignOut = () => ({
type: EmployeeActionTypes.EMPLOYEE_SIGN_OUT,
payload: error,
});