Members
jobDetailsToEdit :JobDetails
The `job-details` element to edit on form submission
Type:
sortField :String
The field name to be sorting by
Type:
- String
sortOrder :String
The order to be sorting by
Type:
- String
Methods
addJob(job)
Add a job application to the database
Parameters:
| Name | Type | Description |
|---|---|---|
job |
object | a job application object to be added |
- Source:
(async) addJobsToDocument(jobs)
Takes in an array of jobs and for each job creates a
new `job-details` element, adds the job data to that element
using `element.data = {...}`, and then appends that new job
to `job-details-list`.
Parameters:
| Name | Type | Description |
|---|---|---|
jobs |
Array.<Object> | An array of jobs |
(async) addJobToDocument(job)
Create or edit a `job-details` element.
Parameters:
| Name | Type | Description |
|---|---|---|
job |
Object | The job data to pass to the `job-details` element |
addSkill(skill)
Add a skill.
Parameters:
| Name | Type | Description |
|---|---|---|
skill |
string | The skill to add. |
addSortBars(fieldNames)
Takes in an array of field names and for each name creates a
new `sort-bar` element, adds the name to that element
using `element.data = {...}`, and then appends that new element
to `sort-bar-list`.
Parameters:
| Name | Type | Description |
|---|---|---|
fieldNames |
Array.<Object> | An array of field names |
clearForm()
Clear the `form` fields
deleteJob(id)
Delete a job application by id
Parameters:
| Name | Type | Description |
|---|---|---|
id |
number | id of the job application we want to delete |
- Source:
deleteSkill(skill)
Remove a skill.
Parameters:
| Name | Type | Description |
|---|---|---|
skill |
string | The skill to remove. |
filterSearch()
The function which filters the jobs by search query
getAllJobs()
Get all jobs in DB
- Source:
getJob(id)
Read a job application by id
Parameters:
| Name | Type | Description |
|---|---|---|
id |
number | id of the job application we want |
- Source:
hideDeletePopup()
Hide the `delete-popup` element
hideForm()
Hide the `form` element
initFormHandler()
Adds the necesarry event handlers to `form`.
showDeletePopup()
Show the `delete-popup` element
showForm()
Show the `form` element
(async) sort()
Sort the job-details elements by the current sortField and sortOrder
updateJob(job)
Update a job application with new content
Parameters:
| Name | Type | Description |
|---|---|---|
job |
object |
- Source: