├── .gitignore ├── .vs ├── ProjectSettings.json ├── TrackForce │ └── v15 │ │ └── .suo ├── VSWorkspaceState.json └── slnx.sqlite ├── NGTrackForce ├── .editorconfig ├── .gitignore ├── .vs │ ├── NGTrackForce │ │ └── v15 │ │ │ └── .suo │ ├── ProjectSettings.json │ ├── VSWorkspaceState.json │ ├── config │ │ └── applicationhost.config │ └── slnx.sqlite ├── README.md ├── angular.json ├── chrome-test-report.html ├── db.json ├── e2e │ ├── BasePage.ts │ ├── app │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ ├── associate-list │ │ ├── associate-list-client.js │ │ ├── associate-list-curriculum.js │ │ ├── associate-list-ordering.js │ │ ├── associate-list-pagenation.js │ │ ├── associate-list-search.js │ │ ├── associate-list-status.js │ │ └── associate-list.js │ ├── batch-list │ │ ├── batch-list.e2e-spec.ts │ │ ├── batch-list.js │ │ └── batch-list.po.ts │ ├── client-list │ │ ├── client-list-spec.ts │ │ └── client-list.po.ts │ ├── configuration │ │ └── test-config.ts │ ├── create-user │ │ ├── create-user.e2e-spec.ts │ │ └── create-user.po.ts │ ├── login │ │ ├── login.e2e-spec.ts │ │ └── login.po.ts │ ├── navbar │ │ ├── navbar.e2e-spec.ts │ │ └── navbar.po.ts │ ├── predictions │ │ ├── predictions.e2e-spec.ts │ │ └── predictions.po.ts │ ├── register-associate │ │ ├── register-associate.e2e-spec.ts │ │ └── register-associate.po.ts │ ├── test-associate │ │ └── homepage-spec.js │ ├── testing.properties │ └── tsconfig.e2e.json ├── json-server │ ├── db.json │ ├── server.js │ └── token.js ├── karma.conf.js ├── package.json ├── protractor.conf.js ├── src │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── components │ │ │ ├── associate-list-page │ │ │ │ ├── associate-list-page-routing.module.ts │ │ │ │ ├── associate-list-page.component.css │ │ │ │ ├── associate-list-page.component.html │ │ │ │ ├── associate-list-page.component.spec.ts │ │ │ │ ├── associate-list-page.component.ts │ │ │ │ ├── associate-list-page.module.ts │ │ │ │ └── update-dialog-component.html │ │ │ ├── associate-view │ │ │ │ ├── associate-view-routing.module.ts │ │ │ │ ├── associate-view.component.css │ │ │ │ ├── associate-view.component.html │ │ │ │ ├── associate-view.component.spec.ts │ │ │ │ ├── associate-view.component.ts │ │ │ │ └── associate-view.module.ts │ │ │ ├── batch-details │ │ │ │ ├── batch-details-routing.module.ts │ │ │ │ ├── batch-details.component.css │ │ │ │ ├── batch-details.component.html │ │ │ │ ├── batch-details.component.spec.ts │ │ │ │ ├── batch-details.component.ts │ │ │ │ └── batch-details.module.ts │ │ │ ├── batch-list │ │ │ │ ├── batch-list-routing.module.ts │ │ │ │ ├── batch-list.component.css │ │ │ │ ├── batch-list.component.html │ │ │ │ ├── batch-list.component.spec.ts │ │ │ │ ├── batch-list.component.ts │ │ │ │ └── batch-list.module.ts │ │ │ ├── client-list │ │ │ │ ├── client-list-routing.module.ts │ │ │ │ ├── client-list.component.css │ │ │ │ ├── client-list.component.html │ │ │ │ ├── client-list.component.spec.ts │ │ │ │ ├── client-list.component.ts │ │ │ │ └── client-list.module.ts │ │ │ ├── client-mapped │ │ │ │ ├── client-mapped-routing.module.ts │ │ │ │ ├── client-mapped.component.css │ │ │ │ ├── client-mapped.component.html │ │ │ │ ├── client-mapped.component.spec.ts │ │ │ │ ├── client-mapped.component.ts │ │ │ │ └── client-mapped.module.ts │ │ │ ├── create-user │ │ │ │ ├── create-user-routing.module.ts │ │ │ │ ├── create-user.component.css │ │ │ │ ├── create-user.component.html │ │ │ │ ├── create-user.component.spec.ts │ │ │ │ ├── create-user.component.ts │ │ │ │ ├── create-user.enum.ts │ │ │ │ └── create-user.module.ts │ │ │ ├── datetimepicker │ │ │ │ ├── datetimepicker.component.css │ │ │ │ ├── datetimepicker.component.html │ │ │ │ ├── datetimepicker.component.spec.ts │ │ │ │ ├── datetimepicker.component.ts │ │ │ │ ├── datetimepicker.module.ts │ │ │ │ └── datetimepickerrouting.module.ts │ │ │ ├── deployed │ │ │ │ ├── deployed-routing.module.ts │ │ │ │ ├── deployed.component.css │ │ │ │ ├── deployed.component.html │ │ │ │ ├── deployed.component.spec.ts │ │ │ │ ├── deployed.component.ts │ │ │ │ └── deployed.module.ts │ │ │ ├── footer │ │ │ │ ├── footer.component.css │ │ │ │ ├── footer.component.html │ │ │ │ ├── footer.component.spec.ts │ │ │ │ └── footer.component.ts │ │ │ ├── form-component │ │ │ │ ├── form.component.css │ │ │ │ ├── form.component.html │ │ │ │ ├── form.component.spec.ts │ │ │ │ ├── form.component.ts │ │ │ │ ├── form.enum.ts │ │ │ │ ├── newform-routing.module.ts │ │ │ │ └── newform.module.ts │ │ │ ├── home │ │ │ │ ├── home-routing.module.ts │ │ │ │ ├── home.component.css │ │ │ │ ├── home.component.html │ │ │ │ ├── home.component.spec.ts │ │ │ │ ├── home.component.ts │ │ │ │ └── home.module.ts │ │ │ ├── interview-details │ │ │ │ ├── interview-details-routing.module.ts │ │ │ │ ├── interview-details.component.css │ │ │ │ ├── interview-details.component.html │ │ │ │ ├── interview-details.component.spec.ts │ │ │ │ ├── interview-details.component.ts │ │ │ │ ├── interview-details.enum.ts │ │ │ │ └── interview-details.module.ts │ │ │ ├── interviews-view │ │ │ │ ├── interviews-view-routing.module.ts │ │ │ │ ├── interviews-view.component.css │ │ │ │ ├── interviews-view.component.html │ │ │ │ ├── interviews-view.component.spec.ts │ │ │ │ ├── interviews-view.component.ts │ │ │ │ └── interviews-view.module.ts │ │ │ ├── invalid-session │ │ │ │ ├── invalid-session.component.css │ │ │ │ ├── invalid-session.component.html │ │ │ │ ├── invalid-session.component.spec.ts │ │ │ │ └── invalid-session.component.ts │ │ │ ├── login │ │ │ │ ├── login.component.css │ │ │ │ ├── login.component.html │ │ │ │ ├── login.component.spec.ts │ │ │ │ └── login.component.ts │ │ │ ├── myinterview-view │ │ │ │ ├── myinterview-view-routing.module.ts │ │ │ │ ├── myinterview-view.component.css │ │ │ │ ├── myinterview-view.component.html │ │ │ │ ├── myinterview-view.component.spec.ts │ │ │ │ ├── myinterview-view.component.ts │ │ │ │ └── myinterview-view.module.ts │ │ │ ├── navbar │ │ │ │ ├── navbar.component.css │ │ │ │ ├── navbar.component.html │ │ │ │ ├── navbar.component.spec.ts │ │ │ │ └── navbar.component.ts │ │ │ ├── not-found │ │ │ │ ├── not-found.component.css │ │ │ │ ├── not-found.component.html │ │ │ │ ├── not-found.component.spec.ts │ │ │ │ └── not-found.component.ts │ │ │ ├── passwordupdate │ │ │ │ ├── passwordupdate-routing.module.ts │ │ │ │ ├── passwordupdate.component.css │ │ │ │ ├── passwordupdate.component.html │ │ │ │ ├── passwordupdate.component.spec.ts │ │ │ │ ├── passwordupdate.component.ts │ │ │ │ └── passwordupdate.module.ts │ │ │ ├── predictions │ │ │ │ ├── predictions-routing.module.ts │ │ │ │ ├── predictions.component.css │ │ │ │ ├── predictions.component.html │ │ │ │ ├── predictions.component.spec.ts │ │ │ │ ├── predictions.component.ts │ │ │ │ └── predictions.module.ts │ │ │ ├── skillset │ │ │ │ ├── skillset-routing.module.ts │ │ │ │ ├── skillset.component.css │ │ │ │ ├── skillset.component.html │ │ │ │ ├── skillset.component.spec.ts │ │ │ │ ├── skillset.component.ts │ │ │ │ └── skillset.module.ts │ │ │ ├── trainer-view │ │ │ │ ├── trainer-view-routing.module.ts │ │ │ │ ├── trainer-view.component.css │ │ │ │ ├── trainer-view.component.html │ │ │ │ ├── trainer-view.component.spec.ts │ │ │ │ ├── trainer-view.component.ts │ │ │ │ └── trainer-view.module.ts │ │ │ ├── undeployed │ │ │ │ ├── undeployed-routing.module.ts │ │ │ │ ├── undeployed.component.css │ │ │ │ ├── undeployed.component.html │ │ │ │ ├── undeployed.component.spec.ts │ │ │ │ ├── undeployed.component.ts │ │ │ │ └── undeployed.module.ts │ │ │ └── usernameupdate │ │ │ │ ├── usernameupdate-routing.module.ts │ │ │ │ ├── usernameupdate.component.css │ │ │ │ ├── usernameupdate.component.html │ │ │ │ ├── usernameupdate.component.spec.ts │ │ │ │ ├── usernameupdate.component.ts │ │ │ │ └── usernameupdate.module.ts │ │ ├── constants │ │ │ ├── local-storage.ts │ │ │ ├── role.constants.ts │ │ │ ├── selected-status.constants.ts │ │ │ └── theme.constants.ts │ │ ├── decorators │ │ │ └── auto-unsubscribe.decorator.ts │ │ ├── directives │ │ │ └── highlight-interview.directive.ts │ │ ├── guards │ │ │ └── auth.guard.ts │ │ ├── interceptors │ │ │ ├── invalidSessionReroute.interceptor.ts │ │ │ └── jwt.interceptor.ts │ │ ├── material.module.ts │ │ ├── models │ │ │ ├── associate.model.ts │ │ │ ├── batch-location.model.ts │ │ │ ├── batch.model.ts │ │ │ ├── chart-scale.model.ts │ │ │ ├── client.model.ts │ │ │ ├── curriculum.model.ts │ │ │ ├── end-client.model.ts │ │ │ ├── graph-counts.ts │ │ │ ├── interview-type.ts │ │ │ ├── interview.model.ts │ │ │ ├── marketing-status.model.ts │ │ │ ├── ng2-charts-options.model.ts │ │ │ ├── placement.model.ts │ │ │ ├── role.model.ts │ │ │ ├── status-info.model.ts │ │ │ ├── trainer.model.ts │ │ │ ├── user.model.ts │ │ │ └── userAndCreatorRoleContainer.mode.ts │ │ ├── pipes │ │ │ ├── associate-search-by-client-pipe │ │ │ │ ├── client-pipe.module.ts │ │ │ │ └── client-pipe.pipe.ts │ │ │ ├── associate-search-by-status-pipe │ │ │ │ ├── status-pipe.module.ts │ │ │ │ └── status-pipe.pipe.ts │ │ │ ├── associate-search-by-text-filter │ │ │ │ ├── associate-search-by-text-filter.pipes.ts │ │ │ │ └── text-filter.module.ts │ │ │ └── search-filter │ │ │ │ ├── search-filter.module.ts │ │ │ │ ├── search-filter.pipe.spec.ts │ │ │ │ └── search-filter.pipe.ts │ │ ├── routing │ │ │ └── app-routing.module.ts │ │ ├── services │ │ │ ├── associate-service │ │ │ │ ├── associate.service.spec.ts │ │ │ │ └── associate.service.ts │ │ │ ├── authentication-service │ │ │ │ └── authentication.service.ts │ │ │ ├── batch-service │ │ │ │ ├── batch.service.spec.ts │ │ │ │ └── batch.service.ts │ │ │ ├── client-service │ │ │ │ ├── client.service.spec.ts │ │ │ │ └── client.service.ts │ │ │ ├── curriculum-service │ │ │ │ ├── curriculum-service.spec.ts │ │ │ │ └── curriculum.service.ts │ │ │ ├── datasync-service │ │ │ │ ├── data-sync.service.spec.ts │ │ │ │ └── data-sync.service.ts │ │ │ ├── date-service │ │ │ │ ├── date.service.spec.ts │ │ │ │ └── date.service.ts │ │ │ ├── interview-service │ │ │ │ ├── interview.service.spec.ts │ │ │ │ └── interview.service.ts │ │ │ ├── navbar-service │ │ │ │ ├── navbar.service.spec.ts │ │ │ │ └── navbar.service.ts │ │ │ ├── request-service │ │ │ │ ├── request.service.spec.ts │ │ │ │ └── request.service.ts │ │ │ ├── trainer-service │ │ │ │ └── trainer.service.ts │ │ │ └── user-service │ │ │ │ └── user.service.ts │ │ └── testing-helpers │ │ │ ├── router-stubs.ts │ │ │ └── test-mock-services.ts │ ├── assets │ │ ├── .gitkeep │ │ ├── 23.jpg │ │ ├── favicon │ │ │ ├── android-icon-144x144.png │ │ │ ├── android-icon-192x192.png │ │ │ ├── android-icon-36x36.png │ │ │ ├── android-icon-48x48.png │ │ │ ├── android-icon-72x72.png │ │ │ ├── android-icon-96x96.png │ │ │ ├── apple-icon-114x114.png │ │ │ ├── apple-icon-120x120.png │ │ │ ├── apple-icon-144x144.png │ │ │ ├── apple-icon-152x152.png │ │ │ ├── apple-icon-180x180.png │ │ │ ├── apple-icon-57x57.png │ │ │ ├── apple-icon-60x60.png │ │ │ ├── apple-icon-72x72.png │ │ │ ├── apple-icon-76x76.png │ │ │ ├── apple-icon-precomposed.png │ │ │ ├── apple-icon.png │ │ │ ├── browserconfig.xml │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon-96x96.png │ │ │ ├── favicon.ico │ │ │ ├── manifest.json │ │ │ ├── ms-icon-144x144.png │ │ │ ├── ms-icon-150x150.png │ │ │ ├── ms-icon-310x310.png │ │ │ └── ms-icon-70x70.png │ │ ├── load_circle.gif │ │ ├── loading.gif │ │ ├── logo.png │ │ └── rev-footer.png │ ├── environments │ │ ├── environment.jenkins.ts │ │ ├── environment.local.ts │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── test.ts │ ├── theme.scss │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── typings.d.ts ├── testresults │ └── xmloutput.xml ├── topsecretdocs.txt ├── tsconfig.json └── tslint.json ├── Production1804.txt ├── README.md ├── TrackForce ├── .gitignore ├── drivers │ ├── chromedriver.exe │ └── geckodriver.exe ├── nb-configuration.xml ├── pom.xml └── src │ ├── main │ ├── java │ │ ├── META-INF │ │ │ └── persistence.xml │ │ └── com │ │ │ └── revature │ │ │ ├── application │ │ │ └── GenerateData.java │ │ │ ├── criteria │ │ │ └── GraphedCriteriaResult.java │ │ │ ├── dao │ │ │ ├── AssociateDao.java │ │ │ ├── BatchDao.java │ │ │ ├── ClientDao.java │ │ │ ├── CurriculumDao.java │ │ │ ├── InterviewDao.java │ │ │ ├── MarketingStatusDao.java │ │ │ ├── TrainerDao.java │ │ │ └── UserDao.java │ │ │ ├── daoimpl │ │ │ ├── AssociateDaoImpl.java │ │ │ ├── BatchDaoImpl.java │ │ │ ├── ClientDaoImpl.java │ │ │ ├── CurriculumDaoImpl.java │ │ │ ├── InterviewDaoImpl.java │ │ │ ├── MarketingStatusDaoImpl.java │ │ │ ├── TrainerDaoImpl.java │ │ │ └── UserDaoImpl.java │ │ │ ├── entity │ │ │ ├── TfAssociate.java │ │ │ ├── TfBatch.java │ │ │ ├── TfBatchLocation.java │ │ │ ├── TfClient.java │ │ │ ├── TfCurriculum.java │ │ │ ├── TfEndClient.java │ │ │ ├── TfInterview.java │ │ │ ├── TfInterviewType.java │ │ │ ├── TfMarketingStatus.java │ │ │ ├── TfPasswordResetContainer.java │ │ │ ├── TfPlacement.java │ │ │ ├── TfRole.java │ │ │ ├── TfTrainer.java │ │ │ ├── TfUser.java │ │ │ └── TfUserAndCreatorRoleContainer.java │ │ │ ├── resources │ │ │ ├── AssociateResource.java │ │ │ ├── BatchResource.java │ │ │ ├── ClientResource.java │ │ │ ├── CurriculumResource.java │ │ │ ├── InitResource.java │ │ │ ├── InterviewResource.java │ │ │ ├── TrainerResource.java │ │ │ └── UserResource.java │ │ │ ├── services │ │ │ ├── AssociateService.java │ │ │ ├── BatchService.java │ │ │ ├── ClientService.java │ │ │ ├── CurriculumService.java │ │ │ ├── InterviewService.java │ │ │ ├── JWTService.java │ │ │ ├── MarketingStatusService.java │ │ │ ├── TrainerService.java │ │ │ └── UserService.java │ │ │ └── utils │ │ │ ├── ContextListener.java │ │ │ ├── DailyDatabaseSync.java │ │ │ ├── Dev3ApiUtil.java │ │ │ ├── EnvManager.java │ │ │ ├── HibernateUtil.java │ │ │ ├── ListOp.java │ │ │ ├── LogUtil.java │ │ │ ├── PasswordStorage.java │ │ │ ├── ResourceHelper.java │ │ │ ├── SchedulePendingUserCleanup.java │ │ │ ├── Sessional.java │ │ │ ├── ThreadUtil.java │ │ │ ├── ThrownInHibernate.java │ │ │ └── UserAuthentication.java │ ├── resources │ │ ├── R_reInitDB.sql │ │ ├── chromeDriveer4Mac │ │ │ └── chromedriver │ │ ├── chromedriver │ │ ├── chromedriver.exe │ │ ├── ehcache.xml │ │ ├── geckodriver.exe │ │ ├── hibernate.cfg.xml │ │ ├── hibernate.properties │ │ └── log4j.properties │ └── webapp │ │ ├── .yo-rc.json │ │ └── WEB-INF │ │ └── web.xml │ └── test │ ├── java │ └── com │ │ └── revature │ │ └── test │ │ ├── TestNG │ │ ├── AdminTests.java │ │ ├── AssociateTests.java │ │ ├── ClassInstantiationTests.java │ │ └── GenerateDataTest.java │ │ ├── cuke │ │ ├── AssociateViewCukes.java │ │ ├── ConstantsCukeTestUtil.java │ │ ├── HomeTabCukes.java │ │ ├── LoginCuke.java │ │ └── RegisterUserCuke.java │ │ ├── dao │ │ ├── AssociateDAOTest.java │ │ ├── BatchDAOTest.java │ │ ├── ClientDAOTest.java │ │ ├── CurriculumDAOTest.java │ │ ├── InterviewDAOTest.java │ │ ├── MarketingStatusDAOTest.java │ │ ├── TrainerDAOTest.java │ │ └── UserDAOTest.java │ │ ├── orm │ │ ├── entity │ │ │ ├── TfAssociateTest.java │ │ │ ├── TfBatchLocationTest.java │ │ │ ├── TfBatchTest.java │ │ │ ├── TfClientTest.java │ │ │ ├── TfCurriculumTest.java │ │ │ ├── TfEndClientTest.java │ │ │ ├── TfInterviewTest.java │ │ │ ├── TfInterviewTypeTest.java │ │ │ ├── TfMarketingStatusTest.java │ │ │ ├── TfPlacementTest.java │ │ │ ├── TfRoleTest.java │ │ │ ├── TfTrainerTest.java │ │ │ ├── TfUserAndCreatorRolerContainerTest.java │ │ │ └── TfUserTest.java │ │ └── util │ │ │ ├── Dev3ApiUtilTest.java │ │ │ ├── HibernateUtilTest.java │ │ │ └── PasswordStorageTest.java │ │ ├── pom │ │ ├── AssociateDetails.java │ │ ├── AssociateHome.java │ │ ├── AssociateList.java │ │ ├── BatchDetails.java │ │ ├── BatchList.java │ │ ├── ClientList.java │ │ ├── CreateUser.java │ │ ├── Footer.java │ │ ├── Home.java │ │ ├── Login.java │ │ ├── MyInterviews.java │ │ ├── NavBar.java │ │ ├── PasswordUpdate.java │ │ ├── PredictionList.java │ │ ├── Salesforce.java │ │ ├── TrainerHome.java │ │ └── UsernameUpdate.java │ │ ├── resources │ │ ├── AssociateResourceTest.java │ │ ├── BatchResourceTest.java │ │ ├── ClientResourceTest.java │ │ ├── CurriculumResourceTest.java │ │ ├── InitResourceTest.java │ │ ├── InterviewResourceTest.java │ │ ├── TrainerResourceTest.java │ │ └── UserResourceTest.java │ │ ├── restAssured │ │ ├── AssociateRestTest.java │ │ ├── BatchRestTest.java │ │ ├── ClientRestTest.java │ │ ├── CurriculumRestTest.java │ │ ├── InterviewRestTest.java │ │ ├── TrainerRestTest.java │ │ └── UserRestTest.java │ │ ├── runner │ │ └── CucumberTestRunner.java │ │ ├── services │ │ ├── AssociateServicesTest.java │ │ ├── BatchServicesTest.java │ │ ├── ClientServicesTest.java │ │ ├── CurriculumServicesTest.java │ │ ├── InterviewServicesTest.java │ │ ├── JWTServicesTest.java │ │ ├── MarketingStatusServicesTest.java │ │ ├── TrainerServicesTest.java │ │ └── UserServicesTest.java │ │ └── utils │ │ ├── Log.java │ │ ├── LoginUtil.java │ │ ├── ResetDatabase.java │ │ ├── ServiceHooks.java │ │ ├── TestConfig.java │ │ ├── WaitToLoad.java │ │ └── WebDriverUtil.java │ └── resources │ ├── AdminFeatureFiles │ ├── AssociateView.feature │ ├── AssociateViewFirefox.feature │ ├── HomeTab.feature │ ├── HomeTabFirefox.feature │ ├── Login.feature │ ├── LoginFirefox.feature │ ├── Register.feature │ └── RegisterFirefox.feature │ ├── database_entries.properties │ ├── experimentalTests.properties │ ├── import.sql │ ├── testng.xml │ ├── tests.properties │ └── xpathBackup.properties ├── WebContent ├── META-INF │ └── MANIFEST.MF └── WEB-INF │ └── web.xml ├── db.json ├── images ├── AutoGenerating │ ├── AddConfigurationIcon.png │ ├── PerspectiveSymbol.png │ ├── Thumbs.db │ ├── codeGenerationMain5.png │ ├── editConfiguration2.png │ ├── editConfigurationClasspath3.png │ ├── installation1.png │ ├── runGeneration4.png │ └── runGenerationExporters6.png └── Database │ ├── AccessToken3.png │ ├── FinalERD.png │ ├── Thumbs.db │ ├── errorPage1.png │ ├── getRequest4.png │ ├── response5.png │ └── tokenAccess2.png ├── jenkins_testing.txt └── resources ├── 1901 Documentaton └── Pipeline Info.docx └── Extra Materials ├── OLD_SQL ├── DropOrder.sql ├── MadeUpData.sql ├── Procedures.sql ├── StaticSalesForceData.sql ├── TrackForceStructure.sql └── createTestUsers.sql ├── Trackforce_DB_full.sql └── Trackforce_DB_lite.sql /.vs/ProjectSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "CurrentProjectSetting": null 3 | } -------------------------------------------------------------------------------- /.vs/TrackForce/v15/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/.vs/TrackForce/v15/.suo -------------------------------------------------------------------------------- /.vs/VSWorkspaceState.json: -------------------------------------------------------------------------------- 1 | { 2 | "ExpandedNodes": [ 3 | "", 4 | "\\NGTrackForce" 5 | ], 6 | "SelectedNode": "\\Production1804.txt", 7 | "PreviewInSolutionExplorer": false 8 | } -------------------------------------------------------------------------------- /.vs/slnx.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/.vs/slnx.sqlite -------------------------------------------------------------------------------- /NGTrackForce/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /NGTrackForce/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | /node_modules 10 | /documentation 11 | 12 | **/package-lock.json 13 | 14 | # IDEs and editors 15 | *.iml 16 | /.idea/ 17 | .project 18 | .classpath 19 | .c9/ 20 | *.launch 21 | .settings/ 22 | *.sublime-workspace 23 | 24 | # IDE - VSCode 25 | .vscode/* 26 | !.vscode/settings.json 27 | !.vscode/tasks.json 28 | !.vscode/launch.json 29 | !.vscode/extensions.json 30 | 31 | # misc 32 | /.sass-cache 33 | /connect.lock 34 | /coverage 35 | /libpeerconnection.log 36 | npm-debug.log 37 | testem.log 38 | /typings 39 | 40 | # e2e 41 | /e2e/*.js 42 | /e2e/*.map 43 | 44 | # System Files 45 | .DS_Store 46 | Thumbs.db 47 | 48 | #testresults 49 | /testresults 50 | chrome-test-report.html -------------------------------------------------------------------------------- /NGTrackForce/.vs/NGTrackForce/v15/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/.vs/NGTrackForce/v15/.suo -------------------------------------------------------------------------------- /NGTrackForce/.vs/ProjectSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "CurrentProjectSetting": null 3 | } -------------------------------------------------------------------------------- /NGTrackForce/.vs/VSWorkspaceState.json: -------------------------------------------------------------------------------- 1 | { 2 | "ExpandedNodes": [ 3 | "" 4 | ], 5 | "SelectedNode": "\\src", 6 | "PreviewInSolutionExplorer": false 7 | } -------------------------------------------------------------------------------- /NGTrackForce/.vs/slnx.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/.vs/slnx.sqlite -------------------------------------------------------------------------------- /NGTrackForce/README.md: -------------------------------------------------------------------------------- 1 | # NGTrackForce 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.5.5. 4 | 5 | ## Development server 6 | 7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. 8 | 9 | ## Code scaffolding 10 | 11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. 12 | 13 | ## Build 14 | 15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. 16 | 17 | ## Running unit tests 18 | 19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 20 | 21 | ## Running end-to-end tests 22 | 23 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). 28 | -------------------------------------------------------------------------------- /NGTrackForce/db.json: -------------------------------------------------------------------------------- 1 | { 2 | "posts": [ 3 | { 4 | "id": 1, 5 | "title": "json-server", 6 | "author": "typicode" 7 | } 8 | ], 9 | "comments": [ 10 | { 11 | "id": 1, 12 | "body": "some comment", 13 | "postId": 1 14 | } 15 | ], 16 | "profile": { 17 | "name": "typicode" 18 | } 19 | } -------------------------------------------------------------------------------- /NGTrackForce/e2e/BasePage.ts: -------------------------------------------------------------------------------- 1 | import { browser, element, by, protractor, $$, $ } from 'protractor'; 2 | 3 | 4 | export enum IdentificationType { 5 | Xpath, 6 | ElementsByXpath, 7 | Css, 8 | Id, 9 | Js, 10 | Name, 11 | PartialLinkText, 12 | ClassName, 13 | Tag 14 | } 15 | 16 | 17 | export class BasePage { 18 | ElementLocator(obj) { 19 | switch (obj.type) { 20 | case IdentificationType[IdentificationType.Xpath]: 21 | return element(by.xpath(obj.value)); 22 | case IdentificationType[IdentificationType.ClassName]: 23 | return element(by.className(obj.value)); 24 | case IdentificationType[IdentificationType.Id]: 25 | return element(by.id(obj.value)); 26 | case IdentificationType[IdentificationType.Js]: 27 | return element(by.js(obj.value)); 28 | case IdentificationType[IdentificationType.Css]: 29 | return element(by.css(obj.value)); 30 | case IdentificationType[IdentificationType.Name]: 31 | return element(by.name(obj.value)); 32 | case IdentificationType[IdentificationType.Tag]: 33 | return element.all(by.tagName(obj.value)); 34 | case IdentificationType[IdentificationType.ElementsByXpath]: 35 | return element.all(by.xpath(obj.value)); 36 | default: 37 | break; 38 | } 39 | } 40 | 41 | } -------------------------------------------------------------------------------- /NGTrackForce/e2e/app/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | 3 | xdescribe('ngtrack-force App', () => { 4 | let page: AppPage; 5 | 6 | beforeEach(() => { 7 | page = new AppPage(); 8 | }); 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo(); 12 | expect(page.getParagraphText()).toEqual('Welcome to app!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /NGTrackForce/e2e/app/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /NGTrackForce/e2e/associate-list/associate-list-curriculum.js: -------------------------------------------------------------------------------- 1 | describe('Testing associate list by curriculum', function () { 2 | 3 | it('Should select Java option', function() { 4 | wd.findElement(by.xpath('//*[@id="curriculum"]/option[2]')).click(); 5 | 6 | }); 7 | 8 | it('Should select .Net option', function() { 9 | wd.findElement(by.xpath('//*[@id="curriculum"]/option[3]')).click(); 10 | 11 | }); 12 | 13 | it('Should select SEED option', function() { 14 | wd.findElement(by.xpath('//*[@id="curriculum"]/option[4]')).click(); 15 | 16 | }); 17 | 18 | it('Should select Salesfoce option', function() { 19 | wd.findElement(by.xpath('//*[@id="curriculum"]/option[5]')).click(); 20 | 21 | }); 22 | 23 | it('Should select JTA option', function() { 24 | wd.findElement(by.xpath('//*[@id="curriculum"]/option[6]')).click(); 25 | 26 | }); 27 | 28 | it('Should select None option', function() { 29 | wd.findElement(by.xpath('//*[@id="curriculum"]/option[7]')).click(); 30 | 31 | }); 32 | 33 | it('Should select DynamicCRM option', function() { 34 | wd.findElement(by.xpath('//*[@id="curriculum"]/option[8]')).click(); 35 | 36 | }); 37 | 38 | it('Should select PEGA option', function() { 39 | wd.findElement(by.xpath('//*[@id="curriculum"]/option[9]')).click(); 40 | 41 | }); 42 | 43 | it('Should select default option', function() { 44 | wd.findElement(by.xpath('//*[@id="curriculum"]/option[1]')).click(); 45 | 46 | }); 47 | 48 | }); -------------------------------------------------------------------------------- /NGTrackForce/e2e/associate-list/associate-list-ordering.js: -------------------------------------------------------------------------------- 1 | describe("Now ordering by ...", function() { 2 | it('should order by ID', function() { 3 | wd.findElement(by.xpath('//*[@id="info"]/table/thead/tr/th[2]')).click(); 4 | }); 5 | 6 | it('should order by first name', function() { 7 | wd.findElement(by.xpath('//*[@id="info"]/table/thead/tr/th[3]')).click(); 8 | }); 9 | it('should order by last name', function() { 10 | wd.findElement(by.xpath('//*[@id="info"]/table/thead/tr/th[4]')).click(); 11 | }); 12 | 13 | it('should order by Marketing status', function() { 14 | wd.findElement(by.xpath('//*[@id="info"]/table/thead/tr/th[5]')).click(); 15 | }); 16 | 17 | it('should order by Client name', function() { 18 | wd.findElement(by.xpath('//*[@id="info"]/table/thead/tr/th[6]')).click(); 19 | }); 20 | 21 | it('should order by Batch name', function() { 22 | wd.findElement(by.xpath('//*[@id="info"]/table/thead/tr/th[7]')).click(); 23 | }); 24 | }); -------------------------------------------------------------------------------- /NGTrackForce/e2e/associate-list/associate-list.js: -------------------------------------------------------------------------------- 1 | 2 | describe('Open the browser and get to the website', function() { 3 | // var PropertiesReader = require('properties-reader'); 4 | // var properties = PropertiesReader('../testing.properties'); 5 | wd = browser.driver; 6 | }); 7 | 8 | describe('Log into the website for associate list', function() { 9 | browser.manage().timeouts().implicitlyWait(50000); 10 | it('should be able to log in', function () { 11 | wd.findElement(by.id('username')).sendKeys('TestAdmin'); 12 | wd.findElement(by.id('password')).sendKeys('TestAdmin'); 13 | wd.findElement(by.xpath("//button[@type='submit']")).click(); 14 | expect(wd.getTitle()).toEqual('TrackForce'); 15 | }) 16 | }); 17 | 18 | 19 | describe('Go to associate list tab', function(){ 20 | it('Should be able to go to associate list tab.', function() { 21 | browser.manage().timeouts().implicitlyWait(5000); 22 | element(by.css('[routerlink="/associate-listing"]')).click(); 23 | }); 24 | 25 | it('We should be on the associate tab', function () { 26 | // rowCount = document.getElementsByTagName("tr").length; 27 | 28 | expect(wd.findElement(by.xpath('/html/body/app/app-associate-list/div/h3')).getText()).toEqual('Associates'); 29 | }); 30 | 31 | 32 | }); 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /NGTrackForce/e2e/batch-list/batch-list.js: -------------------------------------------------------------------------------- 1 | describe("Batch List Tab Protractor Test (Open site from cmd): " 2 | + "Go to site, login, click batch list tab", function() { 3 | it("Should go to login page", function() { 4 | wd = browser.driver; 5 | expect(wd.findElement(by.name('username')).getAttribute("value")).toEqual(""); 6 | }); 7 | }); 8 | 9 | describe("Batch List Tab Protractor Test (Login)", function() { 10 | it("Should login", function() { 11 | browser.manage().timeouts().implicitlyWait(50000); 12 | wd.findElement(by.id('username')).sendKeys('TestAdmin'); 13 | wd.findElement(by.id('password')).sendKeys('TestAdmin'); 14 | wd.findElement(by.xpath("//button[@type='submit']")).click(); 15 | 16 | 17 | expect(browser.driver.getTitle()).toEqual('TrackForce'); 18 | }); 19 | 20 | }); 21 | 22 | describe("Batch List Tab Protractor Test (Click Batch List Tab)", function() { 23 | it('Should be able to switch to Batch List Tab', function() { 24 | browser.driver.sleep(10000); 25 | element(by.cssSelector("[href='/batch-listing']")).click(); 26 | // If tab is clicked, find something to match 27 | 28 | }); 29 | 30 | it('should log out', () => { 31 | wd.findElement(by.css('[routerlink="/login"]')).click(); 32 | }); 33 | }); 34 | -------------------------------------------------------------------------------- /NGTrackForce/e2e/batch-list/batch-list.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class BatchList { 4 | getBatchListTable(){ 5 | return element(by.xpath('/html/body/app-component/div/app-batch-list/div/div/div[1]/table')); 6 | } 7 | getFirstCalander(){ 8 | return element(by.id('startDate')); 9 | } 10 | getSecondCalander(){ 11 | return element(by.id('endDate')); 12 | } 13 | getPieCart(){ 14 | return element(by.id('pie')); 15 | } 16 | getPieChartPlaceHolder(){ 17 | return element(by.xpath('/html/body/app-component/div/app-batch-list/div/div[2]/div[2]/h3[2]')); 18 | } 19 | getBatch(){ 20 | return element(by.xpath('/html/body/app-component/div/app-batch-list/div/div/div[1]/table/tbody/tr[1]/td[1]/a')); 21 | } 22 | getCurrentUrl(){ 23 | return browser.getCurrentUrl(); 24 | } 25 | getBatchCart(){ 26 | return element(by.id('bar')); 27 | } 28 | getBatchTable(){ 29 | return element(by.xpath('/html/body/app-component/div/app-batch-details/div/div/div[2]/table')) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /NGTrackForce/e2e/configuration/test-config.ts: -------------------------------------------------------------------------------- 1 | import { ngEnvironment } from '../../src/environments/environment'; 2 | export class TestConfig{ 3 | private baseURL: string; 4 | 5 | /** 6 | * Stores the base URL used by Jasmine for testing 7 | * Switch this depending with you are working in a localhost 8 | * environment or on the pipeline 9 | * you may or may not need a #/ appended 10 | */ 11 | constructor() { 12 | this.baseURL = ngEnvironment.url +'#/'; 13 | //this.baseURL = ngEnvironment.url; 14 | //this.baseURL = 'http://ec2-34-227-178-103.compute-1.amazonaws.com:8090/NGTrackForce/'; 15 | } 16 | 17 | /** 18 | * Returns the base URL used by Jasmine for testing 19 | */ 20 | getBaseURL(){ 21 | return this.baseURL; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /NGTrackForce/e2e/login/login.po.ts: -------------------------------------------------------------------------------- 1 | import { protractor, browser, by, element } from 'protractor'; 2 | import { environment, ngEnvironment } from '../../src/environments/environment'; 3 | 4 | export class LoginPage { 5 | navigateTo(){ 6 | return browser.get(ngEnvironment.url + 'login'); 7 | } 8 | //id is username name is Username 9 | getUsernameInput(){ 10 | return element(by.id('username')); 11 | } 12 | 13 | getUsernamePlaceholder(){ 14 | return element(by.name('username')).getAttribute('placeholder'); 15 | } 16 | 17 | getPasswordInput(){ 18 | return element(by.name('password')); 19 | } 20 | 21 | getPasswordPlaceholder(){ 22 | return element(by.name('password')).getAttribute('placeholder'); 23 | } 24 | 25 | getLoginButton(){ 26 | return element(by.buttonText('SIGN IN')); 27 | } 28 | 29 | getLoginButtonText(){ 30 | return element(by.xpath('//button')).getText(); 31 | } 32 | 33 | getTitle(){ 34 | return element(by.xpath('//title')).getText(); 35 | } 36 | 37 | getFailedLoginResponse() { 38 | return element(by.xpath('//*[@id="pwd-container"]/div/section/form/div/div[1]/span')).getText(); 39 | // 40 | } 41 | 42 | getlogoutButton() { 43 | element(by.xpath('//*[@id="navbarDropdown"]')).click(); 44 | return element(by.xpath('//*[@id="logout"]')); 45 | } 46 | 47 | getCurrentUrl(){ 48 | let ec = protractor.ExpectedConditions; 49 | browser.wait(ec.visibilityOf(element(by.id('logo'))), 5000); //waits until the logo element is loaded to check url -CR 50 | return browser.getCurrentUrl(); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /NGTrackForce/e2e/test-associate/homepage-spec.js: -------------------------------------------------------------------------------- 1 | describe('Open the browser and get to the website', function() { 2 | wd = browser.driver; 3 | // wd.get('http://34.227.178.103:8090/NGTrackForce'); 4 | wd.get('http://localhost:4200/login'); 5 | 6 | }); 7 | 8 | describe('Log into the website for associate list', function() { 9 | browser.manage().timeouts().implicitlyWait(50000); 10 | it('should be able to log in', function () { 11 | wd.findElement(By.id('username')).sendKeys('TestAssociate'); 12 | wd.findElement(By.id('password')).sendKeys('TestAssociate'); 13 | wd.findElement(By.xpath("//button[@type='submit']")).click(); 14 | expect(wd.getTitle()).toEqual('TrackForce'); 15 | }); 16 | 17 | }); 18 | 19 | describe('Should test out the navbar', function() { 20 | it('Should go to client tab', function() { 21 | wd.findElement(by.css('[routerlink="/client-listing"]')).click(); 22 | }); 23 | 24 | it('Should go to batch tab', function() { 25 | wd.findElement(by.css('[routerlink="/batch-listing"]')).click(); 26 | }); 27 | 28 | it('Should go to associates tab', function() { 29 | wd.findElement(by.css('[routerlink="/associate-listing"]')).click(); 30 | }); 31 | 32 | it('Should go to predictions tab', function() { 33 | wd.findElement(by.css('[routerlink="/predictions"]')).click(); 34 | }); 35 | 36 | it('should go to interviews tab', function(){ 37 | wd.findElement(by.css('[routerlink="/interviews"]')).click(); 38 | }); 39 | }); 40 | 41 | it('should log out' ,function() { 42 | wd.findElement(by.css('[routerlink="/login"]')).click(); 43 | }); 44 | 45 | -------------------------------------------------------------------------------- /NGTrackForce/e2e/testing.properties: -------------------------------------------------------------------------------- 1 | url="http://localhost:4200/login" 2 | -------------------------------------------------------------------------------- /NGTrackForce/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "baseUrl": "./", 6 | "module": "commonjs", 7 | "target": "es5", 8 | "types": [ 9 | "jasmine", 10 | "jasminewd2", 11 | "node" 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /NGTrackForce/json-server/db.json: -------------------------------------------------------------------------------- 1 | { 2 | "posts": [ 3 | { 4 | "id": 1, 5 | "title": "json-server", 6 | "author": "typicode" 7 | }, 8 | { 9 | "id": 2, 10 | "title": "json-server", 11 | "author": "typicode" 12 | }, 13 | { 14 | "id": 3, 15 | "title": "json-server", 16 | "author": "typicode" 17 | }, 18 | { 19 | "id": 22, 20 | "title": "json-server", 21 | "author": "typicode" 22 | }, 23 | { 24 | "id": 23, 25 | "title": "json-server", 26 | "author": "typicode" 27 | } 28 | ], 29 | "comments": [ 30 | { 31 | "id": 1, 32 | "body": "some comment", 33 | "postId": 1 34 | } 35 | ], 36 | "profile": { 37 | "name": "typicode" 38 | }, 39 | "users": [ 40 | { 41 | "username": "timmay", 42 | "password": "testpass" 43 | }, 44 | { 45 | "username": "job", 46 | "password": "testpass" 47 | }, 48 | { 49 | "username": "8888upo", 50 | "password": "testpass" 51 | }, 52 | { 53 | "username": "jerry", 54 | "password": "gergich!" 55 | } 56 | ] 57 | } -------------------------------------------------------------------------------- /NGTrackForce/json-server/server.js: -------------------------------------------------------------------------------- 1 | const jsonServer = require('json-server') 2 | const server = jsonServer.create() 3 | const router = jsonServer.router('db.json') 4 | const middlewares = jsonServer.defaults() 5 | 6 | server.use(middlewares) 7 | server.use(router) 8 | server.listen(3000, () => { 9 | console.log('JSON Server is running') 10 | }) -------------------------------------------------------------------------------- /NGTrackForce/json-server/token.js: -------------------------------------------------------------------------------- 1 | const jsonServer = require('json-server') 2 | const server = jsonServer.create() 3 | const router = jsonServer.router('db.json') 4 | const middlewares = jsonServer.defaults() 5 | 6 | server.use(middlewares); 7 | 8 | // To handle POST, PUT and PATCH you need to use a body-parser 9 | // You can use the one used by JSON Server 10 | server.use(jsonServer.bodyParser) 11 | // server.use((req, res, next) => { 12 | // console.log(router.db.__wrapped__); 13 | // // if (req.method === 'POST' && req.path === '/caliber/authentication/login') { 14 | 15 | // // } 16 | // // Continue to JSON Server router 17 | // next() 18 | // }) 19 | 20 | server.post('/caliber/authentication/login', function (req, res) { 21 | let users = router.db.__wrapped__.users; 22 | let username = req.body.userName; 23 | let password = req.body.password; 24 | res.setHeader("Content-Type","application/json"); 25 | for (let i = 0; i < users.length; i++) { 26 | if (users[i].username === username && users[i].password === password) { 27 | res.send(JSON.stringify( 28 | { 29 | statusCode: 200, 30 | description: "You have been authenticated successfully.", 31 | data: "ENCRYPTED_TOKEN" 32 | } 33 | )); 34 | return; 35 | } 36 | } 37 | res.send(JSON.stringify( 38 | { 39 | statusCode: 401, 40 | description: "Incorrect username or password.", 41 | data: null 42 | } 43 | )); 44 | }); 45 | 46 | server.use(router); 47 | server.listen(3000, () => { 48 | console.log('JSON Server is running') 49 | }) 50 | -------------------------------------------------------------------------------- /NGTrackForce/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-phantomjs-launcher'), 12 | require('karma-jasmine-html-reporter'), 13 | require('karma-coverage-istanbul-reporter'), 14 | require('@angular-devkit/build-angular/plugins/karma') 15 | ], 16 | client:{ 17 | captureConsole: true, 18 | clearContext: false // leave Jasmine Spec Runner output visible in browser 19 | }, 20 | coverageIstanbulReporter: { 21 | dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ], 22 | fixWebpackSourcePaths: true 23 | }, 24 | 25 | reporters: ['progress', 'kjhtml'], 26 | port: 9876, 27 | colors: true, 28 | logLevel: config.LOG_INFO, 29 | browserNoActivityTimeout: 60000, 30 | autoWatch: true, 31 | customLauncher: { 32 | ChromeHeadless: { 33 | base: 'Chrome', 34 | flags: [ 35 | '--disable-gpu', 36 | '--no-sandbox', 37 | '--remote-debugging-port-9222' 38 | ] 39 | } 40 | }, 41 | browsers: ['ChromeHeadless'], 42 | // browsers: ['Chrome'], 43 | // singleRun is true so it'll work on the pipeline, please don't change it <3 44 | singleRun: true //TODO: change this back to true before deploying. 45 | }); 46 | }; 47 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | /** 2 | * NOTES ABOUT THIS CSS FILE IN FOOTER.COMPONENT.TS 3 | */ 4 | div { 5 | min-height: calc(100vh - 90px - 82px); 6 | margin: 10px; 7 | } 8 | 9 | app-footer { 10 | bottom: 0; 11 | width: 100%; 12 | height: 90px; 13 | } 14 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } from '@angular/core/testing'; 2 | import { AppComponent } from './app.component'; 3 | import { RouterTestingModule } from '@angular/router/testing'; 4 | // added imports; DK 5 | import { NavbarComponent } from './components/navbar/navbar.component'; 6 | import { FooterComponent } from './components/footer/footer.component'; 7 | import { AuthenticationService } from './services/authentication-service/authentication.service'; 8 | import { MockAuthenticationService } from './testing-helpers/test-mock-services' 9 | import { RequestService } from './services/request-service/request.service'; 10 | import { HttpClientTestingModule } from '@angular/common/http/testing/'; 11 | 12 | describe('AppComponent', () => { 13 | beforeEach(async(() => { 14 | TestBed.configureTestingModule({ 15 | declarations: [ 16 | AppComponent, 17 | NavbarComponent, 18 | FooterComponent 19 | ], 20 | imports: [ 21 | RouterTestingModule, HttpClientTestingModule 22 | ], 23 | providers: [ 24 | {provide: AuthenticationService, useClass: MockAuthenticationService}, 25 | RequestService 26 | ] 27 | }).compileComponents(); 28 | })); 29 | it('should create the app', async(() => { 30 | const fixture = TestBed.createComponent(AppComponent); 31 | const app = fixture.debugElement.componentInstance; 32 | expect(app).toBeTruthy(); 33 | })); 34 | }); 35 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'app-component', 6 | templateUrl: './app.component.html', 7 | styleUrls: ['./app.component.css'] 8 | }) 9 | export class AppComponent { 10 | title = 'app'; 11 | } 12 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/associate-list-page/associate-list-page-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { AssociateListPageComponent } from './associate-list-page.component'; 4 | 5 | 6 | const routes: Routes = [ 7 | { 8 | path: '', 9 | component: AssociateListPageComponent 10 | } 11 | ]; 12 | 13 | @NgModule({ 14 | imports: [RouterModule.forChild(routes)], 15 | exports: [RouterModule] 16 | }) 17 | export class AssociateListRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/associate-list-page/associate-list-page.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from "@angular/core"; 2 | import { AssociateListPageComponent } from './associate-list-page.component'; 3 | import { AssociateService } from '../../services/associate-service/associate.service'; 4 | import { ClientService } from '../../services/client-service/client.service'; 5 | import {AssociateListRoutingModule } from './associate-list-page-routing.module'; 6 | import { CommonModule } from '@angular/common'; 7 | 8 | import { FormsModule } from '@angular/forms'; 9 | import { ChartsModule } from 'ng2-charts'; 10 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 11 | import { SearchFilterPipeModule } from '../../pipes/search-filter/search-filter.module'; 12 | // import { OwlDateTimeModule, OwlNativeDateTimeModule } from 'ng-pick-datetime'; 13 | 14 | @NgModule({ 15 | declarations: [AssociateListPageComponent], 16 | providers: [AssociateService, ClientService], 17 | imports: [AssociateListRoutingModule, CommonModule, FormsModule, ChartsModule, MatProgressSpinnerModule, SearchFilterPipeModule] 18 | }) 19 | export class AssociateListPageModule {} -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/associate-list-page/update-dialog-component.html: -------------------------------------------------------------------------------- 1 |

