Skip to content

Commit

Permalink
merge develop and update email addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
euanmillar committed Feb 6, 2025
1 parent a327847 commit c4382db
Show file tree
Hide file tree
Showing 23 changed files with 1,855 additions and 362 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/close-stale-prs-after-30-days.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Close stale PRs after 30 days'
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

permissions:
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-pr-message: 'This PR has been marked with label stale Since it has been inactive for 20 days. It will automatically be closed in 10 days if no further activity occurs.'
close-pr-message: 'This PR has been automatically closed because it has been inactive for 30 days. Please reopen if you are still working on it.'
days-before-pr-stale: 20
days-before-pr-close: 10
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ data

*.tar.gz
.secrets
.env*
.env*
notebooks
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"pino-pretty": "^11.0.0",
"prettier": "^3.4.2",
"react-intl": "^6.4.3",
"vite-tsconfig-paths": "^3.5.0",
"vitest": "^2.1.2"
},
"dependencies": {
Expand All @@ -65,7 +66,7 @@
"@hapi/hapi": "^20.0.1",
"@hapi/inert": "^6.0.3",
"@opencrvs/mosip": "^1.7.0-alpha.17",
"@opencrvs/toolkit": "0.0.33",
"@opencrvs/toolkit": "0.0.34-rr",
"@types/chalk": "^2.2.0",
"@types/csv2json": "^1.4.0",
"@types/fhir": "^0.0.30",
Expand Down
50 changes: 50 additions & 0 deletions src/api/certificates/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,56 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) {
bolditalics: '/api/countryconfig/fonts/NotoSans-Regular.ttf'
}
}
},
{
id: 'tennis-club-membership-certificate',
event: Event.TENNIS_CLUB_MEMBERSHIP,
label: {
id: 'certificates.tennis-club-membership.certificate.copy',
defaultMessage: 'Tennis Club Membership Certificate copy',
description: 'The label for a tennis-club-membership certificate'
},
isDefault: false,
fee: {
onTime: 7,
late: 10.6,
delayed: 18
},
svgUrl:
'/api/countryconfig/certificates/tennis-club-membership-certificate.svg',
fonts: {
'Noto Sans': {
normal: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
bold: '/api/countryconfig/fonts/NotoSans-Bold.ttf',
italics: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
bolditalics: '/api/countryconfig/fonts/NotoSans-Regular.ttf'
}
}
},
{
id: 'tennis-club-membership-certified-certificate',
event: Event.TENNIS_CLUB_MEMBERSHIP,
label: {
id: 'certificates.tennis-club-membership.certificate.certified-copy',
defaultMessage: 'Tennis Club Membership Certificate certified copy',
description: 'The label for a tennis-club-membership certificate'
},
isDefault: false,
fee: {
onTime: 7,
late: 10.6,
delayed: 18
},
svgUrl:
'/api/countryconfig/certificates/tennis-club-membership-certified-certificate.svg',
fonts: {
'Noto Sans': {
normal: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
bold: '/api/countryconfig/fonts/NotoSans-Bold.ttf',
italics: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
bolditalics: '/api/countryconfig/fonts/NotoSans-Regular.ttf'
}
}
}
]
return certificateConfigs
Expand Down
157 changes: 157 additions & 0 deletions src/api/certificates/source/tennis-club-membership-certificate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 20 additions & 4 deletions src/api/custom-event/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@
*
* Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS.
*/
import * as Hapi from '@hapi/hapi'
import { env } from '@countryconfig/environment'
import { tennisClubMembershipEvent } from '@countryconfig/form/tennis-club-membership'
import { EventDocument } from '@opencrvs/toolkit/events'
import { birthEvent } from '@countryconfig/form/v2/birth'
import { logger } from '@countryconfig/logger'
import * as Hapi from '@hapi/hapi'
import { createClient } from '@opencrvs/toolkit/api'
import { EventDocument } from '@opencrvs/toolkit/events'

