@@ -149,7 +158,7 @@ const ReportForm = () => {
tasks: inputs,
difficulties: troublesInputValue,
tomorrow: scheduledInputValue,
- created_at: getCreatedDate(),
+ created_at: getCreatedDate(reportDate),
status: 1,
},
logout: () => dispatch(auth(false))
diff --git a/src/components/ReportForm/reportForm.scss b/src/components/ReportForm/reportForm.scss
index 68f85c02..eb3449d4 100644
--- a/src/components/ReportForm/reportForm.scss
+++ b/src/components/ReportForm/reportForm.scss
@@ -1,6 +1,11 @@
.report-form {
+
+ .report__head {
+ margin-top: 20px;
+ }
+
&__block-title {
- margin-top: 76px;
+ margin-top: 15px;
h2 {
color: #282828;
diff --git a/src/pages/Profile.js b/src/pages/Profile.js
new file mode 100644
index 00000000..31fd3a39
--- /dev/null
+++ b/src/pages/Profile.js
@@ -0,0 +1,71 @@
+import React, {useEffect, useState} from 'react';
+import { ProfileHeader } from "../components/Profile/ProfileHeader";
+import { setProfileInfo, getProfileInfo } from "../redux/outstaffingSlice";
+import {useDispatch, useSelector} from "react-redux";
+import { fetchGet } from '../../src/server/server'
+import {Link} from "react-router-dom";
+
+import './../components/Profile/profile.scss'
+export const Profile = () => {
+ const dispatch = useDispatch();
+ const profileInfo = useSelector(getProfileInfo)
+ useEffect(() => {
+ fetchGet({
+ link: `${process.env.REACT_APP_API_URL}/api/profile/get-main-data?user_id=${localStorage.getItem('id')}`,
+ }).then((profileInfo) => {
+ dispatch(setProfileInfo(profileInfo))
+ })
+ }, [dispatch, localStorage.getItem('id')])
+ return(
+
+
+
+
+
+
{profileInfo.position_name} {profileInfo.specification}
+
+
{profileInfo.fio}
+
Опыт работы: {profileInfo.years_of_exp}года
+
+
+
+
+
+
Vuetifyis.com
+
Forked from peluprvi/vuetifyjs.com
Vuetifyjs.com
+ documentation
+
+
Angular
+
+
+
+
+
Vuetifyis.com
+
Forked from peluprvi/vuetifyjs.com
Vuetifyjs.com
+ documentation
+
+
Angular
+
+
+
+
+
Vuetifyis.com
+
Forked from peluprvi/vuetifyjs.com
Vuetifyjs.com
+ documentation
+
+
Laravel
+
+
+
+
+
+
+
+
+
+
+ )
+}
+
diff --git a/src/pages/ProfileCalendarPage.js b/src/pages/ProfileCalendarPage.js
new file mode 100644
index 00000000..b1095be0
--- /dev/null
+++ b/src/pages/ProfileCalendarPage.js
@@ -0,0 +1,9 @@
+import React from 'react';
+import { WithLogout } from '../hoc/withLogout';
+import { ProfileCalendar } from '../../src/components/ProfileCalendar/ProfileCalendar';
+
+const ProfileCalendarPage = () => {
+ return
;
+};
+
+export default ProfileCalendarPage;
diff --git a/src/redux/outstaffingSlice.js b/src/redux/outstaffingSlice.js
index 304ad4ca..f48d9711 100644
--- a/src/redux/outstaffingSlice.js
+++ b/src/redux/outstaffingSlice.js
@@ -8,6 +8,8 @@ const initialState = {
currentCandidate: {},
auth: false,
positionId: null,
+ profileInfo: {},
+ reportsDates: ''
};
export const outstaffingSlice = createSlice({
@@ -37,11 +39,17 @@ export const outstaffingSlice = createSlice({
},
setUserInfo: (state, action) => {
state.userInfo = action.payload;
- }
+ },
+ setProfileInfo: (state, action) => {
+ state.profileInfo = action.payload;
+ },
+ setReportsDates: (state, action) => {
+ state.reportsDates = action.payload;
+ },
},
});
-export const { tags, profiles, selectedItems, auth, currentCandidate, filteredCandidates, setPositionId, setUserInfo } = outstaffingSlice.actions;
+export const { tags, profiles, selectedItems, auth, currentCandidate, filteredCandidates, setPositionId, setUserInfo, setProfileInfo, setReportsDates } = outstaffingSlice.actions;
export const selectProfiles = (state) => state.outstaffing.profiles;
export const selectTags = (state) => state.outstaffing.tags;
@@ -50,6 +58,8 @@ export const selectItems = (state) => state.outstaffing.selectedItems;
export const selectCurrentCandidate = (state) => state.outstaffing.currentCandidate;
export const selectAuth = (state) => state.outstaffing.auth;
export const getPositionId = (state) => state.outstaffing.positionId;
+export const getProfileInfo = (state) => state.outstaffing.profileInfo;
export const selectUserInfo = (state) => state.outstaffing.userInfo;
+export const getReportsDates = (state) => state.outstaffing.reportsDates;
export default outstaffingSlice.reducer;
diff --git a/src/redux/reportSlice.js b/src/redux/reportSlice.js
index 9146e9dc..840001f6 100644
--- a/src/redux/reportSlice.js
+++ b/src/redux/reportSlice.js
@@ -2,6 +2,7 @@ import { createSlice } from '@reduxjs/toolkit';
const initialState = {
dateSelected: '',
+ reportDate: ''
};
export const reportSlice = createSlice({
@@ -11,11 +12,16 @@ export const reportSlice = createSlice({
dateSelected: (state, action) => {
state.dateSelected = action.payload;
},
+ setReportDate: (state, action) => {
+ state.reportDate = action.payload;
+ },
},
});
-export const { dateSelected, } = reportSlice.actions;
+export const { dateSelected, setReportDate} = reportSlice.actions;
export const selectDate = (state) => state.report.dateSelected;
+export const getReportDate = (state) => state.report.reportDate;
+
export default reportSlice.reducer;