-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
717 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+67.8 KB
public/static/img/whatsapp-qrcode-coach/whatsapp-qrcode-rennes-lorient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,6 @@ export const CVEditPicture = ({ | |
)} | ||
</StyledEditPictureButton> | ||
)} | ||
; | ||
</StyledEditPictureContainer> | ||
); | ||
}; |
8 changes: 8 additions & 0 deletions
8
...s/backoffice/dashboard/DahsboardAlertWhatsappCoach/DashboardAlertWhatsappCoach.styles.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const StyledAlertContent = styled.div` | ||
display: flex; | ||
flex: 1; | ||
justify-content: space-between; | ||
align-items: center; | ||
`; |
36 changes: 36 additions & 0 deletions
36
...mponents/backoffice/dashboard/DahsboardAlertWhatsappCoach/DashboardAlertWhatsappCoach.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React, { useState } from 'react'; | ||
import { DashboardJoinWhatsappCoachModal } from '../DashboardJoinWhatsappCoachModal/DashboardJoinWhatsappCoachModal'; | ||
import { openModal } from 'src/components/modals/Modal'; | ||
import { Button } from 'src/components/utils'; | ||
import { Alert } from 'src/components/utils/Alert'; | ||
import { StyledAlertContent } from './DashboardAlertWhatsappCoach.styles'; | ||
|
||
export const DashboardAlertWhatsappCoach = () => { | ||
const [alertVisible, setAlertVisible] = useState(true); | ||
const openJoinWhatsappModal = () => { | ||
openModal(<DashboardJoinWhatsappCoachModal />); | ||
}; | ||
|
||
return ( | ||
<Alert | ||
closable | ||
visible={alertVisible} | ||
onClose={() => { | ||
setAlertVisible(false); | ||
}} | ||
> | ||
<StyledAlertContent> | ||
Pour recevoir des actualités et échanger avec les coachs de votre | ||
région, rejoignez le groupe Whatsapp | ||
<Button | ||
color="primaryBlue" | ||
style="custom-secondary" | ||
size="small" | ||
onClick={openJoinWhatsappModal} | ||
> | ||
Rejoindre le groupe Whatsapp | ||
</Button> | ||
</StyledAlertContent> | ||
</Alert> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...ffice/dashboard/DashboardJoinWhatsappCoachModal/DashboardJoinWhatsappCoachModal.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const StyledImageContainer = styled.div` | ||
text-align: center; | ||
`; |
35 changes: 35 additions & 0 deletions
35
.../backoffice/dashboard/DashboardJoinWhatsappCoachModal/DashboardJoinWhatsappCoachModal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from 'react'; | ||
|
||
import { useModalContext } from 'src/components/modals/Modal'; | ||
import { ModalGeneric } from 'src/components/modals/Modal/ModalGeneric'; | ||
import { Button, Img, SimpleLink } from 'src/components/utils'; | ||
import { useAuthenticatedUser } from 'src/hooks/authentication/useAuthenticatedUser'; | ||
import { StyledImageContainer } from './DashboardJoinWhatsappCoachModal.styles'; | ||
|
||
export const DashboardJoinWhatsappCoachModal = () => { | ||
const { onClose } = useModalContext(); | ||
const user = useAuthenticatedUser(); | ||
|
||
return ( | ||
<ModalGeneric title="Rejoindre note groupe Whatsapp"> | ||
Pour recevoir des actualités et échanger avec les coachs de votre région, | ||
scannez le QR code | ||
<StyledImageContainer> | ||
<SimpleLink href={user.whatsappJoinUrl.url} target="_blank"> | ||
<Img | ||
src={user.whatsappJoinUrl.qrCodePath} | ||
alt="QR code Whatsapp" | ||
width={250} | ||
height={250} | ||
/> | ||
</SimpleLink> | ||
<p>{user.whatsappJoinUrl.name}</p> | ||
</StyledImageContainer> | ||
<div className="uk-modal-footer uk-padding-remove-horizontal uk-padding-remove-bottom uk-margin-medium-top"> | ||
<Button onClick={onClose} style="default"> | ||
Fermer | ||
</Button> | ||
</div> | ||
</ModalGeneric> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
src/components/backoffice/parametres/ParametresLayout/ExternalCVCard/Content.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import React, { useEffect } from 'react'; | ||
import { useDispatch } from 'react-redux'; | ||
import { Close } from 'assets/icons/icons'; | ||
import { ButtonIcon } from 'src/components/utils'; | ||
import { useAuthenticatedUser } from 'src/hooks/authentication/useAuthenticatedUser'; | ||
import { useCurrentUserExternalCv } from 'src/hooks/useCurrentUserExternalCv'; | ||
import { currentUserActions } from 'src/use-cases/current-user'; | ||
import { | ||
StyledCvUploadInfosText, | ||
StyledDeleteIconContainer, | ||
StyledFilename, | ||
} from './ExternalCVCard.styles'; | ||
|
||
interface ContentProps { | ||
dataTestId?: string; | ||
} | ||
|
||
export const Content = ({ dataTestId }: ContentProps) => { | ||
const user = useAuthenticatedUser(); | ||
const externalCv = useCurrentUserExternalCv(); | ||
const dispatch = useDispatch(); | ||
|
||
useEffect(() => { | ||
if (user.userProfile.hasExternalCv) { | ||
dispatch(currentUserActions.getExternalCvRequested()); | ||
} | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, [user.userProfile.hasExternalCv]); | ||
|
||
const removeCallback = () => { | ||
dispatch(currentUserActions.deleteExternalCvRequested()); | ||
}; | ||
|
||
const openExternalCV = () => { | ||
if (externalCv === null) return; | ||
window.open(externalCv, '_blank'); | ||
}; | ||
|
||
if (user.userProfile.hasExternalCv) { | ||
return ( | ||
<> | ||
<StyledFilename onClick={openExternalCV}>Votre CV</StyledFilename> | ||
<StyledDeleteIconContainer onClick={removeCallback}> | ||
<ButtonIcon | ||
icon={<Close width={10} height={10} />} | ||
dataTestId={`${dataTestId}-button-edit`} | ||
/> | ||
</StyledDeleteIconContainer> | ||
</> | ||
); | ||
} | ||
return ( | ||
<StyledCvUploadInfosText> | ||
Vous n'avez pas encore de CV Entourage Pro. Téléchargez votre propre | ||
CV. | ||
</StyledCvUploadInfosText> | ||
); | ||
}; |
Oops, something went wrong.