Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Bug for beneficiarie #144

Merged
merged 5 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion components/atoms/Card/Provider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ const CardProvider = ({
{/* Provider */}
<div className="flex gap-3">
<div className="w-32 h-24 md:w-40 md:h-32 border py-2 rounded-lg overflow-hidden">
<Image
<img
src={logoLink}
className="object-contain w-full h-full"
alt={name + ' Logo'}
loading='lazy'
/>
</div>

Expand Down
24 changes: 19 additions & 5 deletions components/atoms/Stepper/Forms/identity2.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,20 @@ function Identity2() {
homeAddress: item.homeAddress,
}),
);

localStorage.setItem('dispatchBuyVoucher', JSON.stringify(
{
...client.patient,
id: item.id,
country: item.country,
firstName: item.firstName,
lastName: item.lastName,
email: item.email,
phoneNumber: item.phoneNumber,
city: item.city,
homeAddress: item.homeAddress,
}
))
setActiveStepIndex(activeStepIndex + 1);
};

Expand Down Expand Up @@ -284,7 +298,7 @@ function Identity2() {
<div className="w-20 h-2O relative">
<img
src={
index % 2 ? avatar : '/images/homme.png'
index % 2 ? '/images/femme.png' : '/images/homme.png'
}
className="object-cover rounded-xl"
width={80}
Expand All @@ -293,8 +307,8 @@ function Identity2() {
/>
<span
className={`${activeIndexSlide === index
? ''
: 'hidden'
? ''
: 'hidden'
} p-1.5 rounded-lg bg-blue-600 text-white absolute right-0 bottom-0`}
>
<CiCircleCheck size={18} />
Expand Down Expand Up @@ -412,8 +426,8 @@ function Identity2() {
<span
className="tooltip tooltip-bottom text-xs"
data-tip={`${formik.values.phoneNumber.trim(' ') != ''
? formik.values.phoneNumber
: 'Ce numéro de téléphone'
? formik.values.phoneNumber
: 'Ce numéro de téléphone'
} devra être le numéro disponible, pour être utilisé à l'hôpital `}
>
<CiCircleInfo size={23} className="text-red-400" />
Expand Down
9 changes: 6 additions & 3 deletions components/atoms/Stepper/Forms/kyc.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,19 @@ function KYC() {
const response = await fetch(`https://api.bigdatacloud.net/data/reverse-geocode-client?latitude=${latitude}&longitude=${longitude}&localityLanguage=fr`);
const data = await response.json();

if (data.continent != "Afrique") {
console.log(data.continent);

if (/Afrique/i.test(data.continent)) {
setKycTest(false)

} else {
checkKyc({ accessToken: session.accessToken }).then((data) => {
if (data) {
setKycTest(false)
} else {
conversation()
}
}).catch((error) => conversation())
} else {
setKycTest(false)
}
} catch (error) {
checkKyc({ accessToken: session.accessToken }).then((data) => {
Expand Down
14 changes: 7 additions & 7 deletions components/atoms/Stepper/Forms/payment2.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@ function Amount({
);
const [currencyPatientName, setCurrencyPatientName] = useState(
patient.countryLabel ??
new Intl.DisplayNames(['en'], { type: 'region' }).of(
patient?.country?.toUpperCase(),
),
new Intl.DisplayNames(['en'], { type: 'region' }).of(
patient?.country?.toUpperCase(),
),
);

const [currencySender, setCurrencySender] = useState('EUR');
Expand Down Expand Up @@ -380,9 +380,8 @@ function Amount({
Pays:{' '}
<b className="text-gray-700 flex gap-1 items-center">
<Image
src={`https://flagcdn.com/w20/${
patient.country ?? 'cd'
}.png`}
src={`https://flagcdn.com/w20/${patient.country ?? 'cd'
}.png`}
alt="cd"
width={20}
height={20}
Expand Down Expand Up @@ -593,7 +592,8 @@ function Amount({
</div>
<button
type="submit"
className="mt-4 mb-8 w-full rounded-md bg-orange effect-up px-6 py-3 font-medium text-white"
disabled={convertRequest}
className="mt-4 mb-8 w-full rounded-md bg-orange disabled:bg-gray-300 effect-up px-6 py-3 font-medium text-white"
>
Passer au paiement
</button>
Expand Down
10 changes: 2 additions & 8 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,15 @@ const withPWA = require('next-pwa')({
const nextConfig = withPWA({
reactStrictMode: true,
images: {
domains: [
'via.placeholder.com',
'xsgames.co',
'lh3.googleusercontent.com',
'ui-avatars.com',
'i.goopics.net',
'flagcdn.com',
],
domains: [],
},
experimental: {
forceSwcTransforms: true,
},
env: {
NEXT_PUBLIC_API_URL: 'https://api.wiiqare.com',
//NEXT_PUBLIC_API_URL: 'http://localhost:3001',
//NEXT_PUBLIC_BASE_URL: 'http://localhost:3000',
NEXT_PUBLIC_BASE_URL: 'https://app.wiiqare.com',
NEXTAUTH_URL: 'https://app.wiiqare.com',
},
Expand Down