{"version":3,"sources":["./node_modules/file-saver/dist/FileSaver.min.js","./src/app/activity-query/activity-query/activity-query.component.html","./src/app/activity-query/activity-query-routing.module.ts","./src/app/activity-query/activity-query.module.ts","./src/app/activity-query/activity-query.service.ts","./src/app/activity-query/activity-query/activity-query.component.scss","./src/app/activity-query/activity-query/activity-query.component.ts"],"names":[],"mappings":";;;;;;;;;AAAA,+GAAe,GAAG,IAAqC,CAAC,iCAAO,EAAE,oCAAC,CAAC;AAAA;AAAA;AAAA,oGAAC,CAAC,KAAK,EAA6E,CAAC,kBAAkB,aAAa,gBAAgB,+BAA+B,WAAW,4FAA4F,WAAW,kEAAkE,4DAA4D,YAAY,IAAI,kBAAkB,yBAAyB,0DAA0D,kBAAkB,sBAAsB,yCAAyC,UAAU,cAAc,yBAAyB,oBAAoB,IAAI,SAAS,UAAU,oCAAoC,cAAc,IAAI,yCAAyC,SAAS,0CAA0C,0FAA0F,qOAAqO,0DAA0D,uDAAuD,iNAAiN,0BAA0B,4BAA4B,KAAK,KAAK,gDAAgD,mFAAmF,sBAAsB,KAAK,kCAAkC,iDAAiD,KAAK,GAAG,mBAAmB,8HAA8H,oIAAoI,2CAA2C,qBAAqB,uBAAuB,eAAe,0BAA0B,GAAG,wBAAwB,yCAAyC,oBAAoB,KAAK,gDAAgD,4DAA4D,qBAAqB,OAAO,EAAE,oBAAoB,KAA0B,qBAAqB;;AAEngF,yC;;;;;;;;;;;;ACFA;AAAe,mmDAAoiD,sd;;;;;;;;;;;;;;;;;;;;;;;;;;;ACA9/C;AACE;AAEf;AAC2C;AAEnF,IAAM,MAAM,GAAW;IACtB;QACC,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,+FAAsB;QACjC,WAAW,EAAE,CAAC,oDAAS,CAAC;KACxB;CACD,CAAC;AAKF;IAAA;IAA0C,CAAC;IAA9B,0BAA0B;QAJtC,8DAAQ,CAAC;YACT,OAAO,EAAE,CAAC,4DAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC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2DAAW;YACjB,yDAAY;OAvBhB,sBAAsB,CAuKlC;IAAD,6BAAC;CAAA,CAvK2C,0FAAiB,GAuK5D;AAvKkC","file":"activity-query-activity-query-module.js","sourcesContent":["(function(a,b){if(\"function\"==typeof define&&define.amd)define([],b);else if(\"undefined\"!=typeof exports)b();else{b(),a.FileSaver={exports:{}}.exports}})(this,function(){\"use strict\";function b(a,b){return\"undefined\"==typeof b?b={autoBom:!1}:\"object\"!=typeof b&&(console.warn(\"Deprecated: Expected third argument to be a object\"),b={autoBom:!b}),b.autoBom&&/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(a.type)?new Blob([\"\\uFEFF\",a],{type:a.type}):a}function c(b,c,d){var e=new XMLHttpRequest;e.open(\"GET\",b),e.responseType=\"blob\",e.onload=function(){a(e.response,c,d)},e.onerror=function(){console.error(\"could not download file\")},e.send()}function d(a){var b=new XMLHttpRequest;b.open(\"HEAD\",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent(\"click\"))}catch(c){var b=document.createEvent(\"MouseEvents\");b.initMouseEvent(\"click\",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f=\"object\"==typeof window&&window.window===window?window:\"object\"==typeof self&&self.self===self?self:\"object\"==typeof global&&global.global===global?global:void 0,a=f.saveAs||(\"object\"!=typeof window||window!==f?function(){}:\"download\"in HTMLAnchorElement.prototype?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement(\"a\");g=g||b.name||\"download\",j.download=g,j.rel=\"noopener\",\"string\"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target=\"_blank\")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:\"msSaveOrOpenBlob\"in navigator?function(f,g,h){if(g=g||f.name||\"download\",\"string\"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement(\"a\");i.href=f,i.target=\"_blank\",setTimeout(function(){e(i)})}}:function(a,b,d,e){if(e=e||open(\"\",\"_blank\"),e&&(e.document.title=e.document.body.innerText=\"downloading...\"),\"string\"==typeof a)return c(a,b,d);var g=\"application/octet-stream\"===a.type,h=/constructor/i.test(f.HTMLElement)||f.safari,i=/CriOS\\/[\\d]+/.test(navigator.userAgent);if((i||g&&h)&&\"object\"==typeof FileReader){var j=new FileReader;j.onloadend=function(){var a=j.result;a=i?a:a.replace(/^data:[^;]*;/,\"data:attachment/file;\"),e?e.location.href=a:location=a,e=null},j.readAsDataURL(a)}else{var k=f.URL||f.webkitURL,l=k.createObjectURL(a);e?e.location=l:location.href=l,e=null,setTimeout(function(){k.revokeObjectURL(l)},4E4)}});f.saveAs=a.saveAs=a,\"undefined\"!=typeof module&&(module.exports=a)});\n\n//# sourceMappingURL=FileSaver.min.js.map","export default \"<div cdkTrapFocus class=\\\"component-container\\\">\\r\\n\\t<mat-card fxLayout=\\\"column\\\" fxFlex>\\r\\n\\t\\t<mat-card-title>\\r\\n\\t\\t\\t<div fxLayout=\\\"row\\\" fxLayoutAlign=\\\"start center\\\">\\r\\n\\t\\t\\t\\t<div>Activity query</div>\\r\\n\\t\\t\\t</div>\\r\\n\\t\\t</mat-card-title>\\r\\n\\r\\n\\t\\t<form novalidate autocomplete=\\\"off\\\" [formGroup]=\\\"form\\\" ngClass.lt-md=\\\"xs-dates-form\\\" ngClass.gt-sm=\\\"dates-form\\\">\\r\\n\\t\\t\\t<div\\r\\n\\t\\t\\t\\tfxLayout=\\\"column\\\"\\r\\n\\t\\t\\t\\tfxLayout.gt-xs=\\\"row\\\"\\r\\n\\t\\t\\t\\tfxLayoutGap.xs=\\\"4px\\\"\\r\\n\\t\\t\\t\\tfxLayoutGap=\\\"16px\\\"\\r\\n\\t\\t\\t\\tfxLayoutAlign=\\\"start baseline\\\"\\r\\n\\t\\t\\t>\\r\\n\\t\\t\\t\\t<pp-select\\r\\n\\t\\t\\t\\t\\t*ngIf=\\\"practiceMode\\\"\\r\\n\\t\\t\\t\\t\\t[options]=\\\"professionals\\\"\\r\\n\\t\\t\\t\\t\\tlabel=\\\"Professional\\\"\\r\\n\\t\\t\\t\\t\\tplaceholder=\\\"Professional\\\"\\r\\n\\t\\t\\t\\t\\t[required]=\\\"true\\\"\\r\\n\\t\\t\\t\\t\\t[nullable]=\\\"false\\\"\\r\\n\\t\\t\\t\\t\\tformControlName=\\\"professionalId\\\"\\r\\n\\t\\t\\t\\t>\\r\\n\\t\\t\\t\\t</pp-select>\\r\\n\\r\\n\\t\\t\\t\\t<pp-date #dateFrom label=\\\"Date from\\\" formControlName=\\\"dateFrom\\\"></pp-date>\\r\\n\\t\\t\\t\\t<pp-date label=\\\"Date to\\\" formControlName=\\\"dateTo\\\"></pp-date>\\r\\n\\t\\t\\t\\t<div fxLayout=\\\"row\\\" fxLayoutGap=\\\"8px\\\">\\r\\n\\t\\t\\t\\t\\t<pp-button label=\\\"Display\\\" (clicked)=\\\"display()\\\"></pp-button>\\r\\n\\t\\t\\t\\t\\t<pp-button [disabled]=\\\"!hasResults\\\" label=\\\"Export to CSV\\\" (clicked)=\\\"exportToCsv()\\\"></pp-button>\\r\\n\\t\\t\\t\\t\\t<pp-button [disabled]=\\\"!hasResults\\\" label=\\\"Export to Excel\\\" (clicked)=\\\"exportToExcel()\\\"></pp-button>\\r\\n\\t\\t\\t\\t</div>\\r\\n\\t\\t\\t</div>\\r\\n\\t\\t</form>\\r\\n\\r\\n\\t\\t<div fxLayout=\\\"column\\\" fxFlex *tdLoading=\\\"let data; until: !loading\\\" class=\\\"container\\\">\\r\\n\\t\\t\\t<div fxLayout=\\\"row\\\" fxFlex *ngIf=\\\"hasResults\\\">\\r\\n\\t\\t\\t\\t<pp-selection-grid\\r\\n\\t\\t\\t\\t\\t#grid\\r\\n\\t\\t\\t\\t\\tfxFlex\\r\\n\\t\\t\\t\\t\\t[hasEdit]=\\\"false\\\"\\r\\n\\t\\t\\t\\t\\t[columnDefs]=\\\"columnDefs\\\"\\r\\n\\t\\t\\t\\t\\t[rowData]=\\\"entries\\\"\\r\\n\\t\\t\\t\\t\\t[pinnedBottomRowData]=\\\"footerEntries\\\"\\r\\n\\t\\t\\t\\t\\t[readOnly]=\\\"true\\\"\\r\\n\\t\\t\\t\\t>\\r\\n\\t\\t\\t\\t</pp-selection-grid>\\r\\n\\t\\t\\t</div>\\r\\n\\t\\t</div>\\r\\n\\t</mat-card>\\r\\n</div>\\r\\n\"","import { NgModule, Injectable } from '@angular/core';\r\nimport { RouterModule, Routes } from '@angular/router';\r\n\r\nimport { AuthGuard } from 'app/_guards';\r\nimport { ActivityQueryComponent } from './activity-query/activity-query.component';\r\n\r\nconst routes: Routes = [\r\n\t{\r\n\t\tpath: '',\r\n\t\tcomponent: ActivityQueryComponent,\r\n\t\tcanActivate: [AuthGuard]\r\n\t},\r\n];\r\n@NgModule({\r\n\timports: [RouterModule.forChild(routes)],\r\n\texports: [RouterModule],\r\n})\r\nexport class ActivityQueryRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { SharedModule } from 'app/shared/shared.module';\r\nimport { ActivityQueryRoutingModule } from './activity-query-routing.module';\r\nimport { ActivityQueryComponent } from './activity-query/activity-query.component';\r\nimport { ActivityQueryService } from './activity-query.service';\r\n\r\n@NgModule({\r\n\timports: [\r\n\t\tCommonModule,\r\n\t\tSharedModule,\r\n\t\tActivityQueryRoutingModule\r\n\t],\r\n\tdeclarations: [\r\n\t\tActivityQueryComponent\r\n\t],\r\n\tproviders: [\r\n\t\tActivityQueryService\r\n\t],\r\n\tentryComponents: [\r\n\t]\r\n})\r\nexport class ActivityQueryModule { }\r\n","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\n\r\nimport { BaseService } from 'app/services/base-service';\r\n\r\nimport {\r\n\tActivityQueryParams,\r\n\tCommonService,\r\n\tActivityQueryResultDto,\r\n} from 'app/services';\r\n\r\n@Injectable()\r\nexport class ActivityQueryService extends BaseService {\r\n\tconstructor(common: CommonService) {\r\n\t\tsuper(common);\r\n\t}\r\n\r\n\tgetActivityQuery(startDate: Date, endDate: Date, professionalId: number): Observable<ActivityQueryResultDto> {\r\n\t\tconst params = <ActivityQueryParams> {\r\n\t\t\tstartDate,\r\n\t\t\tendDate,\r\n\t\t\tprofessionalId\r\n\t\t}\r\n\t\treturn this.crud.loadWithPost('api/activityQuery', params);\r\n\t}\r\n}\r\n","export default \":host {\\n height: 100%; }\\n\\n:host > div {\\n height: 100%;\\n position: relative; }\\n\\n.header {\\n margin-bottom: 8px; }\\n\\nform.dates-form {\\n position: absolute;\\n top: 4px;\\n right: 8px; }\\n\\nform.xs-dates-form {\\n padding-left: 16px; }\\n\\n.container {\\n padding-left: 16px; }\\n\\npp-date {\\n display: inline-block;\\n width: 160px; }\\n\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvYWN0aXZpdHktcXVlcnkvYWN0aXZpdHktcXVlcnkvQzpcXEdpdFJlcG9zXFxFYXBDb3JlXFxzcmNcXHdlYlxcUHJvZmVzc2lvbmFsUG9ydGFsLkFuZ3VsYXIvc3JjXFxhcHBcXGFjdGl2aXR5LXF1ZXJ5XFxhY3Rpdml0eS1xdWVyeVxcYWN0aXZpdHktcXVlcnkuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDQyxZQUFZLEVBQUE7O0FBR2I7RUFDQyxZQUFZO0VBQ1osa0JBQWtCLEVBQUE7O0FBR25CO0VBQ0Msa0JBQWtCLEVBQUE7O0FBR25CO0VBQ0Msa0JBQWtCO0VBQ2xCLFFBQVE7RUFDUixVQUFVLEVBQUE7O0FBR1g7RUFDQyxrQkFBa0IsRUFBQTs7QUFHbkI7RUFDQyxrQkFBa0IsRUFBQTs7QUFHbkI7RUFDQyxxQkFBcUI7RUFDckIsWUFBWSxFQUFBIiwiZmlsZSI6InNyYy9hcHAvYWN0aXZpdHktcXVlcnkvYWN0aXZpdHktcXVlcnkvYWN0aXZpdHktcXVlcnkuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdCB7XHJcblx0aGVpZ2h0OiAxMDAlO1xyXG59XHJcblxyXG46aG9zdD5kaXYge1xyXG5cdGhlaWdodDogMTAwJTtcclxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XHJcbn1cclxuXHJcbi5oZWFkZXIge1xyXG5cdG1hcmdpbi1ib3R0b206IDhweDtcclxufVxyXG5cclxuZm9ybS5kYXRlcy1mb3JtIHtcclxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XHJcblx0dG9wOiA0cHg7XHJcblx0cmlnaHQ6IDhweDtcclxufVxyXG5cclxuZm9ybS54cy1kYXRlcy1mb3JtIHtcclxuXHRwYWRkaW5nLWxlZnQ6IDE2cHg7XHJcbn1cclxuXHJcbi5jb250YWluZXIge1xyXG5cdHBhZGRpbmctbGVmdDogMTZweDtcclxufVxyXG5cclxucHAtZGF0ZSB7XHJcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xyXG5cdHdpZHRoOiAxNjBweDtcclxufSJdfQ== */\"","import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core';\r\nimport { DecimalPipe } from '@angular/common';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport * as moment from 'moment';\r\nimport * as _ from 'lodash';\r\n\r\nimport { DateComponent } from 'app/shared/forms/date-component';\r\nimport { SelectionGridComponent } from 'app/shared/selection-grid/selection-grid.component';\r\nimport { BaseViewComponent } from 'app/shared/base-view/base-view-component';\r\nimport { saveAs } from 'file-saver';\r\n\r\nimport {\r\n\tAgGridService,\r\n\tActivityQueryDto,\r\n\tCommonService,\r\n\tActivityQueryResultDto,\r\n\tProfessionalDto,\r\n\tUtilsService,\r\n} from 'app/services';\r\n\r\nimport { ActivityQueryService } from '../activity-query.service';\r\nimport { GridReadyEvent } from 'ag-grid';\r\n\r\n@Component({\r\n\tselector: 'pp-activity-query',\r\n\ttemplateUrl: './activity-query.component.html',\r\n\tstyleUrls: ['./activity-query.component.scss'],\r\n})\r\nexport class ActivityQueryComponent extends BaseViewComponent implements OnInit, AfterViewInit {\r\n\t// Template variables\r\n\tcolumnDefs: any[];\r\n\thasResults: boolean;\r\n\tform: FormGroup;\r\n\tentries: ActivityQueryDto[];\r\n\tfooterEntries: any[];\r\n\texportUrl: string;\r\n\tprofessionals: ProfessionalDto[];\r\n\tpracticeMode: boolean;\r\n\r\n\texcelExportBytes: string;\r\n\texcelExportFileName: string;\r\n\r\n\t@ViewChild('dateFrom', { static: true }) dateFrom: DateComponent;\r\n\t@ViewChild('grid', { static: false }) grid: SelectionGridComponent;\r\n\r\n\tconstructor(\r\n\t\tcommon: CommonService,\r\n\t\tprivate agGrid: AgGridService,\r\n\t\tprivate service: ActivityQueryService,\r\n\t\tprivate fb: FormBuilder,\r\n\t\tprivate decimalPipe: DecimalPipe,\r\n\t\tprivate utils: UtilsService\r\n\t) {\r\n\t\tsuper(common);\r\n\t}\r\n\r\n\tngOnInit() {\r\n\t\tthis.practiceMode = this.config.config.isPractice;\r\n\r\n\t\tthis.buildForm();\r\n\t\tthis.setUpAgGrid();\r\n\r\n\t\tthis.professionals = _.cloneDeep(this.config.professionals);\r\n\t\tthis.professionals.splice(0, 0, <ProfessionalDto>{\r\n\t\t\tid: -1,\r\n\t\t\tname: '(All professionals)',\r\n\t\t});\r\n\r\n\t\tthis.setDefaults();\r\n\r\n\t\tif (this.practiceMode) {\r\n\t\t\tthis.form.controls.professionalId.valueChanges.subscribe((v) => {\r\n\t\t\t\t// Re-display, after the value change is committed.\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.display();\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tngAfterViewInit() {\r\n\t\tthis.dateFrom.setFocus();\r\n\t}\r\n\r\n\tdisplay() {\r\n\t\tif (this.form.invalid) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.loading = true;\r\n\r\n\t\tconst formValue = this.form.value;\r\n\t\tthis.service.getActivityQuery(formValue.dateFrom, formValue.dateTo, formValue.professionalId).subscribe(\r\n\t\t\t(result) => this.handleResult(result),\r\n\t\t\t(err) => this.handleError(err, 'running activity query')\r\n\t\t);\r\n\t}\r\n\r\n\texportToCsv() {\r\n\t\tthis.grid.exportDataAsCsv({\r\n\t\t\tfileName: 'Activity-query.csv',\r\n\t\t});\r\n\t}\r\n\r\n\texportToExcel() {\r\n\t\tconst blob = this.utils.base64FileToBlob(this.excelExportBytes);\r\n\t\tsaveAs(blob, this.excelExportFileName);\r\n\t}\r\n\r\n\tprivate setDefaults() {\r\n\t\tconst today = moment();\r\n\t\tconst startLastMonth = today.clone().add(-1, 'month').startOf('month');\r\n\t\tconst endLastMonth = startLastMonth.clone().endOf('month');\r\n\r\n\t\tthis.form.patchValue({\r\n\t\t\tdateFrom: startLastMonth.toDate(),\r\n\t\t\tdateTo: endLastMonth.toDate(),\r\n\t\t\tprofessionalId: -1,\r\n\t\t});\r\n\t}\r\n\r\n\tprivate handleResult(result: ActivityQueryResultDto) {\r\n\t\tconst entries = result.entries || [];\r\n\t\tconst totalCost = _.sumBy(entries, (r) => r.costAmount);\r\n\r\n\t\tthis.excelExportBytes = result.excelExportBase64;\r\n\t\tthis.excelExportFileName = result.excelExportFilename;\r\n\r\n\t\tthis.entries = entries;\r\n\t\tthis.footerEntries = [\r\n\t\t\t{\r\n\t\t\t\ttotalCost,\r\n\t\t\t},\r\n\t\t];\r\n\t\tthis.hasResults = true;\r\n\t\tthis.loading = false;\r\n\t}\r\n\r\n\tprivate buildForm() {\r\n\t\tthis.form = this.fb.group({\r\n\t\t\tprofessionalId: null,\r\n\t\t\tallProfessionals: null,\r\n\t\t\tdateFrom: ['', Validators.required],\r\n\t\t\tdateTo: ['', Validators.required],\r\n\t\t});\r\n\t}\r\n\r\n\tprivate setUpAgGrid() {\r\n\t\tconst grid = this.agGrid;\r\n\t\tconst renderTotalCost = (params) => {\r\n\t\t\tconst data = params.data;\r\n\t\t\tconst totalCost = data.totalCost;\r\n\r\n\t\t\treturn this.decimalPipe.transform(totalCost, '1.2');\r\n\t\t};\r\n\t\tthis.columnDefs = [\r\n\t\t\tgrid.makeTextColumn('Case #', 'fileNumber', { fixedWidth: 70 }),\r\n\t\t\tgrid.makeTextColumn('Status', 'activityStatus', { fixedWidth: 75 }),\r\n\t\t\tgrid.makeDateTimeColumn('Date/time', 'activityStartDateTime', { pinnedRowCellRenderer: grid.renderBlank }),\r\n\t\t\tgrid.makeNumberColumn('Session #', 'sessionNumber', '', {\r\n\t\t\t\tcellClass: 'align-center',\r\n\t\t\t}),\r\n\t\t\tgrid.makeTextColumn('DNA', 'isDna', {\r\n\t\t\t\tcellRenderer: grid.renderBoolYesOnly.bind(grid, 'isDna'),\r\n\t\t\t\tfixedWidth: 45,\r\n\t\t\t}),\r\n\t\t\tgrid.makeTextColumn('Professional', 'professionalName', {\r\n\t\t\t\tminWidth: 100,\r\n\t\t\t\tcolId: 'professionalName',\r\n\t\t\t\thide: !this.practiceMode,\r\n\t\t\t}),\r\n\t\t\tgrid.makeTextColumn('Client/desc', 'clientName', { minWidth: 100 }),\r\n\t\t\tgrid.makeTextColumn('Activity type', 'activityType', { fixedWidth: 100 }),\r\n\t\t\tgrid.makeTextColumn('Resource office', 'bookingResourceName', { minWidth: 100 }),\r\n\t\t\tgrid.makeTextColumn('Customer', 'customerName', { minWidth: 100 }),\r\n\t\t\tgrid.makeTextColumn('Service type', 'serviceTypeDescription', { minWidth: 100 }),\r\n\t\t\tgrid.makeTextColumn('Service', 'serviceDescription', { minWidth: 100 }),\r\n\t\t\tgrid.makeTextColumn('Prof. inv #', 'professionalInvoiceNumber', { fixedWidth: 70 }),\r\n\t\t\tgrid.makeTextColumn('Prof. inv ref #', 'professionalInvoiceReferenceNumber', {\r\n\t\t\t\tminWidth: 100,\r\n\t\t\t\tcolId: 'invRef',\r\n\t\t\t}),\r\n\t\t\tgrid.makeNumberColumn('Units', 'units', '1.2', { fixedWidth: 45 }),\r\n\t\t\tgrid.makeNumberColumn('Cost rate', 'costRate', '1.2', { fixedWidth: 70 }),\r\n\t\t\tgrid.makeNumberColumn('Cost', 'costAmount', '1.2', {\r\n\t\t\t\tfixedWidth: 70,\r\n\t\t\t\tpinnedRowCellRenderer: renderTotalCost,\r\n\t\t\t}),\r\n\t\t];\r\n\r\n\t\tif (!this.systemPreferences.useProfessionalInvoiceReferenceNo) {\r\n\t\t\t// Remove the invRef column.\r\n\t\t\tthis.columnDefs = this.columnDefs.filter((c) => c.colId !== 'invRef');\r\n\t\t}\r\n\t}\r\n}\r\n"],"sourceRoot":"webpack:///"}