H-Richard / talent-frontend

Frontend for Talent, a talent acquisition web application
10 stars 1 forks source link

Applications Duck #33

Open H-Richard opened 4 years ago

H-Richard commented 4 years ago

The application duck should handle storing and manipulating application data, hence the name applications duck.

On load,

if the user is of type applicant, the GET request to /applications will return all of that users applications.

if the user if is of type executive, the GET request to /applications will return all of the current active applications. This is to be paginated and is currently out of scope.

The result is to be cached and stored in the store somewhere, for ease of access we store applications in an object of type { [id: number]: ApplicationObject }

Sample API response:

[{
    "additionalInfo": "I know youtube",
    "applicant": {
        "email": "applicant@gmail.com",
        "executive": false,
        "firstName": "Applicant",
        "lastName": "Doe",
        "updatedAt": "2020-08-03T22:20:53.773832Z"
    },
    "appliedAt": "2020-08-03T22:24:59.359878Z",
    "resumeURL": "google.ca",
    "gitHubURL": "google.ca",
    "id": 3,
    "linkedInURL": "google.ca",
    "otherURL": "google.ca",
    "portfolioURL": "google.ca",
    "post": {
        "active": true,
        "createdAt": "2020-08-03T22:20:53.778759Z",
        "description": "Market Things",
        "desirements": [
            "Skills",
            "Youtube"
        ],
        "expiresAt": "2020-08-03T22:20:53.778661Z",
        "id": 2,
        "requirements": [
            "Instagram",
            "Facebook"
        ],
        "title": "VP of Marketing",
        "updatedAt": "2020-08-03T22:20:53.778759Z"
    },
    "status": 0
}]
H-Richard commented 4 years ago

blocked by H-Richard/talent-backend/pull/7