-
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.
Add payment and tracking to address form
Adds hidden fields to post tracking and payment information when the form is submitted. Ticket: https://phabricator.wikimedia.org/T345528
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
src/components/pages/donation_form/DonationReceipt/usePaymentValues.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,20 @@ | ||
import { Store } from 'vuex'; | ||
import { computed, ComputedRef } from 'vue'; | ||
|
||
type ReturnType = { | ||
amount: ComputedRef<string>, | ||
interval: ComputedRef<string>, | ||
paymentType: ComputedRef<string> | ||
}; | ||
|
||
export function usePaymentValues( store: Store<any> ): ReturnType { | ||
const amount = computed<string>( () => store.state.payment.values.amount ); | ||
const interval = computed<string>( () => store.state.payment.values.interval ); | ||
const paymentType = computed<string>( () => store.state.payment.values.type ); | ||
|
||
return { | ||
amount, | ||
interval, | ||
paymentType, | ||
}; | ||
} |
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