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

feat: implement optional async checkout muatations and status check #4957

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4378014
feat: implement optional async checkout muatations and status check
mcstover Sep 8, 2023
d6422d6
Merge branch 'main' into VUE-1727-VUE-1728-async-checkout-setup
mcstover Sep 15, 2023
3d1cbe7
Merge branch 'main' into VUE-1727-VUE-1728-async-checkout-setup
mcstover Oct 11, 2023
431c121
fix: initiate success handler only once for the appropriate type of c…
mcstover Oct 11, 2023
ba4faf4
Merge branch 'main' into VUE-1727-VUE-1728-async-checkout-setup
mcstover Nov 28, 2023
b0a6492
Merge branch 'main' into VUE-1727-VUE-1728-async-checkout-setup
mcstover Jan 24, 2024
0a9424f
feat: iwd activity feed added (#5152)
roger-in-kiva Feb 2, 2024
fc29232
feat: added some finalized content to IWD header
dyersituations Feb 2, 2024
915cc1b
Merge pull request #5153 from kiva/CORE-1718-fe-iwd-content-on-womens…
dyersituations Feb 2, 2024
d4b0819
fix: show the checkout now button and emit to show basket on corporat…
mcstover Feb 3, 2024
5832a73
Merge pull request #5155 from kiva/fix-CIT-982-show-checkout-btn-cc-l…
mcstover Feb 5, 2024
1205eab
feat: added flag for IWD to thanks page, created working stories
dyersituations Feb 5, 2024
f853fb5
fix: added some missing story mixins
dyersituations Feb 6, 2024
9c92884
fix: added missing data prop
dyersituations Feb 6, 2024
96b6caa
Merge pull request #5156 from kiva/CORE-1729-fe-iwd-thanks-page
dyersituations Feb 6, 2024
c5572b6
feat: first IWD thanks page variation
dyersituations Feb 7, 2024
68a4d24
fix: round the borrower image
dyersituations Feb 7, 2024
74f7113
Merge pull request #5157 from kiva/CORE-1729-page-changes
dyersituations Feb 7, 2024
85a2811
fix: quick resolution of server error
dyersituations Feb 7, 2024
ffc591d
fix: empty template was also creating a warning
dyersituations Feb 7, 2024
47639ec
Merge pull request #5158 from kiva/fix-touppercase-error
dyersituations Feb 7, 2024
b1a9600
feat: remaining iwd thanks page variation
dyersituations Feb 7, 2024
3a97d83
fix: minor cleanup
dyersituations Feb 7, 2024
2fe268d
Merge pull request #5159 from kiva/CORE-1729-another-thanks-variation
dyersituations Feb 7, 2024
be6b8f6
fix: some missing thanks padding
dyersituations Feb 8, 2024
c1b925b
feat: add progress bar to campaign page
dyersituations Feb 8, 2024
e78f13f
feat: added progress bar to thanks page variations
dyersituations Feb 8, 2024
e8cf21a
fix: ensure we cover errors from new activities query
dyersituations Feb 8, 2024
6c6af72
Merge pull request #5160 from kiva/CORE-1724-add-campaign-progress-ba…
dyersituations Feb 8, 2024
9b8eb53
fix: lower activity feed items
dyersituations Feb 8, 2024
fc7f447
fix: added missing id in query
dyersituations Feb 8, 2024
7b1147b
feat: update thanks page header for challenges
dyersituations Feb 8, 2024
e62c313
Merge pull request #5161 from kiva/ACK-991-time-sensitive-change-copy…
dyersituations Feb 9, 2024
75581df
chore(release): 2.730.0-rc.1 [skip ci]
kiva-robot Feb 9, 2024
8757301
Merge branch 'main' into VUE-1727-VUE-1728-async-checkout-setup
dyersituations Feb 9, 2024
81fea32
fix: missing indent
dyersituations Feb 9, 2024
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
6 changes: 3 additions & 3 deletions .storybook/mixins/apollo-story-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ export default ({
loading = false,
} = {}) => {
// Add to basket button expects basketAddInterstitial
const queryData = { ...queryResult, data: { ...queryResult.data, basketAddInterstitial: {} } };
const queryData = { ...queryResult.data, data: { ...queryResult.data, basketAddInterstitial: {} } };

return {
provide: {
apollo: {
mutate() {
return loading ? new Promise(() => {}) : Promise.resolve(mutationResult);
return loading ? new Promise(() => { }) : Promise.resolve(mutationResult);
},
readQuery() {
return queryData;
Expand All @@ -22,7 +22,7 @@ export default ({
};
},
query() {
return loading ? new Promise(() => {}) : Promise.resolve(queryData);
return loading ? new Promise(() => { }) : Promise.resolve(queryData);
},
readFragment() {
return fragmentResult;
Expand Down
269 changes: 269 additions & 0 deletions .storybook/mock-data/thanks-page-data-mock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,269 @@
export const maleLoanData = {
"data": {
"shop": {
"id": "1",
"receipt": {
"id": "123",
"transactionTime": "2024-02-05T18:30:29Z",
"credits": {
"values": [
{
"id": 123,
"creditType": "kiva_credit",
"amount": null
}
]
},
"totals": {
"bonusAppliedTotal": "0.00",
"itemTotal": "30.00",
"donationTotal": "5.00",
"kivaCardTotal": "0.00",
"depositTotals": {
"depositTotal": "30.00",
"kivaCreditAdded": "0.00",
"kivaCreditUsed": "0.00"
},
"freeTrialAppliedTotal": "0.00",
"kivaCreditAppliedTotal": "30.00",
"redemptionCodeAppliedTotal": "0.00",
"universalCodeAppliedTotal": "0.00"
},
"hasFreeCredits": false,
"items": {
"totalCount": 2,
"values": [
{
"id": 123,
"price": "25.00",
"basketItemType": "loan_reservation",
"loan": {
"name": "Bob",
"id": 123,
"image": {
"id": 123,
"url": "https://www-0.development.kiva.org/img/s100/cd9161b3e5d58f77cf650ad9d7a37413.jpg",
"default": "https://res.cloudinary.com/kiva/w_480,h_300,c_fill,g_faces/a_ignore,fl_progressive,q_auto:best,f_auto/remote/cd9161b3e5d58f77cf650ad9d7a37413.jpg",
"hash": "cd9161b3e5d58f77cf650ad9d7a37413"
},
"use": "to acquire high-quality seeds, fertilizer, and agricultural chemicals that will aid in increasing his crop yields.",
"plannedExpirationDate": "2024-02-26T20:50:17Z",
"geocode": {
"city": "Litein",
"country": {
"name": "Kenya"
}
},
"loanAmount": "325.00",
"loanFundraisingInfo": {
"fundedAmount": "175.00",
"reservedAmount": "0.00"
},
"distributionModel": "fieldPartner",
"inPfp": false,
"gender": "male"
},
"team": {
"id": 123,
"teamPublicId": "team_canada",
"name": "Team CANADA"
}
},
{
"id": 123,
"price": "5.00",
"basketItemType": "donation"
}
]
}
}
},
"my": {
"id": "123",
"autoDeposit": null,
"teams": {
"values": [
{
"id": 123,
"team": {
"id": 123,
"teamPublicId": "team_canada",
"name": "Team CANADA"
}
},
]
},
"lender": {
"id": 123,
"name": "John"
},
"userAccount": {
"id": 123,
"firstName": "John",
"lastName": "Smith",
"email": "[email protected]",
"inviterName": "john123",
"public": true
},
"loans": {
"totalCount": 1
}
},
}
}

const futureDate = new Date();
futureDate.setDate(futureDate.getDate() + 20);

export const femaleLoanData = {
"data": {
"shop": {
"id": "1",
"receipt": {
"id": "123",
"transactionTime": "2024-02-05T18:30:29Z",
"credits": {
"values": [
{
"id": 123,
"creditType": "kiva_credit",
"amount": null
}
]
},
"totals": {
"bonusAppliedTotal": "0.00",
"itemTotal": "30.00",
"donationTotal": "5.00",
"kivaCardTotal": "0.00",
"depositTotals": {
"depositTotal": "30.00",
"kivaCreditAdded": "0.00",
"kivaCreditUsed": "0.00"
},
"freeTrialAppliedTotal": "0.00",
"kivaCreditAppliedTotal": "30.00",
"redemptionCodeAppliedTotal": "0.00",
"universalCodeAppliedTotal": "0.00"
},
"hasFreeCredits": false,
"items": {
"totalCount": 2,
"values": [
{
"id": 123,
"price": "25.00",
"basketItemType": "loan_reservation",
"loan": {
"name": "Jane",
"id": 123,
"image": {
"id": 123,
"url": "https://www-0.development.kiva.org/img/s100/9839704fb7123e37d4eb398c499cef31.jpg",
"default": "https://res.cloudinary.com/kiva/w_480,h_300,c_fill,g_faces/a_ignore,fl_progressive,q_auto:best,f_auto/remote/9839704fb7123e37d4eb398c499cef31.jpg",
"hash": "9839704fb7123e37d4eb398c499cef31"
},
"use": "to invest in raw materials to ensure she can do weaving work consistently and increase her income potential.",
"plannedExpirationDate": "2024-03-20T21:22:52Z",
"geocode": {
"city": "Rongkwang",
"country": {
"name": "Thailand"
}
},
"loanAmount": "1725.00",
"loanFundraisingInfo": {
"fundedAmount": "275.00",
"reservedAmount": "0.00"
},
"distributionModel": "fieldPartner",
"inPfp": false,
"gender": "female"
},
"team": {
"id": 123,
"teamPublicId": "team_canada",
"name": "Team CANADA"
}
},
{
"id": 123,
"price": "5.00",
"basketItemType": "donation"
}
]
}
}
},
"my": {
"id": "123",
"autoDeposit": null,
"teams": {
"values": [
{
"id": 123,
"team": {
"id": 123,
"teamPublicId": "team_canada",
"name": "Team CANADA"
}
},
]
},
"lender": {
"id": 123,
"name": "John",
"image": {
"id": 123,
"url": "https://www-kiva-org-0.freetls.fastly.net/img/s100/4da4a17c4b35913d22114bf29bb1911b.jpg",
},
"publicId": "mary19806605",
},
"userAccount": {
"id": 123,
"firstName": "John",
"lastName": "Smith",
"email": "[email protected]",
"inviterName": "john123",
"public": true
},
"loans": {
"totalCount": 1
}
},
"general": {
"kivaStats": {
"campaignStats": {
"currentBorrowerCount": 2298,
"targetBorrowerCount": 6000,
"targetEndDate": futureDate.toISOString(),
}
}
}
}
};

export const femaleLoanDataWithInviter = {
"data": {
...femaleLoanData.data,
"community": {
"lender": {
"id": 123,
"name": "Mary",
"image": {
"id": 123,
"url": "https://www-kiva-org-0.freetls.fastly.net/img/s100/4da4a17c4b35913d22114bf29bb1911b.jpg",
"width": 3264,
"height": 2448
},
"publicId": "mary19806605"
}
}
}
}

export const iwdExperiment = {
id: 'Experiment:iwd_header_2024',
version: 'b'
};

Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import NotifyMe from '@/components/Thanks/NotifyMe';
import ChallengeHeader from '@/components/Thanks/ChallengeHeader';
import apolloStoryMixin from "../mixins/apollo-story-mixin";

export default {
title: 'Components/Notify Me',
component: NotifyMe,
title: 'Components/ChallengeHeader',
component: ChallengeHeader,
};

const story = (args = {}) => {
const template = (_args, { argTypes }) => ({
props: Object.keys(argTypes),
components: { NotifyMe },
components: { ChallengeHeader },
mixins: [apolloStoryMixin()],
template:
'<notify-me :goal="goal" email="[email protected]" :teamPublicId="teamPublicId" />',
template: '<challenge-header :goal="goal" :teamPublicId="teamPublicId" />',
});
template.args = args;
return template;
Expand Down
3 changes: 3 additions & 0 deletions .storybook/stories/DonationNudgeLightbox.stories.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import DonationNudgeLightbox from '@/components/Checkout/DonationNudge/DonationNudgeLightbox.vue';
import cookieStoreStoryMixin from '../mixins/cookie-store-story-mixin';
import apolloStoryMixin from '../mixins/apollo-story-mixin';

export default {
title: 'Components/Donation Nudge Lightbox',
Expand All @@ -11,6 +13,7 @@ export default {
export const Default = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: { DonationNudgeLightbox },
mixins: [cookieStoreStoryMixin(), apolloStoryMixin()],
template: `
<donation-nudge-lightbox
:loan-count="1"
Expand Down
Loading
Loading