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

Updating Comment Moderation Branch #162

Merged
merged 30 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5e22c7f
Added column selection and number of rows to display for family repor…
OfekShaltiel-UTD Mar 17, 2024
fe4f73c
added fee recovery (frontend and frontend math), added minimium dona…
OfekShaltiel-UTD Mar 23, 2024
788bb85
Added basic fiddly bit for profile image, added page creation date an…
OfekShaltiel-UTD Mar 23, 2024
6a17cea
Added creating user and assigned advocate to page list
OfekShaltiel-UTD Mar 24, 2024
bdfe62c
added last donation tracking,fixed comment clearing bug, changed date…
OfekShaltiel-UTD Apr 8, 2024
7f26d4a
Merge stage into FamilyReportsRevamp
OfekShaltiel-UTD Apr 9, 2024
10ecc53
More changes for mergin
OfekShaltiel-UTD Apr 9, 2024
0a3dddd
Merge stage into FamilyReportsRevamp on more recent commits
OfekShaltiel-UTD Apr 9, 2024
509203e
Manual changes for merging with stage
OfekShaltiel-UTD Apr 10, 2024
30327a2
Reverting edit page EditPageId to Id change for merging
OfekShaltiel-UTD Apr 10, 2024
394fa5f
fixed router params mispell
OfekShaltiel-UTD Apr 10, 2024
bc212ca
changed dates to be DateTime in Prisma, deactivated pages that are cr…
OfekShaltiel-UTD Apr 12, 2024
55bf1c3
hotfix to UI to not trick the user
FegelSamuel Apr 18, 2024
865cf8f
[HOTFIX] replaced parentheses with ""
simaljiwa Apr 18, 2024
018d754
Changed donation fee recovery to stripe formula
OfekShaltiel-UTD Apr 19, 2024
61a9f48
Merge branch 'stage' into FamilyReportsRevamp
OfekShaltiel-UTD Apr 19, 2024
9513d5e
Family Reports Bugged ; Ofek's Changes
FegelSamuel Apr 23, 2024
a777cf8
Prototype Frontend was incomplete ; Made some tweaks
FegelSamuel Apr 23, 2024
3be208a
Merge pull request #160 from UTDallasEPICS/ofekSamFamilyReportsFix
pariahGH Apr 24, 2024
b178ba5
Merge branch 'stage' into FamilyReportsRevamp
OfekShaltiel-UTD Apr 24, 2024
b8bcadc
Merge pull request #145 from UTDallasEPICS/FamilyReportsRevamp
pariahGH Apr 24, 2024
0a3bc11
Rename InActiveDonationForm.PNG to InActiveDonationForm.png
OfekShaltiel-UTD Apr 24, 2024
96b6ea1
Rename DownPointingArrow.PNG to DownPointingArrow.png
OfekShaltiel-UTD Apr 24, 2024
128308e
Rename tooLowDonations.PNG to tooLowDonations.png
OfekShaltiel-UTD Apr 24, 2024
76e908b
Merge pull request #161 from UTDallasEPICS/image-name-fixes-for-stage
OfekShaltiel-UTD Apr 24, 2024
9bb3043
Delete package-lock.json
OfekShaltiel-UTD Apr 24, 2024
6bf574d
Put the package-lock back
OfekShaltiel-UTD Apr 24, 2024
2282dc4
Update stage.yml
OfekShaltiel-UTD Apr 24, 2024
ba5499a
Fixed issues found after deployment to stagefor demo
OfekShaltiel-UTD Apr 24, 2024
dd11813
Merge branch 'rafidSamCommentModeration' into stage
FegelSamuel Apr 24, 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
1 change: 1 addition & 0 deletions .github/workflows/stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
script: |
cd carsons-village-stage
git checkout stage
git stash
git pull
npm install
cp .env ./.output/server/.env
Expand Down
9 changes: 6 additions & 3 deletions components/CVDatepicker.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<template lang="pug">
Datepicker.rounded-md.p-2(type="String" v-model="value")
Datepicker.rounded-md.p-2(type="Date" v-model="value")
slot
</template>

<script setup lang="ts">
import Datepicker from '@vuepic/vue-datepicker';
import '@vuepic/vue-datepicker/dist/main.css';

const props = defineProps<{modelValue: string }>();
const props = defineProps<{modelValue: Date | string | null}>();

