-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dashboard): rajout du bouton Rafraichir
- Loading branch information
Arnaud AMBROSELLI
committed
Nov 6, 2023
1 parent
82c78c7
commit 8f89496
Showing
5 changed files
with
76 additions
and
88 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ module.exports = { | |
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import React from 'react'; | ||
import { useDataLoader } from './DataLoader'; | ||
import API from '../services/api'; | ||
import { ModalBody, ModalContainer, ModalFooter, ModalHeader } from './tailwind/Modal'; | ||
|
||
export default function UnBugButton() { | ||
const [isModalOpen, setIsModalOpen] = React.useState(false); | ||
const { resetCache } = useDataLoader(); | ||
return ( | ||
<> | ||
<button | ||
type="button" | ||
className="button-link !tw-ml-0" | ||
onClick={() => { | ||
setIsModalOpen(true); | ||
}}> | ||
Un bug ? | ||
</button> | ||
{isModalOpen && ( | ||
<ModalContainer open={isModalOpen} onClose={() => setIsModalOpen(false)} size="xl"> | ||
<ModalHeader toggle={() => setIsModalOpen(false)} title="Un bug ? 🪲" /> | ||
<ModalBody className="tw-p-4"> | ||
<p> | ||
Vous ne voyez plus vos données ? C’est peut-être un problème de cache sur votre ordinateur. Nous vous conseillons les étapes | ||
suivantes : | ||
</p> | ||
<ul className="tw-list-disc tw-space-y-2"> | ||
<li> | ||
Cliquez{' '} | ||
<button | ||
className={'tw-text-blue-500 tw-underline'} | ||
onClick={() => { | ||
resetCache().then(() => { | ||
return API.logout(); | ||
}); | ||
}}> | ||
sur ce lien | ||
</button>{' '} | ||
pour réinitialiser le cache et vérifiez si le problème persiste | ||
</li> | ||
<li> | ||
Essayez depuis un autre ordinateur ou un autre compte pour voir si le problème est général ou localisé. Cela aidera les équipes pour | ||
l'étape suivante | ||
</li> | ||
<li> | ||
Si le problème persiste, contactez votre chargé de déploiement : | ||
<ul className="tw-list-disc"> | ||
<li>Yoann - [email protected] (06 83 98 29 66)</li> | ||
<li>Melissa - [email protected] (06 13 23 33 45)</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
</ModalBody> | ||
<ModalFooter> | ||
<button type="button" className="button-cancel" onClick={() => setIsModalOpen(false)}> | ||
Fermer | ||
</button> | ||
</ModalFooter> | ||
</ModalContainer> | ||
)} | ||
</> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,9 +1,4 @@ | ||
import React from 'react'; | ||
import BackButton from '../backButton'; | ||
import { useDataLoader } from '../DataLoader'; | ||
import ButtonCustom from '../ButtonCustom'; | ||
import API from '../../services/api'; | ||
import { ModalBody, ModalContainer, ModalFooter, ModalHeader } from '../tailwind/Modal'; | ||
|
||
const Header = ({ title, style = {}, titleStyle = {}, className = '' }) => { | ||
return ( | ||
|
@@ -13,63 +8,6 @@ const Header = ({ title, style = {}, titleStyle = {}, className = '' }) => { | |
); | ||
}; | ||
|
||
export const UnBugButton = () => { | ||
const [isModalOpen, setIsModalOpen] = React.useState(false); | ||
const { resetCache } = useDataLoader(); | ||
return ( | ||
<> | ||
<ButtonCustom | ||
className="tw-ml-4" | ||
color="link" | ||
title="Un bug ?" | ||
onClick={() => { | ||
setIsModalOpen(true); | ||
}} | ||
/> | ||
{isModalOpen && ( | ||
<ModalContainer open={isModalOpen} onClose={() => setIsModalOpen(false)} size="xl"> | ||
<ModalHeader toggle={() => setIsModalOpen(false)} title="Un bug ? 🪲" /> | ||
<ModalBody className="tw-p-4"> | ||
<p> | ||
Vous ne voyez plus vos données ? C’est peut-être un problème de cache sur votre ordinateur. Nous vous conseillons les étapes | ||
suivantes : | ||
</p> | ||
<ul className="tw-list-disc tw-space-y-2"> | ||
<li> | ||
Cliquez{' '} | ||
<button | ||
className={'tw-text-blue-500 tw-underline'} | ||
onClick={() => { | ||
resetCache().then(() => { | ||
return API.logout(); | ||
}); | ||
}}> | ||
sur ce lien | ||
</button>{' '} | ||
pour réinitialiser le cache et vérifiez si le problème persiste ; | ||
</li> | ||
<li> | ||
Essayez depuis un autre ordinateur ou un autre compte pour voir si le problème est général ou localisé. Cela aidera les équipes pour | ||
l'étape suivante ; | ||
</li> | ||
<li> | ||
Si le problème persiste, contactez votre chargé de déploiement : | ||
<ul className="tw-list-disc"> | ||
<li>Yoann - [email protected] (06 83 98 29 66)</li> | ||
<li>Melissa - [email protected] (06 13 23 33 45)</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
</ModalBody> | ||
<ModalFooter> | ||
<ButtonCustom color="secondary" title="Fermer" onClick={() => setIsModalOpen(false)} /> | ||
</ModalFooter> | ||
</ModalContainer> | ||
)} | ||
</> | ||
); | ||
}; | ||
|
||
export const SmallHeaderWithBackButton = ({ className, ...props }) => { | ||
return <Header className={[className, 'tw-py-4 tw-px-0'].join(' ')} title={<BackButton />} {...props} />; | ||
}; | ||
|
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