#41 fix naming problem, added creator-id prop for the payment. Redirect and message for paymentCompleted changed to generic for now

This commit is contained in:
Dominic Villemure
2024-05-09 22:38:44 -04:00
parent 97f03abb93
commit 26845f5aff
9 changed files with 14 additions and 24 deletions

View File

@@ -14,7 +14,7 @@ import ContactView from '../views/main/ContactView.vue'
import CreatorFolio from '../views/main/CreatorFolio.vue' import CreatorFolio from '../views/main/CreatorFolio.vue'
import HomeView from '../views/main/HomeView.vue' import HomeView from '../views/main/HomeView.vue'
import YourProfile from '../views/main/YourProfile.vue' import YourProfile from '../views/main/YourProfile.vue'
import ChloeBeauregard from '../views/manualusers/ChloeProfile.vue' import ChloeBeaugrand from '../views/manualusers/ChloeProfile.vue'
import Hutopy from '../views/manualusers/HutopyProfile.vue' import Hutopy from '../views/manualusers/HutopyProfile.vue'
import Leffet from '../views/manualusers/LeffetProfile.vue' import Leffet from '../views/manualusers/LeffetProfile.vue'
@@ -113,9 +113,9 @@ const router = createRouter({
}, },
{ {
path: '/chloebeauregard', path: '/chloebeaugrand',
name: 'chloebeauregard', name: 'chloebeaugrand',
component: ChloeBeauregard component: ChloeBeaugrand
}, },
{ {

View File

@@ -27,9 +27,6 @@
<v-card-text style="font-size: 1.2rem; text-align: center;"> <v-card-text style="font-size: 1.2rem; text-align: center;">
Merci de supporter Merci de supporter
</v-card-text> </v-card-text>
<v-card-text style="font-weight: 600; font-size: 1.6rem; text-align: center;">
Guillaume Mousseau
</v-card-text>
</v-col> </v-col>
</v-row> </v-row>
<!-- Ok btn --> <!-- Ok btn -->
@@ -38,7 +35,7 @@
<v-card-actions class="justify-center"> <v-card-actions class="justify-center">
<v-btn color="white" outlined elevation="2" <v-btn color="white" outlined elevation="2"
style="font-size: 2rem; width: 250px; height: 50px; margin-bottom: 25px; background-color: #a30e79;" style="font-size: 2rem; width: 250px; height: 50px; margin-bottom: 25px; background-color: #a30e79;"
@click="this.$router.push({ path: '/guillaumeaime' })">Ok</v-btn> @click="this.$router.push({ path: '/' })">Ok</v-btn>
</v-card-actions> </v-card-actions>
</v-col> </v-col>
</v-row> </v-row>

View File

@@ -7,7 +7,6 @@
</v-text-field> </v-text-field>
</v-row> </v-row>
<v-row> <v-row>
<v-text-field label="Montant ($)" v-model="price" <v-text-field label="Montant ($)" v-model="price"
style="border-radius: 10px; margin-bottom: 10px; color: #a30e79; background-color: #f4f4f4"> style="border-radius: 10px; margin-bottom: 10px; color: #a30e79; background-color: #f4f4f4">
@@ -24,7 +23,6 @@
</v-btn> </v-btn>
</v-row> </v-row>
<v-dialog v-model="isPaymentDialogActive" max-width="720" persistent> <v-dialog v-model="isPaymentDialogActive" max-width="720" persistent>
<template v-slot:default> <template v-slot:default>
<v-card> <v-card>
@@ -40,10 +38,6 @@
</v-dialog> </v-dialog>
</v-container> </v-container>
</template> </template>
<script setup> <script setup>
@@ -51,6 +45,8 @@ import { useClient } from '@/plugins/api.js';
import { loadStripe } from '@stripe/stripe-js'; import { loadStripe } from '@stripe/stripe-js';
import { onMounted, ref } from "vue"; import { onMounted, ref } from "vue";
const props = defineProps(['creatorId'])
let stripe = null; let stripe = null;
const client = useClient(); const client = useClient();
const price = ref(0); const price = ref(0);
@@ -72,7 +68,7 @@ async function createCheckoutSession() {
let clientSecret = await client.post('/api/Stripe', { let clientSecret = await client.post('/api/Stripe', {
amount: (price.value * 100), amount: (price.value * 100),
tipMessage: tipMessage.value, tipMessage: tipMessage.value,
creatorId: "5b122430-442a-4967-98b6-6c7787c70c91" creatorId: props.creatorId
}); });
let secret = clientSecret["data"]; let secret = clientSecret["data"];

View File

@@ -202,7 +202,7 @@
</router-link> </router-link>
</v-col> </v-col>
<v-col> <v-col>
<router-link :to="{ name: 'chloebeauregard' }"> <router-link :to="{ name: 'chloebeaugrand' }">
<img src="/images/usersmedia/chloebeaugrand/profilepictures/profileChloeBeaugrand02.png" <img src="/images/usersmedia/chloebeaugrand/profilepictures/profileChloeBeaugrand02.png"
alt="Profile Image" class="profile-image"> alt="Profile Image" class="profile-image">
</router-link> </router-link>
@@ -344,7 +344,7 @@
</router-link> </router-link>
</v-col> </v-col>
<v-col cols="8"> <v-col cols="8">
<router-link :to="{ name: 'chloebeauregard' }"> <router-link :to="{ name: 'chloebeaugrand' }">
<img src="/images/usersmedia/chloebeaugrand/profilepictures/profileChloeBeaugrand02.png" <img src="/images/usersmedia/chloebeaugrand/profilepictures/profileChloeBeaugrand02.png"
alt="Profile Image" class="profile-image"> alt="Profile Image" class="profile-image">
</router-link> </router-link>

View File

@@ -383,7 +383,7 @@ Je suis authentique, créative, stratégique, caféinée et à lécoute. Et s
JE SOUTIENS! JE SOUTIENS!
</v-card-title> </v-card-title>
</v-row> </v-row>
<StripePayment></StripePayment> <StripePayment creator-id="27e5321d-2bcc-42b0-9548-33802431e8f3"></StripePayment>
</v-container> </v-container>
</v-card> </v-card>
</v-container> </v-container>

View File

@@ -497,7 +497,7 @@
JE SOUTIENS! JE SOUTIENS!
</v-card-title> </v-card-title>
</v-row> </v-row>
<StripePayment></StripePayment> <StripePayment creator-id="5b122430-442a-4967-98b6-6c7787c70c91"></StripePayment>
</v-container> </v-container>
</v-card> </v-card>
</v-container> </v-container>

View File

@@ -375,7 +375,7 @@
JE SOUTIENS! JE SOUTIENS!
</v-card-title> </v-card-title>
</v-row> </v-row>
<StripePayment></StripePayment> <StripePayment creator-id="5b122430-442a-4967-98b6-6c7787c70c91"></StripePayment>
</v-container> </v-container>
</v-card> </v-card>
</v-container> </v-container>

View File

@@ -457,7 +457,7 @@
JE SOUTIENS! JE SOUTIENS!
</v-card-title> </v-card-title>
</v-row> </v-row>
<StripePayment></StripePayment> <StripePayment creator-id="5b122430-442a-4967-98b6-6c7787c70c91"></StripePayment>
</v-container> </v-container>
</v-card> </v-card>
</v-container> </v-container>

View File

@@ -3,9 +3,6 @@
"rewrite": "/index.html", "rewrite": "/index.html",
"exclude": ["/images/*.{png,jpg,gif}", "/css/*"] "exclude": ["/images/*.{png,jpg,gif}", "/css/*"]
}, },
"globalHeaders": {
"content-security-policy": "default-src https:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src https: data:;"
},
"mimeTypes": { "mimeTypes": {
".json": "application/json", ".json": "application/json",
".webmanifest": "application/manifest+json" ".webmanifest": "application/manifest+json"