Update {{data.associates.size}} Associates

2 |
3 |
4 | 5 |
6 |
7 | 8 | 13 |
14 |
15 |
16 |
17 | 18 | 22 |
23 |
24 |
25 |
26 | 27 | 31 |
32 |
33 | 34 |
35 |
36 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/associate-view/associate-view-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { AssociateViewComponent } from './associate-view.component'; 4 | 5 | 6 | const routes: Routes = [ 7 | { 8 | path: '', 9 | component: AssociateViewComponent 10 | } 11 | ]; 12 | 13 | @NgModule({ 14 | imports: [RouterModule.forChild(routes)], 15 | exports: [RouterModule] 16 | }) 17 | export class AssociateViewRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/associate-view/associate-view.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { AssociateService } from '../../services/associate-service/associate.service'; 3 | import { AuthenticationService } from '../../services/authentication-service/authentication.service'; 4 | //import { ClientService } from '../../services/client-service/client.service'; 5 | //import { AssociateViewComponent } from './associate-view.component'; 6 | import { AssociateViewRoutingModule } from './associate-view-routing.module'; 7 | import { CommonModule } from '@angular/common'; 8 | 9 | import { FormsModule } from '@angular/forms'; 10 | import { ChartsModule } from 'ng2-charts'; 11 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 12 | 13 | @NgModule({ 14 | declarations: [ 15 | //AssociateViewComponent 16 | ], 17 | providers:[ 18 | AuthenticationService, 19 | AssociateService, 20 | //ClientService 21 | ], 22 | imports:[ 23 | AssociateViewRoutingModule, 24 | CommonModule, 25 | FormsModule, 26 | ChartsModule, 27 | MatProgressSpinnerModule 28 | ] 29 | 30 | }) 31 | export class AssociateViewModule { } 32 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/batch-details/batch-details-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { BatchDetailsComponent } from './batch-details.component'; 4 | 5 | 6 | const routes: Routes = [ 7 | { 8 | path: '', 9 | component: BatchDetailsComponent 10 | } 11 | ]; 12 | 13 | @NgModule({ 14 | imports: [RouterModule.forChild(routes)], 15 | exports: [RouterModule] 16 | }) 17 | export class BatchDetailsRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/batch-details/batch-details.component.css: -------------------------------------------------------------------------------- 1 | canvas { 2 | margin-top: 200px; 3 | } 4 | 5 | .data-status { 6 | text-align: center; 7 | } 8 | 9 | .center-div { 10 | margin: 0 auto; 11 | width: 100px; 12 | } 13 | 14 | img { 15 | padding: 20px; 16 | } 17 | 18 | .vertical-center { 19 | min-height: 60%; /* Fallback for browsers do NOT support vh unit */ 20 | min-height: 60vh; /* These two lines are counted as one */ 21 | 22 | display: flex; 23 | align-items: center; 24 | } 25 | 26 | @media screen and (max-width: 1000px) { 27 | table { 28 | width: 100% !important; 29 | padding-left: 0px; 30 | padding-right: 0px; 31 | } 32 | } 33 | 34 | table{ 35 | border-radius: 0px; 36 | overflow: hidden; 37 | box-shadow: 0 0px 40px 0px rgba(0, 0, 0, 0.15); 38 | } 39 | 40 | tbody > tr { 41 | cursor: pointer; 42 | opacity: 1.0; 43 | transition: opacity .2s ease-in-out; 44 | } 45 | 46 | tbody > tr:hover { 47 | opacity: 1.0; 48 | } 49 | 50 | tbody:hover > tr:not(:hover) { 51 | opacity: 0.5; 52 | } 53 | 54 | #back-button { 55 | margin: 20px 0; 56 | } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/batch-details/batch-details.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BatchService } from '../../services/batch-service/batch.service'; 3 | import { BatchDetailsComponent} from './batch-details.component'; 4 | import {BatchDetailsRoutingModule } from './batch-details-routing.module'; 5 | import { CommonModule } from '@angular/common'; 6 | 7 | import { FormsModule } from '@angular/forms'; 8 | import { ChartsModule } from 'ng2-charts'; 9 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 10 | import { Ng2OrderModule } from 'ng2-order-pipe'; 11 | 12 | @NgModule({ 13 | declarations: [ 14 | BatchDetailsComponent 15 | ], 16 | providers:[ 17 | BatchService 18 | ], 19 | imports:[ 20 | CommonModule, 21 | BatchDetailsRoutingModule, 22 | FormsModule, 23 | ChartsModule, 24 | Ng2OrderModule, 25 | MatProgressSpinnerModule 26 | ] 27 | }) 28 | export class BatchDetailsModule { } 29 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/batch-list/batch-list-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { BatchListComponent } from './batch-list.component'; 4 | 5 | 6 | const routes: Routes = [ 7 | { 8 | path: '', 9 | component: BatchListComponent 10 | } 11 | ]; 12 | 13 | @NgModule({ 14 | imports: [RouterModule.forChild(routes)], 15 | exports: [RouterModule] 16 | }) 17 | export class BatchListRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/batch-list/batch-list.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from "@angular/core"; 2 | import { BatchListComponent } from './batch-list.component'; 3 | //import { DateTimePickerComponent } from '../datetimepicker/datetimepicker.component'; 4 | import { BatchService } from '../../services/batch-service/batch.service'; 5 | import { DateService } from '../../services/date-service/date.service'; 6 | 7 | import {BatchListRoutingModule } from './batch-list-routing.module'; 8 | import { CommonModule } from '@angular/common'; 9 | 10 | import { FormsModule } from '@angular/forms'; 11 | import { ChartsModule } from 'ng2-charts'; 12 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 13 | import { SearchFilterPipeModule } from '../../pipes/search-filter/search-filter.module'; 14 | //import { OwlDateTimeModule, OwlNativeDateTimeModule } from 'ng-pick-datetime'; 15 | 16 | @NgModule({ 17 | declarations: [BatchListComponent], 18 | imports: [BatchListRoutingModule,CommonModule, FormsModule, ChartsModule, MatProgressSpinnerModule, SearchFilterPipeModule], 19 | entryComponents: [], 20 | providers: [BatchService, DateService], 21 | exports: [BatchListComponent], 22 | }) 23 | 24 | export class BatchListModule {}; 25 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/client-list/client-list-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { ClientListComponent } from './client-list.component'; 4 | 5 | 6 | const routes: Routes = [ 7 | { 8 | path: '', 9 | component: ClientListComponent 10 | } 11 | ]; 12 | 13 | @NgModule({ 14 | imports: [RouterModule.forChild(routes)], 15 | exports: [RouterModule] 16 | }) 17 | export class ClientListRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/client-list/client-list.component.css: -------------------------------------------------------------------------------- 1 | .client-list-page{ 2 | background-color: #ebedea; 3 | padding: 20px; 4 | } 5 | 6 | #clients-list{ 7 | margin-top: 20px; 8 | } 9 | 10 | #clients-list-well { 11 | margin-top: 20px; 12 | padding-top: 0px; 13 | max-height: 350px; 14 | overflow-y: scroll; 15 | } 16 | 17 | /* li{ 18 | padding: 5px; 19 | margin-top: 0px; 20 | } 21 | ul{ 22 | margin: auto; 23 | margin-top: 0px; 24 | padding: 0; 25 | list-style-type: none; 26 | } */ 27 | 28 | .center-div 29 | { 30 | margin: 0 auto; 31 | width: 100px; 32 | } 33 | 34 | img{ 35 | padding: 20px; 36 | } 37 | 38 | .client-name{ 39 | color: #757575; 40 | } 41 | .client-name:hover{ 42 | color: #121212; 43 | cursor: pointer; 44 | text-decoration: underline; 45 | } 46 | 47 | /* Addition */ 48 | 49 | ul { 50 | /* background-color: white; */ 51 | display: inline-block; 52 | width: auto; 53 | padding: 0px; 54 | } 55 | 56 | ul > li { 57 | cursor: pointer; 58 | opacity: 1.0; 59 | transition: opacity .2s ease-in-out; 60 | } 61 | 62 | ul > li:hover { 63 | opacity: 1.0; 64 | } 65 | 66 | ul:hover > li:not(:hover) { 67 | opacity: 0.5; 68 | } 69 | 70 | button { 71 | border: none; 72 | color: white; 73 | padding: 16px 32px; 74 | text-align: center; 75 | text-decoration: none; 76 | display: inline-block; 77 | font-size: 16px; 78 | margin: 4px 2px; 79 | -webkit-transition-duration: 0.2s; /* Safari */ 80 | transition-duration: 0.2s; 81 | cursor: pointer; 82 | } 83 | 84 | button:hover { 85 | background-color: #F26925; 86 | color: white; 87 | } 88 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/client-list/client-list.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { RequestService } from '../../services/request-service/request.service'; 4 | import { ClientService } from '../../services/client-service/client.service'; 5 | import { ClientListComponent} from './client-list.component'; 6 | 7 | import {ClientListRoutingModule } from './client-list-routing.module'; 8 | import { CommonModule } from '@angular/common'; 9 | 10 | import { FormsModule } from '@angular/forms'; 11 | import { ChartsModule } from 'ng2-charts'; 12 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 13 | import { SearchFilterPipeModule } from '../../pipes/search-filter/search-filter.module'; 14 | @NgModule({ 15 | declarations: [ 16 | ClientListComponent 17 | ], 18 | providers:[ 19 | RequestService, 20 | ClientService 21 | ], 22 | imports:[ 23 | ClientListRoutingModule, 24 | CommonModule, 25 | FormsModule, 26 | ChartsModule, 27 | MatProgressSpinnerModule, 28 | SearchFilterPipeModule 29 | ] 30 | }) 31 | export class ClientListModule { } 32 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/client-mapped/client-mapped-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { ClientMappedComponent } from './client-mapped.component'; 4 | 5 | 6 | const routes: Routes = [ 7 | { 8 | path: '', 9 | component: ClientMappedComponent 10 | } 11 | ]; 12 | 13 | @NgModule({ 14 | imports: [RouterModule.forChild(routes)], 15 | exports: [RouterModule] 16 | }) 17 | export class ClientMappedRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/client-mapped/client-mapped.component.css: -------------------------------------------------------------------------------- 1 | .white { 2 | background-color: white; 3 | margin: 10px; 4 | } 5 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/client-mapped/client-mapped.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | 6 | 7 |
8 |
9 |
10 |
11 |
12 | 15 | 16 |
17 |
18 |
19 | 20 |
21 |
22 |
23 | 25 | 26 |
27 |
28 |
29 |
-------------------------------------------------------------------------------- /NGTrackForce/src/app/components/client-mapped/client-mapped.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { RequestService } from '../../services/request-service/request.service'; 4 | import { ClientService } from '../../services/client-service/client.service'; 5 | import { ClientMappedComponent} from './client-mapped.component'; 6 | 7 | import {ClientMappedRoutingModule } from './client-mapped-routing.module'; 8 | import { CommonModule } from '@angular/common'; 9 | 10 | import { FormsModule } from '@angular/forms'; 11 | import { ChartsModule } from 'ng2-charts'; 12 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 13 | 14 | @NgModule({ 15 | declarations: [ 16 | ClientMappedComponent 17 | ], 18 | providers:[ 19 | RequestService, 20 | ClientService 21 | ], 22 | imports:[ 23 | ClientMappedRoutingModule, 24 | CommonModule, 25 | FormsModule, 26 | ChartsModule, 27 | MatProgressSpinnerModule 28 | ] 29 | }) 30 | export class ClientMappedModule { }; 31 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/create-user/create-user-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { CreateUserComponent } from './create-user.component'; 4 | 5 | 6 | const routes: Routes = [ 7 | { 8 | path: '', 9 | component: CreateUserComponent 10 | } 11 | ]; 12 | 13 | @NgModule({ 14 | imports: [RouterModule.forChild(routes)], 15 | exports: [RouterModule] 16 | }) 17 | export class CreateUserRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/create-user/create-user.enum.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Enumeration containing all expected display messages for the create user page 3 | * 4 |

