From 7824b421d20cca88e1b39d39592c24aa38a3c5fc Mon Sep 17 00:00:00 2001 From: mbappai Date: Sun, 6 Aug 2023 19:34:25 +0100 Subject: [PATCH 1/5] feat: pass coverImageHash instead of hardCoded value --- pages/organizations/venues/new.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/organizations/venues/new.tsx b/pages/organizations/venues/new.tsx index e1a507e4..c3fa24b1 100644 --- a/pages/organizations/venues/new.tsx +++ b/pages/organizations/venues/new.tsx @@ -133,7 +133,7 @@ export default function NewService(){ ...formData, ...fullAddress, logoImageHash: imageHash, - coverImageHash: "coverimagehash", + coverImageHash: imageHash, latitude:String(fullAddress.latitude), longitude:String(fullAddress.longitude), contactNumber: formatedContact, From ea6da6d041ccefe86b1d427f30a13a375f5e75ae Mon Sep 17 00:00:00 2001 From: mbappai Date: Sun, 6 Aug 2023 19:36:51 +0100 Subject: [PATCH 2/5] fix: fix github workflow --- .github/workflows/deploy.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6aa63d59..bed1fa68 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -117,10 +117,10 @@ jobs: if: github.ref == 'refs/heads/prod' uses: appleboy/ssh-action@v0.1.7 with: - host: ${{ secrets.DEV_REMOTE_SERVER_ADDRESS }} - username: ${{ secrets.DEV_SERVER_USERNAME }} - key: ${{ secrets.DEV_REMOTE_SERVER_KEY }} - port: ${{ secrets.DEV_SSH_PORT }} + host: ${{ secrets.PROD_REMOTE_SERVER_ADDRESS }} + username: ${{ secrets.PROD_SERVER_USERNAME }} + key: ${{ secrets.PROD_REMOTE_SERVER_KEY }} + port: ${{ secrets.PROD_SSH_PORT }} script: | pwd cd ~ From 1df307468ec43c71b3fbfd569f8996efbab5e3a8 Mon Sep 17 00:00:00 2001 From: mbappai Date: Sun, 6 Aug 2023 19:41:24 +0100 Subject: [PATCH 3/5] refactor: update worflow file --- .github/workflows/deploy.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6aa63d59..bed1fa68 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -117,10 +117,10 @@ jobs: if: github.ref == 'refs/heads/prod' uses: appleboy/ssh-action@v0.1.7 with: - host: ${{ secrets.DEV_REMOTE_SERVER_ADDRESS }} - username: ${{ secrets.DEV_SERVER_USERNAME }} - key: ${{ secrets.DEV_REMOTE_SERVER_KEY }} - port: ${{ secrets.DEV_SSH_PORT }} + host: ${{ secrets.PROD_REMOTE_SERVER_ADDRESS }} + username: ${{ secrets.PROD_SERVER_USERNAME }} + key: ${{ secrets.PROD_REMOTE_SERVER_KEY }} + port: ${{ secrets.PROD_SSH_PORT }} script: | pwd cd ~ From 5b2286408cfb09885c31faae2be0de5f4bc5cd78 Mon Sep 17 00:00:00 2001 From: mbappai Date: Sun, 6 Aug 2023 19:52:46 +0100 Subject: [PATCH 4/5] refactor: change value from userRole to staffRole --- components/StaffPage/index.tsx | 2 +- pages/organizations/communities/staff/index.tsx | 2 +- pages/organizations/events/staff/index.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/StaffPage/index.tsx b/components/StaffPage/index.tsx index bf45688b..435f8d2f 100644 --- a/components/StaffPage/index.tsx +++ b/components/StaffPage/index.tsx @@ -312,7 +312,7 @@ const createData = useMutation(createDataHandler,{ const user = data.data[0] const status = user.status - message = status == 0 ? `Staff could not be added because they aren't registered. A registration link has beens sent to ${user.email} to register and will be added automatically to as ${user.userRoleName} after registration`:`User has been added to service as a ${user.userRoleName}` + message = status == 0 ? `Staff could not be added because they aren't registered. A registration link has beens sent to ${user.email} to register and will be added automatically to as ${user.staffRoleName} after registration`:`User has been added to service as a ${user.staffRoleName}` notification['success']({ message: message, style:{ diff --git a/pages/organizations/communities/staff/index.tsx b/pages/organizations/communities/staff/index.tsx index 2ee91494..339512eb 100644 --- a/pages/organizations/communities/staff/index.tsx +++ b/pages/organizations/communities/staff/index.tsx @@ -293,7 +293,7 @@ const createData = useMutation(createDataHandler,{ const user = data.data[0] const status = user.status - message = status == 0 ? `Staff could not be added because they aren't registered. A registration link has beens sent to ${user.email} to register and will be added automatically to as ${user.userRoleName} after registration`:`User has been added to service as a ${user.userRoleName}` + message = status == 0 ? `Staff could not be added because they aren't registered. A registration link has beens sent to ${user.email} to register and will be added automatically to as ${user.staffRoleName} after registration`:`User has been added to service as a ${user.staffRoleName}` notification['success']({ message: message, style:{ diff --git a/pages/organizations/events/staff/index.tsx b/pages/organizations/events/staff/index.tsx index f82c4ffe..d470b9d1 100644 --- a/pages/organizations/events/staff/index.tsx +++ b/pages/organizations/events/staff/index.tsx @@ -309,7 +309,7 @@ const createData = useMutation(createDataHandler,{ const user = data.data[0] const status = user.status - message = status == 0 ? `Staff could not be added because they aren't registered. A registration link has beens sent to ${user.email} to register and will be added automatically to as ${user.userRoleName} after registration`:`User has been added to event as a ${user.userRoleName}` + message = status == 0 ? `Staff could not be added because they aren't registered. A registration link has beens sent to ${user.email} to register and will be added automatically to as ${user.staffRoleName} after registration`:`User has been added to event as a ${user.staffRoleName}` notification['success']({ message: message, style:{ From 89c2929454d50e614264b52f00ec9c326135eeb6 Mon Sep 17 00:00:00 2001 From: mbappai Date: Sun, 6 Aug 2023 20:05:01 +0100 Subject: [PATCH 5/5] refactor: show appropriate messaging for when initated tickets are about to be redeemed --- pages/manager/bookings/events.tsx | 7 ++++++- pages/organizations/events/bookings/index.tsx | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/pages/manager/bookings/events.tsx b/pages/manager/bookings/events.tsx index fb65d779..03c41732 100644 --- a/pages/manager/bookings/events.tsx +++ b/pages/manager/bookings/events.tsx @@ -475,7 +475,12 @@ function DetailDrawer({selectedRecord,isDrawerOpen,closeDrawer}:DrawerProps){ ) })} - {selectedRecord.redeemStatus === 'redeemed'?It appears that your ticket has already been redeemed :null} + {selectedRecord.redeemStatus === 'redeemed' + ?It appears that your ticket has already been redeemed + :selectedRecord.paymentStatus!== 'sucessful' + ?Payment status for this ticket has to be successful before it can be redeemed + :null + } diff --git a/pages/organizations/events/bookings/index.tsx b/pages/organizations/events/bookings/index.tsx index d592719b..c082b27d 100644 --- a/pages/organizations/events/bookings/index.tsx +++ b/pages/organizations/events/bookings/index.tsx @@ -430,7 +430,12 @@ return( /> ) })} - {selectedRecord.redeemStatus === 'redeemed'?It appears that your ticket has already been redeemed :null} + {selectedRecord.redeemStatus === 'redeemed' + ?It appears that your ticket has already been redeemed + :selectedRecord.paymentStatus!== 'sucessful' + ?Payment status for this ticket has to be successful before it can be redeemed + :null + }