| @@ -35,5 +35,6 @@ export const PrimaryButtonStyled = styled(Button)` | |||
| &:disabled { | |||
| background-color: ${selectedTheme.colors.primaryPurpleDisabled}; | |||
| color: ${(props) => props.textcolor}; | |||
| border: 1px solid ${selectedTheme.colors.primaryBorderDisabled}; | |||
| } | |||
| `; | |||
| @@ -12,7 +12,7 @@ export const VerticalScrollerContainer = styled(Box)` | |||
| flex-wrap: nowrap; | |||
| overflow: hidden; | |||
| padding-right: 5px; | |||
| height: 100%; | |||
| /* height: 100%; */ | |||
| /* @media screen and (max-width: 1200px) { | |||
| height: 465px; | |||
| @@ -55,7 +55,7 @@ function* fetchChats({ payload }) { | |||
| queryString: queryString, | |||
| }); | |||
| yield call(console.dir, data); | |||
| yield put(setChats([...data.data])); | |||
| yield put(setChats([...data.data.chatsWithData])); | |||
| yield put(fetchChatsSuccess()); | |||
| } catch (e) { | |||
| yield put(fetchChatsError()); | |||
| @@ -67,7 +67,7 @@ function* fetchHeaderChats() { | |||
| try { | |||
| const userId = yield select(selectUserId); | |||
| const data = yield call(attemptFetchHeaderChats, userId); | |||
| yield put(setChats([...data.data])); | |||
| yield put(setChats([...data.data.chatsWithData])); | |||
| yield put(fetchHeaderChatsSuccess()); | |||
| } catch (e) { | |||
| yield put(fetchHeaderChatsError()); | |||
| @@ -211,7 +211,7 @@ function* fetchMineOffers() { | |||
| try { | |||
| const userId = yield select(selectUserId); | |||
| const data = yield call(attemptFetchProfileOffers, userId); | |||
| yield put(setMineOffers(data.data)); | |||
| yield put(setMineOffers(data.data.offers)); | |||
| yield put(fetchMineOffersSuccess()); | |||
| } catch (e) { | |||
| yield put(fetchMineOffersError()); | |||
| @@ -222,7 +222,7 @@ function* fetchMineHeaderOffers() { | |||
| try { | |||
| const userId = yield select(selectUserId); | |||
| const data = yield call(attemptFetchProfileOffers, userId); | |||
| yield put(setMineHeaderOffers(data.data.slice(0, 2))); | |||
| yield put(setMineHeaderOffers(data.data.offers.slice(0, 2))); | |||
| yield put(fetchMineHeaderOffersSuccess()); | |||
| } catch (e) { | |||
| yield put(fetchMineHeaderOffersError()); | |||
| @@ -23,21 +23,27 @@ function* fetchRegisterUser({ payload }) { | |||
| try { | |||
| const requestBody = new FormData(); | |||
| requestBody.append("email", payload.values.mail); | |||
| requestBody.append("password", payload.values.password); | |||
| requestBody.append("password", payload.values.registerPassword); | |||
| requestBody.append("file", payload.values.image); | |||
| requestBody.append("company[name]", payload.values.nameOfFirm); | |||
| requestBody.append("company[PIB]", payload.values.PIB); | |||
| if (payload.values.phoneNumber.toString().length !== 0) | |||
| requestBody.append("company[contacts][telephone]", payload.values.phoneNumber); | |||
| requestBody.append( | |||
| "company[contacts][telephone]", | |||
| payload.values.phoneNumber | |||
| ); | |||
| if (payload.values.location.toString().length !== 0) | |||
| requestBody.append("company[contacts][location]", payload.values.location); | |||
| requestBody.append( | |||
| "company[contacts][location]", | |||
| payload.values.location | |||
| ); | |||
| if (payload.values.website.toString().length !== 0) | |||
| requestBody.append("company[contacts][web]", payload.values.website); | |||
| yield call(attemptRegister, requestBody); | |||
| const { data } = yield call(attemptLogin, { | |||
| email: payload.values.mail, | |||
| password: payload.values.password, | |||
| password: payload.values.registerPassword, | |||
| }); | |||
| if (data.token) { | |||
| const token = data.token; | |||
| @@ -2,9 +2,10 @@ export const primaryThemeColors = { | |||
| primaryPurple: "#5A3984", | |||
| primaryPurpleAnimation: "#4B2C73", | |||
| primaryYellow: "#f7b126", | |||
| primaryPurpleDisabled: "#4D4D4D", | |||
| primaryPurpleDisabled: "#E4E4E4", | |||
| primaryBorderDisabled: "#D4D4D4", | |||
| primaryBackgroundColor: "#F1F1F1", | |||
| primaryTextDisabled: "#F1F1F1", | |||
| primaryTextDisabled: "#B4B4B4", | |||
| primaryText: "#4D4D4D", | |||
| primaryGrayText: "#818181", | |||
| primaryDarkGrayText: "#DCDCDC", | |||