Password must contain the following:

5 |

Minimum 8 characters

6 |

At least one lowercase letter

7 |

At least one capital (uppercase) letter

8 |

At least one number

9 |

At least one special character (.!@#$%^&*)

10 | Password must have a number, a capital letter and a special character 11 | */ 12 | export enum StatusMessage { 13 | INVALID_PASS = 'Password must be at least 8 characters and include a number, a capital letter and a special character ', 14 | INVALID_USER = 'Alphabetical and numerical characters only, no spaces', 15 | MISMATCH = 'Passwords do not match!', 16 | NONUNIQUE = 'Username is not unique!', 17 | SUCCESS = 'User created successfully', 18 | ERROR = 'Error: new user not created!', 19 | } 20 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/create-user/create-user.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RequestService } from '../../services/request-service/request.service'; 3 | import { ClientService } from '../../services/client-service/client.service'; 4 | import { CreateUserComponent} from './create-user.component'; 5 | 6 | import {CreateUserRoutingModule } from './create-user-routing.module'; 7 | import { CommonModule } from '@angular/common'; 8 | 9 | import { FormsModule } from '@angular/forms'; 10 | import { ChartsModule } from 'ng2-charts'; 11 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 12 | 13 | @NgModule({ 14 | declarations: [ 15 | CreateUserComponent 16 | ], 17 | providers:[ 18 | RequestService, 19 | ClientService 20 | ], 21 | imports:[ 22 | CreateUserRoutingModule, 23 | CommonModule, 24 | FormsModule, 25 | ChartsModule, 26 | MatProgressSpinnerModule 27 | ] 28 | }) 29 | export class CreateUserModule { } 30 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/datetimepicker/datetimepicker.component.css: -------------------------------------------------------------------------------- 1 | /* this is intended to make the datetime popup appear over other elements, instead of pushing them down. However, it currently isn't working */ 2 | .pickerGroup 3 | { 4 | position: relative; 5 | display: flex; 6 | flex-flow: column nowrap; 7 | align-items: center; 8 | } 9 | 10 | owl-date-time-inline 11 | { 12 | margin-top: 35px; 13 | position: absolute; 14 | } 15 | 16 | #error-date 17 | { 18 | width: 100%; 19 | } 20 | 21 | .form-group { 22 | padding:5px; 23 | } 24 | 25 | .alert-danger { 26 | z-index: 10 !important; 27 | } 28 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/datetimepicker/datetimepicker.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | 7 |
8 |
Invalid Date.
9 | 10 |
11 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/datetimepicker/datetimepicker.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from "@angular/core"; 2 | import { DateTimePickerComponent } from './datetimepicker.component'; 3 | import { DateService } from '../../services/date-service/date.service'; 4 | import {CommonModule } from '@angular/common'; 5 | import { DateTimePickerRoutingModule } from './datetimepickerrouting.module'; 6 | 7 | import { FormsModule } from '@angular/forms'; 8 | import { ChartsModule } from 'ng2-charts'; 9 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 10 | 11 | @NgModule({ 12 | declarations: [], 13 | providers: [DateService], 14 | imports:[ 15 | CommonModule, 16 | FormsModule, 17 | ChartsModule, 18 | MatProgressSpinnerModule 19 | ] 20 | }) 21 | 22 | export class DateTimePickerModule {}; 23 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/datetimepicker/datetimepickerrouting.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { DateTimePickerComponent } from './datetimepicker.component'; 4 | 5 | 6 | 7 | const routes: Routes = [ 8 | { 9 | path: '', 10 | component: DateTimePickerComponent 11 | } 12 | ]; 13 | 14 | @NgModule({ 15 | imports: [RouterModule.forChild(routes)], 16 | exports: [RouterModule] 17 | }) 18 | export class DateTimePickerRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/deployed/deployed-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { DeployedComponent } from './deployed.component'; 4 | 5 | 6 | 7 | const routes: Routes = [ 8 | { 9 | path: '', 10 | component: DeployedComponent 11 | } 12 | ]; 13 | 14 | @NgModule({ 15 | imports: [RouterModule.forChild(routes)], 16 | exports: [RouterModule] 17 | }) 18 | export class DeployedRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/deployed/deployed.component.css: -------------------------------------------------------------------------------- 1 | .white { 2 | background-color: white; 3 | margin: 10px; 4 | } 5 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/deployed/deployed.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | 6 | 7 |
8 |
9 |
10 |
11 |
12 | 22 | 23 |
24 |
25 |
26 | 27 |
28 |
29 |
30 | 39 | 40 |
41 |
42 |
43 |
-------------------------------------------------------------------------------- /NGTrackForce/src/app/components/deployed/deployed.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { AssociateService } from '../../services/associate-service/associate.service'; 4 | import { DeployedComponent } from './deployed.component'; 5 | import {CommonModule} from '@angular/common'; 6 | import { DeployedRoutingModule } from './deployed-routing.module'; 7 | 8 | import { FormsModule } from '@angular/forms'; 9 | import { ChartsModule } from 'ng2-charts'; 10 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 11 | 12 | @NgModule({ 13 | declarations: [ 14 | DeployedComponent 15 | ], 16 | providers:[ 17 | AssociateService 18 | ], 19 | imports: [ 20 | CommonModule, 21 | DeployedRoutingModule, 22 | FormsModule, 23 | ChartsModule, 24 | MatProgressSpinnerModule 25 | ] 26 | }) 27 | export class DeployedModule { }; 28 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/footer/footer.component.css: -------------------------------------------------------------------------------- 1 | footer { 2 | background-color: #484c55; 3 | text-align: center; 4 | width: 100%; 5 | } 6 | 7 | div.col-md-3 { 8 | text-align: center; 9 | } 10 | 11 | img.img-responsive { 12 | width: 180px; 13 | } 14 | 15 | span.main-head-contact{ 16 | font-weight: 700; 17 | font-size: 15px; 18 | color: white; 19 | } 20 | 21 | hr { 22 | border-color: white; 23 | } 24 | 25 | body > app-component > app-footer > footer > div { 26 | width: 100%; 27 | } 28 | div.row span.copyright{ 29 | color: white; 30 | font-size: 12px; 31 | width: 100%; 32 | } 33 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/footer/footer.component.html: -------------------------------------------------------------------------------- 1 | 41 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/footer/footer.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { FooterComponent } from './footer.component'; 4 | import {CUSTOM_ELEMENTS_SCHEMA} from "@angular/core"; 5 | 6 | describe('FooterComponent', () => { 7 | let component: FooterComponent; 8 | let fixture: ComponentFixture; 9 | 10 | beforeEach(async(() => { 11 | TestBed.configureTestingModule({ 12 | declarations: [ FooterComponent ], 13 | schemas: [CUSTOM_ELEMENTS_SCHEMA] 14 | }) 15 | .compileComponents(); 16 | })); 17 | 18 | beforeEach(() => { 19 | fixture = TestBed.createComponent(FooterComponent); 20 | component = fixture.componentInstance; 21 | fixture.detectChanges(); 22 | }); 23 | 24 | it('should create the footer', () => { 25 | expect(component).toBeTruthy(); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/footer/footer.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-footer', 5 | templateUrl: './footer.component.html', 6 | styleUrls: ['./footer.component.css'] 7 | }) 8 | export class FooterComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | /** 16 | * NOTE ON THE FOOTER 17 | * The footer is forced to the bottom of the screen on all pages in the 18 | * app.component.css file. The way it is forced to the bottom is a 19 | * combination of fixing the app-footer component to the bottom and 20 | * making the min-height of the router-outlet (any of the component views) 21 | * a minimum height of 100% of the view height minus 90 pixels 22 | * because the current height of the footer is 90 pixels 23 | * 24 | * IF THE HEIGHT OF THE FOOTER CHANGES THEN THE HEIGHT IN THE 25 | * APP.COMPONENT.CSS FILE MUST ALSO CHANGE 26 | */ 27 | 28 | } 29 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/form-component/form.enum.ts: -------------------------------------------------------------------------------- 1 | // Server status messages, {} is placeholder, handled by _formatStatusMsg method 2 | export enum FormStatus { 3 | SUCCESS = 'Associate {} was successful', 4 | WAIT = 'Please wait, your {} is pending', 5 | FAILURE = 'There was an error on the server' 6 | } 7 | 8 | // Enumeration for status message properties on form.component class 9 | export enum StatusProp { 10 | APPROVE = 'approveStatus', 11 | UPDATE = 'formStatus', 12 | } 13 | 14 | // Enumeration for properties that hold the bootstrap css classes 15 | export enum StatusClass { 16 | UPDATE_CLASS = 'formStatusClass', 17 | APROVE_CLASS = 'approveStatusClass', 18 | } 19 | 20 | export enum MarketingStatus { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/form-component/newform-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { FormComponent } from './form.component'; 4 | 5 | 6 | 7 | const routes: Routes = [ 8 | { 9 | path: '', 10 | component: FormComponent 11 | } 12 | ]; 13 | 14 | @NgModule({ 15 | imports: [RouterModule.forChild(routes)], 16 | exports: [RouterModule] 17 | }) 18 | export class NewFormRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/form-component/newform.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from "@angular/core"; 2 | import { FormComponent } from './form.component'; 3 | import { AssociateService } from '../../services/associate-service/associate.service'; 4 | import { ClientService } from '../../services/client-service/client.service'; 5 | import { AuthenticationService } from '../../services/authentication-service/authentication.service'; 6 | import { InterviewService } from '../../services/interview-service/interview.service'; 7 | 8 | import {CommonModule} from '@angular/common'; 9 | import {NewFormRoutingModule} from './newform-routing.module'; 10 | 11 | import { FormsModule } from '@angular/forms'; 12 | import { ChartsModule } from 'ng2-charts'; 13 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 14 | 15 | @NgModule({ 16 | declarations: [FormComponent], 17 | providers: [AssociateService, ClientService, AuthenticationService, InterviewService], 18 | imports: [CommonModule, NewFormRoutingModule, FormsModule, ChartsModule, MatProgressSpinnerModule] 19 | }) 20 | 21 | export class NewFormModule {}; 22 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/home/home-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { HomeComponent } from './home.component'; 4 | 5 | 6 | 7 | const routes: Routes = [ 8 | { 9 | path: '', 10 | component: HomeComponent 11 | } 12 | ]; 13 | 14 | @NgModule({ 15 | imports: [RouterModule.forChild(routes)], 16 | exports: [RouterModule] 17 | }) 18 | export class HomeRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/home/home.component.css: -------------------------------------------------------------------------------- 1 | .white { 2 | background-color: white; 3 | margin: 10px 0; 4 | } 5 | .center-div { 6 | margin: 0 auto; 7 | width: 100px; 8 | padding: 25px; 9 | } 10 | 11 | .border-info { 12 | border: 0; 13 | box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); 14 | } 15 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/home/home.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { UserService } from '../../services/user-service/user.service'; 3 | import { DataSyncService } from '../../services/datasync-service/data-sync.service'; 4 | import { RequestService } from '../../services/request-service/request.service'; 5 | import { BatchService } from '../../services/batch-service/batch.service'; 6 | import { AssociateService } from '../../services/associate-service/associate.service'; 7 | import { HomeComponent } from './home.component'; 8 | 9 | import {CommonModule} from '@angular/common'; 10 | import {HomeRoutingModule} from './home-routing.module'; 11 | 12 | import { FormsModule } from '@angular/forms'; 13 | import { ChartsModule } from 'ng2-charts'; 14 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 15 | 16 | @NgModule({ 17 | declarations: [ 18 | HomeComponent 19 | ], 20 | providers:[ 21 | AssociateService, 22 | BatchService, 23 | UserService, 24 | DataSyncService, 25 | RequestService 26 | ], 27 | imports: [ 28 | HomeRoutingModule, 29 | CommonModule, 30 | FormsModule, 31 | ChartsModule, 32 | MatProgressSpinnerModule 33 | ] 34 | }) 35 | export class HomeModule { } 36 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/interview-details/interview-details-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { InterviewDetailsComponent } from './interview-details.component'; 4 | 5 | 6 | 7 | const routes: Routes = [ 8 | { 9 | path: '', 10 | component: InterviewDetailsComponent 11 | } 12 | ]; 13 | 14 | @NgModule({ 15 | imports: [RouterModule.forChild(routes)], 16 | exports: [RouterModule] 17 | }) 18 | export class InterviewDetailsRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/interview-details/interview-details.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/app/components/interview-details/interview-details.component.css -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/interview-details/interview-details.enum.ts: -------------------------------------------------------------------------------- 1 | export enum InterviewUpdate { 2 | SUCCESS = "Success! Your interview was updated", 3 | WAIT = "Please wait, your changes are pending", 4 | FAILURE = "An error occured on the server, your interview was not updated" 5 | } 6 | 7 | export enum PromptClass { 8 | SUCCESS = 'alert-success', 9 | WAIT = 'alert-warning', 10 | FAILURE = 'alert-danger', 11 | } 12 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/interview-details/interview-details.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { InterviewService } from '../../services/interview-service/interview.service'; 3 | import { AuthenticationService } from '../../services/authentication-service/authentication.service'; 4 | import { InterviewDetailsComponent } from './interview-details.component'; 5 | //import { MyInterviewComponent } from '../myinterview-view/myinterview-view.component'; 6 | 7 | import { CommonModule } from '@angular/common'; 8 | import {InterviewDetailsRoutingModule } from './interview-details-routing.module'; 9 | 10 | import { FormsModule } from '@angular/forms'; 11 | import { ChartsModule } from 'ng2-charts'; 12 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 13 | 14 | @NgModule({ 15 | declarations: [ 16 | InterviewDetailsComponent, 17 | //MyInterviewComponent 18 | ], 19 | providers:[ 20 | InterviewService, 21 | AuthenticationService 22 | ], 23 | imports: [ 24 | CommonModule, 25 | InterviewDetailsRoutingModule, 26 | FormsModule, 27 | ChartsModule, 28 | MatProgressSpinnerModule 29 | ] 30 | }) 31 | export class InterviewDetailsModule { } 32 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/interviews-view/interviews-view-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { InterviewsComponent } from './interviews-view.component'; 4 | 5 | 6 | 7 | const routes: Routes = [ 8 | { 9 | path: '', 10 | component: InterviewsComponent 11 | } 12 | ]; 13 | 14 | @NgModule({ 15 | imports: [RouterModule.forChild(routes)], 16 | exports: [RouterModule] 17 | }) 18 | export class InterviewsViewRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/interviews-view/interviews-view.component.css: -------------------------------------------------------------------------------- 1 | thead { 2 | background-color: #ddd; 3 | border-color: black; 4 | } 5 | 6 | .pointer { 7 | cursor: pointer; 8 | } 9 | 10 | #info { 11 | border-color: #c8c8c8; 12 | border-width: 1px; 13 | border-style: solid; 14 | } 15 | 16 | .pre-scrollable { 17 | max-height: 550px !important; 18 | overflow-y: scroll; 19 | } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/interviews-view/interviews-view.component.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/app/components/interviews-view/interviews-view.component.spec.ts -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/interviews-view/interviews-view.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from "@angular/core"; 2 | import { InterviewsComponent } from './interviews-view.component'; 3 | import { InterviewService } from '../../services/interview-service/interview.service'; 4 | import {CommonModule } from '@angular/common'; 5 | import {InterviewsViewRoutingModule} from './interviews-view-routing.module'; 6 | import { AuthenticationService } from '../../services/authentication-service/authentication.service'; 7 | import { FormsModule } from '@angular/forms'; 8 | import { ChartsModule } from 'ng2-charts'; 9 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 10 | 11 | @NgModule({ 12 | declarations: [InterviewsComponent], 13 | providers: [InterviewService, AuthenticationService], 14 | imports: [CommonModule, InterviewsViewRoutingModule, FormsModule, ChartsModule, MatProgressSpinnerModule] 15 | }) 16 | 17 | export class InterviewsViewModule {}; 18 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/invalid-session/invalid-session.component.css: -------------------------------------------------------------------------------- 1 | .div-window{ 2 | border: 1px solid rgb(200,200,200); 3 | background-color: #f5f5f5; 4 | border-radius: 3px; 5 | overflow: hidden; 6 | padding: 10px; 7 | } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/invalid-session/invalid-session.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | 9 | 10 | 11 |
12 |
13 |
-------------------------------------------------------------------------------- /NGTrackForce/src/app/components/invalid-session/invalid-session.component.ts: -------------------------------------------------------------------------------- 1 | import { RequestService } from './../../services/request-service/request.service'; 2 | import { Component, OnInit } from '@angular/core'; 3 | import { AuthenticationService } from '../../services/authentication-service/authentication.service'; 4 | import { NavbarService } from '../../services/navbar-service/navbar.service'; 5 | 6 | @Component({ 7 | selector: 'app-invalid-session', 8 | templateUrl: './invalid-session.component.html', 9 | styleUrls: ['./invalid-session.component.css'], 10 | providers:[ AuthenticationService ] 11 | }) 12 | export class InvalidSessionComponent implements OnInit { 13 | 14 | constructor(private authService: AuthenticationService, private navbarService: NavbarService) { } 15 | 16 | ngOnInit() { 17 | try{ 18 | this.navbarService.hide(); 19 | } catch(error) { 20 | console.error("Error in invalid-session.component.ts ngOnInit(): ", error) 21 | } 22 | } 23 | 24 | toLogin() { 25 | try{ 26 | this.authService.logout(); 27 | } catch(error) { 28 | console.error("Error in invalid-session.component.ts toLogin(): ", error) 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/myinterview-view/myinterview-view-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { MyInterviewComponent } from './myinterview-view.component'; 4 | 5 | 6 | 7 | const routes: Routes = [ 8 | { 9 | path: '', 10 | component: MyInterviewComponent 11 | } 12 | ]; 13 | 14 | @NgModule({ 15 | imports: [RouterModule.forChild(routes)], 16 | exports: [RouterModule] 17 | }) 18 | export class MyInterviewRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/myinterview-view/myinterview-view.component.css: -------------------------------------------------------------------------------- 1 | table { 2 | border-width: 2px; 3 | } 4 | 5 | .info td:first-child { 6 | font-weight: bold; 7 | } 8 | 9 | tbody { 10 | background-color: #fff; 11 | } 12 | 13 | thead { 14 | background-color: #ddd; 15 | text-align: center; 16 | /* border-color: black; */ 17 | } 18 | 19 | th { 20 | text-align: center; 21 | } 22 | 23 | .toggledContainer { 24 | min-height: 250px; 25 | margin-top: 20px; 26 | margin-bottom: 10px; 27 | padding-top: 5px; 28 | background-color: white; 29 | border: 2px solid lightgrey; 30 | } 31 | 32 | .form-horizontal { 33 | 34 | } 35 | 36 | .flag { 37 | /* width: 4px; */ 38 | width: 4%; 39 | } 40 | .id { 41 | text-decoration: underline; 42 | } 43 | 44 | .icon-button { 45 | appearance: none; 46 | -webkit-appearance: none; 47 | -moz-appearance: none; 48 | outline: none; 49 | border: 0; 50 | background: transparent; 51 | } 52 | 53 | .spaceUnder { 54 | padding-right: 1em; 55 | } 56 | .pencil { 57 | color : #ff8000; 58 | } 59 | 60 | #new-interview{ 61 | margin-left: 225px; 62 | } 63 | 64 | input[name='24hournotice']{ 65 | margin-left: 15px; 66 | } 67 | 68 | .center-div 69 | { 70 | margin: 0 auto; 71 | width: 100px; 72 | } 73 | img{ 74 | padding: 20px; 75 | } 76 | 77 | form 78 | { 79 | padding: 30px; 80 | margin: 0 auto; 81 | width: 100%; 82 | } 83 | 84 | .button_col > button 85 | { 86 | margin-bottom: 10px; 87 | } 88 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/myinterview-view/myinterview-view.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from "@angular/core"; 2 | import { MyInterviewComponent } from './myinterview-view.component'; 3 | import { AssociateService } from '../../services/associate-service/associate.service'; 4 | import { InterviewService } from '../../services/interview-service/interview.service'; 5 | import { AuthenticationService } from '../../services/authentication-service/authentication.service'; 6 | import { ClientService } from '../../services/client-service/client.service'; 7 | import { ReactiveFormsModule } from '@angular/forms'; 8 | 9 | import {MyInterviewRoutingModule} from './myinterview-view-routing.module'; 10 | import {CommonModule} from '@angular/common' 11 | 12 | import { FormsModule } from '@angular/forms'; 13 | import { ChartsModule } from 'ng2-charts'; 14 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 15 | import { DateService } from '../../services/date-service/date.service'; 16 | 17 | 18 | @NgModule({ 19 | declarations: [MyInterviewComponent], 20 | providers: [InterviewService, AssociateService, AuthenticationService, DateService, ClientService], 21 | imports: [ReactiveFormsModule,CommonModule,MyInterviewRoutingModule, FormsModule, ChartsModule, MatProgressSpinnerModule, ] 22 | }) 23 | 24 | export class MyInterviewViewModule {}; 25 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/navbar/navbar.component.css: -------------------------------------------------------------------------------- 1 | #logo{ 2 | width:120px; 3 | } 4 | 5 | .navbar { 6 | background-color:white; 7 | box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); 8 | } 9 | 10 | .nav { 11 | background-color: white; 12 | text-align: center; 13 | } 14 | 15 | /* color of active tab in navbar */ 16 | .navbar-light .navbar-nav .active>.nav-link, .navbar-light .navbar-nav .nav-link.active, .navbar-light .navbar-nav .nav-link.show, .navbar-light .navbar-nav .show>.nav-link { 17 | color: #00A599; 18 | } 19 | 20 | /* background color of active tab if necessary */ 21 | a.nav-link.active{ 22 | color:white; 23 | } 24 | 25 | /* Change the link color on hover */ 26 | li:hover { 27 | /* text-decoration: underline; */ 28 | box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); 29 | } 30 | 31 | /* color of welcome message */ 32 | #navbarDropdown { 33 | border-left: 1px solid rgba(0,0,0,0.12); 34 | color: #F26925; 35 | } 36 | 37 | /* color of logout button */ 38 | .dropdown-item { 39 | text-align: right; 40 | color: #F9231A; 41 | } 42 | 43 | /* text within navbar */ 44 | #collapsingNav { 45 | text-align: center; 46 | font-size: 17px; 47 | font-weight: 500; 48 | } 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/not-found/not-found.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/app/components/not-found/not-found.component.css -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/not-found/not-found.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

404

4 |
5 | Oops! The page you are trying to access does not exist. 6 |
7 |
8 |
9 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/not-found/not-found.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { NotFoundComponent } from './not-found.component'; 4 | 5 | describe('NotFoundComponent', () => { 6 | let component: NotFoundComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ NotFoundComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(NotFoundComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/not-found/not-found.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-not-found', 5 | templateUrl: './not-found.component.html', 6 | styleUrls: ['./not-found.component.css'] 7 | }) 8 | export class NotFoundComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/passwordupdate/passwordupdate-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { PasswordUpdateComponent } from './passwordupdate.component'; 4 | 5 | const routes: Routes = [ 6 | { 7 | path: '', 8 | component: PasswordUpdateComponent 9 | } 10 | ]; 11 | 12 | @NgModule({ 13 | imports: [RouterModule.forChild(routes)], 14 | exports: [RouterModule] 15 | }) 16 | export class PasswordUpdateRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/passwordupdate/passwordupdate.component.css: -------------------------------------------------------------------------------- 1 | .pwu-main { 2 | margin: 20px auto; 3 | } 4 | 5 | h3 { 6 | text-align: center; 7 | } 8 | 9 | form, .update-result { 10 | max-width: 500px; 11 | margin: 10px auto; 12 | } 13 | 14 | fieldset { 15 | margin-top: 50px; 16 | } 17 | 18 | #submitButton { 19 | padding: 5px 15px 5px 15px; 20 | color: #FFF; 21 | background-color: #4CAF50; 22 | font-size: 18px; 23 | text-align: center; 24 | font-style: normal; 25 | border-radius: 5px; 26 | border-width: 1px 1px 3px; 27 | box-shadow: 0 -1px 0 rgba(255,255,255,0.1) inset; 28 | margin: 30px 0 30px 65%; 29 | } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/passwordupdate/passwordupdate.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |

Update Password

5 | 6 |
7 |
8 | {{error}} 9 |
10 |
11 | {{success}} 12 |
13 |
14 | 15 |
16 | 17 | 19 | 20 | 22 | 23 | 25 |
26 | 27 | 29 |
30 |
-------------------------------------------------------------------------------- /NGTrackForce/src/app/components/passwordupdate/passwordupdate.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { FormsModule } from '@angular/forms'; 4 | import { UserService } from '../../services/user-service/user.service'; 5 | import { PasswordUpdateRoutingModule } from './passwordupdate-routing.module' 6 | import { PasswordUpdateComponent } from './passwordupdate.component'; 7 | 8 | @NgModule({ 9 | declarations: [ 10 | PasswordUpdateComponent 11 | ], 12 | providers: [ 13 | UserService 14 | ], 15 | imports: [ 16 | CommonModule, 17 | FormsModule, 18 | PasswordUpdateRoutingModule 19 | ] 20 | }) 21 | 22 | export class PasswordUpdateModule { } 23 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/predictions/predictions-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { PredictionsComponent } from './predictions.component'; 4 | 5 | 6 | 7 | const routes: Routes = [ 8 | { 9 | path: '', 10 | component: PredictionsComponent 11 | } 12 | ]; 13 | 14 | @NgModule({ 15 | imports: [RouterModule.forChild(routes)], 16 | exports: [RouterModule] 17 | }) 18 | export class PredictionsRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/predictions/predictions.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | import {CUSTOM_ELEMENTS_SCHEMA} from "@angular/core"; 3 | import { PredictionsComponent } from './predictions.component'; 4 | // added imports; DK 5 | import { FormsModule } from '@angular/forms'; 6 | import { CurriculumService } from '../../services/curriculum-service/curriculum.service'; 7 | import { HttpClientTestingModule } from '@angular/common/http/testing'; 8 | import { AssociateService } from '../../services/associate-service/associate.service'; 9 | import { BatchService } from '../../services/batch-service/batch.service'; 10 | 11 | describe('PredictionsComponent', () => { 12 | let component: PredictionsComponent; 13 | let fixture: ComponentFixture; 14 | 15 | beforeEach(async(() => { 16 | TestBed.configureTestingModule({ 17 | declarations: [ PredictionsComponent ], 18 | imports: [ FormsModule, HttpClientTestingModule ], 19 | schemas: [CUSTOM_ELEMENTS_SCHEMA], 20 | providers: [ BatchService, CurriculumService, AssociateService ] 21 | }) 22 | .compileComponents(); 23 | })); 24 | 25 | beforeEach(() => { 26 | fixture = TestBed.createComponent(PredictionsComponent); 27 | component = fixture.componentInstance; 28 | fixture.detectChanges(); 29 | }); 30 | 31 | it('should create', () => { 32 | expect(component).toBeTruthy(); 33 | }); 34 | }); 35 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/predictions/predictions.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { PredictionsComponent } from './predictions.component'; 3 | import { BatchService } from './../../services/batch-service/batch.service'; 4 | import { CurriculumService } from '../../services/curriculum-service/curriculum.service'; 5 | import { AssociateService } from '../../services/associate-service/associate.service'; 6 | import { ClientService } from '../../services/client-service/client.service'; 7 | import { DateService } from '../../services/date-service/date.service'; 8 | //import { DateTimePickerComponent } from '../datetimepicker/datetimepicker.component'; 9 | 10 | import {CommonModule} from '@angular/common'; 11 | import {PredictionsRoutingModule} from './predictions-routing.module'; 12 | 13 | import { FormsModule } from '@angular/forms'; 14 | import { ChartsModule } from 'ng2-charts'; 15 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 16 | 17 | @NgModule({ 18 | declarations: [ 19 | PredictionsComponent, 20 | //DateTimePickerComponent 21 | ], 22 | providers:[ 23 | BatchService, 24 | CurriculumService, 25 | AssociateService, 26 | ClientService, 27 | DateService 28 | ], 29 | imports:[ 30 | CommonModule, 31 | PredictionsRoutingModule, 32 | FormsModule, 33 | ChartsModule, 34 | MatProgressSpinnerModule 35 | ] 36 | }) 37 | export class PredictionsModule { } 38 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/skillset/skillset-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { SkillsetComponent } from './skillset.component'; 4 | 5 | 6 | 7 | const routes: Routes = [ 8 | { 9 | path: '', 10 | component: SkillsetComponent 11 | } 12 | ]; 13 | 14 | @NgModule({ 15 | imports: [RouterModule.forChild(routes)], 16 | exports: [RouterModule] 17 | }) 18 | export class SkillsetRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/skillset/skillset.component.css: -------------------------------------------------------------------------------- 1 | .white { 2 | background-color: white; 3 | margin: 10px; 4 | } 5 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/skillset/skillset.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | 6 | 7 |
8 |
9 |
10 |
11 |
12 | 13 | 16 | 17 | 18 |
19 |
20 |
21 | 22 |
23 |
24 |
25 | 27 | 28 |
29 |
30 | 31 |
32 |
-------------------------------------------------------------------------------- /NGTrackForce/src/app/components/skillset/skillset.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { SkillsetComponent } from './skillset.component'; 3 | import { CurriculumService } from '../../services/curriculum-service/curriculum.service'; 4 | 5 | import { SkillsetRoutingModule } from './skillset-routing.module'; 6 | import {CommonModule} from '@angular/common' 7 | 8 | import { FormsModule } from '@angular/forms'; 9 | import { ChartsModule } from 'ng2-charts'; 10 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 11 | 12 | @NgModule({ 13 | declarations: [ 14 | SkillsetComponent 15 | ], 16 | providers:[ 17 | CurriculumService 18 | ], 19 | imports: [ 20 | SkillsetRoutingModule, 21 | CommonModule, 22 | FormsModule, 23 | ChartsModule, 24 | MatProgressSpinnerModule 25 | ] 26 | }) 27 | export class SkillsetModule { } 28 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/trainer-view/trainer-view-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { TrainerViewComponent } from './trainer-view.component'; 4 | 5 | 6 | 7 | const routes: Routes = [ 8 | { 9 | path: '', 10 | component: TrainerViewComponent 11 | } 12 | ]; 13 | 14 | @NgModule({ 15 | imports: [RouterModule.forChild(routes)], 16 | exports: [RouterModule] 17 | }) 18 | export class TrainerRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/trainer-view/trainer-view.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { TrainerViewComponent } from './trainer-view.component'; 3 | import { AuthenticationService } from '../../services/authentication-service/authentication.service'; 4 | import { AssociateService } from "../../services/associate-service/associate.service"; 5 | 6 | import { FormsModule } from '@angular/forms'; 7 | import { ChartsModule } from 'ng2-charts'; 8 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 9 | import { CommonModule } from '@angular/common'; 10 | import { TrainerRoutingModule } from './trainer-view-routing.module'; 11 | 12 | @NgModule({ 13 | declarations: [ 14 | TrainerViewComponent 15 | ], 16 | providers:[ 17 | AssociateService, 18 | AuthenticationService 19 | ], 20 | imports: [ 21 | FormsModule, 22 | ChartsModule, 23 | MatProgressSpinnerModule, 24 | CommonModule, 25 | TrainerRoutingModule 26 | ] 27 | }) 28 | export class TrainerViewModule { } 29 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/undeployed/undeployed-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { UndeployedComponent } from './undeployed.component'; 4 | 5 | 6 | 7 | const routes: Routes = [ 8 | { 9 | path: '', 10 | component: UndeployedComponent 11 | } 12 | ]; 13 | 14 | @NgModule({ 15 | imports: [RouterModule.forChild(routes)], 16 | exports: [RouterModule] 17 | }) 18 | export class UndeployedRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/undeployed/undeployed.component.css: -------------------------------------------------------------------------------- 1 | .white { 2 | background-color: white; 3 | margin: 10px; 4 | } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/undeployed/undeployed.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | 6 | 7 |
8 |
9 |
10 |
11 |
12 | 23 | 24 |
25 |
26 |
27 | 28 |
29 |
30 |
31 |
32 | 41 | 42 |
43 |
44 |
45 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/undeployed/undeployed.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from "@angular/core"; 2 | import { UndeployedComponent } from './undeployed.component'; 3 | import { AssociateService } from '../../services/associate-service/associate.service'; 4 | 5 | import {CommonModule} from '@angular/common'; 6 | import {UndeployedRoutingModule} from './undeployed-routing.module'; 7 | 8 | import { FormsModule } from '@angular/forms'; 9 | import { ChartsModule } from 'ng2-charts'; 10 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 11 | 12 | @NgModule({ 13 | declarations: [UndeployedComponent], 14 | providers: [AssociateService], 15 | imports: [ 16 | CommonModule, 17 | UndeployedRoutingModule, 18 | FormsModule, 19 | ChartsModule, 20 | MatProgressSpinnerModule 21 | ] 22 | }) 23 | 24 | export class UndeployedModule {}; 25 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/usernameupdate/usernameupdate-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { UsernameUpdateComponent } from './usernameupdate.component'; 4 | 5 | const routes: Routes = [ 6 | { 7 | path: '', 8 | component: UsernameUpdateComponent 9 | } 10 | ]; 11 | 12 | @NgModule({ 13 | imports: [RouterModule.forChild(routes)], 14 | exports: [RouterModule] 15 | }) 16 | export class UsernameUpdateRoutingModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/usernameupdate/usernameupdate.component.css: -------------------------------------------------------------------------------- 1 | .userupdate-main { 2 | margin: 20px auto; 3 | } 4 | 5 | h3 { 6 | text-align: center; 7 | } 8 | 9 | form, .update-result { 10 | max-width: 500px; 11 | margin: 10px auto; 12 | } 13 | 14 | fieldset { 15 | margin-top: 50px; 16 | } 17 | 18 | #submitButton { 19 | padding: 5px 15px 5px 15px; 20 | color: #FFF; 21 | background-color: #4CAF50; 22 | font-size: 18px; 23 | text-align: center; 24 | font-style: normal; 25 | border-radius: 5px; 26 | border-width: 1px 1px 3px; 27 | box-shadow: 0 -1px 0 rgba(255,255,255,0.1) inset; 28 | margin: 30px 0 30px 60%; 29 | } -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/usernameupdate/usernameupdate.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |

Update Username

5 | 6 |
7 |
8 | {{error}} 9 |
10 |
11 | {{success}} 12 |
13 |
14 | 15 |
16 | 17 | 19 | 20 | 22 |
23 | 24 | 26 |
27 |
-------------------------------------------------------------------------------- /NGTrackForce/src/app/components/usernameupdate/usernameupdate.component.ts: -------------------------------------------------------------------------------- 1 | import { FormsModule } from '@angular/forms'; 2 | import { Component, OnInit } from '@angular/core'; 3 | import { User } from '../../models/user.model'; 4 | import { LocalStorageUtils } from '../../constants/local-storage' 5 | import { UserService } from '../../services/user-service/user.service'; 6 | import { CreateUserComponent } from '../create-user/create-user.component'; 7 | 8 | @Component({ 9 | selector: 'app-usernameupdate', 10 | templateUrl: './usernameupdate.component.html', 11 | styleUrls: ['./usernameupdate.component.css'] 12 | }) 13 | export class UsernameUpdateComponent implements OnInit { 14 | createUserComp: CreateUserComponent = new CreateUserComponent(null,null,null); 15 | 16 | user: User 17 | userId: number; 18 | newUsername: string; 19 | password: string; 20 | 21 | success: string; 22 | error: string; 23 | 24 | constructor(private userService: UserService) { } 25 | 26 | ngOnInit() { 27 | this.user = JSON.parse(localStorage.getItem(LocalStorageUtils.CURRENT_USER_KEY)); 28 | this.userId = this.user.id; 29 | } 30 | 31 | updateUsername() { 32 | if(this.createUserComp.validateUserName(this.newUsername)) { 33 | this.userService.updateUsername(this.userId, this.newUsername, this.password).subscribe( 34 | data => this.success = 'Username updated successfully', 35 | err => this.error = "There was an error updating your username" 36 | ); 37 | } else { 38 | this.error = "New username is invalid" 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/components/usernameupdate/usernameupdate.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { FormsModule } from '@angular/forms'; 4 | import { UserService } from '../../services/user-service/user.service'; 5 | import { UsernameUpdateRoutingModule } from './usernameupdate-routing.module' 6 | import { UsernameUpdateComponent } from './usernameupdate.component'; 7 | 8 | @NgModule({ 9 | declarations: [ 10 | UsernameUpdateComponent 11 | ], 12 | providers: [ 13 | UserService 14 | ], 15 | imports: [ 16 | CommonModule, 17 | FormsModule, 18 | UsernameUpdateRoutingModule 19 | ] 20 | }) 21 | 22 | export class UsernameUpdateModule { } 23 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/constants/role.constants.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Currently, this class is not doing anything. 3 | * This class is not connected to any component or service. 4 | * Note made 6/6/2018 5 | * Reviewed by Max 6 | */ 7 | export class RoleConstants { 8 | 9 | public static readonly ADMIN = {id: 1, name: 'Admin'}; 10 | public static readonly TRAINER = {id: 2, name: 'Trainer'}; 11 | public static readonly SALEDELIVERY = {id: 3, name: 'Sale-Delivery'}; 12 | public static readonly STAGING = {id: 4, name: 'Staging'}; 13 | public static readonly ASSOCIATE = {id: 5, name: 'Associate'}; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/constants/theme.constants.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * declares all the constants for the chart color schemes 3 | * 4 | * - This is used in batch-details.component, batch-list.component, client-list.component, 5 | * client-mapped.component, home.component, skillset.components 6 | * - This declares all the constants for the chart color schemes 7 | * Note made 6/6/2018 8 | * Reviewed by Max 9 | */ 10 | import {Color} from 'ng2-charts'; 11 | 12 | export class ThemeConstants { 13 | static MAPPED_COLORS: Array = [{ backgroundColor: ['#ff8d3f', '#514f4f'] }]; 14 | static CLIENT_COLORS: Array = [{ backgroundColor: ['#68a225', '#506d2f', '#324851', '#b3de81', '#7da3a1', '#a2c523', '#6e6702', '#2e4600', 15 | '1D2D0B', '161E0D', '#0E1417', '#313D24', '#232D2C', '#87A51C', '#569E88', '#DDE9AF', 16 | '#CAC7A3', '#B3BBA2','#D3DEAC', '#C1DBD3'] }]; 17 | static SKILL_COLORS: Array = [{ backgroundColor: ['#004d47', '#00cffa', '#52958b', '#008dcb', '#b2dbd5', '#6eb5c0', '#006c84', '#113743'] }]; 18 | static BATCH_COLORS: Array = [{ backgroundColor: ['#004d47', '#00cffa', '#52958b', '#008dcb', '#b2dbd5', '#6eb5c0', '#006c84', '#113743'] }]; 19 | static BAR_COLORS: Array = [{ backgroundColor: '#e85410'}, { backgroundColor: '#59504c' }]; 20 | static BATCH_DETAILS_COLORS: Array = [{ backgroundColor: '#ff8d3f' }, { backgroundColor: '#514f4f' }, { backgroundColor: 'black' }]; 21 | } 22 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/decorators/auto-unsubscribe.decorator.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Decorator for automatically unsubscribing from any and all observables (so that you don't need to bloat 3 | * your codebase by having instances of said observables floating around solely for the purpose of manually 4 | * unsubscribing!) 5 | * @param constructor 6 | * 7 | * - This automagical code obtained from https://netbasal.com/automagically-unsubscribe-in-angular-4487e9853a88 8 | * - There is also a github repository https://github.com/NetanelBasal/ngx-auto-unsubscribe 9 | * - It's possible to just npm install a dependency and get the same functionality 10 | * Note made on 6/6/2018 11 | */ 12 | 13 | // This automagical code obtained from https://netbasal.com/automagically-unsubscribe-in-angular-4487e9853a88 14 | export function AutoUnsubscribe( constructor ) { 15 | 16 | // make copy of the ngOnDestroy callback 17 | const original = constructor.prototype.ngOnDestroy; 18 | 19 | // upon destruction of the component... 20 | constructor.prototype.ngOnDestroy = function () { 21 | // ...iterate thru its properties... 22 | for ( const prop of this ) { 23 | const property = this[ prop ]; 24 | // if property exists and has-a unsubscribe... 25 | if ( property && (typeof property.unsubscribe === "function") ) { 26 | //...call it 27 | property.unsubscribe(); 28 | } 29 | } 30 | // if the callback we copied was function, we invoke it now with any arguments that were passed in 31 | // via constructor 32 | // tslint:disable-next-line:no-unused-expression 33 | original && typeof original === "function" && original.apply(this, arguments); 34 | }; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/directives/highlight-interview.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, Input, ElementRef, SimpleChanges } from '@angular/core'; 2 | 3 | @Directive({ 4 | selector: '[appHighlightInterview]' 5 | }) 6 | export class HighlightInterviewDirective { 7 | 8 | constructor(private el: ElementRef) { } 9 | 10 | @Input() appHighlightInterview = false; 11 | 12 | // tslint:disable-next-line:use-life-cycle-interface 13 | ngOnInit() { 14 | 15 | } 16 | 17 | // tslint:disable-next-line:use-life-cycle-interface 18 | ngOnChanges(changes: SimpleChanges){ 19 | if (this.appHighlightInterview){ 20 | this.el.nativeElement.style.backgroundColor = "#d9edf7"; 21 | } else { 22 | this.el.nativeElement.style.backgroundColor = ""; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/interceptors/invalidSessionReroute.interceptor.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Austin Molina 3 | * 4 | * @description Intercepts all HttpRequest and checks the response for an authorization error. 5 | * When a 401 is found, redirect to login or Invalid Session component 6 | * 7 | */ 8 | import { Injectable } from '@angular/core'; 9 | import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor, HttpErrorResponse } from '@angular/common/http'; 10 | import { Observable } from 'rxjs'; 11 | import { tap } from 'rxjs/operators'; 12 | import { Router } from '@angular/router'; 13 | 14 | 15 | @Injectable() 16 | export class InvalidSessionRerouteInterceptor implements HttpInterceptor { 17 | 18 | constructor(private router: Router) { } 19 | 20 | intercept(request: HttpRequest, next: HttpHandler, ): Observable> { 21 | 22 | return next.handle(request).pipe(tap((event: HttpEvent) => { 23 | //none 24 | }, (err: any) => { 25 | if (err instanceof HttpErrorResponse) { 26 | if (err.status === 401) { 27 | if (err.error["expirationtime"] < 15) { 28 | this.router.navigate(['/invalid-session']); 29 | } 30 | else { 31 | this.router.navigate(['/login']); 32 | } 33 | } 34 | } 35 | })); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/interceptors/jwt.interceptor.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Michael Tseng 3 | * 4 | * @description Intercepts all HttpRequest and appends the token into the header 5 | * for verification 6 | * Based on: http://jasonwatmore.com/post/2016/09/29/angular-2-user-registration-and-login-example-tutorial 7 | * 8 | */ 9 | import { Injectable } from '@angular/core'; 10 | import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http'; 11 | import { Observable } from 'rxjs'; 12 | import { User } from '../models/user.model'; 13 | import { LocalStorageUtils } from '../constants/local-storage'; 14 | 15 | @Injectable() 16 | export class JwtInterceptor implements HttpInterceptor { 17 | /** 18 | * 19 | *@param {HttpRequest} request 20 | *the HttpRequest intercepted 21 | * 22 | *@param {HttpHandler} next 23 | *the HttpHandler object that returns the desired HttpEvent observable 24 | * 25 | *@return the transformed HttpEvent observable 26 | * 27 | */ 28 | intercept(request: HttpRequest, next: HttpHandler): Observable> { 29 | const currentUser: User = JSON.parse(localStorage.getItem(LocalStorageUtils.CURRENT_USER_KEY)); 30 | if(currentUser && currentUser.token){ 31 | request = request.clone({ 32 | setHeaders: { 33 | Authorization: `${currentUser.token}` 34 | } 35 | }); 36 | } 37 | return next.handle(request); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/material.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { MatButtonModule } from '@angular/material'; 4 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 5 | 6 | @NgModule({ 7 | imports: [MatButtonModule, MatProgressSpinnerModule], 8 | exports: [MatButtonModule, MatProgressSpinnerModule], 9 | }) 10 | export class MaterialModule { } -------------------------------------------------------------------------------- /NGTrackForce/src/app/models/batch-location.model.ts: -------------------------------------------------------------------------------- 1 | import { Batch } from "./batch.model"; 2 | 3 | export class BatchLocation { 4 | id: number; 5 | name: string; 6 | batches: Batch[]; 7 | 8 | constructor( 9 | id: number, 10 | name: string, 11 | batches?: Batch[] 12 | ) { 13 | this.id = id; 14 | this.name = name; 15 | this.batches = batches; 16 | } 17 | } -------------------------------------------------------------------------------- /NGTrackForce/src/app/models/batch.model.ts: -------------------------------------------------------------------------------- 1 | import { Associate } from "./associate.model"; 2 | import { Trainer } from "./trainer.model"; 3 | import { BatchLocation } from "./batch-location.model"; 4 | import { Curriculum } from "./curriculum.model"; 5 | 6 | /** 7 | * 8 | * @author Princewill Ibe 9 | * 10 | * Holds data needed by front end for a batch 11 | */ 12 | export class Batch { 13 | salesforceId: string; 14 | id: number; 15 | batchName: string; 16 | curriculumName: Curriculum; 17 | location: BatchLocation; 18 | startDate: number; 19 | endDate: number; 20 | associates: Associate[] 21 | trainer: Trainer; 22 | coTrainer: Trainer[]; 23 | } 24 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/models/chart-scale.model.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * - This is used in the skillset.component 3 | * - The purpose of this model is to abstract the creation of the y-axis on the bar chart 4 | * Note made 6/6/2018 5 | * Reviewed by Max 6 | */ 7 | export class ChartScale { 8 | yAxes: { [k: string]: any }[] = [{ 9 | ticks: { 10 | min: 0 11 | } 12 | } 13 | ]; 14 | 15 | constructor() { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/models/client.model.ts: -------------------------------------------------------------------------------- 1 | import { Associate } from './associate.model'; 2 | import { Placement } from './placement.model'; 3 | import { Interview } from './interview.model'; 4 | import { StatusInfo } from './status-info.model'; 5 | 6 | /** 7 | * Model holding data relating to a client 8 | * @author Alex, Xavier 9 | */ 10 | export class Client { 11 | id: number; 12 | name: string; 13 | placement: Placement[]; 14 | associate: Associate[]; 15 | interview: Interview[]; 16 | stats?: StatusInfo; 17 | 18 | constructor( 19 | id: number, 20 | name: string, 21 | placement: Placement[], 22 | associate: Associate[], 23 | interview: Interview[], 24 | stats?: StatusInfo 25 | ) { 26 | this.id = id; 27 | this.name = name; 28 | this.placement = placement; 29 | this.associate = associate; 30 | this.stats = stats; 31 | this.interview = interview; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/models/curriculum.model.ts: -------------------------------------------------------------------------------- 1 | import { Batch } from "./batch.model"; 2 | 3 | /** 4 | * - This model is only used in the data-sync.service 5 | * - The data-sync.service class is never used 6 | * Note made 6/6/2018 7 | * Reviewed by Max 8 | */ 9 | export class Curriculum { 10 | id: number; 11 | name: string; 12 | batches: Batch[]; 13 | // Kirk: count is new. CurriculumJSON.java and CurriculumInfo have id and name 14 | // but only CurriculumJSON.java has count. 15 | // Cameron: commenting out because it doesn't appear in the Java entities 16 | //count: number; 17 | } 18 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/models/end-client.model.ts: -------------------------------------------------------------------------------- 1 | import { Associate } from "./associate.model"; 2 | import { Placement } from "./placement.model"; 3 | import { Interview } from "./interview.model"; 4 | 5 | 6 | export class EndClient { 7 | id: number; 8 | // Kirk: I assume name is referring to tfEndClientname within EndClientInfo.java. 9 | name: string; 10 | associates: Associate[]; 11 | placements: Placement[]; 12 | interviews: Interview[]; 13 | } 14 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/models/graph-counts.ts: -------------------------------------------------------------------------------- 1 | export class GraphCounts { 2 | id: number; 3 | name: string; 4 | count: number; 5 | 6 | 7 | constructor(id?: number, name?: string, count?: number) { 8 | this.id = id 9 | this.name = name 10 | this.count = count 11 | } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/models/interview-type.ts: -------------------------------------------------------------------------------- 1 | import { Interview } from "./interview.model"; 2 | 3 | export class InterviewType { 4 | id: number; 5 | name: string; 6 | interview: Interview[]; 7 | 8 | constructor( 9 | id: number, 10 | name: string, 11 | interview?: Interview[] 12 | ) { 13 | this.id = id; 14 | this.name = name; 15 | this.interview = interview; 16 | } 17 | 18 | } -------------------------------------------------------------------------------- /NGTrackForce/src/app/models/marketing-status.model.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Used in the data-sync.service 3 | * Note made 6/7/2018 4 | * Reviewed by Max 5 | */ 6 | import { Associate } from "./associate.model"; 7 | 8 | export class MarketingStatus { 9 | id: number; 10 | name: string; 11 | associates: Associate[]; 12 | 13 | constructor( 14 | id: number, 15 | name: string, 16 | associates?: Associate[] 17 | ) { 18 | this.id = id; 19 | this.name = name; 20 | this.associates = associates; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/models/placement.model.ts: -------------------------------------------------------------------------------- 1 | import { Associate } from "./associate.model"; 2 | import { Client } from "./client.model"; 3 | import { EndClient } from "./end-client.model"; 4 | 5 | /** 6 | * Used in the client and the end-client models 7 | * Note made 6/7/2018 8 | * Reviewed by Max 9 | */ 10 | export class Placement { 11 | id: number; 12 | associate: Associate; 13 | client: Client; 14 | endClient: EndClient; 15 | start: Date; 16 | end: Date; 17 | } 18 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/models/role.model.ts: -------------------------------------------------------------------------------- 1 | import { User } from "./user.model"; 2 | 3 | export class Role { 4 | id: number; 5 | name: string; 6 | users: User[]; 7 | } 8 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/models/status-info.model.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Used in the client model and the client-list component 3 | * Note made 6/7/2018 4 | * Reviewed by Max 5 | */ 6 | 7 | export class StatusInfo { 8 | name: string; 9 | trainingMapped: number; //1 10 | trainingUnmapped: number; //6 11 | reservedMapped: number; //2 12 | openUnmapped: number; //7 13 | selectedMapped: number; //3 14 | selectedUnmapped: number; //8 15 | confirmedMapped: number; //4 16 | confirmedUnmapped: number; //9 17 | deployedMapped: number; //5 18 | deployedUnmapped: number; //10 19 | constructor() { } 20 | } 21 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/models/trainer.model.ts: -------------------------------------------------------------------------------- 1 | import { User } from "./user.model"; 2 | import { Batch } from "./batch.model"; 3 | 4 | /** 5 | * Model information for trainer user. 6 | * @author Kirk 7 | * @since 6.18.6.12 8 | */ 9 | export class Trainer { 10 | id: number; 11 | user: User; 12 | firstName: string; 13 | lastName: string; 14 | primary: Batch[]; 15 | coTrainer: Batch[]; 16 | 17 | constructor ( 18 | firstName: string, 19 | lastName: string, 20 | user: User, 21 | id?: number, 22 | primary?: Batch[], 23 | coTrainer?: Batch[] 24 | ) { 25 | this.firstName = firstName; 26 | this.lastName = lastName; 27 | this.user = user; 28 | this.id = id; 29 | this.primary = primary; 30 | this.coTrainer = coTrainer; 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/models/user.model.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Model containing information about the current user 3 | * @author Leng 4 | * 5 | * This will need to change to reflect changes being made to the DB 6 | * (If changes are made to the DB) 7 | * Note made 6/7/2018 8 | */ 9 | export class User { 10 | id: number; 11 | username: string; 12 | password: string; 13 | role: number; 14 | token: string; 15 | isApproved: number; 16 | 17 | constructor( 18 | newUsername: string, 19 | newPassword: string, 20 | newRole: number, 21 | newIsApproved: number, 22 | newId?: number, 23 | newToken?: string 24 | ) { 25 | this.username = newUsername; 26 | this.password = newPassword; 27 | this.role = newRole; 28 | this.isApproved = newIsApproved; 29 | this.id = newId; 30 | this.token = newToken; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/models/userAndCreatorRoleContainer.mode.ts: -------------------------------------------------------------------------------- 1 | import { User } from './user.model'; 2 | 3 | export class UserAndCreatorRoleContainer{ 4 | user: User; 5 | creatorRole: number; 6 | 7 | constructor( 8 | newUser?: User, 9 | newCreatorRole?: number 10 | ){ 11 | this.user = newUser; 12 | this.creatorRole = newCreatorRole; 13 | } 14 | } -------------------------------------------------------------------------------- /NGTrackForce/src/app/pipes/associate-search-by-client-pipe/client-pipe.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from "@angular/core"; 2 | //import { CommonModule } from '@angular/common'; 3 | //import { AssociateSearchByClientPipe } from './client-pipe.pipe'; 4 | 5 | 6 | @NgModule({ 7 | declarations: [], 8 | providers: [], 9 | imports: [] 10 | }) 11 | export class AssociateSearchByClientPipeModule {} 12 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/pipes/associate-search-by-client-pipe/client-pipe.pipe.ts: -------------------------------------------------------------------------------- 1 | // import { Pipe, PipeTransform } from '@angular/core'; 2 | 3 | // @Pipe({ 4 | // name: 'pipeByClient' 5 | // }) 6 | 7 | // /** 8 | // * Pipe to filter searches based on select option of Client 9 | // * @author Cyril Mathew 10 | // */ 11 | // export class AssociateSearchByClientPipe implements PipeTransform { 12 | // transform(items: any[], searchText: string): any[] { 13 | 14 | // if (!items) { 15 | // return []; 16 | // } 17 | 18 | // if (!searchText) { 19 | // return items; 20 | // } 21 | 22 | // //return results that contain firstname, lastname, status, client, id that matches a client selection 23 | // return items.filter(associate => { 24 | // return ((associate.client != null)? associate.client.name === searchText: false); 25 | // }); 26 | // } 27 | // } 28 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/pipes/associate-search-by-status-pipe/status-pipe.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from "@angular/core"; 2 | //import { CommonModule } from '@angular/common'; 3 | //import { AssociateSearchByStatusPipe } from './status-pipe.pipe'; 4 | 5 | 6 | @NgModule({ 7 | declarations: [], 8 | providers: [], 9 | imports: [] 10 | }) 11 | export class AssociateSearchByStatusPipeModule {} 12 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/pipes/associate-search-by-status-pipe/status-pipe.pipe.ts: -------------------------------------------------------------------------------- 1 | // import { Pipe, PipeTransform } from '@angular/core'; 2 | 3 | // @Pipe({ 4 | // name: 'pipeByStatus' 5 | // }) 6 | 7 | // /** 8 | // * Pipe to filter searches based on select option of Marketing Status 9 | // * @author Cyril Mathew 10 | // */ 11 | // export class AssociateSearchByStatusPipe implements PipeTransform { 12 | // transform(items: any[], searchText: string): any[] { 13 | 14 | // if (!items) { 15 | // return []; 16 | // } 17 | 18 | // if (!searchText) { 19 | // return items; 20 | // } 21 | 22 | // //return results that contain firstname, lastname, status, client, id that matches a marketing status selection 23 | // return items.filter(associate => { 24 | // return ((associate.marketingStatus != null)? associate.marketingStatus.name === searchText: false); 25 | // }); 26 | // } 27 | // } 28 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/pipes/associate-search-by-text-filter/associate-search-by-text-filter.pipes.ts: -------------------------------------------------------------------------------- 1 | // import { Pipe, PipeTransform } from '@angular/core'; 2 | 3 | // @Pipe({ 4 | // name: 'filterByText' 5 | // }) 6 | 7 | // /** 8 | // * Pipe to filter searches based on user input 9 | // * @author Alex, Xavier 10 | // */ 11 | // export class AssociateSearchByTextFilter implements PipeTransform { 12 | // transform(items: any[], searchText: string): any[] { 13 | 14 | // if (!items) { 15 | // return []; 16 | // } 17 | 18 | // if (!searchText) { 19 | // return items; 20 | // } 21 | 22 | // searchText = searchText.toLowerCase(); 23 | 24 | // let firstName:string; 25 | // let lastName:string; 26 | // //return results that contain firstname, lastname, status, client, id 27 | // return items.filter(associate => { 28 | // associate.firstName != null? firstName = associate.firstName : false; 29 | // associate.lastName != null? lastName = associate.lastName: false ; 30 | // return (firstName+ " " +lastName).toLowerCase().includes(searchText); 31 | // }); 32 | // } 33 | // } 34 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/pipes/associate-search-by-text-filter/text-filter.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from "@angular/core"; 2 | //import { CommonModule } from '@angular/common'; 3 | //import { AssociateSearchByTextFilter } from './associate-search-by-text-filter.pipes'; 4 | 5 | 6 | @NgModule({ 7 | declarations: [], 8 | providers: [], 9 | imports: [] 10 | }) 11 | export class AssociateSearchByTextFilterModule {} 12 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/pipes/search-filter/search-filter.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from "@angular/core"; 2 | //import { CommonModule } from '@angular/common'; 3 | import { SearchFilterPipe } from './search-filter.pipe'; 4 | 5 | @NgModule({ 6 | declarations: [ 7 | //CommonModule, 8 | SearchFilterPipe 9 | ], 10 | providers: [ 11 | 12 | ], 13 | exports: [ 14 | SearchFilterPipe 15 | ] 16 | }) 17 | export class SearchFilterPipeModule {} -------------------------------------------------------------------------------- /NGTrackForce/src/app/pipes/search-filter/search-filter.pipe.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | /** 3 | * @author Han Jung 4 | * @description Filters out array of strings based on search criteria 5 | */ 6 | @Pipe({ 7 | name: 'searchFilter' 8 | }) 9 | export class SearchFilterPipe implements PipeTransform { 10 | /** 11 | *Custom pipes need to implement the tranform function 12 | * 13 | *@param {any[]} items 14 | *array of strings to be filtered 15 | * 16 | *@param {string} searchText 17 | *the text to be searched against 18 | * 19 | *@return the filtered items 20 | */ 21 | transform(items: any[], searchText: string): any[] { 22 | if (!items) { 23 | return []; 24 | } if (!searchText) { 25 | return items; 26 | } 27 | searchText = searchText.toLowerCase(); 28 | return items.filter(it => { 29 | return it.toLowerCase().includes(searchText); 30 | }); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/services/associate-service/associate.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { AssociateService } from "./associate.service"; 2 | import { TestBed, inject } from '@angular/core/testing'; 3 | import { HttpClientTestingModule } from '@angular/common/http/testing'; 4 | 5 | describe("AssociateService", () => { 6 | 7 | beforeEach(() => { 8 | TestBed.configureTestingModule({ 9 | imports: [ 10 | HttpClientTestingModule, 11 | ], 12 | providers: [ 13 | AssociateService 14 | ] 15 | }); 16 | }); 17 | 18 | it("should be instantiated", inject([AssociateService], (service: AssociateService) => { 19 | expect(service).toBeTruthy(); 20 | }) 21 | ); 22 | 23 | it("should successfully fetch associate data", inject([AssociateService], (service: AssociateService) => { 24 | service.getAssociateByUserId(5).subscribe( 25 | data => { 26 | expect(data).toBeTruthy(); 27 | console.log(data); 28 | //expect(data.id).toBeTruthy(); 29 | //expect(data.marketingStatus).toBeTruthy(); 30 | }, 31 | error => { 32 | console.log('getAssociateByUserId FAILED'); 33 | } 34 | ); 35 | })); 36 | 37 | }); -------------------------------------------------------------------------------- /NGTrackForce/src/app/services/batch-service/batch.service.spec.ts: -------------------------------------------------------------------------------- 1 | import {TestBed, inject} from '@angular/core/testing'; 2 | import {BatchService} from './batch.service'; 3 | import {HttpClientTestingModule} from '@angular/common/http/testing'; 4 | import {Batch} from '../../models/batch.model'; 5 | import { of } from 'rxjs/observable/of'; 6 | 7 | describe('BatchService', () => { 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({ 10 | imports: [ 11 | HttpClientTestingModule 12 | ], 13 | providers: [ 14 | BatchService 15 | ] 16 | }); 17 | }); 18 | 19 | it('should be created', inject([BatchService], (service: BatchService) => { 20 | expect(service).toBeTruthy(); 21 | })); 22 | 23 | 24 | it('should hit right endpoint', inject([BatchService], (service: BatchService) => { 25 | const batches: Batch[] = []; 26 | spyOn(service, 'getBatchesByDate').and.returnValue(of(batches)) 27 | 28 | service.getBatchesByDate(new Date(), new Date()).subscribe( 29 | data => 30 | error => console.error('Error in batch.service.spec.ts: ', error.message) 31 | ) 32 | 33 | expect(batches).toBeTruthy(); 34 | expect(batches.length).toEqual(0); 35 | })); 36 | }); 37 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/services/client-service/client.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { ClientService } from './client.service'; 4 | import { HttpClientTestingModule } from '@angular/common/http/testing'; 5 | 6 | describe('ClientService', () => { 7 | beforeEach(() => { 8 | TestBed.configureTestingModule({ 9 | imports: [ 10 | HttpClientTestingModule 11 | ], 12 | providers: [ClientService] 13 | }); 14 | }); 15 | 16 | it('should be created', inject([ClientService], (service: ClientService) => { 17 | expect(service).toBeTruthy(); 18 | })); 19 | 20 | it('should grab values for all clients', inject([ClientService], (service: ClientService) => { 21 | expect(service.getAllClients()).toBeTruthy(); 22 | })); 23 | // it('should grab value by client ID', inject([ClientService], (service: ClientService) => { 24 | // expect(service.getOneClient(1)).toBeTruthy(); 25 | // expect(service.getOneClient(2)).toBeTruthy(); 26 | // expect(service.getOneClient(3)).toBeTruthy(); 27 | // })); 28 | }); 29 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/services/curriculum-service/curriculum-service.spec.ts: -------------------------------------------------------------------------------- 1 | import { MockAssociateService } from './../../components/associate-view/associate-view.component.spec'; 2 | import { TestBed, inject, getTestBed, async, ComponentFixture } from "@angular/core/testing"; 3 | import { CurriculumService } from "./curriculum.service"; 4 | import { HttpClientTestingModule } from "@angular/common/http/testing"; 5 | import { Observable } from 'rxjs'; 6 | 7 | describe('CurriculumService Test Suite', () => { 8 | let service:CurriculumService; 9 | let mockAssociateService = new MockAssociateService(null); 10 | let spy; 11 | 12 | beforeEach(async(() => { 13 | TestBed.configureTestingModule({ 14 | providers: [CurriculumService], 15 | imports: [ 16 | HttpClientTestingModule 17 | ] 18 | }).compileComponents(); 19 | })); 20 | 21 | beforeEach(inject([CurriculumService], (theService: CurriculumService) =>{ 22 | service = theService; 23 | })); 24 | 25 | it('should be created', () => { 26 | expect(service).toBeTruthy(); 27 | }); 28 | 29 | //Must change this test so that it mocks the HttpClient instead of just returning mock data of my choice, which defeats the purpose 30 | //of testing this service. 31 | it('should return data for specified skillset id', () => { 32 | spy = spyOn(service, 'getSkillsetsForStatusID').and.returnValue(Observable.of(mockAssociateService.mockData)); 33 | let holder = service.getSkillsetsForStatusID(1); 34 | expect(holder).toBeTruthy(); 35 | }); 36 | }); 37 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/services/datasync-service/data-sync.service.spec.ts: -------------------------------------------------------------------------------- 1 | // import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | // import { DataSyncService } from './data-sync.service'; 4 | 5 | // describe('DataSyncService', () => { 6 | // beforeEach(() => { 7 | // TestBed.configureTestingModule({ 8 | // providers: [DataSyncService] 9 | // }); 10 | // }); 11 | 12 | // it('should be created', inject([DataSyncService], (service: DataSyncService) => { 13 | // expect(service).toBeTruthy(); 14 | // })); 15 | // }); 16 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/services/date-service/date.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { DateService } from './date.service'; 4 | 5 | describe('DateService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [DateService] 9 | }); 10 | }); 11 | 12 | it('should be created', inject([DateService], (service: DateService) => { 13 | expect(service).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/services/date-service/date.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { BehaviorSubject } from 'rxjs'; 3 | 4 | @Injectable({ 5 | providedIn: 'root' 6 | }) 7 | export class DateService { 8 | 9 | private dateStartSource = new BehaviorSubject(new Date); 10 | private dateEndSource = new BehaviorSubject(new Date); 11 | currStartDate = this.dateStartSource.asObservable(); 12 | currEndDate = this.dateEndSource.asObservable(); 13 | 14 | constructor() { } 15 | 16 | changeDates(startDate: Date, endDate: Date){ 17 | this.dateStartSource.next(startDate); 18 | this.dateEndSource.next(endDate); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/services/interview-service/interview.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing';import { InterviewService } from './interview.service'; 2 | // added imports; DK 3 | import { HttpClientTestingModule } from '@angular/common/http/testing'; 4 | 5 | describe('InterviewService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [InterviewService], 9 | imports: [ HttpClientTestingModule ] 10 | }); 11 | }); 12 | 13 | it('should be created', inject([InterviewService], (service: InterviewService) => { 14 | expect(service).toBeTruthy(); 15 | })); 16 | }); 17 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/services/navbar-service/navbar.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { NavbarService } from './navbar.service'; 4 | 5 | describe('NavbarService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [NavbarService] 9 | }); 10 | }); 11 | 12 | it('should be created', inject([NavbarService], (service: NavbarService) => { 13 | expect(service).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/services/navbar-service/navbar.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | @Injectable({ 4 | providedIn: 'root' 5 | }) 6 | export class NavbarService { 7 | 8 | visible: boolean; 9 | 10 | constructor() { this.visible = true; } 11 | 12 | show(){ 13 | this.visible = true; 14 | } 15 | 16 | hide(){ 17 | this.visible = false; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/services/request-service/request.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | import { HttpClientTestingModule } from '@angular/common/http/testing'; 3 | import { RequestService } from '../../services/request-service/request.service'; 4 | 5 | describe('RequestService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [RequestService], 9 | imports: [ HttpClientTestingModule ] 10 | }); 11 | }); 12 | 13 | it('should be created', inject([RequestService], (service: RequestService) => { 14 | expect(service).toBeTruthy(); 15 | })); 16 | }); 17 | -------------------------------------------------------------------------------- /NGTrackForce/src/app/services/request-service/request.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { HttpClient } from '@angular/common/http'; 3 | import { Observable } from 'rxjs'; 4 | import { environment } from '../../../environments/environment'; 5 | import { User } from '../../models/user.model'; 6 | 7 | /** 8 | *Service for handling data from the back-end 9 | *i.e. login data, client data, and etc 10 | */ 11 | @Injectable() 12 | export class RequestService { 13 | 14 | host: string = environment.url; 15 | trackPath: string = this.host + 'TrackForce/'; 16 | 17 | /** 18 | *@param {HttpClient} http 19 | *Need to create a connection to REST endpoint 20 | *And initiate Http requests 21 | */ 22 | constructor(private http: HttpClient) { } 23 | 24 | public populateDB(): Observable { 25 | return this.http.get(this.trackPath + 'database/populateDB'); 26 | } 27 | 28 | public populateDBSF(): Observable { 29 | return this.http.get(this.trackPath + 'database/populateDBSF'); 30 | } 31 | 32 | public deleteDB(): Observable { 33 | return this.http.delete(this.trackPath + 'database/deleteFromDB'); 34 | } 35 | 36 | public getStatuses(): Observable { 37 | return this.http.get(this.trackPath + 'marketing'); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /NGTrackForce/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/.gitkeep -------------------------------------------------------------------------------- /NGTrackForce/src/assets/23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/23.jpg -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/android-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/android-icon-144x144.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/android-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/android-icon-192x192.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/android-icon-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/android-icon-36x36.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/android-icon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/android-icon-48x48.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/android-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/android-icon-72x72.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/android-icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/android-icon-96x96.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/apple-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/apple-icon-114x114.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/apple-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/apple-icon-120x120.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/apple-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/apple-icon-144x144.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/apple-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/apple-icon-152x152.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/apple-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/apple-icon-180x180.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/apple-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/apple-icon-57x57.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/apple-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/apple-icon-60x60.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/apple-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/apple-icon-72x72.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/apple-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/apple-icon-76x76.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/apple-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/apple-icon-precomposed.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/apple-icon.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | #ffffff -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/favicon-96x96.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/favicon.ico -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "App", 3 | "icons": [ 4 | { 5 | "src": "\/android-icon-36x36.png", 6 | "sizes": "36x36", 7 | "type": "image\/png", 8 | "density": "0.75" 9 | }, 10 | { 11 | "src": "\/android-icon-48x48.png", 12 | "sizes": "48x48", 13 | "type": "image\/png", 14 | "density": "1.0" 15 | }, 16 | { 17 | "src": "\/android-icon-72x72.png", 18 | "sizes": "72x72", 19 | "type": "image\/png", 20 | "density": "1.5" 21 | }, 22 | { 23 | "src": "\/android-icon-96x96.png", 24 | "sizes": "96x96", 25 | "type": "image\/png", 26 | "density": "2.0" 27 | }, 28 | { 29 | "src": "\/android-icon-144x144.png", 30 | "sizes": "144x144", 31 | "type": "image\/png", 32 | "density": "3.0" 33 | }, 34 | { 35 | "src": "\/android-icon-192x192.png", 36 | "sizes": "192x192", 37 | "type": "image\/png", 38 | "density": "4.0" 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/ms-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/ms-icon-144x144.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/ms-icon-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/ms-icon-150x150.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/ms-icon-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/ms-icon-310x310.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/favicon/ms-icon-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/favicon/ms-icon-70x70.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/load_circle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/load_circle.gif -------------------------------------------------------------------------------- /NGTrackForce/src/assets/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/loading.gif -------------------------------------------------------------------------------- /NGTrackForce/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/logo.png -------------------------------------------------------------------------------- /NGTrackForce/src/assets/rev-footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/assets/rev-footer.png -------------------------------------------------------------------------------- /NGTrackForce/src/environments/environment.jenkins.ts: -------------------------------------------------------------------------------- 1 | //This environment variable ensures that with each build running the ngtrackforce_test_deploy.sh will 2 | //be routed to the correct URL and not break users developing on localhost 3 | 4 | 5 | export const environment = { 6 | production: false, 7 | //url: "http://54.166.255.85:8085/" 8 | url: "http://3.84.1.206:8086/" 9 | }; 10 | 11 | export const ngEnvironment = { 12 | production: false, 13 | url: "http://trackforce.revaturelabs.com/" 14 | }; 15 | -------------------------------------------------------------------------------- /NGTrackForce/src/environments/environment.local.ts: -------------------------------------------------------------------------------- 1 | // This file will be used instead of environment.ts when you use the 2 | // command: ng serve --configuration=local 3 | // This is intended to be used when testing the application and both the frontend+backend are running 4 | // on the local machine. 5 | 6 | // export const environment = { 7 | // production: false, 8 | // url: "http://localhost:8085/" 9 | // }; 10 | 11 | export const environment = { 12 | production: false, 13 | // url: "http://localhost:8080/" 14 | url: "http://3.84.1.206:8086/" 15 | }; 16 | 17 | export const ngEnvironment = { 18 | production: false, 19 | url: "http://localhost:4200/" 20 | }; 21 | -------------------------------------------------------------------------------- /NGTrackForce/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | url: "http://3.84.1.206:8086/" 4 | }; 5 | 6 | export const ngEnvironment = { 7 | production: true, 8 | url: "http://trackforce.revaturelabs.com/" 9 | }; 10 | 11 | -------------------------------------------------------------------------------- /NGTrackForce/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | 7 | export const environment = { 8 | production: true, 9 | url: "http://3.84.1.206:8086/" 10 | }; 11 | 12 | export const ngEnvironment = { 13 | production: true, 14 | url: "http://trackforce.revaturelabs.com/" 15 | }; 16 | -------------------------------------------------------------------------------- /NGTrackForce/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/NGTrackForce/src/favicon.ico -------------------------------------------------------------------------------- /NGTrackForce/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | TrackForce 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 25 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /NGTrackForce/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | import 'hammerjs'; 8 | 9 | if (environment.production) { 10 | enableProdMode(); 11 | } 12 | 13 | platformBrowserDynamic().bootstrapModule(AppModule) 14 | .catch( 15 | err => {} 16 | ); 17 | -------------------------------------------------------------------------------- /NGTrackForce/src/styles.css: -------------------------------------------------------------------------------- 1 | @import "~ng-pick-datetime/assets/style/picker.min.css"; /* This is required for the date time picker */ 2 | 3 | body { 4 | background-color: #f8f9fa!important; 5 | background-size: cover; 6 | } 7 | 8 | #clientList { 9 | margin-top: 20px; 10 | } 11 | 12 | .custom-btn { 13 | margin-bottom: 20px; 14 | background-color: #f5f5f5; 15 | } 16 | 17 | li { 18 | padding: 5px; 19 | margin-top: 0px; 20 | } 21 | ul { 22 | margin: auto; 23 | margin-top: 0px; 24 | padding: 0; 25 | list-style-type: none; 26 | } 27 | 28 | .well { 29 | padding-top: 0px; 30 | } 31 | 32 | li > a { 33 | color: #757575; 34 | } 35 | 36 | li > a:hover { 37 | color: #121212; 38 | } 39 | -------------------------------------------------------------------------------- /NGTrackForce/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/long-stack-trace-zone'; 4 | import 'zone.js/dist/proxy.js'; 5 | import 'zone.js/dist/sync-test'; 6 | import 'zone.js/dist/jasmine-patch'; 7 | import 'zone.js/dist/async-test'; 8 | import 'zone.js/dist/fake-async-test'; 9 | import { getTestBed } from '@angular/core/testing'; 10 | import { 11 | BrowserDynamicTestingModule, 12 | platformBrowserDynamicTesting 13 | } from '@angular/platform-browser-dynamic/testing'; 14 | 15 | // Unfortunately there's no typing for the `__karma__` variable. Just declare it as any. 16 | declare const __karma__: any; 17 | declare const require: any; 18 | 19 | // Prevent Karma from running prematurely. 20 | __karma__.loaded = function () {}; 21 | 22 | // First, initialize the Angular testing environment. 23 | getTestBed().initTestEnvironment( 24 | BrowserDynamicTestingModule, 25 | platformBrowserDynamicTesting() 26 | ); 27 | 28 | // Then we find all the tests. 29 | const context = require.context('./', true, /\.spec\.ts$/); 30 | // Run all component tests which start with a-? 31 | // const context = require.context('./', true, /components\/[a-m](.)*.component.spec\.ts$/); 32 | 33 | // And load the modules. 34 | context.keys().map(context); 35 | // Finally, start Karma to run the tests. 36 | __karma__.start(); 37 | -------------------------------------------------------------------------------- /NGTrackForce/src/theme.scss: -------------------------------------------------------------------------------- 1 | @import '~@angular/material/theming'; 2 | @include mat-core(); 3 | 4 | $trackforce-app-primary: mat-palette($mat-deep-orange); 5 | $trackforce-app-accent: mat-palette($mat-grey, 500, 900, A100); 6 | $trackforce-app-warn: mat-palette($mat-red); 7 | 8 | $trackforce-app-theme: mat-light-theme($trackforce-app-primary, $trackforce-app-accent, $trackforce-app-warn); 9 | 10 | @include angular-material-theme($trackforce-app-theme); -------------------------------------------------------------------------------- /NGTrackForce/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "baseUrl": "./", 6 | "module": "es2015", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /NGTrackForce/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "baseUrl": "./", 6 | "module": "commonjs", 7 | "target": "es5", 8 | "types": [ 9 | "jasmine", 10 | "node" 11 | ] 12 | }, 13 | "files": [ 14 | "test.ts", 15 | "polyfills.ts" 16 | ], 17 | "include": [ 18 | "**/*.spec.ts", 19 | "**/*.d.ts" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /NGTrackForce/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /NGTrackForce/topsecretdocs.txt: -------------------------------------------------------------------------------- 1 | top secret documentation: https://gph.is/1eso0XI -------------------------------------------------------------------------------- /NGTrackForce/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "importHelpers": true, 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2017", 17 | "dom" 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Production1804.txt: -------------------------------------------------------------------------------- 1 | start of the fifth sprint by 1804 2 | Branch for Dev 3 | Hibernate Branch -------------------------------------------------------------------------------- /TrackForce/.gitignore: -------------------------------------------------------------------------------- 1 | /.metadata/ 2 | 3 | # maven 4 | target 5 | 6 | # IDE - Intellij 7 | *.iml 8 | /.idea/ 9 | -------------------------------------------------------------------------------- /TrackForce/drivers/chromedriver.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/TrackForce/drivers/chromedriver.exe -------------------------------------------------------------------------------- /TrackForce/drivers/geckodriver.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/TrackForce/drivers/geckodriver.exe -------------------------------------------------------------------------------- /TrackForce/nb-configuration.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 17 | ide 18 | 19 | 20 | -------------------------------------------------------------------------------- /TrackForce/src/main/java/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/application/GenerateData.java: -------------------------------------------------------------------------------- 1 | package com.revature.application; 2 | import java.util.Random; 3 | import java.util.concurrent.ThreadLocalRandom; 4 | 5 | /** @author Adam L. 6 | *

Class for generating random primitives

7 | *

Could be used for quickly populating database with dummy data

8 | * @version v6.18.06.13 */ 9 | public class GenerateData { 10 | private static Random rnd = new Random(); 11 | public static String getRandomString() { 12 | String SALTCHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; 13 | StringBuilder salt = new StringBuilder(); 14 | 15 | while (salt.length() < 15) { 16 | int index = (rnd.nextInt(SALTCHARS.length())); 17 | salt.append(SALTCHARS.charAt(index)); 18 | } 19 | return salt.toString(); 20 | } 21 | 22 | public static int getRandomInt(int min, int max) { 23 | return ThreadLocalRandom.current().nextInt(min, max + 1); 24 | } 25 | } -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/criteria/GraphedCriteriaResult.java: -------------------------------------------------------------------------------- 1 | package com.revature.criteria; 2 | 3 | public class GraphedCriteriaResult { 4 | private long count; 5 | private int id; 6 | private String name; 7 | 8 | public GraphedCriteriaResult() { 9 | } 10 | 11 | public GraphedCriteriaResult(long count, int id, String name) { 12 | this.count = count; 13 | this.id = id; 14 | this.name = name; 15 | } 16 | 17 | public long getCount() { 18 | 19 | return count; 20 | } 21 | 22 | public void setCount(long count) { 23 | this.count = count; 24 | } 25 | 26 | public int getId() { 27 | return id; 28 | } 29 | 30 | public void setId(int id) { 31 | this.id = id; 32 | } 33 | 34 | public String getName() { 35 | return name; 36 | } 37 | 38 | public void setName(String name) { 39 | this.name = name; 40 | } 41 | } -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/dao/AssociateDao.java: -------------------------------------------------------------------------------- 1 | package com.revature.dao; 2 | import java.util.HashMap; 3 | import java.util.List; 4 | import com.revature.criteria.GraphedCriteriaResult; 5 | import com.revature.entity.TfAssociate; 6 | 7 | public interface AssociateDao { 8 | TfAssociate getAssociate(Integer associateid); 9 | 10 | List getNAssociateMatchingCriteria(int startIdx, int numRes, int mktStatus, int clientId, String sortText, String firstName, String lastName); 11 | 12 | List getAllAssociates(); 13 | 14 | List getNAssociates(); 15 | 16 | HashMap getStatusCountsMap(); 17 | 18 | boolean updateAssociatePartial(TfAssociate associate); 19 | 20 | boolean approveAssociate(int associateId); 21 | 22 | boolean approveAssociates(List associateIds); 23 | 24 | boolean createAssociate(TfAssociate newassociate); 25 | 26 | TfAssociate getAssociateByUserId(int id); 27 | 28 | List getMapped(int id); 29 | 30 | List getUndeployed(String s); 31 | 32 | boolean updateAssociate(TfAssociate associate); 33 | 34 | boolean updateAssociates(List associate); 35 | 36 | long countMappedAssociatesByValue(String column, String value, int mappedStatus); 37 | 38 | public void deleteAssociate(TfAssociate associate); 39 | 40 | public void deleteOldAssociateProcedure(); 41 | } 42 | -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/dao/BatchDao.java: -------------------------------------------------------------------------------- 1 | package com.revature.dao; 2 | import java.sql.Timestamp; 3 | import java.util.List; 4 | import com.revature.entity.TfBatch; 5 | 6 | /** Accesses various information for the batches. */ 7 | public interface BatchDao { 8 | TfBatch getBatch(String batchName); 9 | 10 | TfBatch getBatchById(Integer id); 11 | 12 | TfBatch getBatchBySalesforceId(String sfId); 13 | 14 | List getAllBatches(); 15 | 16 | List getBatchesForPredictions(String name, Timestamp startDate, Timestamp endDate); 17 | 18 | Object getBatchCountsForPredictions(String name, Timestamp startDate, Timestamp endDate); 19 | 20 | boolean createBatch(TfBatch newbatch); 21 | } -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/dao/ClientDao.java: -------------------------------------------------------------------------------- 1 | package com.revature.dao; 2 | import java.util.List; 3 | import com.revature.entity.TfClient; 4 | import com.revature.entity.TfEndClient; 5 | 6 | public interface ClientDao { 7 | List getAllTfClients(); 8 | 9 | List getFirstFiftyTfClients(); 10 | 11 | TfClient getClient(String name); 12 | 13 | TfClient getClient(Integer id); 14 | 15 | TfEndClient getEndClient(int id); 16 | 17 | List getAllTfClients(String[] columns); 18 | 19 | List getAllClientsWithMappedAssociates(); 20 | } -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/dao/CurriculumDao.java: -------------------------------------------------------------------------------- 1 | package com.revature.dao; 2 | import java.util.List; 3 | import com.revature.criteria.GraphedCriteriaResult; 4 | import com.revature.entity.TfCurriculum; 5 | 6 | public interface CurriculumDao { 7 | List getAllCurriculums(); 8 | 9 | List getUnmapped(int id); 10 | } 11 | -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/dao/InterviewDao.java: -------------------------------------------------------------------------------- 1 | package com.revature.dao; 2 | import java.util.List; 3 | import com.revature.entity.TfInterview; 4 | 5 | public interface InterviewDao { 6 | List getInterviewsByAssociate(int associateId); 7 | 8 | List getAllInterviews(); 9 | 10 | boolean createInterview(TfInterview interview); 11 | 12 | boolean updateInterview( TfInterview interview); 13 | 14 | TfInterview getInterviewById(Integer interviewId); 15 | } -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/dao/MarketingStatusDao.java: -------------------------------------------------------------------------------- 1 | package com.revature.dao; 2 | import java.util.List; 3 | import com.revature.entity.TfMarketingStatus; 4 | 5 | public interface MarketingStatusDao { 6 | List getAllMarketingStatuses(); 7 | 8 | TfMarketingStatus getMarketingStatusById(int id); 9 | } -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/dao/TrainerDao.java: -------------------------------------------------------------------------------- 1 | package com.revature.dao; 2 | import java.util.List; 3 | import com.revature.entity.TfTrainer; 4 | 5 | public interface TrainerDao { 6 | TfTrainer getTrainer(int id); 7 | 8 | List getAllTrainers(); 9 | 10 | boolean createTrainer(TfTrainer trainer); 11 | 12 | boolean updateTrainer(TfTrainer trainer); 13 | 14 | TfTrainer getTrainerByUserId(int id); 15 | } -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/dao/UserDao.java: -------------------------------------------------------------------------------- 1 | package com.revature.dao; 2 | import java.util.List; 3 | import com.revature.entity.TfRole; 4 | import com.revature.entity.TfUser; 5 | 6 | public interface UserDao { 7 | TfUser getUser(String username); 8 | 9 | List getAllUsers(); 10 | 11 | boolean insertUser(TfUser newUser); 12 | 13 | TfRole getRole(int roleId); 14 | 15 | boolean updateUser(TfUser user); 16 | 17 | public void deleteUser(TfUser user); 18 | 19 | TfUser getUser(Integer id); 20 | 21 | boolean updateUserPass(TfUser user, String updatePass); 22 | 23 | boolean updateUsername(TfUser user, String updateName); 24 | } -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/daoimpl/MarketingStatusDaoImpl.java: -------------------------------------------------------------------------------- 1 | package com.revature.daoimpl; 2 | import java.util.List; 3 | import org.hibernate.Session; 4 | import com.revature.dao.MarketingStatusDao; 5 | import com.revature.entity.TfMarketingStatus; 6 | import com.revature.utils.HibernateUtil; 7 | import com.revature.utils.LogUtil; 8 | 9 | public class MarketingStatusDaoImpl implements MarketingStatusDao { 10 | 11 | @Override 12 | public List getAllMarketingStatuses() { 13 | LogUtil.logger.trace("Hibernate Call to get ALL Marketing Statuses."); 14 | return HibernateUtil.runHibernate((Session session, Object ... args) -> 15 | session.createQuery("from TfMarketingStatus", TfMarketingStatus.class).setCacheable(true).getResultList()); 16 | } 17 | 18 | /* 19 | "MAPPED: TRAINING": 1, 20 | "MAPPED: RESERVED": 2, 21 | "MAPPED: SELECTED": 3, 22 | "MAPPED: CONFIRMED": 4, 23 | "MAPPED: DEPLOYED": 5, 24 | "UNMAPPED: TRAINING": 6, 25 | "UNMAPPED: OPEN": 7, 26 | "UNMAPPED: SELECTED": 8, 27 | "UNMAPPED: CONFIRMED": 9, 28 | "UNMAPPED: DEPLOYED": 10, 29 | "DIRECTLY PLACED": 11, 30 | "TERMINATED": 12 31 | */ 32 | @Override 33 | public TfMarketingStatus getMarketingStatusById(int id) { 34 | LogUtil.logger.trace("Hibernate Call to get Marketing Status by Id: " + id); 35 | return HibernateUtil.runHibernate((Session session, Object... args) -> 36 | session.createQuery("from TfMarketingStatus c where c.id like :id", TfMarketingStatus.class).setCacheable(true) 37 | .setParameter("id", id).getSingleResult()); 38 | } 39 | } -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/entity/TfPasswordResetContainer.java: -------------------------------------------------------------------------------- 1 | package com.revature.entity; 2 | 3 | import java.io.Serializable; 4 | 5 | import javax.xml.bind.annotation.XmlElement; 6 | import javax.xml.bind.annotation.XmlRootElement; 7 | 8 | 9 | /** 10 | * @author tbnil from batch 1901 11 | * As of writing this, this entity is not used. It is intended to be used to send back password 12 | * reset information when an admin resets another user's password to a random string. 13 | * 14 | */ 15 | @XmlRootElement 16 | public class TfPasswordResetContainer implements Serializable { 17 | private static final long serialVersionUID = -6436922296724471174L; 18 | @XmlElement 19 | private String message; 20 | @XmlElement 21 | private String password; 22 | 23 | public String getPassword() { 24 | return password; 25 | } 26 | 27 | public void setPassword(String password) { 28 | this.password = password; 29 | } 30 | 31 | public String getMessage() { 32 | return message; 33 | } 34 | 35 | public void setMessage(String message) { 36 | this.message = message; 37 | } 38 | 39 | @Override 40 | public String toString() { 41 | return "TfPasswordResetContainer [message=" + message + ", password=" + password + "]"; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/entity/TfUserAndCreatorRoleContainer.java: -------------------------------------------------------------------------------- 1 | package com.revature.entity; 2 | import java.io.Serializable; 3 | import javax.xml.bind.annotation.XmlElement; 4 | import javax.xml.bind.annotation.XmlRootElement; 5 | 6 | @XmlRootElement 7 | public class TfUserAndCreatorRoleContainer implements Serializable { 8 | private static final long serialVersionUID = -6436922296724471174L; 9 | @XmlElement 10 | private TfUser user; 11 | @XmlElement 12 | private int creatorRole; 13 | 14 | public TfUserAndCreatorRoleContainer(TfUser user, int creatorRole) { 15 | super(); 16 | this.user = user; 17 | this.creatorRole = creatorRole; 18 | } 19 | public TfUserAndCreatorRoleContainer() { 20 | super(); 21 | } 22 | 23 | public TfUser getUser() { 24 | return user; 25 | } 26 | public void setUser(TfUser user) { 27 | this.user = user; 28 | } 29 | 30 | public int getCreatorRole() { 31 | return creatorRole; 32 | } 33 | public void setCreatorRole(int creatorRole) { 34 | this.creatorRole = creatorRole; 35 | } 36 | 37 | @Override 38 | public String toString() { 39 | return "TfUserAndCreatorRoleContainer [user=" + user + ", creatorRole=" + creatorRole + "]"; 40 | } 41 | } -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/resources/InitResource.java: -------------------------------------------------------------------------------- 1 | package com.revature.resources; 2 | 3 | import javax.ws.rs.Consumes; 4 | import javax.ws.rs.GET; 5 | import javax.ws.rs.Path; 6 | import javax.ws.rs.Produces; 7 | import javax.ws.rs.core.MediaType; 8 | import javax.ws.rs.core.Response; 9 | import javax.ws.rs.core.Response.Status; 10 | 11 | import static com.revature.utils.LogUtil.logger; 12 | 13 | import com.revature.services.UserService; 14 | 15 | import io.swagger.annotations.Api; 16 | import io.swagger.annotations.ApiOperation; 17 | 18 | /** 19 | * 20 | * @author Adam L. 21 | *

Exists for the sole purpose of establishing a connection with the database upon webpage load.

22 | * @version.date v06.18.06.18 23 | * 24 | */ 25 | @Path("init") 26 | @Api(value = "init") 27 | @Consumes(MediaType.APPLICATION_JSON) 28 | @Produces(MediaType.APPLICATION_JSON) 29 | public class InitResource { 30 | 31 | UserService userService = new UserService(); 32 | 33 | @GET 34 | @ApiOperation(value = "Initializes connection", notes = "Used to quickly establish a connection with the database.") 35 | public Response connectionInit() { 36 | logger.info("connectionInit Started. TestAssociate used to establish connection to Database."); 37 | userService.getUser("TestAssociate"); 38 | return Response.status(Status.OK).build(); 39 | } 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/services/BatchService.java: -------------------------------------------------------------------------------- 1 | package com.revature.services; 2 | 3 | import java.util.List; 4 | 5 | import com.revature.dao.BatchDao; 6 | import com.revature.daoimpl.BatchDaoImpl; 7 | import com.revature.entity.TfBatch; 8 | 9 | /** 10 | * @author Adam L. 11 | *

12 | * @version v6.18.06.13 13 | */ 14 | public class BatchService { 15 | 16 | private BatchDao dao; 17 | 18 | // public so it can be used for testing 19 | public BatchService() {dao = new BatchDaoImpl();}; 20 | 21 | public BatchService(BatchDao dao) {this.dao = dao;}; 22 | 23 | /** 24 | * @author Adam L. 25 | * 26 | *

Gets the batch given the batch name

27 | * 28 | * @version v6.18.06.13 29 | * @param batchName 30 | * @return TfBatch 31 | */ 32 | public TfBatch getBatch(String batchName) { 33 | return dao.getBatch(batchName); 34 | } 35 | 36 | /** 37 | * @author Adam L. 38 | * 39 | *

Gets the batch given their batch Id

40 | * 41 | * @version v6.18.06.13 42 | * @param id - the batch id 43 | * @return TfBatch 44 | */ 45 | public TfBatch getBatchById(Integer id) { 46 | return dao.getBatchById(id); 47 | } 48 | 49 | /** 50 | * @author Adam L. 51 | * 52 | *

Gets all batches

53 | * 54 | * @version v6.18.06.13 55 | * @return List 56 | */ 57 | public List getAllBatches(){ 58 | return dao.getAllBatches(); 59 | } 60 | 61 | } -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/services/CurriculumService.java: -------------------------------------------------------------------------------- 1 | package com.revature.services; 2 | import java.util.List; 3 | import com.revature.criteria.GraphedCriteriaResult; 4 | import com.revature.dao.CurriculumDao; 5 | import com.revature.daoimpl.CurriculumDaoImpl; 6 | import com.revature.entity.TfCurriculum; 7 | 8 | /** @author Adam L. 9 | * @version v6.18.06.13 */ 10 | public class CurriculumService{ 11 | 12 | private static CurriculumDao dao = new CurriculumDaoImpl(); 13 | 14 | // public so it can be used for testing 15 | public CurriculumService() {}; 16 | 17 | public CurriculumService(CurriculumDao dao) { 18 | CurriculumService.dao = dao; 19 | } 20 | 21 | /** @author Adam L. 22 | *

Gets all the curricula

23 | * @version v6.18.06.13 */ 24 | public List getAllCurriculums(){ 25 | return dao.getAllCurriculums(); 26 | } 27 | 28 | 29 | /** Generates statistics for the expanded view of the home page unmapped chart 30 | * @param statusId 31 | * @return Collection */ 32 | public List getUnmappedInfo(int statusId) { 33 | return dao.getUnmapped(statusId); 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/services/MarketingStatusService.java: -------------------------------------------------------------------------------- 1 | package com.revature.services; 2 | import com.revature.dao.MarketingStatusDao; 3 | import com.revature.daoimpl.MarketingStatusDaoImpl; 4 | import com.revature.entity.TfMarketingStatus; 5 | import java.util.List; 6 | 7 | public class MarketingStatusService { 8 | private MarketingStatusDao dao; 9 | public MarketingStatusService(){dao = new MarketingStatusDaoImpl();} 10 | 11 | public MarketingStatusService(MarketingStatusDao dao) {this.dao = dao;} 12 | 13 | public List getAllMarketingStatuses() { 14 | return dao.getAllMarketingStatuses(); 15 | } 16 | 17 | public TfMarketingStatus getMarketingStatusById(int id) { 18 | return dao.getMarketingStatusById(id); 19 | } 20 | } -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/utils/ContextListener.java: -------------------------------------------------------------------------------- 1 | package com.revature.utils; 2 | 3 | import static com.revature.utils.LogUtil.logger; 4 | 5 | import java.sql.SQLException; 6 | import java.util.Set; 7 | 8 | import javax.servlet.ServletContextEvent; 9 | import javax.servlet.ServletContextListener; 10 | 11 | import com.mchange.v2.c3p0.C3P0Registry; 12 | import com.mchange.v2.c3p0.PooledDataSource; 13 | 14 | public class ContextListener implements ServletContextListener { 15 | @Override 16 | public void contextInitialized(ServletContextEvent servletContextEvent) { 17 | HibernateUtil.getSessionFactory(); 18 | } 19 | 20 | @Override 21 | public void contextDestroyed(ServletContextEvent servletContextEvent) { 22 | @SuppressWarnings("unchecked") 23 | Set pooledDataSourceSet = (Set) C3P0Registry.getPooledDataSources(); 24 | 25 | for (PooledDataSource dataSource : pooledDataSourceSet) { 26 | try { 27 | dataSource.hardReset(); 28 | dataSource.close(); 29 | } catch (SQLException e) { 30 | // note - do not use log4j since it may have been unloaded by this point 31 | logger.trace(e.getMessage(), e); 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/utils/ListOp.java: -------------------------------------------------------------------------------- 1 | package com.revature.utils; 2 | 3 | import java.util.List; 4 | 5 | import org.hibernate.HibernateException; 6 | import org.hibernate.Session; 7 | 8 | 9 | /** 10 | *

Used by the Hibernate utility class

11 | * @version v6.18.06.13 12 | * 13 | */ 14 | public interface ListOp { 15 | List operate (Session session, Object ... args) throws HibernateException, ThrownInHibernate; 16 | } -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/utils/LogUtil.java: -------------------------------------------------------------------------------- 1 | package com.revature.utils; 2 | 3 | import org.apache.log4j.Logger; 4 | 5 | /** 6 | *

Log utility for log4j

7 | */ 8 | public final class LogUtil { 9 | public static final Logger logger = Logger.getLogger(LogUtil.class); 10 | 11 | private LogUtil() { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/utils/ResourceHelper.java: -------------------------------------------------------------------------------- 1 | package com.revature.utils; 2 | 3 | import com.revature.entity.TfAssociate; 4 | import io.jsonwebtoken.Claims; 5 | 6 | public class ResourceHelper { 7 | 8 | private ResourceHelper() {} 9 | 10 | public static boolean isPayloadAssociate(Claims payload, TfAssociate associateInfo) { 11 | return (((String) payload.get("roleID")).equals("5") && !payload.getSubject().equals(associateInfo.getUser().getUsername())); 12 | } 13 | } -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/utils/SchedulePendingUserCleanup.java: -------------------------------------------------------------------------------- 1 | package com.revature.utils; 2 | 3 | import java.util.Timer; 4 | import java.util.TimerTask; 5 | 6 | import com.revature.daoimpl.AssociateDaoImpl; 7 | 8 | /* 9 | * The purpose of this class is to run a separate thread that is on 10 | * a timer and calls a stored procedure in the database. This procedure 11 | * will delete all associates if they are not approved for over 30 days time. 12 | * For speed/efficiency reasons, the logic is handled on PL/SQL side opposed 13 | * to iterating through collections on java side (causing thread issues). 14 | */ 15 | public class SchedulePendingUserCleanup extends TimerTask { 16 | 17 | private static SchedulePendingUserCleanup schedule; 18 | private Timer time = new Timer(); 19 | 20 | public static void Start() { 21 | if (schedule == null) { 22 | schedule = new SchedulePendingUserCleanup(); 23 | } 24 | } 25 | 26 | private SchedulePendingUserCleanup() { 27 | //will run every 24 hours 28 | time.schedule(this, 1000 * 60 * 60 * 24L, 1000 * 60 * 60 * 24L); 29 | } 30 | 31 | @Override 32 | public void run() { 33 | AssociateDaoImpl ad = new AssociateDaoImpl(); 34 | //calls stored procedure 35 | ad.deleteOldAssociateProcedure(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/utils/Sessional.java: -------------------------------------------------------------------------------- 1 | package com.revature.utils; 2 | 3 | import org.hibernate.HibernateException; 4 | import org.hibernate.Session; 5 | 6 | /** 7 | *

Used by the Hibernate utility class

8 | * @version v6.18.06.13 9 | * 10 | * @param 11 | */ 12 | public interface Sessional { 13 | T operate(Session session, Object ... args) throws HibernateException, ThrownInHibernate; 14 | } 15 | -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/utils/ThreadUtil.java: -------------------------------------------------------------------------------- 1 | package com.revature.utils; 2 | 3 | import java.util.concurrent.Callable; 4 | import java.util.concurrent.ExecutionException; 5 | import java.util.concurrent.ExecutorService; 6 | import java.util.concurrent.Executors; 7 | import java.util.concurrent.Future; 8 | import java.util.concurrent.ThreadPoolExecutor; 9 | 10 | import static com.revature.utils.LogUtil.logger; 11 | 12 | public class ThreadUtil { 13 | //I set it to default at 10 threads can be increased for more performance. 14 | //However, it will be to the detriment of the running server. (Most likely an Amazon EC2) 15 | 16 | //1811 Branch - Threadpool increased to 15 by previous batch. Unsure when. 17 | private static ExecutorService executor = Executors.newFixedThreadPool(15); 18 | 19 | public ThreadUtil() { 20 | super(); 21 | } 22 | 23 | public T submitCallable(Callable caller) { 24 | Future future = executor.submit(caller); 25 | T results = null; 26 | 27 | try { 28 | results = future.get(); 29 | } catch (ExecutionException e) { 30 | if(!future.isCancelled()) { future.cancel(true); } 31 | else {logger.info("Call was canceled");} 32 | logger.debug(e); 33 | } catch(InterruptedException e) { 34 | if(!future.isCancelled()) { future.cancel(true); } 35 | logger.info("Thread was interrupted"); 36 | Thread.currentThread().interrupt(); 37 | 38 | } 39 | 40 | logger.debug("Current Active Threads: " + getActiveThreadCount()); 41 | return results; 42 | } 43 | 44 | public static int getActiveThreadCount() { 45 | return ((ThreadPoolExecutor) executor).getActiveCount(); 46 | } 47 | 48 | 49 | } -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/utils/ThrownInHibernate.java: -------------------------------------------------------------------------------- 1 | package com.revature.utils; 2 | 3 | /** 4 | *

Exception used for custom Hibernate utility class

5 | * @version v6.18.06.13 6 | */ 7 | public class ThrownInHibernate extends Exception { 8 | 9 | private static final long serialVersionUID = 5674363546335106927L; 10 | } -------------------------------------------------------------------------------- /TrackForce/src/main/java/com/revature/utils/UserAuthentication.java: -------------------------------------------------------------------------------- 1 | package com.revature.utils; 2 | 3 | 4 | import java.util.stream.IntStream; 5 | 6 | import com.revature.services.JWTService; 7 | 8 | import io.jsonwebtoken.Claims; 9 | 10 | public class UserAuthentication { 11 | 12 | /** 13 | * 14 | * @param token 15 | * the token is the authorization value for the web page granted from login 16 | * @param levelNeeded 17 | * level needed is the role from the database of your user, ex. an Admin has 1 and an Associate is 5 18 | * @return 19 | * returns true or false so that the page can continue. 20 | * true means that the page was authorized. 21 | */ 22 | public static boolean Authorized (String token, int [] levelNeeded) { 23 | //creates payload object that we can get the role of the user from 24 | Claims payload = JWTService.processToken(token); 25 | //makes sure payload is not null 26 | if (payload == null) { 27 | LogUtil.logger.error("Payload was null."); 28 | return false; 29 | }else { 30 | //checks if the users role# is within the parameter for the request 31 | boolean result = IntStream.of(levelNeeded).anyMatch( 32 | x -> x == Integer.parseInt((String) payload.get("roleID")) 33 | ); 34 | 35 | if ( result) { 36 | //if it is then they are authorized for the page 37 | return true; 38 | }else { 39 | //if not then they are denied 40 | LogUtil.logger.error("User is not authorized for this page."); 41 | return false; 42 | } 43 | } 44 | } 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /TrackForce/src/main/resources/R_reInitDB.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/TrackForce/src/main/resources/R_reInitDB.sql -------------------------------------------------------------------------------- /TrackForce/src/main/resources/chromeDriveer4Mac/chromedriver: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/TrackForce/src/main/resources/chromeDriveer4Mac/chromedriver -------------------------------------------------------------------------------- /TrackForce/src/main/resources/chromedriver: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/TrackForce/src/main/resources/chromedriver -------------------------------------------------------------------------------- /TrackForce/src/main/resources/chromedriver.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/TrackForce/src/main/resources/chromedriver.exe -------------------------------------------------------------------------------- /TrackForce/src/main/resources/geckodriver.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/TrackForce/src/main/resources/geckodriver.exe -------------------------------------------------------------------------------- /TrackForce/src/main/resources/hibernate.properties: -------------------------------------------------------------------------------- 1 | #C3P0 Configuration 2 | #Minimum number of JDBC connections in the pool 3 | hibernate.c3p0.min_size=1 4 | #Maximum number of JDBC connections in the pool 5 | hibernate.c3p0.max_size=16 6 | #How many seconds before an idle connection is removed from the pool 7 | hibernate.c3p0.timeout=120 8 | #Number of PreparedStatements that will be cached 9 | hibernate.c3p0.max_statements=25 10 | #Tests all idle, pooled but unchecked connection every this number of seconds 11 | hibernate.c3p0.idle_test_period=600 -------------------------------------------------------------------------------- /TrackForce/src/main/webapp/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jasmine": {} 3 | } -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/TestNG/ClassInstantiationTests.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.TestNG; 2 | 3 | import org.testng.annotations.Test; 4 | 5 | import com.revature.resources.AssociateResource; 6 | import com.revature.resources.BatchResource; 7 | import com.revature.resources.ClientResource; 8 | import com.revature.resources.CurriculumResource; 9 | import com.revature.resources.InitResource; 10 | import com.revature.resources.InterviewResource; 11 | import com.revature.resources.TrainerResource; 12 | import com.revature.resources.UserResource; 13 | 14 | public class ClassInstantiationTests { 15 | 16 | 17 | 18 | @Test 19 | public void instantiateAssociateResourceTest() { 20 | assert(new AssociateResource() != null); 21 | } 22 | 23 | @Test 24 | public void instantiateBatchResourceTest() { 25 | assert(new BatchResource() != null); 26 | } 27 | 28 | @Test 29 | public void instantiateClientResourceTest() { 30 | assert(new ClientResource() != null); 31 | } 32 | 33 | @Test 34 | public void instantiateCurriculumResourceTest() { 35 | assert(new CurriculumResource() != null); 36 | } 37 | 38 | @Test 39 | public void instantiateInitResourceTest() { 40 | assert(new InitResource() != null); 41 | } 42 | 43 | @Test 44 | public void instantiateInterviewResourceTest() { 45 | assert(new InterviewResource() != null); 46 | } 47 | 48 | @Test 49 | public void instantiateTrainerResourceTest() { 50 | assert(new TrainerResource() != null); 51 | } 52 | 53 | @Test 54 | public void instantiateUserResourceTest() { 55 | assert(new UserResource() != null); 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/TestNG/GenerateDataTest.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.TestNG; 2 | 3 | import org.testng.annotations.Test; 4 | 5 | import com.revature.application.GenerateData; 6 | 7 | public class GenerateDataTest { 8 | 9 | @Test 10 | void testGetRandomString() { 11 | String result = GenerateData.getRandomString(); 12 | assert(result != null); 13 | } 14 | 15 | @Test 16 | void testGetRandomInt() { 17 | int result; 18 | result = GenerateData.getRandomInt(0, 1000000); 19 | assert(result != 0); 20 | } 21 | 22 | @Test 23 | void testConstructGenerateData() { 24 | GenerateData result = new GenerateData(); 25 | assert(result != null); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/orm/entity/TfUserAndCreatorRolerContainerTest.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.orm.entity; 2 | 3 | import static org.testng.Assert.assertEquals; 4 | import static org.testng.Assert.assertNotEquals; 5 | import static org.testng.Assert.assertTrue; 6 | 7 | import org.testng.annotations.Test; 8 | 9 | import com.revature.entity.TfUser; 10 | import com.revature.entity.TfUserAndCreatorRoleContainer; 11 | 12 | public class TfUserAndCreatorRolerContainerTest { 13 | 14 | TfUserAndCreatorRoleContainer tfuc1 = new TfUserAndCreatorRoleContainer(new TfUser(), 1); 15 | TfUserAndCreatorRoleContainer tfuc2 = new TfUserAndCreatorRoleContainer(new TfUser(), 1); 16 | TfUserAndCreatorRoleContainer tfuc = new TfUserAndCreatorRoleContainer(); 17 | 18 | @Test 19 | public void testUserAndCreatorUserGetSet() { 20 | tfuc.setUser(new TfUser()); 21 | assertTrue(tfuc.getUser() instanceof TfUser); 22 | } 23 | 24 | @Test 25 | public void testUserAndCreatorCreatorRoleGetSet() { 26 | tfuc.setCreatorRole(2); 27 | assertEquals(tfuc.getCreatorRole(), 2); 28 | assertNotEquals(tfuc.getCreatorRole(), 1); 29 | } 30 | 31 | @Test 32 | public void testUserAndCreatorToString() { 33 | assertEquals(tfuc1.toString(), tfuc2.toString()); 34 | assertNotEquals(tfuc.toString(), tfuc1.toString()); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/orm/util/Dev3ApiUtilTest.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.orm.util; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | 6 | import org.testng.Assert; 7 | import org.testng.annotations.BeforeClass; 8 | import org.testng.annotations.Test; 9 | 10 | import com.revature.entity.TfBatch; 11 | import com.revature.utils.Dev3ApiUtil; 12 | 13 | public class Dev3ApiUtilTest { 14 | 15 | @Test(priority=1) 16 | public void testIsNotLoggedIn() { 17 | Assert.assertFalse(Dev3ApiUtil.isLoggedIn()); 18 | } 19 | @Test(priority=2) 20 | public void testLogin() { 21 | Assert.assertTrue(Dev3ApiUtil.login()); 22 | } 23 | @Test(priority=3) 24 | public void testIsLoggedIn() { 25 | Assert.assertTrue(Dev3ApiUtil.isLoggedIn()); 26 | } 27 | @Test(priority=4) 28 | public void testGetMostRecentBatches() { 29 | List batches = Dev3ApiUtil.getBatchesEndingWithinLastNMonths(0); 30 | Assert.assertNotNull(batches); 31 | for (TfBatch tfBatch : batches) { 32 | Assert.assertTrue(tfBatch.getEndDate().after(new Date())); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/orm/util/HibernateUtilTest.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.orm.util; 2 | 3 | import static org.testng.Assert.assertFalse; 4 | import static org.testng.Assert.assertTrue; 5 | import static org.testng.Assert.fail; 6 | 7 | import org.hibernate.HibernateException; 8 | import org.hibernate.SessionFactory; 9 | import org.hibernate.Transaction; 10 | //import org.powermock.core.classloader.annotations.PrepareForTest; 11 | import org.testng.annotations.Test; 12 | 13 | import com.revature.utils.HibernateUtil; 14 | 15 | //@PrepareForTest(HibernateUtil.class) 16 | public class HibernateUtilTest { 17 | 18 | @Test 19 | public void testGetSessionFactory() { 20 | try { 21 | SessionFactory sf = HibernateUtil.getSessionFactory(); 22 | assertTrue(sf != null); 23 | assertTrue(sf.isOpen() == true); 24 | sf.close(); 25 | assertTrue(sf.isClosed() == true); 26 | } catch (HibernateException he) { 27 | fail("Error opening session factory"); 28 | } 29 | } 30 | 31 | @Test 32 | public void testShutdown() { 33 | try { 34 | SessionFactory sf = HibernateUtil.getSessionFactory(); 35 | HibernateUtil.shutdown(); 36 | assertTrue(sf.isClosed() == true); 37 | assertFalse(sf.isOpen() == true); 38 | } catch (HibernateException he) { 39 | fail("Error opening session factory"); 40 | } 41 | } 42 | 43 | @Test(enabled=false) 44 | public void testRollbackTransaction() { 45 | SessionFactory sf = HibernateUtil.getSessionFactory(); 46 | sf.openSession(); 47 | Transaction t = sf.getCurrentSession().beginTransaction(); 48 | try { 49 | t.rollback(); 50 | } catch (HibernateException he) { 51 | fail(); 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/pom/BatchDetails.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.pom; 2 | 3 | import java.util.List; 4 | 5 | import org.openqa.selenium.By; 6 | import org.openqa.selenium.WebDriver; 7 | import org.openqa.selenium.WebElement; 8 | 9 | public class BatchDetails { 10 | 11 | 12 | public static WebElement getBarGraph(WebDriver driver) { 13 | return driver.findElement(By.id("bar")); 14 | } 15 | 16 | public static List getAssociateList(WebDriver driver) { 17 | return driver.findElements(By.tagName("tr")); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/pom/BatchList.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.pom; 2 | 3 | import java.util.List; 4 | 5 | import org.openqa.selenium.By; 6 | import org.openqa.selenium.WebDriver; 7 | import org.openqa.selenium.WebElement; 8 | 9 | public class BatchList { 10 | 11 | public static List getBatchListElements(WebDriver driver) { 12 | return driver.findElements(By.cssSelector("tr[class = 'max-width ng-star-inserted']")); 13 | } 14 | 15 | public static WebElement getBatchName(WebDriver driver,WebElement row) { 16 | return row.findElements(By.tagName("td")).get(0); 17 | } 18 | 19 | public static WebElement getBatchStartDate(WebDriver driver,WebElement row) { 20 | return row.findElements(By.tagName("td")).get(1); 21 | } 22 | 23 | public static WebElement getBatchEndDate(WebDriver driver,WebElement row) { 24 | return row.findElements(By.tagName("td")).get(2); 25 | } 26 | 27 | public static WebElement getStartDateInput(WebDriver driver) { 28 | return driver.findElement(By.id("startDate")); 29 | } 30 | 31 | public static WebElement getEndDateInput(WebDriver driver) { 32 | return driver.findElement(By.id("endDate")); 33 | } 34 | 35 | public static WebElement getPieChart(WebDriver driver) { 36 | return driver.findElement(By.id("pie")); 37 | } 38 | 39 | 40 | } 41 | -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/pom/ClientList.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.pom; 2 | 3 | import java.util.List; 4 | 5 | import org.openqa.selenium.By; 6 | import org.openqa.selenium.TimeoutException; 7 | import org.openqa.selenium.WebDriver; 8 | import org.openqa.selenium.WebElement; 9 | import org.openqa.selenium.support.ui.ExpectedConditions; 10 | import org.openqa.selenium.support.ui.WebDriverWait; 11 | 12 | //Written 10/23/18 - Josh 13 | public class ClientList { 14 | 15 | public static WebElement getClientSearchBar(WebDriver driver) { 16 | return driver.findElement(By.id("clientSearch")); 17 | } 18 | 19 | public static List getAllClients(WebDriver driver){ 20 | return driver.findElements(By.className("client-name")); 21 | } 22 | 23 | public static WebElement getFilter(WebDriver driver) { 24 | return driver.findElement(By.id("clientSearch")); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/pom/CreateUser.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.pom; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.WebDriver; 5 | import org.openqa.selenium.WebElement; 6 | 7 | public class CreateUser { 8 | 9 | public static WebElement getUsername(WebDriver driver) { 10 | return driver.findElement(By.id("username")); 11 | } 12 | 13 | public static WebElement getPassword(WebDriver driver) { 14 | return driver.findElement(By.id("password")); 15 | } 16 | 17 | public static WebElement getConfirmPassword(WebDriver driver) { 18 | return driver.findElement(By.id("password2")); 19 | } 20 | 21 | public static WebElement getTrainerRoleRadio(WebDriver driver) { 22 | return driver.findElement(By.cssSelector("input[type='radio'][value='2']")); 23 | } 24 | 25 | public static WebElement getSalesRoleRadio(WebDriver driver) { 26 | return driver.findElement(By.cssSelector("input[type='radio'][value='3']")); 27 | } 28 | 29 | public static WebElement getStagingRadio(WebDriver driver) { 30 | return driver.findElement(By.cssSelector("input[type='radio'][value='4']")); 31 | } 32 | 33 | public static WebElement getAssociateRadio(WebDriver driver) { 34 | return driver.findElement(By.cssSelector("input[type='radio'][value='5']")); 35 | } 36 | 37 | public static WebElement getSubmitButton(WebDriver driver) { 38 | return driver.findElement(By.cssSelector("button[type='submit']")); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/pom/Footer.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.pom; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.WebDriver; 5 | import org.openqa.selenium.WebElement; 6 | 7 | public class Footer { 8 | 9 | public static WebElement getRevatureLogo(WebDriver driver) { 10 | return driver.findElement(By.cssSelector("image[class='img-responsive footer-img']")); 11 | } 12 | 13 | public static WebElement getPhoneNumber(WebDriver driver) { 14 | return driver.findElement(By.cssSelector("a[href='tel:703 995 4500']")); 15 | } 16 | 17 | public static WebElement getFaxNumber(WebDriver driver) { 18 | return driver.findElement(By.cssSelector("a[href='tel:(703) 507-8181']")); 19 | } 20 | 21 | public static WebElement getEmail(WebDriver driver) { 22 | return driver.findElement(By.cssSelector("a[href='info@revature.com']")); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/pom/Home.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.pom; 2 | 3 | import java.util.List; 4 | 5 | import org.openqa.selenium.By; 6 | import org.openqa.selenium.WebDriver; 7 | import org.openqa.selenium.WebElement; 8 | import org.openqa.selenium.support.ui.WebDriverWait; 9 | 10 | //Written 10/23/18 - Josh 11 | //Assumes the correct page is already currently accessed by the driver param 12 | //This page refers to the login page, the home screen of the application 13 | public class Home { 14 | 15 | private static WebDriverWait wait; 16 | 17 | //Used in AdminTests.java 18 | public static List getGraphs(WebDriver driver) { 19 | return driver.findElements(By.id("pie")); 20 | } 21 | 22 | public static WebElement getPhone(WebDriver driver) { 23 | return driver.findElement(By.id("phoneNumber")); 24 | } 25 | 26 | public static WebElement getFax(WebDriver driver) { 27 | return driver.findElement(By.id("faxNumber")); 28 | } 29 | 30 | public static WebElement getEmail(WebDriver driver) { 31 | return driver.findElement(By.linkText("info@revature.com")); 32 | } 33 | 34 | public static WebElement getWebsite(WebDriver driver) { 35 | return driver.findElement(By.className("footer-img")); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/pom/PasswordUpdate.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.pom; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.WebDriver; 5 | import org.openqa.selenium.WebElement; 6 | 7 | /* 8 | * This class is written to retrieve all of the page's fields and elements from the 9 | * password-update 10 | * page. The driver should already be on that URL before using any of these methods, 11 | * otherwise an error will occur. 12 | * @Michael Tinning, Batch 1811 13 | */ 14 | public class PasswordUpdate { 15 | public static WebElement getOldPassword(WebDriver driver) { 16 | return driver.findElement(By.id("oldPassword")); 17 | } 18 | public static WebElement getNewPassword(WebDriver driver) { 19 | return driver.findElement(By.id("newPassword")); 20 | } 21 | public static WebElement getConfirmPassword(WebDriver driver) { 22 | return driver.findElement(By.id("newPasswordConfirm")); 23 | } 24 | public static WebElement getUpdateButton(WebDriver driver) { 25 | return driver.findElement(By.id("submitButton")); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/pom/Salesforce.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.pom; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.WebDriver; 5 | import org.openqa.selenium.WebElement; 6 | 7 | public class Salesforce { 8 | 9 | public static WebElement getPopulateDBButton(WebDriver driver){ 10 | return driver.findElement(By.className("btn btn-danger")); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/pom/UsernameUpdate.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.pom; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.WebDriver; 5 | import org.openqa.selenium.WebElement; 6 | 7 | /* 8 | * This class is written to retrieve all of the page's fields and elements from the 9 | * username-update 10 | * page. The driver should already be on that URL before using any of these methods, 11 | * otherwise an error will occur. 12 | * @Michael Tinning, Batch 1811 13 | */ 14 | public class UsernameUpdate { 15 | public static WebElement getNewUsername(WebDriver driver) { 16 | return driver.findElement(By.name("newUsername")); 17 | } 18 | public static WebElement getPassword(WebDriver driver) { 19 | return driver.findElement(By.name("password")); 20 | } 21 | public static WebElement getUpdateButton(WebDriver driver) { 22 | return driver.findElement(By.id("submitButton")); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/resources/CurriculumResourceTest.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.resources; 2 | 3 | import org.testng.annotations.Test; 4 | import org.testng.annotations.BeforeClass; 5 | import org.testng.annotations.AfterClass; 6 | 7 | public class CurriculumResourceTest { 8 | @Test 9 | public void f() { 10 | } 11 | @BeforeClass 12 | public void beforeClass() { 13 | } 14 | 15 | @AfterClass 16 | public void afterClass() { 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/resources/InitResourceTest.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.resources; 2 | 3 | import org.testng.annotations.Test; 4 | import org.testng.annotations.BeforeClass; 5 | import org.testng.annotations.AfterClass; 6 | 7 | public class InitResourceTest { 8 | @Test 9 | public void f() { 10 | } 11 | @BeforeClass 12 | public void beforeClass() { 13 | } 14 | 15 | @AfterClass 16 | public void afterClass() { 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/resources/TrainerResourceTest.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.resources; 2 | 3 | import org.testng.annotations.Test; 4 | import org.testng.annotations.BeforeClass; 5 | import org.testng.annotations.AfterClass; 6 | 7 | public class TrainerResourceTest { 8 | @Test 9 | public void f() { 10 | } 11 | @BeforeClass 12 | public void beforeClass() { 13 | } 14 | 15 | @AfterClass 16 | public void afterClass() { 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/runner/CucumberTestRunner.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.runner; 2 | 3 | import org.junit.runner.RunWith; 4 | import cucumber.api.CucumberOptions; 5 | import cucumber.api.junit.Cucumber; 6 | import cucumber.api.testng.AbstractTestNGCucumberTests; 7 | 8 | /** 9 | * Test runner to run all of the features in the features attribute and to match them with the 10 | * appropriate step definitions specified by the glue. There is no setup or teardown 11 | * Reviewed by Jesse 12 | * @since 6.18.06.07 13 | */ 14 | @RunWith(Cucumber.class) 15 | @CucumberOptions( 16 | plugin = {"pretty"}, 17 | features = {"src/test/resources/AdminFeatureFiles/"}, 18 | glue = {"com.revature.test.utils","com.revature.test.cuke"} 19 | ) 20 | 21 | public class CucumberTestRunner extends AbstractTestNGCucumberTests { 22 | 23 | } 24 | -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/utils/Log.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.utils; 2 | 3 | import org.apache.log4j.Logger; 4 | 5 | /* The Log class wraps log4j to log all desired test results. 6 | * Log file location defined in log4j properties. 7 | * @author joeyi 8 | */ 9 | public final class Log { 10 | 11 | // .class gets an instance of the Log class at run time 12 | public final static Logger Log = Logger.getLogger(Log.class); 13 | 14 | //Instantiate log by logging start 15 | public Log() 16 | { 17 | Log.info("Start of new Test"); 18 | } 19 | 20 | //Method to log failures only 21 | public static void failure(String msg) 22 | { 23 | Log.fatal(msg); 24 | } 25 | 26 | public static void warn(String msg) 27 | { 28 | Log.warn(msg); 29 | } 30 | //Method to log debugging notes 31 | public static void debug(String msg) 32 | { 33 | Log.error(msg); 34 | } 35 | 36 | //for test success 37 | public static void success(String msg) 38 | { 39 | Log.info(msg); 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/utils/ResetDatabase.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.utils; 2 | 3 | import static org.testng.Assert.assertTrue; 4 | 5 | import org.testng.annotations.Test; 6 | //import com.revature.utils.DbResetUtil; 7 | 8 | /** 9 | *Must be run before ALL of the back-end tests to get consistent 10 | *data from the database. Basically all of the tests are to be run on 11 | *the development database so when we test the services, they will be 12 | *modifying the database as it won't affect production. That being said 13 | *running the tests multiple times will cause a lot to fail as a result, 14 | *so we need to run the reset database script each time to get the same results 15 | */ 16 | public class ResetDatabase { 17 | 18 | // @Test 19 | // public void resetDB() { 20 | // DbResetUtil dru = new DbResetUtil(); 21 | // assertTrue(dru.resetDatabase()); 22 | // } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /TrackForce/src/test/java/com/revature/test/utils/TestConfig.java: -------------------------------------------------------------------------------- 1 | package com.revature.test.utils; 2 | 3 | import static com.revature.utils.LogUtil.logger; 4 | 5 | import java.io.IOException; 6 | import java.io.InputStream; 7 | import java.util.Properties; 8 | 9 | import com.revature.test.pom.Login; 10 | import com.revature.utils.EnvManager; 11 | 12 | 13 | public class TestConfig { 14 | private static Properties prop = new Properties(); 15 | static { 16 | InputStream locProps = Login.class.getClassLoader() 17 | .getResourceAsStream("tests.properties"); 18 | try { 19 | prop.load(locProps); 20 | } catch (IOException e) { 21 | logger.trace(e.getMessage(), e); 22 | } 23 | } 24 | 25 | /* 26 | * NOTE: to change between using local and hosted url change "urlBeingUsed" property 27 | * in tests.properties - line 17 28 | */ 29 | private static String baseURL; 30 | 31 | //11/5/2018 Courie Changed this to use the URL from Mussab's EnvManager class instead 32 | //of using the hard-coded test.properties urlBeingUsed 33 | public static String getBaseURL() { 34 | if(baseURL == null) { 35 | baseURL = EnvManager.NGTrackForce_URL; 36 | } 37 | return baseURL; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /TrackForce/src/test/resources/AdminFeatureFiles/HomeTab.feature: -------------------------------------------------------------------------------- 1 | Feature: Home Page Bottom Info Banner 2 | 3 | Background: 4 | Given I connect to trackforce 5 | Given the login page loads 6 | 7 | Scenario: I click on the Revature telephone number 8 | When I click on the telephone link 9 | Then I should see the telephone number link open on a browser 10 | 11 | Scenario: I click on the Revature fax number 12 | When I click on the fax link 13 | Then I should see the telephone number link open on a browser 14 | 15 | 16 | Scenario: I click on the Revature email 17 | When I click on the email link 18 | Then I should see the email link open on a browser 19 | 20 | Scenario: I click on the Revature website 21 | When I click on the website link 22 | Then I should see the Revature website link open on a browser -------------------------------------------------------------------------------- /TrackForce/src/test/resources/AdminFeatureFiles/HomeTabFirefox.feature: -------------------------------------------------------------------------------- 1 | Feature: Home Page Bottom Info Banner 2 | 3 | Background: 4 | Given I connect to trackforce on Firefox 5 | Given the login page loads 6 | 7 | Scenario: I click on the Revature telephone number 8 | When I click on the telephone link 9 | Then I should see the telephone number link open on a browser 10 | 11 | Scenario: I click on the Revature fax number 12 | When I click on the fax link 13 | Then I should see the telephone number link open on a browser 14 | 15 | 16 | Scenario: I click on the Revature email 17 | When I click on the email link 18 | Then I should see the email link open on a browser 19 | 20 | Scenario: I click on the Revature website 21 | When I click on the website link 22 | Then I should see the Revature website link open on a browser -------------------------------------------------------------------------------- /TrackForce/src/test/resources/AdminFeatureFiles/LoginFirefox.feature: -------------------------------------------------------------------------------- 1 | @FirefoxTest 2 | Feature: Tests login for each user type on Firefox 3 | 4 | Background: 5 | Given I connect to trackforce on Firefox 6 | Given the login page loads 7 | 8 | Scenario Outline: Each user type is able to login with their credentials 9 | When I input login credential username as " " 10 | And input credential password as "" 11 | Then login succeeds and navigates away from the login page 12 | Examples: 13 | |username|password| 14 | |TestAdmin|TestAdmin| 15 | |Trainer|Trainer| 16 | |bobstage|bobstage| 17 | |cyril|cyril| 18 | |salestest|salestest| 19 | 20 | Scenario Outline: Incorrect login information or correct information that is mismatched between users 21 | When I input an incorrect username as "" 22 | And I input an incorrect password as "" 23 | Then I should be on the login page 24 | Examples: 25 | |badusername|badpassword| 26 | |notAUsername|notAPassword| 27 | | | | 28 | |null|null| 29 | |bobstage| | 30 | | |bobstage| 31 | |TestAdmin|Trainer| 32 | |cyril|TestAdmin| 33 | 34 | Scenario: I log in with correct information and logout 35 | When I submit the correct admin login information 36 | And I click Log out 37 | Then I should be on the login page 38 | -------------------------------------------------------------------------------- /TrackForce/src/test/resources/import.sql: -------------------------------------------------------------------------------- 1 | SET DATABASE SQL SYNTAX ORA TRUE 2 | ALTER SCHEMA PUBLIC RENAME TO ADMIN -------------------------------------------------------------------------------- /WebContent/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /WebContent/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | trackforce 4 | 5 | index.html 6 | index.htm 7 | index.jsp 8 | default.html 9 | default.htm 10 | default.jsp 11 | 12 | 13 | -------------------------------------------------------------------------------- /db.json: -------------------------------------------------------------------------------- 1 | { 2 | "posts": [ 3 | { 4 | "id": 1, 5 | "title": "json-server", 6 | "author": "typicode" 7 | } 8 | ], 9 | "comments": [ 10 | { 11 | "id": 1, 12 | "body": "some comment", 13 | "postId": 1 14 | } 15 | ], 16 | "profile": { 17 | "name": "typicode" 18 | } 19 | } -------------------------------------------------------------------------------- /images/AutoGenerating/AddConfigurationIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/images/AutoGenerating/AddConfigurationIcon.png -------------------------------------------------------------------------------- /images/AutoGenerating/PerspectiveSymbol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/images/AutoGenerating/PerspectiveSymbol.png -------------------------------------------------------------------------------- /images/AutoGenerating/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/images/AutoGenerating/Thumbs.db -------------------------------------------------------------------------------- /images/AutoGenerating/codeGenerationMain5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/images/AutoGenerating/codeGenerationMain5.png -------------------------------------------------------------------------------- /images/AutoGenerating/editConfiguration2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/images/AutoGenerating/editConfiguration2.png -------------------------------------------------------------------------------- /images/AutoGenerating/editConfigurationClasspath3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/images/AutoGenerating/editConfigurationClasspath3.png -------------------------------------------------------------------------------- /images/AutoGenerating/installation1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/images/AutoGenerating/installation1.png -------------------------------------------------------------------------------- /images/AutoGenerating/runGeneration4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/images/AutoGenerating/runGeneration4.png -------------------------------------------------------------------------------- /images/AutoGenerating/runGenerationExporters6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/images/AutoGenerating/runGenerationExporters6.png -------------------------------------------------------------------------------- /images/Database/AccessToken3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/images/Database/AccessToken3.png -------------------------------------------------------------------------------- /images/Database/FinalERD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/images/Database/FinalERD.png -------------------------------------------------------------------------------- /images/Database/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/images/Database/Thumbs.db -------------------------------------------------------------------------------- /images/Database/errorPage1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/images/Database/errorPage1.png -------------------------------------------------------------------------------- /images/Database/getRequest4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/images/Database/getRequest4.png -------------------------------------------------------------------------------- /images/Database/response5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/images/Database/response5.png -------------------------------------------------------------------------------- /images/Database/tokenAccess2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/images/Database/tokenAccess2.png -------------------------------------------------------------------------------- /jenkins_testing.txt: -------------------------------------------------------------------------------- 1 | testtst -------------------------------------------------------------------------------- /resources/1901 Documentaton/Pipeline Info.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/revaturelabs/trackforce/3955e584d4e3f923b52973cfdfc4964d026ebde4/resources/1901 Documentaton/Pipeline Info.docx -------------------------------------------------------------------------------- /resources/Extra Materials/OLD_SQL/DropOrder.sql: -------------------------------------------------------------------------------- 1 | Drop table tf_interview; 2 | Drop table tf_placement; 3 | drop table tf_associate; 4 | drop table tf_marketing_status; 5 | drop table tf_batch; 6 | Drop table tf_curriculum; 7 | Drop table tf_batch_location; 8 | Drop table tf_interview_type; 9 | Drop table tf_client; 10 | Drop table tf_end_client; 11 | 12 | --------------------------------- 13 | Drop table tf_user; 14 | Drop table tf_role; -------------------------------------------------------------------------------- /resources/Extra Materials/OLD_SQL/createTestUsers.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO admin.tf_role(tf_role_id, tf_role_name) VALUES(1, 'Admin'); 2 | INSERT INTO admin.tf_role(tf_role_id, tf_role_name) VALUES(2, 'Manager'); 3 | INSERT INTO admin.tf_role(tf_role_id, tf_role_name) VALUES(3, 'Vice President'); 4 | INSERT INTO admin.tf_role(tf_role_id, tf_role_name) VALUES(4, 'Associate'); 5 | 6 | INSERT INTO admin.tf_user(tf_user_id, tf_username, tf_hashpassword, tf_role_id) 7 | VALUES(1, 'TestAdmin', 'sha1:64000:18:zBfcx3rxxYev6SuYjw/EoTzwwhDW0+5I:TE/5QDShUo2DpVtwM1wfpnmD', 1); 8 | 9 | INSERT INTO admin.tf_user(tf_user_id, tf_username, tf_hashpassword, tf_role_id) 10 | VALUES(2, 'TestManager', 'sha1:64000:18:/fW6R/5plhg/bmBGJHwZ706zkWS3+gu2:G1DIcP3u0KXQnzXBsL/6zdjj', 2); 11 | 12 | INSERT INTO admin.tf_user(tf_user_id, tf_username, tf_hashpassword, tf_role_id) 13 | VALUES(3, 'TestVicePresident', 'sha1:64000:18:BId387PD/2CaEcCaISnf6GNHcfdSFM9B:nkKS54PqDi5hSoJa+6sjxW85', 3); 14 | 15 | COMMIT; 16 | --------------------------------------------------------------------------------