{"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","isLocal","undefined","url","get","catch","error","throw","subscribe","r","json","context","map","res","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","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","delete","SampleNo","fileToUpload","formData","FormData","name","responseType","observe","toPromise","SoundService","sounds","parse","text","sound","Audio","play","ModalComponent","visible","visibleAnimate","sampleService","removalMessage","SamplesChangedEvt","samples","reverseSortedSamples","i","parent","saveSample","destroySample","errorToastr","position","sampleRemovedModal","contextSample","hide","show","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","when","getBoxLocations","locs","on","renderMap","locationIndex","marker","airportIcon","document","createElement","classList","add","style","backgroundImage","popup","Popup","anchor","offset","setText","Marker","setLngLat","LngLat","setPopup","addTo","setCenter","setZoom","locIndex","initialState","Map","mapContainer","center","zoom","addControl","NavigationControl","BoxAuditComponent","content","selectedBox","getBoxSampleAuditsByTrackingID","getBoxAudits","boxauds","boxAudits","body","uploadList","LoadingIndicatorInterceptor","next","onStarted","handle","finally","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":"6RAUO,MAAM,EAyBX,YACUA,GAAA,KAAAA,OAvBV,cACE,OAAOC,KAAKC,QAGd,YAAYA,GACVD,KAAKC,QAAUA,EACfD,KAAKC,aAA2BC,IAAjBF,KAAKC,SAAgCD,KAAKC,QACzD,MAAME,EAAM,eAAeH,KAAKC,UAChCD,KAAKD,KAAKK,IAAID,GACXE,MAAOC,GAAe,IAAWC,MAAMD,EAAMA,OAAS,iBACtDE,UAAWC,IACVT,KAAKC,QAAUQ,EAAEC,SAOvB,cACE,OAAOV,KAAKW,QAQd,aAEE,OAAOX,KAAKD,KAAKK,IAAI,eAClBC,MACAC,GAAe,IAAWC,MAAMD,EAAMA,OAAS,iBAC/CM,IAAKC,IAEJb,KAAKW,QAAUE,EAAIH,U,sCArCd,GA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G,EAAEsX,KAAO,mBACHtX,KAGRkX,EAAyBK,KAAO,WAAa,MAAO,IACpDL,EAAyBE,QAAUF,EACnCM,EAAOC,QAAUP,EACjBA,EAAyBtX,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\";"]}