const emit = defineEmits(["update:modelValue"])
const value = computed({
get(){
/*if(props.modelValue == "null") {
return null
}*/
return props.modelValue
},
set(v: string){
set(v: Date | string | null) {
emit("update:modelValue", v)
},
})
Expand Down
2 changes: 1 addition & 1 deletion components/CVFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ div
div.absolute(style="margin-left: auto;margin-right: auto; left: 0;right: 0;")
LinkButton.absolute.bottom-4.mx-auto.text-md(class="transition duration-300 bg-orange-999 hover:bg-green-600 left-1/2 -translate-x-1/2 text-white" to='https://carsonsvillage.org/contact-us/') Contact Us
div.bg-black.flex(style="color:gray; font-weight: 700; justify-content:center; align-items: center; height: 100px;")
label COPYRIGHT 2023 CARSON'S VILLAGE |&nbsp;
label COPYRIGHT {{ (new Date()).toLocaleDateString('en', {year:'numeric'}) }} CARSON'S VILLAGE |&nbsp;
.col
NuxtLink(to='https://carsonsvillage.org/privacy-policy/') PRIVACY POLICY |&nbsp;
.col
Expand Down
17 changes: 9 additions & 8 deletions components/CVReplySystem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,19 @@ const submitComment = async () => {
replyData,
},
});

//console.log(response != false)
if (response) {
//replyData.value.pageCuid = props.pageCuid;
//replyData.value.familyCuid = props.familyCuid;
emit('displayReply', {...replyData.value});
// replyData.value.name = ""; // Clear name field
// replyData.value.reply = ""; // Clear reply field
console.log("here")
replyData.value.pageCuid = props.pageCuid;
replyData.value.familyCuid = props.familyCuid;
emit('displayReply', {...replyData.value });
//replyData.value.name = ""; // Clear name field
//replyData.value.reply = ""; // Clear reply field
// need to find a way to clear fields after submitting a response without messing up the emitted data

//successMessage.value = "Comment submitted successfully!"; // Set success message

setTimeout(clearSuccessMessage, 1500);
//clearSuccessMessage()
setTimeout(clearSuccessMessage, 800);
}

};
Expand Down
29 changes: 26 additions & 3 deletions components/DonationEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,18 @@ const props = defineProps({
familyCuid: {
type: String,
default: ""
},
isActive: {
type: Boolean,
default: false
}
})

const feeRecovery = ref(false)
const anonymous = ref(false)

