grahamgoudeau / mcg-portal Goto Github PK
View Code? Open in Web Editor NEWNetworking portal for current students and alumni for MCG (http://mcgyouthandarts.org/)
License: Apache License 2.0
Networking portal for current students and alumni for MCG (http://mcgyouthandarts.org/)
License: Apache License 2.0
Event details?
Jobs?
On the job details page, we should be supplying:
Creation and updating
On the account screen, you can list a resource you're offering to the community. MCG would like some suggestions in a dropdown, with the ability to still provide a free-form answer if desired. That list is below.
I added a new component: ui/src/components/connection/ResourceSelector.js
that should help with this. You can see an example usage of it on the connections page. Search for usages of ResourceSelector
. You provide an onChange
prop to it when you use it, and the value of that prop is some function where you use the newly-chosen value.
* Panel Speaker
* Resume Review
* Mock Interview
* Job Shadow
* Career Advising
* Education Advising
* Job/Internship
* Temporary Housing
* Project Funding
* Project Partner
* Other ___
We need to add OPTIONAL fields in the account
table for:
Next, add an endpoint to the backend server:
GET /api/accounts/<int:userId>
It should return the following JSON:
{
firstName: string,
lastInitial: string,
bio: string,
currentRole: string,
currentSchool: string,
currentCompany: string,
enrollmentStatus: nullableString,
}
Checklist, similar to #2
/api/connection-requests/<int:connectionRequestId>/resolved
@jwt_required
and @ensureOwnerOrAdmin
(to ensure only signed-in admins can perform this action)UPDATE connection_request SET resolved = TRUE WHERE id = %s
, and of course we substitute in the "connectionRequestId" parameter that we received in the first checkbox above ^Should test with something like:
curl -XPOST -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1OTIzNDk1MDAsIm5iZiI6MTU5MjM0OTUwMCwianRpIjoiYjJmYzQ0YmMtYjBkNy00ZmFiLTk5OTMtZmRlZjRmYjg2MjkxIiwiZXhwIjoyNDU2MzQ5NTAwLCJpZGVudGl0eSI6MSwiZnJlc2giOmZhbHNlLCJ0eXBlIjoiYWNjZXNzIiwidXNlcl9jbGFpbXMiOnsiaXNfYWRtaW4iOnRydWV9fQ.3bCdlwmXChH4Q4RlKaP_u-tmkBqkjciQet7R0f05aes' localhost:5000/api/connection-requests/99999/resolved
but of course swap out 99999
with a real connection request ID. You can find them by running make run-psql
and then:
SELECT id FROM connection_request;
Frontend bug, filing for those who want a bit of a challenge. To reproduce the bug:
After #43, we will have pre-set resource names that users can choose to offer. We should add filters to the browse/connections
page to take advantage of this.
Should look something like the random example that I found online, attached below. Look at the "Completed Scans" section. We should have floating filter(s) over to the right on that page. Probably one for enrollment status, and one for resource name. Doesn't have to be exact, but something like this.
To reproduce:
make run-psql
insert into resource values (default, 'test', 1, null);
(this will insert a "resource" into the database that we'll try to retrieve in the next step)curl localhost:5000/api/accounts/1/resources
We expect the output to be the JSON representation of the resource we added. But instead we get a 500 Internal Server Error
Probably means locking the table
Connections.js is broken in production. We shouldn't be duplicating logic for determining the hostname. The hostname should be passed down to the Connections component through props
The structure of this work should pretty closely follow the checklist in #2. So view that ticket for a high-level summary of the work here.
Changes from that ticket:
event
table/api/events
, and should be a POST requestgetRequesterIdInt
(get the user ID from the secure credentials they provided) to get the value for the organizer_id
column. To say another way: Don't accept a user ID through the JSON body, since that isn't secure. Get the user ID from the secure credentials, which can't be faked.This depends on #42 being done. Once that data is available, there are two things we need to do:
GET /api/accounts/<int:userId>
(the new endpoint from #42)We should consider renaming "enrollment type" since "Staff" isn't an enrollment. Not a required part of this ticket, but keep it in mind in case something good comes up
IMPORTANT: This means that we also need to add logic in the createAccount
function of accounts.py, to throw an error if someone attempts to create an account with enrollment type of "Staff". (We should only mark accounts as "Staff" through some other process)
The table definition should go at the bottom of standUpDB.bash. Follow the pattern of other tables to whatever extent is useful. The table should have a singular name, something like "job_posting".
Be sure to include a boolean column named "pending", defaulting to TRUE. We want the workflow to be that admins have to approve before job postings are seen by others. This is so that minors don't put up job postings.
Path should be GET
on /api/account
and it should return a JSON object with the relevant user details (first/last name, email, enrollment status)
Using the backend implementation done in #19, display the users with their resources on this page. Consult Jose's wireframes on figma (link in our Slack)
Take a look at Jose's wireframes in Sigma. Should show the user all their information (email, first/last name, enrollment status)
Checklist, similar to #2
We want an admin to be able to come in and approve a job posting after they've verified whatever info they need to about the person posting it (specifically, whether or not the person is a minor, etc)
/api/job-postings/<int:jobPostingId>/approved
@jwt_required
and @ensureOwnerOrAdmin
(to ensure only signed-in admins can perform this action)pending
column to TRUE
.See the table connection_request
that we create in standUpDB.bash. We need a way for the backend to create a new connection request that an admin will review.
Requirements:
/api/connection-requests
and it should be a POST request.@jwt_required
, and @schema.validate
with some schema that we think is reasonableDone!
This will be the endpoint that drives the connection requests page. We'll use this data to render the frontend later. It should be a GET to /api/accounts, and it should return an array of JSON data that has the following shape:
{
"firstName" string,
"lastInitial" string,
"resources": array
}
and each item in the resources
array looks like:
{
"resourceName": string
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.