working details view, approve/reject
This commit is contained in:
@@ -20,6 +20,7 @@ import {
|
||||
} from "../../../actions/cShift/saga.actions";
|
||||
import { ClientShiftFormView } from "./ClientShiftFormView";
|
||||
import { getEmployeeFromPrice } from "./ClientShiftShared";
|
||||
import Error from "../../Shared/Error";
|
||||
|
||||
class ClientEditShiftForm extends Component {
|
||||
constructor(props) {
|
||||
@@ -224,11 +225,13 @@ class EditClientShiftWrapper extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { cShiftRequestSuccess } = this.props;
|
||||
const { cShiftRequestSuccess, cShiftRequestErrors } = this.props;
|
||||
if (cShiftRequestSuccess.uuid) {
|
||||
return <ClientEditShiftForm {...this.props} />;
|
||||
} else if (!cShiftRequestErrors.length > 0) {
|
||||
return <Loader active />;
|
||||
} else {
|
||||
return <Loader />;
|
||||
return <Error error={cShiftRequestErrors[0]} />;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user