const donationData = ref<PageDonation>({
amount: 0,
amount: 5,
success: false,
cuid: "",
pageCuid: props.pageCuid,
Expand All @@ -26,13 +33,25 @@ const donationData = ref<PageDonation>({
donorFirstName: "",
donorLastName: "",
comments: "",
donationDate: null,
Page: ref<Page[]>([]).value[0],
userCuid: '',
isAnonymous: false
});

const stripeLink_ref = ref("")
const create_checkout_session = async () => {
console.log(feeRecovery.value)
if(feeRecovery.value) {
donationData.value.amount = donationData.value.amount * 100 // converting to cents for better accuracy
donationData.value.amount = 1.029 * donationData.value.amount + 0.30
donationData.value.amount = donationData.value.amount / 100
}
if(anonymous.value) {
donationData.value.donorFirstName = "anonymous"
donationData.value.donorLastName = ""
}
console.log(anonymous.value)
// todo: depreciate
const donorData = {
first_name: donationData.value.donorFirstName,
Expand All @@ -58,7 +77,7 @@ const create_checkout_session = async () => {
.col-md-8.ml-4.pt-1.pr-5(class="sm:mx-4 sm:w-full sm:py-2")
CVInput(name='last_name' type='text' v-model="donationData.donorLastName" placeholder='Last Name' required)
.col-md-8.ml-4.pt-4.pr-5.flex
input#anonymous(type='checkbox' class="sm:ml-1" name='anonymous' value='Bike')
input#anonymous(type='checkbox' class="sm:ml-1" name='anonymous' v-model="anonymous")
label.mt-4.ml-4.text-md(for='anonymous' class="sm:mt-0" style="letter-spacing: 0.35px;") Make this an anonymous donation
.col-md-8.ml-4.pt-4.pr-5.flex(class="sm:mx-4 sm:w-full sm:py-2")
textarea#comments.rounded-md.outline-0.border-box.w-full.p-2(style="border: 1px solid #c4c4c4;" name='comments' rows='3' v-model="donationData.comments" placeholder='Comments' required)
Expand All @@ -67,8 +86,12 @@ const create_checkout_session = async () => {
.flex
span.bg-gray-light.py-2.px-1.text-lg(style="text-shadow: 3px 3px 4px rgba(0, 0, 0, 0.25); border: 1px solid #c4c4c4; border-right:none;") $
input#donation_amount.bg-gray-light.outline-0.rounded-r-md.border-box.w-full.p-2(style="border: 1px solid #c4c4c4; border-left:none;" name='donation_amount' type="number" min="0.00" step="0.01" v-model="donationData.amount" required)
br
img(v-if="donationData.amount < 5" src="/tooLowDonations.png" style="height:115px; width:600px")
input(type='checkbox' class="sm:ml-1" v-model='feeRecovery')
label.mt-4.ml-4.text-md(for='anonymous' class="sm:mt-0" style="letter-spacing: 0.35px;") I'd like to help cover the transaction fees of ${{ props.isActive ? (0.029 * donationData.amount + 0.30).toFixed(2) : 0}} for my donation.
.col-md-8.ml-4.pt-6.pr-5.flex.items-center.justify-center
ActionButton.mx-auto.text-md(name='submit' @click="create_checkout_session" class="transition duration-300 bg-orange-999 hover:bg-green-600") DONATE NOW
ActionButton.mx-auto.text-md(name='submit' @click="create_checkout_session" class="transition duration-300 bg-orange-999 hover:bg-green-600" :disabled="donationData.amount < 5") DONATE NOW
</template>

<style scoped></style>
54 changes: 54 additions & 0 deletions components/DonationManagementInformation.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<template lang="pug">
.flex.gap-5.justify-around
div
p.text-center.mt-10 Family
.flex.flex-col.w-full.justify-center.gap-5.mt-5
.border.border-grey-500.p-5
p.self-center.text-center Total Donations
p.text-center.mt-2 {{ donationFormat(props.totalPageDonations) }}
.border.border-grey-500.p-5
p.self-center.text-center All Funds Distributed
p.text-center.mt-2 {{ donationFormat(props.totalDistributed) }}
.border.border-grey-500.p-5
p.self-center.text-center Remaining Amount to Distribute
p.text-center.mt-2 {{ donationFormat(props.totalRemaining) }}
div
p.text-center.mt-10 Page
.flex.flex-col.w-full.justify-center.gap-5.mt-5
.border.border-grey-500.p-5
p.self-center.text-center All Page Donations
p.text-center.mt-2 {{ donationFormat(props.amount_raised) }}
.border.border-grey-500.p-5
p.self-center.text-center All Page Funds Distributed
p.text-center.mt-2 {{ donationFormat(props.amount_distributed) }}
.border.border-grey-500.p-5
p.self-center.text-center Remaining Amount to Distribute
p.text-center.mt-2 {{ donationFormat(props.amount_raised - props.amount_distributed) }}
div
p.text-center.mt-10 Page Additonal
.flex.flex-col.w-full.justify-center.gap-5.mt-5
.border.border-grey-500.p-5
p.self-center.text-center Donation Status
p.text-center.mt-2 {{ props.donationStatus }}
.border.border-grey-500.p-5
p.self-center.text-center Start Date
p.text-center.mt-2 {{ dateFormat(props.startDate) }}
.border.border-grey-500.p-5
p.self-center.text-center Last Donation Date
p.text-center.mt-2 {{ props.lastDonationDate ? dateFormat(props.lastDonationDate) : "No Donations" }}
</template>

<script setup lang="ts">
import { donationFormat, dateFormat } from "@/utils"
const props = defineProps<{
totalPageDonations: number,
totalDistributed: number,
totalRemaining: number,
amount_raised: number,
amount_distributed: number,
donationStatus: string,
startDate: Date | string | null,
lastDonationDate: Date | string | null
}>()

</script>
2 changes: 1 addition & 1 deletion components/StandardTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const headers = [
},
{
name: "current date",
property: new Date().toString(),
property: new Date().toISOString(),
kind: "date"
}
]
Expand Down
Loading
Loading