{"version":3,"sources":["webpack:///ng/app/services/global.service.ts","webpack:///ng/app/services/loading-indicator.service.ts","webpack:///ng/Templates/loading-indicator.component.html","webpack:///ng/app/components/loading-indicator.component.ts","webpack:///ng/Templates/app.component.html","webpack:///ng/app/components/app.component.ts","webpack:///ng/app/services/user.service.ts","webpack:///ng/Templates/user-sites-list.component.html","webpack:///ng/app/components/user-sites-list.component.ts","webpack:///ng/Templates/user-list.component.html","webpack:///ng/app/components/user-list.component.ts","webpack:///ng/app/services/location.service.ts","webpack:///ng/Templates/location-despatch-sites.component.html","webpack:///ng/app/components/loc-despatch-locs-list.component.ts","webpack:///ng/Templates/site-locations-list.component.html","webpack:///ng/app/components/location-list.component.ts","webpack:///ng/app/services/container.service.ts","webpack:///ng/Templates/container-list.component.html","webpack:///ng/app/components/container-list.component.ts","webpack:///ng/app/services/box.service.ts","webpack:///ng/Templates/box-list.component.html","webpack:///ng/app/components/box-list.component.ts","webpack:///ng/app/services/rack.service.ts","webpack:///ng/app/pipes.pipe.ts","webpack:///ng/Templates/rack-list.component.html","webpack:///ng/app/components/rack-list.component.ts","webpack:///ng/app/services/sample.service.ts","webpack:///ng/app/services/sounds.service.ts","webpack:///ng/app/components/modal.component.ts","webpack:///ng/Templates/samples-list.component.html","webpack:///ng/app/components/samples-list.component.ts","webpack:///ng/app/components/store-samples.component.ts","webpack:///ng/Templates/store-samples.component.html","webpack:///ng/Templates/sample-audit.component.html","webpack:///ng/app/components/sample-audit.component.ts","webpack:///ng/Templates/boxes-list.component.html","webpack:///ng/app/components/boxes-list.component.ts","webpack:///ng/Templates/pack-box-samples.component.html","webpack:///ng/app/components/pak-box-samples.component.ts","webpack:///ng/Templates/unpack-box-samples.component.html","webpack:///ng/app/components/unpak-box-samples.component.ts","webpack:///ng/app/components/select-component-byId.component.ts","webpack:///ng/Templates/scan-barcode.component.html","webpack:///ng/Templates/box-map.component.html","webpack:///ng/app/components/box-map.component.ts","webpack:///ng/Templates/box-audit.component.html","webpack:///ng/app/components/box-audit.component.ts","webpack:///ng/app/components/sample-list-audit.component.ts","webpack:///ng/Templates/sample-list-audit.component.html","webpack:///ng/app/LoadingIndicatorInterceptor.ts","webpack:///ng/app/modules/app.module.ts","webpack:///ng/main.ts","webpack:///$_lazy_route_resource lazy namespace object"],"names":["http","this","get","error","map","res","context","json","isLocal","url","subscribe","r","onLoadingChanged","EventEmitter","requests","req","push","notify","index","indexOf","splice","emit","length","LoadingIndicatorComponent","loadingIndicatorService","loading","isLoading","console","log","globalsService","idle","toastr","vcr","title","idleState","timedOut","contextUrl","setIdle","setTimeout","setInterrupts","onIdleEnd","onTimeout","window","location","assign","onIdleStart","onTimeoutWarning","countdown","warningToastr","reset","watch","IsLocal","isAdmin","Context","Admin","getContext","b","toggleContext","usersUrl","letter","userid","user","UserId","headers","append","post","UserSiteListComponent","userService","IsMember","Locations","LocationId","Name","PrinterIp","LabelFormat","FormatId","editable","filter","l","upsertUser","srcs","err","UserListComponent","letters","split","getUser","selectedUser","getUsers","users","forEach","u","uid","locationsUrl","locationDespatchLocationsUrl","locName","locId","locationId","despatchLocations","bodyString","JSON","stringify","locationService","DespatchLocations","s","LocationMembership","lm","updateDespatchLocations","LocationListComponent","router","selectedLocation","loc","upsertLocation","navigate","getLocationsWithDespatchLocations","sites","LocationsDespatchLocations","getLocations","accordionClick","containersUrl","containerTypesUrl","id","cnt","route","containerService","e","ky","draggedContainer","dragData","previousLocation","Location","getLocationByName","saveContainer","containers","find","ContainerId","concat","cntnr","container","ContainerType","Description","locations","getContainers","c","grouped","getContainerByLocationId","getContainerTypes","containertypes","containerTypes","slocs","arrayOfKeys","n","params","undefined","getAllContainers","getContainersById","BoxsUrl","BoxTypesUrl","_body","_when","box","put","boxid","shouldPrint","startid","endid","boxService","draggedBox","LastLocation","Event","saveBox","svrbox","boxes","BoxId","printLabel","putBox","_box","_loc","BoxType","Destination","LastMoved","Date","User","Status","TrackingAuditId","Observable","forkJoin","getBoxTypes","getBoxs","boxTypes","boxs","getBoxByLocationId","boxtypes","getXHRDataAll","getBoxsById","racksUrl","rak","EscapePipe","value","args","replace","TruncatePipe","len","substr","ToShortDateTimePipe","toShortDateTimeString","BoolToScanDirPipe","rackService","getRacks","cracks","cr","Racks","Container","getRackByContainerId","rack","RackId","saveRack","crack","Rows","Cols","ScanUpDown","draggedRack","prevContainerId","oldCrack","newCrack","svrcr","rr","getAllRacks","getRacksById","samplesUrl","sampno","trackingId","encodeURIComponent","samp","sampid","SampleId","SampleNo","fileToUpload","formData","FormData","name","responseType","observe","toPromise","SoundService","sounds","parse","text","sound","Audio","play","ModalComponent","visible","visibleAnimate","sampleService","removalMessage","SamplesChangedEvt","parent","saveSample","destroySample","reverseSortedSamples","errorToastr","position","sampleRemovedModal","contextSample","hide","show","samples","i","sampleRemoved","soundService","postInProgress","rackIsFull","sampleTypes","margin","top","right","bottom","left","rakid","getSamplesByRackId","currentPos","Row","Col","getRackById","beep","emptyModal","updatePostion","initRack","event","target","entry","toUpperCase","replaceAll","labno","smptypID","regex","RegExp","test","includes","suffix","isNaN","parseInt","sample","SampTypeSuffix","SampleType","DateTime","findIncomplete","tlcs","infoToastr","join","drawRack","successToastr","showToastr","then","toast","dismissToastr","reload","rackFull","el","nativeElement","focus","d3","attr","width","height","svg","maxRow","maxCol","y","domain","x","that","selectAll","data","enter","xAxis","tickSize","yAxis","call","ticks","emptyRackModal","remove","dismiss","evt","totalWidth","screen","d","range","labnoScanned","samplesChanged","emptyRack","smpno","getSampleAudits","sampauds","sampleAudits","response","filename","blob","File","type","saveAs","files","item","postFile","saveToFileSystem","sampleNo","BoxesChangedEvt","perviousParent","ParentBoxId","toString","getSamplesByBoxId","getChildBoxes","getBoxByBoxId","getAllSiteLocations","getDespatchLoctions","childBoxes","allLocations","despatchlocs","moveBoxModal","startsWith","boxId","newbox","fixedBoxId","newBox","setFixedBoxDestintationModal","packChildBox","newBoxId","despatchLocation","childBoxDespatchLocation","despatchLocationNotSelectedModal","emptyBoxModal","modal","yesno","emptyBox","checkEmptyUpdateStatus","moveBoxSamples","resp","getXHRData","boxesChanged","moveBoxModalHandler","onChildBoxDestinationChanged","setFixedBoxDestintationModalHandler","emptyBoxHandler","setContextSample","unpackAnywayModal","queueSampleForPrint","smp","unpackSample","PrintDemogs","printAllLabelsModal","printUnpackLabels","_smp","destroySampleById","getBoxAndContents","unpackAnywayModalHandler","printLabelsHandler","SelectComponentByIdComponent","_path","snapshot","path","sampleno","Title","barCodeScanned","myAPIKey","mapStyle","selectedIndex","locationIndex","marker","airportIcon","document","createElement","classList","add","style","backgroundImage","popup","Popup","anchor","offset","setText","Marker","setLngLat","LngLat","setPopup","addTo","setCenter","setZoom","locIndex","renderMap","Map","mapContainer","center","zoom","addControl","NavigationControl","getBoxLocations","when","locs","on","BoxAuditComponent","content","selectedBox","getBoxSampleAuditsByTrackingID","getBoxAudits","boxauds","boxAudits","body","uploadList","LoadingIndicatorInterceptor","next","onStarted","handle","onFinished","AppModule","provide","useFactory","service","multi","deps","NgDragDropModule","forRoot","redirectTo","pathMatch","component","enableProdMode","bootstrapModule","prototype","getDate","getMonth","getFullYear","getHours","getMinutes","webpackEmptyAsyncContext","Promise","resolve","Error","code","keys","module","exports"],"mappings":"uqBAUa,E,WAyBX,WACUA,2BAAA,KAAAA,O,0DAIE,WAEV,OAAOC,KAAKD,KAAKE,IAAI,eAAdD,OAEJE,YAAKA,OAAU,UAAiBA,EAAMA,OAAS,mBAC/CC,KAAKC,YAEJJ,EAAKK,QAAUD,EAAIE,Y,8BAjCvB,OAAON,KAAKO,S,aAGFA,cACVP,KAAKO,QAAUA,EACfP,KAAKO,iBAAUP,KAAKO,SAAgCP,KAAKO,QACzD,IAAMC,EAAGA,sBAAkBR,KAAKO,SAChCP,KAAKD,KAAKE,IAAIO,GAAdR,OACUE,YAAKA,OAAU,UAAiBA,EAAMA,OAAS,mBACtDO,WAAWC,YACVV,EAAKO,QAAUG,EAAEJ,Y,8BAQrB,OAAON,KAAKK,Y,2CAtBH,GAAc,+B,sDAAd,EA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AGvH,YAAavK,QAAQ,GAIrC,IAHbxM,KAAKue,cAAcxH,WAAYvK,QAAQ,GAGf,KAFxB,IAAOxM,KAAKwe,WAAWzH,YAAavK,QAAQ,GAET,KADjC,IAAOxM,KAAKye,aAAa1H,YAAavK,QAAQ,K,mBClB9D,SAASkS,EAAyB5d,GAGjC,OAAO6d,QAAQC,UAAUrL,MAAK,WAC7B,IAAI7L,EAAI,IAAImX,MAAM,uBAAyB/d,EAAM,KAEjD,MADA4G,EAAEoX,KAAO,mBACHpX,KAGRgX,EAAyBK,KAAO,WAAa,MAAO,IACpDL,EAAyBE,QAAUF,EACnCM,EAAOC,QAAUP,EACjBA,EAAyBpX,GAAK,S","file":"x","sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { Location, Context, Container, ContainerType } from '../types';\r\nimport { Headers, Response, Http, RequestOptions } from '@angular/http';\r\n//import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';\r\n//import { LocationService } from './location.service';\r\nimport { Observable } from 'rxjs/Rx'\r\n\r\n//import 'rxjs/add/operator/map';\r\nimport 'rxjs/add/operator/catch';\r\n@Injectable()\r\nexport class GlobalsService {\r\n private isLocal: boolean;\r\n\r\n get IsLocal(): boolean {\r\n return this.isLocal;\r\n }\r\n\r\n set IsLocal(isLocal: boolean) {\r\n this.isLocal = isLocal;\r\n this.isLocal = this.isLocal === undefined ? false : this.isLocal;\r\n const url = `api/context/${this.isLocal}`;\r\n this.http.get(url)\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'))\r\n .subscribe((r: Response) => {\r\n this.isLocal = r.json()\r\n //console.log('in global svc - ' + this.isLocal);\r\n //window.location.reload(true)\r\n })\r\n }\r\n\r\n private context: Context;\r\n get Context(): Context {\r\n return this.context;\r\n }\r\n\r\n constructor(\r\n private http: Http,\r\n //private locationService: LocationService\r\n ) { }\r\n\r\n getContext(): Observable {\r\n //sessionStorage.setItem(\"source\", JSON.stringify(source));\r\n return this.http.get(`api/context`)\r\n .catch(\r\n (error: any) => Observable.throw(error.error || 'Server error'))\r\n .map((res: Response) => {\r\n //console.log(res)\r\n this.context = res.json(); //console.log('svc', this.Context);\r\n return;\r\n });\r\n }\r\n}\r\n","import { Injectable, EventEmitter } from '@angular/core';\r\nimport { HttpRequest } from '@angular/common/http';\r\n\r\n@Injectable()\r\nexport class LoadingIndicatorService {\r\n\r\n constructor() { }\r\n onLoadingChanged: EventEmitter = new EventEmitter();\r\n\r\n /**\r\n * Stores all currently active requests\r\n */\r\n private requests: HttpRequest[] = [];\r\n\r\n /**\r\n * Adds request to the storage and notifies observers\r\n */\r\n onStarted(req: HttpRequest): void {\r\n //console.log(\"onStarted\", req)\r\n this.requests.push(req);\r\n this.notify();\r\n }\r\n\r\n /**\r\n * Removes request from the storage and notifies observers\r\n */\r\n onFinished(req: HttpRequest): void {\r\n //console.log(\"onFinihed\", req);\r\n const index = this.requests.indexOf(req);\r\n if (index !== -1) {\r\n this.requests.splice(index, 1);\r\n }\r\n this.notify();\r\n }\r\n\r\n /**\r\n * Notifies observers about whether there are any requests on fly\r\n */\r\n private notify(): void {\r\n this.onLoadingChanged.emit(this.requests.length !== 0);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { LoadingIndicatorService } from '../services/loading-indicator.service';\r\n\r\n@Component({\r\n selector: 'app-loading-indicator',\r\n templateUrl: '../../Templates/loading-indicator.component.html',\r\n styleUrls: ['./loading-indicator.component.css']\r\n})\r\nexport class LoadingIndicatorComponent implements OnInit {\r\n loading: boolean = false;\r\n constructor(private loadingIndicatorService: LoadingIndicatorService) {\r\n //console.log(\"component constructed\");\r\n this.loadingIndicatorService\r\n .onLoadingChanged\r\n .subscribe(isLoading => {\r\n console.log (\"onLoadingChanged ....\")\r\n this.loading = isLoading;\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n}\r\n","\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n","import { Component, OnInit, ViewContainerRef } from '@angular/core';\r\nimport { Http } from '@angular/http';\r\n//import { Headers, Response, RequestOptions } from '@angular/http';\r\nimport { GlobalsService } from '../services/global.service';\r\n//import { Location } from '../types';\r\nimport { ToastrManager } from 'ng6-toastr-notifications';\r\nimport { Idle, DEFAULT_INTERRUPTSOURCES } from '@ng-idle/core';\r\n\r\n//import { Observable } from 'rxjs/Rx';\r\n//import { LocationService } from './location.service';\r\n/* import 'rxjs/add/operator/map';\r\nimport 'rxjs/add/operator/catch';\r\nimport { window } from 'rxjs/operator/window'; */\r\n\r\n\r\n@Component({\r\n moduleId: module.id,\r\n selector: 'my-app',\r\n templateUrl: '../../Templates/app.component.html',\r\n // styleUrls : ['/Content/sidebar.css']\r\n})\r\nexport class AppComponent implements OnInit {\r\n title = 'Home';\r\n isLocal: boolean;\r\n isAdmin: boolean;\r\n //location: Location;\r\n idleState = 'Not started.';\r\n timedOut = false;\r\n private contextUrl = 'api/context';\r\n\r\n constructor(\r\n private http: Http,\r\n private globalsService: GlobalsService,\r\n private idle: Idle,\r\n private toastr: ToastrManager,\r\n private vcr: ViewContainerRef) {\r\n //this.toastr.setRootViewContainerRef(vcr);\r\n // sets an idle timeout of 5 seconds, for testing purposes.\r\n idle.setIdle(600);\r\n // sets a timeout period of 5 seconds. after 10 seconds of inactivity, the user will be considered timed out.\r\n idle.setTimeout(600);\r\n // sets the default interrupts, in this case, things like clicks, scrolls, touches to the document\r\n idle.setInterrupts(DEFAULT_INTERRUPTSOURCES);\r\n\r\n idle.onIdleEnd.subscribe(() => {\r\n this.idleState = 'No longer idle.';\r\n //console.log(this.idleState);\r\n });\r\n idle.onTimeout.subscribe(() => {\r\n this.idleState = 'Timed out!';\r\n this.timedOut = true;\r\n //console.log(this.idleState);\r\n window.location.assign('/account/logoff');\r\n });\r\n idle.onIdleStart.subscribe(() => this.idleState = 'You\\'ve gone idle!');\r\n idle.onTimeoutWarning.subscribe((countdown: number) => {\r\n this.idleState = 'You will time out in ' + countdown + ' seconds!';\r\n if (countdown <= 10) {\r\n this.toastr.warningToastr(this.idleState, \"**********\")\r\n }\r\n });\r\n this.reset();\r\n }\r\n\r\n\r\n reset() {\r\n this.idle.watch();\r\n this.idleState = 'Started.';\r\n //console.log(this.idleState);\r\n this.timedOut = false;\r\n }\r\n\r\n toggleContext(): void {\r\n //console.log(this.isLocal);\r\n this.globalsService.IsLocal = this.isLocal;\r\n this.isAdmin = this.globalsService.Context.Admin;\r\n //location.reload();\r\n //this.globalsService.toggleContext(this.isLocal);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.globalsService.getContext().subscribe(b => {\r\n this.isAdmin = this.globalsService.Context.Admin;\r\n //console.log('location', this.globalsService.Context.Location);\r\n //console.log('global ctxt', this.globalsService.Context);\r\n });\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { User } from '../types';\r\n//import { Headers, Response, Http, RequestOptions } from '@angular/http';\r\nimport { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';\r\nimport { Observable } from 'rxjs/Rx'\r\nimport 'rxjs/add/operator/toPromise';\r\nimport 'rxjs/add/operator/map';\r\nimport 'rxjs/add/operator/catch';\r\n\r\n@Injectable()\r\nexport class UserService {\r\n private usersUrl = 'api/users';\r\n\r\n constructor(private http: HttpClient) { }\r\n\r\n getUsers(letter : string): Observable {\r\n const url = `api/users/${letter}`;\r\n return this.http.get(url)\r\n //.map((res:Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n getUser(userid: number): Observable {\r\n const url = `api/user/${userid}`;\r\n return this.http.get(url)\r\n //.map((res:Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n upsertUser(user: User): Observable {\r\n const url = `api/user/${user.UserId}`;\r\n //let bodyString = JSON.stringify(user); // Stringify payload\r\n let headers = new HttpHeaders();\r\n headers = headers.append(\"Content-Type\", \"application/json\"); // ... Set content type to JSON\r\n return this.http.post(url, user, { headers: headers }) // ...using put request\r\n .catch((error: any) => Observable.throw(error.error || 'Server error')); //...errors if any\r\n\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{loc.Name}}\r\n \r\n
\r\n
\r\n
\r\n
\r\n","import { Component, Input } from '@angular/core';\r\nimport { User, Site, Location, LocationMembership } from '../types';\r\nimport { NgbModule } from '@ng-bootstrap/ng-bootstrap';\r\nimport { UserService } from '../services/user.service';\r\n\r\n@Component({\r\n moduleId : module.id,\r\n selector : 'user-sites',\r\n templateUrl : '../../Templates/user-sites-list.component.html',\r\n styles : [ `\r\n td{font-family : monospace;}\r\n table { background-color: white;\r\n border-collapse: collapse;\r\n width:100%;\r\n }\r\n table, th, td {\r\n border: 1px solid black;\r\n padding : 5px;\r\n }`\r\n ]\r\n})\r\n\r\nexport class UserSiteListComponent {\r\n @Input() sites : Site[];\r\n @Input() user : User;\r\n constructor(\r\n private userService : UserService\r\n ){}\r\n onMemberShipChanged(location: LocationMembership) : void {\r\n //this.selectedLocation = location;\r\n if (location.IsMember) {\r\n this.user.Locations.push({ LocationId: location.LocationId, Name: location.Name, PrinterIp: \"\", LabelFormat: { FormatId: 0, Name: \"\" }, editable: false });\r\n }\r\n else {\r\n this.user.Locations = this.user.Locations.filter(l => l.LocationId !== location.LocationId);\r\n }\r\n //console.log(location);\r\n //console.log(this.user);\r\n this.userService.upsertUser(this.user)\r\n .subscribe(\r\n srcs => console.log(srcs),\r\n err => console.log(err));\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{letter}}
\r\n
\r\n
\r\n
\r\n
Users
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
LogonNameEmailAdmin
\r\n {{user.ShortName}} \r\n \r\n \r\n {{user.DisplayName}} \r\n \r\n \r\n {{user.Email}} \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Sites
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, Input } from '@angular/core';\r\nimport { OnInit } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { User } from '../types';\r\nimport { UserService } from '../services/user.service';\r\n\r\n@Component({\r\n moduleId: module.id,\r\n selector : 'users',\r\n styles: [`.sticky {\r\n position: fixed;\r\n top: 5%;\r\n right: 0;\r\n width: 45%;\r\n overflow: auto;\r\n height:100%;\r\n}`],\r\n templateUrl: '../../Templates/user-list.component.html'\r\n})\r\n\r\nexport class UserListComponent implements OnInit {\r\n //@Input() users : User[];\r\n users: User[];\r\n selectedUser: User;\r\n letters: string[] = (\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\").split('');\r\n\r\n constructor(\r\n private userService: UserService\r\n ) { }\r\n\r\n onSelect(user: User): void {\r\n this.userService.getUser(user.UserId).subscribe(\r\n user => {\r\n this.selectedUser = user;\r\n }\r\n )}\r\n\r\n onLetterClicked(letter: string): void {\r\n this.userService.getUsers(letter)\r\n .subscribe(\r\n users => {\r\n users.forEach(u => u.editable = false);\r\n this.users = users;\r\n }, //Bind to view\r\n err => console.log(err));\r\n }\r\n\r\n getUsers(): void {\r\n this.userService.getUsers(\"A\")\r\n .subscribe(\r\n users => {\r\n users.forEach(u => u.editable = false);\r\n this.users = users;\r\n }, //Bind to view\r\n err => console.log(err));\r\n }\r\n\r\n toggleEditable(user: User): void {\r\n user.editable = !(user.editable);\r\n }\r\n\r\n save(user: User): void {\r\n user.editable = false;\r\n console.log(user);\r\n this.userService.upsertUser(user)\r\n .subscribe(uid => console.log(uid), err => console.log(err));\r\n }\r\n\r\n ngOnInit(): void {\r\n this.getUsers();\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { User, Location, Site, SiteLocationsDespatchLocation, LocationsDespatchLocation } from '../types';\r\n//import { Headers, Response, Http, RequestOptions } from '@angular/http';\r\nimport { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';\r\nimport { Observable } from 'rxjs/Rx'\r\nimport 'rxjs/add/operator/toPromise';\r\nimport 'rxjs/add/operator/map';\r\nimport 'rxjs/add/operator/catch';\r\n\r\n@Injectable()\r\nexport class LocationService {\r\n private locationsUrl = 'api/locations';\r\n private locationDespatchLocationsUrl = '/api/despatchlocations';\r\n constructor(private http: HttpClient) { }\r\n\r\n getLocations(): Observable {\r\n return this.http.get(this.locationsUrl)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n getLocationsWithDespatchLocations(): Observable {\r\n return this.http.get(this.locationDespatchLocationsUrl)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n getAllSiteLocations(): Observable {\r\n return this.http.get('api/alllocations')\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n getDespatchLoctions(): Observable {\r\n const url = `api/despatchlocationsforlocid`;\r\n return this.http.get(url)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n getLocationByName(locName: string): Observable {\r\n const url = `api/location/${locName}`;\r\n return this.http.get(url)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n getLocationById(locId: number): Observable {\r\n const url = `api/location/${locId}`;\r\n return this.http.get(url)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n updateDespatchLocations(locationId: number, despatchLocations: number[]) {\r\n const url = `api/despatchlocations/${locationId}`;\r\n console.log(url);\r\n let bodyString = JSON.stringify(despatchLocations); // Stringify payload\r\n let headers = new HttpHeaders();\r\n headers = headers.append(\"Content-Type\", \"application/json\"); // ... Set content type to JSON\r\n return this.http.post(url, bodyString, { headers: headers }) // ...using post request\r\n .catch((error: any) => Observable.throw(error.error || 'Server error')); //...errors if any\r\n }\r\n\r\n upsertLocation(location: Location): Observable {\r\n console.log('in service');\r\n const url = `api/location/${location.LocationId}`;\r\n console.log(url);\r\n let bodyString = JSON.stringify(location); // Stringify payload\r\n let headers = new HttpHeaders();\r\n headers = headers.append(\"Content-Type\", \"application/json\"); // ... Set content type to JSON\r\n return this.http.post(url, location, { headers: headers }) // ...using post request\r\n .catch((error: any) => Observable.throw(error.error || 'Server error')); //...errors if any\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{loc.Name}}\r\n \r\n
\r\n
\r\n
\r\n
\r\n","//loc-despatch-locs-list.component.ts\r\nimport { Component, Input } from '@angular/core';\r\nimport { SiteLocationsDespatchLocation, LocationsDespatchLocation, LocationMembership } from '../types';\r\nimport { NgbModule } from '@ng-bootstrap/ng-bootstrap';\r\nimport { LocationService } from '../services/location.service';\r\nimport * as _ from 'underscore';\r\n\r\n@Component({\r\n moduleId: module.id,\r\n selector: 'location-despatch-sites',\r\n templateUrl: '../../Templates/location-despatch-sites.component.html',\r\n styles: [`\r\n td{font-family : monospace;}\r\n table { background-color: white;\r\n border-collapse: collapse;\r\n width:100%;\r\n }\r\n table, th, td {\r\n border: 1px solid black;\r\n padding : 5px;\r\n }`\r\n ]\r\n})\r\n\r\nexport class LocationDespatchSitesComponent {\r\n @Input() sites: SiteLocationsDespatchLocation[];\r\n @Input() location: LocationsDespatchLocation;\r\n constructor(\r\n private locationService: LocationService\r\n ) { }\r\n\r\n onMemberShipChanged(location: LocationMembership): void {\r\n \r\n console.log(this.location);\r\n let despatchLocations = _.filter(\r\n _.flatten(this.location.DespatchLocations.map(s => s.LocationMembership.map(lm => lm.IsMember ? lm.LocationId : 0)), true), l => l > 0);\r\n console.log(despatchLocations);\r\n this.locationService.updateDespatchLocations(this.location.LocationId, despatchLocations)\r\n .subscribe(uid => console.log(uid), err => console.log(err));\r\n }\r\n}\r\n","
Locations
\r\n\r\n \r\n \r\n
\r\n
\r\n {{loc.Name}} \r\n \r\n
\r\n
\r\n {{loc.PrinterIp}} \r\n \r\n
\r\n
\r\n {{loc.LabelFormat.Name}} \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Despatch locations
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, Input } from '@angular/core';\r\nimport { OnInit } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { Location, User, Site, LocationsDespatchLocation, SiteLocationsDespatchLocation } from '../types';\r\nimport { LocationService } from '../services/location.service';\r\nimport * as _ from 'underscore';\r\n\r\n@Component({\r\n moduleId: module.id,\r\n //selector : 'users',\r\n templateUrl: '../../Templates/site-locations-list.component.html'\r\n})\r\n\r\nexport class LocationListComponent implements OnInit {\r\n sites: SiteLocationsDespatchLocation[];\r\n selectedLocation: LocationsDespatchLocation;\r\n constructor(\r\n private router: Router,\r\n private locationService: LocationService\r\n ) { }\r\n\r\n onSelect(location: LocationsDespatchLocation): void {\r\n console.log(location);\r\n this.selectedLocation = location;\r\n }\r\n\r\n toggleEditable(loc: LocationsDespatchLocation): void {\r\n loc.editable = !loc.editable;\r\n }\r\n\r\n accordionClick() {\r\n //this.selectedLocation = null;\r\n }\r\n\r\n //save(loc: LocationsDespatchLocation): void {\r\n save(loc: any): void { // TK: fix the service\r\n loc.editable = false;\r\n this.locationService.upsertLocation(loc)\r\n .subscribe(uid => console.log(uid), err => console.log(err));\r\n }\r\n\r\n containers(loc: LocationsDespatchLocation): void {\r\n //alert(loc.LocationId);\r\n this.router.navigate(['/containers', loc.LocationId]);\r\n }\r\n\r\n getLocations(): void {\r\n this.locationService.getLocationsWithDespatchLocations()\r\n .subscribe(\r\n sites => {\r\n sites.forEach(s => \r\n s.LocationsDespatchLocations.forEach(l => l.editable = false)\r\n )\r\n //this.sites = _.sortBy(sites, (n => n)); //WTF ?\r\n this.sites = sites;\r\n }, //Bind to view\r\n err => console.log(err));\r\n }\r\n\r\n ngOnInit(): void {\r\n this.getLocations();\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Container, ContainerType } from '../types';\r\n//import { Headers, Response, Http, RequestOptions } from '@angular/http';\r\nimport { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';\r\nimport { Observable } from 'rxjs/Rx'\r\nimport 'rxjs/add/operator/toPromise';\r\n\r\nimport 'rxjs/add/operator/map';\r\nimport 'rxjs/add/operator/catch';\r\n@Injectable()\r\nexport class ContainerService {\r\n private containersUrl = 'api/containers';\r\n private containerTypesUrl = 'api/containertypes';\r\n\r\n constructor(private http: HttpClient) { }\r\n\r\n getContainers(): Observable {\r\n return this.http.get(this.containersUrl)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n getContainerByLocationId(id: Number): Observable {\r\n const url = `api/containers/${id}`;\r\n return this.http.get(url)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n getContainerTypes(): Observable {\r\n return this.http.get(this.containerTypesUrl)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n saveContainer(cnt: Container): Observable {\r\n return this.http.post(this.containersUrl, cnt)\r\n //.map((res: Response) => +res.text())\r\n .catch((error: any) => Observable.throw(error || 'Server error'));\r\n }\r\n}\r\n","
Containers
\r\n \r\n \r\n \r\n {{ky}}\r\n \r\n \r\n \r\n
\r\n
\r\n {{c.Description}} \r\n \r\n
\r\n
\r\n {{c.ContainerType}} \r\n \r\n
\r\n
\r\n {{c.Location.Name}} \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, Input, OnInit } from '@angular/core';\r\nimport { Router, ActivatedRoute, Params } from '@angular/router';\r\nimport { Container, ContainerType, Location } from '../types';\r\nimport { ContainerService } from '../services/container.service';\r\nimport { LocationService } from '../services/location.service';\r\nimport 'rxjs/add/operator/switchMap';\r\nimport * as _ from 'underscore';\r\n\r\n@Component({\r\n moduleId: module.id,\r\n //selector : 'users',\r\n templateUrl: '../../Templates/container-list.component.html'\r\n //template : '

Containers

'\r\n})\r\n\r\nexport class ContainerListComponent implements OnInit {\r\n containers: _.Dictionary;\r\n containerTypes: ContainerType[];\r\n locations: Location[];\r\n arrayOfKeys: string[];\r\n selectedLocation: Location;\r\n constructor(\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private containerService: ContainerService,\r\n private locationService: LocationService\r\n ) { }\r\n\r\n onSelect(location: Location): void {\r\n this.selectedLocation = location;\r\n }\r\n\r\n onItemDrop(e: any, ky: string): void {\r\n // Get the dropped data here \r\n let draggedContainer: Container = e.dragData;\r\n let previousLocation = draggedContainer.Location.Name;\r\n this.locationService.getLocationByName(ky)\r\n .subscribe(loc => {\r\n draggedContainer.Location = loc;\r\n this.containerService.saveContainer(draggedContainer)\r\n .subscribe(id => {\r\n this.containers[previousLocation] = _.without(this.containers[previousLocation], this.containers[previousLocation].find(cnt => cnt.ContainerId == id));\r\n this.containers[ky] = this.containers[ky].concat(draggedContainer);\r\n },\r\n err => console.log(err));\r\n });\r\n }\r\n\r\n toggleEditable(cntnr: Container): void {\r\n cntnr.editable = !cntnr.editable;\r\n }\r\n\r\n save(cntnr: Container): void {\r\n cntnr.editable = false;\r\n this.containerService.saveContainer(cntnr)\r\n .subscribe(id => cntnr.ContainerId = id, err => console.log(err));\r\n }\r\n\r\n racks(container: Container): void {\r\n //alert(loc.LocationId);\r\n this.router.navigate(['/racks', container.ContainerId]);\r\n }\r\n\r\n create(loc: string): void {\r\n let _loc = _.find(this.locations, (l => l.Name == loc));\r\n let cntnr = {\r\n ContainerId: -1,\r\n ContainerType: '',\r\n Description: 'New',\r\n Location: _loc,\r\n editable: true\r\n }\r\n switch (this.containers[loc] === undefined) {\r\n case true:\r\n this.containers[loc] = [cntnr];\r\n break;\r\n default:\r\n this.containers[loc].push(cntnr);\r\n }\r\n console.log(loc);\r\n }\r\n\r\n getAllContainers(): void {\r\n //console.log('get all')\r\n this.containerService.getContainers()\r\n .subscribe(\r\n containers => {\r\n containers.forEach(c => c.editable = false);\r\n let grouped = _.groupBy(containers, (c => c.Location.Name));\r\n //this.arrayOfKeys = _.sortBy(Object.keys(grouped), (n => n));\r\n this.containers = grouped;\r\n }, //Bind to view\r\n err => console.log(err));\r\n }\r\n\r\n getContainersById(id: Number): void {\r\n //console.log('in by Id')\r\n this.containerService.getContainerByLocationId(id)\r\n .subscribe(\r\n containers => {\r\n containers.forEach(c => c.editable = false);\r\n let grouped = _.groupBy(containers, (c => c.Location.Name));\r\n //this.arrayOfKeys = _.sortBy(Object.keys(grouped), (n => n)); // arrayOfKeys needs to be gen from locations, otherwise empty ones don't display.\r\n this.containers = grouped;\r\n }, //Bind to view\r\n err => console.log(err));\r\n }\r\n\r\n\r\n getContainerTypes(): void {\r\n //console.log('ctypes');\r\n this.containerService.getContainerTypes()\r\n .subscribe(\r\n containertypes => {\r\n this.containerTypes = containertypes;\r\n }, //Bind to view\r\n err => console.log(err));\r\n }\r\n\r\n getLocations(): void {\r\n //console.log('locs');\r\n this.locationService.getLocations()\r\n .subscribe(\r\n sites => {\r\n var slocs = _.map(sites, (s => s.Locations));\r\n this.locations = _.flatten(slocs, false);\r\n this.arrayOfKeys = _.sortBy(_.map(this.locations, l => l.Name), (n => n));\r\n //console.log(this.arrayOfKeys);\r\n }, //Bind to view\r\n err => console.log(err));\r\n }\r\n\r\n ngOnInit(): void {\r\n this.route.params\r\n .subscribe((params: Params) => {\r\n console.log(params['id'])\r\n this.getContainerTypes()\r\n this.getLocations()\r\n if (params['id'] == undefined) { this.getAllContainers() }\r\n else { this.getContainersById(+params['id']) }\r\n });\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Box, BoxType, BoxAudit, PointerLocation } from '../types';\r\n//import { Headers, Response, Http, RequestOptions } from '@angular/http';\r\nimport { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';\r\nimport { Observable } from 'rxjs/Rx'\r\nimport 'rxjs/add/operator/toPromise';\r\n\r\nimport 'rxjs/add/operator/map';\r\nimport 'rxjs/add/operator/catch';\r\n@Injectable()\r\nexport class BoxService {\r\n private BoxsUrl = 'api/boxes';\r\n private BoxTypesUrl = 'api/boxtypes';\r\n\r\n constructor(private http: HttpClient) { }\r\n\r\n getBoxs(): Observable {\r\n return this.http.get(this.BoxsUrl)\r\n //.map((res:Response) => res.json())\r\n .catch((error: any) => Observable.throw(error || 'Server error'));\r\n }\r\n\r\n getBoxByLocationId(id: Number): Observable {\r\n const url = `api/boxes/${id}`;\r\n return this.http.get(url)\r\n //.map((res:Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n getChildBoxes(id: number): Observable {\r\n const url = `api/childboxes/${id}`;\r\n return this.http.get(url)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n getBoxByBoxId(id: Number): Observable {\r\n const url = `api/box/${id}`;\r\n return this.http.get(url)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n printLabel(id: Number): Observable {\r\n const url = `api/boxlabel/${id}`;\r\n return this.http.get(url)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error._body || 'Server error'));\r\n }\r\n\r\n getBoxAudits(id: number): Observable {\r\n const url = `api/boxaudit/${id}`;\r\n return this.http.get(url)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n getBoxLocations(id: Number, _when: Date): Observable {\r\n const url = `/api/boxmap/${id}/${_when}`\r\n return this.http.get(url)\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n getBoxTypes(): Observable {\r\n return this.http.get(this.BoxTypesUrl)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n saveBox(box: Box): Observable {\r\n return this.http.post(this.BoxsUrl, box)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n putBox(box: Box): Observable {\r\n return this.http.put(this.BoxsUrl, box)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n printUnpackLabels(boxid: number, shouldPrint: number): Observable {\r\n const url = `api/printlabelqueue/${boxid}/${shouldPrint}`;\r\n return this.http.post(url,null)\r\n .catch((error: any) => Observable.throw(error || 'Server error'));\r\n }\r\n\r\n emptyBox(boxid: number): Observable {\r\n const url = `api/boxempty/${boxid}`;\r\n return this.http.post(url, null)\r\n .catch((error: any) => Observable.throw(error || 'Server error'));\r\n }\r\n\r\n moveBoxSamples(startid: number, endid: number): Observable {\r\n const url = `api/moveboxsamples/${startid}/${endid}`;\r\n return this.http.post(url, null)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error || 'Server error'));\r\n }\r\n\r\n packChildBox(box: Box): Observable {\r\n return this.http.post('api/packchildbox', box)\r\n //.map((res: Response) => res.json())\r\n .catch((error: Response) => Observable.throw(error || 'Server error'));\r\n }\r\n}\r\n","
Boxes
\r\n \r\n \r\n \r\n \r\n {{ky}} \r\n \r\n \r\n \r\n\r\n
\r\n
\r\n {{b.Description}} \r\n \r\n
\r\n
\r\n {{b.BoxType}} \r\n \r\n
\r\n
\r\n {{b.LastLocation.Name}} \r\n \r\n
\r\n
\r\n {{b.Status}} \r\n 0\" (click)=\"printLabel(b)\" class=\"clickable\" >\"barcode\"\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, Input, OnInit } from '@angular/core';\r\nimport { Router, ActivatedRoute, Params } from '@angular/router';\r\nimport { Box, BoxType, Location } from '../types';\r\nimport { BoxService } from '../services/box.service';\r\nimport { LocationService } from '../services/location.service';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/operator/switchMap';\r\nimport * as _ from 'underscore';\r\nimport { ToastrManager, Toastr } from 'ng6-toastr-notifications';\r\n\r\n@Component({\r\n moduleId: module.id,\r\n //selector : 'users',\r\n templateUrl: '../../Templates/box-list.component.html'\r\n //template : '

Boxs

'\r\n})\r\n\r\nexport class BoxListComponent implements OnInit {\r\n boxes: _.Dictionary;\r\n boxTypes: BoxType[];\r\n locations: Location[];\r\n arrayOfKeys: string[];\r\n selectedLocation: Location;\r\n constructor(\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private boxService: BoxService,\r\n private locationService: LocationService\r\n ) { }\r\n\r\n onSelect(location: Location): void {\r\n this.selectedLocation = location;\r\n }\r\n\r\n onItemDrop(e: any, ky: string): void {\r\n // Get the dropped data here\r\n let draggedBox: Box = e.dragData;\r\n let previousLocation = draggedBox.LastLocation.Name;\r\n this.locationService.getLocationByName(ky)\r\n .subscribe(loc => {\r\n draggedBox.LastLocation = loc;\r\n draggedBox.Event = 'Moved from ' + previousLocation + ' to ' + loc.Name;\r\n this.boxService.saveBox(draggedBox)\r\n .subscribe(svrbox => {\r\n this.boxes[previousLocation] = _.without(this.boxes[previousLocation], this.boxes[previousLocation].find(box => box.BoxId == svrbox.BoxId));\r\n this.boxes[ky] = this.boxes[ky].concat(draggedBox);\r\n },\r\n err => console.log(err));\r\n });\r\n }\r\n\r\n toggleEditable(box: Box): void {\r\n box.editable = !box.editable;\r\n }\r\n\r\n printLabel(box: Box): void {\r\n this.boxService.printLabel(box.BoxId)\r\n .subscribe(box =>\r\n console.log(box)\r\n )\r\n }\r\n\r\n save(box: Box): void {\r\n box.editable = false;\r\n //console.log(box, 'being saved');\r\n var loc = box.LastLocation.Name;\r\n switch (box.BoxId) {\r\n case -1:\r\n this.boxService.putBox(box)\r\n .subscribe(_box => {\r\n console.log(_box.BoxId);\r\n if (this.boxes[loc] != undefined) {\r\n this.boxes[loc] = _.without(this.boxes[loc], box);\r\n this.boxes[loc].push(_box);\r\n }\r\n else {\r\n this.boxes[loc] = [_box];\r\n }\r\n console.log(box);\r\n }, err => console.log(err));\r\n break;\r\n default:\r\n this.boxService.saveBox(box)\r\n .subscribe(_box => {\r\n console.log(_box.BoxId);\r\n if (this.boxes[loc] != undefined) {\r\n this.boxes[loc] = _.without(this.boxes[loc], box);\r\n this.boxes[loc].push(_box);\r\n }\r\n else {\r\n this.boxes[loc] = [_box];\r\n }\r\n console.log(box);\r\n }, err => console.log(err));\r\n break;\r\n }\r\n }\r\n\r\n racks(box: Box): void {\r\n this.router.navigate(['/racks', box.BoxId]);\r\n }\r\n\r\n create(loc: string): void {\r\n let _loc = _.find(this.locations, (l => l.Name == loc));\r\n let box = {\r\n BoxId: -1,\r\n BoxType: '',\r\n Description: 'New',\r\n LastLocation: _loc,\r\n Destination: _loc,\r\n LastMoved: new Date(),\r\n User: '',\r\n Status: 'Unpacked',\r\n Event: 'Created',\r\n TrackingAuditId: '',\r\n editable: true\r\n }\r\n if (this.boxes[loc] != undefined) {\r\n this.boxes[loc].push(box);\r\n }\r\n else {\r\n this.boxes[loc] = [box];\r\n }\r\n }\r\n\r\n contents(box: Box): void {\r\n this.router.navigate(['/packsamples', box.BoxId]);\r\n }\r\n\r\n audit(box: Box): void {\r\n this.router.navigate(['/boxaudit', box.BoxId]);\r\n }\r\n\r\n getXHRDataAll() :void {\r\n Observable.forkJoin(\r\n this.boxService.getBoxTypes(),\r\n this.locationService.getLocations(),\r\n this.boxService.getBoxs()\r\n )\r\n .subscribe( res => {\r\n this.boxTypes = res[0];\r\n var slocs = _.map(res[1], (s => s.Locations));\r\n this.locations = _.flatten(slocs, false);\r\n this.arrayOfKeys = _.sortBy(_.map(this.locations, l => l.Name), (n => n));\r\n res[2].forEach(b => b.editable = false);\r\n let grouped = _.groupBy(res[2], (b => b.LastLocation.Name));\r\n this.boxes = grouped;\r\n }\r\n )}\r\n\r\n getAllBoxs(): void {\r\n this.boxService.getBoxs()\r\n .subscribe(\r\n boxs => {\r\n boxs.forEach(b => b.editable = false);\r\n let grouped = _.groupBy(boxs, (b => b.LastLocation.Name));\r\n //this.arrayOfKeys = _.sortBy(Object.keys(grouped), (n => n));\r\n this.boxes = grouped;\r\n }, //Bind to view\r\n err => console.log(err));\r\n }\r\n\r\n getBoxsById(id: Number): void {\r\n this.boxService.getBoxByLocationId(id)\r\n .subscribe(\r\n boxs => {\r\n boxs.forEach(b => b.editable = false);\r\n let grouped = _.groupBy(boxs, (b => b.LastLocation.Name));\r\n //this.arrayOfKeys = _.sortBy(Object.keys(grouped), (n => n));\r\n this.boxes = grouped;\r\n }, //Bind to view\r\n err => console.log(err));\r\n }\r\n\r\n getBoxTypes(): void {\r\n this.boxService.getBoxTypes()\r\n .subscribe(\r\n boxtypes => {\r\n this.boxTypes = boxtypes;\r\n console.log(this.boxTypes);\r\n }, //Bind to view\r\n err => console.log(err));\r\n }\r\n\r\n getLocations(): void {\r\n this.locationService.getLocations()\r\n .subscribe(\r\n sites => {\r\n var slocs = _.map(sites, (s => s.Locations));\r\n this.locations = _.flatten(slocs, false);\r\n this.arrayOfKeys = _.sortBy(_.map(this.locations, l => l.Name), (n => n));\r\n }, //Bind to view\r\n err => console.log(err));\r\n }\r\n\r\n ngOnInit(): void {\r\n this.route.params\r\n .subscribe((params: Params) => {\r\n if (params['id'] == undefined) { this.getXHRDataAll() }\r\n else {\r\n this.getBoxTypes()\r\n this.getBoxsById(+params['id'])\r\n this.getLocations()\r\n }\r\n });\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Rack, ContainerRack } from '../types';\r\n//import { Headers, Response, Http, RequestOptions } from '@angular/http';\r\nimport { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';\r\nimport { Observable } from 'rxjs/Rx'\r\nimport 'rxjs/add/operator/toPromise';\r\n\r\nimport 'rxjs/add/operator/map';\r\nimport 'rxjs/add/operator/catch';\r\n@Injectable()\r\nexport class RackService {\r\n private racksUrl = 'api/racks';\r\n\r\n constructor(private http: HttpClient) { }\r\n\r\n getRacks(): Observable {\r\n return this.http.get(this.racksUrl)\r\n //.map((res:Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n getRackById(id: number): Observable {\r\n const url = `api/rack/${id}`;\r\n return this.http.get(url)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n getRackByContainerId(id: number): Observable {\r\n const url = `api/racks/${id}`;\r\n return this.http.get(url)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error.error || 'Server error'));\r\n }\r\n\r\n saveRack(rak: any): Observable {\r\n return this.http.post(this.racksUrl, rak)\r\n //.map((res: Response) => +res.text())\r\n .catch((error: any) => Observable.throw(error || 'Server error'));\r\n }\r\n} \r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({ name: 'escape' })\r\nexport class EscapePipe implements PipeTransform {\r\n transform(value: string, args: string[]): any {\r\n if (!value) return value;\r\n return value.replace('\\'', '');\r\n }\r\n}\r\n\r\n@Pipe({ name: 'truncate' })\r\nexport class TruncatePipe implements PipeTransform {\r\n transform(value: string, args: string[]): any {\r\n if (!value) return value;\r\n let len = +args[0];\r\n return value.substr(0, len) + '...';\r\n }\r\n}\r\n\r\n@Pipe({ name: 'toShortDateTime' })\r\nexport class ToShortDateTimePipe implements PipeTransform {\r\n transform(value: Date, args: string[]): any {\r\n if (!value) return value;\r\n return value.toShortDateTimeString();\r\n }\r\n}\r\n\r\n@Pipe({ name: 'boolToScanDir' })\r\nexport class BoolToScanDirPipe implements PipeTransform {\r\n transform(value: boolean): any {\r\n if (value) {\r\n return \"UpDown\";\r\n }\r\n else {\r\n return \"LeftRight\";\r\n }\r\n }\r\n}\r\n","
Racks
\r\n \r\n \r\n \r\n {{cr.Container.Description}}\r\n \r\n \r\n \r\n
\r\n
\r\n
Rows
\r\n
Cols
\r\n
\r\n
\r\n
\r\n {{rr.Description}} \r\n \r\n
\r\n
\r\n {{rr.Rows}} \r\n \r\n
\r\n
\r\n {{rr.Cols}} \r\n \r\n
\r\n
\r\n {{rr.ScanUpDown | boolToScanDir}} \r\n \r\n
\r\n
\r\n {{rr.Status}} \r\n \"barcode\"\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, Input } from '@angular/core';\r\nimport { OnInit } from '@angular/core';\r\nimport { Router, ActivatedRoute, Params } from '@angular/router';\r\nimport { NgbPanelChangeEvent } from '@ng-bootstrap/ng-bootstrap';\r\nimport { Container, Rack, ContainerRack } from '../types';\r\nimport { RackService } from '../services/rack.service';\r\nimport { GlobalsService } from '../services/global.service';\r\nimport { BoolToScanDirPipe } from '../pipes.pipe';\r\nimport 'rxjs/add/operator/switchMap';\r\nimport * as _ from 'underscore';\r\n\r\n@Component({\r\n moduleId: module.id,\r\n //selector : 'users',\r\n templateUrl: '../../Templates/rack-list.component.html'\r\n //template : '

Containers

'\r\n})\r\n\r\nexport class RackListComponent implements OnInit {\r\n cracks: ContainerRack[];\r\n arrayOfKeys: string[];\r\n selectedContainerRack: ContainerRack;\r\n isAdmin: boolean;\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private rackService: RackService,\r\n private globalsService: GlobalsService,\r\n ) { }\r\n\r\n\r\n getAllRacks(): void {\r\n console.log('get all')\r\n this.rackService.getRacks()\r\n .subscribe(\r\n cracks => {\r\n cracks.forEach(cr => cr.Racks.forEach(r => r.editable = false));\r\n this.cracks = _.sortBy(cracks, (cr => cr.Container.Description));\r\n }, //Bind to view\r\n err => console.log(err));\r\n }\r\n\r\n getRacksById(id: number): void {\r\n console.log('in by Id')\r\n this.rackService.getRackByContainerId(id)\r\n .subscribe(\r\n cracks => {\r\n cracks.forEach(cr => cr.Racks.forEach(r => r.editable = false));\r\n this.cracks = _.sortBy(cracks, (cr => cr.Container.Description));\r\n }, //Bind to view\r\n err => console.log(err));\r\n }\r\n\r\n toggleEditable(rack: Rack): void {\r\n\r\n rack.editable = !rack.editable;\r\n }\r\n\r\n samples(rack: Rack): void {\r\n this.router.navigate(['/racksamples', rack.RackId]);\r\n }\r\n\r\n save(rack: Rack): void {\r\n rack.editable = false;\r\n this.rackService.saveRack(rack)\r\n .subscribe(\r\n id => {\r\n rack.RackId = id;\r\n console.log(rack);\r\n }\r\n , err => console.log(err));\r\n }\r\n\r\n create(crack: ContainerRack): void {\r\n let rack: Rack = { RackId: -1, Description: 'New Rack', Rows: 0, Cols: 0, ContainerId: crack.Container.ContainerId, Status: 'Empty', ScanUpDown: false, editable: true };\r\n crack.Racks.push(rack);\r\n }\r\n\r\n onItemDrop(e: any, cr: ContainerRack): void {\r\n // Get the dropped data here\r\n let draggedRack: Rack = e.dragData;\r\n let prevContainerId = draggedRack.ContainerId;\r\n draggedRack.ContainerId = cr.Container.ContainerId;\r\n this.rackService.saveRack(draggedRack)\r\n .subscribe(r => {\r\n let oldCrack = this.cracks.find(cr => cr.Container.ContainerId === prevContainerId)\r\n oldCrack.Racks = _.without(oldCrack.Racks, draggedRack);\r\n let newCrack = this.cracks.find(svrcr => svrcr.Container.ContainerId === cr.Container.ContainerId)\r\n newCrack.Racks = newCrack.Racks.concat(draggedRack);\r\n console.log(newCrack);\r\n })\r\n }\r\n printLabel (rr ) : void {}\r\n ngOnInit(): void {\r\n this.route.params\r\n .subscribe((params: Params) => {\r\n this.globalsService.getContext().subscribe(b => {\r\n this.isAdmin = this.globalsService.Context.Admin;\r\n if (params['id'] == undefined) { this.getAllRacks() }\r\n else { this.getRacksById(+params['id']) }\r\n });\r\n });\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Sample, SampleAudit } from '../types';\r\n//import { Headers, Response, Http, RequestOptions } from '@angular/http';\r\nimport { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';\r\nimport { Observable } from 'rxjs/Rx'\r\nimport 'rxjs/add/operator/toPromise';\r\nimport 'rxjs/add/operator/map';\r\nimport 'rxjs/add/operator/catch';\r\n\r\n@Injectable()\r\n\r\nexport class SampleService {\r\n private samplesUrl = 'api/samples';\r\n\r\n constructor(private http: HttpClient) { }\r\n\r\n getSamplesByRackId(id: Number): Observable {\r\n const url = `api/racksamples/${id}`;\r\n return this.http.get(url)\r\n //.map((res:Response) => res.json())\r\n .catch((error: any) => Observable.throw(error || 'Server error'));\r\n }\r\n\r\n getSamplesByBoxId(id: Number): Observable {\r\n const url = `api/boxsamples/${id}`;\r\n return this.http.get(url)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error || 'Server error'));\r\n }\r\n\r\n getSampleAudits(sampno: string): Observable {\r\n const url = `api/sampleaudit/${sampno}`;\r\n return this.http.get(url)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error || 'Server error'));\r\n }\r\n\r\n getBoxSampleAuditsByTrackingID(trackingId: string): Observable {\r\n const escapedId = encodeURIComponent(trackingId);\r\n const url = `api/boxsampleaudits/${escapedId}`;\r\n return this.http.get(url)\r\n //.map((res: Response) => res.json())\r\n .catch((error: any) => Observable.throw(error || 'Server error'));\r\n }\r\n saveSample(samp: Sample): Observable {\r\n return this.http.post(this.samplesUrl, samp)\r\n //.map((res: Response) => \r\n .catch((error: any) => Observable.throw(error || 'Server error'));\r\n }\r\n\r\n queueSampleForPrint(sampid : number): Observable {\r\n const url = `api/queuesample/${sampid}`;\r\n return this.http.post(url, null)\r\n .catch((error: any) => Observable.throw(error || 'Server error'));\r\n }\r\n\r\n destroySample(samp: Sample): Observable {\r\n const url = `api/sample/${samp.SampleId}`;\r\n return this.http.delete(url)\r\n //.map((res: Response) => +res.text())\r\n .catch((error: any) => Observable.throw(error || 'Server error'));\r\n }\r\n\r\n destroySampleById(sampid: number): Observable {\r\n const url = `api/sample/${sampid}`;\r\n return this.http.delete(url)\r\n //.map((res: Response) => +res.text())\r\n .catch((error: any) => Observable.throw(error || 'Server error'));\r\n }\r\n\r\n findIncomplete(samp: Sample): Observable {\r\n const url = `api/incomplete/${samp.SampleNo}`;\r\n return this.http.get(url)\r\n //.map((res: Response) => +res.text())\r\n .catch((error: any) => Observable.throw(error || 'Server error'));\r\n }\r\n\r\n postFile(fileToUpload: File): any {\r\n const endpoint = '/api/sampleauditlist';\r\n const formData: FormData = new FormData();\r\n formData.append('fileKey', fileToUpload, fileToUpload.name);\r\n return this.http\r\n .post(endpoint, formData, { responseType: 'blob' as 'json', observe: 'response' as 'response' }).toPromise();\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Headers, Response, Http, RequestOptions } from '@angular/http';\r\n//import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';\r\nimport 'rxjs/add/operator/toPromise';\r\nimport 'rxjs/add/operator/map';\r\nimport 'rxjs/add/operator/catch';\r\n\r\n@Injectable()\r\nexport class SoundService {\r\n private sounds : any\r\n constructor(private http: Http) {\r\n this.http.get('/Content/sounds.json')\r\n .subscribe(json => this.sounds = JSON.parse(json.text()));\r\n }\r\n\r\n beep(sound: string): void {\r\n let snd = new Audio(\"data:audio/wav;base64,\" + this.sounds[sound]);\r\n snd.play();\r\n }\r\n} \r\n","import { Component } from '@angular/core';\r\n\r\n\r\n@Component({\r\n selector: 'app-modal',\r\n //
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n `,\r\n styles: [`\r\n .modal {\r\n background: rgba(0,0,0,0.6);\r\n }\r\n .modal.fade .modal-dialog {\r\n transform: translate(0, 25%)\r\n }\r\n `]\r\n})\r\nexport class ModalComponent {\r\n\r\n public visible = false;\r\n public visibleAnimate = false;\r\n\r\n constructor() { }\r\n\r\n public show(): void {\r\n this.visible = true;\r\n setTimeout(() => this.visibleAnimate = true, 100);\r\n }\r\n\r\n public hide(): void {\r\n this.visibleAnimate = false;\r\n setTimeout(() => this.visible = false, 300);\r\n }\r\n\r\n //public onContainerClicked(event: MouseEvent): void {\r\n // if ((event.target).classList.contains('modal')) {\r\n // this.hide();\r\n // }\r\n //}\r\n}\r\n\r\n","
\r\n
\r\n
\r\n
\r\n

Samples

\r\n
\r\n
\r\n

Total = {{reverseSortedSamples.length}}

\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
Row
\r\n
Col
\r\n
\r\n
\r\n
\r\n {{s.Row}}\r\n
\r\n
\r\n {{s.Col}}\r\n
\r\n \r\n
\r\n  \r\n
\r\n
\r\n {{s.SampleNo}} \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n Please comment on why this has been removed.\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n","import { Component, Input, ViewChild, Output, ViewContainerRef, EventEmitter } from '@angular/core';\r\nimport { Sample } from '../types';\r\nimport { SampleService } from '../services/sample.service'\r\nimport { ToastrManager } from 'ng6-toastr-notifications';\r\nimport * as _ from 'underscore';\r\n\r\n@Component({\r\n moduleId: module.id,\r\n selector: 'sample-list',\r\n templateUrl: '../../Templates/samples-list.component.html'\r\n})\r\n\r\nexport class SampleListComponent {\r\n public reverseSortedSamples: Sample[];\r\n public removalMessage: string = \"\";\r\n private contextSample: Sample;\r\n @ViewChild('sampleRemovedModal') sampleRemovedModal: any;\r\n @Input() parent: string;\r\n @Input() set samples(samples: Sample[]) {\r\n this.reverseSortedSamples = _.sortBy(samples, (s, i) => -i);\r\n }\r\n\r\n @Output() SamplesChangedEvt: EventEmitter = new EventEmitter();\r\n\r\n constructor(\r\n private sampleService: SampleService,\r\n private toastr: ToastrManager,\r\n private vcr: ViewContainerRef) {\r\n //this.toastr.setRootViewContainerRef(vcr);\r\n }\r\n\r\n missing(s: Sample): void {\r\n //set event to missing from this box.\r\n //remove from the box\r\n switch (this.parent) {\r\n case 'pack':\r\n case 'unpack':\r\n s.Event = \"Not received in BOX\" + s.BoxId + \" @ \" + (new Date).toShortDateTimeString();\r\n break;\r\n //case 'store':\r\n // s.Event = \"Removed from RACK\" + s.RackId + \" @ \" + (new Date).toString();\r\n // break;\r\n default:\r\n s.Event = \"Missing @ \" + (new Date).toShortDateTimeString();\r\n break;\r\n }\r\n this.sampleService.saveSample(s)\r\n .subscribe(\r\n id => {\r\n s.SampleId = id;\r\n this.sampleService.destroySample(s).subscribe(id => {\r\n this.reverseSortedSamples = _.without(this.reverseSortedSamples, s);\r\n this.SamplesChangedEvt.emit(s);\r\n }\r\n )\r\n },\r\n err => this.toastr.errorToastr(err, 'Error', { position: 'bottom-right' })\r\n )\r\n }\r\n\r\n sampleRemoved(sampleRemovedModal: any) {\r\n console.log(sampleRemovedModal);\r\n\r\n let s = this.contextSample;\r\n switch (this.parent) {\r\n case 'pack':\r\n s.Event = `Removed from BOX ${s.BoxId} @ ${(new Date).toShortDateTimeString()} : ${this.removalMessage}`;\r\n break;\r\n case 'store':\r\n s.Event = `Removed from RACK ${s.RackId} @ ${(new Date).toShortDateTimeString()} : ${this.removalMessage}`;\r\n break;\r\n default:\r\n s.Event = `Removed ${(new Date).toShortDateTimeString()} : ${this.removalMessage}`;\r\n break;\r\n }\r\n\r\n this.sampleService.saveSample(s)\r\n .subscribe(\r\n id => {\r\n s.SampleId = id;\r\n this.sampleService.destroySample(s).subscribe(id => {\r\n this.reverseSortedSamples = _.without(this.reverseSortedSamples, s);\r\n this.SamplesChangedEvt.emit(s);\r\n }\r\n )\r\n },\r\n err => this.toastr.errorToastr(err, 'Error', { position: 'bottom-right' })\r\n )\r\n sampleRemovedModal.hide();\r\n }\r\n\r\n remove(s: Sample): void {\r\n this.sampleRemovedModal.show();\r\n this.contextSample = s;\r\n }\r\n}\r\n","import { Component, ViewChild, ElementRef, ViewContainerRef, OnInit } from '@angular/core';\r\n//import { BrowserAnimationsModule } from '@angular/platform-browser/animations';\r\nimport { Router, ActivatedRoute, Params } from '@angular/router';\r\nimport { Sample, Rack, Position } from '../types';\r\nimport { SampleService } from '../services/sample.service';\r\nimport { RackService } from '../services/rack.service';\r\nimport { SoundService } from '../services/sounds.service';\r\nimport { Observable } from 'rxjs/Rx'\r\n\r\nimport 'rxjs/add/operator/switchMap';\r\nimport * as _ from 'underscore';\r\n//import * as $ from 'jquery';\r\nimport * as d3 from 'd3';\r\nimport { ToastrManager, Toastr } from 'ng6-toastr-notifications';\r\n//import { CustomOption } from './toastr-options';\r\n//import { ToastOptions } from 'ng2-toastr/ng2-toastr';\r\n\r\n@Component({\r\n moduleId: module.id,\r\n templateUrl: '../../Templates/store-samples.component.html'\r\n})\r\n\r\n\r\nexport class StoreSamplesComponent implements OnInit {\r\n @ViewChild('labno') el: ElementRef;\r\n @ViewChild('emptyRackModal') emptyModal: any;\r\n samples: Sample[];\r\n rack: Rack;\r\n svg: d3.Selection;\r\n y: d3.scaleLinear;\r\n x: d3.scaleLinear;\r\n height: number;\r\n width: number;\r\n totalWidth: number;\r\n postInProgress: boolean = false;\r\n currentPos: Position\r\n rackIsFull: boolean = false;\r\n sampleTypes: string[] = ['EDTA', 'SST', 'FluOx', 'Coag', 'Heparin', 'Urine', 'AcidUrine', 'Unknown', 'Unknown', 'Unknown'];\r\n margin = { top: 50, right: 50, bottom: 50, left: 50 };\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private sampleService: SampleService,\r\n private rackService: RackService,\r\n private soundService: SoundService,\r\n private toastr: ToastrManager,\r\n private vcr: ViewContainerRef) {\r\n //this.toastr.setRootViewContainerRef(vcr);\r\n }\r\n\r\n getSamplesByRackId(rakid: number): void {\r\n this.sampleService.getSamplesByRackId(rakid)\r\n .subscribe(\r\n samples => {\r\n this.samples = samples;\r\n this.currentPos = samples.length > 0 ? { Row: samples[samples.length - 1].Row, Col: samples[samples.length - 1].Col } : { Row: 1, Col: 0 };\r\n this.getRackById(rakid);\r\n },\r\n err => {\r\n console.log(err);\r\n this.soundService.beep('bong');\r\n this.router.navigate(['/store']);\r\n });\r\n }\r\n\r\n getRackById(rakid: number): void {\r\n this.rackService.getRackById(rakid)\r\n .subscribe(\r\n rack => {\r\n this.rack = rack;\r\n if (rack.Status === 'Full') {\r\n this.emptyModal.show();\r\n }\r\n else {\r\n this.currentPos = this.samples.length == 0 && this.rack.ScanUpDown ? { Row: 0, Col: 1 } : this.currentPos;\r\n this.updatePostion();\r\n }\r\n this.initRack();\r\n },\r\n err => {\r\n console.log(err);\r\n this.soundService.beep('bong');\r\n this.router.navigate(['/store']); //that rack dont exist, bruv\r\n });\r\n }\r\n\r\n labnoScanned(event: any) {\r\n if (event.target.value !== '' && !this.postInProgress) {\r\n this.postInProgress = true;\r\n var entry = event.target.value.toUpperCase().replaceAll('-', '').replace(/\\\\/g, '').replaceAll(' ','');\r\n let labno = '';\r\n let smptypID = 0;\r\n let regex = new RegExp(/^\\d{2}[A-Z0-9]\\d{6}[0-9A-Z]$/)\r\n if (entry.length == 10) {\r\n if (regex.test(entry) && !( entry.includes(\"F\") || entry.includes(\"A\") )) {\r\n labno = entry.substr(0, 9);\r\n var suffix = entry.substr(9, 1);\r\n smptypID = isNaN(parseInt(suffix)) ? '9' : suffix;\r\n }\r\n else {\r\n labno = entry.toUpperCase();\r\n }\r\n }\r\n if (entry.length <= 9) {\r\n labno = entry.toUpperCase();\r\n }\r\n if (entry.length > 10) {\r\n switch ( entry.includes(\"F\") || entry.includes(\"A\") ) {\r\n case true:\r\n labno = entry.substr(0, 10);\r\n var suffix = entry.substr(10, 1);\r\n smptypID = isNaN(parseInt(suffix)) ? '9' : suffix;\r\n break;\r\n default:\r\n labno = entry.toUpperCase();\r\n smptypID = 9;\r\n break;\r\n }\r\n }\r\n let sample = { SampleId: 0, SampleNo: labno, SampTypeSuffix: smptypID, Row: this.currentPos.Row, Col: this.currentPos.Col, RackId: this.rack.RackId, SampleType: this.sampleTypes[smptypID], DateTime: new Date(), Event: 'stored', TrackingAuditId: '' }\r\n\r\n this.sampleService.saveSample(sample)\r\n .subscribe(\r\n id => {\r\n this.sampleService.findIncomplete(sample).subscribe(\r\n tlcs => {\r\n switch (tlcs.length) {\r\n case 0:\r\n break;\r\n default:\r\n this.toastr.infoToastr(`${tlcs.join('\\n')}`, 'Incomplete tests:', { position: 'bottom-left' })\r\n break;\r\n }\r\n sample.SampleId = id;\r\n this.samples = this.samples.concat(sample);\r\n event.target.value = '';\r\n this.postInProgress = false;\r\n this.updatePostion();\r\n this.drawRack();\r\n this.soundService.beep('beep');\r\n this.toastr.successToastr(sample.SampleNo + ' stored!', 'Success!', { position: 'bottom-right' });\r\n }\r\n )\r\n },\r\n (err) => {\r\n\r\n this.toastr.showToastr(this.toastr.errorToastr(err, 'Error!'))\r\n .then((toast: Toastr) => {\r\n setTimeout(() => {\r\n this.toastr.dismissToastr(toast);\r\n this.soundService.beep('bong');\r\n window.location.reload(); // someone has likely scanned in more samples to this rack. Refresh.\r\n }, 2000);\r\n })\r\n }\r\n )\r\n }\r\n else {\r\n this.soundService.beep('bong');\r\n }\r\n }\r\n\r\n updatePostion(): void {\r\n\r\n if (!(this.rack.Status === 'Full')) {\r\n console.log(this.currentPos);\r\n switch (this.rack.ScanUpDown) {\r\n case true:\r\n this.currentPos.Row++;\r\n \r\n if (this.rack.Status === 'Empty') {\r\n this.rack.Status = 'InUse';\r\n this.rackService.saveRack(this.rack)\r\n .subscribe(id => null, err => console.log(err));\r\n }\r\n if (this.currentPos.Row > this.rack.Rows && this.currentPos.Col >= this.rack.Cols) {\r\n //if (this.currentPos.Row * this.currentPos.Col >= this.rack.Rows * this.rack.Cols) {\r\n this.rackIsFull = true;\r\n this.rack.Status = 'Full';\r\n this.rackFull();\r\n }\r\n if (this.currentPos.Row > this.rack.Rows) {\r\n this.currentPos.Col++;\r\n this.currentPos.Row = 1;\r\n }\r\n break;\r\n default:\r\n this.currentPos.Col++;\r\n //console.log(this.currentPos);\r\n if (this.rack.Status === 'Empty') {\r\n this.rack.Status = 'InUse';\r\n this.rackService.saveRack(this.rack)\r\n .subscribe(id => null, err => console.log(err));\r\n }\r\n if (this.currentPos.Row >= this.rack.Rows && this.currentPos.Col > this.rack.Cols) {\r\n //if (this.currentPos.Row * this.currentPos.Col >= this.rack.Rows * this.rack.Cols) {\r\n this.rackIsFull = true;\r\n this.rack.Status = 'Full';\r\n this.rackFull();\r\n }\r\n if (this.currentPos.Col > this.rack.Cols) {\r\n this.currentPos.Row++;\r\n this.currentPos.Col = 1;\r\n }\r\n break;\r\n }\r\n let a = this.el.nativeElement;\r\n a.focus();\r\n }\r\n else {\r\n this.toastr.infoToastr('Rack full!', 'Full!', { position: 'bottom-right' });\r\n this.soundService.beep('bong');\r\n this.router.navigate(['/store']);\r\n }\r\n }\r\n\r\n initRack(): void {\r\n d3.select('svg')\r\n .attr(\"width\", this.width + this.margin.left + this.margin.right)\r\n .attr(\"height\", this.height + this.margin.top + this.margin.bottom)\r\n .append(\"g\")\r\n .attr(\"transform\", \"translate(\" + this.margin.left + \",\" + this.margin.top + \")\");\r\n this.svg = d3.select('svg > g');\r\n this.drawRack()\r\n }\r\n\r\n drawRack(): void {\r\n let maxRow = this.rack.Rows;\r\n let maxCol = this.rack.Cols;\r\n this.y.domain([1, maxRow]);\r\n this.x.domain([1, maxCol]);\r\n let that = this;\r\n\r\n let circles = this.svg\r\n .selectAll(\"circle\");\r\n\r\n //circles.data(this.samples, (smp, i, oi) => {\r\n // console.log(i.toString () + ' ' + smp.SampleId.toString());\r\n // return smp.SampleId.toString()\r\n //}) // key function, uses PK from table - cannot get to work.\r\n circles.data(this.samples)\r\n .enter()\r\n .append(\"circle\")\r\n .attr('cy', (s, i) => that.y(s.Row))\r\n .attr(\"cx\", (s, i) => that.x(s.Col))\r\n .attr(\"fill\", \"#eeeeff\")\r\n .attr(\"stroke\", \"black\")\r\n .attr('stroke-width', 1)\r\n //.attr(\"r\", this.height / (d3.max([maxRow, maxCol]) * 2) - 1) + \"px\";\r\n .attr(\"r\", (this.width / (d3.max([maxRow, maxCol]) * 6)) - 1 + \"px\");\r\n\r\n //let removed = circles.data(this.samples).exit().remove();\r\n\r\n let xAxis = d3.axisTop(this.x)\r\n .tickSize(1);\r\n let yAxis = d3.axisLeft(this.y);\r\n\r\n\r\n this.svg.append(\"g\")\r\n .attr(\"class\", \"x axis\")\r\n .attr(\"transform\", \"translate(0,\" + -this.margin.top / 2 + \")\")\r\n .call(xAxis.ticks(maxCol));\r\n\r\n this.svg.append(\"g\")\r\n .attr(\"class\", \"y axis\")\r\n .attr(\"transform\", \"translate(\" + -this.margin.left / 2 + \",0)\")\r\n .call(yAxis.ticks(maxRow));\r\n }\r\n\r\n emptyRack(emptyRackModal: any): void {\r\n console.log(this.svg);\r\n this.rack.Status = 'Empty';\r\n this.rackService.saveRack(this.rack)\r\n .subscribe(id => console.log(id), err => console.log(err));\r\n emptyRackModal.hide();\r\n this.samples = [];\r\n this.currentPos = { Row: 1, Col: 1 };\r\n this.svg.selectAll('g > circle').remove();\r\n }\r\n\r\n rackFull(): void {\r\n this.rackService.saveRack(this.rack)\r\n .subscribe(id => {\r\n this.toastr.showToastr(this.toastr.infoToastr('Rack full!', 'Full!', { dismiss: 'controlled', position: \"bottom-right\" }))\r\n .then((toast: Toastr) => {\r\n setTimeout(() => {\r\n this.toastr.dismissToastr(toast);\r\n this.router.navigate(['/store'])\r\n }, 2000);\r\n })\r\n }, err => console.log(err));\r\n }\r\n //sample removed, actually\r\n samplesChanged(evt: Sample): void {\r\n console.log('samples changed...');\r\n this.svg.selectAll('circle').remove();\r\n this.samples = _.without(this.samples, evt);\r\n\r\n this.currentPos = this.samples.length > 0 ? { Row: this.samples[this.samples.length - 1].Row, Col: this.samples[this.samples.length - 1].Col } : { Row: 1, Col: 0 };\r\n this.updatePostion();\r\n //if there's no samples left, reset the current Pos to {1,0}\r\n /*if (this.samples.length === 0) {\r\n this.currentPos = { Row: 1, Col: 0 };\r\n }*/\r\n\r\n this.drawRack();\r\n let a = this.el.nativeElement;\r\n a.focus();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.totalWidth = window.screen.width / 2;\r\n this.width = this.totalWidth - this.margin.left - this.margin.right;\r\n this.height = 600 - this.margin.top - this.margin.bottom;\r\n this.y = d3.scaleLinear().range([0, this.height]);\r\n this.x = d3.scaleLinear().range([0, this.width]);\r\n\r\n this.route.params\r\n .subscribe((params: Params) => {\r\n console.log(params['id'])\r\n if (params['id'] == undefined) { }\r\n else {\r\n this.getSamplesByRackId(+params['id']);\r\n }\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n \r\n
\r\n
\r\n
{{rack?.Description}}
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n
\r\n Empty Rack ?\r\n
\r\n
\r\n Are you sure you want to empty this rack?\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n","
\r\n
\r\n
\r\n
\r\n

{{sampleNo}}

\r\n
\r\n
\r\n

Total = {{sampleAudits?.length}}

\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Row
\r\n
Col
\r\n
\r\n
\r\n
 
\r\n
\r\n
\r\n
\r\n {{s.Rack}}\r\n {{s.Box}}\r\n \r\n
\r\n
\r\n 0\">{{s.Row}}\r\n
\r\n
\r\n 0\">{{s.Col}}\r\n
\r\n
\r\n {{s.Event}}\r\n
\r\n
\r\n {{s.DateTime | date : 'dd/MM/yy HH:mm'}}\r\n
\r\n
\r\n {{s.User}}\r\n
\r\n
\r\n  \r\n
\r\n
\r\n
\r\n
\r\n","import { Component, OnInit, ViewContainerRef, ElementRef, ViewChild } from '@angular/core';\r\nimport { SampleAudit } from '../types';\r\nimport { SampleService } from '../services/sample.service'\r\nimport { Router, ActivatedRoute, Params } from '@angular/router';\r\n//import { ToastrManager, Toastr } from 'ng6-toastr-notifications';\r\nimport 'rxjs/add/operator/switchMap';\r\nimport * as _ from 'underscore';\r\nimport { saveAs } from 'file-saver';\r\n\r\n@Component({\r\n moduleId: module.id,\r\n templateUrl: '../../Templates/sample-audit.component.html'\r\n})\r\n\r\nexport class SampleAuditComponent implements OnInit {\r\n sampleAudits : SampleAudit []\r\n sampleNo: string\r\n fileToUpload: File = null;\r\n constructor(\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private sampleService: SampleService,\r\n //private toastr: ToastrManager,\r\n private vcr: ViewContainerRef ) {\r\n //this.toastr.setRootViewContainerRef(vcr);\r\n }\r\n\r\n getSampleAudits(smpno: string): void {\r\n switch (smpno.length) {\r\n case 10:\r\n let regex = new RegExp(/^\\d{2}[A-Z0-9]\\d{6}[0-9A-Z]$/)\r\n if (regex.test(smpno) && !( smpno.includes(\"F\") || smpno.includes(\"A\") )) { // contains F or A\r\n var sampno = smpno.substr(0, 9)\r\n this.sampleService.getSampleAudits(sampno)\r\n .subscribe(\r\n sampauds => this.sampleAudits = sampauds,\r\n err => console.log(err)\r\n )\r\n }\r\n else {\r\n this.sampleService.getSampleAudits(smpno)\r\n .subscribe(\r\n sampauds => this.sampleAudits = sampauds,\r\n err => console.log(err)\r\n )\r\n }\r\n break;\r\n case 11:\r\n if ( smpno.includes(\"F\") || smpno.includes(\"A\") ) { // contains F or A\r\n var sampno = smpno.substr(0, 10)\r\n this.sampleService.getSampleAudits(sampno)\r\n .subscribe(\r\n sampauds => this.sampleAudits = sampauds,\r\n err => console.log(err)\r\n )\r\n }\r\n else {\r\n this.sampleService.getSampleAudits(smpno)\r\n .subscribe(\r\n sampauds => this.sampleAudits = sampauds,\r\n err => console.log(err)\r\n )\r\n }\r\n break;\r\n default :\r\n this.sampleService.getSampleAudits(smpno)\r\n .subscribe(\r\n sampauds => this.sampleAudits = sampauds,\r\n err => console.log(err)\r\n )\r\n break;\r\n }\r\n }\r\n\r\n private saveToFileSystem(response) {\r\n console.log(response);\r\n const contentDispositionHeader: string = response.headers.get('content-disposition');\r\n const parts: string[] = contentDispositionHeader.split(';');\r\n const filename = parts[1].split('=')[1];\r\n console.log(filename);\r\n const blob = new File([response._body], filename, { type: 'text/plain;charset=utf-8' });\r\n saveAs(blob);\r\n }\r\n\r\n uploadList(files: FileList) {\r\n this.fileToUpload = files.item(0);\r\n console.log(this.fileToUpload);\r\n this.sampleService.postFile(this.fileToUpload).subscribe(response => this.saveToFileSystem(response))\r\n }\r\n\r\n samples ( s: SampleAudit ): void { //only valid for 'current' samples, not archived in audit.\r\n if (s.BoxId > 0){\r\n this.router.navigate(['/boxaudit', s.BoxId]); //SampleAudit type needs Box/Rack ids.\r\n }\r\n if (s.RackId > 0){\r\n this.router.navigate(['/racksamples', s.RackId]); //SampleAudit type needs Box/Rack ids.\r\n }\r\n //this.toastr.info('not found','?');\r\n }\r\n\r\n ngOnInit(): void {\r\n this.route.params\r\n .subscribe((params: Params) => {\r\n this.sampleNo = params['id'];\r\n this.getSampleAudits(this.sampleNo )\r\n }\r\n );\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n

Boxes

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n          \r\n
\r\n
\r\n {{b.Description}}\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n","import { Component, Input, Output, ViewContainerRef, EventEmitter } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { Box } from '../types';\r\nimport { BoxService } from '../services/box.service';\r\nimport { SoundService } from '../services/sounds.service';\r\nimport { ToastrManager } from 'ng6-toastr-notifications';\r\nimport * as _ from 'underscore';\r\n\r\n@Component({\r\n moduleId: module.id,\r\n selector: 'box-list',\r\n templateUrl: '../../Templates/boxes-list.component.html'\r\n})\r\n\r\nexport class BoxesListComponent {\r\n //private boxes : Box[]\r\n @Input() parent: string;\r\n @Input() boxes: Box[];\r\n @Output() BoxesChangedEvt: EventEmitter = new EventEmitter();\r\n\r\n constructor(\r\n private router: Router,\r\n private boxService: BoxService,\r\n private soundService: SoundService,\r\n private toastr: ToastrManager,\r\n private vcr: ViewContainerRef) {\r\n //this.toastr.setRootViewContainerRef(vcr);\r\n }\r\n\r\n contents(b: Box): void {\r\n console.log(this.parent);\r\n switch (this.parent) {\r\n case 'pack':\r\n this.router.navigate(['/packsamples', b.BoxId]);\r\n break;\r\n case 'unpack':\r\n this.router.navigate(['/unpacksamples', b.BoxId]);\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n missing(b: Box): void {\r\n let perviousParent = b.ParentBoxId\r\n b.ParentBoxId = null;\r\n b.Event = \"Missing from box id \" + perviousParent.toString();\r\n this.boxService.saveBox(b)\r\n .subscribe(id => {\r\n this.boxes = _.without(this.boxes, b);\r\n this.soundService.beep('beep');\r\n this.toastr.successToastr(b.Description + ' removed.', 'Success!', { position: 'bottom-right' });\r\n this.BoxesChangedEvt.emit(b);\r\n },\r\n err => {\r\n this.soundService.beep('bong');\r\n this.toastr.errorToastr(err, \"Bad!\",{ position: 'bottom-right' });\r\n });\r\n }\r\n\r\n printLabel(box: Box): void {\r\n this.boxService.printLabel(box.BoxId)\r\n .subscribe(box => {\r\n this.toastr.successToastr(box.Description + ' lable printed.', 'Success!', { position: 'bottom-right' });\r\n },\r\n err => {\r\n this.soundService.beep('bong');\r\n console.log(err);\r\n this.toastr.errorToastr(err, \"Bad!\", { position: 'bottom-right' });\r\n });\r\n }\r\n\r\n remove(b: Box): void {\r\n let perviousParent = b.ParentBoxId\r\n b.ParentBoxId = null;\r\n b.Event = \"Removed from box id \" + perviousParent.toString();\r\n this.boxService.saveBox(b)\r\n .subscribe(id => {\r\n this.boxes = _.without(this.boxes, b);\r\n this.toastr.successToastr(b.Description + ' removed.', 'Success!', { position: 'bottom-right' });\r\n this.BoxesChangedEvt.emit(b);\r\n },\r\n err => {\r\n this.soundService.beep('bong');\r\n this.toastr.errorToastr(err, \"Bad!\", { position: 'bottom-right' });\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n \r\n
\r\n
\r\n

{{box?.Description}}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n

{{box?.BoxType}}

\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n

{{box?.Description}}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n
\r\n Move Box ?\r\n
\r\n
\r\n

This box is being packed @ {{box?.Destination.Name}}.

\r\n

Are you sure you want to move this box?

\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n
\r\n Select Destination\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n\r\n
\r\n Despatch Location not selected.\r\n
\r\n
\r\n Please select a despatch location.\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n\r\n
\r\n Empty Box -\r\n
\r\n
\r\n Are you sure ?\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n","import { Component, OnInit, AfterViewInit, ViewContainerRef, ElementRef, ViewChild } from '@angular/core';\r\nimport { Router, ActivatedRoute, Params } from '@angular/router';\r\nimport { Sample, Box, Location, LabelFormat } from '../types';\r\nimport { SampleService } from '../services/sample.service';\r\nimport { BoxService } from '../services/box.service';\r\nimport { LocationService } from '../services/location.service';\r\nimport { SoundService } from '../services/sounds.service';\r\nimport { GlobalsService } from '../services/global.service';\r\n\r\nimport 'rxjs/add/operator/switchMap';\r\nimport * as _ from 'underscore';\r\n\r\nimport { ToastrManager, Toastr } from 'ng6-toastr-notifications';\r\n//import { AfterViewInit, AfterViewChecked } from '@angular/core/src/metadata/lifecycle_hooks';\r\nimport { Observable } from 'rxjs/Observable';\r\n\r\n\r\n@Component({\r\n moduleId: module.id,\r\n templateUrl: '../../Templates/pack-box-samples.component.html'\r\n})\r\n\r\nexport class PackBoxComponent implements OnInit, AfterViewInit {\r\n @ViewChild('moveBoxModal') moveBoxModal: any;\r\n @ViewChild('setFixedBoxDestintationModal') setFixedBoxDestintationModal: any;\r\n @ViewChild('despatchLocationNotSelectedModal') despatchLocationNotSelectedModal: any;\r\n @ViewChild('emptyBoxModal') emptyBoxModal: any;\r\n @ViewChild('labno') el: ElementRef;\r\n sampleTypes: string[] = ['EDTA', 'SST', 'FluOx', 'Coag', 'Heparin', 'Urine', 'AcidUrine', 'Unknown', 'Unknown', 'Unknown'];\r\n samples: Sample[];\r\n despatchLocations: Location[];\r\n allLocations: Location[];\r\n childBoxDespatchLocation: Location;\r\n childBoxes: Box[];\r\n box: Box;\r\n isAdmin: boolean;\r\n fixedBoxId: number;\r\n newBox: Box; //box created on fly, from fixed box.\r\n postInProgress = false;\r\n despatchLocation: Location;\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private sampleService: SampleService,\r\n private boxService: BoxService,\r\n private locationService: LocationService,\r\n private soundService: SoundService,\r\n private globalsService: GlobalsService,\r\n private toastr: ToastrManager,\r\n private vcr: ViewContainerRef) {\r\n //this.toastr.setRootViewContainerRef(vcr);\r\n }\r\n getXHRData(boxid: number): void {\r\n Observable.forkJoin(\r\n this.sampleService.getSamplesByBoxId(boxid),\r\n this.boxService.getChildBoxes(boxid),\r\n this.boxService.getBoxByBoxId(boxid),\r\n this.locationService.getAllSiteLocations(),\r\n this.locationService.getDespatchLoctions()\r\n )\r\n .subscribe(res => {\r\n this.samples = res[0]\r\n this.childBoxes = res[1]\r\n let box = res[2]\r\n this.allLocations = _.flatten(_.map(res[3], (s => s.Locations)))\r\n let emptyLoc: Location = {\r\n LocationId: -1,\r\n Name: '*select despatch location*',\r\n PrinterIp: '',\r\n LabelFormat: null,\r\n editable: false\r\n };\r\n let despatchlocs = (res[4]).concat(emptyLoc);\r\n this.despatchLocations = _.sortBy(despatchlocs, (l => l.Name));\r\n box.Event = 'Started packing @ ' + this.globalsService.Context.Location;\r\n switch (box.Status) {\r\n case 'Unpacked':\r\n box.Status = 'BeingPacked';\r\n box.LastLocation = _.find(this.allLocations, (l => l.LocationId == this.globalsService.Context.LocationId));\r\n this.boxService.saveBox(box).subscribe(b => {\r\n this.box = b;\r\n this.toastr.successToastr(box.Description + ' status & location updated', 'Success!', { position: 'bottom-right' }), err => this.toastr.errorToastr(err, 'Oh No!', { position: 'bottom-right' })\r\n });\r\n break;\r\n case 'BeingPacked':\r\n //case 'Despatched':\r\n console.log(this.globalsService.Context.LocationId, box.LastLocation, _.isEqual(box.LastLocation.LocationId, this.globalsService.Context.LocationId))\r\n if (box.LastLocation.LocationId == this.globalsService.Context.LocationId) {\r\n box.Status = 'BeingPacked';\r\n box.LastLocation = _.find(this.allLocations, (l => l.LocationId == this.globalsService.Context.LocationId));\r\n this.boxService.saveBox(box).subscribe(b => {\r\n this.box = b;\r\n this.toastr.successToastr(box.Description + ' status updated', 'Success!', { position: 'bottom-right' }),\r\n err => this.toastr.errorToastr(err, 'Oh dear!', { position: 'bottom-right' })\r\n });\r\n }\r\n else {\r\n this.box = box;\r\n this.moveBoxModal.show();\r\n }\r\n break;\r\n default: //Intransit, Received, BeingUnPacked\r\n this.soundService.beep('bong');\r\n this.toastr.showToastr(this.toastr.errorToastr(box.Description + ' is in ' + box.Status + ' status.', 'Wrong status!'))\r\n .then((toast: Toastr) => {\r\n setTimeout(() => {\r\n this.toastr.dismissToastr(toast);\r\n this.router.navigate(['/pack']);\r\n }, 2000);\r\n });\r\n break;\r\n }\r\n },\r\n err =>\r\n this.toastr.showToastr(this.toastr.errorToastr(err, 'Error!'))\r\n .then((toast: Toastr) => {\r\n setTimeout(() => {\r\n this.toastr.dismissToastr(toast);\r\n this.router.navigate(['/pack']);\r\n }, 2000);\r\n })\r\n )\r\n }\r\n\r\n labnoScanned(event: any) {\r\n if (event.target.value !== '' && !this.postInProgress) {\r\n this.postInProgress = true;\r\n var entry = event.target.value.toUpperCase().replaceAll('-', '').replace(/\\\\/g, '').replaceAll(' ', '');;\r\n console.log(entry);\r\n switch (entry.startsWith('BOX')) {\r\n //this is a box.\r\n case true:\r\n let boxId = +entry.replace('BOX', '');\r\n if (boxId === this.box.BoxId) {\r\n this.toastr.errorToastr('You can\\'t pack a box in itself!', 'No!', { position: 'bottom-right' });\r\n this.soundService.beep('bong');\r\n event.target.value = '';\r\n this.postInProgress = false;\r\n break;\r\n }\r\n if (this.box.BoxType === \"Fixed Box\") {\r\n this.toastr.errorToastr('You can\\'t pack a box in a fixed box', 'No!', { position: 'bottom-right' });\r\n this.soundService.beep('bong');\r\n event.target.value = '';\r\n this.postInProgress = false;\r\n break;\r\n }\r\n if (_.find(this.childBoxes, (box) => box.BoxId === boxId)) {\r\n this.toastr.errorToastr('That box is already packed!', 'No!', { position: 'bottom-right' });\r\n this.soundService.beep('bong');\r\n event.target.value = '';\r\n this.postInProgress = false;\r\n break;\r\n }\r\n else {\r\n this.boxService.getBoxByBoxId(boxId)\r\n .subscribe(box => {\r\n console.log(box.BoxType);\r\n var newbox = box;\r\n var childBoxTransient = false;\r\n switch (box.BoxType) {\r\n case 'Fixed Box':\r\n\r\n //create a box on the fly,\r\n this.fixedBoxId = boxId;\r\n childBoxTransient = true; //flag to indicate this child box is a transient one.\r\n newbox = {\r\n ParentBoxId: this.box.BoxId,\r\n BoxId: -1,\r\n BoxType: 'Transient Box',\r\n Description: box.Description,\r\n LastLocation: box.LastLocation,\r\n Destination: box.Destination,\r\n LastMoved: new Date(),\r\n User: box.User,\r\n Status: 'BeingPacked',\r\n Event: \"Packed in \" + this.box.Description,\r\n TrackingAuditId: box.TrackingAuditId,\r\n editable: true\r\n }\r\n this.newBox = newbox;\r\n this.setFixedBoxDestintationModal.show();\r\n break;\r\n\r\n default:\r\n //pack the new box in the parent\r\n newbox.ParentBoxId = this.box.BoxId;\r\n newbox.Status = 'BeingPacked'; // ? or perhaps straight to Despatched\r\n newbox.Event = \"Packed in \" + this.box.Description\r\n newbox.LastLocation = _.find(this.allLocations, (l => l.LocationId === this.globalsService.Context.LocationId));\r\n this.boxService.packChildBox(newbox).subscribe(newBoxId => {\r\n /*\r\n if (childBoxTransient) {\r\n this.boxService.moveBoxSamples(boxId, newBoxId)\r\n .subscribe(\r\n resp => {\r\n //console.log(resp)\r\n newbox.BoxId = newBoxId\r\n this.boxService.printLabel(newBoxId)\r\n .subscribe(box => {\r\n console.log(box)\r\n },\r\n err => this.toastr.error(\"No label printer\", \"box id is \" + err)\r\n )\r\n },\r\n err => console.log(err)\r\n )\r\n }\r\n */\r\n this.childBoxes.push(newbox);\r\n this.toastr.successToastr(\"box \" + newbox.Description + \" added.\", \"Success!\", { position: 'bottom-right' });\r\n this.soundService.beep('beep');\r\n },\r\n (err) => {\r\n console.log(err);\r\n this.toastr.errorToastr(err._body, 'Nooooo!', { position: 'bottom-right' });\r\n this.soundService.beep('bong');\r\n });\r\n break;\r\n }\r\n },\r\n (err) => {\r\n this.toastr.errorToastr(err, 'Nooooo!', { position: 'bottom-right' });\r\n this.soundService.beep('bong');\r\n event.target.value = '';\r\n this.postInProgress = false;\r\n },\r\n () => {\r\n event.target.value = '';\r\n this.postInProgress = false;\r\n }\r\n );\r\n console.log(this.childBoxes);\r\n }\r\n break;\r\n //a sample.\r\n default:\r\n let labno = '';\r\n let smptypID = 0;\r\n let regex = new RegExp(/^\\d{2}[A-Z0-9]\\d{6}[0-9A-Z]$/)\r\n if (entry.length == 10) {\r\n if (regex.test(entry) && !(entry.includes(\"A\") || entry.includes(\"F\") )) { // contains F or A\r\n labno = entry.substr(0, 9);\r\n var suffix = entry.substr(9, 1);\r\n smptypID = isNaN(parseInt(suffix)) ? '9' : suffix;\r\n }\r\n else {\r\n labno = entry.toUpperCase();\r\n }\r\n }\r\n if (entry.length <= 9) { //1234567890\r\n labno = entry.toUpperCase(); //23F0000277\r\n }\r\n if (entry.length > 10) {\r\n switch (entry.includes(\"A\") || entry.includes(\"F\")){// || entry.startsWith(\"23F\") || entry.startsWith(\"23A\"))) { // contains F or A\r\n case true:\r\n labno = entry.substr(0, 10);\r\n var suffix = entry.substr(10, 1);\r\n smptypID = isNaN(parseInt(suffix)) ? '9' : suffix;\r\n break;\r\n default:\r\n labno = entry.toUpperCase();\r\n smptypID = 9;\r\n break;\r\n }\r\n }\r\n console.log(this.box)\r\n let sample = { SampleId: 0, SampleNo: labno, SampTypeSuffix: smptypID, Row: 0, Col: 0, BoxId: this.box.BoxId, SampleType: this.sampleTypes[smptypID], DateTime: new Date(), TrackingAuditId: this.box.TrackingAuditId, Event: 'Packed in ' + this.box.Description + ' @ ' + this.globalsService.Context.Location }\r\n\r\n this.sampleService.saveSample(sample)\r\n .subscribe(\r\n id => {\r\n sample.SampleId = id;\r\n this.samples = this.samples.concat(sample);\r\n event.target.value = '';\r\n this.postInProgress = false;\r\n this.soundService.beep('beep');\r\n this.toastr.successToastr(sample.SampleNo + ' packed!', 'Success!', { position: 'bottom-right' });\r\n },\r\n (err) => {\r\n this.toastr.errorToastr(err, 'Nooooo!', { position: 'bottom-right' }); //, { positionClass: 'toast-bottom-right' });\r\n this.soundService.beep('bong');\r\n event.target.value = '';\r\n this.postInProgress = false;\r\n }\r\n )\r\n break;\r\n }\r\n }\r\n else {\r\n this.soundService.beep('bong');\r\n }\r\n let a = this.el.nativeElement;\r\n a.focus();\r\n }\r\n\r\n onDestinationChanged(event: any) {\r\n //console.log(event.target.value);\r\n this.despatchLocation = _.find(this.despatchLocations, (l => l.LocationId == event.target.value));\r\n }\r\n\r\n onChildBoxDestinationChanged(event: any) {\r\n this.childBoxDespatchLocation = _.find(this.despatchLocations, (l => l.LocationId == event.target.value));\r\n }\r\n\r\n samplesChanged(evt: Sample): void {\r\n this.toastr.successToastr(evt.SampleNo + ' removed!', \"\", { position: 'bottom-right' });\r\n this.samples = _.without(this.samples, evt);\r\n //if there's no samples left, reset the current Pos to {1,0}\r\n }\r\n\r\n boxesChanged(evt: Box): void {\r\n this.toastr.successToastr(evt.Description + ' removed!', \"\", { position: 'bottom-right' });\r\n this.childBoxes = _.without(this.childBoxes, evt);\r\n }\r\n\r\n navigateToParent(): void {\r\n console.log(this.box.ParentBoxId);\r\n this.router.navigate(['/packsamples', +this.box.ParentBoxId]);\r\n }\r\n\r\n checkEmptyUpdateStatus(): void {\r\n //check if empty\r\n console.log('checking empty ...', this.samples, this.childBoxes, this.box);\r\n if (this.samples.length === 0 && this.childBoxes.length === 0) {\r\n this.box.Status = 'Unpacked';\r\n this.boxService.saveBox(this.box).subscribe(\r\n box => {\r\n this.box = box;\r\n this.toastr.showToastr(this.toastr.successToastr(' box empty', 'Success!')).then\r\n ((toast: Toastr) => {\r\n setTimeout(() => {\r\n this.toastr.dismissToastr(toast);\r\n this.router.navigate(['/unpack'])\r\n }, 2000);\r\n })\r\n });\r\n }\r\n }\r\n\r\n despatchBox(): void {\r\n if (this.despatchLocation == undefined) {\r\n this.despatchLocationNotSelectedModal.show();\r\n //this.despatchLocation = this.locations[0];\r\n }\r\n else {\r\n if (this.samples.length > 0 || this.childBoxes.length > 0) {\r\n this.box.Destination = this.despatchLocation;\r\n this.box.Status = 'Despatched';//?In transit\r\n this.box.Event = 'Despatched from ' + this.box.LastLocation.Name + ' to ' + this.despatchLocation.Name;\r\n //update for all child boxes. ???? and all the boxes inside the boxes, recursively. Prolly better to do this on the server\r\n console.log(this.box);\r\n this.boxService.saveBox(this.box)\r\n .subscribe(box => {\r\n this.box = box;\r\n this.soundService.beep('beep');\r\n this.router.navigate(['/pack']);\r\n });\r\n }\r\n else {\r\n this.toastr.errorToastr('... to depatch.', 'There is nowt ...', { position: 'bottom-right' });\r\n }\r\n }\r\n }\r\n emptyBox(): void {\r\n console.log('Empty');\r\n this.emptyBoxModal.show();\r\n }\r\n\r\n moveBoxModalHandler(modal: any, yesno: number): void {\r\n console.log(yesno);\r\n switch (yesno) {\r\n case 0:\r\n modal.hide();\r\n this.router.navigate(['/pack']);\r\n break;\r\n case 1:\r\n this.box.LastLocation = _.find(this.allLocations, (l => l.LocationId == this.globalsService.Context.LocationId));\r\n this.box.Status = 'BeingPacked';\r\n //this.globalsService.Location;\r\n this.boxService.saveBox(this.box)\r\n .subscribe(b => {\r\n this.box = b;\r\n this.toastr.successToastr(this.box.Description + ' status & location updated', \"Success!\", { position: 'bottom-right' });\r\n }, err => {\r\n this.toastr.errorToastr(err, 'Oh dear!')\r\n }, () => modal.hide()\r\n );\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n emptyBoxHandler(modal: any, yesno: number): void {\r\n console.log(yesno);\r\n switch (yesno) {\r\n case 0:\r\n modal.hide();\r\n break;\r\n case 1:\r\n this.boxService.emptyBox(this.box.BoxId)\r\n .subscribe(b => {\r\n this.toastr.successToastr(this.box.Description + ' emptied', \"Success!\", { position: 'bottom-right' });\r\n }, err => {\r\n this.toastr.errorToastr(err, 'Oh dear!')\r\n },\r\n () => {\r\n this.checkEmptyUpdateStatus();\r\n modal.hide();\r\n this.router.navigate(['/pack']);\r\n }\r\n );\r\n\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n setFixedBoxDestintationModalHandler(modal: any): void {\r\n this.newBox.Destination = this.childBoxDespatchLocation;\r\n this.boxService.packChildBox(this.newBox).subscribe(newBoxId => {\r\n //if (childBoxTransient) {\r\n this.boxService.moveBoxSamples(this.fixedBoxId, newBoxId)\r\n .subscribe(\r\n resp => {\r\n //console.log(resp)\r\n this.newBox.BoxId = newBoxId\r\n this.boxService.printLabel(newBoxId)\r\n .subscribe(box => {\r\n console.log(box)\r\n },\r\n err => this.toastr.errorToastr(\"No label printer\", \"box id is \" + err, { position: 'bottom-right' })\r\n )\r\n },\r\n err => console.log(err)\r\n )\r\n //}\r\n this.childBoxes.push(this.newBox);\r\n this.toastr.successToastr(\"box \" + this.newBox.Description + \" added.\", \"Success!\", { position: 'bottom-right' });\r\n this.soundService.beep('beep');\r\n let a = this.el.nativeElement;\r\n a.focus();\r\n },\r\n (err) => {\r\n console.log(err);\r\n this.toastr.errorToastr(err._body, 'Nooooo!', { position: 'bottom-right' });\r\n this.soundService.beep('bong');\r\n });\r\n modal.hide();\r\n }\r\n ngAfterViewInit(): void {\r\n let a = this.el.nativeElement;\r\n a.focus();\r\n }\r\n ngOnInit(): void {\r\n this.route.params\r\n .subscribe((params: Params) => {\r\n this.isAdmin = this.globalsService.Context.Admin;\r\n if (params['id'] == undefined) { }\r\n else {\r\n this.getXHRData(+params['id']);\r\n }\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n \r\n
\r\n
\r\n

{{box?.Description}}

\r\n
\r\n
\r\n \r\n

{{box?.BoxType}}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n
\r\n Move Box ?\r\n
\r\n
\r\n

This box is destined for {{box?.Destination.Name}}.

\r\n

Are you sure you want to move this box?

\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n
\r\n {{contextSample?.SampleNo}} Not found in the box!\r\n
\r\n
\r\n Do you want to unpack anyway?\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n
\r\n Print labels for unpacked samples?\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n\r\n
\r\n Empty Box -\r\n
\r\n
\r\n Are you sure ?\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n","import { Component, OnInit, AfterViewInit, ViewContainerRef, ElementRef, ViewChild } from '@angular/core';\r\nimport { Router, ActivatedRoute, Params } from '@angular/router';\r\nimport { Sample, Box, Location, Site } from '../types';\r\nimport { SampleService } from '../services/sample.service';\r\nimport { BoxService } from '../services/box.service';\r\nimport { LocationService } from '../services/location.service';\r\nimport { SoundService } from '../services/sounds.service';\r\nimport { GlobalsService } from '../services/global.service';\r\n\r\nimport 'rxjs/add/operator/switchMap';\r\nimport * as _ from 'underscore';\r\n\r\nimport { ToastrManager, Toastr } from 'ng6-toastr-notifications';\r\nimport { Observable } from 'rxjs/Observable';\r\n\r\n\r\n@Component({\r\n moduleId: module.id,\r\n templateUrl: '../../Templates/unpack-box-samples.component.html'\r\n})\r\n\r\nexport class UnPackBoxComponent implements OnInit, AfterViewInit {\r\n @ViewChild('moveBoxModal') moveBoxModal: any;\r\n @ViewChild('unpackAnywayModal') unpackAnywayModal: any;\r\n @ViewChild('printAllLabelsModal') printAllLabelsModal: any;\r\n @ViewChild('emptyBoxModal') emptyBoxModal: any;\r\n @ViewChild('labno') el: ElementRef;\r\n sampleTypes: string[] = ['EDTA', 'SST', 'FluOx', 'Coag', 'Heparin', 'Urine', 'AcidUrine', 'Unknown', 'Unknown', 'Unknown'];\r\n samples: Sample[];\r\n locations: Location[];\r\n childBoxes: Box[];\r\n box: Box;\r\n postInProgress: boolean = false;\r\n contextSample: Sample;\r\n isAdmin: boolean;\r\n //despatchLocation: Location;\r\n\r\n //@ViewChild('despatchLocation') despatchLocation: ElementRef;\r\n constructor(\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private sampleService: SampleService,\r\n private boxService: BoxService,\r\n private locationService: LocationService,\r\n private soundService: SoundService,\r\n private globalsService: GlobalsService,\r\n private toastr: ToastrManager,\r\n private vcr: ViewContainerRef) {\r\n //this.toastr.setRootViewContainerRef(vcr);\r\n }\r\n\r\n getBoxAndContents(boxid: number): void {\r\n Observable.forkJoin(\r\n this.sampleService.getSamplesByBoxId(boxid),\r\n this.boxService.getChildBoxes(boxid),\r\n this.boxService.getBoxByBoxId(boxid),\r\n this.locationService.getAllSiteLocations()\r\n )\r\n .subscribe(res => {\r\n this.samples = res[0];\r\n this.childBoxes = res[1];\r\n let box = res[2];\r\n this.locations = _.flatten(_.map(res[3], (s => s.Locations)));\r\n box.Event = 'Started unpacking @ ' + this.globalsService.Context.Location;\r\n switch (box.Status) {\r\n case 'InTransit':\r\n case 'Despatched':\r\n case 'Received':\r\n case 'BeingUnpacked':\r\n case 'Delivered':\r\n //if box.Destination == here then\r\n if (box.Destination.LocationId == this.globalsService.Context.LocationId) {\r\n box.Status = 'BeingUnpacked';\r\n this.boxService.saveBox(box).subscribe(b => this.toastr.successToastr(box.Description + ' status updated', 'Success!', { position: 'bottom-right' }), err => this.toastr.errorToastr(err, 'Badness!', { position: 'bottom-right' }));\r\n this.box = box;\r\n }\r\n else {\r\n this.box = box;\r\n this.moveBoxModal.show();\r\n }\r\n break;\r\n case 'BeingPacked':\r\n if (box.BoxType === 'Fixed Box' || box.BoxType === 'Transient Box') {\r\n //this.box = box;\r\n //_.each(this.samples, s => {\r\n // let suffix = s.SampTypeSuffix === 0 ? '' : s.SampTypeSuffix;\r\n // this.unpackSample(s.SampleNo + suffix);\r\n //})\r\n this.toastr.showToastr(this.toastr.infoToastr('Fixed Box!', 'Not unpacked', { dismiss: 'controlled', position: 'bottom-right' }))\r\n .then((toast: Toastr) => {\r\n setTimeout(() => {\r\n this.toastr.dismissToastr(toast);\r\n this.router.navigate(['/unpack'])\r\n }, 2000);\r\n });\r\n }\r\n else {\r\n this.toastr.showToastr(this.toastr.infoToastr('This box is still being packed', 'Not unpacked', { dismiss: 'controlled', position: 'bottom-right' }))\r\n .then((toast: Toastr) => {\r\n setTimeout(() => {\r\n this.toastr.dismissToastr(toast);\r\n this.router.navigate(['/unpack'])\r\n }, 2000);\r\n });\r\n }\r\n break;\r\n default:\r\n this.toastr.showToastr(this.toastr.infoToastr('This box is @ status ' + box.Status, 'Wrong Status!', { dismiss: 'controlled', position: 'bottom-right' }))\r\n .then((toast: Toastr) => {\r\n setTimeout(() => {\r\n this.toastr.dismissToastr(toast);\r\n this.router.navigate(['/unpack'])\r\n }, 2000);\r\n });\r\n break;\r\n }\r\n },\r\n err => this.toastr.showToastr(this.toastr.errorToastr(err, 'Error!', { dismiss: 'controlled', position: 'bottom-right' }))\r\n .then((toast: Toastr) => {\r\n setTimeout(() => {\r\n this.toastr.dismissToastr(toast);\r\n this.router.navigate(['/unpack'])\r\n }, 2000);\r\n\r\n }),\r\n () => this.checkEmptyUpdateStatus()\r\n )\r\n }\r\n\r\n unpackSample(entry: string) {\r\n\r\n switch (entry.startsWith('BOX')) {\r\n case true:\r\n let boxId = entry.replace('BOX', '');\r\n let box = _.find(this.childBoxes, (b => b.BoxId === +boxId))\r\n if (box === undefined) {\r\n this.toastr.errorToastr('Box with id ' + boxId.toString() + ' not found', 'Wrong!', { position: 'bottom-right' }); //unpacking a box that is not here, disallowed\r\n }\r\n\r\n else {\r\n box.ParentBoxId = null;\r\n box.Status = 'Received';\r\n box.Event = 'Unpacked from ' + this.box.Description;\r\n this.boxService.saveBox(box).subscribe(() => {\r\n this.childBoxes = _.without(this.childBoxes, box);\r\n this.toastr.successToastr(\"box \" + box.Description + \" received\", \"Success!\", { position: 'bottom-right' });\r\n this.soundService.beep('beep');\r\n },\r\n (err) => {\r\n this.toastr.errorToastr(err, 'Nooooo!', { position: 'bottom-right' });\r\n this.soundService.beep('bong');\r\n },\r\n () => this.checkEmptyUpdateStatus()\r\n )\r\n }\r\n /* event.target.value = '';\r\n this.postInProgress = false; */\r\n break;\r\n default:\r\n this.setContextSample(entry);\r\n console.log(this.samples);\r\n let sample = _.find(this.samples, (s => s.SampleNo === this.contextSample.SampleNo && s.SampTypeSuffix === this.contextSample.SampTypeSuffix));\r\n if (sample === undefined) {\r\n //modal 'Not found, do you want to unpack anyway?'\r\n this.unpackAnywayModal.show();\r\n }\r\n else {\r\n console.log(this.box);\r\n sample.Event = 'Unpacked from ' + this.box.Description + ' @ ' + this.box.Destination.Name;\r\n this.sampleService.saveSample(sample)\r\n .subscribe(\r\n id => {\r\n sample.SampleId = id;\r\n this.samples = _.without(this.samples, sample);\r\n this.sampleService.queueSampleForPrint(id).subscribe(\r\n smp => {\r\n this.sampleService.destroySample(sample)\r\n .subscribe(s => {\r\n this.soundService.beep('beep');\r\n this.toastr.successToastr(sample.SampleNo + ' unpacked!', 'Success!', { position: 'bottom-right' });\r\n },\r\n (err) => {\r\n this.toastr.errorToastr(err, 'Oh No!', { position: 'bottom-right' });\r\n this.soundService.beep('bong');\r\n },\r\n () => this.checkEmptyUpdateStatus()\r\n )\r\n }\r\n )\r\n },\r\n (err) => {\r\n this.toastr.errorToastr(err, 'Nooooo!', { position: 'bottom-right' }); //, { positionClass: 'toast-bottom-right' });\r\n this.soundService.beep('bong');\r\n })\r\n }\r\n break;\r\n }\r\n }\r\n\r\n labnoScanned(event: any) {\r\n if (event.target.value !== '' && !this.postInProgress) {\r\n this.postInProgress = true;\r\n var entry = event.target.value.toUpperCase().replace('-', '').replace(/\\\\/g, '');\r\n this.unpackSample(entry)\r\n event.target.value = '';\r\n event.target.focus();\r\n this.postInProgress = false;\r\n }\r\n else {\r\n this.soundService.beep('bong');\r\n event.target.value = '';\r\n event.target.focus();\r\n }\r\n let a = this.el.nativeElement;\r\n a.focus();\r\n }\r\n\r\n setContextSample(entry: any) {\r\n let labno = '';\r\n let smptypID = 0;\r\n let regex = new RegExp(/^\\d{2}[A-Z0-9]\\d{6}[0-9A-Z]$/)\r\n if (entry.length == 10) {\r\n if (regex.test(entry) && !(entry.includes(\"F\") || entry.includes(\"A\") )) { // contains F or A\r\n labno = entry.substr(0, 9);\r\n var suffix = entry.substr(9, 1);\r\n smptypID = isNaN(parseInt(suffix)) ? 9 : parseInt(suffix);\r\n }\r\n else {\r\n labno = entry.toUpperCase();\r\n }\r\n }\r\n if (entry.length <= 9) {\r\n labno = entry.toUpperCase();\r\n }\r\n if (entry.length > 10) {\r\n switch (entry.includes(\"F\") || entry.includes(\"A\")) { // contains F or A\r\n case true:\r\n labno = entry.substr(0, 10);\r\n var suffix = entry.substr(10, 1);\r\n smptypID = isNaN(parseInt(suffix)) ? 9 : parseInt(suffix);\r\n break;\r\n default:\r\n labno = entry.toUpperCase();\r\n smptypID = 9;\r\n break;\r\n }\r\n }\r\n\r\n this.contextSample = {\r\n SampleId: 0,\r\n SampleNo: labno,\r\n SampTypeSuffix: smptypID,\r\n Row: 0,\r\n Col: 0,\r\n SampleType: '',\r\n DateTime: new Date(),\r\n TrackingAuditId: '',\r\n Event: ''\r\n }\r\n console.log(this.contextSample);\r\n }\r\n\r\n navigateToParent(): void {\r\n console.log(this.box.ParentBoxId);\r\n this.router.navigate(['/unpacksamples', +this.box.ParentBoxId]);\r\n }\r\n\r\n checkEmptyUpdateStatus(): void {\r\n //check if empty\r\n console.log('checking empty ...');\r\n if (this.samples.length === 0 && this.childBoxes.length === 0) {\r\n this.box.Status = 'Unpacked';\r\n this.box.Event = 'Unpacked & empty @ ' + this.globalsService.Context.Location;\r\n this.boxService.saveBox(this.box).subscribe(\r\n id => this.toastr.showToastr(this.toastr.infoToastr('box empty', 'Success!'))//, { dismiss: 'controlled', position: 'bottom-right' }))\r\n .then((toast: Toastr) => {\r\n //show Modal - print labels? Yes No - yes,\r\n setTimeout(() => {\r\n this.toastr.dismissToastr(toast);\r\n //if (this.globalsService.Context.LocationId == 56 || this.globalsService.Context.LocationId == 59) {\r\n if (this.globalsService.Context.PrintDemogs) {\r\n this.printAllLabelsModal.show();\r\n }\r\n else {\r\n this.boxService.printUnpackLabels(this.box.BoxId, 0)\r\n .subscribe(id => {\r\n this.router.navigate(['/unpack']);\r\n });\r\n }\r\n }, 2000);\r\n })\r\n )\r\n }\r\n }\r\n\r\n samplesChanged(evt: Sample): void {\r\n this.toastr.successToastr(evt.SampleNo + ' removed!', \"\", { position: 'bottom-right' });\r\n this.samples = _.without(this.samples, evt)\r\n this.checkEmptyUpdateStatus();\r\n }\r\n\r\n unpackEverything(): void {\r\n console.log('unpack owt');\r\n }\r\n\r\n boxesChanged(evt: Box): void {\r\n this.toastr.successToastr(evt.Description + ' removed!', \"\", { position: 'bottom-right' });\r\n this.childBoxes = _.without(this.childBoxes, evt);\r\n this.checkEmptyUpdateStatus();\r\n }\r\n\r\n moveBoxModalHandler(modal: any, yesno: number): void {\r\n console.log('move box', this.locations);\r\n switch (yesno) {\r\n case 0:\r\n modal.hide();\r\n this.router.navigate(['/unpack']);\r\n break;\r\n case 1:\r\n let l = _.find(this.locations, (l => l.LocationId == this.globalsService.Context.LocationId));\r\n console.log(l);\r\n this.box.LastLocation = _.find(this.locations, (l => l.LocationId == this.globalsService.Context.LocationId));\r\n this.box.Destination = _.find(this.locations, (l => l.LocationId == this.globalsService.Context.LocationId));\r\n this.box.Status = 'BeingUnpacked';\r\n this.boxService.saveBox(this.box)\r\n .subscribe(b => {\r\n this.toastr.successToastr(this.box.Description + ' status & location updated', \"\", { position: 'bottom-right' });\r\n }, err => {\r\n this.toastr.errorToastr(err, 'Oh dear!', { position: 'bottom-right' })\r\n }, () => modal.hide()\r\n );\r\n let a = this.el.nativeElement;\r\n a.focus();\r\n break;\r\n default:\r\n //modal.hide();\r\n break;\r\n }\r\n }\r\n\r\n unpackAnywayModalHandler(modal: any, yesno: number) {\r\n switch (yesno) {\r\n case 0:\r\n modal.hide();\r\n //this.router.navigate(['/unpack'])\r\n break;\r\n case 1:\r\n //get sample, update (flatMap) location, event etc., destroy.\r\n let sample = {\r\n SampleId: 0,\r\n SampleNo: this.contextSample.SampleNo,\r\n SampTypeSuffix: this.contextSample.SampTypeSuffix,\r\n BoxId: this.box.BoxId,\r\n Row: 0,\r\n Col: 0, SampleType: this.sampleTypes[this.contextSample.SampTypeSuffix],\r\n DateTime: new Date(),\r\n TrackingAuditId: '',\r\n Event: 'unpacked from ' + this.box.Description + ' @ ' + (new Date()).toShortDateTimeString() + ' in ' + this.globalsService.Context.Location\r\n }\r\n this.sampleService.saveSample(sample)\r\n .subscribe(smp => {\r\n this.sampleService.queueSampleForPrint(smp).subscribe (\r\n _smp => {\r\n this.sampleService.destroySampleById(smp).subscribe(smp => smp, err => console.log(err));\r\n this.toastr.successToastr(sample.SampleNo + ' unpacked!', 'Success!', { position: 'bottom-right' });\r\n }\r\n ),\r\n err => console.log(err)\r\n },\r\n err => console.log(err),\r\n () => modal.hide()\r\n );\r\n break;\r\n default:\r\n modal.hide();\r\n break;\r\n }\r\n }\r\n\r\n emptyBox(): void {\r\n console.log('Empty');\r\n this.emptyBoxModal.show();\r\n }\r\n\r\n emptyBoxHandler(modal: any, yesno: number): void {\r\n console.log(yesno);\r\n switch (yesno) {\r\n case 0:\r\n modal.hide();\r\n break;\r\n case 1:\r\n this.boxService.emptyBox(this.box.BoxId)\r\n .subscribe(b => {\r\n this.toastr.successToastr(this.box.Description + ' emptied', \"Success!\", { position: 'bottom-right' });\r\n }, err => {\r\n this.toastr.errorToastr(err, 'Oh dear!')\r\n },\r\n () => {\r\n this.samples = [];\r\n this.checkEmptyUpdateStatus();\r\n modal.hide();\r\n //this.router.navigate(['/pack']);\r\n }\r\n );\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n printLabelsHandler(modal: any, yesno: number) {\r\n this.boxService.printUnpackLabels(this.box.BoxId, yesno)\r\n .subscribe(id => {\r\n modal.hide();\r\n this.router.navigate(['/unpack']);\r\n });\r\n }\r\n \r\n ngAfterViewInit(): void {\r\n let a = this.el.nativeElement;\r\n a.focus();\r\n }\r\n ngOnInit(): void {\r\n this.route.params\r\n .subscribe((params: Params) => {\r\n this.isAdmin = this.globalsService.Context.Admin;\r\n if (params['id'] == undefined) { }\r\n else {\r\n this.getBoxAndContents(+params['id']);\r\n }\r\n });\r\n }\r\n}\r\n","import { Component, AfterViewInit, OnInit, ViewChild, ElementRef, } from '@angular/core';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\n@Component({\r\n moduleId: module.id,\r\n templateUrl: '../../Templates/scan-barcode.component.html'\r\n})\r\n\r\nexport class SelectComponentByIdComponent implements AfterViewInit, OnInit {\r\n @ViewChild('barcode') el: ElementRef;\r\n public Title: string;\r\n constructor(\r\n private router: Router,\r\n private route: ActivatedRoute\r\n ) { }\r\n\r\n barCodeScanned(event: any) {\r\n if (event.target.value !== '') {\r\n let boxid = +event.target.value.toUpperCase().replace(/\\\\/g, '').replace('BOX', '');\r\n let _path = this.route.snapshot.url[0].path;\r\n switch (_path) {\r\n case 'pack':\r\n this.router.navigate(['/packsamples', boxid]);\r\n break;\r\n case 'unpack':\r\n //let boxid = +event.target.value.toUpperCase().replace('BOX', '');\r\n this.router.navigate(['/unpacksamples', boxid]);\r\n break;\r\n case 'store':\r\n let rakid = +event.target.value.toUpperCase().replace('RACK', '');\r\n this.router.navigate(['/racksamples', rakid]);\r\n break;\r\n case 'findsample':\r\n let sampleno = event.target.value.toUpperCase();\r\n this.router.navigate(['/sampleaudit', sampleno]);\r\n break;\r\n case 'findbox':\r\n this.router.navigate(['/boxaudit', boxid]);\r\n break;\r\n default:\r\n console.log(_path);\r\n this.router.navigate(['/']);\r\n }\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n let _path = this.route.snapshot.url[0].path;\r\n switch (_path) {\r\n case 'pack':\r\n this.Title = \"Pack box\";\r\n break;\r\n case 'unpack':\r\n this.Title = \"Unpack box\";\r\n break;\r\n case 'store':\r\n this.Title = \"Store sample\";\r\n break;\r\n case 'findsample':\r\n this.Title = \"Find sample\";\r\n break;\r\n case 'findbox':\r\n this.Title = \"Find box\";\r\n break;\r\n default:\r\n console.log(_path);\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.el.nativeElement.focus();\r\n }\r\n}\r\n","
{{Title}}
\r\n
\r\n \r\n
\r\n","
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
{{l.address}}{{l._when | date : 'dd/MM/yy HH:mm'}}
\r\n
\r\n\r\n","import { Component, OnInit, ViewChild, ElementRef, AfterViewInit, Input } from '@angular/core';\r\nimport { Map, NavigationControl, GeoJSONSourceOptions, Marker, MapboxGeoJSONFeature, LngLat, Popup } from 'maplibre-gl';\r\nimport { Router, ActivatedRoute, Params } from '@angular/router';\r\n//import { Feature, Geometry } from 'geojson';\r\nimport { BoxService } from '../services/box.service';\r\nimport { PointerLocation } from '../types';\r\n\r\n@Component({\r\n moduleId: module.id,\r\n //selector: 'app-my-map',\r\n selector: 'map-view',\r\n templateUrl: '../../Templates/box-map.component.html'\r\n})\r\nexport class MyMapComponent implements AfterViewInit {\r\n\r\n @ViewChild('map')\r\n private mapContainer: ElementRef;\r\n\r\n private map: Map;\r\n //private boxId: number;\r\n private when: Date\r\n locations: PointerLocation[]\r\n private myAPIKey = 'a68cf69fedad464d9f3f9ca569088da7';\r\n private mapStyle = 'https://maps.geoapify.com/v1/styles/klokantech-basic/style.json';//`https://maps.geoapify.com/v1/styles/osm-carto/style.json`;\r\n private marker: Marker;\r\n selectedIndex: number = 0;\r\n @Input() boxId: number;\r\n @Input() set _when(_when: Date) {\r\n this.when = _when;\r\n var that = this;\r\n this.boxService.getBoxLocations(this.boxId, this.when).subscribe(locs => {\r\n that.locations = locs;\r\n that.map.on('style.load', function () {\r\n that.renderMap(0);\r\n });\r\n });\r\n }\r\n\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private boxService: BoxService\r\n ) { }\r\n\r\n //ngOnInit() {\r\n\r\n // this.route.params\r\n // .subscribe((params: Params) => {\r\n // this.boxId = +params['id'];\r\n // //this.getBoxAudits(this.boxid);\r\n // }\r\n // );\r\n //}\r\n renderMap(locationIndex: number) {\r\n var loc = this.locations[locationIndex];\r\n if (this.marker !== undefined) this.marker.remove();\r\n var airportIcon = document.createElement('div');\r\n airportIcon.classList.add(\"airport\");\r\n airportIcon.style.backgroundImage = `url(https://api.geoapify.com/v1/icon/?type=awesome&scaleFactor=2&color=red&size=large&text=${locationIndex}&apiKey=${this.myAPIKey})`;\r\n airportIcon.classList.add(\"airport\");\r\n var popup = new Popup({\r\n anchor: 'bottom',\r\n offset: [0, -64] // height - shadow\r\n })\r\n .setText(`${(new Date(loc._when)).toShortDateTimeString()}`);\r\n\r\n var marker = new Marker(airportIcon, {\r\n anchor: 'bottom',\r\n offset: [0, 6]\r\n })\r\n .setLngLat(loc.LngLat)\r\n .setPopup(popup)\r\n .addTo(this.map);\r\n this.marker = marker;\r\n this.map.setCenter(loc.LngLat).setZoom(10);\r\n/*\r\n that.map.addSource('route', {\r\n 'type': 'geojson',\r\n 'data': {\r\n 'type': 'Feature',\r\n 'properties': {},\r\n 'geometry': {\r\n 'type': 'LineString',\r\n 'coordinates': that.locations.map(loc => loc.LngLat)\r\n }\r\n }\r\n });\r\n\r\n that.map.addLayer({\r\n 'id': 'route',\r\n 'type': 'line',\r\n 'source': 'route',\r\n 'layout': {\r\n 'line-join': 'round',\r\n 'line-cap': 'round'\r\n },\r\n 'paint': {\r\n 'line-color': '#888',\r\n 'line-width': 3\r\n }\r\n });\r\n*/\r\n }\r\n\r\n onClick(locIndex: number): void {\r\n this.selectedIndex = locIndex;\r\n this.renderMap(locIndex);\r\n }\r\n\r\n ngAfterViewInit() {\r\n\r\n const initialState = {\r\n lng: -0.12762,\r\n lat: 51.52792, // 52.633331, -1.133333 (leicster)\r\n zoom: 7\r\n };\r\n\r\n this.map = new Map({\r\n container: this.mapContainer.nativeElement,\r\n style: `${this.mapStyle}?apiKey=${this.myAPIKey}`,\r\n center: [initialState.lng, initialState.lat],\r\n zoom: initialState.zoom\r\n });\r\n this.map.addControl(new NavigationControl());\r\n var that = this;\r\n\r\n this.boxService.getBoxLocations(this.boxId, this.when).subscribe(locs => {\r\n that.locations = locs;\r\n that.map.on('style.load', function () {\r\n that.renderMap(0);\r\n });\r\n });\r\n }\r\n}\r\n","
Box Audit
\r\n
\r\n
\r\n \r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

0\" style=\"text-align: left\">box - {{boxAudits[0].Description}}

\r\n

Nothing found

\r\n
\r\n \r\n
\r\n

Box Id - {{boxid}}

\r\n
\r\n
\r\n
\r\n
\r\n 0\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Parent
{{b.ParentBox}}{{b.Event}}{{b.DateTime | date : 'dd/MM/yy HH:mm'}}{{b.User}}
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { BoxAudit, SampleAudit } from '../types';\r\nimport { BoxService } from '../services/box.service';\r\nimport { SampleService } from '../services/sample.service';\r\nimport { Router, ActivatedRoute, Params } from '@angular/router';\r\n//import { TimelineElement } from './timeline-element';\r\nimport 'rxjs/add/operator/switchMap';\r\nimport * as _ from 'underscore';\r\n//import { TLSSocket } from 'tls';\r\n\r\n@Component({\r\n moduleId: module.id,\r\n templateUrl: '../../Templates/box-audit.component.html',\r\n //styleUrls: ['../../../node_modules/angular-vertical-timeline/dist/vertical-timeline.css']\r\n})\r\n\r\nexport class BoxAuditComponent implements OnInit {\r\n boxAudits: BoxAudit[]\r\n boxid: number\r\n content = \"content\"\r\n selectedBox: BoxAudit\r\n samples: SampleAudit[]\r\n //timeline: TimelineElement[] //= [{ caption: '16 Jan', date: new Date(2014, 1, 16), selected: true, title: '', content: this.content }];\r\n /*\r\n = [\r\n { caption: '16 Jan', date: new Date(2014, 1, 16), selected: true, title: '', content: this.content },\r\n { caption: '28 Feb', date: new Date(2014, 2, 28), title: 'Event title here', content: this.content },\r\n { caption: '20 Mar', date: new Date(2014, 3, 20), title: 'Event title here', content: this.content },\r\n { caption: '20 May', date: new Date(2014, 5, 20), title: 'Event title here', content: this.content },\r\n { caption: '09 Jul', date: new Date(2014, 7, 9), title: 'Event title here', content: this.content },\r\n { caption: '30 Aug', date: new Date(2014, 8, 30), title: 'Event title here', content: this.content },\r\n { caption: '15 Sep', date: new Date(2014, 9, 15), title: 'Event title here', content: this.content },\r\n { caption: '01 Nov', date: new Date(2014, 11, 1), title: 'Event title here', content: this.content },\r\n { caption: '10 Dec', date: new Date(2014, 12, 10), title: 'Event title here', content: this.content },\r\n { caption: '29 Jan', date: new Date(2015, 1, 19), title: 'Event title here', content: this.content },\r\n { caption: '3 Mar', date: new Date(2015, 3, 3), title: 'Event title here', content: this.content },\r\n ];\r\n */\r\n constructor(\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private boxService: BoxService,\r\n private sampleService: SampleService\r\n ) { }\r\n\r\n onSelect(box: BoxAudit): void {\r\n this.selectedBox = box;\r\n this.sampleService.getBoxSampleAuditsByTrackingID(box.TrackingAuditId)\r\n .subscribe(samples => this.samples = samples)\r\n }\r\n\r\n samplesChanged(evt: any): void { }\r\n\r\n getBoxAudits(boxid: number): void {\r\n this.boxService.getBoxAudits(boxid)\r\n .subscribe(\r\n boxauds => {\r\n //boxauds.forEach(ba => ba.DateTime = new Date(ba.DateTime.toLocaleString()));\r\n this.boxAudits = boxauds;\r\n //this.timeline = boxauds.map((ba, i) =>\r\n // ({ caption: ba.Status, date: new Date(ba.DateTime.toLocaleString()), title: `${ba.LastLocation} - ${ba.Description}`, content: ba.Event })\r\n //)\r\n },\r\n err => console.log(err)\r\n )\r\n }\r\n\r\n map(boxid: number) {\r\n this.router.navigate(['/map', boxid]);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.route.params\r\n .subscribe((params: Params) => {\r\n this.boxid = +params['id'];\r\n this.getBoxAudits(this.boxid);\r\n }\r\n );\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { SampleService } from '../services/sample.service'\r\nimport { saveAs } from 'file-saver';\r\n\r\n@Component({\r\n moduleId: module.id,\r\n templateUrl: '../../Templates/sample-list-audit.component.html'\r\n})\r\n\r\nexport class SampleListAuditComponent implements OnInit {\r\n fileToUpload: File = null;\r\n\r\n constructor(private sampleService: SampleService) { }\r\n\r\n private saveToFileSystem(response) {\r\n console.log(response);\r\n const contentDispositionHeader: string = response.headers.get('content-disposition');\r\n const parts: string[] = contentDispositionHeader.split(';');\r\n const filename = parts[1].split('=')[1];\r\n console.log(filename);\r\n //const blob = new File(response.body, filename, { type: 'text/plain;charset=utf-8' });\r\n saveAs(response.body, filename);\r\n }\r\n\r\n uploadList(files: FileList) {\r\n this.fileToUpload = files.item(0);\r\n console.log(this.fileToUpload);\r\n this.sampleService.postFile(this.fileToUpload).then(response => this.saveToFileSystem(response))\r\n }\r\n\r\n ngOnInit(): void { }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n","import { Observable } from \"rxjs/Observable\";\r\nimport { HttpEvent, HttpRequest, HttpInterceptor, HttpHandler, HttpResponse } from \"@angular/common/http\";\r\nimport { LoadingIndicatorService } from \"./services/loading-indicator.service\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport 'rxjs/add/operator/finally';\r\nimport 'rxjs/add/operator/do';\r\n\r\n@Injectable()\r\n\r\nexport class LoadingIndicatorInterceptor implements HttpInterceptor {\r\n\r\n constructor(private loadingIndicatorService: LoadingIndicatorService) { }\r\n intercept(req: HttpRequest, next: HttpHandler): Observable> {\r\n // emit onStarted event before request execution\r\n //console.log('intercepted', req);\r\n this.loadingIndicatorService.onStarted(req);\r\n return next\r\n .handle(req)\r\n // emit onFinished event after request execution\r\n .finally(() => this.loadingIndicatorService.onFinished(req));\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { BrowserModule } from '@angular/platform-browser';\r\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\r\nimport { FormsModule } from '@angular/forms';\r\n//import { RouterModule } from '@angular/router';\r\nimport { HttpModule } from '@angular/http';\r\nimport { HttpClientModule, HTTP_INTERCEPTORS } from \"@angular/common/http\";\r\nimport { NgbModule } from '@ng-bootstrap/ng-bootstrap';\r\nimport { NgDragDropModule } from 'ng-drag-drop';\r\nimport { ToastrModule } from 'ng6-toastr-notifications';\r\n//import { ToastrManager } from 'ng6-toastr-notifications';\r\nimport { NgIdleModule } from '@ng-idle/core';\r\n\r\nimport { AppComponent } from '../components/app.component';\r\nimport { UserListComponent } from '../components/user-list.component';\r\nimport { UserSiteListComponent } from '../components/user-sites-list.component';\r\nimport { LocationListComponent } from '../components/location-list.component';\r\nimport { ContainerListComponent } from '../components/container-list.component';\r\nimport { BoxListComponent } from '../components/box-list.component';\r\nimport { RackListComponent } from '../components/rack-list.component';\r\nimport { StoreSamplesComponent } from '../components/store-samples.component';\r\nimport { SampleListComponent } from '../components/samples-list.component';\r\nimport { SampleAuditComponent } from '../components/sample-audit.component';\r\nimport { PackBoxComponent } from '../components/pak-box-samples.component';\r\nimport { UnPackBoxComponent } from '../components/unpak-box-samples.component';\r\nimport { ModalComponent } from '../components/modal.component';\r\nimport { SelectComponentByIdComponent } from '../components/select-component-byId.component';\r\nimport { BoxesListComponent } from '../components/boxes-list.component';\r\nimport { BoxAuditComponent } from '../components/box-audit.component';\r\nimport { HorizontalTimelineComponent } from '../components/horizontal-timeline.component';\r\nimport { LocationDespatchSitesComponent } from '../components/loc-despatch-locs-list.component';\r\nimport { SampleListAuditComponent } from '../components/sample-list-audit.component'\r\nimport { LoadingIndicatorComponent } from '../components/loading-indicator.component';\r\nimport { MyMapComponent } from '../components/box-map.component';\r\nimport { LoadingIndicatorService } from '../services/loading-indicator.service';\r\nimport { LoadingIndicatorInterceptor } from '../LoadingIndicatorInterceptor';\r\nimport { UserService } from '../services/user.service';\r\nimport { LocationService } from '../services/location.service';\r\nimport { ContainerService } from '../services/container.service';\r\nimport { BoxService } from '../services/box.service';\r\nimport { RackService } from '../services/rack.service';\r\nimport { SampleService } from '../services/sample.service';\r\nimport { SoundService } from '../services/sounds.service';\r\nimport { GlobalsService } from '../services/global.service';\r\n\r\n//import { AppRoutingModule } from '../modules/app-routing.module';\r\nimport { RouterModule } from '@angular/router';\r\n\r\nimport { EscapePipe, TruncatePipe, ToShortDateTimePipe, BoolToScanDirPipe } from '../pipes.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n BrowserModule,\r\n FormsModule,\r\n HttpClientModule,\r\n HttpModule,\r\n //AppRoutingModule,\r\n NgDragDropModule.forRoot(),\r\n BrowserAnimationsModule,\r\n ToastrModule.forRoot(),\r\n NgbModule,\r\n NgIdleModule.forRoot(),\r\n RouterModule.forRoot(\r\n [\r\n { path: '', redirectTo: '/', pathMatch: 'full' },\r\n { path: 'users', component: UserListComponent },\r\n { path: 'locations', component: LocationListComponent },\r\n\r\n { path: 'containers', component: ContainerListComponent },\r\n { path: 'containers/:id', component: ContainerListComponent },\r\n\r\n { path: 'boxes', component: BoxListComponent },\r\n { path: 'boxes/:id', component: BoxListComponent },\r\n\r\n { path: 'racks', component: RackListComponent },\r\n { path: 'racks/:id', component: RackListComponent },\r\n\r\n { path: 'store', component: SelectComponentByIdComponent },\r\n { path: 'racksamples/:id', component: StoreSamplesComponent },\r\n\r\n { path: 'pack', component: SelectComponentByIdComponent },\r\n { path: 'packsamples/:id', component: PackBoxComponent },\r\n\r\n { path: 'unpack', component: SelectComponentByIdComponent },\r\n { path: 'unpacksamples/:id', component: UnPackBoxComponent },\r\n\r\n { path: 'findsample', component: SelectComponentByIdComponent },\r\n { path: 'sampleaudit/:id', component: SampleAuditComponent },\r\n\r\n { path: 'findbox', component: SelectComponentByIdComponent },\r\n { path: 'boxaudit/:id', component: BoxAuditComponent },\r\n\r\n { path: 'findlist', component: SampleListAuditComponent },\r\n\r\n { path: 'map/:id', component: MyMapComponent }\r\n ]\r\n )\r\n ],\r\n\r\n declarations: [\r\n AppComponent,\r\n ModalComponent,\r\n LoadingIndicatorComponent,\r\n UserListComponent,\r\n UserSiteListComponent,\r\n LocationListComponent,\r\n ContainerListComponent,\r\n BoxListComponent,\r\n RackListComponent,\r\n StoreSamplesComponent,\r\n SampleListComponent,\r\n SampleAuditComponent,\r\n SampleListAuditComponent,\r\n BoxesListComponent,\r\n SelectComponentByIdComponent,\r\n PackBoxComponent,\r\n UnPackBoxComponent,\r\n BoxAuditComponent,\r\n MyMapComponent,\r\n HorizontalTimelineComponent,\r\n BoolToScanDirPipe,\r\n LocationDespatchSitesComponent\r\n ],\r\n\r\n providers: [\r\n UserService,\r\n LocationService,\r\n ContainerService,\r\n BoxService,\r\n RackService,\r\n SampleService,\r\n SoundService,\r\n GlobalsService,\r\n \r\n LoadingIndicatorService,\r\n {\r\n provide: HTTP_INTERCEPTORS,\r\n useFactory: (service: LoadingIndicatorService) => new LoadingIndicatorInterceptor(service),\r\n multi: true,\r\n deps: [LoadingIndicatorService]\r\n }\r\n ],\r\n\r\n bootstrap: [AppComponent]\r\n})\r\nexport class AppModule { }\r\n","import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\r\nimport { AppModule } from './app/modules/app.module';\r\nimport {enableProdMode} from '@angular/core';\r\nenableProdMode();\r\n\r\nplatformBrowserDynamic().bootstrapModule(AppModule);\r\n\r\ndeclare global {\r\n interface Date {\r\n toShortDateTimeString(): String;\r\n }\r\n}\r\n\r\nDate.prototype.toShortDateTimeString = function (): String {\r\n let dd = ('0' + (this.getDate().toString())).substr(-2);\r\n let mm = ('0' + ((this.getMonth() + 1).toString())).substr(-2);\r\n let yy = (this.getFullYear().toString()).substr(-2);\r\n let hh = ('0' + (this.getHours().toString())).substr(-2);\r\n let mins = ('0' + (this.getMinutes().toString())).substr(-2);\r\n return dd + '/' + mm + '/' + yy + ' ' + hh + ':' + mins;\r\n}\r\n","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = \"zn8P\";"]}