export function getCustomEventsHandler(
request: Hapi.Request,
Expand All @@ -20,12 +23,25 @@ export function getCustomEventsHandler(
return h.response([tennisClubMembershipEvent, birthEvent]).code(200)
}

export function onRegisterHandler(
export async function onRegisterHandler(
request: Hapi.Request,
h: Hapi.ResponseToolkit
) {
const event = EventDocument.parse(request.payload)
console.log(event)
const client = createClient(
env.GATEWAY_URL + '/events',
request.headers.authorization
)

logger.info(`Confirming registration ${event.id}`)
await client.event.registration.confirm.mutate({
eventId: event.id,
data: {
status: 'CONFIRMED'
}
})
logger.info(`Registration ${event.id} confirmed`)

return h.response().code(200)
}

Expand Down
5 changes: 4 additions & 1 deletion src/client-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@ window.config = {
REGISTRATIONS_DASHBOARD_URL: '',
// http://localhost:4444/public/dashboard/a17e9bc0-15a2-4bd1-92fa-ab0f346227ca#bordered=false&titled=false&refresh=300
STATISTICS_DASHBOARD_URL: '',
FEATURES: {}
FEATURES: {
// The V2_EVENTS variable is passed down from src/index.ts:309
V2_EVENTS: {{ V2_EVENTS }}
}
}
22 changes: 11 additions & 11 deletions src/data-seeding/employees/source/default-employees.csv
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
primaryOfficeId,givenNames,familyName,role,mobile,username,email,password
CRVS_OFFICE_JWMRGwDBXK,Kalusha,Bwalya,SOCIAL_WORKER,+260911111111,k.bwalya,kalushabwalya17@gmail.com,test
CRVS_OFFICE_JWMRGwDBXK,Felix,Katongo,REGISTRATION_AGENT,+260922222222,f.katongo,kalushabwalya17[email protected],test
CRVS_OFFICE_JWMRGwDBXK,Kennedy,Mweene,LOCAL_REGISTRAR,+260933333333,k.mweene,kalushabwalya1.7@gmail.com,test
CRVS_OFFICE_JWMRGwDBXK,Emmanuel,Mayuka,LOCAL_SYSTEM_ADMIN,+260921681112,e.mayuka,kalushabwalya.17@gmail.com,test
CRVS_OFFICE_2OKicPQMNI,Jonathan,Campbell,NATIONAL_SYSTEM_ADMIN,+260921111111,j.campbell,kalushabwaly.a17@gmail.com,test
CRVS_OFFICE_okQp4uKCz0,Patrick,Gondwe,LOCAL_LEADER,+260912121212,p.gondwe,kalushabwal.ya17@gmail.com,test
CRVS_OFFICE_okQp4uKCz0,Joshua,Mutale,REGISTRATION_AGENT,+260923232323,j.mutale,kalushabwa.lya17@gmail.com,test
CRVS_OFFICE_okQp4uKCz0,Derrick,Bulaya,LOCAL_REGISTRAR,+260934343434,d.bulaya,kalushabw.alya17@gmail.com,test
CRVS_OFFICE_okQp4uKCz0,Alex,Ngonga,LOCAL_SYSTEM_ADMIN,+260978787878,a.ngonga,kalushab.walya17@gmail.com,test
CRVS_OFFICE_2OKicPQMNI,Edgar,Kazembe,PERFORMANCE_MANAGER,+260977777777,e.kazembe,kalusha.bwalya17@gmail.com,test
CRVS_OFFICE_2OKicPQMNI,Joseph,Musonda,NATIONAL_REGISTRAR,+260915151515,j.musonda,kalush.abwalya17@gmail.com,test
CRVS_OFFICE_JWMRGwDBXK,Kalusha,Bwalya,SOCIAL_WORKER,+260911111111,k.bwalya,opencrvsmosipcollab@gmail.com,test
CRVS_OFFICE_JWMRGwDBXK,Felix,Katongo,REGISTRATION_AGENT,+260922222222,f.katongo,opencrvsmosipcollab[email protected],test
CRVS_OFFICE_JWMRGwDBXK,Kennedy,Mweene,LOCAL_REGISTRAR,+260933333333,k.mweene,opencrvsmosipcolla.b@gmail.com,test
CRVS_OFFICE_JWMRGwDBXK,Emmanuel,Mayuka,LOCAL_SYSTEM_ADMIN,+260921681112,e.mayuka,opencrvsmosipcoll.ab@gmail.com,test
CRVS_OFFICE_2OKicPQMNI,Jonathan,Campbell,NATIONAL_SYSTEM_ADMIN,+260921111111,j.campbell,opencrvsmosipcol.lab@gmail.com,test
CRVS_OFFICE_okQp4uKCz0,Patrick,Gondwe,LOCAL_LEADER,+260912121212,p.gondwe,opencrvsmosipco.llab@gmail.com,test
CRVS_OFFICE_okQp4uKCz0,Joshua,Mutale,REGISTRATION_AGENT,+260923232323,j.mutale,opencrvsmosipc.ollab@gmail.com,test
CRVS_OFFICE_okQp4uKCz0,Derrick,Bulaya,LOCAL_REGISTRAR,+260934343434,d.bulaya,opencrvsmosip.collab@gmail.com,test
CRVS_OFFICE_okQp4uKCz0,Alex,Ngonga,LOCAL_SYSTEM_ADMIN,+260978787878,a.ngonga,opencrvsmosi.pcollab@gmail.com,test
CRVS_OFFICE_2OKicPQMNI,Edgar,Kazembe,PERFORMANCE_MANAGER,+260977777777,e.kazembe,opencrvsmos.ipcollab@gmail.com,test
CRVS_OFFICE_2OKicPQMNI,Joseph,Musonda,NATIONAL_REGISTRAR,+260915151515,j.musonda,opencrvsmo.sipcollab@gmail.com,test
Loading

0 comments on commit c4382db

Please sign in to comment.