Coder Social home page Coder Social logo

bcgov / newjobsurveyadmin Goto Github PK

View Code? Open in Web Editor NEW
1.0 10.0 1.0 1.05 MB

The New Job Survey Admin tool will assist BC Stats in administering the BCPS New Job Survey.

Home Page: https://www2.gov.bc.ca/gov/content/data/statistics/government/employee-research/new-job-survey

License: Apache License 2.0

Shell 1.30% JavaScript 1.05% HTML 0.64% SCSS 1.32% TypeScript 41.82% CSS 0.05% C# 53.82%
bcstats citz dotnet-core openshift react

newjobsurveyadmin's Introduction

NewJobSurveyAdmin

The New Job Survey Admin tool will assist BC Stats in administering the BCPS New Job Survey.

Lifecycle:Stable

Development tasks

Running a development environment

Prerequisites

  1. Ensure the .NET Core SDK 3.1.20 (on the linked page, scroll down and expand the 3.1.2 disclosure arrow to find the correct SDK) is installed.
  2. Ensure you have the .NET EF Core CLI installed: dotnet tool install dotnet-ef --version 6.0.0
  3. Ensure the .NET Core HTTPS development certificate is trusted.
  4. Install Postgres and create a database named njsa.
  5. Check out the code from this repository.

NB. To be fully functional, the application should be run in conjunction with the CallWeb API. The code for the CallWeb API is not publicly available. Please reach out to the project team for access. However, the project will still build and run without the CallWeb API.

Install EF Core dependencies

dotnet tool install dotnet-ef --version 6.0.0 dotnet add package Microsoft.EntityFrameworkCore --version 3.1.4 dotnet add package Microsoft.EntityFrameworkCore.Design --version 3.1.4

Config + secret settings

The application uses two appsettings.json files, one in the /config directory and one in /secret. This mirrors how the application gets deployed to OpenShift. /config/appsettings.json contains non-sensitive configuration for the application, while /secret/appsettings.json contains configuration that should not readily visible.

See also the comments in Program.cs about how the files get resolved when the application is deployed to OpenShift.

To get set up:

  1. Copy the contents of /config/appsettings.config-template.json into a new file, /config/appsettings.json, and update the values as appropriate.

  2. Do the same with /secret/appsettings.secret-template.json, copying it into /secret/appsettings.json.

  3. We also need to set up the frontend environment. In the /ClientApp directory, copy env.example into .env, and update the values as appropriate.

Run migrations

  1. From the root project directory, run dotnet ef database update. This will run the migrations and set up your development database. ENSURE THAT dotnet add package Microsoft.EntityFrameworkCore --version 3.1.4 dotnet add package Microsoft.EntityFrameworkCore.design --version 3.1.4

    Note that the database will be seeded automatically when the application is started.

Start the API

  1. Open the root code directory in Visual Studio Code. You may be prompted to add required assets and/or resolve dependencies; do so.
  2. While in Visual Studio Code, press CTRL + F5 to launch the API.
  3. Test that the API is running correctly by checking the HealthStatus. If the project is running at the default location and port: curl http://localhost:5050/api/HealthStatus/Status.

Install frontend dependencies

  1. From the /ClientApp directory run yarn install.

Start the frontend

  1. Still in the /ClientApp directory, run yarn start to launch the front-end. You should see the application open in a new browser.

Quick database reset (dev ONLY)

This command will quickly drop the database, delete migrations, create an initial migration, and update the database.

dotnet ef database drop --force;rm -rf Migrations/*.cs;dotnet ef migrations add InitialCreate;dotnet ef database update

newjobsurveyadmin's People

Contributors

bdolor avatar danebenal avatar hangler avatar joshrint avatar karmour avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

hangler

newjobsurveyadmin's Issues

Add project lifecycle badge

No Project Lifecycle Badge found in your readme!

Hello! I scanned your readme and could not find a project lifecycle badge. A project lifecycle badge will provide contributors to your project as well as other stakeholders (platform services, executive) insight into the lifecycle of your repository.

What is a Project Lifecycle Badge?

It is a simple image that neatly describes your project's stage in its lifecycle. More information can be found in the project lifecycle badges documentation.

What do I need to do?

I suggest you make a PR into your README.md and add a project lifecycle badge near the top where it is easy for your users to pick it up :). Once it is merged feel free to close this issue. I will not open up a new one :)

Support for date adjustment on admin interface

An administrator should be able to adjust the following parameters:

  • Data pull date
  • Number of days from Data pull date to Invite
  • Number of days from Invite to Reminder 1
  • Number of days from Reminder 1 to Reminder 2
  • Number of days from Reminder 2 to Closed

Also preview the dates in the interface.

Update API code

The API code needs to be updated to take into account the distinct features of NJSA vs. ESA.

Pull LDAP info in addition to CHIPS info and save both

We want to store the CHIPS first name, last name, and email. But we also want to pull updated info for these values from LDAP, if possible, and store those values in the FirstName, LastName, and GovernmentEmail columns. We also would like to show those columns on the frontend.

Do not populate `AEMAIL_INV_DATE`

This should be populated by CallWeb itself. It is currently holding the hire effective date. Amelia will provide a column which can hold the hire effective date instead.

Fix CORS problems for Safari/Firefox

Chrome seems not to have a problem with the current CORS configuration, but Safari and Firefox do. This is almost certainly related to the origin setting.

OpenShift network accesses

We need to be able to access a number of resources from OpenShift:

  • Either BI Centre or the BC Stats machine in order to pull in the incoming data
  • LDAP server to load user email addresses
  • CallWeb API / MySQL servers

As OpenShift is outside the VPN we need to investigate feasibility.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.