misc fixes

This commit is contained in:
2019-08-06 11:03:41 +02:00
parent baf8c7cea0
commit dffd974ba6
9 changed files with 683 additions and 52 deletions
+3
View File
@@ -24,6 +24,9 @@ export default function ChatCard(props) {
videoId={Ar.last(_.split(props.message.video.cdn_url, '/'))}
/>
}
<Fragment>
{/* {props.message.} */}
</Fragment>
<Fragment>
<Typography variant="headline"
variant="subtitle1"
+1 -1
View File
@@ -209,7 +209,7 @@ class AnswerRowComponent extends React.Component {
variant="h6"
component="h4"
className={classes.companyTitle}>
{rowData.ad.company.brand_name&&rowData.ad.company.brand_name}
{rowData.ad.company.business_name&&rowData.ad.company.business_name}
</Typography>
<div className={ classes.bottomCard }>
<Chip size="small" label={status.get(rowData.status)} className={classes.chip} />
-1
View File
@@ -479,7 +479,6 @@ class Header extends React.Component {
</Link>
<Link href="/" prefetch>
<a onClick={() => {
if (!_.isEmpty(nextProps.errors))
localStorage.removeItem("ttJWT");
return this.props.requestLogout();
}} className={classes.lightMenuItem}><ListItem classes={{ root: classes.rootListItemIcon }}>
+7 -5
View File
@@ -257,8 +257,10 @@ function OffreDetail(props) {
<section className={classes.headerContainerDesktop}>
<div className={classes.offerInfoContainer}>
<div className={classes.logoContainer}>
<Link href={`/Entreprise/${offre.company.id}`} prefetch >
<Avatar className={classes.logo} classes={{ img: classes.MuiAvatarImg }} src={logoUrl} />
<Link href={{pathName:`/Entreprise/${offre.company.id}`}} prefetch passHref>
<a>
<Avatar className={classes.logo} classes={{ img: classes.MuiAvatarImg }} src={logoUrl} onClick={()=>Router.push(`/Entreprise/${offre.company.id}`)}/>
</a>
</Link>
</div>
<div className={classes.infoContainer}>
@@ -267,7 +269,7 @@ function OffreDetail(props) {
</Typography>
<Link href={`/Entreprise/${offre.company.id}`} prefetch >
<Typography gutterBottom variant="subtitle1" className={classes.companyName}>
{offre.company.brand_name&&offre.company.brand_name}
{offre.company.business_name&&offre.company.business_name}
</Typography>
</Link>
{offre.is_promoted && (
@@ -304,7 +306,7 @@ function OffreDetail(props) {
{offre.title}
</Typography>
<Typography gutterBottom variant="subtitle1" className={classes.text}>
{offre.company.brand_name&&offre.company.brand_name}
{offre.company.business_name&&offre.company.business_name}
</Typography>
{/* ville */}
</div>
@@ -371,7 +373,7 @@ function OffreDetail(props) {
{!offre.is_promoted && (
<section>
<Typography gutterBottom className={classes.title + ' ' + classes.discoverTitle} align="center">
Découvrir l'entreprise <span className={classes.primary}>{offre.company.brand_name&&offre.company.brand_name}</span>
Découvrir l'entreprise <span className={classes.primary}>{offre.company.business_name&&offre.company.business_name}</span>
</Typography>
<Link href={`/Entreprise/${offre.company.id}`} prefetch >
+1 -1
View File
@@ -72,7 +72,7 @@
"bs": "yarn build && yarn start",
"copysw": "cp -R static/js .next/static/",
"cypress": "cypress open",
"restoredb":"cat cypress/postgres.sql | docker exec -i tt-website.postgres.dev psql --dbname database -U user"
"restoredb": "cat cypress/postgres.sql | docker exec -i tt-website.postgres.dev psql --dbname database -U user"
},
"devDependencies": {
"webpack-bundle-analyzer": "^3.3.2"
+3 -3
View File
@@ -341,7 +341,7 @@ class Entreprise extends React.Component {
</div>
<div className={classes.infoContainer}>
<Typography gutterBottom className={classes.text}>
{company.brand_name&&company.brand_name}
{company.business_name&&company.business_name}
</Typography>
{(nbOffre != 'Candidature spontanée')?
@@ -377,7 +377,7 @@ class Entreprise extends React.Component {
</div>
<div className={classes.infoContainer}>
<Typography gutterBottom className={classes.text}>
{company.brand_name&&company.brand_name}
{company.business_name&&company.business_name}
</Typography>
<Chip label={nbOffre} className={classes.chip} />
{/* ville */}
@@ -451,7 +451,7 @@ class Entreprise extends React.Component {
<div className={classes.container + ' ' + classes.discoverContainer} id="discover">
<Typography gutterBottom className={classes.title + ' ' + classes.discoverTitle}>
Les offres d'emploi pour <span>{company.brand_name&&company.brand_name}</span>
Les offres d'emploi pour <span>{company.business_name&&company.business_name}</span>
</Typography>
{company.loading ?
(<Loader />)
+12 -6
View File
@@ -1,4 +1,4 @@
import React from 'react'
import React, {Fragment} from 'react'
import { connect } from "react-redux";
import getConfig from 'next/config'
import PropTypes from 'prop-types';
@@ -210,7 +210,7 @@ const steps = ["", ""]
const { publicRuntimeConfig } = getConfig()
class Reponse extends React.Component {
state = {
loading: false,
loading: true,
activeStep: 0,
data:{},
openSnack: false,
@@ -226,6 +226,8 @@ class Reponse extends React.Component {
{
Router.push("/Login")
}
else
this.setState({loading: false})
}
componentWillReceiveProps(nextProps) {
@@ -233,7 +235,7 @@ class Reponse extends React.Component {
console.log(nextProps)
this.setState({
loading: nextProps.loading,
// loading: nextProps.loading,
openSnack: !!!_.isEmpty(nextProps.errors),
errors: !!!nextProps.errors ? { errors: { message: "" } } : nextProps.errors,
})
@@ -289,7 +291,8 @@ class Reponse extends React.Component {
<link rel="canonical" href="https://app.talentstube.com" />
</Head>
{/* https://codesandbox.io/s/ii0us */}
{ loading ? <Loader /> :
<Fragment>
<section className={classes.headerContainer}>
<div className={classes.logoContainer}>
<Avatar className={classes.logo} classes={{ img: classes.MuiAvatarImg }} src={logoUrl} />
@@ -384,7 +387,10 @@ class Reponse extends React.Component {
)}
<Snack variant="error" message={!!!_.isEmpty(this.state.errors) && this.state.errors.message }
openSnack={this.state.openSnack} onClose={this.handleClose} />
</LayoutBack>
</Fragment>
}
</LayoutBack>
)
}
@@ -407,7 +413,7 @@ Reponse.getInitialProps = function (context) {
function mapStateToProps(state) {
return {
loading: !!state.answer.loading,
//loading: !!state.answer.loading,
media: state.media,
offre: state.ad,
errors: state.answer.errors,
+5 -3
View File
@@ -3,9 +3,11 @@ import LayoutBack from '../components/templates/LayoutBack'
class Error extends React.Component {
static getInitialProps({ res, err }) {
console.log("**** (*)ERROR(*) *****")
console.log(err)
console.log("************************")
if (err !== null) {
console.log("**** (*)ERROR(*) *****")
console.log(err)
console.log("************************")
}
const statusCode = res ? res.statusCode : err ? err.statusCode : null
return { statusCode }
}
+651 -32
View File
File diff suppressed because it is too large Load Diff