npm

@fdot/angular-staff
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@fdot/angular-staff

The angular-staff package wraps service calls to FDOT Staff API and also includes pipes and components based on bootstrap 4.

Installation

The angular staff package use a peer dependency of ng-bootstrap so you will need to also perform an NPM install of it as well. npm install @fdot/angular-staff --save npm install @ng-bootstrap/ng-bootstrap' --save

Setup

import { NgModule } from '@angular/core';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';

import { AngularStaffModule, Config } from '@fdot/angular-staff';


@NgModule({
  declarations: [
  ],
  imports: [
    // Add the import for the Angular Dotcodes Module
    AngularStaffModule.forRoot(new Config('Host Url Goes Here', 'Api Key Goes Here')),
    NgbModule.forRoot()
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Module Config Options

  • host - The url for the dotcodes api the module will use
  • apiKey - The api key for the api call.

Staff Selector Component

An component that allows for the autocompletion of FDOT Staff members

 <fdot-staff-selector (selected)="staffSelected($event)" [format]="'{firstName} {lastName} ({racfId})'" [value=]"staffId"></fdot-staff-selector>

Inputs

  • format - The format string used for the selection and options of the autocomplete.
  • value - Allows for the selection of the staff member using staff member id.

Outputs

  • selected - The staff member that is selected

Staff Pipe

{{staffId | staff | async}}
{{staffId | staff:'{lastName}, {firstName}' | async}}
{{staffId | staff:'{firstName} {lastName} ({racfId}) - #{phone} Email: {emailAddress}' | async}}

Inputs

  • format - The format string used for displaying the staff member name. If none is provided it is displayed as firstName lastName

Format String Options

The format string allows you to specify a format with replacement tokens listed below. Example: "{firstName} {lastName}".

Options

  • {firstName}
  • {lastName}
  • {racfId}
  • {emailAddress}
  • {phone}

AngularStaffService

A service is also included in the module for making your own calls for custom components or services.

Methods
  • GetStaffById(id: number): Observable<StaffMember>
  • GetStaffByIds(id: number[]): Observable<StaffMember[]>
  • GetStaffByRacfId(racfId: string): Observable<StaffMember>
  • GetStaffByRacfIds(racfId: number[]): Observable<StaffMember[]>
  • public SearchStaffBySearchCriteriaGet(racfId: number[], peopleFirstId: string, status: string, partialName: string, firstName: string, lastName: string, districtCode: string, positionNumber: string, organizationalCode: string,emailAddress: string, staffTypeCode: string, staffId: string): Observable<StaffMember[]>
  • SearchStaffBySearchCriteriaPost(searchCriteria: SearchCriteria): Observable<HttpResponse<any>>

Readme

Keywords

Package Sidebar

Install

npm i @fdot/angular-staff

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

409 kB

Total Files

44

Last publish

Collaborators

  • yelisidibe-fdot
  • jeremyconger-fdot
  • travis.tackett
  • sschwinn-fdot