@resolveio/client-lib-core 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"resolveio-client-lib-core.mjs","sources":["../../../projects/core/src/lib/core.service.ts","../../../projects/core/src/lib/util/window-resize.service.ts","../../../projects/core/src/lib/widgets/alert/alert.service.ts","../../../projects/core/src/lib/socket.service.ts","../../../projects/core/src/lib/util/common.helper.ts","../../../projects/core/src/lib/offline-db.ts","../../../projects/core/src/lib/offline-manager.service.ts","../../../projects/core/src/lib/socket-manager.service.ts","../../../projects/core/src/lib/token-manager.service.ts","../../../projects/core/src/lib/account-manager.service.ts","../../../projects/core/src/lib/util/validation.service.ts","../../../projects/core/src/lib/util/aws.service.ts","../../../projects/core/src/lib/resolveio-class.ts","../../../projects/core/src/lib/widgets/dialog/dialog.notify.content.ts","../../../projects/core/src/lib/widgets/form-button/form-button.component.ts","../../../projects/core/src/lib/directive/focus.ts","../../../projects/core/src/lib/widgets/dialog/dialog.input.content.ts","../../../projects/core/src/lib/widgets/dialog/dialog.error.content.ts","../../../projects/core/src/lib/widgets/dialog/dialog.confirm.content.ts","../../../projects/core/src/lib/widgets/dialog/dialog.select-datetime.content.ts","../../../projects/core/src/lib/widgets/dialog/dialog.select-data-labels.content.ts","../../../projects/core/src/lib/widgets/responsive-button-group/responsive-button-group.component.ts","../../../projects/core/src/lib/widgets/responsive-button-group/responsive-button-group.component.html","../../../projects/core/src/lib/widgets/dialog/dialog.login.content.ts","../../../projects/core/src/lib/widgets/dialog/dialog.register.content.ts","../../../projects/core/src/lib/widgets/dialog/dialog.select-with-buttons-url.content.ts","../../../projects/core/src/lib/widgets/collapse-table/collapse-table.component.ts","../../../projects/core/src/lib/widgets/collapse-table/collapse-table.component.html","../../../projects/core/src/lib/widgets/dialog/dialog.select-array-objs.content.ts","../../../projects/core/src/lib/widgets/dialog/dialog.service.ts","../../../projects/core/src/lib/auth/auth.service.ts","../../../projects/core/src/lib/auth/auth-permissions.service.ts","../../../projects/core/src/lib/directive/scroll.ts","../../../projects/core/src/lib/widgets/navbar-main/navbar-main.component.ts","../../../projects/core/src/lib/widgets/navbar-main/navbar-main.component.html","../../../projects/core/src/lib/pipes/filter.pipe.ts","../../../projects/core/src/lib/widgets/navbar-module/navbar-module.component.ts","../../../projects/core/src/lib/widgets/navbar-module/navbar-module.component.html","../../../projects/core/src/lib/core.component.ts","../../../projects/core/src/lib/core.component.html","../../../projects/core/src/lib/pipes/json-parse.pipe.ts","../../../projects/core/src/lib/logger/logger.component.ts","../../../projects/core/src/lib/logger/logger.component.html","../../../projects/core/src/lib/auth/auth-guard.service.ts","../../../projects/core/src/lib/auth/can-deactivate-guard.service.ts","../../../projects/core/src/lib/util/window.service.ts","../../../projects/core/src/lib/widgets/user-role/user-role.component.ts","../../../projects/core/src/lib/widgets/user-role/user-role.module.ts","../../../projects/core/src/lib/widgets/form-button/form-button.module.ts","../../../projects/core/src/lib/widgets/responsive-button-group/responsive-button-group.module.ts","../../../projects/core/src/lib/widgets/collapse-table/collapse-table.module.ts","../../../projects/core/src/lib/pipes/phone.pipe.ts","../../../projects/core/src/lib/pipes/reverse-list.pipe.ts","../../../projects/core/src/lib/pipes/minus-currency.pipe.ts","../../../projects/core/src/lib/pipes/domsanitizor.pipe.ts","../../../projects/core/src/lib/pipes/titlecase.pipe.ts","../../../projects/core/src/lib/pipes/pipe.module.ts","../../../projects/core/src/lib/widgets/sort-table/sort-table.directive.ts","../../../projects/core/src/lib/widgets/sort-table/sort-table-header.component.ts","../../../projects/core/src/lib/widgets/sort-table/sort-table-header.component.html","../../../projects/core/src/lib/widgets/sort-table/sort-table-ngfor.component.ts","../../../projects/core/src/lib/widgets/sort-table/sort-table.module.ts","../../../projects/core/src/lib/shared/shared.module.ts","../../../projects/core/src/lib/auth/forgot-password.component.ts","../../../projects/core/src/lib/auth/forgot-password.component.html","../../../projects/core/src/lib/auth/enroll.component.ts","../../../projects/core/src/lib/auth/enroll.component.html","../../../projects/core/src/lib/auth/auth365.component.ts","../../../projects/core/src/lib/user-settings/user-settings.service.ts","../../../projects/core/src/lib/user-settings/user-settings.permission.ts","../../../projects/core/src/lib/user-settings/user-settings.component.ts","../../../projects/core/src/lib/user-settings/settings/users-settings.component.ts","../../../projects/core/src/lib/user-settings/settings/users-settings.component.html","../../../projects/core/src/lib/user-settings/user-settings.routing.ts","../../../projects/core/src/lib/widgets/data-table/data-table.component.ts","../../../projects/core/src/lib/widgets/data-table/data-table.component.html","../../../projects/core/src/lib/widgets/data-table/data-table.module.ts","../../../projects/core/src/lib/widgets/file/file-upload.component.ts","../../../projects/core/src/lib/widgets/file/file-upload.component.html","../../../projects/core/src/lib/widgets/file/file-upload.module.ts","../../../projects/core/src/lib/user-settings/user-settings.module.ts","../../../projects/core/src/lib/home/home.component.ts","../../../projects/core/src/lib/home/home.component.html","../../../projects/core/src/lib/core.module.ts","../../../projects/core/src/lib/support-ticket/support-ticket.service.ts","../../../projects/core/src/lib/support-ticket/support-ticket.component.ts","../../../projects/core/src/lib/support-ticket/list/support-ticket-list.component.ts","../../../projects/core/src/lib/support-ticket/list/support-ticket-list.component.html","../../../projects/core/src/lib/support-ticket/new/support-ticket-new.component.ts","../../../projects/core/src/lib/support-ticket/new/support-ticket-new.component.html","../../../projects/core/src/lib/support-ticket/detail/support-ticket-detail.component.ts","../../../projects/core/src/lib/support-ticket/detail/support-ticket-detail.component.html","../../../projects/core/src/lib/support-ticket/edit/support-ticket-edit.component.ts","../../../projects/core/src/lib/support-ticket/edit/support-ticket-edit.component.html","../../../projects/core/src/lib/support-ticket/support-ticket.routing.ts","../../../projects/core/src/lib/support-ticket/support-ticket.module.ts","../../../projects/core/src/lib/util/action-name.helper.ts","../../../projects/core/src/lib/widgets/date-shortcut/date-shortcut.component.ts","../../../projects/core/src/lib/widgets/date-shortcut/date-shortcut.module.ts","../../../projects/core/src/lib/widgets/scheduler/scheduler.component.ts","../../../projects/core/src/lib/widgets/scheduler/scheduler.component.html","../../../projects/core/src/lib/widgets/scheduler/scheduler.module.ts","../../../projects/core/src/lib/report-builder.permission.ts","../../../projects/core/src/lib/super-admin.permission.ts","../../../projects/core/src/public_api.ts","../../../projects/core/src/resolveio-client-lib-core.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { NavbarModel } from './widgets/navbar-module/navbar-module.model';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CoreService {\n \tisDevice = new BehaviorSubject(false);\n\tfullScreen = new BehaviorSubject(false);\n\tfsActivated = new BehaviorSubject(false);\n\thasConnected = new BehaviorSubject(false);\n\tnavbarModuleData = new BehaviorSubject({\n\t\ttitle: '',\n\t\tmodule: '',\n\t\tdescription: '',\n\t\tdescription_name: '',\n\t\ttabs: []\n\t});\n\thasStatusMessage = new BehaviorSubject(false);\n\talertData = new BehaviorSubject({\n\t\ttype: '',\n\t\tmessage: '',\n\t\ttimer: 0,\n\t\tshowing: false\n\t});\n\tisInvalidSW = new BehaviorSubject(false);\n\tenvironment = new BehaviorSubject(null);\n\tclient = new BehaviorSubject('');\n\tstandardProgram = new BehaviorSubject(false);\n\tnavTabs = new BehaviorSubject([]);\n\ttourStops = new BehaviorSubject([]);\n\ttourStarted = new BehaviorSubject(false);\n\tisDemo = new BehaviorSubject(false);\n\tisLoggingOut = new BehaviorSubject(false);\n\t// customHomePage = new BehaviorSubject(false);\n\t// logo = new BehaviorSubject('');\n\n\tconstructor() {}\n\n\tsetFullScreen(fullScreen: boolean) {\n\t\tthis.fullScreen.next(fullScreen);\n\t}\n\n\tsetFsActivated(activated: boolean) {\n\t\tthis.fsActivated.next(activated);\n\t}\n\n\tsetHasConnected(connected: boolean) {\n\t\tthis.hasConnected.next(connected);\n\t}\n\n\tsetNavbarModuleData(data: NavbarModel) {\n\t\tdata.tabs = data.tabs.filter(a => a.params === null).sort((a, b) => a.label.localeCompare(b.label)).concat(data.tabs.filter(a => a.params !== null).sort((a, b) => a.label.localeCompare(b.label)));\n\t\tthis.navbarModuleData.next(data);\n\t}\n\n\tsetHasStatusMessage(data: boolean) {\n\t\tthis.hasStatusMessage.next(data);\n\t}\n\n\tsetIsDevice(data: boolean) {\n\t\tthis.isDevice.next(data);\n\t}\n\n\tsetIsInvalidSW(data: boolean) {\n\t\tthis.isInvalidSW.next(data);\n\t}\n\n\tsetEnvironment(env) {\n\t\tthis.environment.next(env);\n\t}\n\n\tsetClient(client) {\n\t\tthis.client.next(client);\n\t}\n\n\tsetStandardProgram(standardProgram) {\n\t\tthis.standardProgram.next(standardProgram);\n\t}\n\n\tsetNavTabs(navTabs) {\n\t\tthis.navTabs.next(navTabs);\n\t}\n\n\tsetTourStops(tourStops) {\n\t\tthis.tourStops.next(tourStops);\n\t}\n\n\tsetTourStarted(tourStarted) {\n\t\tthis.tourStarted.next(tourStarted);\n\t}\n\t\n\tsetDemo(isDemo: boolean) {\n\t\tthis.isDemo.next(isDemo);\n\t}\n\n\t// setCustomHomePage(data: boolean) {\n\t// \tthis.customHomePage.next(data);\n\t// }\n\n\t// setLogo(logo) {\n\t// \tthis.logo.next(logo);\n\t// }\n}\n","import { EventManager } from '@angular/platform-browser';\nimport { Observable, Subject } from 'rxjs';\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class ResizeService {\n\n\tget onResize$(): Observable<Window> {\n\t\treturn this.resizeSubject.asObservable();\n\t}\n\n\tprivate resizeSubject: Subject<Window>;\n\n\tconstructor(private eventManager: EventManager) {\n\t\tthis.resizeSubject = new Subject();\n\t\tthis.eventManager.addGlobalEventListener('window', 'resize', this.onResize.bind(this));\n\t}\n\n\tprivate onResize(event: UIEvent) {\n\t\tthis.resizeSubject.next(<Window>event.target);\n\t}\n}\n","import { Injectable } from '@angular/core';\nimport { alertType } from './alert.model';\nimport { ToastrService } from 'ngx-toastr';\n\n@Injectable()\nexport class AlertService {\n\n\tconstructor(private _toastr: ToastrService) {}\n\n\tclearAlert(id?) {\n\t\tif (id) {\n\t\t\tthis._toastr.clear(id);\n\t\t}\n\n\t\tthis._toastr.clear();\n\t}\n\t\n\tsetAlert(type: alertType, message: string, timer = 5000) {\n\t\tif (type === 'success') {\n\t\t\tif (timer) {\n\t\t\t\treturn this._toastr.success(message, 'Success', {\n\t\t\t\t\ttimeOut: timer\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn this._toastr.success(message, 'Success', {\n\t\t\t\t\tdisableTimeOut: true\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\telse if (type === 'info') {\n\t\t\tif (timer) {\n\t\t\t\treturn this._toastr.info(message, 'Info', {\n\t\t\t\t\ttimeOut: timer\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn this._toastr.info(message, 'Info', {\n\t\t\t\t\tdisableTimeOut: true\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\telse if (type === 'warning') {\n\t\t\tif (timer) {\n\t\t\t\treturn this._toastr.warning(message, 'Warning', {\n\t\t\t\t\ttimeOut: timer\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn this._toastr.warning(message, 'Warning', {\n\t\t\t\t\tdisableTimeOut: true\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\telse if (type === 'error') {\n\t\t\tif (timer) {\n\t\t\t\treturn this._toastr.error(message, 'Error', {\n\t\t\t\t\ttimeOut: timer\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn this._toastr.error(message, 'Error', {\n\t\t\t\t\tdisableTimeOut: true\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\telse if (type === 'update') {\n\t\t\treturn this._toastr.warning(message, 'Update', {\n\t\t\t\tdisableTimeOut: true\n\t\t\t});\n\t\t}\n\t}\n}\n","import {Injectable} from '@angular/core';\nimport { LocalStorageService } from 'ngx-localstorage';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable()\nexport class SocketService {\n\t//These can be altered by calling code\n\tpublic debug = false;\n\n\t//Time to wait before attempting reconnect (after close)\n\tpublic reconnectInterval = 1000;\n\t\n\t//Time to wait for WebSocket to open (before aborting and retrying)\n\tpublic timeoutInterval = 5000;\n\tprivate timeout = null;\n\n\t//Should only be used to read WebSocket readyState\n\tpublic readyState: number;\n\tpublic readyState$ = new BehaviorSubject(0);\n\n\t//List of WebSocket sub-protocols\n\tprivate protocols: string[] = [];\n\n\t//The underlying WebSocket\n\tpublic ws: WebSocket;\n\tprivate url: string;\n\n\t//Set up the default 'noop' event handlers\n\tpublic onopen: (ev: Event) => void = function (event: Event) {};\n\tpublic onclose: (ev: CloseEvent) => void = function (event: CloseEvent) {};\n\tpublic onconnecting: () => void = function () {};\n\tpublic onmessage: (ev: MessageEvent) => void = function (event: MessageEvent) {};\n\tpublic onerror: (ev: ErrorEvent) => void = function (event: ErrorEvent) {};\n\n\tconstructor(private _storage: LocalStorageService) {}\n\n\tpublic openSocket(environment, protocols) {\n\t\tthis.url = environment.WS_URL;\n\t\tthis.protocols = protocols;\n\t\tthis.connect();\n\t}\n\n\tprivate connect() {\n\t\tif (!this.ws && this._storage.get('accessToken')) {\n\t\t\tif (this.timeout) {\n\t\t\t\tclearTimeout(this.timeout);\n\t\t\t}\n\n\t\t\tthis.ws = new WebSocket(this.url, this.protocols);\n\t\t\t\n\t\t\tthis.readyState = WebSocket.CONNECTING;\n\t\t\tthis.readyState$.next(this.readyState);\n\t\t\tthis.onconnecting();\n\t\t\tthis.log(new Date(), 'WS', 'attempt-connect', this.url);\n\n\t\t\tthis.timeout = setTimeout(() => {\n\t\t\t\tthis.log(new Date(), 'WS', 'connection-timeout', this.url);\n\t\t\t\tthis.close();\n\t\t\t}, this.timeoutInterval);\n\n\t\t\tthis.ws.onopen = (event: Event) => {\n\t\t\t\tclearTimeout(this.timeout);\n\t\t\t\tthis.timeout = null;\n\t\t\t\tthis.log(new Date(), 'WS', 'onopen', this.url);\n\t\t\t\tthis.readyState = WebSocket.OPEN;\n\t\t\t\tthis.readyState$.next(this.readyState);\n\t\t\t\tthis.onopen(event);\n\t\t\t};\n\n\t\t\tthis.ws.onclose = (event: CloseEvent) => {\n\t\t\t\tif (this.timeout) {\n\t\t\t\t\tclearTimeout(this.timeout);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.timeout = null;\n\n\t\t\t\tthis.ws = null;\n\n\t\t\t\tthis.readyState = WebSocket.CLOSED;\n\t\t\t\tthis.readyState$.next(this.readyState);\n\t\t\t\t\n\t\t\t\tthis.log(new Date(), 'WS', 'onclose', this.url);\n\t\t\t\tthis.onclose(event);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.connect();\n\t\t\t\t}, this.reconnectInterval);\n\t\t\t};\n\n\t\t\tthis.ws.onmessage = (event: MessageEvent) => {\n\t\t\t\tthis.onmessage(event);\n\t\t\t};\n\n\t\t\tthis.ws.onerror = (event: ErrorEvent) => {\n\t\t\t\tthis.log(new Date(), 'WS', 'onerror', this, event);\n\t\t\t\tthis.onerror(event);\n\t\t\t\tthis.reconnect();\n\t\t\t};\n\t\t}\n\t}\n\n\tpublic send(...data: any[]) {\n\t\tif (this.ws && this.ws.readyState === this.ws.OPEN) {\n\t\t\tthis.ws.send(JSON.stringify(data));\n\t\t\treturn true;\n\t\t} \n\t\telse {\n\t\t\tthis.log(new Date(), 'WS', 'send error', this.ws.readyState);\n\t\t\tthis.reconnect();\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Returns boolean, whether websocket was FORCEFULLY closed.\n\t */\n\tpublic close(): boolean {\n\t\tif (this.ws) {\n\t\t\tthis.log(new Date(), 'WS', 'closing socket');\n\t\t\tthis.readyState = WebSocket.CLOSING;\n\t\t\tthis.readyState$.next(this.readyState);\n\t\t\tthis.ws.close();\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic reconnect() {\n\t\tthis.log(new Date(), 'WS', 'reconnect', this.readyState);\n\t\tif (this.readyState === WebSocket.OPEN) {\n\t\t\tthis.close();\n\t\t}\n\t\telse if (this.readyState === WebSocket.CLOSING || this.readyState === WebSocket.CLOSED) {\n\t\t\tthis.connect();\n\t\t}\n\t}\n\n\tpublic getBufferAmount() {\n\t\tif (this.ws) {\n\t\t\treturn this.ws.bufferedAmount;\n\t\t}\n\t\telse {\n\t\t\treturn 20480;\n\t\t}\n\t}\n\n\tprivate log(...args: any[]) {\n\t\tif (this.debug) {\n\t\t\tconsole.log(...args);\n\t\t}\n\t}\n}\n","import { detailedDiff } from 'deep-object-diff';\nimport moment from 'moment';\n\nconst isObject = (object) => {\n\treturn object instanceof Object && object.constructor.name === 'Object';\n};\n\nexport function toTitleCase(str) {\n\treturn str.replace(/\\w\\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); });\n}\n\nexport function isUpperCase(str) {\n\treturn (/^[A-Z]*$/).test(str);\n}\n\nexport function pad(num, size) {\n\tlet s = num + '';\n\twhile (s.length < size) {\n\t\ts = '0' + s;\n\t}\n\treturn s;\n}\n\nexport function deepCopy(obj) {\n\treturn JSON.parse(JSON.stringify(obj), dateReviver);\n}\n\nexport function dateReviver(key, value) {\n\tif (typeof value === 'string') {\n\t\tlet a = /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n\t\tif (a) {\n\t\t\treturn new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], +a[5], +a[6].split('.')[0], +a[6].split('.')[1]));\n\t\t}\n\t}\n\treturn value;\n}\n\nexport function b64toBlobURL(b64Data, contentType, sliceSize?) {\n\tb64Data = b64Data.replace('data:application/pdf;base64,', '');\n\tcontentType = contentType || '';\n\tsliceSize = sliceSize || 512;\n\n\tlet byteCharacters = atob(b64Data);\n\tlet byteArrays = [];\n\n\tfor (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {\n\t\tlet slice = byteCharacters.slice(offset, offset + sliceSize);\n\n\t\tlet byteNumbers = new Array(slice.length);\n\t\tfor (let i = 0; i < slice.length; i++) {\n\t\tbyteNumbers[i] = slice.charCodeAt(i);\n\t\t}\n\n\t\tlet byteArray = new Uint8Array(byteNumbers);\n\n\t\tbyteArrays.push(byteArray);\n\t}\n\n\tlet blob = new Blob(byteArrays, {type: contentType});\n\treturn URL.createObjectURL(blob);\n}\n\nexport function blobToFile(theBlob, fileName) : File {\n //A Blob() is almost a File() - it's just missing the two properties below which we will add\n theBlob.lastModifiedDate = new Date();\n theBlob.name = fileName;\n return (<File>theBlob);\n}\n\nexport function toDataURL(url, callback) {\n\tlet xhr = new XMLHttpRequest();\n\txhr.onload = function() {\n\t\tlet reader = new FileReader();\n\t\treader.onloadend = function() {\n\t\t\tcallback(reader.result);\n\t\t};\n\t\treader.readAsDataURL(xhr.response);\n\t};\n\txhr.open('GET', url);\n\txhr.responseType = 'blob';\n\txhr.send();\n}\n\nexport function getDeepDiffDetails(obj1: Object, obj2: Object) {\n\tlet diff = detailedDiff(obj1, obj2);\n\tlet newDiff = detailedDiff(obj2, obj1);\n\t\n\tlet diffString = '';\n\t\t\n\tif ((Object.keys(diff['updated']).length)) {\n\t\t// if (Object.keys(diff['added']).length){\n\t\t// \tdiffString += '; ';\n\t\t// }\n\t\t\n\t\t// if (Object.keys(diff['deleted']).length) {\n\t\t// \tdiffString += '; ';\n\t\t// }\n\t\t\t\t\t\n\t\tfor (let i = 0; i < Object.keys(diff['updated']).length; i++) {\n\t\t\tif (!Array.isArray(obj1[Object.keys(diff['updated'])[i]])) {\n\t\t\t\tlet key = Object.keys(diff['updated'])[i];\n\t\t\t\tlet newKey = Object.keys(newDiff['updated'])[i];\n\n\t\t\t\tif ((key.substr(0, 2) !== 'id')){\n\t\t\t\t\tif (diff['updated'][key] && moment.isDate(diff['updated'][key])) {\n\t\t\t\t\t\tdiffString += 'Updated: \\n' + toTitleCase(key.replace(/_/g, ' ')) + ': \"' + moment(diff['updated'][key]).format('llll') + '\" to \"' + moment(newDiff['updated'][newKey]).format('llll') + '\"\\n';\n\t\t\t\t\t}\n\t\t\t\t\telse if (diff['updated'][key] && typeof(diff['updated'][key]) === 'object') {\n\t\t\t\t\t\tlet objString = '';\n\n\t\t\t\t\t\tfor (let j = 0; j < Object.keys(diff['updated'][key]).length; j++) {\n\t\t\t\t\t\t\tlet objKey = Object.keys(diff['updated'][key])[j];\n\t\t\t\t\t\t\tlet newObjKey = Object.keys(newDiff['updated'][key])[j];\n\n\t\t\t\t\t\t\tif (j > 0) {\n\t\t\t\t\t\t\t\tobjString += 'll, \\n';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tobjString += toTitleCase(objKey.replace(/_/g, ' ')) + ': \"' + diff['updated'][key][objKey] + '\" to \"' + newDiff['updated'][key][newObjKey] + '\"' + (j < Object.keys(diff['updated'][key]).length - 1 ? ', ' : '');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdiffString += 'Updated: \\n' + objString + '\\n';\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tdiffString += 'Updated: \\n' + toTitleCase(key.replace(/_/g, ' ')) + ': \"' + diff['updated'][key] + '\" to \"' + newDiff['updated'][newKey] + '\"' + (i < Object.keys(diff['updated']).length - 1 ? '\\n' : '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn diffString;\n}\n\nexport function generateCronStringFromDate(date: Date) {\n\treturn date.getSeconds() + ' ' + date.getMinutes() + ' ' + date.getHours() + ' ' + date.getDate() + ' ' + (date.getMonth() + 1) + ' ' + date.getDay();\n}\n\nexport function s2ab(s) {\n\tlet buf = new ArrayBuffer(s.length);\n\tlet view = new Uint8Array(buf);\n\t// tslint:disable-next-line:no-bitwise\n\tfor (let i = 0; i !== s.length; ++i) { view[i] = s.charCodeAt(i) & 0xFF; }\n\treturn buf; \n}\n\nexport function mergeDeep(target, ...sources) {\n\tif (!sources.length) {\n\t\treturn target;\n\t}\n\tconst source = sources.shift();\n\n\tif (isObject(target) && isObject(source)) {\n\t\tfor (const key in source) {\n\t\t\tif (isObject(source[key])) {\n\t\t\t\tif (!target[key]) {\n\t\t\t\t\tObject.assign(target, { [key]: {} });\n\t\t\t\t}\n\t\t\t\tmergeDeep(target[key], source[key]);\n\t\t\t} \n\t\t\telse {\n\t\t\t\tObject.assign(target, { [key]: source[key] });\n\t\t\t}\n\t\t}\n\t}\n\n\treturn mergeDeep(target, ...sources);\n}","import { dateReviver } from './util/common.helper';\n\nexport class StorageDB {\n\n\tstorage = null;\n\tdatabase = null;\n\tprimaryKey = null;\n\tsep = '';\n\n\tconstructor (opts) {\n\t\topts = opts || {};\n\n\t\tthis.storage = opts.storage || window && window.localStorage;\n\t\tthis.database = opts.database || 'db';\n\t\tthis.primaryKey = opts.primaryKey || '_id';\n\t\tthis.sep = opts.sep || ':';\n\n\t\tif (!isSupported(this.storage)) {\n\t\t\tthis.storage = null;\n\t\t}\n\t}\n\n\tget(name, opts) {\n\t\treturn new Collection(this, name, opts);\n\t}\n\n\tgetCollections() {\n\t\tlet collections = [];\n\n\t\tObject.keys(this.storage).filter(a => a.split(':').length > 2).forEach(key => {\n\t\t\tif (!collections.some(b => b === key.split(':')[1])) {\n\t\t\t\tcollections.push(key.split(':')[1]);\n\t\t\t}\n\t\t});\n\n\t\treturn collections;\n\t}\n\n\tcollection(name, opts) {\n\t\treturn this.get(name, opts);\n\t}\n}\n\nclass Collection {\n\n\tname = '';\n\tstorage = null;\n\tpath = '';\n\tprimaryKey = '';\n\tcache = {};\n\tcacheable = false;\n\n\tconstructor (db, name, opts) {\n\t\topts = opts || {};\n\n\t\tthis.name = name;\n\t\tthis.storage = db.storage || new MockStorage();\n\t\tthis.path = db.database + db.sep + name + db.sep;\n\t\tthis.primaryKey = opts.primaryKey || db.primaryKey;\n\t\tthis.cache = {};\n\t\tthis.cacheable = !db.storage;\n\t}\n\n\n\t_initCache () {\n\t\tlet cache = {};\n\t\tlet filterExp = new RegExp('^' + this.path);\n\n\t\tfor (let key of Object.keys(this.storage)) {\n\t\t\tif (filterExp.test(key)) {\n\t\t\t\tcache[key] = JSON.parse(this.storage.getItem(key), dateReviver);\n\t\t\t}\n\t\t}\n\n\t\tthis.cache = cache;\n\t\tthis.cacheable = true;\n\t}\n\n\n\t_filter (filter, opts) {\n\t\topts.type = opts.type || 'data'; // data, id;\n\t\topts.multi = opts.multi || false;\n\n\t\tif (!this.cacheable) {\n\t\t\tthis._initCache();\n\t\t}\n\n\t\tlet res = [];\n\t\tlet isFnFilter;\n\t\tlet isTypeId = opts.type === 'id';\n\n\t\tif (typeof filter === 'string') {\n\t\t\tfilter = new RegExp(filter);\n\t\t} else if (typeof filter === 'function') {\n\t\t\tisFnFilter = true;\n\t\t} else if (!filter) {\n\t\t\tlet ret = isTypeId ? Object.keys(this.cache) : Object.values(this.cache);\n\n\t\t\tif (opts.multi) {\n\t\t\t\treturn ret;\n\t\t\t} else {\n\t\t\t\treturn ret[0] || null;\n\t\t\t}\n\t\t}\n\n\t\tfor (let key of Object.keys(this.cache)) {\n\t\t\tlet val = this.cache[key];\n\n\t\t\tif (isFnFilter) {\n\t\t\t\tif (filter(key, val['data'])) {\n\t\t\t\t\tlet ret = isTypeId ? key : val;\n\n\t\t\t\t\tif (opts.multi) {\n\t\t\t\t\t\tres.push(ret);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn ret;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (filter.test(key)) {\n\t\t\t\t\tlet ret = isTypeId ? key : val;\n\n\t\t\t\t\tif (opts.multi) {\n\t\t\t\t\t\tres.push(ret);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn ret;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn opts.multi ? res : null;\n\t}\n\n\n\tinsert(data, expiresDate?, opts?) {\n\t\tlet arrayInsert = data instanceof Array;\n\n\t\tif (arrayInsert) {\n\t\t\tif (data.length === 0) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t} else {\n\t\t\tdata = [data];\n\t\t}\n\n\t\tlet pk = this.primaryKey;\n\t\tlet cacheable = this.cacheable;\n\n\t\tfor (let row of data) {\n\t\t\tif (!isObject(row)) {\n\t\t\t\tthrow new Error('TypeError: insert data must be an object or an object array');\n\t\t\t}\n\n\t\t\tif (typeof row[pk] === 'undefined') {\n\t\t\t\trow[pk] = new ID().toString();\n\t\t\t}\n\n\t\t\tlet now = new Date();\n\n\t\t\tif (cacheable) {\n\t\t\t\tthis.cache[this.path + row[pk]] = {\n\t\t\t\t\tofflineDate: now,\n\t\t\t\t\tofflineDateExpires: expiresDate ? expiresDate : new Date(now.getTime() + 604800000),\n\t\t\t\t\tdata: row\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tthis.storage.setItem(this.path + row[pk], JSON.stringify({\n\t\t\t\tofflineDate: now,\n\t\t\t\tofflineDateExpires: expiresDate ? expiresDate : new Date(now.getTime() + 604800000),\n\t\t\t\tdata: row\n\t\t\t}));\n\t\t}\n\n\t\treturn arrayInsert ? data.map(a => a._id) : data[0]._id;\n\t}\n\n\n\tfind(query, opts?, total?) {\n\t\tquery = query || {};\n\t\topts = opts || {};\n\t\topts.skip = opts.skip || 0;\n\t\topts.limit = opts.limit;\n\t\topts.sort = opts.sort;\n\n\t\tif (opts.sort instanceof Array) {\n\t\t\topts.sort = opts.sort.reduce((res, item) => {\n\t\t\t\tif (typeof item === 'string') {\n\t\t\t\t\tres[item] = 1;\n\t\t\t\t} else if (item instanceof Array && item.length) {\n\t\t\t\t\tres[item[0]] = item[1] || 1;\n\t\t\t\t}\n\t\t\t\treturn res;\n\t\t\t}, {});\n\t\t}\n\n\t\tlet data;\n\t\tlet ids = isObject(query) ? null : (query instanceof Array ? query : [query]);\n\t\tlet filterOpts = {\n\t\t\ttype: opts._filterType || 'data',\n\t\t\tmulti: true\n\t\t};\n\n\t\tif (ids) {\n\t\t\t// by id array\n\t\t\tlet filterRegExp = new RegExp('^' + this.path + '(' + ids.join('|') + ')$');\n\t\t\tdata = this._filter(filterRegExp, filterOpts);\n\n\t\t} else if (Object.keys(query).length) {\n\t\t\t// by query\n\t\t\tdata = this._filter((key, val) => {\n\t\t\t\treturn queryMatch(query, val);\n\t\t\t}, filterOpts);\n\t\t} else {\n\t\t\tdata = this._filter(null, filterOpts);\n\t\t}\n\n\t\tif (!total) {\n\t\t\tdata = data.map(a => a.data);\n\t\t}\n\n\t\t// sort\n\t\tif (opts.sort) {\n\t\t\tdata.sort((a, b) => {\n\t\t\t\treturn sortCompare(opts.sort, a, b);\n\t\t\t});\n\t\t}\n\n\t\tif (opts.limit) {\n\t\t\tdata = data.slice(opts.skip, opts.skip + opts.limit);\n\t\t} else if (opts.skip) {\n\t\t\tdata = data.slice(opts.skip);\n\t\t}\n\n\t\treturn data;\n\t}\n\n\n\tfindOne(query, opts?) {\n\t\tquery = query || {};\n\t\topts = opts || {};\n\n\t\tlet data;\n\t\tlet id = isObject(query) ? null : query;\n\t\tlet queryFields = isObject(query) ? Object.keys(query) : [];\n\t\tlet quickTarget = false;\n\t\tlet needsSort = !!opts.sort;\n\t\tlet filterOpts = {\n\t\t\ttype: opts._filterType || 'data',\n\t\t\tmulti: false\n\t\t};\n\n\t\tif (queryFields.length && queryFields.includes(this.primaryKey)) {\n\t\t\tid = query[this.primaryKey];\n\t\t\tquickTarget = true;\n\t\t}\n\n\t\tif (id) {\n\t\t\t// by id\n\t\t\tdata = this.storage.getItem(this.path + id);\n\t\t\tdata = data ? JSON.parse(data, dateReviver).data : null;\n\n\t\t\tif (data && quickTarget && !queryMatch(query, data)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} else if (queryFields.length) {\n\t\t\t// by query\n\t\t\tif (needsSort) {\n\t\t\t\tdata = this.find(query, opts);\n\t\t\t} else {\n\t\t\t\tdata = this._filter((key, val) => {\n\t\t\t\t\treturn queryMatch(query, val);\n\t\t\t\t}, filterOpts);\n\n\t\t\t\tif (Array.isArray(data)) {\n\t\t\t\t\tdata = data.map(a => a.data);\n\t\t\t\t}\n\t\t\t\telse if (data) {\n\t\t\t\t\tdata = data.data;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (needsSort) {\n\t\t\t\tdata = this.find(query, opts);\n\t\t\t} else {\n\t\t\t\tdata = this._filter(null, filterOpts);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!id && needsSort && data) {\n\t\t\tdata = data[0].data || null;\n\t\t}\n\n\t\tif (data && filterOpts.type === 'id') {\n\t\t\tdata = this.path + data[this.primaryKey];\n\t\t}\n\n\t\treturn data;\n\t}\n\n\n\tremove(query, opts?) {\n\t\tif (!query) {\n\t\t\tthrow new Error('remove needs a query');\n\t\t}\n\n\t\topts = opts || {};\n\t\topts.multi = (typeof opts.multi === 'undefined') ? true : opts.multi;\n\n\t\tlet findMethod = opts.multi ? 'find' : 'findOne';\n\t\tlet ids = null;\n\t\tif (findMethod === 'find') {\n\t\t\tids = this[findMethod](query, {\n\t\t\t\t_filterType: 'id'\n\t\t\t}, true);\n\t\t}\n\t\telse {\n\t\t\tids = this[findMethod](query, {\n\t\t\t\t_filterType: 'id'\n\t\t\t});\n\t\t}\n\t\tlet cacheable = this.cacheable;\n\n\t\tif ((opts.multi && !ids.length) || (!opts.multi && !ids)) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (!opts.multi) {\n\t\t\tids = [ids];\n\t\t}\n\n\t\tfor (let id of ids) {\n\t\t\tif (cacheable) {\n\t\t\t\tdelete this.cache[id];\n\t\t\t}\n\n\t\t\tthis.storage.removeItem(id);\n\t\t}\n\n\t\treturn ids.length;\n\t}\n\n\n\tupdate(query, values, opts?) {\n\t\tif (!query) {\n\t\t\tthrow new Error('update needs a query');\n\t\t}\n\t\tif (!values || !isObject(values)) {\n\t\t\tthrow new Error('update needs an object');\n\t\t}\n\n\t\topts = opts || {};\n\t\topts.multi = (typeof opts.multi === 'undefined') ? false : opts.multi;\n\n\t\tlet findMethod = opts.multi ? 'find' : 'findOne';\n\t\tlet ids = this[findMethod](query, {\n\t\t\t_filterType: 'id'\n\t\t});\n\t\tlet pk = this.primaryKey;\n\t\tlet cacheable = this.cacheable;\n\n\t\tif ((opts.multi && !ids.length) || (!opts.multi && !ids)) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (!opts.multi) {\n\t\t\tlet id = ids;\n\t\t\tlet row = cacheable ? this.cache[id] : JSON.parse(this.storage.getItem(id), dateReviver);\n\t\t\tlet isIdUpdated = values[pk] && values[pk] !== row.data[pk];\n\t\t\tlet newId = isIdUpdated ? this.path + values[pk] : id;\n\n\t\t\t// check exist\n\t\t\tif (isIdUpdated && this.findOne(values[pk])) {\n\t\t\t\tthrow new Error('Duplicate value \\'' + values[pk] + '\\' for unique field \\'' + pk + '\\'');\n\t\t\t}\n\n\t\t\tlet data = Object.assign({}, row.data, values);\n\n\t\t\tif (cacheable) {\n\t\t\t\tthis.cache[newId] = {\n\t\t\t\t\tofflineDate: row.offlineDate,\n\t\t\t\t\tofflineDateExpires: row.offlineDateExpires,\n\t\t\t\t\tdata: data\n\t\t\t\t};\n\t\t\t\tif (isIdUpdated) {\n\t\t\t\t\tdelete this.cache[id];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.storage.setItem(newId, JSON.stringify({\n\t\t\t\tofflineDate: row.offlineDate,\n\t\t\t\tofflineDateExpires: row.offlineDateExpires,\n\t\t\t\tdata: data\n\t\t\t}));\n\n\t\t\tif (isIdUpdated) {\n\t\t\t\tthis.storage.removeItem(id);\n\t\t\t}\n\n\t\t\treturn data;\n\n\t\t} else {\n\t\t\tdelete values[pk];\n\n\t\t\tif (!Object.keys(values).length) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tfor (let id of ids) {\n\t\t\t\tlet row = cacheable ? this.cache[id] : JSON.parse(this.storage.getItem(id), dateReviver);\n\n\t\t\t\tlet data = Object.assign({}, row.data, values);\n\n\t\t\t\tif (cacheable) {\n\t\t\t\t\tthis.cache[id] = {\n\t\t\t\t\t\tofflineDate: row.offlineDate,\n\t\t\t\t\t\tofflineDateExpires: row.offlineDateExpires,\n\t\t\t\t\t\tdata: data\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tthis.storage.setItem(id, JSON.stringify({\n\t\t\t\t\tofflineDate: row.offlineDate,\n\t\t\t\t\tofflineDateExpires: row.offlineDateExpires,\n\t\t\t\t\tdata: data\n\t\t\t\t}));\n\t\t\t}\n\n\t\t\treturn ids.length;\n\t\t}\n\t}\n\n\tdrop() {\n\t\tthis.remove({});\n\t\treturn true;\n\t}\n}\n\nclass ID {\n\tconstructor() {\n\t}\n\n\ttoString() {\n\t\treturn (new Date().getTime() / 1000).toString(16).substr(-4) + Math.random().toString(16).substr(2, 12);\n\t}\n}\n\nclass MockStorage {\n\tlength = 0;\n\n\tconstructor () {\n\t\tthis.length = 0;\n\t}\n\n\tkey() {}\n\tsetItem() {}\n\tgetItem() {}\n\tremoveItem() {}\n}\n\nconst isSupported = (storage) => {\n\tif (!storage || !(storage instanceof Object)) {\n\t\treturn false;\n\t}\n\n\ttry {\n\t\tstorage.setItem('_supported', '1');\n\t\tstorage.removeItem('_supported');\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nconst isObject = (object) => {\n\treturn object instanceof Object && object.constructor.name === 'Object';\n};\n\nconst queryMatch = (query, target) => {\n\tif (!query || !Object.keys(query).length) {\n\t\treturn true;\n\t}\n\n\tfor (let field of Object.keys(query)) {\n\t\tlet val = query[field];\n\t\tlet tar = target[field];\n\n\t\tif (!tar) {\n\t\t\tfield.split('.').forEach(path => {\n\t\t\t\tif (!tar) {\n\t\t\t\t\ttar = target[path];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttar = tar[path];\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (val instanceof RegExp) {\n\t\t\tif (!val.test(tar)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (isObject(val)) {\n\t\t\tfor (let op of Object.keys(val)) {\n\t\t\t\tif (Operator._checkExist(op) && !Operator[op](val[op], tar)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (val !== tar) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n};\n\nconst sortCompare = (sort, a, b, i?, fields?) => {\n\ti = i || 0;\n\tfields = fields || Object.keys(sort);\n\n\tlet field = fields[i];\n\n\tif (!field) {\n\t\treturn 0;\n\t}\n\n\tif (a[field] === b[field]) {\n\t\ti++;\n\t\treturn sortCompare(sort, a, b, i, fields);\n\t}\n\n\tif (sort[field] === 1) {\n\t\treturn a[field] - b[field];\n\t}\n\n\tif (sort[field] === -1) {\n\t\treturn b[field] - a[field];\n\t}\n};\n\n/*\n\tQuery Selectors\n\n\t$eq\t\tMatches vals that are equal to a specified val.\n\t$gt\t\tMatches vals that are greater than a specified val.\n\t$gte\tMatches vals that are greater than or equal to a specified val.\n\t$in\t\tMatches any of the vals specified in an array.\n\t$lt\t\tMatches vals that are less than a specified val.\n\t$lte\tMatches vals that are less than or equal to a specified val.\n\t$ne\t\tMatches all vals that are not equal to a specified val.\n\t$nin\tMatches none of the vals specified in an array.\n*/\n\nconst ops = ['$eq', '$gt', '$gte', '$in', '$lt', '$lte', '$ne', '$nin'];\n\nconst isNotNumber = (val) => {\n\treturn typeof val !== 'number';\n};\n\nclass Operator {\n\tstatic $eq(val, tar) {\n\t\treturn tar === val;\n\t}\n\n\tstatic $gt(val, tar) {\n\t\tif (isNotNumber(val)) {\n\t\t\tthrow new Error('\\'$gt\\' value must be a number');\n\t\t}\n\t\treturn tar > val;\n\t}\n\n\tstatic $gte(val, tar) {\n\t\tif (isNotNumber(val)) {\n\t\t\tthrow new Error('\\'$gte\\' value must be a number');\n\t\t}\n\t\treturn tar >= val;\n\t}\n\n\tstatic $in(val, tar) {\n\t\tif (!(val instanceof Array)) {\n\t\t\tthrow new Error('\\'$in\\' value must be an array');\n\t\t}\n\t\treturn val.includes(tar);\n\t}\n\n\tstatic $lt(val, tar) {\n\t\tif (isNotNumber(val)) {\n\t\t\tthrow new Error('\\'$lt\\' value must be a number');\n\t\t}\n\t\treturn tar < val;\n\t}\n\n\tstatic $lte(val, tar) {\n\t\tif (isNotNumber(val)) {\n\t\t\tthrow new Error('\\'$lte\\' value must be a number');\n\t\t}\n\t\treturn tar <= val;\n\t}\n\n\tstatic $ne(val, tar) {\n\t\treturn tar !== val;\n\t}\n\n\tstatic $nin(val, tar) {\n\t\tif (!(val instanceof Array)) {\n\t\t\tthrow new Error('\\'$nin\\' value must be an array');\n\t\t}\n\t\treturn !val.includes(tar);\n\t}\n\n\tstatic _checkExist(op) {\n\t\tif (ops.includes(op)) {\n\t\t\treturn true;\n\t\t}\n\t\tthrow new Error('unknown operator: \\'' + op + '\\'');\n\t}\n}","import { Injectable } from '@angular/core';\nimport { LocalStorageService } from 'ngx-localstorage';\nimport { UserModel } from './models/user.model';\nimport { BehaviorSubject } from 'rxjs';\nimport { StorageDB } from './offline-db';\n\n@Injectable()\nexport class OfflineManagerService {\n\n\tpublic offlineMode = new BehaviorSubject<boolean>(true);\n\n\tprivate _offlineDB;\n\n\tconstructor(private _storage: LocalStorageService) {\n\t\tthis._offlineDB = new StorageDB({\n\t\t\tstorage: window.localStorage,\n\t\t\tdatabase: 'offlineDB',\n\t\t\tprimaryKey: '_id'\n\t\t});\n\n\t\tlet now = new Date();\n\n\t\tlet collections = this._offlineDB.getCollections();\n\t\tcollections.forEach(collection => {\n\t\t\tlet entries = this.find(collection, {}, {}, true);\n\t\t\tentries.forEach(entry => {\n\t\t\t\tif (!entry.hasOwnProperty('offlineDate') || !entry.hasOwnProperty('offlineDateExpires')) {\n\t\t\t\t\tthis.removeDocument(collection, entry._id);\n\t\t\t\t}\n\t\t\t\telse if (now.getTime() >= entry.offlineDateExpires.getTime()) {\n\t\t\t\t\tthis.removeDocument(collection, entry.data._id);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\tpublic setOffline(value: boolean) {\n\t\tthis.offlineMode.next(value);\n\t}\n\n\tpublic saveUser(user: UserModel) {\n\t\treturn this._storage.set('user', JSON.stringify(user));\n\t}\n\n\tpublic getUser() {\n\t\treturn this._storage.get('user');\n\t}\n\n\tpublic removeUser() {\n\t\tthis._storage.remove('user');\n\t}\n\n\tpublic find(collectionName: string, query: Object, options = {}, total = false) {\n\t\tconst collection = this._offlineDB.get(collectionName);\n\n\t\tif (collection) {\n\t\t\treturn collection.find(query, options, total);\n\t\t}\n\n\t\treturn [];\n\t}\n\n\tpublic findOne(collectionName: string, query: Object) {\n\t\tconst collection = this._offlineDB.get(collectionName);\n\n\t\tif (collection) {\n\t\t\treturn collection.findOne(query);\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tpublic insertDocument(collectionName: string, data: Object, expiresDate?: Date) {\n\t\tconst collection = this._offlineDB.get(collectionName);\n\n\t\tlet id = '';\n\n\t\tif (collection && data && (!Array.isArray(data) || data.length)) {\n\t\t\tid = collection.insert(data, expiresDate);\n\t\t}\n\n\t\treturn id;\n\t}\n\n\tpublic updateDocument(collectionName: string, data: Object) {\n\t\tconst collection = this._offlineDB.get(collectionName);\n\n\t\tif (collection) {\n\t\t\tlet doc = collection.findOne({_id: data['_id']});\n\n\t\t\tif (doc) {\n\t\t\t\tdata['__v'] += 1;\n\t\t\t\tcollection.update(data['_id'], data);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\tpublic updateDocumentProps(collectionName: string, doc_id: string, updateParams: any[], doc__v: number) {\n\t\tconst collection = this._offlineDB.get(collectionName);\n\n\t\tif (collection) {\n\t\t\tlet doc = collection.findOne({_id: doc_id});\n\n\t\t\tif (doc) {\n\t\t\t\tupdateParams.forEach(data => {\n\t\t\t\t\tdoc[data.prop] = data.data;\n\t\t\t\t});\n\n\t\t\t\tdoc.__v += 1;\n\n\t\t\t\tcollection.update({_id: doc_id}, doc);\n\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}\n\t\n\tpublic removeDocument(collectionName: string, id: string) {\n\t\tconst collection = this._offlineDB.get(collectionName);\n\n\t\tif (collection) {\n\t\t\tcollection.remove(id);\n\t\t}\n\t}\n\n\tpublic dropCollection(collectionName) {\n\t\tconst collection = this._offlineDB.get(collectionName);\n\n\t\tcollection.drop();\n\t}\n\n\t// public saveDataWithKey(key: string, value: string) {\n\t// \tconsole.log('Saving', JSON.stringify(value));\n\t// \tthis._storage.set(key, JSON.stringify(value));\n\t// }\n\n\t// public getDataWithKey(key: string) {\n\t// \treturn JSON.parse(this._storage.get(key), dateReviver);\n\t// }\n}\n","import { SocketService } from './socket.service';\nimport { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { finalize } from 'rxjs/operators';\nimport { ActiveClientSubscriptionModel } from './models/subscription.model';\nimport { dateReviver, deepCopy } from './util/common.helper';\nimport { OfflineManagerService } from './offline-manager.service';\nimport { AlertService } from './widgets/alert/alert.service';\nimport { Router } from '@angular/router';\n\n@Injectable()\nexport class SocketManagerService {\n\tprivate socketStatus;\n\n\tprivate messageId = 0;\n\tprivate _cbArray = [];\n\tprivate _subArray: ActiveClientSubscriptionModel[] = [];\n\tprivate _sendQueue = [];\n\tprivate _offlineUpdates = [];\n\n\tprivate _runningQueue = false;\n\tprivate initConnection = false;\n\n\tprivate _connectionDelayTimeout = null;\n\n\tpublic onerror: () => void = function () {};\n\n\tconstructor(private _socket: SocketService, private _offline: OfflineManagerService, private _alert: AlertService, private _router: Router) {}\n\n\tpublic initSocketManager(): void {\n\t\tthis._socket.readyState$.subscribe(socketStatus => {\n\t\t\tthis.socketStatus = socketStatus;\n\t\t});\n\n\t\tthis._socket.onmessage = (event: MessageEvent) => {\n\t\t\tlet resData = JSON.parse(event.data, dateReviver);\n\n\t\t\tif (resData.data === 'reloadWSCommand') {\n\t\t\t\twindow.location.href = window.location.href + '?forceReload=true';\n\t\t\t}\n\t\t\telse if (resData.data === 'reconnectWSCommand') {\n\t\t\t\tthis._socket.reconnect();\n\t\t\t}\n\t\t\telse if (resData.data === 'disconnectWSCommand') {\n\t\t\t\tthis.closeSocket();\n\t\t\t}\n\n\t\t\tlet offlineIndex = this._offlineUpdates.findIndex(a => a.messageId === resData.messageId);\n\t\t\tif (offlineIndex >= 0) {\n\t\t\t\tthis._offline.removeDocument(this._offlineUpdates[offlineIndex].type, this._offlineUpdates[offlineIndex].id_offline_doc);\n\t\t\t\tthis._offlineUpdates.splice(offlineIndex, 1);\n\t\t\t}\n\n\t\t\tif (resData.data !== 'ACK' && resData.data !== 'NACK') {\n\t\t\t\tif (this._cbArray.map(a => a.messageId).includes(resData.messageId)) {\t\n\t\t\t\t\tlet index = this._cbArray.findIndex(a => a.messageId === resData.messageId);\n\t\t\t\t\t\n\t\t\t\t\tif (index >= 0) {\n\t\t\t\t\t\tclearInterval(this._cbArray[index].timerId);\n\n\t\t\t\t\t\tif (this._cbArray[index].cb) {\n\t\t\t\t\t\t\tthis._cbArray[index].cb(resData.hasError ? resData.data : null, resData.hasError ? null : resData.data);\n\t\t\t\t\t\t\tthis._cbArray[index].resolveFn(resData.hasError ? resData.data : null);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (resData.hasError) {\n\t\t\t\t\t\t\t\tthis._cbArray[index].rejectFn(resData.data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tthis._cbArray[index].resolveFn(resData.data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis._cbArray.splice(index, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (this._subArray.map(a => a.messageId).includes(resData.messageId)) {\t\n\t\t\t\t\tlet index = this._subArray.findIndex(a => a.messageId === resData.messageId);\n\t\t\t\t\t\n\t\t\t\t\tif (index >= 0) {\n\t\t\t\t\t\tthis._subArray[index].subject.next(resData.data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis._socket.onopen = (event: Event) => {\n\t\t\tthis._connectionDelayTimeout = setTimeout(() => {\n\t\t\t\tthis._connectionDelayTimeout = null;\n\n\t\t\t\tthis._offline.setOffline(false);\n\t\t\t\t\n\t\t\t\tlet collectionUpdates = this._offline.find('collectionUpdate', {});\n\n\t\t\t\tcollectionUpdates.forEach(update => {\n\t\t\t\t\tlet messageId = this.messageId++;\n\n\t\t\t\t\tthis._offlineUpdates.push({\n\t\t\t\t\t\tid_offline_doc: update._id,\n\t\t\t\t\t\tmessageId: messageId,\n\t\t\t\t\t\ttype: 'collectionUpdate'\n\t\t\t\t\t});\n\n\t\t\t\t\tupdate.data[2] = messageId;\n\n\t\t\t\t\tif (update.type === 'updateDocument' && update.oldData) {\n\t\t\t\t\t\tupdate.data[4] = 'updateDocumentOffline';\n\t\t\t\t\t\tupdate.data[0] = 'Offline - ' + update.data[0];\n\t\t\t\t\t}\n\t\t\t\t\telse if (update.type === 'updateDocumentProps' && update.oldData) {\n\t\t\t\t\t\tupdate.data[4] = 'updateDocumentPropsOffline';\n\t\t\t\t\t\tupdate.data[0] = 'Offline - ' + update.data[0];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tupdate.data[0] = 'Offline - ' + update.data[0];\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (collectionUpdates.length) {\n\t\t\t\t\tthis.send('Offline Updates', new Date(), this.messageId++, 'offline', collectionUpdates.sort((a, b) => a.date.getTime() - b.date.getTime()));\n\t\t\t\t}\n\n\t\t\t\tif (this.initConnection) {\n\t\t\t\t\tthis._subArray.forEach(sub => {\n\t\t\t\t\t\tthis.send(sub.messageRoute, new Date(), sub.messageId, 'subscription', 'sub', sub.subscription, ...sub.parameters);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tthis.initConnection = true;\n\t\t\t}, 1000);\n\t\t};\n\n\t\tthis._socket.onerror = (ev: ErrorEvent) => {\n\t\t\tif (this._connectionDelayTimeout) {\n\t\t\t\tclearTimeout(this._connectionDelayTimeout);\n\t\t\t}\n\t\t\tconsole.log(new Date(), 'SOCKET ERROR', ev);\n\t\t\tthis.onerror();\n\t\t};\n\n\t\tthis._socket.onclose = (ev: CloseEvent) => {\n\t\t\tif (this._connectionDelayTimeout) {\n\t\t\t\tclearTimeout(this._connectionDelayTimeout);\n\t\t\t}\n\t\t}\n\n\t\tsetInterval(() => {\n\t\t\tif (this.initConnection) {\n\t\t\t\tif (!this._runningQueue) {\n\t\t\t\t\tif (this._sendQueue.length) {\n\t\t\t\t\t\tthis._runningQueue = true;\n\t\t\t\t\t\tfor (let i = this._sendQueue.length - 1; i >= 0; i--) {\n\t\t\t\t\t\t\tif (this._socket && this._socket.ws) {\n\t\t\t\t\t\t\t\tif (this.socketStatus === WebSocket.OPEN) {\n\t\t\t\t\t\t\t\t\tlet nextSendItem = this._sendQueue.pop();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tthis._socket.send(...nextSendItem);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._runningQueue = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}, 25);\n\t}\n\n\tpublic openSocket(environment, protocols) {\n\t\tthis._socket.openSocket(environment, protocols);\n\t}\n\n\tpublic closeSocket() {\n\t\tthis._socket.close();\n\t}\n\n\tpublic call(method: string, ...parameters: any[]) {\n\t\tlet resolveFn = null;\n\t\tlet rejectFn = null;\n\n\t\tlet promise = new Promise((resolve, reject) => {\n\t\t\tresolveFn = resolve;\n\t\t\trejectFn = reject;\n\t\t});\n\n\t\tlet messageId = this.messageId++;\n\n\t\tlet timerId = setInterval(() => {\n\t\t\tif (this._cbArray.filter(a => a.messageId === messageId)[0]) {\n\t\t\t\tthis.send((this._router.url.includes('?') ? this._router.url.substring(0, this._router.url.indexOf('?')) : this._router.url), new Date(), messageId, 'methodResponse', method, ...parameters);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tclearInterval(timerId);\n\t\t\t}\n\t\t}, 5000);\n\n\t\tif (parameters[parameters.length - 1] && typeof(parameters[parameters.length - 1]) === 'function') {\n\t\t\tthis._cbArray.push({\n\t\t\t\tmessageId: messageId,\n\t\t\t\tcb: parameters.pop(),\n\t\t\t\tresolveFn: resolveFn,\n\t\t\t\trejectFn: rejectFn,\n\t\t\t\ttimerId: timerId,\n\t\t\t\tretryCnt: 0\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tthis._cbArray.push({\n\t\t\t\tmessageId: messageId,\n\t\t\t\tcb: null,\n\t\t\t\tresolveFn: resolveFn,\n\t\t\t\trejectFn: rejectFn,\n\t\t\t\ttimerId: timerId,\n\t\t\t\tretryCnt: 0\n\t\t\t});\n\t\t}\n\n\t\tlet cnt = parameters.length;\n\t\twhile ((parameters[parameters.length - 1] === undefined || parameters[parameters.length - 1] === null) && cnt > 0) {\n\t\t\tparameters.pop();\n\t\t\tcnt = parameters.length;\n\t\t}\n\n\t\tthis.send((this._router.url.includes('?') ? this._router.url.substring(0, this._router.url.indexOf('?')) : this._router.url), new Date(), messageId, 'method', method, ...parameters);\n\n\t\treturn promise;\n\t}\n\n\tpublic subscribe(subscription: string, ...parameters) {\n\t\tconst copyParameters = deepCopy(parameters);\n\t\tconst newSubject = new Subject<any>();\n\n\t\tlet messageId = this.messageId++;\n\n\t\tthis._subArray.push({\n\t\t\tmessageId: messageId,\n\t\t\tmessageRoute: (this._router.url.includes('?') ? this._router.url.substring(0, this._router.url.indexOf('?')) : this._router.url),\n\t\t\tsubscription: subscription,\n\t\t\tparameters: copyParameters,\n\t\t\tsubject: newSubject\n\t\t});\n\n\t\tconst observable = newSubject.pipe(finalize(() => {\n\t\t\tthis.unsubscribe(messageId, subscription, ...copyParameters);\n\t\t\tthis._subArray.splice(this._subArray.map(a => a.messageId).indexOf(messageId), 1);\n\t\t}));\n\n\t\tthis.send((this._router.url.includes('?') ? this._router.url.substring(0, this._router.url.indexOf('?')) : this._router.url), new Date(), messageId, 'subscription', 'sub', subscription, ...copyParameters);\n\n\t\treturn observable;\n\t}\n\n\tpublic subscribeBypassRoute(subscription: string, ...parameters) {\n\t\tconst copyParameters = deepCopy(parameters);\n\t\tconst newSubject = new Subject<any>();\n\n\t\tlet messageId = this.messageId++;\n\n\t\tthis._subArray.push({\n\t\t\tmessageId: messageId,\n\t\t\tmessageRoute: 'Bypass',\n\t\t\tsubscription: subscription,\n\t\t\tparameters: copyParameters,\n\t\t\tsubject: newSubject\n\t\t});\n\n\t\tconst observable = newSubject.pipe(finalize(() => {\n\t\t\tthis.unsubscribe(messageId, subscription, ...copyParameters);\n\t\t\tthis._subArray.splice(this._subArray.map(a => a.messageId).indexOf(messageId), 1);\n\t\t}));\n\n\t\tthis.send('Bypass', new Date(), messageId, 'subscription', 'sub', subscription, ...copyParameters);\n\n\t\treturn observable;\n\t}\n\n\tpublic unsubscribe(messageId, subscription: string, ...parameters) {\n\t\tthis.send((this._router.url.includes('?') ? this._router.url.substring(0, this._router.url.indexOf('?')) : this._router.url), new Date(), messageId, 'subscription', 'unsub', subscription, ...parameters);\n\t}\n\t\n\tprivate send(...data: any[]) {\n\t\tif (data[3] === 'subscription') {\n\t\t\tif (this.socketStatus === WebSocket.OPEN) {\n\t\t\t\tthis._socket.send(...data);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!this._sendQueue.filter(a => JSON.stringify(a) === JSON.stringify(data)).length) {\n\t\t\t\t\tthis._sendQueue.splice(0, 0, data);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (data[3] === 'method') {\n\t\t\tif (this.socketStatus === WebSocket.OPEN) {\n\t\t\t\tif (!this._sendQueue.filter(a => JSON.stringify(a) === JSON.stringify(data)).length) {\n\t\t\t\t\tthis._sendQueue.splice(0, 0, data);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (data[4] === 'insertDocument') {\n\t\t\t\t\tthis._alert.setAlert('warning', 'This insert command has not taken place on the server yet because you are offline. It will automatically sync up next time you are online as long as you do not clear your cache!');\n\n\t\t\t\t\tthis._offline.insertDocument('collectionUpdate', {\n\t\t\t\t\t\ttype: 'insert',\n\t\t\t\t\t\tdata: data,\n\t\t\t\t\t\toldData: null,\n\t\t\t\t\t\tdate: new Date()\n\t\t\t\t\t});\n\n\t\t\t\t\tlet res = this._offline.insertDocument(data[5], data[6]);\n\n\t\t\t\t\tlet cb = this._cbArray.filter(a => a.messageId === data[2])[0];\n\t\t\t\t\tif (cb && cb.cb) {\n\t\t\t\t\t\tcb.cb(null, res);\n\n\t\t\t\t\t\tthis._cbArray.splice(this._cbArray.findIndex(a => a.messageId === data[2]), 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (data[4] === 'updateDocument') {\n\t\t\t\t\tthis._alert.setAlert('warning', 'This update command has not taken place on the server yet because you are offline. It will automatically sync up next time you are online as long as you do not clear your cache!');\n\t\t\t\t\tthis._offline.insertDocument('collectionUpdate', {\n\t\t\t\t\t\ttype: 'updateDocument',\n\t\t\t\t\t\tdata: data,\n\t\t\t\t\t\toldData: this._offline.findOne(data[5], data[6]._id),\n\t\t\t\t\t\tdate: new Date()\n\t\t\t\t\t});\n\n\t\t\t\t\tif (this._offline.findOne(data[5], {_id: data[6]._id})) {\n\t\t\t\t\t\tthis._offline.updateDocument(data[5], data[6]);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tconsole.log('Could not find Offline data', data[5], data[6]);\n\t\t\t\t\t}\n\n\t\t\t\t\tlet cb = this._cbArray.filter(a => a.messageId === data[2])[0];\n\t\t\t\t\tif (cb && cb.cb) {\n\t\t\t\t\t\tcb.cb(null, 1);\n\t\t\t\t\t\tthis._cbArray.splice(this._cbArray.findIndex(a => a.messageId === data[2]), 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (data[4] === 'updateDocumentProps') {\n\t\t\t\t\tthis._alert.setAlert('warning', 'This update command has not taken place on the server yet because you are offline. It will automatically sync up next time you are online as long as you do not clear your cache!');\n\t\t\t\t\tthis._offline.insertDocument('collectionUpdate', {\n\t\t\t\t\t\ttype: 'updateDocumentProps',\n\t\t\t\t\t\tdata: data,\n\t\t\t\t\t\toldData: this._offline.findOne(data[5], data[6]),\n\t\t\t\t\t\tdate: new Date()\n\t\t\t\t\t});\n\n\t\t\t\t\tif (this._offline.findOne(data[5], {_id: data[6]})) {\n\t\t\t\t\t\tthis._offline.updateDocumentProps(data[5], data[6], data[7], data[8]);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tconsole.log('Could not find Offline data', data[5], data[6]);\n\t\t\t\t\t}\n\n\t\t\t\t\tlet cb = this._cbArray.filter(a => a.messageId === data[2])[0];\n\t\t\t\t\tif (cb && cb.cb) {\n\t\t\t\t\t\tcb.cb(null, 1);\n\t\t\t\t\t\tthis._cbArray.splice(this._cbArray.findIndex(a => a.messageId === data[2]), 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (data[4] === 'removeDocument') {\n\t\t\t\t\tthis._alert.setAlert('warning', 'This remove command has not taken place on the server yet because you are offline. It will automatically sync up next time you are online as long as you do not clear your cache!');\n\t\t\t\t\tthis._offline.insertDocument('collectionUpdate', {\n\t\t\t\t\t\ttype: 'removeDocument',\n\t\t\t\t\t\tdata: data,\n\t\t\t\t\t\toldData: null,\n\t\t\t\t\t\tdate: new Date()\n\t\t\t\t\t});\n\n\t\t\t\t\tif (this._offline.findOne(data[5], {_id: data[6]})) {\n\t\t\t\t\t\tthis._offline.removeDocument(data[5], data[6]);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tconsole.log('Could not find Offline data', data[5], data[6]);\n\t\t\t\t\t}\n\n\t\t\t\t\tlet cb = this._cbArray.filter(a => a.messageId === data[2])[0];\n\t\t\t\t\tif (cb && cb.cb) {\n\t\t\t\t\t\tcb.cb(null, 1);\n\t\t\t\t\t\tthis._cbArray.splice(this._cbArray.findIndex(a => a.messageId === data[2]), 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (data[3] === 'offline') {\n\t\t\tif (this.socketStatus === WebSocket.OPEN) {\n\t\t\t\tthis._socket.send(...data);\n\t\t\t}\n\t\t}\n\t}\n\n\tgetStatus() {\n\t\treturn this._socket.readyState$;\n\t}\n}\n","import { Injectable } from '@angular/core';\nimport { LocalStorageService } from 'ngx-localstorage';\n\n@Injectable()\nexport class TokenManagerService {\n\n\tconstructor(private _storage: LocalStorageService) {}\n\n\tpublic getToken(tokenKey: string) {\n\t\treturn this._storage.get(tokenKey);\n\t}\n\t\n\tpublic setToken(tokenKey: string, tokenValue: string) {\n\t\tthis._storage.set(tokenKey, tokenValue);\n\t}\n\n\tpublic removeToken(tokenKey: string) {\n\t\tthis._storage.remove(tokenKey);\n\t}\n}\n","import { BehaviorSubject, Subscription } from 'rxjs';\nimport { UserModel } from './models/user.model';\nimport { Injectable } from '@angular/core';\nimport { SocketManagerService } from './socket-manager.service';\nimport { TokenManagerService } from './token-manager.service';\nimport { AlertService } from './widgets/alert/alert.service';\nimport { OfflineManagerService } from './offline-manager.service';\nimport { dateReviver } from './util/common.helper';\nimport { Router } from '@angular/router';\nimport { HttpClient } from '@angular/common/http';\n\n@Injectable()\nexport class AccountManagerService {\n\n\tuser = new BehaviorSubject<UserModel>(null);\n\tinitCompleted = new BehaviorSubject<boolean>(false);\n\tloginCompleted = new BehaviorSubject<boolean>(false);\n\tuser$: Subscription;\n\n\tenvironment = null;\n\n\tconstructor(private _router: Router, private _socket: SocketManagerService, private _token: TokenManagerService, private _http: HttpClient, private _alert: AlertService, private _offline: OfflineManagerService) {\n\t\t\n\t}\n\n\tpublic initLoginManager(environment): void {\n\t\tthis.environment = environment;\n\t\t\n\t\tthis._socket.initSocketManager();\n\n\t\tlet token = this._token.getToken('refreshToken');\n\n\t\tif (token) {\n\t\t\tthis.initLogin(token);\n\n\t\t\tsetInterval(() => {\n\t\t\t\tthis.initLogin(token);\n\t\t\t}, 3000);\n\t\t}\n\t\telse {\n\t\t\tthis.initCompleted.next(true);\n\t\t}\n\t}\n\n\tprivate initLogin(token: string) {\n\t\tif (navigator.onLine) {\n\t\t\tif (this._offline.offlineMode.getValue()) {\n\t\t\t\tthis._offline.setOffline(false);\n\t\t\t\tthis.getAccessToken(token);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (!this._offline.offlineMode.getValue() || !this.initCompleted.getValue()) {\n\n\t\t\t\tthis.closeSocket();\n\t\t\t\tthis._offline.setOffline(true);\n\n\t\t\t\tlet user = JSON.parse(this._offline.getUser(), dateReviver);\n\n\t\t\t\tif (user) {\n\t\t\t\t\tthis.user.next(user);\n\t\t\t\t}\n\n\t\t\t\tif (!this.initCompleted.getValue()) {\n\t\t\t\t\tthis.initCompleted.next(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic getAccessToken(refreshToken) {\n\t\tif (refreshToken) {\n\t\t\tthis._http.post(this.environment.SERVER_URL + '/accessToken', {refreshToken: refreshToken}).toPromise().then((res: any) => {\n\t\t\t\tif (res.error) {\n\t\t\t\t\tthis.initCompleted.next(true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._token.setToken('accessToken', res.result.token);\n\t\t\t\t\tthis.user.next(res.result.user);\n\n\t\t\t\t\tthis.openSocket(res.result.token);\n\n\t\t\t\t\tif (this.user$) {\n\t\t\t\t\t\tthis.user$.unsubscribe();\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.user$ = this._socket.subscribeBypassRoute('userWithId', res.result.user._id).subscribe(resUser => {\n\t\t\t\t\t\tif (resUser) {\n\t\t\t\t\t\t\tthis.user.next(resUser);\n\t\t\t\t\t\t\tthis.loginCompleted.next(true);\n\t\t\t\t\t\t\tthis.initCompleted.next(true);\n\t\t\t\t\t\t\tthis._offline.saveUser(resUser);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}, err => {\n\t\t\t\tthis.initCompleted.next(true);\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic logIn(username: string, password: string) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._http.post(this.environment.SERVER_URL + '/login', {username: username, password: password}).toPromise().then((res: any) => {\t\n\t\t\t\tif (res.error) {\n\t\t\t\t\tthis._alert.setAlert('error', res.result);\n\t\t\t\t\treject(res.result);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._token.setToken('refreshToken', res.result.token);\n\t\t\t\t\tthis.getAccessToken(res.result.token);\n\t\t\t\t\tresolve(res.result.token); //should be resolving user\n\t\t\t\t}\n\t\t\t}, err => {});\n\t\t});\n\t}\n\n\tpublic logIn365(azure_token: string) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._http.post(this.environment.SERVER_URL + '/login365', {id_token: azure_token}).toPromise().then((res: any) => {\t\n\t\t\t\tif (res.error) {\n\t\t\t\t\tthis._alert.setAlert('error', res.result);\n\t\t\t\t\treject(res.result);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._token.setToken('refreshToken', res.result.token);\n\t\t\t\t\tthis.getAccessToken(res.result.token);\n\t\t\t\t\tresolve(res.result.token); //should be resolving user\n\t\t\t\t}\n\t\t\t}, err => {});\n\t\t});\n\t}\n\n\tpublic resetUserPassword(username: string) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._http.post(this.environment.SERVER_URL + '/resetPassword', {username: username}).toPromise().then((res: any) => {\t\n\t\t\t\tresolve(true);\n\t\t\t}, err => {});\n\t\t});\n\t}\n\n\tpublic logOut() {\n\t\tthis._router.navigateByUrl('/home');\n\n\t\tsetTimeout(() => {\n\t\t\tthis.user.next(null);\n\t\t\tthis._token.removeToken('refreshToken');\n\t\t\tthis._token.removeToken('accessToken');\n\t\t\tthis._offline.removeUser();\n\t\t\tthis.closeSocket();\n\t\t}, 500);\n\t}\n\n\tpublic openSocket(token) {\n\t\tthis._socket.openSocket(this.environment, [token]);\n\t}\n\n\tpublic closeSocket() {\n\t\tthis._socket.closeSocket();\n\t}\n\n\tpublic setUser(user: UserModel) {\n\t\tthis.user.next(user);\n\t}\n\n\tpublic getUser(): UserModel {\n\t\treturn this.user.getValue();\n\t}\n\n\tpublic getSocketStatus() {\n\t\treturn this._socket.getStatus();\n\t}\n\n\tpublic isUserInView(view: string) {\n\t\tlet res = false;\n\n\t\tif (this.isUserSuperAdmin()) {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet user = this.user.getValue();\n\n\t\tif (user) {\n\t\t\tuser.roles.groups.forEach(group => {\n\t\t\t\tif (group.views.filter(a => a.startsWith(view)).length) {\n\t\t\t\t\tres = true;\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\tif (user.roles.miscs.filter(a => a.startsWith(view)).length) {\n\t\t\t\tres = true;\n\t\t\t}\n\t\n\t\t\tif (user.roles.groups.filter(a => a.name === view).length) {\n\t\t\t\tres = true;\n\t\t\t}\n\t\t}\n\n\t\treturn res;\n\t}\n\n\tpublic isUserSuperAdmin() {\n\t\treturn this.user.getValue() && this.user.getValue().roles.super_admin; //Remove any later\n\t}\n\n\tpublic isInitCompleted() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tif (this.initCompleted.value) {\n\t\t\t\tresolve(true);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlet initSub$ = this.initCompleted.subscribe((data) => {\n\t\t\t\t\tif (data) {\n\t\t\t\t\t\tinitSub$.unsubscribe();\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t}\n\t\t\t\t}, () => {});\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic isLoginCompleted() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tif (this.loginCompleted.value) {\n\t\t\t\tresolve(true);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlet initSub$ = this.loginCompleted.subscribe((data) => {\n\t\t\t\t\tif (data) {\n\t\t\t\t\t\tinitSub$.unsubscribe();\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n","import { FormControl, FormGroup, AbstractControl } from '@angular/forms';\nimport {Injectable} from '@angular/core';\n\n@Injectable()\nexport class ValidationService {\n\n\tconstructor() { }\n\n\twholeNumbersAllowNegative(c: FormControl) {\n\t\tlet regEx = /^[\\-]?\\d+$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\twholeNumbersAllowNegative: { valid: false }\n\t\t};\n\t}\n\n\twholeNumbersWithZero(c: FormControl) {\n\t\tlet regEx = /^[0-9]*$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\twholeNumbersWithZero: { valid: false }\n\t\t};\n\t}\n\n\twholeNumbersGreaterThanZero(c: FormControl) {\n\t\tlet regEx = /^[1-9]+[0-9]*$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\twholeNumbersGreaterThanZero: { valid: false }\n\t\t};\n\t}\n\n\tdecimalWithZero(c: FormControl) {\n\t\tlet regEx = /^\\d*\\.?\\d*$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\tdecimalWithZero : { valid: false }\n\t\t};\n\t}\n\n\tdecimalGreaterThanZero(c: FormControl) {\n\t\tlet regEx = /^\\s*(?=.*[1-9])\\d*(?:\\.\\d{1,10})?\\s*$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\tdecimalGreaterThanZero : { valid: false }\n\t\t};\n\t}\n\n\tcurrency(c: FormControl) {\n\t\tlet regEx = /^[0-9]\\d*(\\.\\d+)?$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\tcurrency: { valid: false }\n\t\t};\n\t}\n\n\tcurrencyGreaterThanZero(c: FormControl) {\n\t\tlet regEx = /^[0-9]\\d*(\\.\\d+)?$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn regEx.test(c.value) && c.value > 0 ? null : {\n\t\t\tcurrency: { valid: false }\n\t\t};\n\t}\n\n\tcurrencyAllowNegative(c: FormControl) {\n\t\tlet regEx = /^[\\-]?[0-9]\\d*(\\.\\d+)?$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\tcurrency: { valid: false }\n\t\t};\n\t}\n\n\tphoneNumber(c: FormControl) {\n\t\t//let regEx = /^(?:(?:\\+?1\\s*(?:[.-]\\s*)?)?(?:\\(\\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\\s*\\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\\s*(?:[.-]\\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\\s*(?:[.-]\\s*)?([0-9]{4})(?:\\s*(?:#|x\\.?|ext\\.?|extension)\\s*(\\d+))?$/;\n\t\tlet regEx = /^1?([2-9])(\\d{9})/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\tphoneNumber: { valid: false }\n\t\t};\n\t}\n\n\temail(c: FormControl) {\n\t\tlet regEx = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\temail: { valid: false }\n\t\t};\n\t}\n\n\tmatchPassword(group: FormGroup): any {\n\t\tlet password = <FormControl>group.controls['password'];\n\t\tlet confirm_password = <FormControl>group.controls['confirm_password'];\n\n\t\tif (!password.value || !confirm_password.value) {\n\t\t\treturn null;\n\t\t} \n\n\t\treturn (password.value === confirm_password.value) ? null : {\n\t\t\tmatchPassword : { isValid: false }\n\t\t};\n\t}\n\n\tdensity(c: FormControl) {\n\t\tlet regEx = /^[\\-]?\\d*\\.?\\d*$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\tdensity: { valid: false }\n\t\t};\n\t}\n\n\tmaxValue(max: number) {\n\t\treturn (control: AbstractControl): {[key: string]: any} => {\n\t\t\tconst input = typeof(control.value) === 'string' ? parseFloat(control.value) : control.value;\n\t\t\tconst hasError = input > max;\n\n\t\t\tif (hasError) {\n\t\t\t\treturn { 'maxValue': {max} };\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t}; \n\t}\n\n\tminValue(min: number) {\n\t\treturn (control: AbstractControl): {[key: string]: any} => {\n\t\t\tconst input = typeof(control.value) === 'string' ? parseFloat(control.value) : control.value;\n\t\t\tconst hasError = input < min;\n\n\t\t\tif (hasError) {\n\t\t\t\treturn { 'minValue': {min} };\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t}; \n\t}\n\n\tmultipleOf(value: number) {\n\t\treturn (control: AbstractControl): {[key: string]: any} => {\n\t\t\tconst input = typeof(control.value) === 'string' ? parseFloat(control.value) : control.value;\n\t\t\tconst hasError = input % value !== 0;\n\n\t\t\tif (hasError) {\n\t\t\t\treturn { 'multipleOf': {value} };\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t}; \n\t}\n\n\tminLengthArray(min: number) {\n\t\treturn (c: AbstractControl): {[key: string]: any} => {\n\t\t\tif (c.value && c.value.length >= min) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t\treturn { 'minLengthArray': {valid: false }};\n\t\t};\n\t}\n\n\tvalidIPAddress(c: FormControl) {\n\t\tlet regEx = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\tvalidIPAddress : { valid: false }\n\t\t};\n\t}\n\n\talphaNumericWithDashes(c: FormControl) {\n\t\tlet regEx = /^[a-zA-Z0-9-_]+$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\talphaNumericWithDashes : { valid: false }\n\t\t};\n\t}\n}\n","import {Injectable} from '@angular/core';\nimport { SocketManagerService } from '../socket-manager.service';\n\n@Injectable()\nexport class AwsService {\n\n\tconstructor(private _socket: SocketManagerService) {}\n\n\tdataURItoFile(dataURI: string, filename: string): File {\n\t\t// convert base64 to raw binary data held in a string\n\t\t// doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this\n\t\tlet byteString = atob(dataURI.split(',')[1]);\n\n\t\t// separate out the mime component\n\t\tlet mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];\n\n\t\t// write the bytes of the string to an ArrayBuffer\n\t\tlet ab = new ArrayBuffer(byteString.length);\n\t\tlet ia = new Uint8Array(ab);\n\t\tfor (let i = 0; i < byteString.length; i++) {\n\t\t\tia[i] = byteString.charCodeAt(i);\n\t\t}\n\n\t\t// write the ArrayBuffer to a blob, and you're done\n\t\tlet blob = new Blob([ab], {type: mimeString});\n\t\t\n\t\tblob['lastModifiedDate'] = new Date();\n\t\tblob['name'] = filename;\n\n\t\treturn <File>blob;\n\t}\n\n\tuploadFile(file: File, type: string, order?: number, filename?: string) {\n\t\treturn new Promise ((resolve, reject) => {\n\t\t\tif (file.size) {\n\t\t\t\tthis.getBase64(file).then(data => {\n\t\t\t\t\tthis._socket.call('uploadFileAndSave', filename ? filename : file.name, data, file.size, order ? order : -1, type, true, (err, res) => {\n\t\t\t\t\t\tif (res) {\n\t\t\t\t\t\t\tresolve(res);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\treject('Invalid File');\n\t\t\t}\n\t\t});\n\t}\n\n\tgetFileWithKey(key: string, callback: Function) {\n\t\tthis._socket.call('getFile', key, callback);\n\t}\n\n\tgetFileWithId(id: string, callback: Function) {\n\t\tthis._socket.call('findOne', 'files', {_id: id}, (err, file) => {\n\t\t\tthis.getFileWithKey(file.key, callback);\n\t\t});\n\t}\n\n\tdeleteFile(key: string, callback: Function) {\n\t\tthis._socket.call('deleteFile', key, callback);\n\t}\n\n\tdeleteFileWithId(id: string, callback: Function) {\n\t\tthis._socket.call('findOne', 'files', {_id: id}, (err, file) => {\n\t\t\tthis.deleteFile(file.key, callback);\n\t\t});\n\t}\n\n\tdeleteFilesWithKeys(keys: string[], callback: Function) {\n\t\tthis._socket.call('deleteFiles', keys, callback);\n\t}\n\n\tgetBase64(file): Promise<string> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst reader = new FileReader();\n\t\t\treader.readAsDataURL(file);\n\t\t\treader.onload = () => resolve(<string>reader.result);\n\t\t\treader.onerror = error => reject(error);\n\t\t});\n\t}\n}\n","import { FormBuilder } from '@angular/forms';\nimport { AlertService } from './widgets/alert/alert.service';\nimport { AccountManagerService } from './account-manager.service';\nimport { Injectable } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { SocketManagerService } from './socket-manager.service';\nimport { CoreService } from './core.service';\nimport { ValidationService } from './util/validation.service';\nimport { AwsService } from './util/aws.service';\n\nexport class BaseComponent {\n\tconstructor(protected providerService: ProviderService) {}\n}\n\n@Injectable()\nexport class ProviderService {\n\tconstructor(\n\t\tpublic _app: CoreService,\n\t\tpublic _router: Router,\n\t\tpublic _socket: SocketManagerService,\n\t\tpublic _account: AccountManagerService,\n\t\tpublic _alert: AlertService,\n\t\tpublic _vs: ValidationService,\n\t\tpublic _aws: AwsService,\n\t\tpublic _fb: FormBuilder\n\t) {}\n}","import { Component, Input, HostListener } from '@angular/core';\nimport { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';\n\n@Component({\n\ttemplate: `\n\t\t<div class=\"modal-header\">\n\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-info-circle\" style=\"color: blue; font-size: 0.85em\" aria-hidden=\"true\"></i> {{ title }}</h4>\n\t \t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"activeModal.dismiss('Cross click')\">\n\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t \t\t</button>\n\t\t</div>\n\t\t<div class=\"modal-body\">\n\t \t \t<p>{{ body }}</p>\n\t\t</div>\n\t\t<div class=\"modal-footer\">\n\t \t\t<button type=\"button\" class=\"btn btn-secondary\" (click)=\"activeModal.close('Close click')\">Ok</button>\n\t\t</div>\n `\n})\n// tslint:disable-next-line:component-class-suffix\nexport class DialogNotifyContent {\n\t@Input() title: string;\n\t@Input() body: string;\n\n\t@HostListener('document:keypress', ['$event'])\n\t\thandleKeyboardEvent(event: KeyboardEvent) { \n\t\t\tif (event.keyCode === 13) {\n\t\t\t\tthis.activeModal.close();\n\t\t\t}\n\t\t}\n\n\tconstructor(public activeModal: NgbActiveModal) {}\n}","import { Component, Input, ViewChild } from '@angular/core';\nimport { FormGroup, FormArray } from '@angular/forms';\n\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\n\n@Component({\n\tproviders: [ProviderService],\n\tselector: 'form-button',\n\ttemplate: `\n\t\t<div style=\"position: relative; text-align: left; width: 100%\">\n\t\t\t<ng-template #tipContent>\n\t\t\t\t<span style=\"font-weight: bold\">Errors:<br></span>\n\t\t\t\t<ul>\n\t\t\t\t\t<li *ngFor=\"let error of getTipErrors()\">{{error}}</li>\n\t\t\t\t</ul>\n\t\t\t</ng-template>\n\t\t\t<div [ngbTooltip]=\"(getTipErrors().length ? tipContent : '')\" placement=\"top-left\" #t>\n\t\t\t\t<button type=\"submit\" [ngClass]=\"['btn', form && form.valid ? 'btn-success' : 'btn-danger']\" [disabled]=\"!form || !form.valid || disabled\" style=\"width: 200px\" [autofocus]=\"true\" #formButton>Submit</button>\n\t\t\t</div>\n\t\t</div>\n\t`\n})\n\nexport class FormButtonComponent extends BaseComponent { \n\t@Input() form: FormGroup;\n\t@Input() disabled = false;\n\n\t@ViewChild('formButton', {static: false}) public formButton;\n\n\tconstructor(private _services: ProviderService) {\n\t\tsuper(_services);\n\t}\n\n\tgetTipErrors() {\n\t\tlet res = [];\n\n\t\tif (this.form && this.form.invalid && typeof(this.form.controls) === 'object') {\n\t\t\tlet keys = Object.keys(this.form.controls);\n\n\t\t\tkeys.forEach(key => {\n\t\t\t\tlet ctrl = this.form.controls[key];\n\n\t\t\t\tif (ctrl.invalid) {\n\t\t\t\t\tres.push(key.replace('_id', '').replace('id_', '').replace('_', ' ').replace(/\\b\\S/g, function(t) { return t.toUpperCase(); }) + ' is invalid');\n\n\t\t\t\t\tif (this.isSuperAdmin()) {\n\t\t\t\t\t\tif (typeof(ctrl.value) === 'object' && Array.isArray(ctrl.value) && (<FormArray>ctrl).controls) {\n\t\t\t\t\t\t\tfor (let i = 0; i < (<FormArray>ctrl).controls.length; i++) {\n\t\t\t\t\t\t\t\tlet group = (<FormGroup>(<FormArray>ctrl).controls[i]);\n\n\t\t\t\t\t\t\t\tif (group.controls) {\n\t\t\t\t\t\t\t\t\tlet arrayKeys = Object.keys(group.controls);\n\n\t\t\t\t\t\t\t\t\tarrayKeys.forEach(arrayKey => {\n\t\t\t\t\t\t\t\t\t\tlet arrayCtrl = group.controls[arrayKey];\n\n\t\t\t\t\t\t\t\t\t\tif (arrayCtrl.invalid) {\n\t\t\t\t\t\t\t\t\t\t\tres.push('[' + i + '] -> ' + arrayKey.replace('_id', '').replace('id_', '').replace('_', ' ').replace(/\\b\\S/g, function(t) { return t.toUpperCase(); }) + ' is invalid');\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn res;\n\t}\n\n\tisSuperAdmin() {\n\t\tif (this._services._account.getUser() && this._services._account.getUser().roles.super_admin) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n}\n","import { Directive, Input, ElementRef } from '@angular/core';\n\n@Directive({\n\tselector : '[focus]'\n})\nexport class FocusDirective {\n\t@Input()\n\tfocus : boolean;\n\n\tconstructor(private element : ElementRef) {\n\t}\n\n\tprotected ngOnChanges() {\n\t\tif (this.focus)\n\t\t\tthis.element.nativeElement.focus();\n\t}\n}","import { Component, Input, OnInit } from '@angular/core';\nimport { NgbModal, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';\nimport { Validators, FormGroup, FormControl, FormBuilder } from '@angular/forms';\n\n@Component({\n\ttemplate: `\n\t\t<form [formGroup]=\"formInput\" novalidate (ngSubmit)=\"_activeModal.close(this.formInput.controls)\">\n\t\t\t<div class=\"modal-header\">\n\t\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-plus-circle\" style=\"color: green; font-size: 0.85em\" aria-hidden=\"true\"></i> {{ title }}</h4>\n\t\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"_activeModal.dismiss()\">\n\t\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class=\"modal-body\">\n\t\t\t\t<div *ngFor=\"let inputField of inputFields; let i = index\">\n\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"form-control-label\">{{inputField.label}}</label>\n\t\t\t\t\t\t<em *ngIf=\"formInput.controls[inputField.form].hasError('required') && inputField.required\">- Required</em>\n\t\t\t\t\t\t<em *ngIf=\"!formInput.controls[inputField.form].hasError('required') && formInput.controls[inputField.form].invalid\">- Invalid</em>\n\t\t\t\t\t\t<div *ngIf=\"inputField.type !== 'state' && inputField.type !== 'textarea' && inputField.type !== 'number' && inputField.type !== 'select' && inputField.type !== 'boolean'\">\n\t\t\t\t\t\t<input [autofocus]=\"i === 0 ? true : false\" [focus]=\"i === 0 ? true : false\" [formControlName]=\"inputField.form\" [ngClass]=\"['form-control', validateInput(inputField, formInput)]\" [type]=\"(inputField.type ? inputField.type : 'text')\">\n\t\t\t\t\t\t\t<ng-container *ngFor=\"let errorMsg of getErrorMessages(inputField, formInput);\">\n\t\t\t\t\t\t\t\t<div class=\"invalid-feedback\">{{errorMsg}}</div>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div *ngIf=\"inputField.type === 'select'\">\n\t\t\t\t\t\t\t<ng-select [formControlName]=\"inputField.form\" [ngClass]=\"[validateInput(inputField, formInput)]\" [placeholder]=\"inputField.placeholder\">\n\t\t\t\t\t\t\t\t<ng-option *ngFor=\"let opt of inputField.options\" [value]=\"opt.value\" [disabled]=\"opt.value === 'disabled'\">{{opt.text}}</ng-option>\n\t\t\t\t\t\t\t</ng-select>\n\t\t\t\t\t\t\t<ng-container *ngFor=\"let errorMsg of getErrorMessages(inputField, formInput);\">\n\t\t\t\t\t\t\t\t<div class=\"invalid-feedback\">{{errorMsg}}</div>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div *ngIf=\"inputField.type === 'state'\">\n\t\t\t\t\t\t\t<select [formControlName]=\"inputField.form\" [ngClass]=\"['form-control', validateInput(inputField, formInput)]\">\n\t\t\t\t\t\t\t\t<option value=\"\">Select State</option>\n\t\t\t\t\t\t\t\t<option *ngFor=\"let state of states\" [value]=\"state\">{{state}}</option>\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t<ng-container *ngFor=\"let errorMsg of getErrorMessages(inputField, formInput);\">\n\t\t\t\t\t\t\t\t<div class=\"invalid-feedback\">{{errorMsg}}</div>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div *ngIf=\"inputField.type === 'textarea'\">\n\t\t\t\t\t\t\t<textarea rows=\"4\" [formControlName]=\"inputField.form\" [ngClass]=\"['form-control', validateInput(inputField, formInput)]\"></textarea>\n\t\t\t\t\t\t\t<ng-container *ngFor=\"let errorMsg of getErrorMessages(inputField, formInput);\">\n\t\t\t\t\t\t\t\t<div class=\"invalid-feedback\">{{errorMsg}}</div>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div *ngIf=\"inputField.type === 'number'\">\n\t\t\t\t\t\t\t<input [formControlName]=\"inputField.form\" type=\"number\" [ngClass]=\"['form-control', validateInput(inputField, formInput)]\">\n\t\t\t\t\t\t\t<ng-container *ngFor=\"let errorMsg of getErrorMessages(inputField, formInput);\">\n\t\t\t\t\t\t\t\t<div class=\"invalid-feedback\">{{errorMsg}}</div>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div *ngIf=\"inputField.type === 'boolean'\" (click)=\"formInput.controls[inputField.form].setValue(!formInput.controls[inputField.form].value)\">\n\t\t\t\t\t\t\t<i *ngIf=\"formInput.controls[inputField.form].value\" class=\"fa fa-check\" style=\"color: green; font-size: 24px;\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t<i *ngIf=\"!formInput.controls[inputField.form].value\" class=\"fa fa-times\" style=\"color: red; font-size: 24px;\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"modal-footer\">\n\t\t\t\t<form-button [form]=\"formInput\"></form-button>\n\t\t\t\t<button type=\"button\" class=\"btn btn-secondary\" (click)=\"_activeModal.dismiss()\">Cancel</button>\n\t\t\t</div>\n\t\t</form>\n\t`\n})\n// tslint:disable-next-line:component-class-suffix\nexport class DialogInputContent implements OnInit {\n\t@Input() title = '';\n\t@Input() inputFields: any[] = [];\n\n\tformInput: FormGroup;\n\n\tstates: string[] = [\n\t\t'Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine',\n\t\t'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota', 'Ohio',\n\t\t'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming'];\n\n\tconstructor(public _activeModal: NgbActiveModal, private _fb: FormBuilder) {}\n\n\tngOnInit() {\n\t\tthis.formInput = this._fb.group({});\n\n\t\tfor (let i = 0; i < this.inputFields.length; i++) {\n\t\t\tif (this.inputFields[i].validators === null) {\n\t\t\t\tthis.formInput.addControl(this.inputFields[i].form, new FormControl({value: this.inputFields[i].data, disabled: this.inputFields[i].disabled}));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.formInput.addControl(this.inputFields[i].form, new FormControl({value: this.inputFields[i].data, disabled: this.inputFields[i].disabled}, this.inputFields[i].validators));\n\t\t\t}\n\t\t}\n\t}\n\n\tvalidateInput(inputField, formInput) {\n\n\t\tif (inputField.disabled) {\n\t\t\treturn '';\n\t\t}\n\n\t\tlet valid = true;\n\n\t\tfor (let i = 0; i < inputField.validators.length; i++) {\n\t\t\tif (formInput.controls[inputField.form].hasError([inputField.validatorErrors[i]])) {\n\t\t\t\tvalid = false;\n\t\t\t}\n\t\t}\n\n\t\tif (valid && formInput.controls[inputField.form].value !== null) {\n\t\t\treturn 'is-valid';\n\t\t}\n\t\telse if (!inputField.validators.length || (!inputField.required && valid)) {\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\treturn 'is-invalid';\n\t}\n\n\tgetErrorMessages(inputField, formInput) {\n\t\tlet res = [];\n\n\t\tfor (let i = 0; i < inputField.validators.length; i++) {\n\t\t\tif (formInput.controls[inputField.form].hasError([inputField.validatorErrors[i]])) {\n\t\t\t\tres.push(inputField.validatorMsg[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn res;\n\t}\n}\n","import {Component, Input, HostListener} from '@angular/core';\n\nimport {NgbModal, NgbActiveModal} from '@ng-bootstrap/ng-bootstrap';\n\n@Component({\n\ttemplate: `\n\t\t<div class=\"modal-header\">\n\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-times-circle\" style=\"color: red; font-size: 0.85em\" aria-hidden=\"true\"></i> {{ title }}</h4>\n\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"activeModal.dismiss('Cross click')\">\n\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t\t\t</button>\n\t\t</div>\n\t\t<div class=\"modal-body\">\n\t\t\t<p>{{ body }}</p>\n\t\t</div>\n\t\t<div class=\"modal-footer\">\n\t\t\t<button type=\"button\" class=\"btn btn-secondary\" (click)=\"activeModal.close('Close click')\">Ok</button>\n\t\t</div>\n \t`\n})\n\n// tslint:disable-next-line:component-class-suffix\nexport class DialogErrorContent {\n\t@Input() title: string;\n\t@Input() body: string;\n\n\t@HostListener('document:keypress', ['$event'])\n\thandleKeyboardEvent(event: KeyboardEvent) { \n\t\tif (event.keyCode === 13) {\n\t\t\tthis.activeModal.close();\n\t\t}\n\t}\n\n\tconstructor(public activeModal: NgbActiveModal) {}\n}","import {Component, Input, HostListener} from '@angular/core';\n\nimport {NgbActiveModal} from '@ng-bootstrap/ng-bootstrap';\n\n@Component({\n\ttemplate: `\n\t\t<div class=\"modal-header\">\n\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-question-circle\" style=\"color: blue; font-size: 0.85em\" aria-hidden=\"true\"></i> {{ title }}</h4>\n\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"activeModal.dismiss('Cross click')\">\n\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t\t\t</button>\n\t\t</div>\n\t\t<div class=\"modal-body\">\n\t\t\t<p>{{ body }}</p>\n\t\t\t<div [innerHTML]=\"html\"></div>\n\t\t</div>\n\t\t<div class=\"modal-footer\">\n\t\t\t<button type=\"button\" class=\"btn btn-success\" (click)=\"activeModal.close()\">Yes</button>\n\t\t\t<button type=\"button\" class=\"btn btn-danger\" (click)=\"activeModal.dismiss()\">No</button>\n\t\t</div>\n \t`\n})\n// tslint:disable-next-line:component-class-suffix\nexport class DialogConfirmContent {\n\t@Input() title: string;\n\t@Input() body: string;\n\t@Input() html: string;\n\n\t@HostListener('document:keypress', ['$event'])\n\thandleKeyboardEvent(event: KeyboardEvent) { \n\t\tif (event.keyCode === 13) {\n\t\t\tthis.activeModal.close();\n\t\t}\n\t}\n\n\tconstructor(public activeModal: NgbActiveModal) {}\n}","import { Component, Input, OnInit } from '@angular/core';\nimport { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\n\n@Component({\n\ttemplate: `\n\t \t<style>\n\t\t \ttable {\n\t\t\t\twidth: 100%;\n\t\t\t\ttable-layout: fixed;\n\t\t\t}\n\n\t\t\ttr {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\ttd {\n\t\t\t\twidth: 100%;\n\t\t\t\ttext-align: center;\n\t\t\t}\n\t\t</style>\n\t\t<form [formGroup]=\"form\" novalidate (ngSubmit)=\"submitForm()\">\n\t\t\t<div class=\"modal-header\">\n\t\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-question-circle\" style=\"color: blue; font-size: 0.85em\" aria-hidden=\"true\"></i> {{ title }}</h4>\n\t\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"_activeModal.dismiss()\">\n\t\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class=\"modal-body\">\n\t\t\t\t\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<div class=\"input-group\">\n\t\t\t\t\t\t\t\t<input class=\"form-control\" placeholder=\"yyyy-mm-dd\" name=\"dp\" formControlName=\"date\" ngbDatepicker #d=\"ngbDatepicker\">\n\t\t\t\t\t\t\t\t<div class=\"input-group-append\" (click)=\"d.toggle()\">\n\t\t\t\t\t\t\t\t\t<div class=\"input-group-text\">\n\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-calendar\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<div class=\"offset-3\">\n\t\t\t\t\t\t\t\t<ngb-timepicker formControlName=\"time\" meridian=\"ON\"></ngb-timepicker>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t\t<div class=\"modal-footer\">\n\t\t\t\t<form-button [form]=\"form\"></form-button>\n\t\t\t\t<button type=\"button\" class=\"btn btn-secondary\" (click)=\"_activeModal.dismiss()\">Cancel</button>\n\t\t\t</div>\n\t\t</form>\n\t`\n})\n// tslint:disable-next-line:component-class-suffix\nexport class DialogSelectDateTimeContent implements OnInit {\n\t@Input() title = '';\n\t@Input() date: Date;\n\n\tform: FormGroup;\n\n\tconstructor(public _activeModal: NgbActiveModal, private _fb: FormBuilder) {}\n\n\tngOnInit() {\t\t\t\n\t\tif (!this.date) {\n\t\t\tthis.date = new Date();\n\t\t}\n\n\t\tthis.form = this._fb.group({\n\t\t\ttime: [{hour: this.date.getHours(), minute: this.date.getMinutes(), second: 0}, [Validators.required]],\n\t\t\tdate: [{year: this.date.getFullYear(), month: this.date.getMonth() + 1, day: this.date.getDate()}, [Validators.required]]\n\t\t});\n\t}\n\n\tsubmitForm() {\n\t\tthis._activeModal.close(new Date(this.form.value.date.year, parseInt(this.form.value.date.month) - 1, this.form.value.date.day, this.form.value.time.hour, this.form.value.time.minute, this.form.value.time.second, 0));\n\t}\n}","import { Component, Input, OnInit } from '@angular/core';\nimport { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';\nimport { FormGroup, FormBuilder } from '@angular/forms';\nimport { SelectDataLabelModel } from '../../models/select-data-label.model';\n\n@Component({\n\ttemplate: `\n\t\t<div class=\"modal-header\">\n\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-question-circle\" style=\"color: blue; font-size: 0.75em\" aria-hidden=\"true\"></i> {{ title }} - {{ subtitle }}</h4>\n\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"_activeModal.dismiss()\">\n\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t\t\t</button>\n\t\t</div>\n\t\t<div class=\"modal-body\">\n\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t\t\t<ng-container *ngFor=\"let label of dialogData\">\n\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t<div *ngIf=\"label.subtype === null && label.type !== 'object'\" style=\"font-size: 12px;\">\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" [checked]=\"label.selected\" (click)=\"changeSelected(label)\" style=\"height: 20px; width: auto;\">&nbsp;&nbsp;&nbsp;{{ label.label }}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div *ngIf=\"label.subtype === null && label.type === 'object' && label.subLabel !== null\" style=\"font-size: 12px;\">\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" [checked]=\"label.selected\" (click)=\"changeSelected(label)\" style=\"height: 20px; width: auto;\">&nbsp;&nbsp;&nbsp;{{ label.subLabel }}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div *ngIf=\"label.subtype === null && label.type === 'object' && label.subLabel === null\" style=\"font-size: 12px;\">\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" [checked]=\"label.selected\" (click)=\"changeSelected(label)\" style=\"height: 20px; width: auto;\">&nbsp;&nbsp;&nbsp;{{ label.label }}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div *ngIf=\"label.subtype !== null\" style=\"font-size: 12px;\">\n\t\t\t\t\t\t\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"checkbox\" [checked]=\"label.selected\" (click)=\"changeSelected(label)\" style=\"height: 20px; width: auto;\">&nbsp;&nbsp;&nbsp;{{ label.subLabel }}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"modal-footer\">\n\t\t\t<button type=\"button\" class=\"btn btn-success\" (click)=\"_activeModal.close(dialogData)\">Submit</button>\n\t\t\t<button type=\"button\" class=\"btn btn-secondary\" (click)=\"_activeModal.dismiss()\">Cancel</button>\n\t\t</div>\n\t`\n})\n\n// tslint:disable-next-line:component-class-suffix\nexport class DialogSelectDataLabelsContent implements OnInit {\n\t@Input() title = '';\n\t@Input() subtitle = '';\n\t@Input() data;\n\t@Input() showArraySubData;\n\n\tform: FormGroup;\n\n\tdialogData: SelectDataLabelModel[] = [];\n\n\tconstructor(public _activeModal: NgbActiveModal, private _fb: FormBuilder) {}\n\n\tngOnInit () {\n\t\tthis.getKeys();\n\t}\n\n\tgetKeys() {\n\t\tlet dataKeys = Object.keys(this.data);\n\t\tlet type = '';\n\n\t\tdataKeys.filter(a => a !== '_id' && !a.startsWith('id_') && a !== '__v' && a !== 'createdAt' && a !== 'updatedAt').forEach(key => {\n\t\t\ttype = typeof(this.data[key]);\n\t\t\tif (type === 'object') {\n\t\t\t\tif (Array.isArray(this.data[key])) {\n\t\t\t\t\ttype = 'array';\n\t\t\t\t\tthis.dialogData.push({\n\t\t\t\t\t\tlabel: key.replace(new RegExp('_', 'g'), ' ').replace('string', '').replace(/\\w\\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }),\n\t\t\t\t\t\tdata: key,\n\t\t\t\t\t\tselected: true,\n\t\t\t\t\t\ttype: type,\n\t\t\t\t\t\tsubLabel: null,\n\t\t\t\t\t\tsubData: null,\n\t\t\t\t\t\tsubtype: null\n\t\t\t\t\t});\n\t\t\t\t\tif (this.showArraySubData === true) {\n\t\t\t\t\t\tlet subDataKeys = Object.keys(this.data[key][0]);\n\t\t\t\t\t\tsubDataKeys.filter(a => a !== '_id' && !a.startsWith('id_')).forEach(subKey => {\n\t\t\t\t\t\t\tthis.dialogData.push({\n\t\t\t\t\t\t\t\tlabel: key.replace(new RegExp('_', 'g'), ' ').replace('string', '').replace(/\\w\\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }),\n\t\t\t\t\t\t\t\tsubLabel: subKey.replace(new RegExp('_', 'g'), ' ').replace('string', '').replace(/\\w\\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }),\n\t\t\t\t\t\t\t\tdata: key,\n\t\t\t\t\t\t\t\ttype: type,\n\t\t\t\t\t\t\t\tsubData: subKey,\n\t\t\t\t\t\t\t\tselected: true,\n\t\t\t\t\t\t\t\tsubtype: typeof(subKey)\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlet subDataKeys = Object.keys(this.data[key]);\n\t\t\t\t\tif (subDataKeys.length) {\n\t\t\t\t\t\tsubDataKeys.filter(a => a !== '_id' && !a.startsWith('id_')).forEach(subKey => {\n\t\t\t\t\t\t\tthis.dialogData.push({\n\t\t\t\t\t\t\t\tlabel: key.replace(new RegExp('_', 'g'), ' ').replace('string', '').replace(/\\w\\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }),\n\t\t\t\t\t\t\t\tsubLabel: subKey.replace(new RegExp('_', 'g'), ' ').replace('string', '').replace(/\\w\\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }),\n\t\t\t\t\t\t\t\tdata: key,\n\t\t\t\t\t\t\t\tsubData: subKey,\n\t\t\t\t\t\t\t\tsubtype: null,\n\t\t\t\t\t\t\t\tselected: true,\n\t\t\t\t\t\t\t\ttype: type\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.dialogData.push({\n\t\t\t\t\t\t\tlabel: key.replace(new RegExp('_', 'g'), ' ').replace('string', '').replace(/\\w\\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }),\n\t\t\t\t\t\t\tdata: key,\n\t\t\t\t\t\t\tselected: true,\n\t\t\t\t\t\t\ttype: type,\n\t\t\t\t\t\t\tsubData: null,\n\t\t\t\t\t\t\tsubLabel: null,\n\t\t\t\t\t\t\tsubtype: null\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.dialogData.push({\n\t\t\t\t\tlabel: key.replace(new RegExp('_', 'g'), ' ').replace('string', '').replace(/\\w\\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }),\n\t\t\t\t\tdata: key,\n\t\t\t\t\tselected: true,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tsubData: null,\n\t\t\t\t\tsubLabel: null,\n\t\t\t\t\tsubtype: null\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tchangeSelected(label: SelectDataLabelModel) {\n\t\tlabel.selected = !label.selected;\n\n\t\tif (label.type === 'array' && label.subtype === null) {\n\t\t\tthis.dialogData.filter(a => a.label === label.label).forEach(subtype => {\n\t\t\t\tsubtype.selected = label.selected;\n\t\t\t});\n\t\t}\n\t}\n\n\tsubmit() {\n\t\treturn this.dialogData;\n\t}\n}","import { Component, Input, ChangeDetectorRef, OnInit, OnDestroy } from '@angular/core';\nimport { ResizeService } from '../../util/window-resize.service';\n\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\n\n@Component({\n\tproviders: [ProviderService],\n\tselector: 'responsive-button-group',\n\ttemplateUrl: './responsive-button-group.component.html'\n})\nexport class ResponsiveButtonGroupComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\t@Input() collapseSize = 900;\n\n\twindowSize: number = window.innerWidth;\n\twindowSizeSubscription: any = null;\n\n\tconstructor(private _cdRef: ChangeDetectorRef, private _resizeService: ResizeService, private _services: ProviderService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis.windowSizeSubscription = this._resizeService.onResize$.subscribe((val) => {\n\t\t\tif (val) {\n\t\t\t\tthis.windowSize = val.innerWidth;\n\t\t\t\tthis._cdRef.detectChanges();\n\t\t\t}\n\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis.windowSizeSubscription.unsubscribe();\n\t}\n}\n","<style>\n\t@media screen and (min-width: 900px) {\n\t\t:host /deep/ .xsBtnGroup {\n\t\t\tdisplay: none !important;\n\t\t}\n\n\t\t:host /deep/ .lgBtnGroup {\n\t\t\tdisplay: inline-flex !important;\n\t\t}\n\n\t\t:host /deep/ .lgBtnGroup button {\n\t\t\tmargin-left: 5px !important;\n\t\t}\n\n\t\t:host /deep/ .lgBtnGroup a {\n\t\t\tmargin-left: 5px !important;\n\t\t}\n\t}\n\n\t@media screen and (max-width: 900px) {\n\n\t\t:host /deep/ .xsBtnGroup {\n\t\t\tdisplay: inherit !important;\n\t\t}\n\n\t\t:host /deep/ .xsBtnGroup button {\n\t\t\tmargin-top: 5px !important;\n\t\t\twidth: 100% !important;\n\t\t}\n\n\t\t:host /deep/ .xsBtnGroup a {\n\t\t\tmargin-top: 5px !important;\n\t\t}\n\n\t\t:host /deep/ .lgBtnGroup {\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n</style>\n\n<div [ngClass]=\"windowSize <= collapseSize ? ['btn-group-vertical', 'xsBtnGroup'] : ['btn-group', 'lgBtnGroup']\">\n\t<ng-content></ng-content>\n</div>\n","import { Component, Input, OnInit } from '@angular/core';\nimport { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\n\n@Component({\n\ttemplate: `\n\t\t<style>\n\t\t\tcollapse-table {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t.navbar-light .navbar-nav .active>.nav-link, .navbar-light .navbar-nav .nav-link.active, .navbar-light .navbar-nav .nav-link.show, .navbar-light .navbar-nav .show>.nav-link {\n\t\t\t\tcolor: #0b4499;\n\t\t\t}\n\t\t\t.navbar-light .navbar-nav .nav-link {\n\t\t\t\tcolor:#333;\n\t\t\t}\n\t\t\ta.nav-link.loginreg {\n\t\t\t\tbackground-color: #0b4499;\n\t\t\t\tcolor: #fff !important;\n\t\t\t\tborder-radius: 40px;\n\t\t\t}\n\t\t\ta.nav-link.loginreg:hover {\n\t\t\t\tbackground: #1668e2;\n\t\t\t}\n\t\t\t.nav-link {\n\t\t\t\tcolor: #333333;\n\t\t\t\tfont-size: 150%\n\t\t\t}\n\t\t\t.nav-item a.nav-link.active {\n\t\t\t\tcolor: #0b4499;\n\t\t\t}\n\t\t\t.contactimg>img{\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t.log-box {\n\t\t\t\tpadding-top: 26px;\n\t\t\t\tpadding-bottom: 26px;\n\t\t\t}\n\t\t\t.loginform .form-control, .register-form .form-control {\n\t\t\t\tcolor: #000;\n\t\t\t\theight: 52px;\n\t\t\t}\n\t\t\t.loginform {\n\t\t\t\tmargin-top: 35px;\n\t\t\t}\n\t\t\t.loginform label {\n\t\t\t\tfont-size: 18px;\n\t\t\t\tfont-weight: 600;\n\t\t\t}\n\n\t\t\t.loginbtn {\n\t\t\t\tbackground: #0b4499;\n\t\t\t\twidth: 100%;\n\t\t\t\tmargin-top: 44px;\n\t\t\t\theight: 52px;\n\t\t\t\tfont-size: 22px;\n\t\t\t\tborder-radius: 2px;\n\t\t\t\tcolor: #fff !important;\n\t\t\t}\n\n\t\t\t.login365btn {\n\t\t\t\tbackground: orange;\n\t\t\t\twidth: 100%;\n\t\t\t\tmargin-top: 44px;\n\t\t\t\theight: 52px;\n\t\t\t\tfont-size: 22px;\n\t\t\t\tborder-radius: 2px;\n\t\t\t\tcolor: #fff !important;\n\t\t\t}\n\n\t\t\t.contactimg {\n\t\t\t\tposition: relative;\n\t\t\t}\n\t\t\t.login-logo {\n\t\t\t\tmargin-bottom: 20px;\n\t\t\t}\n\n\t\t\t.textbox {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 50%;\n\t\t\t\tcolor: #fff;\n\t\t\t\tpadding: 40px;\n\t\t\t\ttransform: translate(0%, -50%);\n\t\t\t\ttext-align: center;\n\t\t\t}\n\t\t\t.sign-btn {\n\t\t\t\tbackground: #0b4499;\n\t\t\t\twidth: 100%;\n\t\t\t\tmargin-top: 14px;\n\t\t\t\theight: 52px;\n\t\t\t\tfont-size: 22px;\n\t\t\t\tborder-radius: 2px;\n\t\t\t\tcolor: #fff !important;\n\t\t\t}\n\n\t\t\tbutton.btn.sign-btn:hover {\n\t\t\t\tbackground: #1668e2;\n\t\t\t}\n\t\t</style>\n\t\t<form [formGroup]=\"form\" novalidate>\n\t\t\t<div class=\"modal-header\">\n\t\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-question-circle\" style=\"color: blue; font-size: 0.85em\" aria-hidden=\"true\"></i> Login</h4>\n\t\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"_activeModal.dismiss()\">\n\t\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class=\"modal-body\" *ngIf=\"form\">\n\t\t\t\t<div class=\"row justify-content-md-center\">\n\t\t\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t\t\t<div class=\"row bg-white\">\n\t\t\t\t\t\t\t<div class=\"col-lg-6\">\n\t\t\t\t\t\t\t\t<div class=\"contactimg\">\n\t\t\t\t\t\t\t\t\t<img src=\"/assets/images/loginsignup/formimg.jpg\" alt=\"images\" class=\"img-fluid\">\n\t\t\t\t\t\t\t\t\t<div class=\"textbox\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"login-logo\"><img src=\"/assets/images/loginsignup/login-logo.png\" alt=\"images\"></div>\n\t\t\t\t\t\t\t\t\t\tThe All-in-One Solution for Tracking Inventory, Ordering, POs, Management, and Much More!\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-lg-6\">\n\t\t\t\t\t\t\t\t<div class=\"log-box\">\n\t\t\t\t\t\t\t\t\t<div class=\"loginform\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t\t\t<label>Username/Email</label>\n\t\t\t\t\t\t\t\t\t\t\t<em *ngIf=\"form.controls.username.hasError('required')\">- Required</em>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"email\" class=\"form-control\" [ngClass]=\"['form-control', form.controls.username.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"username\" [autofocus]=\"true\" [focus]=\"true\" aria-describedby=\"emailHelp\" placeholder=\"Your Username/Email\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t\t\t<label>Password</label>\n\t\t\t\t\t\t\t\t\t\t\t<em *ngIf=\"form.controls.password.hasError('required')\">- Required</em>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"password\" class=\"form-control\" [ngClass]=\"['form-control', form.controls.password.enabled ? (form.controls.password.valid ? 'is-valid' : 'is-invalid') : '']\" formControlName=\"password\" placeholder=\"Your Password\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-check text-right\">\n\t\t\t\t\t\t\t\t\t\t\t<label class=\"form-check-label\"><a href=\"javascript:void(0)\" (click)=\"toggleForgotPassword()\"> {{!form.controls.forgotPassword.value ? 'Forgot Password?' : 'Enter Password'}} </a></label>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn loginbtn\" (click)=\"close('ResolveIO')\">{{!form.controls.forgotPassword.value ? 'Login' : 'Submit'}}</button>\n\t\t\t\t\t\t\t\t\t\t<button *ngIf=\"msAllowed\" type=\"submit\" class=\"btn login365btn\" (click)=\"close('MS')\">Microsoft Single-Sign-On</button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"modal-footer\">\n\t\t\t\t<responsive-button-group>\n\t\t\t\t\t<button type=\"button\" class=\"btn btn-secondary\" (click)=\"_activeModal.dismiss()\">Cancel</button>\n\t\t\t\t</responsive-button-group>\n\t\t\t</div>\n\t\t</form>\n\t`\n})\n// tslint:disable-next-line:component-class-suffix\nexport class DialogLoginContent implements OnInit {\n\t@Input() msAllowed = false;\n\n\tform: FormGroup;\n\n\tconstructor(public _activeModal: NgbActiveModal, private _fb: FormBuilder) {}\n\n\tngOnInit() {\t\t\t\n\t\tthis.form = this._fb.group({\n\t\t\tusername: ['', [Validators.required]],\n\t\t\tpassword: ['', [Validators.required]],\n\t\t\tforgotPassword: [false],\n\t\t});\n\t}\n\n\ttoggleForgotPassword() {\n\t\tthis.form.controls.forgotPassword.setValue(!this.form.controls.forgotPassword.value);\n\n\t\tif (!this.form.controls.forgotPassword.value) {\n\t\t\tthis.form.controls.password.setValidators([Validators.required]);\n\t\t\tthis.form.controls.password.enable();\n\t\t}\n\t\telse {\n\t\t\tthis.form.controls.password.setValue('');\n\t\t\tthis.form.controls.password.clearValidators();\n\t\t\tthis.form.controls.password.disable();\n\t\t}\n\n\t\tthis.form.controls.password.updateValueAndValidity();\n\t}\n\n\tclose(type: string) {\n\t\tthis._activeModal.close({\n\t\t\tform: this.form,\n\t\t\ttype: type\n\t\t});\n\t}\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\n\n@Component({\n\ttemplate: `\n\t\t<style>\n\t\t\tcollapse-table {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t.navbar-light .navbar-nav .active>.nav-link, .navbar-light .navbar-nav .nav-link.active, .navbar-light .navbar-nav .nav-link.show, .navbar-light .navbar-nav .show>.nav-link {\n\t\t\t\tcolor: #0b4499;\n\t\t\t}\n\t\t\t.navbar-light .navbar-nav .nav-link {\n\t\t\t\tcolor:#333;\n\t\t\t}\n\t\t\ta.nav-link.loginreg {\n\t\t\t\tbackground-color: #0b4499;\n\t\t\t\tcolor: #fff !important;\n\t\t\t\tborder-radius: 40px;\n\t\t\t}\n\t\t\ta.nav-link.loginreg:hover {\n\t\t\t\tbackground: #1668e2;\n\t\t\t}\n\t\t\t.nav-link {\n\t\t\t\tcolor: #333333;\n\t\t\t\tfont-size: 150%\n\t\t\t}\n\t\t\t.nav-item a.nav-link.active {\n\t\t\t\tcolor: #0b4499;\n\t\t\t}\n\t\t\t.contactimg>img{\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t.log-box {\n\t\t\t\tpadding-top: 26px;\n\t\t\t\tpadding-bottom: 26px;\n\t\t\t}\n\t\t\t.loginform .form-control, .register-form .form-control {\n\t\t\t\tcolor: #000;\n\t\t\t\theight: 52px;\n\t\t\t}\n\t\t\t.loginform {\n\t\t\t\tmargin-top: 35px;\n\t\t\t}\n\t\t\t.loginform label {\n\t\t\t\tfont-size: 18px;\n\t\t\t\tfont-weight: 600;\n\t\t\t}\n\n\t\t\t.loginbtn {\n\t\t\t\tbackground: #0b4499;\n\t\t\t\twidth: 100%;\n\t\t\t\tmargin-top: 44px;\n\t\t\t\theight: 52px;\n\t\t\t\tfont-size: 22px;\n\t\t\t\tborder-radius: 2px;\n\t\t\t\tcolor: #fff !important;\n\t\t\t}\n\n\t\t\t.contactimg {\n\t\t\t\tposition: relative;\n\t\t\t}\n\t\t\t.login-logo {\n\t\t\t\tmargin-bottom: 20px;\n\t\t\t}\n\n\t\t\t.textbox {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 50%;\n\t\t\t\tcolor: #fff;\n\t\t\t\tpadding: 40px;\n\t\t\t\ttransform: translate(0%, -50%);\n\t\t\t\ttext-align: center;\n\t\t\t}\n\t\t\t.sign-btn {\n\t\t\t\tbackground: #0b4499;\n\t\t\t\twidth: 100%;\n\t\t\t\tmargin-top: 14px;\n\t\t\t\theight: 52px;\n\t\t\t\tfont-size: 22px;\n\t\t\t\tborder-radius: 2px;\n\t\t\t\tcolor: #fff !important;\n\t\t\t}\n\n\t\t\tbutton.btn.sign-btn:hover {\n\t\t\t\tbackground: #1668e2;\n\t\t\t}\n\t\t</style>\n\t\t<form [formGroup]=\"form\" novalidate (ngSubmit)=\"_activeModal.close(form)\">\n\t\t\t<div class=\"modal-header\">\n\t\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-question-circle\" style=\"color: blue; font-size: 0.85em\" aria-hidden=\"true\"></i> Register</h4>\n\t\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"_activeModal.dismiss()\">\n\t\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class=\"modal-body\" *ngIf=\"form\">\n\t\t\t\t<div class=\"row justify-content-md-center\">\n\t\t\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t\t\t<div class=\"row bg-white\">\n\t\t\t\t\t\t\t<div class=\"col-lg-6\">\n\t\t\t\t\t\t\t\t<div class=\"contactimg\">\n\t\t\t\t\t\t\t\t\t<img src=\"/assets/images/loginsignup/formimg.jpg\" alt=\"images\" class=\"img-fluid\">\n\t\t\t\t\t\t\t\t\t<div class=\"textbox\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"login-logo\"><img src=\"/assets/images/loginsignup/login-logo.png\" alt=\"images\"></div>\n\t\t\t\t\t\t\t\t\t\tThe All-in-One Solution for Tracking Inventory, Ordering, POs, Management, and Much More!\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-lg-6\">\n\t\t\t\t\t\t\t\t<div class=\"log-box\">\n\t\t\t\t\t\t\t\t\t<div class=\"register-form\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t\t\t<label>User Name</label>\n\t\t\t\t\t\t\t\t\t\t\t<em *ngIf=\"form.controls.username.hasError('required')\">- Required</em>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" [ngClass]=\"['form-control', form.controls.username.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"username\" [autofocus]=\"true\" [focus]=\"true\" aria-describedby=\"emailHelp\" placeholder=\"User Name\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t\t\t<label>Full Name</label>\n\t\t\t\t\t\t\t\t\t\t\t<em *ngIf=\"form.controls.name.hasError('required')\">- Required</em>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" [ngClass]=\"['form-control', form.controls.name.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"name\" aria-describedby=\"emailHelp\" placeholder=\"Name\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t\t\t<label>Phone Number</label>\n\t\t\t\t\t\t\t\t\t\t\t<em *ngIf=\"form.controls.phone.hasError('required')\">- Required</em>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" [ngClass]=\"['form-control', form.controls.phone.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"phone\" placeholder=\"Phone Number\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t\t\t<label>Company</label>\n\t\t\t\t\t\t\t\t\t\t\t<em *ngIf=\"form.controls.company.hasError('required')\">- Required</em>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" [ngClass]=\"['form-control', form.controls.company.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"company\" placeholder=\"Company Name\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t\t\t<label>Email</label>\n\t\t\t\t\t\t\t\t\t\t\t<em *ngIf=\"form.controls.email.hasError('required')\">- Required</em>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"email\" class=\"form-control\" [ngClass]=\"['form-control', form.controls.email.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"email\" placeholder=\"Email\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn sign-btn\">Signup</button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"modal-footer\">\n\t\t\t\t<responsive-button-group>\n\t\t\t\t\t<button type=\"button\" class=\"btn btn-secondary\" (click)=\"_activeModal.dismiss()\">Cancel</button>\n\t\t\t\t</responsive-button-group>\n\t\t\t</div>\n\t\t</form>\n\t`\n})\n// tslint:disable-next-line:component-class-suffix\nexport class DialogRegisterContent implements OnInit {\n\n\tform: FormGroup;\n\n\tconstructor(public _activeModal: NgbActiveModal, private _fb: FormBuilder) {}\n\n\tngOnInit() {\t\t\t\n\t\tthis.form = this._fb.group({\n\t\t\tusername: ['', [Validators.required]],\n\t\t\tname: ['', [Validators.required]],\n\t\t\tphone: ['', [Validators.required]],\n\t\t\tcompany: ['', [Validators.required]],\n\t\t\temail: ['', [Validators.required]]\n\t\t});\n\t}\n}\n","import { Component, Input, ViewChild, AfterViewInit, OnInit} from '@angular/core';\nimport { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';\nimport { AccountManagerService } from '../../account-manager.service';\n\n@Component({\n\ttemplate: `\n\t\t<style>\n\t\t\tcollapse-table tr:hover {\n\t\t\t\tbackground-color: lightblue;\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\n\t\t\t.selected {\n\t\t\t\tbackground-color: lightblue;\n\t\t\t}\n\n\t\t\tcollapse-table {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t</style>\n\t\t<div #allElements>\n\t\t\t<div class=\"modal-header\">\n\t\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-question-circle\" style=\"color: blue; font-size: 0.85em\" aria-hidden=\"true\"></i> {{ title }}</h4>\n\t\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"_activeModal.dismiss()\" #close>\n\t\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class=\"modal-body\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col\" *ngFor=\"let option of options\">\n\t\t\t\t\t\t<button style=\"width: 100%\" type=\"button\" [ngClass]=\"['btn', selectedType === option.value ? 'btn-success' : 'btn-warning']\" (click)=\"onSelectType(option.value)\">{{option.text}}</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t`\n})\n// tslint:disable-next-line:component-class-suffix\nexport class DialogSelectWithButtonsURLContent implements AfterViewInit, OnInit {\n\n\t@Input() url = '';\n\n\t@ViewChild ('close', {static: false}) public close;\n\t@ViewChild('allElements', {static: false}) public allElements;\n\n\ttitle = 'Select Window Type';\n\tselectedType = '';\n\n\toptions = [\t\n\t\t{value: 'same_tab', text: 'Same Tab'},\n\t\t{value: 'new_tab', text: 'New Tab'},\n\t\t{value: 'new_window', text: 'New Window'}\n\t];\n\n\tconstructor(public _activeModal: NgbActiveModal, private _account: AccountManagerService) {}\n\n\tngOnInit() {\t\n\t\tif (this._account.getUser().settings.routing_preference && this._account.getUser().settings.routing_preference !== 'alwaysAsk') {\n\t\t\tif (this._account.getUser().settings.routing_preference === 'sameTab') {\n\t\t\t\twindow.open(this.url, '_self');\n\t\t\t}\n\t\n\t\t\tif (this._account.getUser().settings.routing_preference === 'newTab') {\n\t\t\t\twindow.open(this.url, '_blank');\n\t\t\t}\n\t\n\t\t\tif (this._account.getUser().settings.routing_preference === 'newWindow') {\n\t\t\t\twindow.open(this.url, '_blank', 'toolbar=1,location=1,menubar=1');\n\t\t\t}\n\t\n\t\t\tthis._activeModal.close();\n\t\t}\n\t}\n\n\tngAfterViewInit() {\n\t\tsetTimeout(() => {\n\t\t\tlet foundElement = this.recursiveFindFirstElement(this.allElements.nativeElement);\n\t\t\tif (foundElement) {\n\t\t\t\tfoundElement.focus();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.close.nativeElement.focus();\n\t\t\t\tthis.close.nativeElement.blur();\n\t\t\t}\n\t\t}, 100);\n\t}\n\n\trecursiveFindFirstElement(element) {\n\t\tlet foundElement = null;\n\t\tlet htmlCol: HTMLCollection = element.children;\n\t\tfor (let i = 0; i < Object.keys(htmlCol).length; i++) {\n\t\t\tlet key = Object.keys(htmlCol)[i];\n\n\t\t\tlet htmlElem = htmlCol[key];\n\t\t\tif (htmlElem.children && htmlElem.children.length) {\n\t\t\t\tfoundElement = this.recursiveFindFirstElement(htmlElem);\n\t\t\t}\n\t\t\telse if (htmlElem.tagName === 'BUTTON' && htmlElem.classList.contains('close')) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if ((htmlElem.tagName === 'BUTTON' || htmlElem.tagName === 'INPUT' || htmlElem.tagName === 'SELECT' || htmlElem.tagName === 'TEXTAREA') && !htmlElem.hidden && !htmlElem.disabled) {\n\t\t\t\treturn htmlElem;\n\t\t\t}\n\n\t\t\tif (foundElement) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn foundElement;\n\t}\n\n\tonSelectType(type) {\n\t\tthis.selectedType = type;\n\n\t\tthis.submit();\n\t}\n\n\tsubmit() {\n\n\t\tif (this.selectedType === 'same_tab') {\n\t\t\twindow.open(this.url, '_self');\n\t\t}\n\n\t\tif (this.selectedType === 'new_tab') {\n\t\t\twindow.open(this.url, '_blank');\n\t\t}\n\n\t\tif (this.selectedType === 'new_window') {\n\t\t\twindow.open(this.url, '_blank', 'toolbar=1,location=1,menubar=1');\n\t\t}\n\n\t\tthis._activeModal.close();\n\t}\n}\n","import { Component, Input, OnInit, OnDestroy } from '@angular/core';\nimport { ResizeService } from '../../util/window-resize.service';\nimport { AccountManagerService } from '../../account-manager.service';\n\n@Component({\n\tselector: 'collapse-table',\n\ttemplateUrl: './collapse-table.component.html'\n})\n\nexport class CollapseTableComponent implements OnInit, OnDestroy {\n\n\t@Input() collapseSize: number;\n\t@Input() tableFixed: false;\n\t@Input() headerFixed = false;\n\t@Input() secondaryColor = false;\n\t@Input() tertiaryColor = false;\n\n\twindowSize: number = window.innerWidth;\n\twindowSizeSubscription: any = null;\n\n\tconstructor(private _resizeService: ResizeService, private _account: AccountManagerService) \n\t{}\n\n\tngOnInit() {\n\t\tthis.windowSizeSubscription = this._resizeService.onResize$.subscribe((val) => {\n\t\t\tthis.windowSize = val.innerWidth;\n\t\t});\n\n\t\tif (this._account.getUser() && this._account.getUser().settings) {\n\t\t\tdocument.documentElement.style.setProperty('--primary-table-color', this._account.getUser().settings.table_color);\n\t\t\tdocument.documentElement.style.setProperty('--primary-table-font-color', this._account.getUser().settings.table_font_color);\n\t\t\tdocument.documentElement.style.setProperty('--font-size', this._account.getUser().settings.font_size + 'px');\n\t\t\tdocument.documentElement.style.setProperty('--secondary-table-color', this._account.getUser().settings.secondary_table_color);\n\t\t\tdocument.documentElement.style.setProperty('--secondary-table-font-color', this._account.getUser().settings.secondary_table_font_color);\n\t\t\tdocument.documentElement.style.setProperty('--tertiary-table-color', this._account.getUser().settings.tertiary_table_color);\n\t\t\tdocument.documentElement.style.setProperty('--tertiary-table-font-color', this._account.getUser().settings.tertiary_table_font_color);\n\t\t}\n\t}\n\n\tngOnDestroy() {\n\t\tthis.windowSizeSubscription.unsubscribe();\n\t}\n\n\tonClick(event) {\n\t\t// if (event.target.localName === 'th') {\n\t\t// \tconsole.log('You Clicked Header: ' + event.target.innerHTML);\n\t\t// }\n\t}\n\n\tgetCollapseClass() {\t\t\n\t\tlet res = ['table'];\n\n\t\tif (this.secondaryColor) {\n\t\t\tres.push('collapseTable-sec');\n\t\t}\n\t\telse if (this.tertiaryColor) {\n\t\t\tres.push('collapseTable-tert');\n\t\t}\n\t\telse {\n\t\t\tres.push('collapseTable');\n\t\t}\n\n\t\t// if (this.tableFixed) {\n\t\t// \tres.push('fixed');\n\t\t// }\n\t\t// else if (this.headerFixed) {\n\t\t// \tres.push('headerFixed');\n\t\t// }\n\n\t\treturn res;\n\t}\n\n\tgetPrimaryColor() {\n\t\treturn this._account.getUser() ? this._account.getUser().settings.table_color : '#3b3ee3';\n\t}\n}\n","<style>\n ::ng-deep :root {\n --primary-table-color: #3b3ee3;\n --primary-table-font-color: white;\n --font-size: 12px;\n --secondary-table-color: #87ceeb;\n --secondary-table-font-color: #000000;\n --tertiary-table-color: #ff4500;\n --tertiary-table-font-color: #000000;\n }\n\n\t:host /deep/ .collapseTable {\n border: 1px solid #ccc;\n margin: 0;\n padding: 0;\n width: 100%;\n /*table-layout: fixed;*/ \n }\n :host /deep/ .collapseTable tr {\n border: 1px solid #ddd;\n padding: 0.35em;\n }\n :host /deep/ .collapseTable th, :host /deep/ .collapseTable td {\n padding: 0.625em;\n text-align: center;\n vertical-align: middle;\n }\n :host /deep/ .collapseTable th {\n letter-spacing: 0.1em;\n text-transform: uppercase;\n background-color: var(--primary-table-color);\n color: var(--primary-table-font-color);\n font-size: var(--font-size);\n position: sticky;\n z-index: 10;\n top: 0;\n } \n :host /deep/ .collapseTable-sec {\n border: 1px solid #ccc;\n margin: 0;\n padding: 0;\n width: 100%;\n }\n :host /deep/ .collapseTable-sec tr {\n border: 1px solid #ddd;\n padding: 0.35em;\n }\n :host /deep/ .collapseTable-sec th, :host /deep/ .collapseTable-sec td {\n padding: 0.625em;\n text-align: center;\n }\n :host /deep/ .collapseTable-sec th {\n letter-spacing: 0.1em;\n text-transform: uppercase;\n background-color: var(--secondary-table-color);\n color: var(--secondary-table-font-color);\n font-size: var(--font-size);\n position: sticky;\n z-index: 10;\n top: 0;\n } \n :host /deep/ .collapseTable-tert {\n border: 1px solid #ccc;\n margin: 0;\n padding: 0;\n width: 100%;\n }\n :host /deep/ .collapseTable-tert tr {\n border: 1px solid #ddd;\n padding: 0.35em;\n }\n :host /deep/ .collapseTable-tert th, :host /deep/ .collapseTable-tert td {\n padding: 0.625em;\n text-align: center;\n }\n :host /deep/ .collapseTable-tert th {\n letter-spacing: 0.1em;\n text-transform: uppercase;\n background-color: var(--tertiary-table-color);\n color: var(--tertiary-table-font-color);\n font-size: var(--font-size);\n position: sticky;\n z-index: 10;\n top: 0;\n }\n \n .fixed {\n table-layout: fixed;\n }\n\n :host /deep/ .headerFixed thead, :host /deep/ .headerFixed tbody tr {\n display:table;\n width:100%;\n table-layout:fixed;\n }\n\n .hide {\n display: none;\n }\n</style>\n\n<div class=\"table-responsive-xl\">\n <table [ngClass]=\"getCollapseClass()\" [style.border]=\"secondaryColor || tertiaryColor ? '3px solid black' : 'none'\" cellspacing=\"0\" cellpadding=\"0\">\n <ng-content></ng-content>\n </table>\n</div>","\nimport { Component, Input, ViewChild, AfterViewInit} from '@angular/core';\nimport { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';\nimport { DialogSelectWithButtonsOptionModel } from '../../models/dialog.model';\n\n@Component({\n\ttemplate: `\n\t\t<style>\n\t\t\tcollapse-table tr:hover {\n\t\t\t\tbackground-color: lightblue;\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\n\t\t\t.selected {\n\t\t\t\tbackground-color: lightblue;\n\t\t\t}\n\n\t\t\tcollapse-table {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t</style>\n\t\t<div #allElements>\n\t\t\t<div class=\"modal-header\">\n\t\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-question-circle\" style=\"color: blue; font-size: 0.85em\" aria-hidden=\"true\"></i> {{ title }}</h4>\n\t\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"_activeModal.dismiss()\" #close>\n\t\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class=\"modal-body\">\n\t\t\t\t<div style=\"height: 60vh; overflow-y: auto\">\n\t\t\t\t\t<collapse-table collapseSize=\"900\">\n\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th>List</th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t<tr *ngFor=\"let object of objects; let i = index\" (click)=\"onSelectItem(i)\" [ngClass]=\"{'selected' : i === selectedIndex || selectedIndexes.includes(i)}\">\n\t\t\t\t\t\t\t\t<td>{{object.text}}</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</collapse-table>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"modal-footer\">\n\t\t\t\t<ng-container *ngIf=\"!allowNone\">\n\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', (selectedItem || selectedItems.length) ? 'btn-success' : 'btn-danger']\" [disabled]=\"!selectedItem && !selectedItems.length\" (click)=\"_activeModal.close(selectedItem || selectedItems)\">Submit</button>\n\t\t\t\t</ng-container>\n\t\t\t\t<ng-container *ngIf=\"allowNone\">\n\t\t\t\t\t<button type=\"button\" class=\"btn btn-success\" (click)=\"_activeModal.close(selectedItem || selectedItems)\">Submit</button>\n\t\t\t\t</ng-container>\n\t\t\t\t<button type=\"button\" class=\"btn btn-secondary\" (click)=\"_activeModal.dismiss()\">Cancel</button>\n\t\t\t</div>\n\t\t</div>\n\t`\n})\n// tslint:disable-next-line:component-class-suffix\nexport class DialogSelectArrayObjsContent implements AfterViewInit{\n\t@Input() title = '';\n\t@Input() objects: DialogSelectWithButtonsOptionModel[] = [];\n\t@Input() multiple = false;\n\t@Input() allowNone = false;\n\n\t@ViewChild ('close', {static: false}) public close;\n\t@ViewChild('allElements', {static: false}) public allElements;\n\n\tselectedIndex: number = null;\n\tselectedItem: DialogSelectWithButtonsOptionModel = null;\n\n\tselectedIndexes: number[] = [];\n\tselectedItems: DialogSelectWithButtonsOptionModel[] = [];\n\n\tconstructor(public _activeModal: NgbActiveModal) {}\n\n\tngAfterViewInit() {\n\t\tsetTimeout(() => {\n\t\t\tlet foundElement = this.recursiveFindFirstElement(this.allElements.nativeElement);\n\t\t\tif (foundElement) {\n\t\t\t\tfoundElement.focus();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.close.nativeElement.focus();\n\t\t\t\tthis.close.nativeElement.blur();\n\t\t\t}\n\t\t}, 100);\n\n\t\tthis.objects.forEach((obj, objIdx) => {\n\t\t\tif (obj.selected) {\n\t\t\t\tthis.selectedIndexes.push(objIdx);\n\t\t\t\tthis.selectedItems.push(obj);\n\t\t\t}\n\t\t});\n\t}\n\n\trecursiveFindFirstElement(element) {\n\t\tlet foundElement = null;\n\t\tlet htmlCol: HTMLCollection = element.children;\n\t\tfor (let i = 0; i < Object.keys(htmlCol).length; i++) {\n\t\t\tlet key = Object.keys(htmlCol)[i];\n\n\t\t\tlet htmlElem = htmlCol[key];\n\t\t\tif (htmlElem.children && htmlElem.children.length) {\n\t\t\t\tfoundElement = this.recursiveFindFirstElement(htmlElem);\n\t\t\t}\n\t\t\telse if (htmlElem.tagName === 'BUTTON' && htmlElem.classList.contains('close')) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if ((htmlElem.tagName === 'BUTTON' || htmlElem.tagName === 'INPUT' || htmlElem.tagName === 'SELECT' || htmlElem.tagName === 'TEXTAREA') && !htmlElem.hidden && !htmlElem.disabled) {\n\t\t\t\treturn htmlElem;\n\t\t\t}\n\n\t\t\tif (foundElement) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn foundElement;\n\t}\n\n\tonSelectItem(index: number) {\n\t\tif (!this.multiple) {\n\t\t\tif (this.objects[index] === this.selectedItem) {\n\t\t\t\tthis.selectedItem = null;\n\t\t\t\tthis.selectedIndex = null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.selectedItem = this.objects[index];\n\t\t\t\tthis.selectedIndex = index;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (this.selectedItems.some(a => a.value === this.objects[index].value)) {\n\t\t\t\tthis.selectedIndexes.splice(this.selectedIndexes.indexOf(index), 1);\n\t\t\t\tthis.selectedItems.splice(this.selectedItems.map(a => a.value).indexOf(this.objects[index].value), 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.selectedIndexes.push(index);\n\t\t\t\tthis.selectedItems.push(this.objects[index]);\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Injectable } from '@angular/core';\nimport { NgbModal, NgbModalOptions } from '@ng-bootstrap/ng-bootstrap';\nimport { DialogNotifyContent } from './dialog.notify.content';\nimport { DialogInputContent } from './dialog.input.content';\nimport { DialogErrorContent } from './dialog.error.content';\nimport { DialogConfirmContent } from './dialog.confirm.content';\nimport { DialogSelectDateTimeContent } from './dialog.select-datetime.content';\nimport { DialogInputFieldModel, DialogSelectWithButtonsOptionModel } from '../../models/dialog.model';\nimport { DialogSelectDataLabelsContent } from './dialog.select-data-labels.content';\nimport { DialogLoginContent } from './dialog.login.content';\nimport { DialogRegisterContent } from './dialog.register.content';\nimport { DialogSelectWithButtonsURLContent } from './dialog.select-with-buttons-url.content';\nimport { DialogSelectArrayObjsContent } from './dialog.select-array-objs.content';\nimport { UserModel } from '../../models/user.model';\n\n@Injectable()\nexport class DialogService {\n\n\tconstructor(private modalService: NgbModal) { }\n\n\topenDialog(content, options: NgbModalOptions = {size: 'lg', backdrop: 'static'}) {\n\t\treturn this.modalService.open(content, options);\n\t}\n\n\tnotify(msg: string) {\n\t\tconst modalRef = this.openDialog(DialogNotifyContent);\n\t\tmodalRef.componentInstance.title = 'Notify';\n\t\tmodalRef.componentInstance.body = msg;\n\t}\n\n\tinput(title: string, inputFields: DialogInputFieldModel[]) {\n\t\tconst modalRef = this.openDialog(DialogInputContent);\n\t\tmodalRef.componentInstance.title = title;\n\t\tmodalRef.componentInstance.inputFields = inputFields;\n\t\treturn modalRef.result;\n\t}\n\n\terror(msg: string) {\n\t\tconst modalRef = this.openDialog(DialogErrorContent);\n\t\tmodalRef.componentInstance.title = 'Error';\n\t\tmodalRef.componentInstance.body = msg;\n\t}\n\n\tconfirm(msg: string, html?: string) {\n\t\tconst modalRef = this.openDialog(DialogConfirmContent);\n\t\tmodalRef.componentInstance.title = 'Confirm';\n\t\tmodalRef.componentInstance.body = msg;\n\t\tmodalRef.componentInstance.html = html;\n\t\treturn modalRef.result;\n\t}\n\n\tselectDateTime(date: Date) {\n\t\tconst modalRef = this.openDialog(DialogSelectDateTimeContent);\n\t\tmodalRef.componentInstance.title = 'Select Date and Time';\n\t\tmodalRef.componentInstance.date = date;\n\t\treturn modalRef.result;\n\t}\n\t\n\tselectDataLabel(data: any, showArraySubData = true) {\n\t\tconst modalRef = this.openDialog(DialogSelectDataLabelsContent, {size: 'sm', backdrop: 'static'});\n\t\tmodalRef.componentInstance.title = 'Select Data Labels';\n\t\tmodalRef.componentInstance.data = data;\n\t\tmodalRef.componentInstance.showArraySubData = showArraySubData;\n\t\treturn modalRef.result;\n\t}\n\n\tlogin(msAllowed: boolean) {\n\t\tconst modalRef = this.openDialog(DialogLoginContent);\n\t\tmodalRef.componentInstance.msAllowed = msAllowed;\n\t\treturn modalRef.result;\n\t}\n\n\tregister() {\n\t\tconst modalRef = this.openDialog(DialogRegisterContent);\n\t\treturn modalRef.result;\n\t}\n\n\tselectWithButtonsURL(url: string) {\n\t\tconst modalRef = this.openDialog(DialogSelectWithButtonsURLContent);\n\t\tmodalRef.componentInstance.url = url;\n\t\treturn modalRef.result;\n\t}\n\n\tselectWithArrayObjs(title: string, objects: DialogSelectWithButtonsOptionModel[], multiple = false, allowNone = false) {\n\t\tconst modalRef = this.openDialog(DialogSelectArrayObjsContent);\n\t\tmodalRef.componentInstance.title = title;\n\t\tmodalRef.componentInstance.objects = objects;\n\t\tmodalRef.componentInstance.multiple = multiple;\n\t\tmodalRef.componentInstance.allowNone = allowNone;\n\t\treturn modalRef.result;\n\t}\n}","import { DialogService } from '../widgets/dialog/dialog.service';\nimport { AccountManagerService } from '../account-manager.service';\nimport { AlertService } from '../widgets/alert/alert.service';\nimport { Injectable } from '@angular/core';\nimport { Validators } from '@angular/forms';\n\nimport { UserModel } from '../models/user.model';\n\nimport { ValidationService } from '../util/validation.service';\nimport { SocketManagerService } from '../socket-manager.service';\n\nimport { UserAgentApplication } from 'msal';\n\n\n@Injectable()\nexport class AuthService {\n\tenvironment = null;\n\tuserHasPhoneNumber = false;\n\n\tuserData;\n userAgentApplication;\n\n\tconstructor(private _ds: DialogService, private _vs: ValidationService, private _alert: AlertService, private _account: AccountManagerService, private _socket: SocketManagerService) {}\n\n\tsetupMSSingleSignOn(environment) {\n\t\tthis.environment = environment;\n\n\t\tif (window.location.pathname === '/auth365' && window.location.hash && window.location.hash.startsWith('#id_token=')) {\n\t\t\tthis.environment.MS_id_token = window.location.hash.replace('#', '');\n\t\t} \n\n\t\tthis.userAgentApplication = new UserAgentApplication({\n\t\t\tauth: {\n\t\t\t\tclientId: this.environment.MS_clientId, \n\t\t\t\tauthority: this.environment.MS_authority,\n\t\t\t\tredirectUri: this.environment.MS_redirectUri,\n\t\t\t\tvalidateAuthority: false,\n\t\t\t\tnavigateToLoginRequestUrl: false\n\t\t\t},\n\t\t\tframework: {isAngular: true}\n\t\t});\n\t}\n\n\tsetUserHasPhoneNumber(value: boolean) {\n\t\tthis.userHasPhoneNumber = value;\n\t}\n\n\tregisterUser(other: Object, sendEnrollmentEmail = true) {\n\t\treturn new Promise((resolve, reject) => {\n\n\t\t\tlet inputProps: any[] = [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'User Name',\n\t\t\t\t\tform: 'username',\n\t\t\t\t\tdata: '',\n\t\t\t\t\tvalidators: [Validators.required],\n\t\t\t\t\tvalidatorErrors: ['required'],\n\t\t\t\t\tvalidatorMsg: ['Username is required'],\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Full Name',\n\t\t\t\t\tform: 'fullname',\n\t\t\t\t\tdata: '',\n\t\t\t\t\tvalidators: [Validators.required],\n\t\t\t\t\tvalidatorErrors: ['required'],\n\t\t\t\t\tvalidatorMsg: ['Full name is required'],\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Email',\n\t\t\t\t\tform: 'email',\n\t\t\t\t\tdata: '',\n\t\t\t\t\tvalidators: [Validators.required, this._vs.email],\n\t\t\t\t\tvalidatorErrors: ['required', 'email'],\n\t\t\t\t\tvalidatorMsg: ['Email is required', 'Email is invalid'],\n\t\t\t\t\trequired: true\n\t\t\t\t}\n\t\t\t];\n\n\t\t\tif (this.userHasPhoneNumber) {\n\t\t\t\tinputProps.push({\n\t\t\t\t\tlabel: 'Phone',\n\t\t\t\t\tform: 'phonenumber',\n\t\t\t\t\tdata: '',\n\t\t\t\t\tvalidators: [this._vs.phoneNumber],\n\t\t\t\t\tvalidatorErrors: ['phoneNumber'],\n\t\t\t\t\tvalidatorMsg: ['Phone number is invalid'],\n\t\t\t\t\ttype: 'text'\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis._ds.input('Register New User', inputProps).then(close => {\n\t\t\t\tlet user: UserModel = {\n\t\t\t\t\tusername: close.username.value.trim(),\n\t\t\t\t\temail: close.email.value.trim(),\n\t\t\t\t\tfullname: close.fullname.value.trim(),\n\t\t\t\t\troles: {\n\t\t\t\t\t\tsuper_admin: false,\n\t\t\t\t\t\tapprovals: [],\n\t\t\t\t\t\tgroups: [],\n\t\t\t\t\t\tnotifications: [],\n\t\t\t\t\t\tmiscs: []\n\t\t\t\t\t},\n\t\t\t\t\tactive: true,\n\t\t\t\t\treadonly: false,\n\t\t\t\t\tphonenumber: close.phonenumber ? close.phonenumber.value : '',\n\t\t\t\t\tother: other,\n\t\t\t\t\tattempts: 0,\n\t\t\t\t\tsalt: '',\n\t\t\t\t\thash: ''\n\t\t\t\t};\n\n\t\t\t\tthis._socket.call('createUserAndEmailEnrollment', user, sendEnrollmentEmail, (err, res) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\tthis._socket.call('insertErrorLog', 'AuthService - createUserAndEmailEnrollment', [\n\t\t\t\t\t\t\t{email: close.email.value, username: close.username.value, profile: {fullname: close.fullname.value, status: 'active'}},\n\t\t\t\t\t\t\terr\n\t\t\t\t\t\t]);\n\n\t\t\t\t\t\treject(err);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tresolve(res);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t\t\tdismiss => reject()\n\t\t\t);\n\t\t});\n\t}\n\n\teditUser(user: UserModel) {\n\n\t\tlet inputProps: any[] = [\n\t\t\t{\n\t\t\t\tlabel: 'User Name',\n\t\t\t\tform: 'username',\n\t\t\t\tdata: user.username,\n\t\t\t\tvalidators: [Validators.required],\n\t\t\t\tvalidatorErrors: ['required'],\n\t\t\t\tvalidatorMsg: ['Username is required'],\n\t\t\t\trequired: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'Full Name',\n\t\t\t\tform: 'fullname',\n\t\t\t\tdata: user.fullname,\n\t\t\t\tvalidators: [Validators.required],\n\t\t\t\tvalidatorErrors: ['required'],\n\t\t\t\tvalidatorMsg: ['Full name is required'],\n\t\t\t\trequired: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'Email',\n\t\t\t\tform: 'email',\n\t\t\t\tdata: user.email,\n\t\t\t\tvalidators: [Validators.required, this._vs.email],\n\t\t\t\tvalidatorErrors: ['required', 'email'],\n\t\t\t\tvalidatorMsg: ['Email is required', 'Email is invalid'],\n\t\t\t\trequired: true\n\t\t\t}\n\t\t];\n\n\t\tif (this.userHasPhoneNumber) {\n\t\t\tinputProps.push({\n\t\t\t\tlabel: 'Phone',\n\t\t\t\tform: 'phonenumber',\n\t\t\t\tdata: user['phonenumber'] || '',\n\t\t\t\tvalidators: [this._vs.phoneNumber],\n\t\t\t\tvalidatorErrors: ['phoneNumber'],\n\t\t\t\tvalidatorMsg: ['Phone number is invalid'],\n\t\t\t\ttype: 'text'\n\t\t\t});\n\t\t}\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._ds.input(\n\t\t\t\t'Edit User', inputProps\n\t\t\t).then(close => {\n\n\t\t\t\tif (close.phonenumber && close.phonenumber.value) {\n\t\t\t\t\tuser['phonenumber'] = close.phonenumber.value;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tuser['phonenumber'] = '';\n\t\t\t\t}\n\n\t\t\t\tuser.email = close.email.value.trim();\n\n\t\t\t\tthis._socket.call('editUser', user._id, close.username.value.trim(), close.fullname.value.trim(), close.email.value.trim(), user['phonenumber'], (err, res) => {\n\t\t\t\t\t\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\tthis._socket.call('insertErrorLog', 'AuthService - edituser', [\n\t\t\t\t\t\t\tuser,\n\t\t\t\t\t\t\terr\n\t\t\t\t\t\t]);\n\n\t\t\t\t\t\treject(err);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlet updatedData = {\n\t\t\t\t\t\t\tusername: close.username.value.trim(),\n\t\t\t\t\t\t\tfullname: close.fullname.value.trim(),\n\t\t\t\t\t\t\temail: close.email.value.trim()\n\t\t\t\t\t\t};\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis._alert.setAlert('success', 'User has been edited');\n\t\t\t\t\t\tresolve(updatedData);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t\t\tdismiss => { resolve(true); }\n\t\t\t);\n\t\t});\n\t}\n\n\tloginUser(): Promise<any> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.loginModal().then(\n\t\t\t\tclose => {\n\t\t\t\t\tif (close.type === 'MS') {\n\t\t\t\t\t\tthis.microsoftSignOn();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (!close.form.value.forgotPassword) {\n\t\t\t\t\t\t\tthis._account.logIn(close.form.value.username, close.form.value.password).then(user => {\n\t\t\t\t\t\t\t\tresolve(user);\n\t\t\t\t\t\t\t}, errUser => reject('Invalid login'));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis._account.resetUserPassword(close.form.value.username);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tdismiss => reject()\n\t\t\t);\n\t\t});\n\t}\n\n\tprivate microsoftSignOn() {\n var graphScopes = [\"user.read\", \"mail.send\"];\n this.userAgentApplication.loginRedirect(graphScopes);\n }\n\n\tprivate loginModal() {\n\t\treturn this._ds.login(!this.environment || !this.environment.MS_ALLOWED ? false : true);\n\t}\n\n\tremoveUser(id: string) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._socket.call('removeDocument', 'users', id, (err, res) => {\n\t\t\t\tif (err) {\n\t\t\t\t\tthis._ds.error('Could not remove user');\n\t\t\t\t\tthis._socket.call('insertErrorLog', 'AuthService - removeUser', [\n\t\t\t\t\t\tid,\n\t\t\t\t\t\terr\n\t\t\t\t\t]);\n\t\t\t\t\treject(err);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tresolve(true);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n}\n","import { Injectable } from '@angular/core';\nimport { ModulePermissionModel } from '../models/permission.model';\n\n@Injectable()\nexport class AuthPermissionService {\n\n\tmodules: ModulePermissionModel[] = [];\n\n\tconstructor() {}\n\t\n\tregisterModule(modulePermission: ModulePermissionModel) {\n\t\tthis.modules.push(modulePermission);\n\t\tthis.modules.sort((a, b) => {\n\t\t\tlet x = a.name;\n\t\t\tlet y = b.name;\n\t\t\treturn ((x < y) ? -1 : ((x > y ) ? 1 : 0));\n\t\t});\n\t}\n\n\tgetAllModulePermissions() {\n\t\treturn this.modules;\n\t}\n}\n","import { Directive, HostListener, Output, EventEmitter, Input } from '@angular/core';\n\nexport type ScrollEvent = {\n isReachingBottom: boolean,\n isReachingTop: boolean,\n originalEvent: Event,\n isWindowEvent: boolean\n};\n\ndeclare const window: Window;\n\n@Directive({\n selector: '[detect-scroll]'\n})\nexport class ScrollDirective {\n @Output() public onScroll = new EventEmitter<ScrollEvent>();\n @Input() public bottomOffset: number = 100;\n @Input() public topOffset: number = 100;\n\n constructor() { }\n\n // handle host scroll\n @HostListener('scroll', ['$event']) public scrolled($event: Event) {\n this.elementScrollEvent($event);\n }\n\n // handle window scroll\n @HostListener('window:scroll', ['$event']) public windowScrolled($event: Event) {\n this.windowScrollEvent($event);\n }\n\n protected windowScrollEvent($event: Event) {\n const target = <Document>$event.target;\n const scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;\n const isReachingTop = scrollTop < this.topOffset;\n const isReachingBottom = ( target.body.offsetHeight - (window.innerHeight + scrollTop) ) < this.bottomOffset;\n const emitValue: ScrollEvent = {isReachingBottom, isReachingTop, originalEvent: $event, isWindowEvent: true};\n this.onScroll.emit(emitValue);\n }\n\n protected elementScrollEvent($event: Event) {\n const target = <HTMLElement>$event.target;\n const scrollPosition = target.scrollHeight - target.scrollTop;\n const offsetHeight = target.offsetHeight;\n const isReachingTop = target.scrollTop < this.topOffset;\n const isReachingBottom = (scrollPosition - offsetHeight) < this.bottomOffset;\n const emitValue: ScrollEvent = {isReachingBottom, isReachingTop, originalEvent: $event, isWindowEvent: false};\n this.onScroll.emit(emitValue);\n }\n\n}","import { BaseComponent, ProviderService } from '../../resolveio-class';\nimport { UserModel } from '../../models/user.model';\nimport { Component, Input, QueryList, AfterViewInit, ViewChildren, ViewChild, ElementRef, OnInit } from '@angular/core';\n\nimport { AuthService } from '../../auth/auth.service';\nimport { Validators } from '@angular/forms';\nimport { NavbarMainTabModel } from '../../models/navbar-main-tab.model';\nimport { DialogService } from '../dialog/dialog.service';\nimport { CoreService } from '../../core.service';\n\n@Component({\n\tselector: 'navbar-main',\n\ttemplateUrl: './navbar-main.component.html',\n\tproviders: [ProviderService]\n})\nexport class NavbarMainComponent extends BaseComponent implements OnInit, AfterViewInit {\n\n\t@ViewChildren('dropdowns') dropdowns: QueryList<any>;\n\t@ViewChild('scrollable', {static: true}) scrollable: ElementRef;\n\n\t@Input('logo') logo = '';\n\t@Input('navTabs') navTabs: NavbarMainTabModel[] = [];\n\t@Input('fontSize') fontSize = 12;\n\n\tuser: UserModel = null;\n\tcollapseShowing = false;\n\n\tclient = '';\n\n\tisResolveIO = false;\n\tstandardProgram = false;\n\ttourStarted = false;\n\n\tscrollRightInterval = null;\n\tscrollLeftInterval = null;\n\tisDemo = false;\n\n\tconstructor(private _services: ProviderService, private auth: AuthService, private _ds: DialogService, private _app: CoreService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis._services._account.user.subscribe(user => {\n\t\t\tthis.user = user;\n\t\t});\n\n\t\tthis.client = this._app.client.getValue();\n\t\tthis.standardProgram = this._app.standardProgram.getValue();\n\t\tthis.tourStarted = this._services._app.tourStarted.getValue();\n\n\t\tif (!this.client) {\n\t\t\tthis.isResolveIO = true;\n\t\t}\n\n\t\tthis._services._app.tourStarted.subscribe(tourStarted => {\n\t\t\tthis.tourStarted = tourStarted;\n\t\t});\n\n\t\tthis._services._app.isDemo.subscribe(isDemo => {\n\t\t\tthis.isDemo = isDemo;\n\t\t});\n\t}\n\n\tngAfterViewInit() {\n\t\tsetInterval(() => {\n\t\t\tthis.calculateDropdownsLeft();\n\t\t}, 500);\n\t\tdocument.documentElement.style.setProperty('--font-size', this.fontSize + 'px');\n\t}\n\n\tlogout() {\n\t\tthis._app.isLoggingOut.next(true);\n\t\tthis._services._router.navigateByUrl('/home');\n\t\tthis._services._account.logOut();\n\t}\n\n\tlogin() {\n\t\tthis.auth.loginUser().then(() => {}, err => {});\n\t}\n\n\thasScrolled() {\n\t\tif (this.scrollable.nativeElement.scrollLeft <= 0) {\n\t\t\tthis.stopScrollRight();\n\t\t}\n\n\t\treturn this.scrollable.nativeElement.scrollLeft > 0 ? true : false;\n\t}\n\n\thasMoreScroll() {\n\t\tif (this.scrollable.nativeElement.scrollWidth <= this.scrollable.nativeElement.clientWidth + this.scrollable.nativeElement.scrollLeft) {\n\t\t\tthis.stopScrollLeft();\n\t\t}\n\n\t\treturn this.scrollable.nativeElement.scrollWidth > this.scrollable.nativeElement.clientWidth + this.scrollable.nativeElement.scrollLeft ? true : false;\n\t}\n\n\tstartScrollRight() {\n\t\tthis.scrollRightInterval = setInterval(() => {\n\t\t\tthis.scrollable.nativeElement.scrollLeft -= 1;\n\t\t}, 1);\n\t}\n\n\tstopScrollRight() {\n\t\tclearInterval(this.scrollRightInterval);\n\t}\n\n\tscrollRightOnce() {\n\t\tthis.scrollable.nativeElement.scrollLeft -= 50;\n\t}\n\n\tstartScrollLeft() {\n\t\tthis.scrollLeftInterval = setInterval(() => {\n\t\t\tthis.scrollable.nativeElement.scrollLeft += 1;\n\t\t}, 1);\n\t}\n\n\tstopScrollLeft() {\n\t\tclearInterval(this.scrollLeftInterval);\n\t}\n\n\tscrollLeftOnce() {\n\t\tthis.scrollable.nativeElement.scrollLeft += 50;\n\t}\n\t\n\tcalculateDropdownsLeft() {\n\t\tif (this.dropdowns && this.dropdowns.toArray() && this.dropdowns.toArray().length && this.scrollable) {\n\t\t\tthis.navTabs.filter(a => a.type === 'dropdown').forEach(tab => {\n\t\t\t\tlet dropDown = this.dropdowns.toArray().filter(a => a.nativeElement.innerText.split('\\n')[0].replace(/[^A-Za-z0-9]/g, '') === tab.label.replace(/[^A-Za-z0-9]/g, ''))[0];\n\n\t\t\t\tif (dropDown) {\n\t\t\t\t\ttab.left = Math.max(dropDown.nativeElement.offsetLeft - this.scrollable.nativeElement.scrollLeft, this.scrollable.nativeElement.offsetLeft);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttab.left = 0;\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tisInRole(role: any) {\n\t\tif (this.isSuperAdmin()) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (this.user) {\n\t\t\tif ((<any>this.user.roles).groups) {\n\t\t\t\tfor (let i = 0; i < (<any>this.user.roles).groups.length; i++) {\n\t\t\t\t\tlet group = (<any>this.user.roles).groups[i];\n\t\t\t\t\tfor (let j = 0; j < group.views.length; j++) {\t\n\t\t\t\t\t\tlet view = group.views[j];\n\t\t\t\t\t\tif (view === role || view.startsWith(role + '/')) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tisSuperAdmin() {\n\t\treturn this.user && this.user.roles ? (<any>this.user.roles).super_admin : false;\n\t}\n\n\tisInOneRole(roles: string[]) {\n\t\tif (this.isSuperAdmin()) {\n\t\t\treturn true;\n\t\t}\n\n\t\tfor (let i = 0; i < roles.length; i++) {\n\t\t\tlet role = roles[i];\n\n\t\t\tif (this._services._account.isUserInView(role)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tnavigateTo(route: string) {\n\t\tthis._services._router.navigateByUrl(route);\n\t}\n\n\thelp() {\n\t\tthis._ds.input('What do you need help with?', [\n\t\t\t{\n\t\t\t\tlabel: 'Title of Problem', \n\t\t\t\tform: 'problem_title', \n\t\t\t\tdata: '', \n\t\t\t\tvalidators: [Validators.required],\n\t\t\t\tvalidatorErrors: ['required'],\n\t\t\t\tvalidatorMsg: ['Problem title is required.'],\n\t\t\t\trequired: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'Description of Problem', \n\t\t\t\tform: 'problem_desc', \n\t\t\t\tdata: '', \n\t\t\t\tvalidators: [Validators.required],\n\t\t\t\tvalidatorErrors: ['required'],\n\t\t\t\tvalidatorMsg: ['Problem description is required.'],\n\t\t\t\trequired: true,\n\t\t\t\ttype: 'textarea'\n\t\t\t}\n\t\t]).then(helpRes => {\n\t\t\tthis._services._socket.call('getHelpNotification', this._services._account.getUser().fullname, helpRes.problem_title.value, helpRes.problem_desc.value);\n\t\t}, () => {});\n\t}\n\n\tisCustomer() {\n\t\treturn this._services._account.getUser().other.customers && this._services._account.getUser().other.customers.length ? true : false;\n\t}\n\n\tgetWindowWidth() {\n\t\treturn window.innerWidth;\n\t}\n\n\tprint() {\n\t\twindow.print();\n\t}\n}","<style>\n\t:root {\n --font-size: 12;\n }\n\n\t:host /deep/ * {\n\t\tfont-size: var(--font-size);\n\t}\n\n @media (max-width: 1200px) {\n .navbarMain a {\n font-size: 18px !important;\n }\n }\n @media (min-width: 1200px) {\n .scrollable-x {\n max-width: 60vw;\n overflow-x: auto;\n overflow-y: visible;\n align-items: center;\n }\n\n ::-webkit-scrollbar {\n display: none;\n }\n\n .verticalAlign {\n display: flex;\n align-items: center;\n }\n\n .dropdown {\n position: static;\n }\n }\n\n .navbar li {\n cursor: pointer;\n text-align: center;\n }\n\n .navbar-dark .navbar-nav .nav-link:hover, .navbar-dark .navbar-nav .nav-link:focus {\n color: gray;\n }\n</style>\n\n<div class=\"row\">\n <nav class=\"navbar navbar-expand-xl navbar-dark bg-dark navbarMain\" style=\"width: 100%\">\n <a class=\"navbar-brand\" href=\"#\">\n <img [src]=\"logo\" style=\"width: auto; height: 36px;\" *ngIf=\"!isDemo\">\n </a>\n <button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarMainNav\" aria-controls=\"navbarMainNav\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"navbar-collapse collapse\" id=\"navbarMainNav\">\n <ul class=\"navbar-nav\">\n <li class=\"nav-item\" data-toggle=\"collapse\" data-target=\"#navbarMainNav\" *ngIf=\"!standardProgram\" [style.border-right]=\"getWindowWidth() > 1200 ? '1px solid white' : ''\">\n <a class=\"nav-link\" routerLink=\"home\" [class.disabled]=\"tourStarted ? true : null\" routerLinkActive=\"active\">Home</a>\n </li>\n </ul>\n <div *ngIf=\"hasScrolled()\" (mouseover)=\"startScrollRight()\" (mouseout)=\"stopScrollRight()\" (click)=\"scrollRightOnce()\">\n <i class=\"fa fa-arrow-left\" style=\"color: white; font-size: 20px\"></i>\n </div>\n <ul [ngClass]=\"['navbar-nav', 'scrollable-x']\" #scrollable detect-scroll (onScroll)=\"calculateDropdownsLeft()\">\n <ng-container *ngFor=\"let tab of navTabs; let i = index;\">\n <ng-container *ngIf=\"tab.type === 'link'\">\n <li class=\"nav-item\" *ngIf=\"user && isInRole(tab.links[0].role)\" data-toggle=\"collapse\" [tourAnchor]=\"tab.tourAnchor\" data-target=\"#navbarMainNav\">\n <a class=\"nav-link\" [class.disabled]=\"tourStarted ? true : null\" [routerLink]=\"tab.links[0].routerLink\" routerLinkActive=\"active\">{{tab.links[0].label}}</a>\n </li>\n </ng-container>\n <ng-container *ngIf=\"tab.type === 'dropdown'\">\n <li #dropdowns class=\"nav-item dropdown\" *ngIf=\"user && isInOneRole(tab.roles)\">\n <a class=\"nav-link dropdown-toggle\" [class.disabled]=\"tourStarted ? true : null\" id=\"navbarDropdownAsset\" role=\"button\" [tourAnchor]=\"tab.tourAnchor\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n {{tab.label}}\n </a>\n <div class=\"dropdown-menu bg-dark\" aria-labelledby=\"navbarDropdownAsset\" data-toggle=\"collapse\" data-target=\"#navbarMainNav\" [style.left.px]=\"tab.left || 0\">\n <ng-container *ngFor=\"let link of tab.links\">\n <a class=\"dropdown-item nav-link\" *ngIf=\"user && isInRole(link.role)\" [routerLink]=\"link.routerLink\">{{link.label}}</a>\n </ng-container>\n </div>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n <div *ngIf=\"hasMoreScroll()\" (mouseover)=\"startScrollLeft()\" (mouseout)=\"stopScrollLeft()\" (click)=\"scrollLeftOnce()\">\n <i class=\"fa fa-arrow-right\" style=\"color: white; font-size: 20px\"></i>\n </div>\n <hr />\n <ul [ngClass]=\"['navbar-nav', getWindowWidth() > 1200 ? 'float-lg-right' : '']\">\n <li class=\"nav-item\" *ngIf=\"user\" data-toggle=\"collapse\" data-target=\"#navbarMainNav\" [style.border-left]=\"getWindowWidth() > 1200 ? '1px solid white' : ''\" style=\"height: 30px;\">\n <a class=\"nav-link\" [class.disabled]=\"tourStarted ? true : null\" (click)=\"print()\" style=\"cursor: pointer;\"><i style=\"font-size:20px; color: white;\" class=\"fa fa-print\" aria-hidden=\"true\"></i></a>\n </li>\n <li class=\"nav-item\" *ngIf=\"user && client\" data-toggle=\"collapse\" data-target=\"#navbarMainNav\" style=\"height: 30px;\" tourAnchor=\"supportSection\">\n <a class=\"nav-link\" [class.disabled]=\"tourStarted ? true : null\" routerLink=\"support-ticket\" routerLinkActive=\"active\">Support</a>\n </li>\n <li class=\"nav-item\" *ngIf=\"user && isInRole('super-admin')\" data-toggle=\"collapse\" data-target=\"#navbarMainNav\">\n <a class=\"nav-link\" routerLink=\"logs\" routerLinkActive=\"active\">Logs</a>\n </li>\n <li class=\"nav-item\" *ngIf=\"user && isInRole('super-admin')\" data-toggle=\"collapse\" data-target=\"#navbarMainNav\">\n <a class=\"nav-link\" routerLink=\"super-admin\" routerLinkActive=\"active\">Super Admin</a>\n </li>\n </ul>\n <hr />\n <ul [ngClass]=\"['navbar-nav', getWindowWidth() > 1200 ? 'float-lg-right' : '']\">\n <li class=\"nav-item\" *ngIf=\"!user\" data-toggle=\"collapse\" data-target=\"#navbarMainNav\">\n <a class=\"nav-link\" (click)=\"login()\" style=\"cursor: pointer;\" routerLinkActive=\"active\">Login</a>\n </li>\n <li class=\"nav-item\" *ngIf=\"user\" tourAnchor=\"userSettings\">\n <a class=\"nav-link\" [class.disabled]=\"tourStarted ? true : null\" routerLink=\"user-settings\">Hello {{user.fullname}}!</a>\n </li>\n <li class=\"nav-item\" *ngIf=\"user\" style=\"cursor: pointer\" (click)=\"logout()\" data-toggle=\"collapse\" data-target=\"#navbarMainNav\">\n <a class=\"nav-link\" [class.disabled]=\"tourStarted ? true : null\">Logout</a>\n <li>\n </ul>\n </div>\n </nav>\n</div>","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'filterEqual',\n\tpure: false\n})\nexport class FilterEqualPipe implements PipeTransform { \n\ttransform(items: any[], field: string, value: string): any[] { \n\t\tif (!items) { return []; } \n\t\treturn items.filter(it => it[field] === value);\n\t}\n}\n\n@Pipe({\n\tname: 'filterNotEqual'\n})\nexport class FilterNotEqualPipe implements PipeTransform { \n\ttransform(items: any[], field: string, value: string): any[] { \n\t\tif (!items) { return []; } \n\t\treturn items.filter(it => it[field] !== value);\n\t}\n}\n","import { Component, OnInit, OnDestroy, Input, ChangeDetectorRef } from '@angular/core';\nimport { NavigationEnd, NavigationCancel } from '@angular/router';\nimport { NavbarModel, NavbarTabModel } from './navbar-module.model';\nimport { Subscription } from 'rxjs';\n\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\n\n@Component({\n\tproviders: [ProviderService],\n\tselector: 'navbar-module',\n\ttemplateUrl: './navbar-module.component.html'\n})\n\nexport class NavbarModuleComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\t@Input() sideNavHeight: number;\n\t@Input() sideNavWidth: number;\n\n\tmenuData: NavbarModel = {\n\t\ttitle: '',\n\t\tmodule: null,\n\t\tdescription: null,\n\t\tdescription_name: 'Description',\n\t\ttabs: []\n\t};\n\n\tselectedTab: NavbarTabModel = null;\n\tcurrentRoute: String = '';\n\n\trouterEvents$: Subscription[] = [];\n\ttourStarted = false;\n\n\tconstructor(private _cdRef: ChangeDetectorRef, private _services: ProviderService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\n\t\tthis.tourStarted = this._services._app.tourStarted.getValue();\n\n\t\tthis.routerEvents$.push(this._services._router.events\n\t\t\t//.filter(event => event instanceof NavigationEnd)\n\t\t\t.subscribe((event: NavigationEnd) => {\n\t\t\t\tthis.selectTabFromRouter();\n\t\t\t})\n\t\t);\n\n\t\tthis.routerEvents$.push(this._services._router.events\n\t\t\t//.filter(event => event instanceof NavigationCancel)\n\t\t\t.subscribe((event: NavigationCancel) => {\n\t\t\t\tthis.selectTabFromRouter();\n\t\t\t})\n\t\t);\n\n\t\tthis.routerEvents$.push(this._services._app.navbarModuleData.subscribe(data => {\n\t\t\tthis.menuData = data;\n\n\t\t\tif (!this.selectedTab && this.menuData.tabs.length) {\n\t\t\t\tthis.selectedTab = this.menuData.tabs[0];\n\t\t\t}\n\n\t\t\tif (this.selectedTab) {\n\t\t\t\tfor (let i = 0; i < this.menuData.tabs.length; i++) {\n\t\t\t\t\tlet tabLink = '';\n\t\t\t\t\tif (this.menuData.tabs[i].link.startsWith('/customer-portal/frac') || this.menuData.tabs[i].link.startsWith('/customer-portal/production')) {\n\t\t\t\t\t\ttabLink = this.menuData.tabs[i].link;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttabLink = this.menuData.tabs[i].link.replace(/^(\\/[-a-z]+\\/[^\\/]+)\\/.*$/, '$1');\n\t\t\t\t\t}\n\t\t\t\t\tif (tabLink === this.currentRoute) {\n\t\t\t\t\t\tthis.selectedTab = this.menuData.tabs[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (this.selectedTab === null) {\n\t\t\t\t\tthis.selectedTab = this.menuData.tabs[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\tthis.routerEvents$.push(this._services._app.tourStarted.subscribe(tourStarted => {\n\t\t\tthis.tourStarted = tourStarted;\n\t\t}));\n\t}\n\n\tngOnDestroy() {\n\t\tthis.routerEvents$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\t}\n\n\tselectTabFromRouter() {\n\t\tif (this._services._router.url === '/') {\n\t\t\t\tthis.selectedTab = this.menuData.tabs[0];\n\t\t}\n\t\telse {\n\t\t\tthis.selectedTab = null;\n\t\t\tlet routerLink = '';\n\t\t\t\n\t\t\tif (this._services._router.url.startsWith('/customer-portal/frac') || this._services._router.url.startsWith('/customer-portal/production')) {\n\t\t\t\trouterLink = this._services._router.url;\n\t\t\t}\n\t\t\telse {\n\t\t\t\trouterLink = this._services._router.url.replace(/^(\\/[-a-z]+\\/[^\\/]+)\\/.*$/, '$1');\n\t\t\t}\n\n\t\t\tif (routerLink.includes('?')) {\n\t\t\t\trouterLink = routerLink.substring(0, routerLink.indexOf('?'));\n\t\t\t}\n\n\t\t\tthis.currentRoute = routerLink;\n\n\t\t\tfor (let i = 0; i < this.menuData.tabs.length; i++) {\n\t\t\t\tlet tabLink = '';\n if (this.menuData.tabs[i].link.startsWith('/customer-portal/frac') || this.menuData.tabs[i].link.startsWith('/customer-portal/production')) {\n tabLink = this.menuData.tabs[i].link;\n }\n else {\n tabLink = this.menuData.tabs[i].link.replace(/^(\\/[-a-z]+\\/[^\\/]+)\\/.*$/, '$1');\n }\n if (tabLink === routerLink) {\n this.selectedTab = this.menuData.tabs[i];\n break;\n }\n\t\t\t}\n\t\t\tif (this.selectedTab === null) {\n\t\t\t\tthis.selectedTab = this.menuData.tabs.filter(a => a.link === routerLink)[0] ? this.menuData.tabs.filter(a => a.link === routerLink)[0] : this.menuData.tabs[0];\n\t\t\t}\n\t\t}\n\t}\n\n\ttabClass(tab: NavbarTabModel) {\n\t\tif (this.selectedTab) {\n\t\t\tif (this.selectedTab.label === tab.label) {\n\t\t\t\treturn 'active';\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t}\n\t}\n\n\tnavigateTo(tab: NavbarTabModel) {\n\t\tif (this.selectedTab !== tab) {\n\t\t\tthis.selectedTab = tab;\n\n\t\t\tif (tab.params === null) {\n\t\t\t\tthis._services._router.navigateByUrl(tab.link);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._services._router.navigateByUrl(tab.link + '/' + tab.params);\n\t\t\t}\n\t\t}\n\t}\n}\n","<style>\n .navbarModule li {\n cursor: pointer;\n }\n .navbarModule li.active {\n border-left: 3px solid #d19b3d;\n }\n .navbarModule nav {\n width: 100%;\n }\n\n @media (min-width: 1200px) {\n .navbarModule {\n height: 95vh;\n margin-left: -10px;\n }\n\n hr {\n border-top: white 1px solid;\n }\n }\n\n @media (max-width: 1200px) {\n hr {\n display: none;\n }\n\n .navbarModule a {\n font-size: 18px !important;\n }\n }\n\n \n</style> \n\n<div style=\"margin-left: -15px; margin-right: -15px;\">\n <nav class=\"navbar navbar-expand-xl navbar-dark bg-dark flex-xl-column navbarModule\" [style.height]=\"sideNavHeight ? sideNavHeight + 'px' : ''\" [style.width]=\"sideNavWidth ? sideNavWidth : ''\">\n <div href=\"#\" style=\"color: white; font-size: 16px;\">\n {{ menuData.title }}\n </div>\n <button class=\"navbar-toggler\" type=\"button\" aria-controls=\"#navbarModuleNav\" data-target=\"#navbarModuleNav\" data-toggle=\"collapse\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"navbar-collapse collapse\" id=\"navbarModuleNav\" style=\"align-items:baseline; width: 100%; overflow-y: auto; overflow-x: hidden;\">\n <ul class=\"navbar-nav\" style=\"display: block; float: left; width: 100%;\">\n <div *ngFor=\"let tab of (menuData.tabs | filterNotEqual : 'params' : '0'); let i = index\">\n <div *ngIf=\"tab.params !== null && menuData.tabs[i - 1] && menuData.tabs[i - 1].params === null\">\n <hr>\n <div href=\"#\" style=\"color: white; font-size: 16px;\">\n Selected {{ menuData.module }}\n </div>\n <hr>\n <div style=\"color:white; margin-left: 5px; text-decoration: underline; font-size: 14px\">{{menuData.description_name}}:</div>\n <div style=\"color:white; margin-left: 8px; font-size: 12px\">{{menuData.description}}</div>\n <br />\n </div>\n <li [ngClass]=\"['nav-item', tabClass(tab)]\"data-toggle=\"collapse\" data-target=\"#navbarModuleNav\" [tourAnchor]=\"tab.tourAnchor\">\n <a class=\"nav-link\" [class.disabled]=\"tourStarted ? true : null\" [routerLink]=\"[tab.params ? tab.link + '/' + tab.params : tab.link]\" routerLinkActive=\"active\">{{ tab.label }}</a>\n </li>\n </div>\n </ul>\n </div>\n </nav>\n</div>\n","import { Component, OnInit, ElementRef, ViewChild, Input } from '@angular/core';\nimport { UserModel } from './models/user.model';\nimport { AppStatusModel } from './models/app-status.model';\nimport { DeviceDetectorService } from 'ngx-device-detector';\nimport { ResizeService } from './util/window-resize.service';\nimport { ProviderService, BaseComponent } from './resolveio-class';\nimport { OfflineManagerService } from './offline-manager.service';\nimport { LocalStorageService } from 'ngx-localstorage';\nimport { NavigationEnd } from '@angular/router';\nimport { AuthService } from './auth/auth.service';\nimport { AuthPermissionService } from './auth/auth-permissions.service';\nimport { DialogService } from './widgets/dialog/dialog.service';\n\n@Component({\n\tproviders: [ProviderService],\n\tselector: 'resolveio-client-lib-core',\n\ttemplateUrl: './core.component.html'\n})\nexport class CoreComponent extends BaseComponent implements OnInit {\n\t@Input('environment') environment;\n\t@Input('logo') logo = '';\n\t@Input('navTabs') navTabs = '';\n\t@Input('userHasPhoneNumber') userHasPhoneNumber = false;\n\t@Input('client') client = '';\n\n\t@ViewChild('navBarMain', {read: ElementRef, static: true}) el_navBarMain: ElementRef;\n\t@ViewChild('navBarModule', {read: ElementRef, static: true}) el_navBarModule: ElementRef;\n\n\tyear: string = (new Date()).getFullYear().toString();\n\n\tfullScreen = false;\n\n\twindowSizeHeight = window.innerHeight;\n\twindowSizeWidth = window.innerWidth;\n\n\tnavbarMainHeight = 0;\n\tstatusHeight = 0;\n\tconnectedHeight = 0;\n\tisDevice = false;\n\tshowNavigationMenu = false;\n\t\n\tisConnected = false;\n\tisConnecting = false;\n\tsocketStatus: number;\n\n\tuser: UserModel;\n\tstatus: AppStatusModel;\n\n\tcollapsableMenu = true;\n\tfontSize = 12;\n\topenedWindow = false;\n\n\tisOffline = false;\n\tfoundUpdate = false;\n\n\torientation = 'portrait';\n\n\t// previousRouterErrorHandler = null;\n\n\tconstructor(private _deviceDet: DeviceDetectorService, private _ds: DialogService, private _resizeService: ResizeService, public _services: ProviderService, private _offline: OfflineManagerService, private _storage: LocalStorageService, private _auth: AuthService, private _aps: AuthPermissionService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis._services._app.setEnvironment(this.environment);\n\t\tthis._services._app.setClient(this.client);\n\t\tthis._services._app.setNavTabs(this.navTabs);\n\n\t\tthis._services._account.initLoginManager(this.environment);\n\t\t\n\t\tif (this.environment && this.environment.MS_ALLOWED) {\n\t\t\tthis._auth.setupMSSingleSignOn(this.environment);\n\t\t}\n\n\t\tthis._auth.setUserHasPhoneNumber(this.userHasPhoneNumber);\n\n\t\t// this._services._app.setCustomHomePage(this.customHomePage);\n\n\t\t// this._services._app.setLogo(this.logo);\n\n\t\tthis._resizeService.onResize$.subscribe((val) => {\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.windowSizeHeight = val.innerHeight;\n\t\t\t\tthis.windowSizeWidth = val.innerWidth;\n\t\t\t}, 100);\n\t\t});\n\t\t\n\t\tthis._services._app.fullScreen.subscribe(fullScreen => {\n\t\t\tthis.fullScreen = fullScreen;\n\t\t});\n\n\t\tthis._services._account.user.subscribe(user => {\n\t\t\tif (user && user.settings) {\n\t\t\t\tthis.collapsableMenu = user.settings.collapsable_menu;\n\t\t\t\tthis.fontSize = user.settings.font_size;\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-color', user.settings.warning_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-font-color', user.settings.warning_font_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-shadow-color', '0 0 0 0.2rem ' + hexToRGB(user.settings.warning_color, 0.5));\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-hover-color', user.settings.warning_hover_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--success-color', user.settings.success_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--success-font-color', user.settings.success_font_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--success-shadow-color', '0 0 0 0.2rem ' + hexToRGB(user.settings.success_color, 0.5));\n\t\t\t\tdocument.documentElement.style.setProperty('--success-hover-color', user.settings.success_hover_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-color', user.settings.danger_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-font-color', user.settings.danger_font_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-shadow-color', '0 0 0 0.2rem ' + hexToRGB(user.settings.danger_color, 0.5));\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-hover-color', user.settings.danger_hover_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--info-color', user.settings.info_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--info-font-color', user.settings.info_font_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--info-shadow-color', '0 0 0 0.2rem ' + hexToRGB(user.settings.info_color, 0.5));\n\t\t\t\tdocument.documentElement.style.setProperty('--info-hover-color', user.settings.info_hover_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-color', user.settings.primary_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-font-color', user.settings.primary_font_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-shadow-color', '0 0 0 0.2rem ' + hexToRGB(user.settings.primary_color, 0.5));\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-hover-color', user.settings.primary_hover_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-color', user.settings.secondary_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-font-color', user.settings.secondary_font_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-shadow-color', '0 0 0 0.2rem ' + hexToRGB(user.settings.secondary_color, 0.5));\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-hover-color', user.settings.secondary_hover_color);\n\t\t\t}\n\t\t\telse if (user && (!user.other['customers'] || !user.other['customers'].length) && !user.other['id_customer'] && !user.settings && !this.openedWindow) {\n\t\t\t\tthis.openedWindow = true;\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-color', '#ffc107');\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-font-color', '#000000');\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-shadow-color', '0 0 0 0.2rem rgba(222, 170, 12, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-hover-color', '#e0a800');\n\t\t\t\tdocument.documentElement.style.setProperty('--success-color', '#28a745');\n\t\t\t\tdocument.documentElement.style.setProperty('--success-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--success-shadow-color', '0 0 0 0.2rem rgba(72, 180, 97, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--success-hover-color', '#218838');\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-color', '#dc3545');\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-shadow-color', '0 0 0 0.2rem rgba(225, 83, 97, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-hover-color', '#c82333');\n\t\t\t\tdocument.documentElement.style.setProperty('--info-color', '#17a2b8');\n\t\t\t\tdocument.documentElement.style.setProperty('--info-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--info-shadow-color', '0 0 0 0.2rem rgba(58, 176, 195, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--info-hover-color', '#138496');\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-color', '#007bff');\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-shadow-color', '0 0 0 0.2rem rgba(38, 143, 255, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-hover-color', '#0069d9');\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-color', '#868e96');\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-shadow-color', '0 0 0 0.2rem rgba(130, 138, 145, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-hover-color', '#5a6268');\n\t\t\t\tthis.fontSize = 12;\n\t\t\t\tthis._ds.notify('Hello, ' + user.fullname + ' it looks like there are no user settings saved for you. To adjust your user settings click your name at the top of the page next to the logout button, adjust any settings you want, then click submit to apply them.');\n\t\t\t\tthis._services._router.navigateByUrl(this._services._router.url.split('/')[0] + '/user-settings/settings')\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-color', '#ffc107');\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-font-color', '#000000');\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-shadow-color', '0 0 0 0.2rem rgba(222, 170, 12, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-hover-color', '#e0a800');\n\t\t\t\tdocument.documentElement.style.setProperty('--success-color', '#28a745');\n\t\t\t\tdocument.documentElement.style.setProperty('--success-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--success-shadow-color', '0 0 0 0.2rem rgba(72, 180, 97, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--success-hover-color', '#218838');\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-color', '#dc3545');\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-shadow-color', '0 0 0 0.2rem rgba(225, 83, 97, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-hover-color', '#c82333');\n\t\t\t\tdocument.documentElement.style.setProperty('--info-color', '#17a2b8');\n\t\t\t\tdocument.documentElement.style.setProperty('--info-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--info-shadow-color', '0 0 0 0.2rem rgba(58, 176, 195, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--info-hover-color', '#138496');\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-color', '#007bff');\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-shadow-color', '0 0 0 0.2rem rgba(38, 143, 255, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-hover-color', '#0069d9');\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-color', '#868e96');\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-shadow-color', '0 0 0 0.2rem rgba(130, 138, 145, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-hover-color', '#5a6268');\n\t\t\t\tthis.fontSize = 12;\n\t\t\t}\n\n\t\t\tthis.user = user;\n\t\t});\n\n\t\t// if (!this.previousRouterErrorHandler) {\n\t\t// \tthis.previousRouterErrorHandler = this._services._router.errorHandler;\n\t\t// \tthis._services._router.errorHandler = function (err: any) {\t\n\t\t// \t\treturn this.previousRouterErrorHandler.apply(this.previousRouterErrorHandler, arguments);\n\t\t// \t};\n\t\t// }\n\n\t\tif (this._deviceDet.isMobile() || this._deviceDet.isTablet()) {\n\t\t\tthis._services._app.setIsDevice(true);\n\t\t\tthis.isDevice = true;\n\t\t}\n\t\telse {\n\t\t\tthis._services._app.setIsDevice(false);\n\t\t\tthis.isDevice = false;\n\t\t}\n\n\t\tif (this.environment.IS_PRODUCTION) {\n\t\t\tthis._services._socket.subscribeBypassRoute('flagWithType', 'newSW').subscribe(flag => {\n\t\t\t\tif (flag) {\n\t\t\t\t\tthis._services._alert.setAlert('info', 'This page will reload once new version has been downloaded', 0);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tthis._offline.offlineMode.subscribe(offline => {\n\t\t\tthis.isOffline = offline;\n\t\t});\n\n\t\tthis._services._account.getSocketStatus().subscribe(status => {\n\t\t\tthis.socketStatus = status;\n\t\t\t\n\t\t\tif (!this.user) {\n\t\t\t\tthis.isConnected = false;\n\t\t\t\tthis.isConnecting = false;\n\n\t\t\t\tthis.connectedHeight = 40;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (this.socketStatus === WebSocket.OPEN) {\n\t\t\t\t\tthis.isConnected = true;\n\t\t\t\t\tthis.isConnecting = false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.isConnected = false;\n\n\t\t\t\t\tif (this.socketStatus === WebSocket.CONNECTING) {\n\t\t\t\t\t\tthis.isConnecting = true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.isConnecting = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!this.isConnected) {\n\t\t\t\t\tthis.connectedHeight = 40;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.connectedHeight = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tthis._services._socket.subscribeBypassRoute('appstatus').subscribe(appstatus => {\n\t\t\tthis.status = appstatus; //OK if not defined\n\t\t\tthis._services._app.setHasStatusMessage(this.status ? true : false);\n\t\t\tthis.statusHeight = this.status ? 40 : 0;\n\t\t});\n\n\t\tsetTimeout(() => {\n\t\t\tthis.navbarMainHeight = this.el_navBarMain.nativeElement.children[0].clientHeight;\n\t\t}, 100);\n\t\t\n\t\tsetTimeout(() => {\n\t\t\tthis.navbarMainHeight = this.el_navBarMain.nativeElement.children[0].clientHeight;\n\t\t}, 1000);\n\n\t\tsetTimeout(() => {\n\t\t\tthis.navbarMainHeight = this.el_navBarMain.nativeElement.children[0].clientHeight;\n\t\t}, 5000);\n\n\t\tif (this.isDevice) {\n\t\t\tlet firstRedirect = false;\n\t\t\tlet lastURL = this._storage.get('lastURL');\n\n\t\t\tthis._services._router.events.subscribe((event: NavigationEnd) => {\n\t\t\t\tif (lastURL && lastURL !== '/' && !firstRedirect) {\n\t\t\t\t\tif (event.url === '' || event.url === '/') {\n\t\t\t\t\t\tthis._services._router.navigateByUrl(lastURL);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfirstRedirect = true;\n\n\t\t\t\tif (event.url) {\n\t\t\t\t\tthis._storage.set('lastURL', event.url);\n\t\t\t\t}\n\t\t\t\telse if (event.urlAfterRedirects) {\n\t\t\t\t\tthis._storage.set('lastURL', event.urlAfterRedirects);\n\t\t\t\t}\t\t\t\t\n\t\t\t});\n\t\t}\n\n\t\tif (['iPad', 'iPhone', 'iPod'].indexOf(navigator.platform) >= 0 && ('standalone' in window.navigator) && (<any>window.navigator).standalone) {\n\t\t\tthis.showNavigationMenu = true;\n\t\t}\n\n\t\twindow.addEventListener('orientationchange', () => {\n\t\t\tif (window.orientation === -90) {\n\t\t\t\tthis.orientation = 'landscape';\n\t\t\t}\n\t\t\tif (window.orientation === 90) {\n\t\t\t\tthis.orientation = 'landscape';\n\t\t\t}\n\t\t\tif (window.orientation === 0) {\n\t\t\t\tthis.orientation = 'portrait';\n\t\t\t}\n\t\t}, true);\n\n\t\tlet mousewheelEvent;\n\n document.addEventListener('focus', function() {\n if (document.activeElement instanceof HTMLElement && document.activeElement.nodeName === 'INPUT' && document.activeElement['type'] === 'number') {\n mousewheelEvent = true;\n document.addEventListener('mousewheel', handleMousewheelEvent, { passive: true });\n }\n }, true);\n\n document.addEventListener('blur', function() {\n if (mousewheelEvent) {\n mousewheelEvent = false;\n document.removeEventListener('mousewheel', handleMousewheelEvent);\n }\n\t\t}, true);\n\t\t\n\t\twindow.addEventListener('dragover', (e) => {\n\t\t\tlet ev = e || event;\n\t\t\tev.preventDefault();\n\t\t}, false);\n\t\t\n\t\twindow.addEventListener('drop', (e) => {\n\t\t\tlet ev = e || event;\n\t\t\tev.preventDefault();\n\t\t}, false);\n\t}\n\n\tgetNavbarModuleHeight() {\n\t\treturn this.el_navBarModule.nativeElement.children[0].clientHeight;\n\t}\n\n\tonPushBackButton() {\n\t\twindow.history.back();\n\t}\n\n\tonPushReloadButton() {\n\t\twindow.location.reload();\n\t}\n\n\tonPushForwardButton() {\n\t\twindow.history.forward();\n\t}\n\n\topenNav() {\n\t\tlet x = document.getElementById('navSid');\n\t\tlet y = document.getElementById('main_cont');\n\t\tif (x.style.width === '40px' && y.style.paddingLeft === '55px') {\n\t\t\tx.style.width = '195px';\n\t\t\ty.style.paddingLeft = '210px';\n\t\t}\n\t\telse {\n\t\t\tx.style.width = '40px';\n\t\t\ty.style.paddingLeft = '55px';\n\t\t}\n\t}\n\t\t\n\tcloseNav() {\n\t\tdocument.getElementById('navSid').style.width = '40px';\n\t\tdocument.getElementById('main_cont').style.paddingLeft = '55px';\t\n\t}\n}\n\nfunction handleMousewheelEvent() {\n\t(<any>document.activeElement).blur();\n}\n\nfunction hexToRGB(hex, alpha) {\n let r = parseInt(hex.slice(1, 3), 16),\n g = parseInt(hex.slice(3, 5), 16),\n b = parseInt(hex.slice(5, 7), 16);\n\n if (alpha) {\n return \"rgba(\" + r + \", \" + g + \", \" + b + \", \" + alpha + \")\";\n } else {\n return \"rgb(\" + r + \", \" + g + \", \" + b + \")\";\n }\n}","<style>\n\t:root {\n --warning-color: #ffc107;\n --warning-font-color: #000000;\n --warning-hover-color: #e0a800;\n --warning-shadow-color: 0 0 0 0.2rem rgba(222, 170, 12, 0.5);\n --success-color: #28a745;\n --success-font-color: #ffffff;\n --success-hover-color: #218838;\n --success-shadow-color: 0 0 0 0.2rem rgba(72, 180, 97, 0.5);\n --danger-color: #dc3545;\n --danger-font-color: #ffffff;\n --danger-hover-color: #c82333;\n --danger-shadow-color: 0 0 0 0.2rem rgba(225, 83, 97, 0.5);\n --info-color: #17a2b8;\n --info-font-color: #ffffff;\n --info-hover-color: #138496;\n --info-shadow-color: 0 0 0 0.2rem rgba(58, 176, 195, 0.5);\n --primary-color: #007bff;\n --primary-font-color: #ffffff;\n --primary-hover-color: #0069d9;\n --primary-shadow-color: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);\n --secondary-color: #868e96;\n --secondary-font-color: #ffffff;\n --secondary-hover-color: #5a6268;\n --secondary-shadow-color: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);\n }\n\n\t:host /deep/ .btn-warning {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-color);\n\t\tborder-color: var(--warning-color);\n\t}\n\t:host /deep/ .btn-warning:focus, .btn-warning.focus {\n\t\tbox-shadow: var(--warning-shadow-color);\n\t}\n\t:host /deep/ .btn-warning:hover {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-hover-color);\n\t\tborder-color: var(--warning-hover-color);\n\t}\n\n\t:host /deep/ .btn-success {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-color);\n\t\tborder-color: var(--success-color);\n\t}\n\t:host /deep/ .btn-success:focus, .btn-success.focus {\n\t\tbox-shadow: var(--success-shadow-color);\n\t}\n\t:host /deep/ .btn-success:hover {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-hover-color);\n\t\tborder-color: var(--success-hover-color);\n\t}\n\n\t:host /deep/ .btn-danger {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-color);\n\t\tborder-color: var(--danger-color);\n\t}\n\t:host /deep/ .btn-danger:focus, .btn-danger.focus {\n\t\tbox-shadow: var(--danger-shadow-color);\n\t}\n\t:host /deep/ .btn-danger:hover {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-hover-color);\n\t\tborder-color: var(--danger-hover-color);\n\t}\n\n\t:host /deep/ .btn-info {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-color);\n\t\tborder-color: var(--info-color);\n\t}\n\t:host /deep/ .btn-info:focus, .btn-info.focus {\n\t\tbox-shadow: var(--info-shadow-color);\n\t}\n\t:host /deep/ .btn-info:hover {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-hover-color);\n\t\tborder-color: var(--info-hover-color);\n\t}\n\n\t:host /deep/ .btn-primary {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-color);\n\t\tborder-color: var(--primary-color);\n\t}\n\t:host /deep/ .btn-primary:focus, .btn-primary.focus {\n\t\tbox-shadow: var(--primary-shadow-color);\n\t}\n\t:host /deep/ .btn-primary:hover {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-hover-color);\n\t\tborder-color: var(--primary-hover-color);\n\t}\n\n\t:host /deep/ .btn-secondary {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-color);\n\t\tborder-color: var(--secondary-color);\n\t}\n\t:host /deep/ .btn-secondary:focus, .btn-secondary.focus {\n\t\tbox-shadow: var(--secondary-shadow-color);\n\t}\n\t:host /deep/ .btn-secondary:hover {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-hover-color);\n\t\tborder-color: var(--secondary-hover-color);\n\t}\n\t\n \t@media print {\n\t \t.dontPrint * {\n\t\t \tdisplay: none !important;\n\t \t}\n\n\t\t.myDivToPrintCs {\n\t\t\tbackground-color: white;\n\t\t\theight: 100%;\n\t\t\twidth: 100%;\n\t\t\tfont-size: 12px;\n\t\t\tline-height: 12px;\n\t\t\tpage-break-after: avoid;\n\t\t\tdisplay: initial;\n\t\t}\n\n\t\t.removeOverflow {\n\t\t\toverflow-y: hidden !important; \n\t\t\theight: 100% !important;\n\t\t}\n \t}\n\n \t.hideThis {\n\t\tdisplay: none !important;\n\t}\n\n\t.navSidbar {\n\t\twidth: 0px;\n\t\tposition: fixed;\n\t\tz-index: 1;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tbackground-color: #343a40;\n\t\toverflow: hidden;\n\t\ttransition: 0.5s;\n\t\tpadding-top: 0px;\n\t}\n\n\t.navSidbar a {\n\t\tpadding: 8px 8px 8px 32px;\n\t\ttext-decoration: none;\n\t\tfont-size: 25px;\n\t\tcolor: #818181;\n\t\tdisplay: block;\n\t\ttransition: 0.3s;\n\t}\n\n\t.navSidbar a:hover {\n\t\tcolor: #f1f1f1;\n\t}\n\n\t.openbtn {\n\t\tbackground-color: #343a40;\n\t\tborder: none;\n\t\tcolor: #fff;\n\t\tpadding: 5px 20px;\n\t\tfont-size: 18px;\n\t\tright: 0;\n\t\ttop: 0px;\n\t\tposition: absolute;\n\t\tz-index: 999999;\n\t\tcursor: pointer;\n\t\tfloat: right;\n\t\theight: 100%;\n\t}\n\n\t.openbtn span {\n\t\tfont-size: 20px;\n\t\tdisplay: block;\n\t\theight: auto;\n\t\twidth: auto;\n\t\ttext-align: center;\n\t\tposition: absolute;\n\t\tleft: 50%;\n\t\ttop: 50%;\n\t\ttransform: translate(-50%, -50%) rotate(-90deg);\n\t\tmargin-top: -55px;\n\t\tletter-spacing: 30px;\n\t}\n\t#main_cont {\n\t\ttransition: padding-left .5s;\n\t}\n\n\t.sid_inr {\n\t\tpadding-left: 25px;\n\t}\n\n</style>\n<div *ngIf=\"isDevice\">\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"/assets/css/tablet.css\">\n</div>\n<div #shell>\n\t<div *ngIf=\"user && (!isConnected || isOffline)\">\n\t\t<div style=\"height: 40px; text-align: center; vertical-align: middle; background-color: red; color: white;\">\n\t\t\t<div style=\"padding-top: 9px; padding-bottom: 9px;\">*** OFFLINE MODE ***</div>\n\t\t</div>\n\t</div>\n\t<div *ngIf=\"!user && (!isConnected || isOffline)\">\n\t\t<div style=\"height: 40px; text-align: center; vertical-align: middle; background-color: red; color: white;\">\n\t\t\t<div style=\"padding-top: 9px; padding-bottom: 9px;\">*** PLEASE LOGIN ***</div>\n\t\t</div>\n\t</div>\n\t<div *ngIf=\"status\">\n\t\t<div style=\"height: 40px; text-align: center; vertical-align: middle; background-color: red; color: white;\">\n\t\t\t<div style=\"padding-top: 9px; padding-bottom: 9px;\">*** {{ status.message }} ***</div>\n\t\t</div>\n\t</div>\n\t<div *ngIf=\"fullScreen\">\n\t\t<router-outlet name=\"jobboardfsoutlet\"></router-outlet>\n\t</div>\n\t<div [ngClass]=\"['container-fluid', fullScreen ? 'hideThis' : '']\" [style.font-size.px]=\"fontSize\">\n\t\t<div class=\"dontPrint\">\n\t\t\t<navbar-main style=\"width: 100%\" tourAnchor=\"navBarMain\" #navBarMain [logo]=\"logo\" [navTabs]=\"navTabs\" [fontSize]=\"fontSize\"></navbar-main>\n\t\t</div>\n\t\t<ng-template ngbModalContainer></ng-template>\n\t\t<div class=\"row\">\n\t\t\t<div id=\"navSid\" [ngClass]=\"['dontPrint', windowSizeWidth > 1200 && collapsableMenu ? 'navSidbar' : 'col-xl-1']\" [style.width]=\"windowSizeWidth > 1200 && collapsableMenu ? 40 + 'px' : 100 + '%'\" [style.margin-top.px]=\"windowSizeWidth > 1200 && collapsableMenu ? navbarMainHeight + statusHeight + connectedHeight : 0\" >\n\t\t\t\t<div class=\"openbtn\" *ngIf=\"windowSizeWidth > 1200 && collapsableMenu\" (mouseenter)=\"openNav()\"><span>MENU</span></div>\n\t\t\t\t<div [ngClass]=\"windowSizeWidth > 1200 && collapsableMenu ? 'sid_inr' : ''\">\n\t\t\t\t\t<navbar-module #navBarModule tourAnchor=\"navBarModule\" [sideNavWidth]=\"windowSizeWidth > 1200 && collapsableMenu ? '90%' : 'auto'\" [sideNavHeight]=\"windowSizeWidth > 1200 && collapsableMenu ? windowSizeHeight - navbarMainHeight - statusHeight - connectedHeight - (showNavigationMenu ? (54 + getNavbarModuleHeight()) : 0) - ((!isDevice || (isDevice && showNavigationMenu)) ? 20 : 0) : ''\"></navbar-module>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div [id]=\"windowSizeWidth > 1200 ? 'main_cont' : 'main_cont_mobile'\" [ngClass]=\"[windowSizeWidth > 1200 && collapsableMenu ? 'col-xl-12' : 'col-xl-11']\" [style.padding-left.px]=\"windowSizeWidth > 1200 && collapsableMenu ? 55 : 0\" (mouseenter)=\"windowSizeWidth > 1200 && collapsableMenu ? closeNav() : null\">\n\t\t\t\t<div style=\"padding-top: 15px; -webkit-overflow-scrolling: touch\" [style.overflow-y]=\"(isDevice && !showNavigationMenu) ? 'initial' : 'scroll'\" [style.height.px]=\"windowSizeHeight - ((isDevice || windowSizeWidth <= 1200) && !showNavigationMenu ? (getNavbarModuleHeight() > 100 ? 0 : getNavbarModuleHeight()) : 0) - navbarMainHeight - statusHeight - connectedHeight - (isDevice && showNavigationMenu ? (54 + (getNavbarModuleHeight() > 100 ? 0 : getNavbarModuleHeight())) : 0) - ((!isDevice || (isDevice && showNavigationMenu)) ? 20 : 0)\" class=\"removeOverflow\">\n\t\t\t\t\t<div [style.height.px]=\"windowSizeHeight + 1 - ((isDevice || windowSizeWidth <= 1200) && !showNavigationMenu ? (getNavbarModuleHeight() > 100 ? 0 : getNavbarModuleHeight()) : 0) - navbarMainHeight - statusHeight - connectedHeight - (isDevice && showNavigationMenu ? (54 + (getNavbarModuleHeight() > 100 ? 0 : getNavbarModuleHeight())) : 0) - ((!isDevice || (isDevice && showNavigationMenu)) ? 60 : 0)\" class=\"removeOverflow\">\n\t\t\t\t\t\t<router-outlet></router-outlet>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div *ngIf=\"isDevice && showNavigationMenu\" style=\"height: 54px; background-color: lightgray; margin-left: -15px; margin-right: -15px;\" class=\"dontPrint\">\n\t\t\t<table style=\"width: 100%\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td style=\"text-align: center\">\n\t\t\t\t\t\t<button type=\"button\" class=\"btn\" style=\"background-color: lightgray\" (click)=\"onPushBackButton()\"><i class=\"fa fa-arrow-left\" style=\"color: black; font-size: 20px\"></i></button>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style=\"text-align: center\">\n\t\t\t\t\t\t<button type=\"button\" class=\"btn\" style=\"background-color: lightgray\" (click)=\"onPushReloadButton()\"><i class=\"fa fa-refresh\" style=\"color: black; font-size: 20px\"></i></button>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style=\"text-align: center\">\n\t\t\t\t\t\t<button type=\"button\" class=\"btn\" style=\"background-color: lightgray\" (click)=\"onPushForwardButton()\"><i class=\"fa fa-arrow-right\" style=\"color: black; font-size: 20px\"></i></button>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</div>\n\t\t<div *ngIf=\"!isDevice\" style=\"text-align: center; height: 20px; font-style: italic; font-weight: bold; background-color: lightgray; margin-left: -15px; margin-right: -15px;\">&copy; {{year}} RESOLVEIO ALL RIGHTS RESERVED</div>\n\t</div>\n</div>\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { dateReviver } from '../util/common.helper';\n\n@Pipe({\n\tname: 'jsonParse',\n\tpure: false\n})\nexport class JsonParsePipe implements PipeTransform { \n\ttransform(value: string): string { \n\t\tlet parse = null;\n\t\tlet error = false;\n\n\t\ttry {\n\t\t\tparse = JSON.parse(value, dateReviver);\n\t\t}\n\t\tcatch (e) {\n\t\t\terror = true;\n\t\t}\n\n\t\tif (error) {\n\t\t\treturn value;\n\t\t}\n\t\t\n\t\treturn JSON.stringify(parse, null, 2);\n\t}\n}","import { Component, OnInit, OnDestroy, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { ProviderService, BaseComponent } from '../resolveio-class';\nimport moment from 'moment';\nimport { DialogService } from '../widgets/dialog/dialog.service';\n\n@Component({\n\tproviders: [ProviderService],\n\ttemplateUrl: './logger.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\n\nexport class LoggerComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\tsubscription$: Subscription[] = [];\n\tlogs: any[] = [];\n\n\tentries_per_page = 25;\n\tpage_num = 1;\n\tlog_cnt = 0;\n\n\tuser = null;\n\tusers = [];\n\n\tdateStartElem;\n\tdateEndElem;\n\ttimeStartElem;\n\ttimeEndElem;\n\tdateStart: Date;\n\tdateEnd: Date;\n\n\tselectedTypes = [];\n\n\tcollection = '';\n\tmethod = '';\n\troute = '';\n\tid_document = '';\n\n\tconstructor(private _services: ProviderService, private _ds: DialogService, private _cd: ChangeDetectorRef) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tif (!this._services._account.getUser().roles.super_admin) {\n\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t}\n\n\t\tthis.subscription$.push(this._services._socket.subscribe('allUsers').subscribe(users => {\n\t\t\tthis.users = users;\n\n\t\t\tthis._cd.detectChanges();\n\t\t}));\n\n\t\tlet jsDateStart = new Date();\n\t\tjsDateStart.setHours(0, 0, 0, 0);\n\t\tlet date_start = new Date(moment(jsDateStart).subtract(10, 'days').toDate());\n\t\tthis.dateStartElem = {year: date_start.getFullYear(), month: date_start.getMonth() + 1, day: date_start.getDate()};\n\t\tthis.timeStartElem = {hour: 0, minute: 0, second: 0};\n\n\t\tlet jsDateEnd = new Date();\n\t\tjsDateEnd.setHours(23, 59, 59, 999);\n\t\tlet date_end = jsDateEnd;\n\t\tthis.dateEndElem = {year: date_end.getFullYear(), month: date_end.getMonth() + 1, day: date_end.getDate()};\n\t\tthis.timeEndElem = {hour: 23, minute: 59, second: 59};\n\n\t\tthis.getLogData();\n\t}\n\n\tngOnDestroy() {\n\t\tthis.subscription$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\t}\n\n\tgetLogData() {\n\t\tthis.dateStart = new Date(this.dateStartElem.year, this.dateStartElem.month - 1, this.dateStartElem.day, this.timeStartElem.hour, this.timeStartElem.minute, this.timeStartElem.second, 0);\n\t\tthis.dateEnd = new Date(this.dateEndElem.year, this.dateEndElem.month - 1, this.dateEndElem.day, this.timeEndElem.hour, this.timeEndElem.minute, this.timeEndElem.second, 999);\n\n\t\tlet query: any = {\n\t\t\t$and: [\n\t\t\t\t{createdAt: {$gte: this.dateStart}},\n\t\t\t\t{createdAt: {$lte: this.dateEnd}}\n\t\t\t]\n\t\t};\n\n\t\tif (!this.selectedTypes.length) {\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tquery.$and.push({type: {$in: this.selectedTypes}});\n\t\t}\n\n\t\tif (this.collection) {\n\t\t\tif (this.collection.includes(',')) {\n\t\t\t\tlet collections = this.collection.split(',').map(a => a.trim()).filter(a => !a.startsWith('!'));\n\t\t\t\tif (collections.length) {\n\t\t\t\t\tquery.$and.push({collection: {$in: collections}});\n\t\t\t\t}\n\n\t\t\t\tlet notCollections = this.collection.split(',').map(a => a.trim()).filter(a => a.startsWith('!'));\n\t\t\t\tnotCollections.forEach(not => {\n\t\t\t\t\tquery.$and.push({collection: {$ne: not.replace('!', '')}});\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (this.collection.startsWith('!')) {\n\t\t\t\t\tquery.$and.push({collection: {$ne: this.collection.replace('!', '').trim()}});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tquery.$and.push({collection: this.collection.trim()});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.method) {\n\t\t\tif (this.method.includes(',')) {\n\t\t\t\tlet methods = this.method.split(',').map(a => a.trim()).filter(a => !a.startsWith('!'));\n\t\t\t\tif (methods.length) {\n\t\t\t\t\tquery.$and.push({method: {$in: methods}});\n\t\t\t\t}\n\n\t\t\t\tlet notMethods = this.method.split(',').map(a => a.trim()).filter(a => a.startsWith('!'));\n\t\t\t\tnotMethods.forEach(not => {\n\t\t\t\t\tquery.$and.push({method: {$ne: not.replace('!', '')}});\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (this.method.startsWith('!')) {\n\t\t\t\t\tquery.$and.push({method: {$ne: this.method.replace('!', '').trim()}});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tquery.$and.push({method: this.method.trim()});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.route) {\n\t\t\tif (this.route.includes(',')) {\n\t\t\t\tlet routes = this.route.split(',').map(a => a.trim()).filter(a => !a.startsWith('!'));\n\t\t\t\tif (routes.length) {\n\t\t\t\t\tquery.$and.push({route: {$in: routes}});\n\t\t\t\t}\n\n\t\t\t\tlet notRoutes = this.route.split(',').map(a => a.trim()).filter(a => a.startsWith('!'));\n\t\t\t\tnotRoutes.forEach(not => {\n\t\t\t\t\tquery.$and.push({route: {$ne: not.replace('!', '')}});\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (this.route.startsWith('!')) {\n\t\t\t\t\tquery.$and.push({route: {$ne: this.route.replace('!', '').trim()}});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tquery.$and.push({route: this.route.trim()});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (this.id_document) {\n\t\t\tif (this.id_document.includes(',')) {\n\t\t\t\tlet id_documents = this.id_document.split(',').map(a => a.trim()).filter(a => !a.startsWith('!'));\n\t\t\t\tif (id_documents.length) {\n\t\t\t\t\tquery.$and.push({id_document: {$in: id_documents}});\n\t\t\t\t}\n\n\t\t\t\tlet notIds = this.id_document.split(',').map(a => a.trim()).filter(a => a.startsWith('!'));\n\t\t\t\tnotIds.forEach(not => {\n\t\t\t\t\tquery.$and.push({id_document: {$ne: not.replace('!', '')}});\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (this.id_document.startsWith('!')) {\n\t\t\t\t\tquery.$and.push({id_document: {$ne: this.id_document.replace('!', '').trim()}});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tquery.$and.push({id_document: this.id_document.trim()});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.user) {\n\t\t\tquery.$and.push({user: this.user});\n\t\t}\n\n\t\tif (typeof(this.entries_per_page) === 'string') {\n\t\t\tthis.entries_per_page = parseInt(this.entries_per_page);\n\t\t}\n\t\t\n\t\tthis._services._socket.call('findWithOptions', 'logs', query, {sort: {createdAt: -1}, limit: this.entries_per_page, skip: this.entries_per_page * (this.page_num - 1)}, (err, res) => {\n\t\t\tthis.logs = res;\n\n\t\t\tthis._cd.detectChanges();\n\t\t});\n\n\t\tthis._services._socket.call('countCollectionWithQuery', 'logs', query, (err, res) => {\n\t\t\tthis.log_cnt = res;\n\n\t\t\tthis._cd.detectChanges();\n\t\t});\n\n\t\tthis._cd.detectChanges();\n\t}\n\n\tselectType(type: string) {\n\t\tif (type !== 'all') {\n\t\t\tif (this.selectedTypes.includes(type)) {\n\t\t\t\tthis.selectedTypes.splice(this.selectedTypes.indexOf(type), 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.selectedTypes.push(type);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (this.selectedTypes.length === 7) {\n\t\t\t\tthis.selectedTypes = [];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.selectedTypes = ['error', 'document', 'query', 'queryResponse', 'client-request', 'client-response', 'callMethodInternal'];\n\t\t\t}\n\t\t}\n\n\t\tthis.logs = [];\n\n\t\tif (this.selectedTypes.length) {\n\t\t\tthis.getLogData();\n\t\t}\n\t}\n\n\ticon(type) {\n\t\tif (type === 'error') {\n\t\t\treturn 'danger';\n\t\t}\n\t\telse if (type === 'document') {\n\t\t\treturn 'info';\n\t\t}\n\t\telse if (type === 'client-response') {\n\t\t\treturn 'success';\n\t\t}\n\t\telse if (type === 'client-request') {\n\t\t\treturn 'primary';\n\t\t}\n\t\telse {\n\t\t\treturn 'secondary';\n\t\t}\n\t}\n\n\tremoveAllLogs() {\n\t\tthis._ds.confirm('Are you sure you want to delete all logs?').then(() => {\n\t\t\tthis._services._socket.call('removeAllDocuments', 'logs');\n\t\t}, () => { });\n\t}\n}\n","<style>\n\t.label-accordion {\n\t\tfont-weight: bold;\n\t\tcolor: black;\n\t\tmargin-bottom: 0px;\n\t}\n\tngb-accordion {\n\t\twidth: 100%;\n\t}\n\t.hoverThis:hover {\n\t\tbackground: lightblue;\n\t\tcursor: pointer;\n\t}\n\t\n\t.fa-plus {\n\t\tcolor: black;\n\t}\n\t.fa-minus {\n\t\tcolor: black;\n\t}\n\t\n\t.selected {\n\t\tbackground-color: orange;\n\t}\n\t.selected:hover {\n\t\tcursor: pointer;\n\t}\n\t.card {\n\t\twidth: 100%;\n\t}\n</style>\n\n<div class=\"row\">\n\t<div class=\"col-lg-12\">\n\t\t<div class=\"card\">\n\t\t\t<div class=\"card-header\"><b>Filters</b></div>\n\t\t\t<div class=\"card-body\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t\t\t<responsive-button-group collapseSize=\"900\">\n\t\t\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', selectedTypes.includes('error') && selectedTypes.includes('document') && selectedTypes.includes('query') && selectedTypes.includes('client-request') && selectedTypes.includes('client-response') ? 'btn-success' : 'btn-warning']\" (click)=\"selectType('all')\">All</button>\n\t\t\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', selectedTypes.includes('error') ? 'btn-success' : 'btn-warning']\" (click)=\"selectType('error')\">Errors</button>\n\t\t\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', selectedTypes.includes('document') ? 'btn-success' : 'btn-warning']\" (click)=\"selectType('document')\">Document</button>\n\t\t\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', selectedTypes.includes('query') ? 'btn-success' : 'btn-warning']\" (click)=\"selectType('query')\">Query</button>\n\t\t\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', selectedTypes.includes('queryResponse') ? 'btn-success' : 'btn-warning']\" (click)=\"selectType('queryResponse')\">Query Response</button>\n\t\t\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', selectedTypes.includes('client-request') ? 'btn-success' : 'btn-warning']\" (click)=\"selectType('client-request')\">Client Requests</button>\n\t\t\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', selectedTypes.includes('client-response') ? 'btn-success' : 'btn-warning']\" (click)=\"selectType('client-response')\">Client Responses</button>\n\t\t\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', selectedTypes.includes('callMethodInternal') ? 'btn-success' : 'btn-warning']\" (click)=\"selectType('callMethodInternal')\">Call Method Internal</button>\n\t\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-danger\" (click)=\"removeAllLogs()\">REMOVE ALL LOGS</button>\n\t\t\t\t\t\t</responsive-button-group>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"row\" style=\"margin-top: 10px;\">\n\t\t\t\t\t<div class=\"col-lg-2\">\n\t\t\t\t\t\t<label class=\"form-control-label\">User</label>\n\t\t\t\t\t\t<ng-select [(ngModel)]=\"user\" (change)=\"getLogData()\" placeholder=\"Select User\">\n\t\t\t\t\t\t\t<ng-option *ngFor=\"let user of users\" [value]=\"user.fullname\">{{user.fullname}}</ng-option>\n\t\t\t\t\t\t</ng-select>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"col-lg-2\">\n\t\t\t\t\t\t<label class=\"form-control-label\">Collection</label>\n\t\t\t\t\t\t<input class=\"form-control\" [(ngModel)]=\"collection\" (change)=\"getLogData()\" placeholder=\"Input Colls Sep By , & ! for !Not\">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"col-lg-2\">\n\t\t\t\t\t\t<label class=\"form-control-label\">Method</label>\n\t\t\t\t\t\t<input class=\"form-control\" [(ngModel)]=\"method\" (change)=\"getLogData()\" placeholder=\"Input Methods Sep By , & ! for !Not\">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"col-lg-2\">\n\t\t\t\t\t\t<label class=\"form-control-label\">Route</label>\n\t\t\t\t\t\t<input class=\"form-control\" [(ngModel)]=\"route\" (change)=\"getLogData()\" placeholder=\"Input Routes Sep By , & ! for !Not\">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"col-lg-2\">\n\t\t\t\t\t\t<label class=\"form-control-label\">Document</label>\n\t\t\t\t\t\t<input class=\"form-control\" [(ngModel)]=\"id_document\" (change)=\"getLogData()\" placeholder=\"Input Ids Sep By , & ! for !Not\">\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"row\" style=\"margin-top: 10px;\">\n\t\t\t\t\t<div class=\"col-lg-3\">\n\t\t\t\t\t\t<label class=\"form-control-label\">Date Start</label>\n\t\t\t\t\t\t<div class=\"input-group\">\n\t\t\t\t\t\t\t<input class=\"form-control\" [(ngModel)]=\"dateStartElem\" ngbDatepicker #dStart=\"ngbDatepicker\" (change)=\"getLogData()\">\n\t\t\t\t\t\t\t<div class=\"input-group-append\" (click)=\"dStart.toggle()\">\n\t\t\t\t\t\t\t\t<div class=\"input-group-text\">\n\t\t\t\t\t\t\t\t\t<i class=\"fa fa-calendar\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"col-lg-3\">\n\t\t\t\t\t\t<label class=\"form-control-label\">Time Start</label>\n\t\t\t\t\t\t<ngb-timepicker [(ngModel)]=\"timeStartElem\" meridian=\"ON\" [seconds]=\"true\" (change)=\"getLogData()\"></ngb-timepicker>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"col-lg-3\">\n\t\t\t\t\t\t<label class=\"form-control-label\">Date End</label>\n\t\t\t\t\t\t<div class=\"input-group\">\n\t\t\t\t\t\t\t<input class=\"form-control\" [(ngModel)]=\"dateEndElem\" ngbDatepicker #dEnd=\"ngbDatepicker\" (change)=\"getLogData()\">\n\t\t\t\t\t\t\t<div class=\"input-group-append\" (click)=\"dEnd.toggle()\">\n\t\t\t\t\t\t\t\t<div class=\"input-group-text\">\n\t\t\t\t\t\t\t\t\t<i class=\"fa fa-calendar\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"col-lg-3\">\n\t\t\t\t\t\t<label class=\"form-control-label\">Time End</label><br>\n\t\t\t\t\t\t<ngb-timepicker [(ngModel)]=\"timeEndElem\" meridian=\"ON\" [seconds]=\"true\" (change)=\"getLogData()\"></ngb-timepicker>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n<div class=\"row\">\n\t<div class=\"col-lg-8\">\n\t\t<label class=\"form-control-label\">Entries Per Page</label>\n\t\t<select class=\"form-control\" [(ngModel)]=\"entries_per_page\" (change)=\"getLogData()\">\n\t\t\t<option value=\"10\">10</option>\n\t\t\t<option value=\"25\">25</option>\n\t\t\t<option value=\"50\">50</option>\n\t\t\t<option value=\"100\">100</option>\n\t\t\t<option value=\"250\">250</option>\n\t\t\t<option value=\"500\">500</option>\n\t\t\t<option value=\"1000\">1000</option>\n\t\t\t<option value=\"5000\">5000</option>\n\t\t</select>\n\t</div>\n\t<div class=\"col-lg-4\">\n\t\t<ngb-pagination class=\"float-right\"\n\t\tboundaryLinks=\"true\"\n\t\t[collectionSize]=\"log_cnt\"\n\t\tdirectionLinks=\"true\"\n\t\tellipses=\"false\"\n\t\t[(page)]=\"page_num\"\n\t\tmaxSize=\"6\"\n\t\t[pageSize]=\"entries_per_page\"\n\t\trotate=\"true\"\n\t\t(pageChange)=\"getLogData()\"\n\t\t>\n\t\t</ngb-pagination>\n\t</div>\n</div>\n<div class=\"row\" style=\"margin-top: 10px\">\n\t<ngb-accordion #acc=\"ngbAccordion\" activeIds=\"\">\n\t\t<ngb-panel *ngFor=\"let log of logs; let i = index\" [id]=\"'log_' + i\">\n\t\t\t<ng-template ngbPanelTitle>\n\t\t\t\t<div> \n\t\t\t\t\t<label class=\"label-accordion\" style=\"width: 90%; height: 22px\">\n\t\t\t\t\t\t<strong class=\"pull-left\">Type: {{ log.type }}{{log.method ? ' - Method: ' + log.method : '' }}{{log.collection ? ' - Collection: ' + log.collection : '' }}{{log.user ? ' - User: ' + log.user : '' }}{{log.route ? ' - Route: ' + log.route : '' }}{{log.id_document ? ' - id_document: ' + log.id_document : '' }}{{log.messageId ? ' - messageId: ' + log.messageId : '' }}</strong>\n\t\t\t\t\t\t<p class=\"pull-right\">{{ log.createdAt | date : 'medium' }}</p>\n\t\t\t\t\t</label>\n\t\t\t\t\t<i *ngIf=\"!acc.activeIds.includes('log_' + i)\" class=\"fa fa-plus pull-right\" aria-hidden=\"true\"></i>\n\t\t\t\t\t<i *ngIf=\"acc.activeIds.includes('log_' + i)\" class=\"fa fa-minus pull-right\" aria-hidden=\"true\"></i>\n\t\t\t\t</div>\n\t\t\t</ng-template>\n\t\t\t<ng-template ngbPanelContent>\n\t\t\t\t<div *ngIf=\"log.payload\">\n\t\t\t\t\t<pre>{{ log.payload | jsonParse }}</pre>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf=\"!log.payload\">\n\t\t\t\t\tNo Data\n\t\t\t\t</div>\n\t\t\t</ng-template>\n\t\t</ngb-panel>\n\t</ngb-accordion>\n</div>\n<div class=\"row\" style=\"margin-top: 10px\">\n\t<div class=\"col-lg-4\">\n\t\t<div class=\"row\"> \n\t\t\t<div class=\"col-lg-8\">\n\t\t\t\t<label class=\"form-control-label\">Entries Per Page</label>\n\t\t\t\t<select class=\"form-control\" [(ngModel)]=\"entries_per_page\" (change)=\"getLogData()\">\n\t\t\t\t\t<option value=\"10\">10</option>\n\t\t\t\t\t<option value=\"25\">25</option>\n\t\t\t\t\t<option value=\"50\">50</option>\n\t\t\t\t\t<option value=\"100\">100</option>\n\t\t\t\t\t<option value=\"250\">250</option>\n\t\t\t\t\t<option value=\"500\">500</option>\n\t\t\t\t\t<option value=\"1000\">1000</option>\n\t\t\t\t\t<option value=\"5000\">5000</option>\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class=\"col-lg-8\">\n\t\t<ngb-pagination class=\"float-right\"\n\t\tboundaryLinks=\"true\"\n\t\t[collectionSize]=\"log_cnt\"\n\t\tdirectionLinks=\"true\"\n\t\tellipses=\"false\"\n\t\t[(page)]=\"page_num\"\n\t\tmaxSize=\"6\"\n\t\t[pageSize]=\"entries_per_page\"\n\t\trotate=\"true\"\n\t\t(pageChange)=\"getLogData()\"\n\t\t>\n\t\t</ngb-pagination>\n\t</div>\n</div>","import { AccountManagerService } from '../account-manager.service';\nimport { Injectable } from '@angular/core';\nimport { CanActivate, Router, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\nimport { AuthService } from './auth.service';\nimport { DialogService } from '../widgets/dialog/dialog.service';\nimport { OfflineManagerService } from '../offline-manager.service';\nimport { dateReviver } from '../util/common.helper';\nimport { CoreService } from '../core.service';\nimport { AuthPermissionService } from './auth-permissions.service';\nimport { AlertService } from '../widgets/alert/alert.service';\n\n@Injectable()\nexport class AuthGuard implements CanActivate {\n\n\tredirectUrl: string;\n\n\tconstructor(private _router: Router, \n\t\t\t\tprivate _auth: AuthService, \n\t\t\t\tprivate _ds: DialogService,\n\t\t\t\tprivate _account: AccountManagerService,\n\t\t\t\tprivate _app: CoreService,\n\t\t\t\tprivate _offline: OfflineManagerService,\n\t\t\t\tprivate _aps: AuthPermissionService,\n\t\t\t\tprivate _alert: AlertService) \n\t{}\n\t\n\tcanActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean>|boolean {\n\t\treturn new Promise((resolve) => {\n\t\t\tthis._account.isInitCompleted().then(() => {\n\t\t\t\tlet user = this._account.getUser();\n\n\t\t\t\tif (!user) {\n\t\t\t\t\tuser = JSON.parse(this._offline.getUser(), dateReviver);\n\t\t\t\t\tif (user) {\n\t\t\t\t\t\tthis._account.setUser(user);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!user) {\n\t\t\t\t\tif (navigator.onLine) {\n\t\t\t\t\t\tthis._auth.loginUser().then(newUser => {\n\t\t\t\t\t\t\tthis._account.isLoginCompleted().then(() => {\n\t\t\t\t\t\t\t\tuser = this._account.getUser();\n\n\t\t\t\t\t\t\t\tif (!user.active) {\n\t\t\t\t\t\t\t\t\tthis._router.navigateByUrl('/home');\n\t\t\t\t\t\t\t\t\tresolve(false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tlet view = state.url.replace(/^(\\/[-a-z]+\\/[^\\/]+)\\/.*$/, '$1').replace(/\\?.+/, '');\n\t\t\t\t\t\t\t\t\tlet moduleView = view.replace(/^(\\/.*\\/).*/, '$1');\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ((<any>user.roles).super_admin) {\n\t\t\t\t\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (!(<any>user.roles).groups.filter(a => a.views.filter(b => b.startsWith(view)).length).length) {\n\t\t\t\t\t\t\t\t\t\tif ((<any>user.roles).groups.filter(a => a.views.filter(b => b.startsWith(moduleView) && !this.doesLinkHaveParameter(b)).length).length) {\n\t\t\t\t\t\t\t\t\t\t\tlet link = (<any>user.roles).groups.filter(a => a.views.filter(b => b.startsWith(moduleView) && !this.doesLinkHaveParameter(b)).length)[0].views.filter(a => a.startsWith(moduleView) && !this.doesLinkHaveParameter(a))[0];\n\t\t\t\t\t\t\t\t\t\t\tthis._router.navigateByUrl(link);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tthis._router.navigateByUrl('/home');\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tresolve(false);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}, () => {\n\t\t\t\t\t\t\tthis._router.navigateByUrl('/home');\n\t\t\t\t\t\t\tresolve(false);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (!user.active) {\n\t\t\t\t\t\tthis._router.navigateByUrl('/home');\n\t\t\t\t\t\tresolve(false);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlet view = state.url.replace(/^(\\/[-a-z]+\\/[^\\/]+)\\/.*$/, '$1').replace(/\\?.+/, '');\n\t\t\t\t\t\tlet moduleView = view.replace(/^(\\/.*\\/).*/, '$1');\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ((<any>user.roles).super_admin) {\n\t\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (!(<any>user.roles).groups.filter(a => a.views.filter(b => b.startsWith(view)).length).length) {\n\t\t\t\t\t\t\tif ((<any>user.roles).groups.filter(a => a.views.filter(b => b.startsWith(moduleView) && !this.doesLinkHaveParameter(b)).length).length) {\n\t\t\t\t\t\t\t\tlet link = (<any>user.roles).groups.filter(a => a.views.filter(b => b.startsWith(moduleView) && !this.doesLinkHaveParameter(b)).length)[0].views.filter(a => a.startsWith(moduleView) && !this.doesLinkHaveParameter(a))[0];\n\t\t\t\t\t\t\t\tthis._router.navigateByUrl(link);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tthis._router.navigateByUrl('/home');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tresolve(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, () => {});\n\t\t});\n\t}\n\n\tdoesLinkHaveParameter(link: string) {\n\t\tlet permissions = this._aps.getAllModulePermissions();\n\n\t\tfor (let i = 0; i < permissions.length; i++) {\n\t\t\tlet permission = permissions[i];\n\t\t\tfor (let j = 0; j < permission.views.length; j++) {\n\t\t\t\tlet view = permission.views[j];\n\n\t\t\t\tif (view.link === link) {\n\t\t\t\t\tif (view.has_parameter) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n}","import { Injectable } from '@angular/core';\nimport { CanDeactivate } from '@angular/router';\nimport { Observable } from 'rxjs';\n\nexport interface CanComponentDeactivate {\n\tcanDeactivate: () => Observable<boolean> | Promise<boolean> | boolean;\n}\n\n@Injectable()\nexport class CanDeactivateGuard implements CanDeactivate<CanComponentDeactivate> {\n\n\tcanDeactivate(component: CanComponentDeactivate) {\n\t\treturn component.canDeactivate ? component.canDeactivate() : true;\n\t}\n}\n","import { Injectable } from '@angular/core';\n\nfunction getWindow (): any {\n\treturn window;\n}\n\n@Injectable()\nexport class WindowRefService {\n\tget nativeWindow(): any {\n\t\treturn getWindow();\n\t}\n}\n","import { Component, Input } from '@angular/core';\n\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\n\n@Component({\n\tproviders: [ProviderService],\n\tselector: 'user-role',\n\ttemplate: '<ng-container *ngIf=\"userInRole()\"><ng-content></ng-content></ng-container>'\n})\n\nexport class UserRoleComponent extends BaseComponent { \n\t@Input() role: string;\n\n\tconstructor(private _services: ProviderService) {\n\t\tsuper(_services);\n\t}\n\n\tuserInRole() {\n\t\treturn this._services._account.isUserInView(this.role);\n\t}\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { UserRoleComponent } from './user-role.component';\t\t\t\n\n@NgModule({\n\timports: [\n\t\tCommonModule\n\t],\n\texports: [\n\t\tUserRoleComponent\n\t],\n\tdeclarations: [\n\t\tUserRoleComponent\n\t]\n})\nexport class UserRoleModule { }\n","import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common'; \n\nimport { FormButtonComponent } from './form-button.component';\t\t\t\n\n@NgModule({\n\timports: [\n\t\tCommonModule,\n\t\tNgbTooltipModule\n\t],\n\texports: [\n\t\tFormButtonComponent\n\t],\n\tdeclarations: [\n\t\tFormButtonComponent\n\t]\n})\nexport class FormButtonModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ResponsiveButtonGroupComponent } from './responsive-button-group.component';\n\n@NgModule({\n\timports: [\n\t\tCommonModule\n\t],\n\tdeclarations: [\n\t\tResponsiveButtonGroupComponent\n\t],\n\texports: [\n\t\tResponsiveButtonGroupComponent\n\t]\n})\nexport class ResponsiveButtonGroupModule { }\n","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\t\nimport { CommonModule } from '@angular/common';\n\nimport { CollapseTableComponent } from './collapse-table.component';\t\n\nimport { ResizeService } from '../../util/window-resize.service';\n\n@NgModule({\n\timports: [\n\t\tFormsModule,\n\t\tCommonModule\n\t],\n\texports: [\n\t\tCollapseTableComponent\n\t],\n\tdeclarations: [\n\t\tCollapseTableComponent\n\t],\n\tproviders: [\n\t\tResizeService\n\t]\n})\nexport class CollapseTableModule { }\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'phone'\n})\nexport class PhonePipe implements PipeTransform { \n\ttransform(tel: string): string {\n\n\t\tif (!tel) {\n\t\t\treturn '';\n\t\t}\n\n\t\tlet country, city, number;\n\n\t\ttel = tel.replace(new RegExp('-', 'g'), '');\n\t\ttel = tel.replace(new RegExp(' ', 'g'), '');\n\t\ttel = tel.replace('(', '');\n\t\ttel = tel.replace(')', '');\n\n\t\tswitch (tel.length) {\n\t\t\tcase 10: // +1PPP####### -> C (PPP) ###-####\n\t\t\t\tcountry = 1;\n\t\t\t\tcity = tel.slice(0, 3);\n\t\t\t\tnumber = tel.slice(3);\n\t\t\t\tbreak;\n\n\t\t\tcase 11: // +CPPP####### -> CCC (PP) ###-####\n\t\t\t\tcountry = tel[0];\n\t\t\t\tcity = tel.slice(1, 4);\n\t\t\t\tnumber = tel.slice(4);\n\t\t\t\tbreak;\n\n\t\t\tcase 12: // +CCCPP####### -> CCC (PP) ###-####\n\t\t\t\tcountry = tel.slice(0, 3);\n\t\t\t\tcity = tel.slice(3, 5);\n\t\t\t\tnumber = tel.slice(5);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\treturn tel;\n\t\t}\n\n\t\tif (country === 1) {\n\t\t\tcountry = '';\n\t\t}\n\n\t\tnumber = number.slice(0, 3) + '-' + number.slice(3);\n\n\t\treturn (country + ' (' + city + ') ' + number).trim();\n\t}\n}\n","import { Pipe } from '@angular/core';\n\n// tslint:disable-next-line:use-pipe-transform-interface\n@Pipe({\n\tname: 'reverse'\n})\nexport class ReversePipe { \n\ttransform(value) {\n\t\treturn value.slice(0).reverse();\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'minusCurrency'\n})\nexport class MinusCurrencyPipe implements PipeTransform { \n\ttransform(value: any, args?: any): any {\n\t\treturn value.charAt(0) === '-' ? '(' + value.substring(1, value.length) + ')' : value;\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml, SafeStyle, SafeScript, SafeUrl, SafeResourceUrl } from '@angular/platform-browser';\n\n@Pipe({\n\tname: 'safe'\n})\nexport class DomSanitizorPipe implements PipeTransform {\n\tconstructor(private _sanitizer: DomSanitizer) {}\n\n\ttransform(value: string, type: string = 'html'): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl {\n\t\tswitch (type) {\n\t\t\tcase 'html': return this._sanitizer.bypassSecurityTrustHtml(value);\n\t\t\tcase 'style': return this._sanitizer.bypassSecurityTrustStyle(value);\n\t\t\tcase 'script': return this._sanitizer.bypassSecurityTrustScript(value);\n\t\t\tcase 'url': return this._sanitizer.bypassSecurityTrustUrl(value);\n\t\t\tcase 'resourceUrl': return this._sanitizer.bypassSecurityTrustResourceUrl(value);\n\t\t\tdefault: throw new Error(`Invalid safe type specified: ${type}`);\n\t\t}\n\t}\n\n}","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'titleCase',\n\tpure: false\n})\nexport class TitleCaseAndUnderscorePipe implements PipeTransform { \n\ttransform(value: string): string { \n\t\tlet str = value.replace('_', ' ');\n\t\t\n\t\tlet strArray = str.toLowerCase().split(' ');\n\t\tfor (let i = 0; i < strArray.length; i++) {\n\t\t\tstrArray[i] = strArray[i].charAt(0).toUpperCase() + strArray[i].slice(1); \n\t\t}\n\t\treturn strArray.join(' ');\n\t}\n}","import { NgModule } from '@angular/core';\nimport { FilterEqualPipe, FilterNotEqualPipe } from './filter.pipe';\nimport { PhonePipe } from './phone.pipe';\nimport { ReversePipe } from './reverse-list.pipe';\nimport { MinusCurrencyPipe } from './minus-currency.pipe';\nimport { DomSanitizorPipe } from './domsanitizor.pipe';\nimport { TitleCaseAndUnderscorePipe } from './titlecase.pipe';\nimport { JsonParsePipe } from './json-parse.pipe';\n\n@NgModule({\n\tdeclarations: [\n\t\tFilterEqualPipe,\n\t\tFilterNotEqualPipe,\n\t\tPhonePipe,\n\t\tReversePipe,\n\t\tMinusCurrencyPipe,\n\t\tDomSanitizorPipe,\n\t\tTitleCaseAndUnderscorePipe,\n\t\tJsonParsePipe\n\t],\n\texports: [ \n\t\tFilterEqualPipe,\n\t\tFilterNotEqualPipe,\n\t\tPhonePipe,\n\t\tReversePipe,\n\t\tMinusCurrencyPipe,\n\t\tDomSanitizorPipe,\n\t\tTitleCaseAndUnderscorePipe,\n\t\tJsonParsePipe\n\t]\n})\nexport class PipeModule { }\n","import { Directive, Input, Output, EventEmitter, ElementRef, Renderer2, HostBinding } from '@angular/core';\nimport { Subject, BehaviorSubject, Observable } from 'rxjs';\n\nexport type SortDirectionType = 1 | 0 | -1;\n\nexport interface Sortable {\n\t/** The id of the column being sorted. */\n\tid: string;\n \n\t/** Starting sort direction. */\n\tstart: SortDirectionType;\n\n\tdisabled: boolean;\n }\n \n /** The current sort state. */\n export interface Sort {\n\t/** The id of the column being sorted. */\n\tactive: string;\n \n\t/** The sort direction. */\n\tdirection: SortDirectionType;\n }\n\n@Directive({\n\tselector : '[sortable]'\n})\nexport class SortTableDirective {\n\tsortables = new Map<string, Sortable>();\n\n\t/** Used to notify any child components listening to state changes. */\n\tpublic readonly _stateChanges = new Subject<void>();\n\n\t/** The id of the most recently sorted Sortable. */\n\t@Input('sortActive') active: string;\n\t@Input('sortStart') start: SortDirectionType = 1;\n\t@Input('sortDisabled') disabled = false;\n\t\n\t@Input() tableFixed = false;\n\t@Input() headerFixed = false;\n\t@Input() secondaryColor = false;\n\t@Input() tertiaryColor = false;\n\n\n\tget direction(): SortDirectionType { return this._direction; }\n\tset direction(direction: SortDirectionType) {\n\t if (direction && direction !== -1 && direction !== 1) {\n\t\tthrow Error(direction + ' is not a valid sort direction (0 or 1).');\n\t }\n\t this._direction = direction;\n\t}\n\tprivate _direction: SortDirectionType = 0;\n\n\tprivate _data = new BehaviorSubject([]);\n\n\t@Output('sortChange') readonly sortChange: EventEmitter<Sort> = new EventEmitter<Sort>();\n\n\t// @HostBinding('class') elementClass = '';\n\n\tconstructor(private element: ElementRef) {\n\t\t// if (this.secondaryColor) {\n\t\t// \tthis.elementClass = 'collapseTable-sec';\n\t\t// }\n\t\t// else if (this.tertiaryColor) {\n\t\t// \tthis.elementClass = 'collapseTable-tert';\n\t\t// }\n\t\t// else {\n\t\t// \tthis.elementClass = 'collapseTable';\n\t\t// }\n\t}\n\n\tregister(sortable: Sortable): void {\n\t\tif (!sortable.id) {\n\t\t \tthrow Error('CTSortHeader must be provided with a unique id');\n\t\t}\n\t\n\t\tif (this.sortables.has(sortable.id)) {\n\t\t\tthrow Error('Cannot have two CTSortables with the same id ' + sortable.id);\n\t\t}\n\n\t\t// console.log('Register', sortable);\n\t\tthis.sortables.set(sortable.id, sortable);\n\t}\n\t\n\tderegister(sortable: Sortable): void {\n\t\t// console.log('Unregister', sortable);\n\t\tthis.sortables.delete(sortable.id);\n\t}\n\n\tsort(sortable: Sortable): void {\n\t\tif (this.active != sortable.id) {\n\t\t\tthis.active = sortable.id;\n\t\t\tthis.direction = sortable.start ? sortable.start : this.start;\n\t\t} \n\t\telse {\n\t\t\tthis.direction *= -1;\n\t\t}\n\t\n\t\tthis.sortChange.emit({active: this.active, direction: this.direction});\n\n\t\tif (this._data.value.length) {\n\t\t\tlet value = null;\n\t\t\t\n\t\t\tfor (let i = 0; i < this._data.value.length; i++) {\n\t\t\t\tif (sortable.id.split('.').reduce((o, i) => o[i], this._data.value[i])) {\n\t\t\t\t\tvalue = sortable.id.split('.').reduce((o, i) => o[i], this._data.value[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value !== null && value !== undefined) {\n\n if (typeof(value) === 'string') {\n\t\t\t\t\tlet digitRegex = new RegExp(/^[\\d.,$]+$/);\n\t\t\t\t\tif (!this._data.value.filter(a => sortable.id.split('.').reduce((o, i) => o[i], a)).some(a => !digitRegex.test(sortable.id.split('.').reduce((o, i) => o[i], a)))) {\n\t\t\t\t\t\tif (this.direction === 1) {\n\t\t\t\t\t\t\tthis._data.next(this._data.value.sort((a, b) => ((sortable.id.split('.').reduce((o, i) => o[i], a) !== null ? parseFloat((sortable.id.split('.').reduce((o, i) => o[i], a).replace(/\\$/g, '').replace(',', ''))) : 999999999999)) - ((sortable.id.split('.').reduce((o, i) => o[i], b) !== null ? parseFloat((sortable.id.split('.').reduce((o, i) => o[i], b)).replace(/\\$/g, '').replace(',', '')) : 999999999999))));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis._data.next(this._data.value.sort((a, b) => (sortable.id.split('.').reduce((o, i) => o[i], b) !== null ? parseFloat((sortable.id.split('.').reduce((o, i) => o[i], b)).replace(/\\$/g, '').replace(',', '')) : -999999999999) - (sortable.id.split('.').reduce((o, i) => o[i], a) !== null ? parseFloat((sortable.id.split('.').reduce((o, i) => o[i], a)).replace(/\\$/g, '').replace(',', '')) : -999999999999)));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (this.direction === 1) {\n\t\t\t\t\t\t\tthis._data.next(this._data.value.sort((a, b) => (sortable.id.split('.').reduce((o, i) => o[i], a) || 'zzzzzz').localeCompare(sortable.id.split('.').reduce((o, i) => o[i], b) || 'zzzzzz')));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis._data.next(this._data.value.sort((a, b) => (sortable.id.split('.').reduce((o, i) => o[i], b) || 'AAAAAAA').localeCompare(sortable.id.split('.').reduce((o, i) => o[i], a) || 'AAAAAAA')));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n }\n else if (typeof(value) === 'number') {\n if (this.direction === 1) {\n this._data.next(this._data.value.sort((a, b) => ((sortable.id.split('.').reduce((o, i) => o[i], a) !== null ? sortable.id.split('.').reduce((o, i) => o[i], a) : 999999999999)) - ((sortable.id.split('.').reduce((o, i) => o[i], b) !== null ? sortable.id.split('.').reduce((o, i) => o[i], b) : 999999999999))));\n }\n else {\n this._data.next(this._data.value.sort((a, b) => (sortable.id.split('.').reduce((o, i) => o[i], b) !== null ? sortable.id.split('.').reduce((o, i) => o[i], b) : -999999999999) - (sortable.id.split('.').reduce((o, i) => o[i], a) !== null ? sortable.id.split('.').reduce((o, i) => o[i], a) : -999999999999)));\n }\n }\n else if (value instanceof Date) {\n if (this.direction === 1) {\n this._data.next(this._data.value.sort((a, b) => (sortable.id.split('.').reduce((o, i) => o[i], a) ? sortable.id.split('.').reduce((o, i) => o[i], a).getTime() : 0) - (sortable.id.split('.').reduce((o, i) => o[i], b) ? sortable.id.split('.').reduce((o, i) => o[i], b).getTime() : 0)));\n }\n else {\n this._data.next(this._data.value.sort((a, b) => (sortable.id.split('.').reduce((o, i) => o[i], b) ? sortable.id.split('.').reduce((o, i) => o[i], b).getTime() : 0) - (sortable.id.split('.').reduce((o, i) => o[i], a) ? sortable.id.split('.').reduce((o, i) => o[i], a).getTime() : 0)));\n }\n\t\t\t\t}\n\t\t\t\telse if (typeof(value) === 'boolean') {\n\t\t\t\t\tthis._data.next(this._data.value.sort((a, b) => {\n if (sortable.id.split('.').reduce((o, i) => o[i], a) === sortable.id.split('.').reduce((o, i) => o[i], b)) {\n return 0;\n }\n else if (sortable.id.split('.').reduce((o, i) => o[i], a)) {\n if (this.direction === 1) {\n return -1;\n }\n\n return 1;\n }\n else {\n if (this.direction === 1) {\n return 1;\n }\n\n return -1;\n }\n }));\n }\n\t\t\t\telse {\n\t\t\t\t\tthis._data.next(this._data.value.sort((a, b) => sortable.id.split('.').reduce((o, i) => o[i], a) === sortable.id.split('.').reduce((o, i) => o[i], b) ? 0 : (sortable.id.split('.').reduce((o, i) => o[i], a) > sortable.id.split('.').reduce((o, i) => o[i], b) ? -1 : 1)));\n\t\t\t\t}\n }\n\t\t}\n\t}\n\n\tgetData(): Observable<any[]> {\n\t\treturn this._data.asObservable();\n\t}\n\t\n\tsetData(data) {\n\t\tthis._data.next(data);\n\t}\n\n\tngOnInit() {\n\t\t// this._markInitialized();\n\n\t\t// console.log('test');\n\n\t\t\n\t}\n\t\n\tngOnChanges() {\n\t\tthis._stateChanges.next();\n\t}\n\n\tngOnDestroy() {\n\t\tthis._stateChanges.complete();\n\t}\n}","import { Component, ViewEncapsulation, ChangeDetectionStrategy, OnDestroy, OnInit, Input, ChangeDetectorRef, Optional } from '@angular/core';\nimport { Sortable, SortDirectionType, SortTableDirective } from './sort-table.directive';\nimport { merge, Subscription } from 'rxjs';\n\n@Component({\n\tselector: '[sort-table-header]',\n\ttemplateUrl: './sort-table-header.component.html',\n\t// host: {\n\t// '(click)': '_handleClick()',\n\t// '(mouseenter)': '_setIndicatorHintVisible(true)',\n\t// '(longpress)': '_setIndicatorHintVisible(true)',\n\t// '(mouseleave)': '_setIndicatorHintVisible(false)',\n\t// '[attr.aria-sort]': '_getAriaSortAttribute()',\n\t// '[class.mat-sort-header-disabled]': '_isDisabled()',\n\t// },\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tinputs: ['disabled'],\n\t// animations: [\n\t// matSortAnimations.indicator,\n\t// matSortAnimations.leftPointer,\n\t// matSortAnimations.rightPointer,\n\t// matSortAnimations.arrowOpacity,\n\t// matSortAnimations.arrowPosition,\n\t// matSortAnimations.allowChildren,\n\t// ]\n})\nexport class SortTableHeaderComponent implements Sortable, OnDestroy, OnInit {\n\t_arrowDirection: SortDirectionType = 0;\n\t@Input('sort-table-header') id: string;\n\t@Input() arrowPosition: 'before' | 'after' = 'after';\n\t@Input() start: SortDirectionType;\n\t_rerenderSubscription: Subscription;\n\t@Input() disabled: boolean;\n\n\tconstructor(changeDetectorRef: ChangeDetectorRef, @Optional() public _sort: SortTableDirective) {\n\n\t\tif (!_sort) {\n\t\t\tthrow Error(`SortTableSortHeader must be placed within a parent element with the CTSortable directive.`);\n\t\t}\n\n\t\tthis._rerenderSubscription = merge(_sort.sortChange, _sort._stateChanges).subscribe(() => {\n\t\t\tif (this._isSorted()) {\n\t\t\t\tthis._updateArrowDirection();\n\t\t\t}\n\n\t\t\tchangeDetectorRef.markForCheck();\n\t\t});\n\t}\n\n\tngOnInit() {\n\t\t// console.log('Init Sort Header');\n\t\tthis._sort.register(this);\n\t}\n\n\tngOnDestroy() {\n\t\tthis._sort.deregister(this);\n\t\tthis._rerenderSubscription.unsubscribe();\n\t}\n\n\t_isSorted() {\n\t\treturn this._sort.active === this.id;\n\t}\n\n\t_getSortDirection() {\n\t\treturn this._sort.direction;\n\t}\n\n\t_updateArrowDirection() {\n\t\tthis._arrowDirection = this._isSorted() ? this._sort.direction : (this.start || this._sort.start);\n\t}\n\n\t_isDisabled() {\n\t\treturn this._sort.disabled || this.disabled;\n\t}\n\n\tonClick(event) {\n\t\t// console.log('Clicked on', this.id, event);\n\t\t\n\t\tif (this._isDisabled()) { return; }\n\n\t\tthis._sort.sort(this);\n\t}\n}","<div (click)=\"onClick($event)\">\n <ng-content></ng-content>\n <i *ngIf=\"_isSorted() && _getSortDirection() === -1\" class=\"fa fa-arrow-down\" style=\"margin-left: 10px; font-size: 14px\"></i>\n <i *ngIf=\"_isSorted() && _getSortDirection() === 1\" class=\"fa fa-arrow-up\" style=\"margin-left: 10px; font-size: 14px\"></i>\n</div>","import { Component, Input, Optional, OnChanges, OnInit, Output, EventEmitter, OnDestroy } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { SortTableDirective } from './sort-table.directive';\n\n@Component({\n\tselector: '[sort-table-ngfor]',\n\ttemplate: '<ng-content></ng-content>'\n})\nexport class SortTableNgForComponent implements OnInit, OnChanges, OnDestroy {\n\t@Input('sort-table-ngfor') data = [];\n\t@Output() dataChanged = new EventEmitter<any[]>();\n\n\tsortSub$: Subscription = null;\n\tsortedData = [];\n\n\tconstructor(@Optional() public _sort: SortTableDirective) {\n\t\t// console.log('NgFor Const');\n\t\tif (!_sort) {\n\t\t\tthrow Error(`SortTableNgFor must be placed within a parent element with the CTSortable directive.`);\n\t\t}\n\t}\n\n\tngOnInit() {\n\t\tthis.sortSub$ = this._sort.getData().subscribe(data => {\n\t\t\tthis.sortedData = data;\n\t\t\tthis.dataChanged.emit(this.sortedData);\n\n\t\t\t// console.log('Sorted Data', this.sortedData);\n\t\t});\n\t}\n\n\tngOnChanges() {\n\t\t// console.log('NgFor Changed', this.data);\n\t\tthis._sort.setData(this.data);\n\t}\n\n\tngOnDestroy() {\n\t\tthis.sortSub$.unsubscribe();\n\t}\n}","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\t\nimport { CommonModule } from '@angular/common';\nimport { SortTableDirective } from './sort-table.directive';\nimport { SortTableHeaderComponent } from './sort-table-header.component';\nimport { SortTableNgForComponent } from './sort-table-ngfor.component';\n\n@NgModule({\n\timports: [\n\t\tFormsModule,\n\t\tCommonModule\n\t],\n\texports: [\n\t\tSortTableDirective,\n\t\tSortTableHeaderComponent,\n\t\tSortTableNgForComponent\n\t],\n\tdeclarations: [\n\t\tSortTableDirective,\n\t\tSortTableHeaderComponent,\n\t\tSortTableNgForComponent\n\t]\n})\nexport class SortTableModule { }\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { UserRoleModule } from '../widgets/user-role/user-role.module';\nimport { FormButtonModule } from '../widgets/form-button/form-button.module';\nimport { ResponsiveButtonGroupModule } from '../widgets/responsive-button-group/responsive-button-group.module';\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\nimport { NgbModule } from '@ng-bootstrap/ng-bootstrap';\nimport { CollapseTableModule } from '../widgets/collapse-table/collapse-table.module';\nimport { PipeModule } from '../pipes/pipe.module';\n\nimport { NgSelectModule } from '@ng-select/ng-select';\nimport { SortTableModule } from '../widgets/sort-table/sort-table.module';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n\timports: [\n\t\tReactiveFormsModule,\n\t\tFormsModule,\n\t\tCollapseTableModule,\n\t\tRouterModule,\n\t\tNgbModule,\n\t\tFormButtonModule,\n\t\tResponsiveButtonGroupModule,\n\t\tPipeModule,\n\t\tUserRoleModule,\n\t\tNgSelectModule,\n\t\tSortTableModule,\n\t\tCommonModule\n\t],\n\texports: [\n\t\tReactiveFormsModule,\n\t\tFormsModule,\n\t\tCollapseTableModule,\n\t\tRouterModule,\n\t\tNgbModule,\n\t\tFormButtonModule,\n\t\tResponsiveButtonGroupModule,\n\t\tPipeModule,\n\t\tUserRoleModule,\n\t\tNgSelectModule,\n\t\tSortTableModule,\n\t\tCommonModule\n\t]\n})\nexport class SharedModule { }\n","import { BaseComponent } from '../resolveio-class';\nimport { Component, OnInit, OnDestroy } from '@angular/core';\nimport { FormGroup, Validators } from '@angular/forms';\nimport { ActivatedRoute } from '@angular/router';\n\nimport { Subscription } from 'rxjs';\nimport { UserModel } from '../models/user.model';\nimport { ProviderService } from '../resolveio-class';\nimport { DialogService } from '../widgets/dialog/dialog.service';\nimport { HttpClient } from '@angular/common/http';\n\n@Component({\n\ttemplateUrl: './forgot-password.component.html',\n\tproviders: [ProviderService]\n})\nexport class ForgotPasswordComponent extends BaseComponent implements OnInit, OnDestroy {\n\t\n\tserverURL = '';\n\n\tform: FormGroup;\n\tuser: UserModel;\n\tsubscription$: Subscription[] = [];\n\ttoken: string;\n\tdisableFormButton = false;\n\t\n\tconstructor(private _route: ActivatedRoute, private _services: ProviderService, private _http: HttpClient, private _ds: DialogService) {\n\t\tsuper(_services);\n\t}\n\t\n\tngOnInit() {\n\n\t\tif (this._route.snapshot.queryParamMap.keys.length !== 2) {\n\t\t\tthis._ds.error('Invalid params');\n\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t}\n\t\telse {\n\t\t\tthis.serverURL = this._route.snapshot.queryParamMap.keys[0];\n\t\t\tthis.token = this._route.snapshot.queryParamMap.keys[1];\n\t\t}\n\n\t\tthis.form = this._services._fb.group({\n\t\t\tpassword: ['', [Validators.compose([Validators.required, Validators.minLength(6)])]],\n\t\t\tconfirm_password: ['', [Validators.compose([Validators.required, Validators.minLength(6)])]]\n\t\t}, {validator: this._services._vs.matchPassword});\n\n\t\tthis._http.post(this.serverURL + '/userWithForgotPasswordToken', {forgotPasswordToken: this.token}).toPromise().then((res: any) => {\n\t\t\tif (res.error) {\n\t\t\t\tthis._ds.error('Invalid token');\n\t\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.user = res.result.user;\n\t\t\t}\n\t\t}, err => {\n\t\t\tthis._ds.error('Invalid token');\n\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis.subscription$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\t}\n\n\tsubmit() {\n\n\t\tthis.disableFormButton = true;\n\n\t\tthis._http.post(this.serverURL + '/setUserWithForgotPasswordToken', {forgotPasswordToken: this.token, password: this.form.value.password}).toPromise().then((res: any) => {\n\t\t\tif (res.error) {\n\t\t\t\tthis._ds.error('Could not update user');\n\t\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._services._alert.setAlert('success', 'User has been updated, please log in');\n\t\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t\t}\n\t\t}, err => {\n\t\t\tthis._ds.error('Invalid token');\n\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t});\n\n\t\tthis._services._router.navigateByUrl('/home');\t\n\t}\n}","<style>\n input {\n width: 100%;\n }\n</style>\n\n<div *ngIf=\"user\">\n\t<h4>Welcome to ResolveIO.<br><br>Your username will be {{user.username}}. Please create a password for your account.</h4>\n\t<form [formGroup]=\"form\" novalidate (ngSubmit)=\"submit()\">\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<label class=\"form-control-label\">Password</label>\n\t\t\t\t\t<em *ngIf=\"form.controls.password.hasError('required')\">- Required</em>\n\t\t\t\t\t<em *ngIf=\"form.controls.password.hasError('minlength') || form.hasError('matchPassword')\">- Invalid</em>\n\t\t\t\t\t<input type=\"text\" [ngClass]=\"['form-control', (form.controls.password.valid && form.valid) ? 'is-valid' : 'is-invalid']\" formControlName=\"password\" type=\"password\">\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"form.controls.password.hasError('required')\">Password is required</div>\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"form.controls.password.hasError('minlength')\">Password must be 6 or more characters</div>\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"!form.controls.password.hasError('minlength') && form.hasError('matchPassword')\" align=\"start\">Passwords do not match</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<label class=\"form-control-label\">Confirm Password</label>\n\t\t\t\t\t<em *ngIf=\"form.controls.confirm_password.hasError('required')\">- Required</em>\n\t\t\t\t\t<em *ngIf=\"form.hasError('matchPassword')\">- Invalid</em>\n\t\t\t\t\t<input type=\"text\" [ngClass]=\"['form-control', form.controls.confirm_password.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"confirm_password\" type=\"password\">\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"form.controls.confirm_password.hasError('required')\">Password is required</div>\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"form.hasError('matchPassword')\" align=\"start\">Passwords do not match</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"row\" style=\"margin-top: 30px;\">\n\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t<form-button [form]=\"form\" [disabled]=\"disableFormButton\"></form-button>\n\t\t\t</div>\n\t\t</div>\n\t</form>\n</div>","import { BaseComponent } from '../resolveio-class';\nimport { Component, OnInit, OnDestroy } from '@angular/core';\nimport { FormGroup, Validators } from '@angular/forms';\nimport { ActivatedRoute } from '@angular/router';\n\nimport { Subscription } from 'rxjs';\nimport { UserModel } from '../models/user.model';\nimport { ProviderService } from '../resolveio-class';\nimport { DialogService } from '../widgets/dialog/dialog.service';\nimport { HttpClient } from '@angular/common/http';\n\n@Component({\n\ttemplateUrl: './enroll.component.html',\n\tproviders: [ProviderService]\n})\nexport class EnrollComponent extends BaseComponent implements OnInit, OnDestroy {\n\n\tserverURL = '';\n\n\tform: FormGroup;\n\tuser: UserModel;\n\tsubscription$: Subscription[] = [];\n\ttoken: string;\n\tdisableFormButton = false;\n\t\n\tconstructor(private _route: ActivatedRoute, private _services: ProviderService, private _http: HttpClient, private _ds: DialogService) {\n\t\tsuper(_services);\n\t}\n\t\n\tngOnInit() {\n\t\tif (this._route.snapshot.queryParamMap.keys.length !== 2) {\n\t\t\tthis._ds.error('Invalid params');\n\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t}\n\t\telse {\n\t\t\tthis.serverURL = this._route.snapshot.queryParamMap.keys[0];\n\t\t\tthis.token = this._route.snapshot.queryParamMap.keys[1];\n\t\t}\n\n\t\tthis.form = this._services._fb.group({\n\t\t\tpassword: ['', [Validators.compose([Validators.required, Validators.minLength(6)])]],\n\t\t\tconfirm_password: ['', [Validators.compose([Validators.required, Validators.minLength(6)])]]\n\t\t}, {validator: this._services._vs.matchPassword});\n\n\t\tthis._http.post(this.serverURL + '/userWithEnrollmentToken', {enrollmentToken: this.token}).toPromise().then((res: any) => {\n\t\t\tif (res.error) {\n\t\t\t\tthis._ds.error('Invalid token');\n\t\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.user = res.result.user;\n\t\t\t}\n\t\t}, err => {\n\t\t\tthis._ds.error('Invalid token');\n\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis.subscription$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\t}\n\n\tsubmit() {\n\n\t\tthis.disableFormButton = true;\n\n\t\tthis._http.post(this.serverURL + '/setUserWithEnrollmentToken', {enrollmentToken: this.token, password: this.form.value.password}).toPromise().then((res: any) => {\n\n\t\t\tif (res.error) {\n\t\t\t\tthis._ds.error('Could not update user');\n\t\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._services._alert.setAlert('success', 'User has been updated, please log in');\n\t\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t\t}\n\t\t}, err => {\n\t\t\tthis._ds.error('Invalid token');\n\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t});\t\n\t}\n}","<style>\n input {\n width: 100%;\n }\n</style>\n\n<div *ngIf=\"user\">\n\t<h4>Welcome to ResolveIO.<br><br>Your username will be {{user.username}}. Please create a password for your account.</h4>\n\t<form [formGroup]=\"form\" novalidate (ngSubmit)=\"submit()\">\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<label class=\"form-control-label\">Password</label>\n\t\t\t\t\t<em *ngIf=\"form.controls.password.hasError('required')\">- Required</em>\n\t\t\t\t\t<em *ngIf=\"form.controls.password.hasError('minlength') || form.hasError('matchPassword')\">- Invalid</em>\n\t\t\t\t\t<input type=\"text\" [ngClass]=\"['form-control', form.controls.password.valid && !form.hasError('matchPassword') ? 'is-valid' : 'is-invalid']\" formControlName=\"password\" type=\"password\">\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"form.controls.password.hasError('required')\">Password is required</div>\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"form.controls.password.hasError('minlength')\">Password must be 6 or more characters</div>\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"!form.controls.password.hasError('minlength') && form.hasError('matchPassword')\" align=\"start\">Passwords do not match</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<label class=\"form-control-label\">Confirm Password</label>\n\t\t\t\t\t<em *ngIf=\"form.controls.confirm_password.hasError('required')\">- Required</em>\n\t\t\t\t\t<em *ngIf=\"form.hasError('matchPassword')\">- Invalid</em>\n\t\t\t\t\t<input type=\"text\" [ngClass]=\"['form-control', form.controls.confirm_password.valid && !form.hasError('matchPassword') ? 'is-valid' : 'is-invalid']\" formControlName=\"confirm_password\" type=\"password\">\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"form.controls.confirm_password.hasError('required')\">Password is required</div>\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"form.hasError('matchPassword')\" align=\"start\">Passwords do not match</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"row\" style=\"margin-top: 30px;\">\n\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t<form-button [form]=\"form\" [disabled]=\"disableFormButton\"></form-button>\n\t\t\t</div>\n\t\t</div>\n\t</form>\n</div>","import { BaseComponent } from '../resolveio-class';\nimport { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { ProviderService } from '../resolveio-class';\nimport { DialogService } from '../widgets/dialog/dialog.service';\nimport { HttpClient } from '@angular/common/http';\nimport { SocketManagerService } from '../socket-manager.service';\nimport { CoreService } from '../core.service';\n\n@Component({\n\tproviders: [ProviderService],\n\ttemplate: '<router-outlet></router-outlet>'\n})\nexport class Auth365Component extends BaseComponent {\n\ttoken: string;\n\t\n\tconstructor(private _app: CoreService, private _route: ActivatedRoute, private _services: ProviderService, private _http: HttpClient, private _ds: DialogService, private _socket: SocketManagerService) {\n\t\tsuper(_services);\n\n\t\tif (this._app.environment.value.MS_id_token) {\n\t\t\tthis._services._account.logIn365(this._app.environment.value.MS_id_token).then(() => {\n\t\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t\t}, () => {});\n\t\t}\n\t\telse {\n\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t}\n\t}\n}","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable()\nexport class UserSettingsService {\n\n\tselectedUser = new BehaviorSubject('0');\n\n\tconstructor() {}\n\n\tsetSelectedUser(id: string) {\n\t\tthis.selectedUser.next(id);\n\t}\n}\n","import { ModulePermissionModel } from '../models/permission.model';\n\nexport const UserSettingsModulePermission: ModulePermissionModel = {\n\tname: 'user-settings',\n\tviews: [\n\t\t{link: '/user-settings/settings', label: 'Settings', has_parameter: false}\n\t],\n\tapproval: {\n\t\ttype: 'user-settings'\n\t}\n};\n","import { Component, OnInit, OnDestroy } from '@angular/core';\nimport { NavbarModel } from '../widgets/navbar-module/navbar-module.model';\nimport { UserSettingsService } from './user-settings.service';\nimport { Subscription } from 'rxjs';\nimport { UserSettingsModulePermission } from './user-settings.permission';\nimport { ProviderService, BaseComponent } from '../resolveio-class';\nimport { UserModel } from '../models/user.model';\n\n@Component({\n\tproviders: [ProviderService],\n\ttemplate: '<router-outlet></router-outlet>'\n})\n\nexport class UserSettingsComponent extends BaseComponent implements OnInit, OnDestroy { \n\tselectedUserSettings$: Subscription;\n\n\tmenuData: NavbarModel;\n\t\n\tconstructor(private _us: UserSettingsService, private _services: ProviderService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis.selectedUserSettings$ = this._us.selectedUser.subscribe(\n\t\t\tval => this.selectedUserSettingsChanged(val)\n\t\t);\n\t}\n\n\tngOnDestroy() {\n\t\tthis._us.setSelectedUser('0');\n\n\t\tthis.selectedUserSettings$.unsubscribe();\n\t}\n\n\tselectedUserSettingsChanged(id: string) {\n\t\tthis.setUserSettingsMenuData();\n\t}\n\n\tsetUserSettingsMenuData(id?: string, user?: UserModel) {\n\t\tlet tabs = [];\n\n\t\tUserSettingsModulePermission.views.forEach(view => {\n\t\t\tif (this._services._account.isUserInView(view.link) || this._services._account.isUserSuperAdmin()) {\n\t\t\t\tswitch (view.link) {\n\t\t\t\t\tcase '/user-settings/settings': \n\t\t\t\t\t\ttabs.push({link: '/user-settings/settings', params: null, label: 'Settings'});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tthis.menuData = {\n\t\t\ttitle: 'User Settings',\n\t\t\tmodule: 'User Settings',\n\t\t\tdescription_name: 'User: ',\n\t\t\tdescription: user ? user.fullname : '',\n\t\t\ttabs: tabs\n\t\t};\n\n\t\tthis._services._app.setNavbarModuleData(this.menuData);\n\t}\n}\n","import { Component, OnInit, OnDestroy } from '@angular/core';\nimport { UserSettingsService } from '../user-settings.service';\nimport { Subscription } from 'rxjs';\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\nimport { AuthPermissionService } from '../../auth/auth-permissions.service';\nimport { DialogService } from '../../widgets/dialog/dialog.service';\nimport { FormGroup, Validators } from '@angular/forms';\nimport { UserModel } from '../../models/user.model';\nimport { toTitleCase } from '../../util/common.helper';\n\n@Component({\n\tproviders: [ProviderService],\n\ttemplateUrl: './users-settings.component.html'\n})\nexport class UsersSettingsComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\tsubscription$: Subscription[] = [];\n\n\tform: FormGroup;\n\n\tdisableFormButton = false;\n\tuser: UserModel;\n\tclient = '';\n\tviews = [];\n\n\thasSubmit = false;\n\n\tconstructor(private _aps: AuthPermissionService, private _us: UserSettingsService, private _services: ProviderService, private _ds: DialogService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis._us.setSelectedUser('0');\n\n\t\tthis.client = this._services._app.client.getValue();\n\n\t\tthis.form = this._services._fb.group({\n\t\t\ttable_color: ['#3b3ee3', [Validators.required]],\n\t\t\ttable_font_color: ['#ffffff', [Validators.required]],\n\t\t\tfont_size: [12, [Validators.required, this._services._vs.wholeNumbersGreaterThanZero, this._services._vs.maxValue(18), this._services._vs.minValue(8)]],\n\t\t\tsecondary_table_color: ['#87ceeb', [Validators.required]],\n\t\t\tsecondary_table_font_color: ['#000000', [Validators.required]],\n\t\t\ttertiary_table_color: ['#ff4500', [Validators.required]],\n\t\t\ttertiary_table_font_color: ['#000000', [Validators.required]],\n\t\t\tcollapsable_menu: [true],\n\t\t\tentries_per_page: ['25', [Validators.required]],\n\t\t\twarning_color: ['#ffc107', [Validators.required]],\n\t\t\twarning_font_color: ['#000000', [Validators.required]],\n\t\t\twarning_hover_color: ['#e0a800', [Validators.required]],\n\t\t\tsuccess_color: ['#28a745', [Validators.required]],\n\t\t\tsuccess_font_color: ['#ffffff', [Validators.required]],\n\t\t\tsuccess_hover_color: ['#218838', [Validators.required]],\n\t\t\tdanger_color: ['#dc3545', [Validators.required]],\n\t\t\tdanger_font_color: ['#ffffff', [Validators.required]],\n\t\t\tdanger_hover_color: ['#c82333', [Validators.required]],\n\t\t\tinfo_color: ['#17a2b8', [Validators.required]],\n\t\t\tinfo_font_color: ['#ffffff', [Validators.required]],\n\t\t\tinfo_hover_color: ['#138496', [Validators.required]],\n\t\t\tprimary_color: ['#007bff', [Validators.required]],\n\t\t\tprimary_font_color: ['#ffffff', [Validators.required]],\n\t\t\tprimary_hover_color: ['#0069d9', [Validators.required]],\n\t\t\tsecondary_color: ['#868e96', [Validators.required]],\n\t\t\tsecondary_font_color: ['#ffffff', [Validators.required]],\n\t\t\tsecondary_hover_color: ['#5a6268', [Validators.required]],\n\t\t\trouting_preference: ['alwaysAsk'],\n\t\t\topening_route: ['/home']\n\t\t});\n\n\t\tif (this._services._account.getUser() && this._services._account.getUser().settings) {\n\t\t\tthis.form.patchValue(this._services._account.getUser().settings);\n\n\t\t\tthis._services._account.getUser().roles.groups.forEach(group => {\n\t\t\t\tgroup.views.forEach(view => {\n\t\t\t\t\tif (!this.views.some(a => a.value === view)) {\n\t\t\t\t\t\tthis.views.push({\n\t\t\t\t\t\t\tvalue: view,\n\t\t\t\t\t\t\tdisplay: toTitleCase(view.replace('/', '').replace(new RegExp('/', 'g'), ' - '))\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tdocument.documentElement.style.setProperty('--primary-table-color', this.form.controls.table_color.value);\n\t\tdocument.documentElement.style.setProperty('--primary-table-font-color', this.form.controls.table_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--font-size', this.form.controls.font_size.value + 'px');\n\t\tdocument.documentElement.style.setProperty('--secondary-table-color', this.form.controls.secondary_table_color.value);\n\t\tdocument.documentElement.style.setProperty('--secondary-table-font-color', this.form.controls.secondary_table_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--tertiary-table-color', this.form.controls.tertiary_table_color.value);\n\t\tdocument.documentElement.style.setProperty('--tertiary-table-font-color', this.form.controls.tertiary_table_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--warning-color', this.form.controls.warning_color.value);\n\t\tdocument.documentElement.style.setProperty('--warning-font-color', this.form.controls.warning_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--warning-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.warning_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--warning-hover-color', this.form.controls.warning_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--success-color', this.form.controls.success_color.value);\n\t\tdocument.documentElement.style.setProperty('--success-font-color', this.form.controls.success_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--success-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.success_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--success-hover-color', this.form.controls.success_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--danger-color', this.form.controls.danger_color.value);\n\t\tdocument.documentElement.style.setProperty('--danger-font-color', this.form.controls.danger_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--danger-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.danger_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--danger-hover-color', this.form.controls.danger_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--info-color', this.form.controls.info_color.value);\n\t\tdocument.documentElement.style.setProperty('--info-font-color', this.form.controls.info_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--info-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.info_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--info-hover-color', this.form.controls.info_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--primary-color', this.form.controls.primary_color.value);\n\t\tdocument.documentElement.style.setProperty('--primary-font-color', this.form.controls.primary_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--primary-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.primary_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--primary-hover-color', this.form.controls.primary_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--secondary-color', this.form.controls.secondary_color.value);\n\t\tdocument.documentElement.style.setProperty('--secondary-font-color', this.form.controls.secondary_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--secondary-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.secondary_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--secondary-hover-color', this.form.controls.secondary_hover_color.value);\n\n\t\tthis.subscription$.push(this._services._account.user.subscribe(user => {\n\t\t\tthis.user = user;\n\t\t}));\n\t}\n\n\tngOnDestroy() {\n\t\tthis.subscription$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\n\t\tif (!this.hasSubmit) {\n\t\t\tthis.submitForm(this.form);\n\t\t}\n\t}\n\n\tchangePrimaryColor() {\n\t\tdocument.documentElement.style.setProperty('--primary-table-color', this.form.controls.table_color.value);\n\t}\n\n\tchangePrimaryFontColor() {\n\t\tdocument.documentElement.style.setProperty('--primary-table-font-color', this.form.controls.table_font_color.value);\n\t}\n\n\tchangePrimaryFontSize() {\n\t\tdocument.documentElement.style.setProperty('--font-size', this.form.controls.font_size.value + 'px');\n\t}\n\n\tchangeSecondaryColor() {\n\t\tdocument.documentElement.style.setProperty('--secondary-table-color', this.form.controls.secondary_table_color.value);\n\t}\n\n\tchangeSecondaryFontColor() {\n\t\tdocument.documentElement.style.setProperty('--secondary-table-font-color', this.form.controls.secondary_table_font_color.value);\n\t}\n\n\tchangeTertiaryColor() {\n\t\tdocument.documentElement.style.setProperty('--tertiary-table-color', this.form.controls.tertiary_table_color.value);\n\t}\n\n\tchangeTertiaryFontColor() {\n\t\tdocument.documentElement.style.setProperty('--tertiary-table-font-color', this.form.controls.tertiary_table_font_color.value);\n\t}\n\n\tchangeWarningColor() {\n\t\tdocument.documentElement.style.setProperty('--warning-color', this.form.controls.warning_color.value);\n\t\tdocument.documentElement.style.setProperty('--warning-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.warning_color.value, .5));\n\t}\n\n\tchangeWarningHoverColor() {\n\t\tdocument.documentElement.style.setProperty('--warning-hover-color', this.form.controls.warning_hover_color.value);\n\t}\n\n\tchangeWarningFontColor() {\n\t\tdocument.documentElement.style.setProperty('--warning-font-color', this.form.controls.warning_font_color.value);\n\t}\n\n\tchangeSuccessColor() {\n\t\tdocument.documentElement.style.setProperty('--success-color', this.form.controls.success_color.value);\n\t\tdocument.documentElement.style.setProperty('--success-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.success_color.value, .5));\n\t}\n\n\tchangeSuccessHoverColor() {\n\t\tdocument.documentElement.style.setProperty('--success-hover-color', this.form.controls.success_hover_color.value);\n\t}\n\n\tchangeSuccessFontColor() {\n\t\tdocument.documentElement.style.setProperty('--success-font-color', this.form.controls.success_font_color.value);\n\t}\n\n\tchangeDangerColor() {\n\t\tdocument.documentElement.style.setProperty('--danger-color', this.form.controls.danger_color.value);\n\t\tdocument.documentElement.style.setProperty('--danger-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.danger_color.value, .5));\n\t}\n\n\tchangeDangerHoverColor() {\n\t\tdocument.documentElement.style.setProperty('--danger-hover-color', this.form.controls.danger_hover_color.value);\n\t}\n\n\tchangeDangerFontColor() {\n\t\tdocument.documentElement.style.setProperty('--danger-font-color', this.form.controls.danger_font_color.value);\n\t}\n\n\tchangeInfoColor() {\n\t\tdocument.documentElement.style.setProperty('--info-color', this.form.controls.info_color.value);\n\t\tdocument.documentElement.style.setProperty('--info-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.info_color.value, .5));\n\t}\n\n\tchangeInfoHoverColor() {\n\t\tdocument.documentElement.style.setProperty('--info-hover-color', this.form.controls.info_hover_color.value);\n\t}\n\n\tchangeInfoFontColor() {\n\t\tdocument.documentElement.style.setProperty('--info-font-color', this.form.controls.info_font_color.value);\n\t}\n\n\tchangePrimaryButtonColor() {\n\t\tdocument.documentElement.style.setProperty('--primary-color', this.form.controls.primary_color.value);\n\t\tdocument.documentElement.style.setProperty('--primary-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.primary_color.value, .5));\n\t}\n\n\tchangePrimaryHoverColor() {\n\t\tdocument.documentElement.style.setProperty('--primary-hover-color', this.form.controls.primary_hover_color.value);\n\t}\n\n\tchangePrimaryButtonFontColor() {\n\t\tdocument.documentElement.style.setProperty('--primary-font-color', this.form.controls.primary_font_color.value);\n\t}\n\n\tchangeSecondaryButtonColor() {\n\t\tdocument.documentElement.style.setProperty('--secondary-color', this.form.controls.secondary_color.value);\n\t\tdocument.documentElement.style.setProperty('--secondary-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.secondary_color.value, .5));\n\t}\n\n\tchangeSecondaryHoverColor() {\n\t\tdocument.documentElement.style.setProperty('--secondary-hover-color', this.form.controls.secondary_hover_color.value);\n\t}\n\n\tchangeSecondaryButtonFontColor() {\n\t\tdocument.documentElement.style.setProperty('--secondary-font-color', this.form.controls.secondary_font_color.value);\n\t}\n\n\treset() {\n\t\tthis.form.controls.table_color.setValue('#3b3ee3');\n\t\tthis.form.controls.table_font_color.setValue('#ffffff');\n\t\tthis.form.controls.font_size.setValue(12);\n\t\tthis.form.controls.secondary_table_color.setValue('#87ceeb');\n\t\tthis.form.controls.secondary_table_font_color.setValue('#000000');\n\t\tthis.form.controls.tertiary_table_color.setValue('#ff4500');\n\t\tthis.form.controls.tertiary_table_font_color.setValue('#000000');\n\t\tthis.form.controls.collapsable_menu.setValue(true);\n\t\tthis.form.controls.entries_per_page.setValue('25');\n\t\tthis.form.controls.warning_color.setValue('#ffc107');\n\t\tthis.form.controls.warning_font_color.setValue('#000000');\n\t\tthis.form.controls.warning_hover_color.setValue('#e0a800');\n\t\tthis.form.controls.success_color.setValue('#28a745');\n\t\tthis.form.controls.success_font_color.setValue('#ffffff');\n\t\tthis.form.controls.success_hover_color.setValue('#218838');\n\t\tthis.form.controls.danger_color.setValue('#dc3545');\n\t\tthis.form.controls.danger_font_color.setValue('#ffffff');\n\t\tthis.form.controls.danger_hover_color.setValue('#c82333');\n\t\tthis.form.controls.info_color.setValue('#17a2b8');\n\t\tthis.form.controls.info_font_color.setValue('#ffffff');\n\t\tthis.form.controls.info_hover_color.setValue('#138496');\n\t\tthis.form.controls.primary_color.setValue('#007bff');\n\t\tthis.form.controls.primary_font_color.setValue('#ffffff');\n\t\tthis.form.controls.primary_hover_color.setValue('#0069d9');\n\t\tthis.form.controls.secondary_color.setValue('#868e96');\n\t\tthis.form.controls.secondary_font_color.setValue('#ffffff');\n\t\tthis.form.controls.secondary_hover_color.setValue('#5a6268');\n\n\t\tdocument.documentElement.style.setProperty('--primary-table-color', this.form.controls.table_color.value);\n\t\tdocument.documentElement.style.setProperty('--primary-table-font-color', this.form.controls.table_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--font-size', this.form.controls.font_size.value + 'px');\n\t\tdocument.documentElement.style.setProperty('--secondary-table-color', this.form.controls.secondary_table_color.value);\n\t\tdocument.documentElement.style.setProperty('--secondary-table-font-color', this.form.controls.secondary_table_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--tertiary-table-color', this.form.controls.tertiary_table_color.value);\n\t\tdocument.documentElement.style.setProperty('--tertiary-table-font-color', this.form.controls.tertiary_table_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--warning-color', this.form.controls.warning_color.value);\n\t\tdocument.documentElement.style.setProperty('--warning-font-color', this.form.controls.warning_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--warning-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.warning_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--warning-hover-color', this.form.controls.warning_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--success-color', this.form.controls.success_color.value);\n\t\tdocument.documentElement.style.setProperty('--success-font-color', this.form.controls.success_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--success-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.success_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--success-hover-color', this.form.controls.success_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--danger-color', this.form.controls.danger_color.value);\n\t\tdocument.documentElement.style.setProperty('--danger-font-color', this.form.controls.danger_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--danger-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.danger_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--danger-hover-color', this.form.controls.danger_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--info-color', this.form.controls.info_color.value);\n\t\tdocument.documentElement.style.setProperty('--info-font-color', this.form.controls.info_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--info-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.info_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--info-hover-color', this.form.controls.info_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--primary-color', this.form.controls.primary_color.value);\n\t\tdocument.documentElement.style.setProperty('--primary-font-color', this.form.controls.primary_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--primary-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.primary_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--primary-hover-color', this.form.controls.primary_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--secondary-color', this.form.controls.secondary_color.value);\n\t\tdocument.documentElement.style.setProperty('--secondary-font-color', this.form.controls.secondary_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--secondary-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.secondary_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--secondary-hover-color', this.form.controls.secondary_hover_color.value);\n\t}\n\n\tsubmitForm(form) {\n\t\tthis.hasSubmit = true;\n\n\t\tthis._services._socket.call('updateDocumentProps', 'users', this._services._account.getUser()._id, [\n\t\t\t{prop: 'settings', data: this.form.value}\n\t\t], this._services._account.getUser().__v, (err, res) => {\n\t\t\tif (res) {\n\t\t\t\tthis._services._alert.setAlert('success', 'Settings have been updated');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._ds.error('Could not update settings');\n\t\t\t\tthis._services._socket.call('insertErrorLog', 'user settings - update user', [\n\t\t\t\t\tthis._services._account.getUser(), err\n\t\t\t\t]);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction hexToRGB(hex, alpha) {\n let r = parseInt(hex.slice(1, 3), 16),\n g = parseInt(hex.slice(3, 5), 16),\n b = parseInt(hex.slice(5, 7), 16);\n\n if (alpha) {\n return \"rgba(\" + r + \", \" + g + \", \" + b + \", \" + alpha + \")\";\n } else {\n return \"rgb(\" + r + \", \" + g + \", \" + b + \")\";\n }\n}","<style>\n ::ng-deep :root {\n --primary-table-color: #3b3ee3;\n --primary-table-font-color: #ffffff;\n --font-size: 12px;\n --secondary-table-color: #87ceeb;\n --secondary-table-font-color: #000000;\n --tertiary-table-color: #ff4500;\n --tertiary-table-font-color: #000000;\n --warning-color: #ffc107;\n --warning-font-color: #000000;\n --warning-hover-color: #e0a800;\n --warning-shadow-color: 0 0 0 0.2rem rgba(222, 170, 12, 0.5);\n --success-color: #28a745;\n --success-font-color: #ffffff;\n --success-hover-color: #218838;\n --success-shadow-color: 0 0 0 0.2rem rgba(72, 180, 97, 0.5);\n --danger-color: #dc3545;\n --danger-font-color: #ffffff;\n --danger-hover-color: #c82333;\n --danger-shadow-color: 0 0 0 0.2rem rgba(225, 83, 97, 0.5);\n --info-color: #17a2b8;\n --info-font-color: #ffffff;\n --info-hover-color: #138496;\n --info-shadow-color: 0 0 0 0.2rem rgba(58, 176, 195, 0.5);\n --primary-color: #007bff;\n --primary-font-color: #ffffff;\n --primary-hover-color: #0069d9;\n --primary-shadow-color: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);\n --secondary-color: #868e96;\n --secondary-font-color: #ffffff;\n --secondary-hover-color: #5a6268;\n --secondary-shadow-color: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);\n }\n\n .label-accordion {\n font-weight: bold;\n color: black;\n margin-bottom: 0px;\n }\n\n .fa-plus {\n color: black;\n }\n\n .fa-minus {\n color: black;\n } \n\n .btn-warning {\n color: var(--warning-font-color);\n background-color: var(--warning-color);\n border-color: var(--warning-color);\n }\n .btn-warning:focus, .btn-warning.focus {\n box-shadow: var(--warning-shadow-color);\n }\n .btn-warning:hover {\n color: var(--warning-font-color);\n background-color: var(--warning-hover-color);\n border-color: var(--warning-hover-color);\n }\n\n .btn-success {\n color: var(--success-font-color);\n background-color: var(--success-color);\n border-color: var(--success-color);\n }\n .btn-success:focus, .btn-success.focus {\n box-shadow: var(--success-shadow-color);\n }\n .btn-success:hover {\n color: var(--success-font-color);\n background-color: var(--success-hover-color);\n border-color: var(--success-hover-color);\n }\n\n .btn-danger {\n color: var(--danger-font-color);\n background-color: var(--danger-color);\n border-color: var(--danger-color);\n }\n .btn-danger:focus, .btn-danger.focus {\n box-shadow: var(--danger-shadow-color);\n }\n .btn-danger:hover {\n color: var(--danger-font-color);\n background-color: var(--danger-hover-color);\n border-color: var(--danger-hover-color);\n }\n\n .btn-info {\n color: var(--info-font-color);\n background-color: var(--info-color);\n border-color: var(--info-color);\n }\n .btn-info:focus, .btn-info.focus {\n box-shadow: var(--info-shadow-color);\n }\n .btn-info:hover {\n color: var(--info-font-color);\n background-color: var(--info-hover-color);\n border-color: var(--info-hover-color);\n }\n\n .btn-primary {\n color: var(--primary-font-color);\n background-color: var(--primary-color);\n border-color: var(--primary-color);\n }\n .btn-primary:focus, .btn-primary.focus {\n box-shadow: var(--primary-shadow-color);\n }\n .btn-primary:hover {\n color: var(--primary-font-color);\n background-color: var(--primary-hover-color);\n border-color: var(--primary-hover-color);\n }\n\n .btn-secondary {\n color: var(--secondary-font-color);\n background-color: var(--secondary-color);\n border-color: var(--secondary-color);\n }\n .btn-secondary:focus, .btn-secondary.focus {\n box-shadow: var(--secondary-shadow-color);\n }\n .btn-secondary:hover {\n color: var(--secondary-font-color);\n background-color: var(--secondary-hover-color);\n border-color: var(--secondary-hover-color);\n }\n\n .fa-minus {\n color: black;\n } \n\n :host /deep/ .card .card-body .collapseTable th {\n background-color: var(--primary-table-color);\n color: var(--primary-table-font-color);\n font-size: var(--font-size);\n }\n\n :host /deep/ .card .card-body .collapseTable-sec th {\n background-color: var(--secondary-table-color);\n color: var(--secondary-table-font-color);\n font-size: var(--font-size);\n }\n\n :host /deep/ .card .card-body .collapseTable-tert th {\n background-color: var(--tertiary-table-color);\n color: var(--tertiary-table-font-color);\n font-size: var(--font-size);\n }\n</style>\n\n<div class=\"col-lg-12\">\n <form [formGroup]=\"form\" novalidate (ngSubmit)=\"submitForm(form)\">\n <div class=\"row\">\n <ngb-accordion #acc=\"ngbAccordion\" activeIds=\"miscOptions, tableOptions, buttonOptions\">\n <ngb-panel id=\"miscOptions\">\n <ng-template ngbPanelTitle>\n <div> \n <label class=\"label-accordion\">Misc. Options</label>\n <i *ngIf=\"!acc.activeIds.includes('miscOptions')\" class=\"fa fa-plus pull-right\" aria-hidden=\"true\"></i>\n <i *ngIf=\"acc.activeIds.includes('miscOptions')\" class=\"fa fa-minus pull-right\" aria-hidden=\"true\"></i>\n </div>\n </ng-template>\n <ng-template ngbPanelContent>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <responsive-button-group>\n <button type=\"button\" class=\"btn btn-success\" (click)=\"reset()\">Reset Default Settings</button>\n </responsive-button-group>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-4\">\n\t\t\t\t\t\t\t\t<b>Collapsable Menu</b><br>\n\t\t\t\t\t\t\t\t<div class=\"form-check\">\n\t\t\t\t\t\t\t\t\t<label class=\"form-check-label\">\n\t\t\t\t\t\t\t\t\t\t<input class=\"form-check-input\" type=\"checkbox\" hidden formControlName=\"collapsable_menu\">\n\t\t\t\t\t\t\t\t\t\t<i *ngIf=\"form.controls.collapsable_menu.value\" class=\"fa fa-check\" style=\"color: green; font-size: 24px;\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t\t\t\t<i *ngIf=\"!form.controls.collapsable_menu.value\" class=\"fa fa-times\" style=\"color: red; font-size: 24px;\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Default Entries Per Page</label>\n <em *ngIf=\"!form.controls.entries_per_page.valid\">- Required</em>\n <select [ngClass]=\"['form-control', form.controls.entries_per_page.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"entries_per_page\">\n <option value=\"25\">25</option>\n <option value=\"50\">50</option>\n <option value=\"100\">100</option>\n <option value=\"250\">250</option>\n </select>\n <div class=\"invalid-feedback\" *ngIf=\"!form.controls.entries_per_page.valid\">Entries per page is required</div>\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Font Size (Recommended 11-14)</label>\n <em *ngIf=\"form.controls.font_size.hasError('required')\">- Required</em>\n <em *ngIf=\"form.controls.font_size.hasError('wholeNumbersGreaterThanZero')\">- Invalid</em>\n <em *ngIf=\"form.controls.font_size.hasError('maxValue')\">- Invalid</em>\n <em *ngIf=\"form.controls.font_size.hasError('minValue')\">- Invalid</em>\n <input [ngClass]=\"['form-control', form.controls.font_size.valid ? 'is-valid' : 'is-invalid']\" type=\"number\" formControlName=\"font_size\" (keyup)=\"changePrimaryFontSize()\">\n <div class=\"invalid-feedback\" *ngIf=\"form.controls.font_size.hasError('required')\">Font size is required</div>\n <div class=\"invalid-feedback\" *ngIf=\"form.controls.font_size.hasError('wholeNumbersGreaterThanZero')\">Font size is invalid</div>\n <div class=\"invalid-feedback\" *ngIf=\"form.controls.font_size.hasError('maxValue')\">Font size can not exceed 18</div>\n <div class=\"invalid-feedback\" *ngIf=\"form.controls.font_size.hasError('minValue')\">Font size can not be less than 8</div>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-6\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Starting Page</label>\n <select [ngClass]=\"['form-control', form.controls.opening_route.valid ? 'is-valid' : '']\" formControlName=\"opening_route\">\n <option value=\"/home\">Home</option>\n <option *ngFor=\"let view of views\" [value]=\"view.value\">{{view.display | titleCase}}</option>\n </select>\n </div>\n </div>\n <div class=\"col-lg-6\" *ngIf=\"client === 'Ace Completions'\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Routing Preference</label>\n <select [ngClass]=\"['form-control', form.controls.routing_preference.valid ? 'is-valid' : '']\" formControlName=\"routing_preference\">\n <option value=\"alwaysAsk\">Always Ask</option>\n <option value=\"sameTab\">Same Tab</option>\n <option value=\"newTab\">New Tab</option>\n <option value=\"newWindow\">New Window</option>\n </select>\n </div>\n </div>\n </div>\n </ng-template>\n </ngb-panel>\n <ngb-panel id=\"tableOptions\">\n <ng-template ngbPanelTitle>\n <div> \n <label class=\"label-accordion\">Table Options</label>\n <i *ngIf=\"!acc.activeIds.includes('tableOptions')\" class=\"fa fa-plus pull-right\" aria-hidden=\"true\"></i>\n <i *ngIf=\"acc.activeIds.includes('tableOptions')\" class=\"fa fa-minus pull-right\" aria-hidden=\"true\"></i>\n </div>\n </ng-template>\n <ng-template ngbPanelContent>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <collapse-table> \n <thead>\n <tr>\n <th>\n Primary Table\n </th>\n </tr>\n </thead>\n </collapse-table>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-6\">\n <dl>\n <dt>Primary Table Background:</dt>\n <dd>\n <div class=\"form-group\">\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.table_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"table_color\" (ngModelChange)=\"changePrimaryColor()\">\n </div>\n </dd>\n </dl>\n </div>\n <div class=\"col-lg-6\">\n <dl>\n <dt>Primary Table Font:</dt>\n <dd>\n <div class=\"form-group\">\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.table_font_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"table_font_color\" (ngModelChange)=\"changePrimaryFontColor()\">\n </div>\n </dd>\n </dl>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <collapse-table secondaryColor=\"true\"> \n <thead>\n <tr>\n <th>\n Secondary Table\n </th>\n </tr>\n </thead>\n </collapse-table>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-6\">\n <dl>\n <dt>Secondary Table Background:</dt>\n <dd>\n <div class=\"form-group\">\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.secondary_table_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"secondary_table_color\" (ngModelChange)=\"changeSecondaryColor()\">\n </div>\n </dd>\n </dl>\n </div>\n <br>\n <div class=\"col-lg-6\">\n <dl>\n <dt>Secondary Table Font:</dt>\n <dd>\n <div class=\"form-group\">\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.secondary_table_font_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"secondary_table_font_color\" (ngModelChange)=\"changeSecondaryFontColor()\">\n </div>\n </dd>\n </dl>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <collapse-table tertiaryColor=\"true\"> \n <thead>\n <tr>\n <th>\n Tertiary Table\n </th>\n </tr>\n </thead>\n </collapse-table>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-6\">\n <dl>\n <dt>Tertiary Table Background:</dt>\n <dd>\n <div class=\"form-group\">\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.tertiary_table_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"tertiary_table_color\" (ngModelChange)=\"changeTertiaryColor()\">\n </div>\n </dd>\n </dl>\n </div>\n <div class=\"col-lg-6\">\n <dl>\n <dt>Tertiary Table Font:</dt>\n <dd>\n <div class=\"form-group\">\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.tertiary_table_font_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"tertiary_table_font_color\" (ngModelChange)=\"changeTertiaryFontColor()\">\n </div>\n </dd>\n </dl>\n </div>\n </div>\n </ng-template>\n </ngb-panel>\n <ngb-panel id=\"buttonOptions\">\n <ng-template ngbPanelTitle>\n <div> \n <label class=\"label-accordion\">Button Options</label>\n <i *ngIf=\"!acc.activeIds.includes('buttonOptions')\" class=\"fa fa-plus pull-right\" aria-hidden=\"true\"></i>\n <i *ngIf=\"acc.activeIds.includes('buttonOptions')\" class=\"fa fa-minus pull-right\" aria-hidden=\"true\"></i>\n </div>\n </ng-template>\n <ng-template ngbPanelContent>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <button type=\"button\" class=\"btn btn-success\">Success</button>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Success Button Background:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.success_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"success_color\" (ngModelChange)=\"changeSuccessColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Success Button Font:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.success_font_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"success_font_color\" (ngModelChange)=\"changeSuccessFontColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Success Button Hover:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.success_hover_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"success_hover_color\" (ngModelChange)=\"changeSuccessHoverColor()\">\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <button type=\"button\" class=\"btn btn-warning\">Warning</button>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Warning Button Background:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.warning_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"warning_color\" (ngModelChange)=\"changeWarningColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Warning Button Font:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.warning_font_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"warning_font_color\" (ngModelChange)=\"changeWarningFontColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Warning Button Hover:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.warning_hover_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"warning_hover_color\" (ngModelChange)=\"changeWarningHoverColor()\">\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <button type=\"button\" class=\"btn btn-danger\">Danger</button>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Danger Button Background:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.danger_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"danger_color\" (ngModelChange)=\"changeDangerColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Danger Button Font:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.danger_font_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"danger_font_color\" (ngModelChange)=\"changeDangerFontColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Danger Button Hover:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.danger_hover_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"danger_hover_color\" (ngModelChange)=\"changeDangerHoverColor()\">\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <button type=\"button\" class=\"btn btn-info\">Info</button>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Info Button Background:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.info_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"info_color\" (ngModelChange)=\"changeInfoColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Info Button Font:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.info_font_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"info_font_color\" (ngModelChange)=\"changeInfoFontColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Info Button Hover:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.info_hover_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"info_hover_color\" (ngModelChange)=\"changeInfoHoverColor()\">\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <button type=\"button\" class=\"btn btn-primary\">Primary</button>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Primary Button Background:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.primary_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"primary_color\" (ngModelChange)=\"changePrimaryButtonColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Primary Button Font:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.primary_font_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"primary_font_color\" (ngModelChange)=\"changePrimaryButtonFontColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Primary Button Hover:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.primary_hover_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"primary_hover_color\" (ngModelChange)=\"changePrimaryHoverColor()\">\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <button type=\"button\" class=\"btn btn-secondary\">Secondary</button>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Secondary Button Background:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.secondary_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"secondary_color\" (ngModelChange)=\"changeSecondaryButtonColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Secondary Button Font:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.secondary_font_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"secondary_font_color\" (ngModelChange)=\"changeSecondaryButtonFontColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Secondary Button Hover:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.secondary_hover_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"secondary_hover_color\" (ngModelChange)=\"changeSecondaryHoverColor()\">\n </div>\n </div>\n </div>\n </ng-template>\n </ngb-panel>\n </ngb-accordion>\n </div>\n <div class=\"row\" style=\"padding-top: 15px;\">\n <form-button [form]=\"form\" [disabled]=\"disableFormButton\"></form-button>\n </div>\n </form>\n</div>","\nimport { ModuleWithProviders } from '@angular/core';\nimport { Routes, RouterModule, Route } from '@angular/router';\nimport { UserSettingsComponent } from './user-settings.component';\nimport { UsersSettingsComponent } from './settings/users-settings.component';\n\nconst routes: Routes = [{ \n\tpath: 'user-settings',\n\tcomponent: UserSettingsComponent,\n\tchildren: [\n\t\t{ path: 'settings', component: UsersSettingsComponent },\n\t\t{ path: '**', redirectTo: 'settings' }\n\t]}\n];\n\nexport const UserSettingsRouting: ModuleWithProviders<Route> = RouterModule.forChild(routes);\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { DatatableModel, DatatableColumn } from './data-table.model';\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\n\n@Component({\n\tproviders: [ProviderService],\n\tselector: 'data-table',\n\ttemplateUrl: './data-table.component.html'\n})\n\nexport class DatatableComponent extends BaseComponent { \n\t@Input() urlClick: string;\n\t@Input() columns: Array<DatatableColumn[]>;\n\t@Input() data: any[];\n\t@Input() collapseSize: number;\n\t@Input() searchTitle: string;\n\t@Input() totalItems = 1000;\n\t@Output() onChangeTableData = new EventEmitter<Object>();\n\t@Input() tableData: DatatableModel;\n\n\tconstructor(private _services: ProviderService) {\n\t\tsuper(_services);\n\t}\n\n\tchangeTableData() {\n\t\tthis.onChangeTableData.emit();\n\t}\n\n\tsortColumn(colName) {\n\t\tif (this.tableData.sortColumn === colName) {\n\t\t\tif (this.tableData.sortOrder === 'desc') {\n\t\t\t\tthis.tableData.sortOrder = 'asc';\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.tableData.sortOrder = 'desc';\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.tableData.sortOrder = 'asc';\n\t\t\tthis.tableData.sortColumn = colName;\n\t\t}\n\n\t\tthis.changeTableData();\n\t}\n\n\tnavigateTo(id: string, column: string) {\n\t\tif (column !== 'file_key' && id && this.urlClick) {\n\t\t\tthis._services._router.navigateByUrl(this.urlClick + id);\n\t\t}\n\t}\n\n\topenFile(file_key: string) {\n\t\tthis._services._socket.call('getSignedUrl', file_key, 900, (err, res) => {\n\t\t\tif (res) {\n\t\t\t\twindow.open(res);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._services._socket.call('insertErrorLog', 'Widgets-datatable - getsignedurl', [\n\t\t\t\t\tfile_key, err\n\t\t\t\t]);\n\t\t\t}\n\t\t});\n\t}\n\n\ttypeOf(data) {\n\t\treturn typeof(data);\n\t}\n}\n","<style>\n .orangeRow { \n background-color: orangered;\n }\n\n collapse-table tr:hover {\n background-color: lightblue;\n cursor: pointer;\n }\n\n collapse-table {\n width: 100%;\n }\n</style>\n\n<div class=\"row\">\n <div class=\"input-group\">\n <span class=\"input-group-btn\">\n <button class=\"btn btn-primary\" type=\"button\" (click)=\"changeTableData()\">Search!</button>\n </span>\n <input type=\"text\" class=\"form-control\" placeholder=\"{{searchTitle}}\" [(ngModel)]=\"tableData.searchString\" (keyup.enter)=\"changeTableData()\" style=\"z-index: 0\">\n </div>\n</div>\n<div class=\"row\" style=\"padding-top: 20px;\">\n <collapse-table [collapseSize]=\"collapseSize\" headerFixed=\"true\">\n <thead>\n <tr>\n <th *ngFor=\"let column of columns\" (click)=\"sortColumn(column.data)\" style=\"cursor:pointer\">\n {{column.name}}\n <i *ngIf=\"tableData.sortColumn == column.data && tableData.sortOrder === 'desc'\" class=\"fa fa-caret-down\"></i>\n <i *ngIf=\"tableData.sortColumn == column.data && tableData.sortOrder === 'asc'\" class=\"fa fa-caret-up\"></i>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let item of data\" [ngClass]=\"{'orangeRow': item['color_red']}\">\n <td *ngFor=\"let column of columns\" (click)=\"navigateTo(item['_id'], column.data)\" [attr.data-label]=\"column.name\">\n <span *ngIf=\"typeOf(item[column.data]) !== 'boolean' && column.data !== 'cost' && column.data !== 'wells' && column.data !== 'cost_total' && column.data !== 'price' && column.data !== 'date' && column.data !== 'date_created' && column.data !== 'date_delivered' && column.data !== 'quantity' && column.data !== 'quantity_string' && column.data !== 'min_stock' && column.data !== 'max_stock' && column.data !== 'file_key' && column.data !== 'date_in'\">{{column.subData ? item[column.data][column.subData] : item[column.data]}}</span>\n <span *ngIf=\"column.data === 'cost' || column.data === 'price' || column.data === 'cost_total'\">{{item[column.data] | currency:'USD':'symbol':\"1.2-2\"}}</span>\n <span *ngIf=\"column.data === 'date' || column.data === 'date_created' || column.data === 'date_delivered'\">{{item[column.data] | date:'short'}}</span>\n <span *ngIf=\"column.data === 'quantity' || column.data === 'min_stock' || column.data === 'max_stock'\">{{item[column.data] | number}}</span>\n <span *ngIf=\"column.data === 'quantity_string'\">{{item[column.data] | number}}</span>\n <span *ngIf=\"column.data === 'wells'\"><pre>{{item[column.data]}}</pre></span>\n <span *ngIf=\"column.data === 'file_key'\">\n <button type=\"button\" (click)=\"openFile(item[column.data])\" class=\"btn btn-secondary\">Open File</button>\n <!-- <button type=\"button\" class=\"btn btn-warning\" (click)=\"viewDeletedReason(item)\" *ngIf=\"item.deleted.is_deleted\">View Deleted Reason</button> -->\n </span>\n <span *ngIf=\"typeOf(item[column.data]) === 'boolean'\">\n <i *ngIf=\"item[column.data]\" class=\"fa fa-check\" style=\"color: green; font-size: 18px;\" aria-hidden=\"true\"></i>\n <i *ngIf=\"!item[column.data]\" class=\"fa fa-times\" style=\"color: red; font-size: 18px;\" aria-hidden=\"true\"></i>\n </span>\n </td>\n </tr>\n </tbody>\n </collapse-table> \n</div>\n<hr />\n<div class=\"row\">\n <div class=\"col-lg-4\">\n <div class=\"row\"> \n <div class=\"col-lg-8\">\n <label class=\"form-control-label\">Entries Per Page</label>\n <select class=\"form-control\" [(ngModel)]=\"tableData.entriesPerPage\" (ngModelChange)=\"changeTableData()\">\n <option value=\"25\">25</option>\n <option value=\"50\">50</option>\n <option value=\"100\">100</option>\n <option value=\"250\">250</option>\n </select>\n </div>\n </div>\n </div>\n <div class=\"col-lg-8\" style=\"margin-top: 16px;\">\n <ngb-pagination class=\"float-right\"\n boundaryLinks=\"true\"\n [collectionSize]=\"totalItems\"\n directionLinks=\"true\"\n ellipses=\"false\"\n [(page)]=\"tableData.pageNum\"\n maxSize=\"6\"\n [pageSize]=\"tableData.entriesPerPage\"\n rotate=\"true\"\n (pageChange)=\"changeTableData()\"\n >\n </ngb-pagination>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { NgbModule } from '@ng-bootstrap/ng-bootstrap';\nimport { FormsModule } from '@angular/forms';\t\nimport { CommonModule } from '@angular/common';\n\nimport { RouterModule } from '@angular/router';\n\nimport { CollapseTableModule } from '../collapse-table/collapse-table.module';\n\n\nimport { DatatableComponent } from './data-table.component';\t\t\t\n\n@NgModule({\n\timports: [\n\t\tNgbModule,\n\t\tFormsModule,\n\t\tCommonModule,\n\t\tRouterModule,\n\t\tCollapseTableModule\n\t],\n\texports: [\n\t\tDatatableComponent\n\t],\n\tdeclarations: [\n\t\tDatatableComponent\n\t],\n\tproviders: [ ]\n})\nexport class DatatableModule { }\n","import { Component, Input, Output, OnInit, OnDestroy, EventEmitter, ViewChild } from '@angular/core';\nimport { Validators } from '@angular/forms';\nimport { DialogService } from '../dialog/dialog.service';\nimport { HttpClient } from '@angular/common/http';\nimport { FileModel } from '../../models/file.model';\nimport { BaseComponent, ProviderService } from '../../resolveio-class';\nimport { ResizeService } from '../../util/window-resize.service';\n\n@Component({\n\tselector: 'file-upload',\n\ttemplateUrl: './file-upload.component.html'\n})\nexport class FileUploadComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\tconstructor(private _resize: ResizeService, private _services: ProviderService, private _ds: DialogService, private _http: HttpClient) {\n\t\tsuper(_services);\n\t}\n\n\t@Input() files: FileModel[] = [];\n\t@Input() allowDelete = false;\n\t@Input() allowReplace = false;\n\t@Input() showFileUpload = true;\n\t@Output() filesChanged = new EventEmitter();\n\t@Output() fileAdded = new EventEmitter();\n\t@Output() fileRemoved = new EventEmitter();\n\t@Input() fileType: string; \n\n\t@ViewChild('download_link', {static: true}) download_link;\n\n\tsupportedFileTypes: string[] = ['application/pdf', 'text/plain', 'image/gif', 'image/png', 'image/jpeg', 'image/bmp'];\n\n\tpdfSrc = '';\n\treplaceFileIndex = 0;\n\n\tisUploading = false;\n\tprogressMsg = '';\n\n\twindowSize$;\n\twindowSize = 0;\n\n\tngOnInit() {\n\t\tthis.windowSize$ = this._resize.onResize$.subscribe((val) => {\n\t\t\tif (val) {\n\t\t\t\tthis.windowSize = val.innerWidth;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.windowSize = window.innerWidth;\n\t\t\t}\n\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis.windowSize$.unsubscribe();\n\t}\n\n\tdragFileAccepted(file) {\n\t\tif (this.supportedFileTypes.indexOf(file.type) >= 0) {\n\t\t\tthis.uploadWithEmit(file, 'misc').then(() => {}, (err) => {\n\t\t\t\tthis._ds.error('Could not upload file, incorrect type');\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tthis._ds.error('Invalid format, the supported file types are: ' + this.supportedFileTypes);\n\t\t}\n\t}\n\n\tupload(file: File, type: string, order?: number, fileName?: string, status?: string) {\n\n\t\treturn new Promise ((resolve, reject) => {\n\n\t\t\tthis.progressMsg = 'Uploading ' + (fileName ? fileName : file.name);\n\n\t\t\tthis._services._aws.uploadFile(file, type, order, fileName).then((res: FileModel) => {\n\t\t\t\tconst item = {\n\t\t\t\t\t_id: res._id,\n\t\t\t\t\tname: fileName ? fileName : file.name,\n\t\t\t\t\tsize: file.size, \n\t\t\t\t\tstatus: status ? status : 'Uploaded',\n\t\t\t\t\tkey: res.key,\n\t\t\t\t\torder: order ? order : -1, \n\t\t\t\t\ttype: type\n\t\t\t\t};\n\n\t\t\t\tthis.isUploading = false;\n\n\t\t\t\tthis.files.push(item);\n\n\t\t\t\tthis.files = this.files.sort((a, b) => {\n\t\t\t\t\treturn a.order - b.order;\n\t\t\t\t});\n\n\t\t\t\tresolve(item);\n\t\t\t}, rej => {reject(rej); });\n\n\t\t\tthis.isUploading = true;\n\t\t});\n\t}\n\n\tuploadWithEmit(file: File, type: string, order?: number, fileName?: string, status?: string) {\n\n\t\treturn new Promise ((resolve, reject) => {\n\n\t\t\tthis.progressMsg = 'Uploading ' + (fileName ? fileName : file.name);\n\n\t\t\tthis._services._aws.uploadFile(file, type, order, fileName).then((res: FileModel) => {\n\n\t\t\t\tconst item = {\n\t\t\t\t\t_id: res._id,\n\t\t\t\t\tname: fileName ? fileName : file.name,\n\t\t\t\t\tsize: file.size, \n\t\t\t\t\tstatus: status ? status : 'Uploaded',\n\t\t\t\t\tkey: res.key,\n\t\t\t\t\torder: order ? order : -1, \n\t\t\t\t\ttype: type\n\t\t\t\t};\n\n\t\t\t\tthis.isUploading = false;\n\n\t\t\t\tthis.files = this.files.sort((a, b) => {\n\t\t\t\t\treturn a.order - b.order;\n\t\t\t\t});\n\n\t\t\t\tthis.fileAdded.emit(item);\n\n\t\t\t\tresolve(item);\n\t\t\t}, rej => {reject(rej); });\n\n\t\t\tthis.isUploading = true;\n\t\t});\n\t}\n\n\tdelete(index: number, confirm: boolean = true) {\n\t\tthis.pdfSrc = '';\n\t\tif (confirm) {\n\t\t\tthis._ds.confirm('Are you sure you want to delete this file?').then(yes => {\n\n\t\t\t\tthis._services._aws.deleteFile(this.files[index].key, (err, res) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\tthis._ds.error('Could not delete file');\n\t\t\t\t\t\tthis._services._socket.call('insertErrorLog', 'Widgets.File-Upload - Delete File', [\n\t\t\t\t\t\t\tthis.files[index].key,\n\t\t\t\t\t\t\terr\n\t\t\t\t\t\t]);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tthis.files.splice(index, 1);\n\t\t\t}, cancel => {});\n\t\t}\n\t\telse {\n\t\t\tthis._services._aws.deleteFile(this.files[index].key, (err, res) => {\n\t\t\t\tif (err) {\n\t\t\t\t\tthis._services._socket.call('insertErrorLog', 'Widgets.File-Upload - Delete File', [\n\t\t\t\t\t\tthis.files[index].key,\n\t\t\t\t\t\terr\n\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.files.splice(index, 1);\n\t\t}\n\t}\n\n\tdeleteWithEmit(index: number, confirm: boolean = true) {\n\t\tthis.pdfSrc = '';\n\n\t\tlet file = Object.assign({}, this.files[index]);\n\t\t\n\t\tif (confirm) {\n\t\t\tthis._ds.confirm('Are you sure you want to delete this file?').then(yes => {\n\n\t\t\t\tthis._services._aws.deleteFile(this.files[index].key, (err, res) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\tthis._ds.error('Could not delete file');\n\t\t\t\t\t\tthis._services._socket.call('insertErrorLog', 'Widgets.File-Upload - Delete File', [\n\t\t\t\t\t\t\tthis.files[index].key,\n\t\t\t\t\t\t\terr\n\t\t\t\t\t\t]);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.fileRemoved.emit(file);\n\t\t\t\t});\n\t\t\t}, cancel => {});\n\t\t}\n\t\telse {\n\t\t\tthis._services._aws.deleteFile(this.files[index].key, (err, res) => {\n\t\t\t\tif (err) {\n\t\t\t\t\tthis._services._socket.call('insertErrorLog', 'Widgets.File-Upload - Delete File', [\n\t\t\t\t\t\tthis.files[index].key,\n\t\t\t\t\t\terr\n\t\t\t\t\t]);\n\t\t\t\t}\n\n\t\t\t\tthis.fileRemoved.emit(file);\n\t\t\t});\n\t\t}\n\t}\n\n\tdeleteFileWithId(id: string) {\n\t\tthis.delete(this.files.map(a => a._id).indexOf(id), false);\n\t}\n\n\topen(file) {\n\t\tthis._services._socket.call('getSignedUrl', file.key, 900, (err, res) => {\n\t\t\tif (res) {\n\t\t\t\twindow.open(res);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._services._socket.call('insertErrorLog', 'Widgets-file - getsignedurl', [\n\t\t\t\t\tfile.key, err\n\t\t\t\t]);\n\t\t\t}\n\t\t});\n\t}\n\n\tsetPDFViewerSrc(file) {\n\t\tthis._services._socket.call('getSignedUrl', file.key, 900, (err, res) => {\n\t\t\tif (res) {\n\t\t\t\tthis.pdfSrc = res;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._ds.error('Could not get signed url for file');\n\t\t\t\tthis._services._socket.call('insertErrorLog', 'Widgets-file - getsignedurl pdfviewer', [\n\t\t\t\t\tfile.key, err\n\t\t\t\t]);\n\t\t\t}\n\t\t});\n\t}\n\n\tonFileSelect(data) {\n\t\tthis.uploadWithEmit(data.target.files[0], this.fileType ? this.fileType : 'misc').then(() => {}, () => {});\n\n\t\tdata.srcElement.value = '';\n\t}\n\n\tonFileSelectReplace(data) { // TODO: If BOL file replaced, change BOL id_file\n\t\tif (data.target.files[0]) {\n\t\t\tlet oldFileId = this.files[this.replaceFileIndex]._id;\n\t\t\t\n\t\t\tlet type = this.files[this.replaceFileIndex].type;\n\t\t\tlet order = this.files[this.replaceFileIndex].order;\n\t\t\tlet fileExtension = this.files[this.replaceFileIndex].name.replace(/\\.[^\\.]+$/, '') + '.' + data.target.files[0].name.split('.')[data.target.files[0].name.split('.').length - 1];\n\t\t\tlet status = this.files[this.replaceFileIndex].status;\n\n\t\t\tthis.deleteWithEmit(this.replaceFileIndex, false);\n\n\t\t\tif (status === 'Unsigned') {\n\t\t\t\tthis._ds.confirm('Are you replacing this file with a signed copy?').then(yes => {\n\t\t\t\t\tthis.uploadWithEmit(data.target.files[0], type, order, fileExtension, 'Signed').then(res => {\n\t\t\t\t\t\tlet newFileKey = res['key'];\n\t\t\t\t\t\tlet newFileId = res['_id'];\n\n\t\t\t\t\t\tif (type === 'BOL') {\t\t\t\t\t\t\n\t\t\t\t\t\t\t// MeteorObservable.subscribe('bolWithFileId', oldFileId).first().subscribe(() => {\n\t\t\t\t\t\t\t// \tlet bol = BOLs.findOne({id_file: oldFileId});\n\n\t\t\t\t\t\t\t// \tif (!bol) {\n\t\t\t\t\t\t\t// \t\tthis._zone.run(() => {\n\t\t\t\t\t\t\t// \t\t\tthis._ds.error('Could not find BOL to update file');\n\t\t\t\t\t\t\t// \t\t});\n\t\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t\t// \telse {\n\t\t\t\t\t\t\t// \t\t// bol.id_file = newFileId;\n\t\t\t\t\t\t\t// \t\t// bol.file_key = newFileKey;\n\n\t\t\t\t\t\t\t// \t\t// Meteor.call('updateDocumentProps', 'bols', bol._id, \n\t\t\t\t\t\t\t// \t\t// [\n\t\t\t\t\t\t\t// \t\t// \t{prop: 'id_file', data: bol.id_file},\n\t\t\t\t\t\t\t// \t\t// \t{prop: 'file_key', data: bol.file_key},\n\t\t\t\t\t\t\t// \t\t// \t{prop: 'file_status', data: 'Signed'}\n\t\t\t\t\t\t\t// \t\t// ], 'BOL', (errBOL, resBOL) => {\n\t\t\t\t\t\t\t// \t\t// \tthis._zone.run(() => {\n\t\t\t\t\t\t\t// \t\t// \t\tif (resBOL) {\n\t\t\t\t\t\t\t// \t\t// \t\t\tthis._alert.setAlert('success', 'BOL file has been replaced');\n\t\t\t\t\t\t\t// \t\t// \t\t\tMeteor.call('replaceBOLNotificationJob', bol, (errNot, resNot) => {\n\t\t\t\t\t\t\t// \t\t// \t\t\t\tif (errNot) {\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t\tMeteor.call('insertErrorLog', 'Widgets-file - method replacebolnotification', [\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t\t\tbol, this.job, errNot\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t\t]);\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t}\n\t\t\t\t\t\t\t// \t\t// \t\t\t});\n\t\t\t\t\t\t\t// \t\t// \t\t\tdata.srcElement.value = '';\n\t\t\t\t\t\t\t// \t\t// \t\t}\n\t\t\t\t\t\t\t// \t\t// \t\telse {\n\t\t\t\t\t\t\t// \t\t// \t\t\tthis._ds.error('Could not update BOL file');\n\t\t\t\t\t\t\t// \t\t// \t\t\tMeteor.call('insertErrorLog', 'Widgets-file - update bol', [\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t{prop: 'id_file', data: bol.id_file},\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t{prop: 'file_key', data: bol.file_key},\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t{prop: 'file_status', data: bol.file_status}, \n\t\t\t\t\t\t\t// \t\t// \t\t\t\terrBOL\n\t\t\t\t\t\t\t// \t\t// \t\t\t]);\n\t\t\t\t\t\t\t// \t\t// \t\t\tdata.srcElement.value = '';\n\t\t\t\t\t\t\t// \t\t// \t\t}\n\t\t\t\t\t\t\t// \t\t// \t});\n\t\t\t\t\t\t\t// \t\t// });\n\t\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t\t// });\n\t\t\t\t\t\t}\n\t\t\t\t\t}, err => {});\n\t\t\t\t}, no => {\n\t\t\t\t\tthis.uploadWithEmit(data.target.files[0], type, order, fileExtension).then(res => {\n\t\t\t\t\t\tlet newFileKey = res['key'];\n\t\t\t\t\t\tlet newFileId = res['_id'];\n\n\t\t\t\t\t\tif (type === 'BOL') {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// MeteorObservable.subscribe('bolWithFileId', oldFileId).first().subscribe(() => {\n\t\t\t\t\t\t\t// \tlet bol = BOLs.findOne({id_file: oldFileId});\n\n\t\t\t\t\t\t\t// \tif (!bol) {\n\t\t\t\t\t\t\t// \t\tthis._zone.run(() => {\n\t\t\t\t\t\t\t// \t\t\tthis._ds.error('Could not find BOL to update file');\n\t\t\t\t\t\t\t// \t\t});\n\t\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t\t// \telse {\n\t\t\t\t\t\t\t// \t\t// bol.id_file = newFileId;\n\t\t\t\t\t\t\t// \t\t// bol.file_key = newFileKey;\n\n\t\t\t\t\t\t\t// \t\t// Meteor.call('updateDocumentProps', 'bols', bol._id, \n\t\t\t\t\t\t\t// \t\t// [\n\t\t\t\t\t\t\t// \t\t// \t{prop: 'id_file', data: bol.id_file},\n\t\t\t\t\t\t\t// \t\t// \t{prop: 'file_key', data: bol.file_key}\n\t\t\t\t\t\t\t// \t\t// ], 'BOL', (errUpBOL, resUpBOL) => {\n\t\t\t\t\t\t\t// \t\t// \tthis._zone.run(() => {\n\t\t\t\t\t\t\t// \t\t// \t\tif (resUpBOL) {\n\t\t\t\t\t\t\t// \t\t// \t\t\tthis._alert.setAlert('success', 'BOL file has been replaced');\n\t\t\t\t\t\t\t// \t\t// \t\t\tMeteor.call('replaceBOLNotificationJob', bol, (errNot, resNot) => {\n\t\t\t\t\t\t\t// \t\t// \t\t\t\tif (errNot) {\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t\tMeteor.call('insertErrorLog', 'Widgets-file - method replacebolnotification', [\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t\t\tbol, this.job, errNot\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t\t]);\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t}\n\t\t\t\t\t\t\t// \t\t// \t\t\t});\n\t\t\t\t\t\t\t// \t\t// \t\t\tdata.srcElement.value = '';\n\t\t\t\t\t\t\t// \t\t// \t\t}\n\t\t\t\t\t\t\t// \t\t// \t\telse {\n\t\t\t\t\t\t\t// \t\t// \t\t\tthis._ds.error('Could not update BOL file');\n\t\t\t\t\t\t\t// \t\t// \t\t\tMeteor.call('insertErrorLog', 'Widgets-file - update bol', [\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t{prop: 'id_file', data: bol.id_file},\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t{prop: 'file_key', data: bol.file_key}, errUpBOL\n\t\t\t\t\t\t\t// \t\t// \t\t\t]);\n\t\t\t\t\t\t\t// \t\t// \t\t\tdata.srcElement.value = '';\n\t\t\t\t\t\t\t// \t\t// \t\t}\n\t\t\t\t\t\t\t// \t\t// \t});\n\t\t\t\t\t\t\t// \t\t// });\n\t\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t\t// });\n\t\t\t\t\t\t}\n\t\t\t\t\t}, err => {});\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.uploadWithEmit(data.target.files[0], type, order, fileExtension).then(res => {\n\n\t\t\t\t\tlet newFileKey = res['key'];\n\t\t\t\t\tlet newFileId = res['_id'];\n\n\t\t\t\t\tif (type === 'BOL') {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// MeteorObservable.publications.bolWithFileId(oldFileId).first().subscribe(() => {\n\t\t\t\t\t\t// \tlet bol = BOLs.findOne({id_file: oldFileId});\n\n\t\t\t\t\t\t// \tif (!bol) {\n\t\t\t\t\t\t// \t\tthis._zone.run(() => {\n\t\t\t\t\t\t// \t\t\tthis._ds.error('Could not find BOL to update file');\n\t\t\t\t\t\t// \t\t});\n\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t// \telse {\n\t\t\t\t\t\t// \t\t// bol.id_file = newFileId;\n\t\t\t\t\t\t// \t\t// bol.file_key = newFileKey;\n\n\t\t\t\t\t\t// \t\t// Meteor.methods.updateDocumentProps('bols', bol._id, \n\t\t\t\t\t\t// \t\t// [\n\t\t\t\t\t\t// \t\t// \t{prop: 'id_file', data: bol.id_file},\n\t\t\t\t\t\t// \t\t// \t{prop: 'file_key', data: bol.file_key}\n\t\t\t\t\t\t// \t\t// ], 'BOL', (errUpBOL, resUpBOL) => {\n\t\t\t\t\t\t// \t\t// \tthis._zone.run(() => {\n\t\t\t\t\t\t// \t\t// \t\tif (resUpBOL) {\n\t\t\t\t\t\t// \t\t// \t\t\tthis._alert.setAlert('success', 'BOL file has been replaced');\n\t\t\t\t\t\t// \t\t// \t\t\tMeteor.methods.replaceBOLNotificationJob(bol, (errNot, resNot) => {\n\t\t\t\t\t\t// \t\t// \t\t\t\tif (errNot) {\n\t\t\t\t\t\t// \t\t// \t\t\t\t\tMeteor.methods.insertErrorLog('Widgets-file - method replacebolnotification', [\n\t\t\t\t\t\t// \t\t// \t\t\t\t\t\tbol, this.job, errNot\n\t\t\t\t\t\t// \t\t// \t\t\t\t\t]);\n\t\t\t\t\t\t// \t\t// \t\t\t\t}\n\t\t\t\t\t\t// \t\t// \t\t\t});\n\t\t\t\t\t\t// \t\t// \t\t\tdata.srcElement.value = '';\n\t\t\t\t\t\t// \t\t// \t\t}\n\t\t\t\t\t\t// \t\t// \t\telse {\n\t\t\t\t\t\t// \t\t// \t\t\tthis._ds.error('Could not update BOL file');\n\t\t\t\t\t\t// \t\t// \t\t\tMeteor.methods.insertErrorLog('Widgets-file - update bol', [\n\t\t\t\t\t\t// \t\t// \t\t\t\t{prop: 'id_file', data: bol.id_file},\n\t\t\t\t\t\t// \t\t// \t\t\t\t{prop: 'file_key', data: bol.file_key}, errUpBOL\n\t\t\t\t\t\t// \t\t// \t\t\t]);\n\t\t\t\t\t\t// \t\t// \t\t\tdata.srcElement.value = '';\n\t\t\t\t\t\t// \t\t// \t\t}\n\t\t\t\t\t\t// \t\t// \t});\n\t\t\t\t\t\t// \t\t// });\n\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t// });\n\t\t\t\t\t}\n\t\t\t\t}, err => {});\n\t\t\t}\n\t\t}\n\t}\n\n\tuserIsInRole(role) {\n\t\treturn this._services._account.isUserInView(role);\n\t}\n\n\tisMobile() {\n\t\t// return Meteor.isCordova;\n\t}\n\n\tprivate downloadResource(url: string): Promise<Blob> {\n\t\treturn this._http.get<Blob>(url, {responseType: 'blob' as 'json'}).toPromise();\n\t}\n\t\n\tdownload(file: FileModel) {\n\t\tthis._services._socket.call('getSignedUrl', file.key, 900, async (err, res) => {\n\t\t\tif (res) {\n\t\t\t\tconst blob = await this.downloadResource(res); // this.files[\"0\"]._id\n\t\t\t\tconst url = window.URL.createObjectURL(blob);\n\n\t\t\t\tconst link = this.download_link.nativeElement;\n\t\t\t\tlink.href = url;\n\t\t\t\tlink.download = file.name;\n\t\t\t\tlink.click();\n\t\t\t\t\n\t\t\t\twindow.URL.revokeObjectURL(url);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._services._socket.call('insertErrorLog', 'Widgets-file - update bol', [\n\t\t\t\t\terr\n\t\t\t\t]);\n\t\t\t}\n\t\t});\n\t}\n\n\n\temail(file: FileModel) {\n\t\tthis._ds.input(\n\t\t\t'Email file to which address?', [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Email Address', \n\t\t\t\t\tform: 'email', \n\t\t\t\t\tdata: '', \n\t\t\t\t\tvalidators: [Validators.required, this._services._vs.email],\n\t\t\t\t\tvalidatorErrors: ['required', 'email'],\n\t\t\t\t\tvalidatorMsg: ['Email is required', 'Email is invalid'],\n\t\t\t\t\trequired: true\n\t\t\t\t}\n\t\t\t]\n\t\t).then(\n\t\t\tresultDialog => {\n\t\t\t\tthis._services._socket.call('emailFile', file._id, resultDialog.email.value, (err, res) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\tthis._ds.error('Could not send email: ' + err);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis._services._alert.setAlert('success', 'Email has been sent');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t\tcancelled => { }\n\t\t);\n\t}\n}\n","<style>\n \n html, body { height: 100%; }\n\n collapse-table tr:hover {\n background-color: lightblue;\n cursor: pointer;\n }\n\n collapse-table {\n width: 100%;\n }\n \n /* Label container: */\n .file {\n display: inline-block;\n padding: 0 0 0 0.5em;\n cursor: pointer;\n position: relative;\n border: .075rem solid #ddd;\n border-radius: .25rem;\n }\n \n /* The pseudo input field: */\n .file::before {\n content: \"\";\n display: block;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n z-index: -1;\n \n /* Bootstrap appearance: */\n background-color: #fff;\n border: .075rem solid #ddd;\n border-radius: .25rem;\n -webkit-box-shadow: inset 0 .2rem .4rem rgba(0,0,0,.05);\n box-shadow: inset 0 .2rem .4rem rgba(0,0,0,.05);\n }\n \n /* The pseudo button: */\n .file::after {\n content: \"Browse\";\n display: inline-block;\n \n /* Bootstrap appearance: */\n background-color: #eee;\n border: .075rem solid #ddd;\n border-radius: 0 .25rem .25rem 0;\n padding: .5rem 1rem;\n line-height: 1.5;\n color: #555;\n }\n \n .file input[type=file] {\n cursor: pointer;\n border: 0 none;\n width: 12em;\n }\n \n /* -webkit hide the button: */\n .file input[type=file]::-webkit-file-upload-button {\n border: 0;\n padding: 0;\n margin: 0 ;\n width: 0;\n background: transparent;\n } \n \n /* IE10+ hide the button: */\n .file input[type=file]::-ms-browse {\n padding: 0;\n margin: -1px;\n width: 0;\n border: 0;\n background: transparent;\n }\n \n .file input[type=file]::-ms-value {\n background: #fff;\n border: 0;\n }\n\n card {\n width: 100%;\n }\n</style>\n\n<a style=\"display: none\" #download_link></a>\n<input hidden type=\"file\" #fileInputReplace (change)=\"onFileSelectReplace($event)\" />\n \n<div class=\"card\">\n <div class=\"card-header\">\n <strong class=\"pull-left\">Files</strong>\n </div>\n <div class=\"card-block\">\n <div class=\"row\">\n <div class=\"col-lg-6\">\n <div class=\"row\" *ngIf=\"showFileUpload\">\n <div class=\"col-lg-6\">\n <div class=\"container\">\n <div style=\"margin: 10px 0px; font-weight: bold;\">Upload File</div>\n <label class=\"file\">\n <input type=\"file\" #fileInput (change)=\"onFileSelect($event)\" />\n </label>\n <br>\n <ngx-file-drop dropZoneLabel=\"Drop files here\" style=\"width: 223px; height: 112px; border: 1px black dashed; border-radius: 5px; justify-content: center;\" class=\"vertical-align\" (onFileDrop)=\"dragFileAccepted($event)\"></ngx-file-drop>\n </div>\n </div>\n <div class=\"col-lg-6\">\n <div *ngIf=\"isUploading\">\n <b>{{progressMsg || 'N/A'}}</b>\n </div>\n </div>\n </div>\n <div class=\"row\" style=\"margin-top: 10px;\">\n <div class=\"col-lg-12\" *ngIf=\"windowSize > 980\">\n <div style=\"text-align: center;\" *ngIf=\"pdfSrc\">\n <ngx-doc-viewer [url]=\"pdfSrc\" style=\"display: block;\"></ngx-doc-viewer>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-lg-6\">\n <div *ngIf=\"files && files.length\">\n <b>Uploaded Files</b>\n <div [style.max-height]=\"windowSize > 900 ? '300px' : ''\" [style.overflow-y]=\"windowSize > 900 ? 'auto' : ''\">\n <collapse-table collapseSize=\"900\">\n <thead>\n <tr>\n <th>File Name</th>\n <th>Size</th>\n <th>Type</th>\n <th>Actions</th>\n </tr>\n </thead> \n <tbody>\n <tr *ngFor=\"let file of files; let i = index\">\n <td data-label=\"File Name\" (click)=\"setPDFViewerSrc(file)\">{{file.name}}</td>\n <td data-label=\"Size\" (click)=\"setPDFViewerSrc(file)\">{{ file.size/1024/1024 | number:'.2' }} MB</td>\n <td data-label=\"Type\" (click)=\"setPDFViewerSrc(file)\">{{file.type}}</td>\n <td data-label=\"Actions\">\n <responsive-button-group collapseSize=\"900\">\n <button type=\"button\" class=\"btn btn-success\" (click)=\"open(file)\">Open</button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"download(file)\">Download</button>\n <button [hidden]=\"!allowDelete || (file.type !== 'misc' && !userIsInRole('super-admin'))\" type=\"button\" class=\"btn btn-danger\" (click)=\"deleteWithEmit(i)\">Delete</button>\n <button [hidden]=\"!allowDelete || (file.type !== 'misc' && !userIsInRole('super-admin'))\" type=\"button\" class=\"btn btn-danger\" (click)=\"fileInputReplace.click(); replaceFileIndex = i;\">Replace</button>\n <button type=\"button\" class=\"btn btn-warning\" (click)=\"email(file)\">Email</button>\n </responsive-button-group>\n </td>\n </tr>\n </tbody>\n </collapse-table>\n </div>\n </div>\n <div *ngIf=\"!files || !files.length\">\n <b>No Uploaded Files</b>\n </div>\n </div>\n </div>\n </div>\n</div>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { FileUploadComponent } from './file-upload.component';\nimport { CollapseTableModule } from '../collapse-table/collapse-table.module';\nimport { NgbModule } from '@ng-bootstrap/ng-bootstrap';\nimport { ResponsiveButtonGroupModule } from '../responsive-button-group/responsive-button-group.module';\nimport { NgxFileDropModule } from 'ngx-file-drop';\nimport { NgxDocViewerModule } from 'ngx-doc-viewer';\n\n@NgModule({\n\timports: [\n\t\tCommonModule,\n\t\tFormsModule,\n\t\tCollapseTableModule,\n\t\tNgbModule,\n\t\tResponsiveButtonGroupModule,\n\t\tNgxFileDropModule,\n\t\tNgxDocViewerModule\n\t],\n\tdeclarations: [\n\t\tFileUploadComponent\n\t],\n\texports: [\n\t\tFileUploadComponent\n\t]\n})\nexport class FileModule { }","import { NgModule } from '@angular/core';\nimport { SharedModule } from '../shared/shared.module';\n\nimport { UserSettingsRouting } from './user-settings.routing';\nimport { UserSettingsComponent } from './user-settings.component';\nimport { UserSettingsService } from './user-settings.service';\nimport { DatatableModule } from '../widgets/data-table/data-table.module';\nimport { FileModule } from '../widgets/file/file-upload.module';\nimport { UsersSettingsComponent } from './settings/users-settings.component';\n\n@NgModule({\n\timports: [\n\t\tSharedModule,\n\t\tUserSettingsRouting,\n\t\tDatatableModule,\n\t\tFileModule\n\t],\n\tdeclarations: [ \n\t\tUserSettingsComponent,\n\t\tUsersSettingsComponent\n\t],\n\tproviders: [\n\t\tUserSettingsService\n\t]\n})\nexport class UserSettingsModule { }\n","import { Component, OnInit } from '@angular/core';\nimport { NavbarModel } from '../widgets/navbar-module/navbar-module.model';\nimport { AuthService } from '../auth/auth.service';\n\nimport { ProviderService, BaseComponent } from '../resolveio-class';\nimport { Subscription } from 'rxjs';\nimport { FormGroup } from '@angular/forms';\nimport { HttpClient } from '@angular/common/http';\nimport { ActivatedRoute } from '@angular/router';\nimport { CoreService } from '../core.service';\n@Component({\n\tproviders: [ProviderService],\n\ttemplateUrl: './home.component.html'\n})\nexport class HomeComponent extends BaseComponent implements OnInit {\n\tmenuData: NavbarModel = {\n\t\ttitle: 'Home',\n\t\tmodule: null,\n\t\tdescription: null,\n\t\tdescription_name: null,\n\t\ttabs: [\n\t\t\t{'link': 'home', 'params': null, 'label': 'Home'}\n\t\t]\n\t};\n\n\tselectedSolution = 'Asset';\n\tsubscription$: Subscription[] = [];\n\tisLoggedIn: boolean;\n\tform: FormGroup;\n\n\tconstructor(private _route: ActivatedRoute, private auth: AuthService, private _services: ProviderService, private _http: HttpClient, private _app: CoreService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis._services._app.setNavbarModuleData(this.menuData);\n\n\t\tif (!this._app.isLoggingOut.getValue()) {\n\t\t\tif (this._services._account.getUser()) {\n\t\t\t\tif (this._services._account.getUser().settings && this._services._account.getUser().settings.opening_route && this._services._account.getUser().settings.opening_route !== '/home') {\n\t\t\t\t\tthis._services._router.navigateByUrl(this._services._account.getUser().settings.opening_route);\n\t\t\t\t}\n\t\t\t\telse if (this._services._router.url !== '/home') {\n\t\t\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.subscription$.push(this._services._account.user.subscribe(user => {\n\t\t\t\t\tif (user && user.settings && user.settings.opening_route && user.settings.opening_route !== '/home') {\n\t\t\t\t\t\tthis._services._router.navigateByUrl(user.settings.opening_route);\n\t\t\t\t\t}\n\t\t\t\t\telse if (this._services._router.url !== '/home') {\n\t\t\t\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t\t\t\t}\n\t\t\t\t}, () => {}));\n\t\t\t}\n\t\t}\n\t}\n\n\tngOnDestroy() {\n\t\tthis.subscription$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\t}\n}\n","<div style=\"height: 100%\">\n <div class=\"row\" style=\"margin-left: 0px; margin-right: 0px; height: 100%;\">\n <div class=\"col-lg-12\" style=\"height: 100%\">\n <div class=\"jumbotron jumbotron-fluid\" style=\"height: 100%; padding-bottom: 0px;\">\n <div class=\"container text-center\" style=\"height: 100%\">\n <img src=\"/assets/images/ResolveIO.png\" class=\"img-fluid\" alt=\"Responsive image\" style=\"height: 100%; width: auto; max-width: 750px; max-height: 525px;\">\n <p style=\"font-size: 24px; font-style: italic\">The All-in-One Solution for Tracking Inventory, Ordering, POs, Management, and Much More!</p>\n </div>\n </div>\n </div>\n </div> \n</div>","import { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { NgModule } from '@angular/core';\nimport { CoreComponent } from './core.component';\nimport { AccountManagerService } from './account-manager.service';\nimport { SocketManagerService } from './socket-manager.service';\nimport { DeviceDetectorService } from 'ngx-device-detector';\nimport { NgbModule } from '@ng-bootstrap/ng-bootstrap';\nimport { NavbarMainComponent } from './widgets/navbar-main/navbar-main.component';\nimport { NavbarModuleComponent } from './widgets/navbar-module/navbar-module.component';\nimport { LoggerComponent } from './logger/logger.component';\nimport { CoreService } from './core.service';\nimport { AuthService } from './auth/auth.service';\nimport { AuthGuard } from './auth/auth-guard.service';\nimport { CanDeactivateGuard } from './auth/can-deactivate-guard.service';\nimport { ValidationService } from './util/validation.service';\nimport { AuthPermissionService } from './auth/auth-permissions.service';\nimport { WindowRefService } from './util/window.service';\nimport { ToastrModule } from 'ngx-toastr';\nimport { AlertService } from './widgets/alert/alert.service';\nimport { AwsService } from './util/aws.service';\nimport { DialogService } from './widgets/dialog/dialog.service';\nimport { SocketService } from './socket.service';\nimport { TokenManagerService } from './token-manager.service';\nimport { NgxLocalStorageModule } from 'ngx-localstorage';\nimport { SharedModule } from './shared/shared.module';\nimport { OfflineManagerService } from './offline-manager.service';\nimport { FocusDirective } from './directive/focus';\nimport { ForgotPasswordComponent } from './auth/forgot-password.component';\nimport { EnrollComponent } from './auth/enroll.component';\nimport { DialogConfirmContent } from './widgets/dialog/dialog.confirm.content';\nimport { DialogErrorContent } from './widgets/dialog/dialog.error.content';\nimport { DialogInputContent } from './widgets/dialog/dialog.input.content';\nimport { DialogNotifyContent } from './widgets/dialog/dialog.notify.content';\nimport { DialogSelectDateTimeContent } from './widgets/dialog/dialog.select-datetime.content';\nimport { DialogSelectDataLabelsContent } from './widgets/dialog/dialog.select-data-labels.content';\nimport { DialogLoginContent } from './widgets/dialog/dialog.login.content';\nimport { HttpClientModule } from '@angular/common/http';\nimport { ScrollDirective } from './directive/scroll';\nimport { DialogRegisterContent } from './widgets/dialog/dialog.register.content';\nimport { Auth365Component } from './auth/auth365.component';\nimport { UserSettingsModule } from './user-settings/user-settings.module';\nimport { HomeComponent } from './home/home.component';\nimport { CollapseTableModule } from './widgets/collapse-table/collapse-table.module';\nimport { DialogSelectWithButtonsURLContent } from './widgets/dialog/dialog.select-with-buttons-url.content';\nimport { DialogSelectArrayObjsContent } from './widgets/dialog/dialog.select-array-objs.content';\n\n@NgModule({\n imports: [\n SharedModule,\n HttpClientModule,\n NgbModule,\n ToastrModule.forRoot(),\n NgxLocalStorageModule.forRoot({\n prefix: 'ResolveIO'\n }),\n UserSettingsModule,\n BrowserAnimationsModule,\n CollapseTableModule\n ],\n declarations: [\n CoreComponent,\n HomeComponent,\n LoggerComponent,\n NavbarMainComponent,\n NavbarModuleComponent,\n ForgotPasswordComponent,\n EnrollComponent,\n Auth365Component,\n FocusDirective,\n ScrollDirective,\n DialogConfirmContent,\n DialogErrorContent,\n DialogInputContent,\n DialogNotifyContent,\n DialogSelectDateTimeContent,\n DialogSelectDataLabelsContent,\n DialogLoginContent,\n DialogRegisterContent,\n DialogSelectWithButtonsURLContent,\n DialogSelectArrayObjsContent\n ],\n providers: [\n CoreService,\n AuthService,\n AuthGuard,\n CanDeactivateGuard,\n DialogService,\n ValidationService,\n AwsService,\n AuthPermissionService,\n WindowRefService,\n AlertService,\n SocketService,\n SocketManagerService,\n TokenManagerService,\n AccountManagerService,\n OfflineManagerService,\n DeviceDetectorService\n ],\n exports: [\n CoreComponent,\n HomeComponent,\n LoggerComponent,\n NavbarMainComponent,\n NavbarModuleComponent,\n ForgotPasswordComponent,\n EnrollComponent,\n Auth365Component,\n FocusDirective,\n ScrollDirective\n ]\n})\nexport class CoreModule { }\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable()\nexport class SupportTicketService {\n\n\tselectedSupportTicket = new BehaviorSubject('0');\n\n\tconstructor() {}\n\n\tsetSelectedSupportTicket(id: string) {\n\t\tthis.selectedSupportTicket.next(id);\n\t}\n}\n","import { Component, OnInit, OnDestroy, Input } from '@angular/core';\nimport { NavbarModel } from '../widgets/navbar-module/navbar-module.model';\nimport { SupportTicketService } from './support-ticket.service';\nimport { Subscription } from 'rxjs';\nimport { ProviderService, BaseComponent } from '../resolveio-class';\nimport { SupportTicketModel } from '../models/support-ticket.model';\n\n@Component({\n\tproviders: [ProviderService],\n\ttemplate: '<router-outlet></router-outlet>'\n})\n\nexport class SupportTicketComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\tselectedResolveIOSupport$: Subscription;\n\n\tmenuData: NavbarModel;\n\t\n\tconstructor(private _sts: SupportTicketService, private _services: ProviderService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis.selectedResolveIOSupport$ = this._sts.selectedSupportTicket.subscribe(\n\t\t\tval => this.selectedResolveIOSupportChanged(val)\n\t\t);\n\t}\n\n\tngOnDestroy() {\n\t\tthis._sts.setSelectedSupportTicket('0');\n\n\t\tthis.selectedResolveIOSupport$.unsubscribe();\n\t}\n\n\tselectedResolveIOSupportChanged(id: string) {\n\t\tif (id !== '0') {\n\t\t\tthis._services._socket.call('supportGetSupportTicketWithId', id, (err, res) => {\n\t\t\t\tif (!res) {\n\t\t\t\t\tthis.setResolveIOSupportModuleMenuData();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.setResolveIOSupportModuleMenuData(id, res);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tthis.setResolveIOSupportModuleMenuData();\n\t\t}\n\t}\n\n\tsetResolveIOSupportModuleMenuData(id?: string, st?: SupportTicketModel) {\n\t\tlet tabs = [];\n\n\t\ttabs.push({link: '/support-ticket/list', params: null, label: 'List', tourAnchor: 'navBarModuleSupportList'});\n\t\ttabs.push({link: '/support-ticket/new', params: null, label: 'New', tourAnchor: 'navBarModuleSupportNew'});\n\t\ttabs.push({link: '/support-ticket/detail', params: id || '0', label: 'Details'});\n\t\tif (this._services._account.isUserSuperAdmin() || (st && st.id_user_created === this._services._account.getUser()._id)) {\n\t\t\ttabs.push({link: '/support-ticket/edit', params: id || '0', label: 'Edit'});\n\t\t}\n\n\t\tthis.menuData = {\n\t\t\ttitle: 'Support Center',\n\t\t\tmodule: 'Support Ticket',\n\t\t\tdescription_name: 'Support Ticket #',\n\t\t\tdescription: st ? st.support_ticket_number_string : '',\n\t\t\ttabs: tabs\n\t\t};\n\n\t\tthis._services._app.setNavbarModuleData(this.menuData);\n\t}\n}\n","import { Component, OnInit, OnDestroy } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { SupportTicketService } from '../support-ticket.service';\nimport { Subscription } from 'rxjs';\nimport { DatatableModel, DatatableColumn } from '../../widgets/data-table/data-table.model';\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\nimport { SupportTicketModel } from '../../models/support-ticket.model';\nimport { PaginationOptions } from '../../models/pagination.model';\n\n@Component({\n\tproviders: [ProviderService],\n\ttemplateUrl: './support-ticket-list.component.html'\n})\nexport class SupportTicketListComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\troute$: Subscription;\n\n\tsupport_tickets: SupportTicketModel;\n\n\tsubscription$: Subscription[] = [];\n\n\tcolumns: Array<DatatableColumn> = [\n\t\t{ name: 'Support Ticket #', data: 'support_ticket_number'},\n\t\t{ name: 'Date Created', data: 'date_created'},\n\t\t{ name: 'Type', data: 'type' },\n\t\t{ name: 'Issue', data: 'issue' },\n\t\t{ name: 'Status', data: 'status'},\n\t\t{ name: 'Created By', data: 'user_created'}\n\t];\n\n\ttableData: DatatableModel = {\n\t\tsearchString: '',\n\t\tentriesPerPage: '25',\n\t\tpageNum: 1,\n\t\tsortColumn: '',\n\t\tsortOrder: 'desc',\n\t\tfilters: {\n\t\t\tstatus: 'Opened',\n\t\t\tsubstatus: 'All'\n\t\t}\n\t};\n\n\ttotalItems = 1000;\n\n\tconstructor(private _sts: SupportTicketService, private _route: ActivatedRoute, private _services: ProviderService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis._sts.setSelectedSupportTicket('0');\n\n\t\tthis.route$ = this._route.queryParams.subscribe(() => {\n\n\t\t\tlet keys = Object.keys(this.tableData);\n\t\t\tlet filterKeys = Object.keys(this.tableData.filters);\n\n\t\t\tif (this._route.snapshot.queryParamMap.keys.length) {\n\t\t\t\tkeys.splice(keys.indexOf('filters', 1));\n\n\t\t\t\tfilterKeys.forEach(key => {\n\t\t\t\t\tkeys.push('filters.' + key);\n\t\t\t\t});\n\n\t\t\t\tkeys.filter(a => a in this._route.snapshot.queryParams).forEach(key => {\n\t\t\t\t\tif (key.includes('filters.')) {\n\t\t\t\t\t\tlet tmpKey = key;\n\t\t\t\t\t\ttmpKey = tmpKey.replace('filters.', '');\n\t\t\t\t\t\tthis.tableData.filters[tmpKey] = this._route.snapshot.queryParams[key];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.tableData[key] = this._route.snapshot.queryParams[key];\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.tableData = {\n\t\t\t\t\tsearchString: '',\n\t\t\t\t\tentriesPerPage: '25',\n\t\t\t\t\tpageNum: 1,\n\t\t\t\t\tsortColumn: '',\n\t\t\t\t\tsortOrder: 'desc',\n\t\t\t\t\tfilters: {\n\t\t\t\t\t\tstatus: 'Opened',\n\t\t\t\t\t\tsubstatus: 'All'\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tthis.queryData();\n\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis.subscription$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\n\t\tthis.route$.unsubscribe();\n\t}\n\n\tonQueryDataChanged() {\n\t\tlet queryParams = {};\n\n\t\tlet keys = Object.keys(this.tableData);\n\t\tlet filterKeys = Object.keys(this.tableData.filters);\n\n\t\tkeys.forEach(key => {\n\t\t\tif (key === 'filters') {\n\t\t\t\tfilterKeys.forEach(filterKey => {\n\t\t\t\t\tqueryParams['filters.' + filterKey] = this.tableData.filters[filterKey];\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tqueryParams[key] = this.tableData[key];\n\t\t\t}\n\t\t});\n\n\t\tthis._services._router.navigate(['/support-ticket/list'], { queryParams } );\n\t}\n\n\tqueryData() {\n\n\t\tlet fields = {};\n\n\t\tthis.columns.forEach(col => {\n\t\t\tfields[col.data] = 1;\n\t\t});\n\n\t\tconst options: PaginationOptions = {\n\t\t\tlimit: parseInt(this.tableData.entriesPerPage),\n\t\t\tskip: (this.tableData.pageNum - 1) * parseInt(this.tableData.entriesPerPage),\n\t\t\tsort: this.tableData.sortColumn ? { [this.tableData.sortColumn] : (this.tableData.sortOrder === 'asc' ? 1 : -1) } : { name: 1 },\n\t\t\tfields: fields\n\t\t};\n\n\t\tlet filters = [{prop: 'client', data: this._services._app.client.getValue()}];\n\t\tif (this.tableData.filters['status'] !== 'All') {\n\t\t\tfilters.push({prop: 'status', data: this.tableData.filters['status']});\n\t\t}\n\t\tif (this.tableData.filters['substatus'] !== 'All') {\n\t\t\tfilters.push({prop: 'substatus', data: this.tableData.filters['substatus']});\n\t\t}\n\t\t\n\t\tthis._services._socket.call('supportticketsWithOptions', options, this.tableData.searchString, filters, (err, res) => {\n\t\t\tthis.support_tickets = res;\n\t\t});\n\n\t\tthis._services._socket.call('supportticketCount', this.tableData.searchString, filters, (err, res) => {\n\t\t\tif (err) {\n\t\t\t\tthis._services._socket.call('insertErrorLog', 'countQuery - resolveioSupportList', [\n\t\t\t\t\terr\n\t\t\t\t]);\n\t\t\t} \n\t\t\telse {\n\t\t\t\tthis.totalItems = res;\n\t\t\t}\n\t\t});\n\t}\n}\n","<div class=\"row\">\n <div class=\"col-sm-6\">\n <b>Filter Support Ticket By Status</b><br>\n <select class=\"form-control\" [(ngModel)]=\"tableData.filters['status']\" (change)=\"onQueryDataChanged()\" tourAnchor=\"supportListFilter\">\n <option value=\"All\">All</option>\n <option value=\"Opened\">Opened</option>\n <option value=\"Resolved\">Resolved</option>\n </select>\n </div>\n <div class=\"col-sm-6\">\n <b>Filter Support Ticket By Sub-Status</b><br>\n <select class=\"form-control\" [(ngModel)]=\"tableData.filters['substatus']\" (change)=\"onQueryDataChanged()\">\n <option value=\"All\">All</option>\n <option value=\"Investigating\">Investigating</option>\n <option value=\"Awaiting Customer Interaction\">Awaiting Customer Interaction</option>\n <option value=\"Resolved\">Resolved</option>\n </select>\n </div>\n</div>\n<div class=\"row\">\n <div class=\"col-md-12\">\n <div style=\"padding-left: 15px; padding-right: 15px; padding-top: 15px;\">\n <data-table #dataTable\n [urlClick]=\"'/support-ticket/detail/'\"\n [columns]=\"columns\"\n [data]=\"support_tickets\"\n [collapseSize]=\"990\"\n [searchTitle]=\"'Search For Support Ticket...'\"\n [totalItems]=\"totalItems\"\n (onChangeTableData)=\"onQueryDataChanged()\"\n [tableData]=\"tableData\"\n tourAnchor=\"supportListDatatable\">\n </data-table>\n </div>\n </div>\n</div>\n ","import { Component, OnInit, OnDestroy, ChangeDetectorRef, ViewChild } from '@angular/core';\nimport { SupportTicketService } from '../support-ticket.service';\nimport { Validators, FormGroup } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\nimport { pad } from '../../util/common.helper';\nimport { DialogService } from '../../widgets/dialog/dialog.service';\n\n@Component({\n\tproviders: [ProviderService],\n\ttemplateUrl: './support-ticket-new.component.html'\n})\n\nexport class SupportTicketNewComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\t@ViewChild ('fileUpload', {static: true}) fileUpload;\n\t\n\tsubscription$: Subscription[] = [];\n\n\tform: FormGroup;\n\n\tdisableFormButton = false;\n\n\tsubmit = false;\n\n\tconstructor(private _sts: SupportTicketService, private _cd: ChangeDetectorRef, private _services: ProviderService, private _ds: DialogService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis._sts.setSelectedSupportTicket('0');\n\n\t\tthis.form = this._services._fb.group({\n\t\t\t__v: [0],\n\t\t\ttype: ['', [Validators.required]],\n\t\t\tpriority: ['', [Validators.required]],\n\t\t\tissue: ['', [Validators.required]],\n\t\t\tsupport_ticket_number: [0],\n\t\t\tsupport_ticket_number_string: ['0'],\n\t\t\tstatus: ['Opened'],\n\t\t\tsubstatus: ['New'],\n\t\t\tclient: [this._services._app.client.getValue()],\n\t\t\tid_client: [this._services._app.client.getValue()],\n\t\t\tmessages: [[]],\n\t\t\tdate_created: [null],\n\t\t\tdate_created_string: [''],\n\t\t\tid_user_created: [this._services._account.getUser()._id],\n\t\t\tuser_created: [this._services._account.getUser().fullname],\n\t\t\tbillable: [false, [Validators.required]],\n\t\t\tdate_investigation: [null],\n\t\t\tdate_closed: [null],\n\t\t\tfiles: [[]],\n\t\t\tcurrent_watchers: [[]],\n\t\t\tclient_user: [{\n\t\t\t\tid_user: this._services._account.getUser()._id,\n\t\t\t\tuser: this._services._account.getUser().fullname,\n\t\t\t\temail: this._services._account.getUser().email ? this._services._account.getUser().email : ''\n\t\t\t}],\n\t\t\ttasks: [[]],\n\t\t\tnotes: [[]],\n\t\t\tusers_assigned: [[]],\n\t\t\tbill_description: [''],\n\t\t\tdifficulty: [1]\n\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis.subscription$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\t}\n\n\tcanDeactivate() {\t\t\t\n\t\treturn true;\n\t}\n\n\tonTypeChange() {\n\t\tif (this.form.controls.type.value === 'System Impairment') {\n\t\t\tthis.form.controls.priority.setValue('High');\n\t\t\tthis.form.controls.billable.setValue(false);\n\t\t}\n\t\telse if (this.form.controls.type.value === 'Request New Feature') {\n\t\t\tthis.form.controls.priority.setValue('Low');\n\t\t\tthis.form.controls.billable.setValue(true);\n\t\t}\n\t\telse if (this.form.controls.type.value === 'General Inquery') {\n\t\t\tthis.form.controls.priority.setValue('Low');\n\t\t\tthis.form.controls.billable.setValue(true);\n\t\t}\n\t\telse {\n\t\t\tthis.form.controls.priority.setValue('');\n\t\t\tthis.form.controls.billable.setValue(false);\n\t\t}\n\t}\n\n\tsubmitForm(form) {\n\n\t\tthis.submit = true;\n\n\t\tthis.disableFormButton = true;\n\n\t\tlet now = new Date();\n\t\tthis.form.controls.date_created.setValue(now);\n\t\tthis.form.controls.date_created_string.setValue(now.getFullYear() + '/' + (now.getMonth() + 1) + '/' + now.getDate());\n\n\t\tthis._services._socket.call('supportInsertSupportTicket', this.form.value, (err, res) => {\n\t\t\tif (res) {\n\t\t\t\tthis._services._alert.setAlert('success', 'Support ticket has been created');\n\t\t\t\tthis._services._router.navigateByUrl('/support-ticket/detail/' + res);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._ds.error('Could not create new support ticket.');\n\t\t\t\tthis._services._socket.call('insertErrorLog', 'Support Ticket New - insert support ticket', [\n\t\t\t\t\tthis.form.value, err\n\t\t\t\t]);\n\t\t\t}\n\t\t});\n\t}\n}\n","<style>\n .label-accordion {\n font-weight: bold;\n color: black;\n margin-bottom: 0px;\n }\n\n .fa-plus {\n color: black;\n }\n\n .fa-minus {\n color: black;\n }\n</style>\n\n<div class=\"col-lg-12\">\n <form [formGroup]=\"form\" novalidate (ngSubmit)=\"submitForm(form)\">\n <div class=\"row\">\n <ngb-accordion #acc=\"ngbAccordion\" activeIds=\"supportTicketInfo\">\n <ngb-panel id=\"supportTicketInfo\">\n <ng-template ngbPanelTitle>\n <div> \n <label class=\"label-accordion\">Support Ticket Info</label>\n <i *ngIf=\"!acc.activeIds.includes('supportTicketInfo')\" class=\"fa fa-plus pull-right\" aria-hidden=\"true\"></i>\n <i *ngIf=\"acc.activeIds.includes('supportTicketInfo')\" class=\"fa fa-minus pull-right\" aria-hidden=\"true\"></i>\n </div>\n </ng-template>\n <ng-template ngbPanelContent>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Support Ticket Type</label>\n <em *ngIf=\"!form.controls.type.valid\">- Required</em>\n <select [ngClass]=\"['form-control', form.controls.type.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"type\" (change)=\"onTypeChange()\" tourAnchor=\"supportNewSelect\">\n <option value=\"\">Select Type</option>\n <option value=\"General Inquery\">General Inquery</option>\n <option value=\"System Impairment\">System Impairment</option>\n <option value=\"Request New Feature\">Request New Feature</option>\n </select>\n <div class=\"invalid-feedback\" *ngIf=\"!form.controls.type.valid\">Type is required</div>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Problem/Feature Description</label>\n <em *ngIf=\"!form.controls.issue.valid\">- Required</em>\n <textarea formControlName=\"issue\" [ngClass]=\"['form-control', form.controls.issue.valid ? 'is-valid' : 'is-invalid' ]\" [rows]=\"5\" style=\"overflow-x: hidden\" tourAnchor=\"supportNewInput\"></textarea>\n <div class=\"invalid-feedback\" *ngIf=\"!form.controls.issue.valid\">Description is required</div>\n </div>\n </div>\n </div>\n </ng-template>\n </ngb-panel>\n </ngb-accordion>\n </div>\n <div class=\"row\" style=\"padding-top: 15px;\">\n <form-button [form]=\"form\" [disabled]=\"disableFormButton\" tourAnchor=\"supportNewSubmit\"></form-button>\n </div>\n </form>\n</div>\n","import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { SupportTicketService } from '../support-ticket.service';\nimport { Subscription } from 'rxjs';\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\nimport { Validators } from '@angular/forms';\nimport { SupportTicketModel } from '../../models/support-ticket.model';\nimport { DialogService } from '../../widgets/dialog/dialog.service';\nimport { FileModel } from '../../models/file.model';;\n\n@Component({\n\tproviders: [ProviderService],\n\ttemplateUrl: './support-ticket-detail.component.html'\n})\n\nexport class SupportTicketDetailComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\t@ViewChild('fileUpload', {static: true}) fileUpload;\n\n\tsubscription$: Subscription[] = [];\n\n\tid: string;\n\tdata: SupportTicketModel;\n\n\tfiles: FileModel[] = [];\n\n\tconstructor(private _route: ActivatedRoute, private _sts: SupportTicketService, private _services: ProviderService, private _ds: DialogService) {\n\t\tsuper(_services);\n\t}\n\t\t\n\tngOnInit() {\n\t\tthis.id = this._route.snapshot.params['id'];\n\t\tthis._sts.setSelectedSupportTicket(this.id);\n\n\t\tthis._services._socket.call('supportGetSupportTicketWithId', this.id, (err, res) => {\n\t\t\tif (!res) {\n\t\t\t\tthis._services._router.navigateByUrl('/support-ticket/list');\n\t\t\t\tthis._ds.error('Could not find support ticket');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tthis.data = res;\n\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis.subscription$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\t}\n\n\tonFileAdded(file: FileModel) {\t\n\t\tthis.data.files.push(file._id);\n\n\t\tthis._services._socket.call('supportUpdateSupportTicket', this.data, (err, res) => {\n\t\t\tif (err || !res) {\n\t\t\t\tthis._ds.error('Could not update support ticket files');\n\t\t\t\tthis._services._socket.call('insertErrorLog', 'support-ticket-detail - update support-ticket files add', [\n\t\t\t\t\tthis.data.files, err\n\t\t\t\t]);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\t// this._services._alert.setAlert('info', 'Sending email(s).');\n\n\t\t\t\t// this._services._socket.callSupport('sendSupportTicketModifiedEmail', this.data, this.data.files, (errEmail, resEmail) => {\n\t\t\t\t// \tif (errEmail || !resEmail) {\n\t\t\t\t// \t\tthis._ds.error('Could not email support ticket');\n\t\t\t\t// \t\tthis._services._socket.call('insertErrorLog', 'support-ticket-detail - email support-ticket', [\n\t\t\t\t// \t\t\t{prop: 'status', data: this.data.status}, errEmail\n\t\t\t\t// \t\t]);\n\t\t\t\t// \t}\n\t\t\t\t// \telse {\n\t\t\t\t// \t\tthis._services._alert.setAlert('success', 'Support Ticket email has been sent');\n\t\t\t\t// \t}\n\t\t\t\t// });\n\t\t\t}\n\t\t});\n\t}\n\n\tonFilesRemoved(file: FileModel) {\n\t\tthis._ds.confirm('Are you sure you want to remove a file? This will email all current watchers?').then(yes => {\n\t\t\tif (this.data.files.indexOf(file._id) !== -1) {\n\t\t\t\tthis.data.files.splice(this.data.files.indexOf(file._id), 1);\n\n\t\t\t\tthis._services._socket.call('supportUpdateSupportTicket', this.data, (err, res) => {\n\t\t\t\t\tif (err || !res) {\n\t\t\t\t\t\tthis._ds.error('Could not update support-ticket files');\n\t\t\t\t\t\tthis._services._socket.call('insertErrorLog', 'support-ticket-detail - update files remove', [\n\t\t\t\t\t\t\t{prop: 'files', data: this.data.files}, err\n\t\t\t\t\t\t]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}, () => {});\n\t}\n\n\tedit() {\n\t\tthis._services._router.navigateByUrl('/support-ticket/edit/' + this.id);\n\t}\n\n\tnewMessage() {\n\t\tthis._ds.input('Input Message', [\n\t\t\t{\n\t\t\t\tlabel: 'Message',\n\t\t\t\tform: 'message',\n\t\t\t\tdata: '',\n\t\t\t\tvalidators: [Validators.required],\n\t\t\t\tvalidatorErrors: ['required'],\n\t\t\t\tvalidatorMsg: ['Message is required'],\n\t\t\t\trequired: true,\n\t\t\t\ttype: 'textarea'\n\t\t\t}\n\t\t]).then(close => {\n\t\t\tthis.data.messages.push({\n\t\t\t\tmessage: close.message.value,\n\t\t\t\tid_user: this._services._account.getUser()._id,\n\t\t\t\tuser: this._services._account.getUser().fullname,\n\t\t\t\tdate: new Date(),\n\t\t\t\ttype: 'Client'\n\t\t\t});\n\n\t\t\tthis._services._socket.call('supportUpdateSupportTicket', this.data, (err, res) => {\n\t\t\t\tif (res) {\n\t\t\t\t\t// this._services._alert.setAlert('success', 'Support ticket has been updated');\n\n\t\t\t\t\t// this._services._socket.callSupport('sendSupportTicketModifiedEmail', this.data, this.data.files, (errEmail, resEmail) => {\n\t\t\t\t\t// \tif (errEmail || !resEmail) {\n\t\t\t\t\t// \t\tthis._ds.error('Could not email support ticket');\n\t\t\t\t\t// \t\tthis._services._socket.call('insertErrorLog', 'support-ticket-detail - email support-ticket', [\n\t\t\t\t\t// \t\t\t{prop: 'status', data: this.data.status}, errEmail\n\t\t\t\t\t// \t\t]);\n\t\t\t\t\t// \t}\n\t\t\t\t\t// \telse {\n\t\t\t\t\t// \t\tthis._services._alert.setAlert('success', 'Support Ticket email has been sent');\n\t\t\t\t\t// \t}\n\t\t\t\t\t// });\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._services._socket.call('insertErrorLog', 'Support Ticket Detail - Add Message');\n\t\t\t\t\tthis._ds.error('Support ticket could not update');\n\t\t\t\t}\n\t\t\t});\n\t\t}, () => {});\n\t}\n\n\teditMessage(index) {\n\t\tlet message = this.data.messages[index];\n\t\tthis._ds.input('Input Message', [\n\t\t\t{\n\t\t\t\tlabel: 'Message',\n\t\t\t\tform: 'message',\n\t\t\t\tdata: message.message,\n\t\t\t\tvalidators: [Validators.required],\n\t\t\t\tvalidatorErrors: ['required'],\n\t\t\t\tvalidatorMsg: ['Message is required'],\n\t\t\t\trequired: true,\n\t\t\t\ttype: 'textarea'\n\t\t\t}\n\t\t]).then(close => {\n\t\t\tmessage.message = close.message.value;\n\n\t\t\tthis._services._socket.call('supportUpdateSupportTicket', this.data, (err, res) => {\n\t\t\t\tif (res) {\n\t\t\t\t\t// this._services._alert.setAlert('success', 'Support ticket has been updated');\n\n\t\t\t\t\t// this._services._socket.callSupport('sendSupportTicketModifiedEmail', this.data, this.data.files, (errEmail, resEmail) => {\n\t\t\t\t\t// \tif (errEmail || !resEmail) {\n\t\t\t\t\t// \t\tthis._ds.error('Could not email support ticket');\n\t\t\t\t\t// \t\tthis._services._socket.call('insertErrorLog', 'support-ticket-detail - email support-ticket', [\n\t\t\t\t\t// \t\t\t{prop: 'status', data: this.data.status}, errEmail\n\t\t\t\t\t// \t\t]);\n\t\t\t\t\t// \t}\n\t\t\t\t\t// \telse {\n\t\t\t\t\t// \t\tthis._services._alert.setAlert('success', 'Support Ticket email has been sent');\n\t\t\t\t\t// \t}\n\t\t\t\t\t// });\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._services._socket.call('insertErrorLog', 'Support Ticket Detail - Add Message');\n\t\t\t\t\tthis._ds.error('Support ticket could not update');\n\t\t\t\t}\n\t\t\t});\n\t\t}, () => {});\n\t}\n\n\tdeleteMessage(index) {\n\t\tthis._ds.confirm('Are you sure you want to remove this message?').then(() => {\n\t\t\tthis.data.messages.splice(index, 1);\n\n\t\t\tthis._services._socket.call('supportUpdateSupportTicket', this.data, (err, res) => {\n\t\t\t\tif (res) {\n\t\t\t\t\t// this._services._alert.setAlert('success', 'Support ticket has been updated');\n\n\t\t\t\t\t// this._services._socket.callSupport('sendSupportTicketModifiedEmail', this.data, this.data.files, (errEmail, resEmail) => {\n\t\t\t\t\t// \tif (errEmail || !resEmail) {\n\t\t\t\t\t// \t\tthis._ds.error('Could not email support ticket');\n\t\t\t\t\t// \t\tthis._services._socket.call('insertErrorLog', 'support-ticket-detail - email support-ticket', [\n\t\t\t\t\t// \t\t\t{prop: 'status', data: this.data.status}, errEmail\n\t\t\t\t\t// \t\t]);\n\t\t\t\t\t// \t}\n\t\t\t\t\t// \telse {\n\t\t\t\t\t// \t\tthis._services._alert.setAlert('success', 'Support Ticket email has been sent');\n\t\t\t\t\t// \t}\n\t\t\t\t\t// });\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._services._socket.call('insertErrorLog', 'Support Ticket Detail - Add Message');\n\t\t\t\t\tthis._ds.error('Support ticket could not update');\n\t\t\t\t}\n\t\t\t});\n\t\t}, () => {});\n\t}\n\n\tisMyMessage(message) {\n\t\treturn this._services._account.getUser()._id === message.id_user;\n\t}\n}","<style>\n .label-accordion {\n font-weight: bold;\n color: black;\n margin-bottom: 0px;\n }\n\n .fa-plus {\n color: black;\n }\n\n .fa-minus {\n color: black;\n }\n\n ngb-accordion {\n width: 100%;\n }\n\n dl {\n margin-bottom: 0px;\n }\n\n .selected {\n background-color: lightblue;\n }\n</style>\n\n<div class=\"col-lg-12\" *ngIf=\"data\">\n <div class=\"row\">\n <ngb-accordion #acc=\"ngbAccordion\" activeIds=\"supportTicketInfo, supportTicketMessages, files\">\n <ngb-panel id=\"supportTicketInfo\">\n <ng-template ngbPanelTitle>\n <div> \n <label class=\"label-accordion\">Support Ticket Info</label>\n <i *ngIf=\"!acc.activeIds.includes('supportTicketInfo')\" class=\"fa fa-plus pull-right\" aria-hidden=\"true\"></i>\n <i *ngIf=\"acc.activeIds.includes('supportTicketInfo')\" class=\"fa fa-minus pull-right\" aria-hidden=\"true\"></i>\n </div>\n </ng-template>\n <ng-template ngbPanelContent>\n <div class=\"card\">\n <div class=\"card-header\"><b>General Info</b></div>\n <div class=\"card-body\">\n <div class=\"row\">\n <div class=\"col-lg-4\">\n <dl>\n <dt>Support Ticket #</dt>\n <dd>{{data.support_ticket_number | number}}</dd>\n <dt>Date Created</dt>\n <dd>{{data.date_created | date: 'short'}}</dd>\n </dl>\n </div>\n <div class=\"col-lg-4\">\n <dl>\n <dt>Type</dt>\n <dd>{{data.type}}</dd>\n <dt>User</dt>\n <dd>{{data.user_created}}</dd>\n </dl>\n </div>\n <div class=\"col-lg-4\">\n <dl>\n <dt>Status</dt>\n <dd>{{ data.status }}</dd>\n </dl>\n </div>\n </div>\n </div>\n </div>\n <div class=\"card\">\n <div class=\"card-header\"><b>Problem Description</b></div>\n <div class=\"card-body\">\n <pre>{{data.issue}}</pre>\n </div>\n </div>\n </ng-template>\n </ngb-panel>\n <ngb-panel id=\"supportTicketMessages\" *ngIf=\"data\">\n <ng-template ngbPanelTitle>\n <div> \n <label class=\"label-accordion\">Messages</label>\n <i *ngIf=\"!acc.activeIds.includes('supportTicketMessages')\" class=\"fa fa-plus pull-right\" aria-hidden=\"true\"></i>\n <i *ngIf=\"acc.activeIds.includes('supportTicketMessages')\" class=\"fa fa-minus pull-right\" aria-hidden=\"true\"></i>\n </div>\n </ng-template>\n <ng-template ngbPanelContent>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <div class=\"card\" *ngFor=\"let message of data.messages; let i = index;\">\n <div class=\"card-header\"><b>User: {{message.user}} - Date: {{message.date | date : 'short'}}</b></div>\n <div class=\"card-body\" [ngClass]=\"[message.type === 'ResolveIO' ? 'selected' : '']\">\n <div class=\"row\" style=\"width: 100%\">\n <div class=\"col-lg-10\">\n <pre>{{message.message}}</pre>\n </div>\n <div class=\"col-lg-2\">\n <responsive-button-group collapseSize=\"900\">\n <button type=\"button\" class=\"btn btn-warning\" (click)=\"editMessage(i)\" *ngIf=\"isMyMessage(message)\">Edit</button>\n <button type=\"button\" class=\"btn btn-danger\" (click)=\"deleteMessage(i)\" *ngIf=\"isMyMessage(message)\">Delete</button>\n </responsive-button-group>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"row\" style=\"margin-top: 10px;\">\n <div class=\"col-lg-12\">\n <button type=\"button\" class=\"btn btn-success\" (click)=\"newMessage()\">New Message</button>\n </div>\n </div>\n </ng-template>\n </ngb-panel>\n <ngb-panel id=\"files\">\n\t\t\t\t<ng-template ngbPanelTitle>\n\t\t\t\t\t<div> \n\t\t\t\t\t\t<label class=\"label-accordion\">Support Ticket Files</label>\n\t\t\t\t\t\t<i *ngIf=\"!acc.activeIds.includes('files')\" class=\"fa fa-plus pull-right\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t<i *ngIf=\"acc.activeIds.includes('files')\" class=\"fa fa-minus pull-right\" aria-hidden=\"true\"></i>\n\t\t\t\t\t</div>\n\t\t\t\t</ng-template>\n\t\t\t\t<ng-template ngbPanelContent>\n\t\t\t\t\t<file-upload #fileUpload (fileAdded)=\"onFileAdded($event)\" (fileRemoved)=\"onFilesRemoved($event)\" [files]=\"files\" [allowDelete]=\"true\" [allowReplace]=\"true\"></file-upload>\n\t\t\t\t</ng-template>\n\t\t\t</ngb-panel>\n </ngb-accordion>\n </div>\n <div class=\"row\" style=\"padding-top: 15px;\">\n <responsive-button-group collapseSize=\"900\">\n <button class=\"btn btn-warning\" type=\"button\" (click)=\"edit()\">Edit Support Ticket</button>\n </responsive-button-group>\n </div>\n</div>\n ","import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';\nimport { SupportTicketService } from '../support-ticket.service';\nimport { Validators, FormGroup } from '@angular/forms';\nimport { ActivatedRoute } from '@angular/router';\nimport { Subscription } from 'rxjs';\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\nimport { SupportTicketModel } from '../../models/support-ticket.model';\nimport { DialogService } from '../../widgets/dialog/dialog.service';\n\n@Component({\n\tproviders: [ProviderService],\n\ttemplateUrl: './support-ticket-edit.component.html'\n})\n\nexport class SupportTicketEditComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\t@ViewChild ('fileUpload', {static: true}) fileUpload;\n\t@ViewChild ('selectType', {static: true}) selectType;\n\n\tid: string;\n\tdata: SupportTicketModel;\n\t\n\tsubscription$: Subscription[] = [];\n\n\tform: FormGroup;\n\n\tdisableFormButton = false;\n\n\tconstructor(private _route: ActivatedRoute, private _sts: SupportTicketService, private _services: ProviderService, private _ds: DialogService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis.id = this._route.snapshot.params['id'];\n\t\tthis._sts.setSelectedSupportTicket(this.id.toString());\n\n\t\tthis.form = this._services._fb.group({\n\t\t\t_id: [''],\n\t\t\t__v: [0],\n\t\t\ttype: ['', [Validators.required]],\n\t\t\tpriority: ['', [Validators.required]],\n\t\t\tissue: ['', [Validators.required]],\n\t\t\tsupport_ticket_number: [null],\n\t\t\tsupport_ticket_number_string: [null],\n\t\t\tstatus: ['Opened'],\n\t\t\tsubstatus: ['New'],\n\t\t\tclient: [''],\n\t\t\tid_client: ['', [Validators.required]],\n\t\t\tmessages: [[]],\n\t\t\tdate_created: [null],\n\t\t\tdate_created_string: [''],\n\t\t\tid_user_created: [this._services._account.getUser()._id],\n\t\t\tuser_created: [this._services._account.getUser().fullname],\n\t\t\tbillable: [false, [Validators.required]],\n\t\t\tdate_investigation: [null],\n\t\t\tdate_closed: [null],\n\t\t\tfiles: [[]],\n\t\t\tcurrent_watchers: [[]],\n\t\t\tclient_user: [null],\n\t\t\tusers_assigned: [[]],\n\t\t\tbill_description: [''],\n\t\t\ttasks: [[]],\n\t\t\tnotes: [[]],\n\t\t\tdifficulty: [1]\n\t\t});\n\n\t\tthis._services._socket.call('supportGetSupportTicketWithId', this.id, (err, res) => {\n\t\t\tif (!res) {\n\t\t\t\tthis._services._router.navigateByUrl('/support-ticket/list');\n\t\t\t\tthis._ds.error('Could not find support ticket');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.data = res;\n\n\t\t\tthis.loadForm();\n\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis.subscription$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\t}\n\n\tloadForm() {\n\t\tthis.form.patchValue(this.data);\n\t}\n\n\tonTypeChange() {\n\t\tif (this.form.controls.type.value === 'System Impairment') {\n\t\t\tthis.form.controls.priority.setValue('High');\n\t\t\tthis.form.controls.billable.setValue(false);\n\t\t}\n\t\telse if (this.form.controls.type.value === 'Request New Feature') {\n\t\t\tthis.form.controls.priority.setValue('Low');\n\t\t\tthis.form.controls.billable.setValue(true);\n\t\t}\n\t\telse if (this.form.controls.type.value === 'General Inquery') {\n\t\t\tthis.form.controls.priority.setValue('Low');\n\t\t\tthis.form.controls.billable.setValue(true);\n\t\t}\n\t\telse {\n\t\t\tthis.form.controls.priority.setValue('');\n\t\t\tthis.form.controls.billable.setValue(false);\n\t\t}\n\t}\n\n\tsubmitForm(form) {\n\t\tthis.disableFormButton = true;\n\n\t\tthis._services._socket.call('supportUpdateSupportTicket', this.form.value, (err, res) => {\n\t\t\tif (res) {\n\t\t\t\tthis._services._alert.setAlert('info', 'Editing support ticket, please wait');\n\t\t\t\tthis._services._router.navigateByUrl('/support-ticket/detail/' + this.id);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._ds.error('Could not edit support ticket');\n\t\t\t\tthis._services._socket.call('insertErrorLog', 'Support-ticket-edit - update support ticket', [\n\t\t\t\t\tthis.form.value, err\n\t\t\t\t]);\n\t\t\t}\n\t\t});\n\t}\n}\n","<style>\n .label-accordion {\n font-weight: bold;\n color: black;\n margin-bottom: 0px;\n }\n\n .fa-plus {\n color: black;\n }\n\n .fa-minus {\n color: black;\n }\n</style>\n\n<div class=\"col-lg-12\">\n <form [formGroup]=\"form\" novalidate (ngSubmit)=\"submitForm(form)\">\n <div class=\"row\">\n <ngb-accordion #acc=\"ngbAccordion\" activeIds=\"supportTicketInfo\">\n <ngb-panel id=\"supportTicketInfo\">\n <ng-template ngbPanelTitle>\n <div> \n <label class=\"label-accordion\">Support Ticket Info</label>\n <i *ngIf=\"!acc.activeIds.includes('supportTicketInfo')\" class=\"fa fa-plus pull-right\" aria-hidden=\"true\"></i>\n <i *ngIf=\"acc.activeIds.includes('supportTicketInfo')\" class=\"fa fa-minus pull-right\" aria-hidden=\"true\"></i>\n </div>\n </ng-template>\n <ng-template ngbPanelContent>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Support Ticket Type</label>\n <em *ngIf=\"!form.controls.type.valid\">- Required</em>\n <select [ngClass]=\"['form-control', form.controls.type.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"type\" (change)=\"onTypeChange()\">\n <option value=\"\">Select Type</option>\n <option value=\"General Inquery\">General Inquery</option>\n <option value=\"System Impairment\">System Impairment</option>\n <option value=\"Request New Feature\">Request New Feature</option>\n </select>\n <div class=\"invalid-feedback\" *ngIf=\"!form.controls.type.valid\">Type is required</div>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Problem Description</label>\n <em *ngIf=\"!form.controls.issue.valid\">- Required</em>\n <textarea formControlName=\"issue\" [ngClass]=\"['form-control', form.controls.issue.valid ? 'is-valid' : 'is-invalid' ]\" [rows]=\"5\" style=\"overflow-x: hidden\"></textarea>\n <div class=\"invalid-feedback\" *ngIf=\"!form.controls.issue.valid\">Problem Description is required</div>\n </div>\n </div>\n </div>\n </ng-template>\n </ngb-panel>\n </ngb-accordion>\n </div>\n <div class=\"row\" style=\"padding-top: 15px;\">\n <form-button [form]=\"form\" [disabled]=\"disableFormButton\"></form-button>\n </div>\n </form>\n</div>\n ","\nimport { ModuleWithProviders } from '@angular/core';\nimport { Routes, RouterModule, Route } from '@angular/router';\nimport { SupportTicketComponent } from './support-ticket.component';\nimport { SupportTicketListComponent } from './list/support-ticket-list.component';\nimport { SupportTicketNewComponent } from './new/support-ticket-new.component';\nimport { SupportTicketDetailComponent } from './detail/support-ticket-detail.component';\nimport { SupportTicketEditComponent } from './edit/support-ticket-edit.component';\n\nconst routes: Routes = [{ \n\tpath: '',\n\tcomponent: SupportTicketComponent,\n\tchildren: [\n\t\t{ path: 'list', component: SupportTicketListComponent },\n\t\t{ path: 'new', component: SupportTicketNewComponent },\n\t\t{ path: 'detail/:id', component: SupportTicketDetailComponent },\n\t\t{ path: 'edit/:id', component: SupportTicketEditComponent },\n\t\t{ path: '**', redirectTo: 'list' }\n\t]}\n];\n\nexport const SupportTicketRouting: ModuleWithProviders<Route> = RouterModule.forChild(routes);\n","import { NgModule } from '@angular/core';\nimport { SharedModule } from '../shared/shared.module';\nimport { SupportTicketRouting } from './support-ticket.routing';\nimport { SupportTicketComponent } from './support-ticket.component';\nimport { SupportTicketListComponent } from './list/support-ticket-list.component';\nimport { SupportTicketNewComponent } from './new/support-ticket-new.component';\nimport { SupportTicketDetailComponent } from './detail/support-ticket-detail.component';\nimport { SupportTicketEditComponent } from './edit/support-ticket-edit.component';\nimport { SupportTicketService } from './support-ticket.service';\nimport { DatatableModule } from '../widgets/data-table/data-table.module';\nimport { FileModule } from '../widgets/file/file-upload.module';\n@NgModule({\n\timports: [\n\t\tSharedModule,\n\t\tSupportTicketRouting,\n\t\tDatatableModule,\n\t\tFileModule\n\t],\n\tdeclarations: [ \n\t\tSupportTicketComponent,\n\t\tSupportTicketListComponent,\n\t\tSupportTicketNewComponent,\n\t\tSupportTicketDetailComponent,\n\t\tSupportTicketEditComponent\n\t],\n\tproviders: [\n\t\tSupportTicketService\n\t]\n})\nexport class SupportTicketModule { }\n","let typeCache: { [label: string]: boolean } = {};\nexport function type<T>(label: T | ''): T {\n\tif (typeCache[<string>label]) {\n\t\tthrow new Error(`Action type \"${label}\" is not unqiue\"`);\n\t}\n\n\ttypeCache[<string>label] = true;\n\n\treturn <T>label;\n}\n","import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, ChangeDetectorRef, OnInit } from '@angular/core';\nimport moment from 'moment';\n\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\n\n@Component({\n\tproviders: [ProviderService],\n\tselector: 'date-shortcut',\n\ttemplate: `\n\t\t<label class=\"form-control-label\">Date Shortcuts</label>\n\t\t<ng-select [(ngModel)]=\"shortcutValue\" (change)=\"onSelectShortcut()\" placeholder=\"Select Shortcut\" [clearable]=\"false\">\n\t\t\t<ng-option value=\"Today\">Today</ng-option>\n\t\t\t<ng-option value=\"Yesterday\">Yesterday</ng-option>\n\t\t\t<ng-option value=\"Week\">This Week</ng-option>\n\t\t\t<ng-option value=\"Last Week\">Last Week</ng-option>\n\t\t\t<ng-option value=\"Month\">This Month</ng-option>\n\t\t\t<ng-option value=\"Last Month\">Last Month</ng-option>\n\t\t\t<ng-option value=\"Last 30 Days\">Last 30 Days</ng-option>\n\t\t\t<ng-option value=\"Quarter\">This Quarter</ng-option>\n\t\t\t<ng-option value=\"Last Quarter\">Last Quarter</ng-option>\n\t\t\t<ng-option value=\"Year\">This Year</ng-option>\n\t\t\t<ng-option value=\"Last Year\">Last Year</ng-option>\n\t\t\t<ng-option value=\"Q1\">Q1</ng-option>\n\t\t\t<ng-option value=\"Q2\">Q2</ng-option>\n\t\t\t<ng-option value=\"Q3\">Q3</ng-option>\n\t\t\t<ng-option value=\"Q4\">Q4</ng-option>\n\t\t\t<ng-option value=\"Last Q1\">Last Q1</ng-option>\n\t\t\t<ng-option value=\"Last Q2\">Last Q2</ng-option>\n\t\t\t<ng-option value=\"Last Q3\">Last Q3</ng-option>\n\t\t\t<ng-option value=\"Last Q4\">Last Q4</ng-option>\n\t\t\t<ng-option value=\"All\">All</ng-option>\n\t\t</ng-select>\n\t`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\n\nexport class DateShortcutComponent extends BaseComponent implements OnInit { \n\t@Input() startDateObj;\n\t@Input() endDateObj;\n\t@Output() startDateObjChange = new EventEmitter<Object>();\n\t@Output() endDateObjChange = new EventEmitter<Object>();\n\t@Output() datesChanged = new EventEmitter();\n\t@Input() shortcutValue = null;\n\t@Output() shortcutValueChange = new EventEmitter<String>();\n\n\tconstructor(private _services: ProviderService, private _cd: ChangeDetectorRef) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis.onSelectShortcut();\n\t}\n\n\treset() {\n\t\tthis.shortcutValue = null;\n\t\tthis.shortcutValueChange.emit(this.shortcutValue);\n\n\t\tthis._cd.detectChanges();\n\t}\n\n\tonSelectShortcut() {\n\t\tif (this.shortcutValue) {\n\t\t\tlet startDate = moment(new Date(this.startDateObj['year'], this.startDateObj['month'] - 1, this.startDateObj['day'])).toDate();\n\t\t\tlet endDate = moment(new Date(this.endDateObj['year'], this.endDateObj['month'] - 1, this.endDateObj['day'])).toDate();\n\n\t\t\tif (this.shortcutValue === 'Q1') {\n\t\t\t\tstartDate = moment().startOf('year').toDate();\n\t\t\t\tendDate = moment().startOf('year').quarter(2).subtract(1, 'days').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Q2') {\n\t\t\t\tstartDate = moment().startOf('year').quarter(2).toDate();\n\t\t\t\tendDate = moment().startOf('year').quarter(3).subtract(1, 'days').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Q3') {\n\t\t\t\tstartDate = moment().startOf('year').quarter(3).toDate();\n\t\t\t\tendDate = moment().startOf('year').quarter(4).subtract(1, 'days').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Q4') {\n\t\t\t\tstartDate = moment().startOf('year').quarter(4).toDate();\n\t\t\t\tendDate = moment().endOf('year').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Last Q1') {\n\t\t\t\tstartDate = moment().startOf('year').subtract(1, 'year').toDate();\n\t\t\t\tendDate = moment().startOf('year').subtract(1, 'year').quarter(2).subtract(1, 'days').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Last Q2') {\n\t\t\t\tstartDate = moment().startOf('year').subtract(1, 'year').quarter(2).toDate();\n\t\t\t\tendDate = moment().startOf('year').subtract(1, 'year').quarter(3).subtract(1, 'days').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Last Q3') {\n\t\t\t\tstartDate = moment().startOf('year').subtract(1, 'year').quarter(3).toDate();\n\t\t\t\tendDate = moment().startOf('year').subtract(1, 'year').quarter(4).subtract(1, 'days').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Last Q4') {\n\t\t\t\tstartDate = moment().startOf('year').subtract(1, 'year').quarter(4).toDate();\n\t\t\t\tendDate = moment().endOf('year').subtract(1, 'year').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Today') {\n\t\t\t\tstartDate = moment().startOf('day').toDate();\n\t\t\t\tendDate = new Date();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Yesterday') {\n\t\t\t\tstartDate = moment().subtract(1, 'days').startOf('day').toDate();\n\t\t\t\tendDate = moment().subtract(1, 'days').endOf('day').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Week') {\n\t\t\t\tstartDate = moment().startOf('isoWeek').toDate();\n\t\t\t\tendDate = new Date();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Last Week') {\n\t\t\t\tendDate = moment().startOf('isoWeek').subtract(1, 'days').toDate();\n\t\t\t\tstartDate = moment(endDate).startOf('isoWeek').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Month') {\n\t\t\t\tstartDate = moment().startOf('month').toDate();\n\t\t\t\tendDate = new Date();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Last Month') {\n\t\t\t\tendDate = moment().startOf('month').subtract(1, 'days').endOf('day').toDate();\n\t\t\t\tstartDate = moment(endDate).startOf('month').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Last 30 Days') {\n\t\t\t\tendDate = new Date();\n\t\t\t\tstartDate = moment().subtract(30, 'days').startOf('day').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Quarter') {\n\t\t\t\tstartDate = moment().startOf('year').quarter(moment().quarter()).toDate();\n\t\t\t\tendDate = new Date();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Last Quarter') {\n\t\t\t\tendDate = moment().startOf('year').quarter(moment().quarter()).subtract(1, 'days').endOf('day').toDate();\n\t\t\t\tstartDate = moment(endDate).startOf('quarter').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Year') {\n\t\t\t\tstartDate = moment().startOf('year').toDate();\n\t\t\t\tendDate = new Date();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Last Year') {\n\t\t\t\tendDate = moment().startOf('year').subtract(1, 'days').endOf('day').toDate();\n\t\t\t\tstartDate = moment(endDate).startOf('year').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'All') {\n\t\t\t\tstartDate = new Date(2017, 0, 1, 0, 0, 0, 0);\n\t\t\t\tendDate = new Date();\n\t\t\t}\n\n\t\t\tthis.startDateObj = {year: startDate.getFullYear(), month: startDate.getMonth() + 1, day: startDate.getDate()};\n\t\t\tthis.endDateObj = {year: endDate.getFullYear(), month: endDate.getMonth() + 1, day: endDate.getDate()};\n\n\t\t\tthis.startDateObjChange.emit(this.startDateObj);\n\t\t\tthis.endDateObjChange.emit(this.endDateObj);\n\n\t\t\tthis.datesChanged.emit([this.startDateObj, this.endDateObj]);\n\n\t\t\tthis.shortcutValueChange.emit(this.shortcutValue);\n\t\t}\n\n\t\tthis._cd.detectChanges();\n\t}\n}\n","import { FormsModule } from '@angular/forms';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { DateShortcutComponent } from './date-shortcut.component';\t\t\t\nimport { NgSelectModule } from '@ng-select/ng-select';\n\n@NgModule({\n\timports: [\n\t\tFormsModule,\n\t\tCommonModule,\n\t\tNgSelectModule\n\t],\n\texports: [\n\t\tDateShortcutComponent\n\t],\n\tdeclarations: [\n\t\tDateShortcutComponent\n\t]\n})\nexport class DateShortcutModule { }\n","import { Component, ViewChild, AfterViewInit, ElementRef, HostListener, OnDestroy } from '@angular/core';\nimport moment from 'moment';\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\n\n@Component({\n\tproviders: [ProviderService],\n\tselector: 'scheduler',\n\ttemplateUrl: './scheduler.component.html'\n})\n\nexport class SchedulerComponent extends BaseComponent implements AfterViewInit, OnDestroy { \n\n\ttoday = new Date();\n\n\tover_forward = false;\n\tover_backwards = false;\n\t\n\tmouseDown = false;\n\tmouseLastEvent = null;\n\n\ttimer_sub = null;\n\n\tmonths = [\n\t\t'Jan',\n\t\t'Feb',\n\t\t'Mar',\n\t\t'Apr',\n\t\t'May',\n\t\t'Jun',\n\t\t'Jul',\n\t\t'Aug',\n\t\t'Sep',\n\t\t'Oct',\n\t\t'Nov',\n\t\t'Dec'\n\t];\n\n\tsize_svg = {\n\t\twidth: 0,\n\t\theight: 0\n\t};\n\n\tsize_cell = {\n\t\twidth: 30,\n\t\theight: 30\n\t};\n\t\n\t@ViewChild('svgChart', {static: true}) svgChart: ElementRef;\n\n\tconstructor(private _services: ProviderService) {\n\t\tsuper(_services);\n\t}\n\n\tngAfterViewInit() {\n\t\tthis.size_svg.width = this.svgChart.nativeElement.clientWidth;\n\t\tthis.size_svg.height = this.svgChart.nativeElement.clientHeight;\n\t}\n\n\tngOnDestroy() {\n\t\tif (this.timer_sub) {\n\t\t\tclearInterval(this.timer_sub);\n\t\t}\n\t}\n\n\t@HostListener('mouseup') onMouseup() {\n\t\tthis.mouseDown = false;\n\t}\n\n\t@HostListener('mousedown', ['$event']) onMousedown(event) {\n\t\tthis.mouseDown = true;\n\t\tthis.mouseLastEvent = event;\n\t}\n\n\t@HostListener('mousemove', ['$event']) onMousemove(event: MouseEvent) {\n\t\tif (this.mouseDown) {\n\n\t\t\tlet daysAdd = 0;\n\n\t\t\tif (this.mouseLastEvent.clientX - event.clientX > 1) {\n\t\t\t\tif (Math.floor((this.mouseLastEvent.clientX - event.clientX) / 15) > 0) {\n\t\t\t\t\tdaysAdd = Math.floor((this.mouseLastEvent.clientX - event.clientX + ((30 - this.size_cell.width) * 5)) / 20);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdaysAdd = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (this.mouseLastEvent.clientX - event.clientX < -1) {\n\t\t\t\tif (Math.floor((this.mouseLastEvent.clientX - event.clientX) / 15) < 0) {\n\t\t\t\t\tdaysAdd = Math.floor((this.mouseLastEvent.clientX - event.clientX - ((30 - this.size_cell.width) * 5)) / 20);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdaysAdd = -1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.today = moment(this.today).add(daysAdd, 'days').toDate();\t\t\n\t\t\tthis.mouseLastEvent = event;\n\t\t}\n\t}\n\n\t@HostListener('mouseleave', ['$event']) onMouseLeave(event: MouseEvent) {\n\t\tif (this.mouseDown) {\n\t\t\tthis.mouseDown = false;\n\t\t}\n\t}\n\n\tbuildDays() {\n\t\tlet days = [];\n\n\t\tfor (let i = 0; i < Math.floor(this.size_svg.width / this.size_cell.width); i++) {\n\t\t\tdays.push({\n\t\t\t\tindex: i,\n\t\t\t\tday: moment(this.today).add(i, 'days').toDate().getDate()\n\t\t\t});\n\t\t}\n\n\t\treturn days;\n\t}\n\n\tbuildMonths() {\n\t\tlet months = [{\n\t\t\tindex_start: 0,\n\t\t\tindex_end: null,\n\t\t\tmonth: this.months[this.today.getMonth()]\n\t\t}];\n\n\t\tfor (let i = 1; i < Math.floor(this.size_svg.width / this.size_cell.width); i++) {\n\t\t\tif (moment(this.today).add(i, 'days').toDate().getMonth() !== moment(this.today).add(i - 1, 'days').toDate().getMonth()) {\n\t\t\t\tmonths[months.length - 1].index_end = i;\n\t\t\t\tmonths.push({\n\t\t\t\t\tindex_start: i,\n\t\t\t\t\tindex_end: null,\n\t\t\t\t\tmonth: this.months[moment(this.today).add(i, 'days').toDate().getMonth()]\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tmonths[months.length - 1].index_end = Math.floor(this.size_svg.width / this.size_cell.width);\n\n\t\treturn months;\n\t}\n\n\tbuildYears() {\n\t\tlet years = [{\n\t\t\tindex_start: 0,\n\t\t\tindex_end: null,\n\t\t\tyear: this.today.getFullYear()\n\t\t}];\n\n\t\tfor (let i = 1; i < Math.floor(this.size_svg.width / this.size_cell.width); i++) {\n\t\t\tif (moment(this.today).add(i, 'days').toDate().getFullYear() !== moment(this.today).add(i - 1, 'days').toDate().getFullYear()) {\n\t\t\t\tyears[years.length - 1].index_end = i;\n\t\t\t\tyears.push({\n\t\t\t\t\tindex_start: i,\n\t\t\t\t\tindex_end: null,\n\t\t\t\t\tyear: moment(this.today).add(i, 'days').toDate().getFullYear()\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tyears[years.length - 1].index_end = Math.floor(this.size_svg.width / this.size_cell.width);\n\n\t\treturn years;\n\t}\n\n\tdecrementToday() {\n\t\tthis.today = moment(this.today).subtract(1, 'days').toDate();\n\t}\n\n\tincrementToday() {\n\t\tthis.today = moment(this.today).add(1, 'days').toDate();\n\t}\n\n\toverForward() {\n\t\tthis.timer_sub = setInterval(() => {\n\t\t\tthis.incrementToday()\n\t\t}, 50);\n\t}\n\n\tleftForward() {\n\t\tclearInterval(this.timer_sub);\n\t}\n\n\toverBackwards() {\n\t\tthis.timer_sub = setInterval(() => {\n\t\t\tthis.decrementToday()\n\t\t}, 50);\n\t}\n\n\tleftBackwards() {\n\t\tclearInterval(this.timer_sub);\n\t}\n\n\tzoomOut() {\n\t\tif (this.size_cell.width > 10) {\n\t\t\tthis.size_cell.width -= 10;\n\t\t}\n\t}\n\n\tzoomIn() {\n\t\tthis.size_cell.width += 10;\n\t}\n}\n","<style>\n\t.bar {\n\t\tfill: red; /* changes the background */\n\t\theight: 21px;\n\t\ttransition: fill .3s ease;\n\t\tcursor: pointer;\n\t\tfont-family: Helvetica, sans-serif;\n\t}\n\n\t.bar text {\n\t\tcolor: black;\n\t}\n\n\t.bar:hover,\n\t.bar:focus {\n\t\tfill: black;\n\t}\n\n\t.bar:hover text,\n\t.bar:focus text {\n\t\tfill: red;\n\t}\n\n\t.year {\n\t\tstroke:black;\n\t\tfill: white;\n\t}\n\n\t.month {\n\t\tstroke:black;\n\t\tfill: white;\n\t}\n\n\t.day {\n\t\tstroke:black;\n\t\tfill: white;\n\t}\n\n\t.smallText {\n\t\tfont-size: 4px;\n\t}\n</style>\n\n<div class=\"scheduler\">\n\n\t<button class=\"btn btn-warning\" type=\"button\" (mouseenter)=\"overBackwards()\" (mouseleave)=\"leftBackwards()\">Go Backwards</button>\n\t<button class=\"btn btn-success\" type=\"button\" (mouseenter)=\"overForward()\" (mouseleave)=\"leftForward()\">Go Forward</button>\n\n\t<button style=\"margin-left: 20px;\" class=\"btn btn-warning\" type=\"button\" (click)=\"zoomOut()\">Zoom Out</button>\n\t<button class=\"btn btn-success\" type=\"button\" (click)=\"zoomIn()\">Zoom In</button>\n\n\t<svg class=\"chart\" width=\"100%\" height=\"100%\" aria-labelledby=\"title desc\" role=\"img\" #svgChart>\n\t\t<title id=\"title\">Scheduler</title>\n\t\t<desc id=\"desc\">Scheduler</desc>\n\n\t\t<g class=\"year\">\n\t\t\t<ng-container *ngFor=\"let year of buildYears()\">\n\t\t\t\t<rect [attr.width]=\"(year.index_end - year.index_start) * size_cell.width\" [attr.height]=\"size_cell.height\" [attr.x]=\"year.index_start * size_cell.width\"></rect>\n\t\t\t\t<svg [attr.width]=\"(year.index_end - year.index_start) * size_cell.width\" [attr.height]=\"size_cell.height\" [attr.x]=\"year.index_start * size_cell.width\">\n\t\t\t\t\t<text x=\"50%\" y=\"50%\" alignment-baseline=\"middle\" text-anchor=\"middle\">{{year.year}}</text>\n\t\t\t\t</svg>\n\t\t\t</ng-container>\n\t\t</g>\n\t\t<g class=\"month\">\n\t\t\t<ng-container *ngFor=\"let month of buildMonths()\">\n\t\t\t\t<rect [attr.width]=\"(month.index_end - month.index_start) * size_cell.width\" [attr.height]=\"size_cell.height\" [attr.x]=\"month.index_start * size_cell.width\" [attr.y]=\"size_cell.height\"></rect>\n\t\t\t\t<svg [attr.width]=\"(month.index_end - month.index_start) * size_cell.width\" [attr.height]=\"size_cell.height\" [attr.x]=\"month.index_start * size_cell.width\" [attr.y]=\"size_cell.height\">\n\t\t\t\t\t<text x=\"50%\" y=\"50%\" alignment-baseline=\"middle\" text-anchor=\"middle\">{{month.month}}</text>\n\t\t\t\t</svg>\n\t\t\t</ng-container>\n\t\t</g>\n\t\t<g class=\"day\">\n\t\t\t<ng-container *ngFor=\"let day of buildDays()\">\n\t\t\t\t<rect [attr.width]=\"size_cell.width\" [attr.height]=\"size_cell.height\" [attr.x]=\"day.index * size_cell.width\" [attr.y]=\"size_cell.height * 2\"></rect>\n\t\t\t\t<svg [attr.width]=\"size_cell.width\" [attr.height]=\"size_cell.height\" [attr.x]=\"day.index * size_cell.width\" [attr.y]=\"size_cell.height * 2\">\n\t\t\t\t\t<text x=\"50%\" y=\"50%\" alignment-baseline=\"middle\" text-anchor=\"middle\" [style.font-size.px]=\"[size_cell.width > 10 ? 12 : 6]\">{{day.day}}</text>\n\t\t\t\t</svg>\n\t\t\t</ng-container>\n\t\t</g>\n\n\n\t\t<!-- <g class=\"bar\">\n\t\t\t<rect width=\"40\" height=\"19\"></rect>\n\t\t\t<text x=\"45\" y=\"9.5\" dy=\".35em\">4 apples</text>\n\t\t</g>\n\t\t<g class=\"bar\">\n\t\t\t<rect width=\"80\" height=\"19\" y=\"20\"></rect>\n\t\t\t<text x=\"85\" y=\"28\" dy=\".35em\">8 bananas</text>\n\t\t</g>\n\t\t<g class=\"bar\">\n\t\t\t<rect width=\"150\" height=\"19\" y=\"40\"></rect>\n\t\t\t<text x=\"150\" y=\"48\" dy=\".35em\">15 kiwis</text>\n\t\t</g>\n\t\t<g class=\"bar\">\n\t\t\t<rect width=\"160\" height=\"19\" y=\"60\"></rect>\n\t\t\t<text x=\"161\" y=\"68\" dy=\".35em\">16 oranges</text>\n\t\t</g>\n\t\t<g class=\"bar\">\n\t\t\t<rect width=\"230\" height=\"19\" y=\"80\"></rect>\n\t\t\t<text x=\"235\" y=\"88\" dy=\".35em\">23 lemons</text>\n\t\t</g> -->\n\t</svg>\n</div>\n","import { NgModule } from '@angular/core';\nimport { NgbModule } from '@ng-bootstrap/ng-bootstrap';\nimport { FormsModule } from '@angular/forms';\t\nimport { CommonModule } from '@angular/common';\n\nimport { RouterModule } from '@angular/router';\t\n\nimport { SchedulerComponent } from './scheduler.component';\n\n@NgModule({\n\timports: [\n\t\tNgbModule,\n\t\tFormsModule,\n\t\tCommonModule,\n\t\tRouterModule\n\t],\n\texports: [\n\t\tSchedulerComponent\n\t],\n\tdeclarations: [\n\t\tSchedulerComponent\n\t],\n\tproviders: [ ]\n})\nexport class SchedulerModule { }\n","import { ModulePermissionModel } from './models/permission.model';\n\nexport const ReportBuilderModulePermission: ModulePermissionModel = {\n\tname: 'report-builder',\n\tviews: [\n\t\t{link: '/report-builder/list', label: 'List', has_parameter: false},\n\t\t{link: '/report-builder/new', label: 'New', has_parameter: false},\n\t\t{link: '/report-builder/scheduled-job', label: 'Scheduled Job', has_parameter: false},\n\t\t{link: '/report-builder/dashboard-builder', label: 'Dashboard Builder', has_parameter: false},\n\t\t{link: '/report-builder/detail', label: 'Detail', has_parameter: true},\n\t\t{link: '/report-builder/edit', label: 'Edit', has_parameter: true},\n\t\t{link: '/report-builder/delete', label: 'Delete', has_parameter: true},\n\t]\n};\n","import { ModulePermissionModel } from './models/permission.model';\n\nexport const SuperAdminModulePermission: ModulePermissionModel = {\n\tname: 'super-admin',\n\tviews: [\n\t\t{link: '/super-admin/dashboard', label: 'Dashboard', has_parameter: false},\n\t\t{link: '/super-admin/apm', label: 'APM', has_parameter: false},\n\t\t{link: '/super-admin/monitor', label: 'Monitor', has_parameter: false}\n\t]\n};\n","/*\n * Public API Surface of @resolveio/client-lib-core\n */\n\nexport * from './lib/core.service';\nexport * from './lib/core.component';\nexport * from './lib/core.module';\nexport * from './lib/resolveio-class';\nexport * from './lib/auth/auth-guard.service';\nexport * from './lib/auth/auth-permissions.service';\nexport * from './lib/auth/auth.service';\nexport * from './lib/auth/auth365.component';\nexport * from './lib/auth/can-deactivate-guard.service';\nexport * from './lib/auth/enroll.component';\nexport * from './lib/auth/forgot-password.component';\nexport * from './lib/directive/focus';\nexport * from './lib/home/home.component';\nexport * from './lib/support-ticket/support-ticket.component';\nexport * from './lib/support-ticket/support-ticket.module';\nexport * from './lib/support-ticket/support-ticket.routing';\nexport * from './lib/support-ticket/support-ticket.service';\nexport * from './lib/support-ticket/detail/support-ticket-detail.component';\nexport * from './lib/support-ticket/edit/support-ticket-edit.component';\nexport * from './lib/support-ticket/list/support-ticket-list.component';\nexport * from './lib/support-ticket/new/support-ticket-new.component';\nexport * from './lib/logger/logger.component';\nexport * from './lib/pipes/filter.pipe';\nexport * from './lib/pipes/minus-currency.pipe';\nexport * from './lib/pipes/phone.pipe';\nexport * from './lib/pipes/pipe.module';\nexport * from './lib/pipes/reverse-list.pipe';\nexport * from './lib/pipes/domsanitizor.pipe';\nexport * from './lib/pipes/json-parse.pipe';\nexport * from './lib/pipes/titlecase.pipe';\nexport * from './lib/shared/shared.module';\nexport * from './lib/util/action-name.helper';\nexport * from './lib/util/aws.service';\nexport * from './lib/util/common.helper';\nexport * from './lib/util/validation.service';\nexport * from './lib/util/window-resize.service';\nexport * from './lib/util/window.service';\nexport * from './lib/widgets/alert/alert.model';\nexport * from './lib/widgets/alert/alert.service';\nexport * from './lib/widgets/collapse-table/collapse-table.component';\nexport * from './lib/widgets/collapse-table/collapse-table.module';\nexport * from './lib/widgets/data-table/data-table.model';\nexport * from './lib/widgets/data-table/data-table.module';\nexport * from './lib/widgets/data-table/data-table.component';\nexport * from './lib/widgets/date-shortcut/date-shortcut.component';\nexport * from './lib/widgets/date-shortcut/date-shortcut.module';\nexport * from './lib/widgets/form-button/form-button.component';\nexport * from './lib/widgets/form-button/form-button.module';\nexport * from './lib/widgets/navbar-main/navbar-main.component';\nexport * from './lib/widgets/navbar-module/navbar-module.component';\nexport * from './lib/widgets/navbar-module/navbar-module.model';\nexport * from './lib/widgets/responsive-button-group/responsive-button-group.component';\nexport * from './lib/widgets/responsive-button-group/responsive-button-group.module';\nexport * from './lib/widgets/scheduler/scheduler.component';\nexport * from './lib/widgets/scheduler/scheduler.module';\nexport * from './lib/widgets/sort-table/sort-table.module';\nexport * from './lib/widgets/sort-table/sort-table.directive';\nexport * from './lib/widgets/sort-table/sort-table-ngfor.component';\nexport * from './lib/widgets/sort-table/sort-table-header.component';\nexport * from './lib/widgets/user-role/user-role.component';\nexport * from './lib/widgets/user-role/user-role.module';\nexport * from './lib/account-manager.service';\nexport * from './lib/offline-db';\nexport * from './lib/offline-manager.service';\nexport * from './lib/socket-manager.service';\nexport * from './lib/socket.service';\nexport * from './lib/token-manager.service';\nexport * from './lib/directive/scroll';\nexport * from './lib/widgets/dialog/dialog.service';\nexport * from './lib/models/app-status.model';\nexport * from './lib/models/collection-document.model';\nexport * from './lib/models/cron-job.model';\nexport * from './lib/models/dialog.model';\nexport * from './lib/models/file.model';\nexport * from './lib/widgets/file/file-upload.component';\nexport * from './lib/widgets/file/file-upload.module';\nexport * from './lib/models/log-method-latency.model';\nexport * from './lib/models/navbar-main-tab.model';\nexport * from './lib/models/pagination.model';\nexport * from './lib/models/permission.model';\nexport * from './lib/models/select-data-label.model';\nexport * from './lib/models/subscription.model';\nexport * from './lib/models/support-ticket.model';\nexport * from './lib/models/user-group.model';\nexport * from './lib/models/user.model';\nexport * from './lib/report-builder.permission';\nexport * from './lib/super-admin.permission';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["isObject","hexToRGB","routes"],"mapp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,EAAC,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAC;QAC9D,EAAC,IAAI,EAAE,sBAAsB,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,EAAC;KACtE;;;ACRF;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"resolveio-client-lib-core.mjs","sources":["../../../projects/core/src/lib/core.service.ts","../../../projects/core/src/lib/util/window-resize.service.ts","../../../projects/core/src/lib/widgets/alert/alert.service.ts","../../../projects/core/src/lib/socket.service.ts","../../../projects/core/src/lib/util/common.helper.ts","../../../projects/core/src/lib/offline-db.ts","../../../projects/core/src/lib/offline-manager.service.ts","../../../projects/core/src/lib/socket-manager.service.ts","../../../projects/core/src/lib/token-manager.service.ts","../../../projects/core/src/lib/account-manager.service.ts","../../../projects/core/src/lib/util/validation.service.ts","../../../projects/core/src/lib/util/aws.service.ts","../../../projects/core/src/lib/resolveio-class.ts","../../../projects/core/src/lib/widgets/dialog/dialog.notify.content.ts","../../../projects/core/src/lib/widgets/form-button/form-button.component.ts","../../../projects/core/src/lib/directive/focus.ts","../../../projects/core/src/lib/widgets/dialog/dialog.input.content.ts","../../../projects/core/src/lib/widgets/dialog/dialog.error.content.ts","../../../projects/core/src/lib/widgets/dialog/dialog.confirm.content.ts","../../../projects/core/src/lib/widgets/dialog/dialog.select-datetime.content.ts","../../../projects/core/src/lib/widgets/dialog/dialog.select-data-labels.content.ts","../../../projects/core/src/lib/widgets/responsive-button-group/responsive-button-group.component.ts","../../../projects/core/src/lib/widgets/responsive-button-group/responsive-button-group.component.html","../../../projects/core/src/lib/widgets/dialog/dialog.login.content.ts","../../../projects/core/src/lib/widgets/dialog/dialog.register.content.ts","../../../projects/core/src/lib/widgets/dialog/dialog.select-with-buttons-url.content.ts","../../../projects/core/src/lib/widgets/collapse-table/collapse-table.component.ts","../../../projects/core/src/lib/widgets/collapse-table/collapse-table.component.html","../../../projects/core/src/lib/widgets/dialog/dialog.select-array-objs.content.ts","../../../projects/core/src/lib/widgets/dialog/dialog.select-array.content.ts","../../../projects/core/src/lib/widgets/dialog/dialog.service.ts","../../../projects/core/src/lib/auth/auth.service.ts","../../../projects/core/src/lib/auth/auth-permissions.service.ts","../../../projects/core/src/lib/directive/scroll.ts","../../../projects/core/src/lib/widgets/navbar-main/navbar-main.component.ts","../../../projects/core/src/lib/widgets/navbar-main/navbar-main.component.html","../../../projects/core/src/lib/pipes/filter.pipe.ts","../../../projects/core/src/lib/widgets/navbar-module/navbar-module.component.ts","../../../projects/core/src/lib/widgets/navbar-module/navbar-module.component.html","../../../projects/core/src/lib/core.component.ts","../../../projects/core/src/lib/core.component.html","../../../projects/core/src/lib/pipes/json-parse.pipe.ts","../../../projects/core/src/lib/logger/logger.component.ts","../../../projects/core/src/lib/logger/logger.component.html","../../../projects/core/src/lib/auth/auth-guard.service.ts","../../../projects/core/src/lib/auth/can-deactivate-guard.service.ts","../../../projects/core/src/lib/util/window.service.ts","../../../projects/core/src/lib/widgets/user-role/user-role.component.ts","../../../projects/core/src/lib/widgets/user-role/user-role.module.ts","../../../projects/core/src/lib/widgets/form-button/form-button.module.ts","../../../projects/core/src/lib/widgets/responsive-button-group/responsive-button-group.module.ts","../../../projects/core/src/lib/widgets/collapse-table/collapse-table.module.ts","../../../projects/core/src/lib/pipes/phone.pipe.ts","../../../projects/core/src/lib/pipes/reverse-list.pipe.ts","../../../projects/core/src/lib/pipes/minus-currency.pipe.ts","../../../projects/core/src/lib/pipes/domsanitizor.pipe.ts","../../../projects/core/src/lib/pipes/titlecase.pipe.ts","../../../projects/core/src/lib/pipes/pipe.module.ts","../../../projects/core/src/lib/widgets/sort-table/sort-table.directive.ts","../../../projects/core/src/lib/widgets/sort-table/sort-table-header.component.ts","../../../projects/core/src/lib/widgets/sort-table/sort-table-header.component.html","../../../projects/core/src/lib/widgets/sort-table/sort-table-ngfor.component.ts","../../../projects/core/src/lib/widgets/sort-table/sort-table.module.ts","../../../projects/core/src/lib/shared/shared.module.ts","../../../projects/core/src/lib/auth/forgot-password.component.ts","../../../projects/core/src/lib/auth/forgot-password.component.html","../../../projects/core/src/lib/auth/enroll.component.ts","../../../projects/core/src/lib/auth/enroll.component.html","../../../projects/core/src/lib/auth/auth365.component.ts","../../../projects/core/src/lib/user-settings/user-settings.service.ts","../../../projects/core/src/lib/user-settings/user-settings.permission.ts","../../../projects/core/src/lib/user-settings/user-settings.component.ts","../../../projects/core/src/lib/user-settings/settings/users-settings.component.ts","../../../projects/core/src/lib/user-settings/settings/users-settings.component.html","../../../projects/core/src/lib/user-settings/user-settings.routing.ts","../../../projects/core/src/lib/widgets/data-table/data-table.component.ts","../../../projects/core/src/lib/widgets/data-table/data-table.component.html","../../../projects/core/src/lib/widgets/data-table/data-table.module.ts","../../../projects/core/src/lib/widgets/file/file-upload.component.ts","../../../projects/core/src/lib/widgets/file/file-upload.component.html","../../../projects/core/src/lib/widgets/file/file-upload.module.ts","../../../projects/core/src/lib/user-settings/user-settings.module.ts","../../../projects/core/src/lib/home/home.component.ts","../../../projects/core/src/lib/home/home.component.html","../../../projects/core/src/lib/core.module.ts","../../../projects/core/src/lib/support-ticket/support-ticket.service.ts","../../../projects/core/src/lib/support-ticket/support-ticket.component.ts","../../../projects/core/src/lib/support-ticket/list/support-ticket-list.component.ts","../../../projects/core/src/lib/support-ticket/list/support-ticket-list.component.html","../../../projects/core/src/lib/support-ticket/new/support-ticket-new.component.ts","../../../projects/core/src/lib/support-ticket/new/support-ticket-new.component.html","../../../projects/core/src/lib/support-ticket/detail/support-ticket-detail.component.ts","../../../projects/core/src/lib/support-ticket/detail/support-ticket-detail.component.html","../../../projects/core/src/lib/support-ticket/edit/support-ticket-edit.component.ts","../../../projects/core/src/lib/support-ticket/edit/support-ticket-edit.component.html","../../../projects/core/src/lib/support-ticket/support-ticket.routing.ts","../../../projects/core/src/lib/support-ticket/support-ticket.module.ts","../../../projects/core/src/lib/util/action-name.helper.ts","../../../projects/core/src/lib/widgets/date-shortcut/date-shortcut.component.ts","../../../projects/core/src/lib/widgets/date-shortcut/date-shortcut.module.ts","../../../projects/core/src/lib/widgets/scheduler/scheduler.component.ts","../../../projects/core/src/lib/widgets/scheduler/scheduler.component.html","../../../projects/core/src/lib/widgets/scheduler/scheduler.module.ts","../../../projects/core/src/lib/report-builder.permission.ts","../../../projects/core/src/lib/super-admin.permission.ts","../../../projects/core/src/public_api.ts","../../../projects/core/src/resolveio-client-lib-core.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { NavbarModel } from './widgets/navbar-module/navbar-module.model';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CoreService {\n \tisDevice = new BehaviorSubject(false);\n\tfullScreen = new BehaviorSubject(false);\n\tfsActivated = new BehaviorSubject(false);\n\thasConnected = new BehaviorSubject(false);\n\tnavbarModuleData = new BehaviorSubject({\n\t\ttitle: '',\n\t\tmodule: '',\n\t\tdescription: '',\n\t\tdescription_name: '',\n\t\ttabs: []\n\t});\n\thasStatusMessage = new BehaviorSubject(false);\n\talertData = new BehaviorSubject({\n\t\ttype: '',\n\t\tmessage: '',\n\t\ttimer: 0,\n\t\tshowing: false\n\t});\n\tisInvalidSW = new BehaviorSubject(false);\n\tenvironment = new BehaviorSubject(null);\n\tclient = new BehaviorSubject('');\n\tstandardProgram = new BehaviorSubject(false);\n\tnavTabs = new BehaviorSubject([]);\n\ttourStops = new BehaviorSubject([]);\n\ttourStarted = new BehaviorSubject(false);\n\tisDemo = new BehaviorSubject(false);\n\tisLoggingOut = new BehaviorSubject(false);\n\t// customHomePage = new BehaviorSubject(false);\n\t// logo = new BehaviorSubject('');\n\n\tconstructor() {}\n\n\tsetFullScreen(fullScreen: boolean) {\n\t\tthis.fullScreen.next(fullScreen);\n\t}\n\n\tsetFsActivated(activated: boolean) {\n\t\tthis.fsActivated.next(activated);\n\t}\n\n\tsetHasConnected(connected: boolean) {\n\t\tthis.hasConnected.next(connected);\n\t}\n\n\tsetNavbarModuleData(data: NavbarModel) {\n\t\tdata.tabs = data.tabs.filter(a => a.params === null).sort((a, b) => a.label.localeCompare(b.label)).concat(data.tabs.filter(a => a.params !== null).sort((a, b) => a.label.localeCompare(b.label)));\n\t\tthis.navbarModuleData.next(data);\n\t}\n\n\tsetHasStatusMessage(data: boolean) {\n\t\tthis.hasStatusMessage.next(data);\n\t}\n\n\tsetIsDevice(data: boolean) {\n\t\tthis.isDevice.next(data);\n\t}\n\n\tsetIsInvalidSW(data: boolean) {\n\t\tthis.isInvalidSW.next(data);\n\t}\n\n\tsetEnvironment(env) {\n\t\tthis.environment.next(env);\n\t}\n\n\tsetClient(client) {\n\t\tthis.client.next(client);\n\t}\n\n\tsetStandardProgram(standardProgram) {\n\t\tthis.standardProgram.next(standardProgram);\n\t}\n\n\tsetNavTabs(navTabs) {\n\t\tthis.navTabs.next(navTabs);\n\t}\n\n\tsetTourStops(tourStops) {\n\t\tthis.tourStops.next(tourStops);\n\t}\n\n\tsetTourStarted(tourStarted) {\n\t\tthis.tourStarted.next(tourStarted);\n\t}\n\t\n\tsetDemo(isDemo: boolean) {\n\t\tthis.isDemo.next(isDemo);\n\t}\n\n\t// setCustomHomePage(data: boolean) {\n\t// \tthis.customHomePage.next(data);\n\t// }\n\n\t// setLogo(logo) {\n\t// \tthis.logo.next(logo);\n\t// }\n}\n","import { EventManager } from '@angular/platform-browser';\nimport { Observable, Subject } from 'rxjs';\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class ResizeService {\n\n\tget onResize$(): Observable<Window> {\n\t\treturn this.resizeSubject.asObservable();\n\t}\n\n\tprivate resizeSubject: Subject<Window>;\n\n\tconstructor(private eventManager: EventManager) {\n\t\tthis.resizeSubject = new Subject();\n\t\tthis.eventManager.addGlobalEventListener('window', 'resize', this.onResize.bind(this));\n\t}\n\n\tprivate onResize(event: UIEvent) {\n\t\tthis.resizeSubject.next(<Window>event.target);\n\t}\n}\n","import { Injectable } from '@angular/core';\nimport { alertType } from './alert.model';\nimport { ToastrService } from 'ngx-toastr';\n\n@Injectable()\nexport class AlertService {\n\n\tconstructor(private _toastr: ToastrService) {}\n\n\tclearAlert(id?) {\n\t\tif (id) {\n\t\t\tthis._toastr.clear(id);\n\t\t}\n\n\t\tthis._toastr.clear();\n\t}\n\t\n\tsetAlert(type: alertType, message: string, timer = 5000) {\n\t\tif (type === 'success') {\n\t\t\tif (timer) {\n\t\t\t\treturn this._toastr.success(message, 'Success', {\n\t\t\t\t\ttimeOut: timer\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn this._toastr.success(message, 'Success', {\n\t\t\t\t\tdisableTimeOut: true\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\telse if (type === 'info') {\n\t\t\tif (timer) {\n\t\t\t\treturn this._toastr.info(message, 'Info', {\n\t\t\t\t\ttimeOut: timer\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn this._toastr.info(message, 'Info', {\n\t\t\t\t\tdisableTimeOut: true\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\telse if (type === 'warning') {\n\t\t\tif (timer) {\n\t\t\t\treturn this._toastr.warning(message, 'Warning', {\n\t\t\t\t\ttimeOut: timer\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn this._toastr.warning(message, 'Warning', {\n\t\t\t\t\tdisableTimeOut: true\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\telse if (type === 'error') {\n\t\t\tif (timer) {\n\t\t\t\treturn this._toastr.error(message, 'Error', {\n\t\t\t\t\ttimeOut: timer\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn this._toastr.error(message, 'Error', {\n\t\t\t\t\tdisableTimeOut: true\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\telse if (type === 'update') {\n\t\t\treturn this._toastr.warning(message, 'Update', {\n\t\t\t\tdisableTimeOut: true\n\t\t\t});\n\t\t}\n\t}\n}\n","import {Injectable} from '@angular/core';\nimport { LocalStorageService } from 'ngx-localstorage';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable()\nexport class SocketService {\n\t//These can be altered by calling code\n\tpublic debug = false;\n\n\t//Time to wait before attempting reconnect (after close)\n\tpublic reconnectInterval = 1000;\n\t\n\t//Time to wait for WebSocket to open (before aborting and retrying)\n\tpublic timeoutInterval = 5000;\n\tprivate timeout = null;\n\n\t//Should only be used to read WebSocket readyState\n\tpublic readyState: number;\n\tpublic readyState$ = new BehaviorSubject(0);\n\n\t//List of WebSocket sub-protocols\n\tprivate protocols: string[] = [];\n\n\t//The underlying WebSocket\n\tpublic ws: WebSocket;\n\tprivate url: string;\n\n\t//Set up the default 'noop' event handlers\n\tpublic onopen: (ev: Event) => void = function (event: Event) {};\n\tpublic onclose: (ev: CloseEvent) => void = function (event: CloseEvent) {};\n\tpublic onconnecting: () => void = function () {};\n\tpublic onmessage: (ev: MessageEvent) => void = function (event: MessageEvent) {};\n\tpublic onerror: (ev: ErrorEvent) => void = function (event: ErrorEvent) {};\n\n\tconstructor(private _storage: LocalStorageService) {}\n\n\tpublic openSocket(environment, protocols) {\n\t\tthis.url = environment.WS_URL;\n\t\tthis.protocols = protocols;\n\t\tthis.connect();\n\t}\n\n\tprivate connect() {\n\t\tif (!this.ws && this._storage.get('accessToken')) {\n\t\t\tif (this.timeout) {\n\t\t\t\tclearTimeout(this.timeout);\n\t\t\t}\n\n\t\t\tthis.ws = new WebSocket(this.url, this.protocols);\n\t\t\t\n\t\t\tthis.readyState = WebSocket.CONNECTING;\n\t\t\tthis.readyState$.next(this.readyState);\n\t\t\tthis.onconnecting();\n\t\t\tthis.log(new Date(), 'WS', 'attempt-connect', this.url);\n\n\t\t\tthis.timeout = setTimeout(() => {\n\t\t\t\tthis.log(new Date(), 'WS', 'connection-timeout', this.url);\n\t\t\t\tthis.close();\n\t\t\t}, this.timeoutInterval);\n\n\t\t\tthis.ws.onopen = (event: Event) => {\n\t\t\t\tclearTimeout(this.timeout);\n\t\t\t\tthis.timeout = null;\n\t\t\t\tthis.log(new Date(), 'WS', 'onopen', this.url);\n\t\t\t\tthis.readyState = WebSocket.OPEN;\n\t\t\t\tthis.readyState$.next(this.readyState);\n\t\t\t\tthis.onopen(event);\n\t\t\t};\n\n\t\t\tthis.ws.onclose = (event: CloseEvent) => {\n\t\t\t\tif (this.timeout) {\n\t\t\t\t\tclearTimeout(this.timeout);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.timeout = null;\n\n\t\t\t\tthis.ws = null;\n\n\t\t\t\tthis.readyState = WebSocket.CLOSED;\n\t\t\t\tthis.readyState$.next(this.readyState);\n\t\t\t\t\n\t\t\t\tthis.log(new Date(), 'WS', 'onclose', this.url);\n\t\t\t\tthis.onclose(event);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.connect();\n\t\t\t\t}, this.reconnectInterval);\n\t\t\t};\n\n\t\t\tthis.ws.onmessage = (event: MessageEvent) => {\n\t\t\t\tthis.onmessage(event);\n\t\t\t};\n\n\t\t\tthis.ws.onerror = (event: ErrorEvent) => {\n\t\t\t\tthis.log(new Date(), 'WS', 'onerror', this, event);\n\t\t\t\tthis.onerror(event);\n\t\t\t\tthis.reconnect();\n\t\t\t};\n\t\t}\n\t}\n\n\tpublic send(...data: any[]) {\n\t\tif (this.ws && this.ws.readyState === this.ws.OPEN) {\n\t\t\tthis.ws.send(JSON.stringify(data));\n\t\t\treturn true;\n\t\t} \n\t\telse {\n\t\t\tthis.log(new Date(), 'WS', 'send error', this.ws.readyState);\n\t\t\tthis.reconnect();\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Returns boolean, whether websocket was FORCEFULLY closed.\n\t */\n\tpublic close(): boolean {\n\t\tif (this.ws) {\n\t\t\tthis.log(new Date(), 'WS', 'closing socket');\n\t\t\tthis.readyState = WebSocket.CLOSING;\n\t\t\tthis.readyState$.next(this.readyState);\n\t\t\tthis.ws.close();\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic reconnect() {\n\t\tthis.log(new Date(), 'WS', 'reconnect', this.readyState);\n\t\tif (this.readyState === WebSocket.OPEN) {\n\t\t\tthis.close();\n\t\t}\n\t\telse if (this.readyState === WebSocket.CLOSING || this.readyState === WebSocket.CLOSED) {\n\t\t\tthis.connect();\n\t\t}\n\t}\n\n\tpublic getBufferAmount() {\n\t\tif (this.ws) {\n\t\t\treturn this.ws.bufferedAmount;\n\t\t}\n\t\telse {\n\t\t\treturn 20480;\n\t\t}\n\t}\n\n\tprivate log(...args: any[]) {\n\t\tif (this.debug) {\n\t\t\tconsole.log(...args);\n\t\t}\n\t}\n}\n","import { detailedDiff } from 'deep-object-diff';\nimport moment from 'moment';\n\nconst isObject = (object) => {\n\treturn object instanceof Object && object.constructor.name === 'Object';\n};\n\nexport function toTitleCase(str) {\n\treturn str.replace(/\\w\\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); });\n}\n\nexport function isUpperCase(str) {\n\treturn (/^[A-Z]*$/).test(str);\n}\n\nexport function pad(num, size) {\n\tlet s = num + '';\n\twhile (s.length < size) {\n\t\ts = '0' + s;\n\t}\n\treturn s;\n}\n\nexport function deepCopy(obj) {\n\treturn JSON.parse(JSON.stringify(obj), dateReviver);\n}\n\nexport function dateReviver(key, value) {\n\tif (typeof value === 'string') {\n\t\tlet a = /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n\t\tif (a) {\n\t\t\treturn new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], +a[5], +a[6].split('.')[0], +a[6].split('.')[1]));\n\t\t}\n\t}\n\treturn value;\n}\n\nexport function b64toBlobURL(b64Data, contentType, sliceSize?) {\n\tb64Data = b64Data.replace('data:application/pdf;base64,', '');\n\tcontentType = contentType || '';\n\tsliceSize = sliceSize || 512;\n\n\tlet byteCharacters = atob(b64Data);\n\tlet byteArrays = [];\n\n\tfor (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {\n\t\tlet slice = byteCharacters.slice(offset, offset + sliceSize);\n\n\t\tlet byteNumbers = new Array(slice.length);\n\t\tfor (let i = 0; i < slice.length; i++) {\n\t\tbyteNumbers[i] = slice.charCodeAt(i);\n\t\t}\n\n\t\tlet byteArray = new Uint8Array(byteNumbers);\n\n\t\tbyteArrays.push(byteArray);\n\t}\n\n\tlet blob = new Blob(byteArrays, {type: contentType});\n\treturn URL.createObjectURL(blob);\n}\n\nexport function blobToFile(theBlob, fileName) : File {\n //A Blob() is almost a File() - it's just missing the two properties below which we will add\n theBlob.lastModifiedDate = new Date();\n theBlob.name = fileName;\n return (<File>theBlob);\n}\n\nexport function toDataURL(url, callback) {\n\tlet xhr = new XMLHttpRequest();\n\txhr.onload = function() {\n\t\tlet reader = new FileReader();\n\t\treader.onloadend = function() {\n\t\t\tcallback(reader.result);\n\t\t};\n\t\treader.readAsDataURL(xhr.response);\n\t};\n\txhr.open('GET', url);\n\txhr.responseType = 'blob';\n\txhr.send();\n}\n\nexport function getDeepDiffDetails(obj1: Object, obj2: Object) {\n\tlet diff = detailedDiff(obj1, obj2);\n\tlet newDiff = detailedDiff(obj2, obj1);\n\t\n\tlet diffString = '';\n\t\t\n\tif ((Object.keys(diff['updated']).length)) {\n\t\t// if (Object.keys(diff['added']).length){\n\t\t// \tdiffString += '; ';\n\t\t// }\n\t\t\n\t\t// if (Object.keys(diff['deleted']).length) {\n\t\t// \tdiffString += '; ';\n\t\t// }\n\t\t\t\t\t\n\t\tfor (let i = 0; i < Object.keys(diff['updated']).length; i++) {\n\t\t\tif (!Array.isArray(obj1[Object.keys(diff['updated'])[i]])) {\n\t\t\t\tlet key = Object.keys(diff['updated'])[i];\n\t\t\t\tlet newKey = Object.keys(newDiff['updated'])[i];\n\n\t\t\t\tif ((key.substr(0, 2) !== 'id')){\n\t\t\t\t\tif (diff['updated'][key] && moment.isDate(diff['updated'][key])) {\n\t\t\t\t\t\tdiffString += 'Updated: \\n' + toTitleCase(key.replace(/_/g, ' ')) + ': \"' + moment(diff['updated'][key]).format('llll') + '\" to \"' + moment(newDiff['updated'][newKey]).format('llll') + '\"\\n';\n\t\t\t\t\t}\n\t\t\t\t\telse if (diff['updated'][key] && typeof(diff['updated'][key]) === 'object') {\n\t\t\t\t\t\tlet objString = '';\n\n\t\t\t\t\t\tfor (let j = 0; j < Object.keys(diff['updated'][key]).length; j++) {\n\t\t\t\t\t\t\tlet objKey = Object.keys(diff['updated'][key])[j];\n\t\t\t\t\t\t\tlet newObjKey = Object.keys(newDiff['updated'][key])[j];\n\n\t\t\t\t\t\t\tif (j > 0) {\n\t\t\t\t\t\t\t\tobjString += 'll, \\n';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tobjString += toTitleCase(objKey.replace(/_/g, ' ')) + ': \"' + diff['updated'][key][objKey] + '\" to \"' + newDiff['updated'][key][newObjKey] + '\"' + (j < Object.keys(diff['updated'][key]).length - 1 ? ', ' : '');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdiffString += 'Updated: \\n' + objString + '\\n';\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tdiffString += 'Updated: \\n' + toTitleCase(key.replace(/_/g, ' ')) + ': \"' + diff['updated'][key] + '\" to \"' + newDiff['updated'][newKey] + '\"' + (i < Object.keys(diff['updated']).length - 1 ? '\\n' : '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn diffString;\n}\n\nexport function generateCronStringFromDate(date: Date) {\n\treturn date.getSeconds() + ' ' + date.getMinutes() + ' ' + date.getHours() + ' ' + date.getDate() + ' ' + (date.getMonth() + 1) + ' ' + date.getDay();\n}\n\nexport function s2ab(s) {\n\tlet buf = new ArrayBuffer(s.length);\n\tlet view = new Uint8Array(buf);\n\t// tslint:disable-next-line:no-bitwise\n\tfor (let i = 0; i !== s.length; ++i) { view[i] = s.charCodeAt(i) & 0xFF; }\n\treturn buf; \n}\n\nexport function mergeDeep(target, ...sources) {\n\tif (!sources.length) {\n\t\treturn target;\n\t}\n\tconst source = sources.shift();\n\n\tif (isObject(target) && isObject(source)) {\n\t\tfor (const key in source) {\n\t\t\tif (isObject(source[key])) {\n\t\t\t\tif (!target[key]) {\n\t\t\t\t\tObject.assign(target, { [key]: {} });\n\t\t\t\t}\n\t\t\t\tmergeDeep(target[key], source[key]);\n\t\t\t} \n\t\t\telse {\n\t\t\t\tObject.assign(target, { [key]: source[key] });\n\t\t\t}\n\t\t}\n\t}\n\n\treturn mergeDeep(target, ...sources);\n}","import { dateReviver } from './util/common.helper';\n\nexport class StorageDB {\n\n\tstorage = null;\n\tdatabase = null;\n\tprimaryKey = null;\n\tsep = '';\n\n\tconstructor (opts) {\n\t\topts = opts || {};\n\n\t\tthis.storage = opts.storage || window && window.localStorage;\n\t\tthis.database = opts.database || 'db';\n\t\tthis.primaryKey = opts.primaryKey || '_id';\n\t\tthis.sep = opts.sep || ':';\n\n\t\tif (!isSupported(this.storage)) {\n\t\t\tthis.storage = null;\n\t\t}\n\t}\n\n\tget(name, opts) {\n\t\treturn new Collection(this, name, opts);\n\t}\n\n\tgetCollections() {\n\t\tlet collections = [];\n\n\t\tObject.keys(this.storage).filter(a => a.split(':').length > 2).forEach(key => {\n\t\t\tif (!collections.some(b => b === key.split(':')[1])) {\n\t\t\t\tcollections.push(key.split(':')[1]);\n\t\t\t}\n\t\t});\n\n\t\treturn collections;\n\t}\n\n\tcollection(name, opts) {\n\t\treturn this.get(name, opts);\n\t}\n}\n\nclass Collection {\n\n\tname = '';\n\tstorage = null;\n\tpath = '';\n\tprimaryKey = '';\n\tcache = {};\n\tcacheable = false;\n\n\tconstructor (db, name, opts) {\n\t\topts = opts || {};\n\n\t\tthis.name = name;\n\t\tthis.storage = db.storage || new MockStorage();\n\t\tthis.path = db.database + db.sep + name + db.sep;\n\t\tthis.primaryKey = opts.primaryKey || db.primaryKey;\n\t\tthis.cache = {};\n\t\tthis.cacheable = !db.storage;\n\t}\n\n\n\t_initCache () {\n\t\tlet cache = {};\n\t\tlet filterExp = new RegExp('^' + this.path);\n\n\t\tfor (let key of Object.keys(this.storage)) {\n\t\t\tif (filterExp.test(key)) {\n\t\t\t\tcache[key] = JSON.parse(this.storage.getItem(key), dateReviver);\n\t\t\t}\n\t\t}\n\n\t\tthis.cache = cache;\n\t\tthis.cacheable = true;\n\t}\n\n\n\t_filter (filter, opts) {\n\t\topts.type = opts.type || 'data'; // data, id;\n\t\topts.multi = opts.multi || false;\n\n\t\tif (!this.cacheable) {\n\t\t\tthis._initCache();\n\t\t}\n\n\t\tlet res = [];\n\t\tlet isFnFilter;\n\t\tlet isTypeId = opts.type === 'id';\n\n\t\tif (typeof filter === 'string') {\n\t\t\tfilter = new RegExp(filter);\n\t\t} else if (typeof filter === 'function') {\n\t\t\tisFnFilter = true;\n\t\t} else if (!filter) {\n\t\t\tlet ret = isTypeId ? Object.keys(this.cache) : Object.values(this.cache);\n\n\t\t\tif (opts.multi) {\n\t\t\t\treturn ret;\n\t\t\t} else {\n\t\t\t\treturn ret[0] || null;\n\t\t\t}\n\t\t}\n\n\t\tfor (let key of Object.keys(this.cache)) {\n\t\t\tlet val = this.cache[key];\n\n\t\t\tif (isFnFilter) {\n\t\t\t\tif (filter(key, val['data'])) {\n\t\t\t\t\tlet ret = isTypeId ? key : val;\n\n\t\t\t\t\tif (opts.multi) {\n\t\t\t\t\t\tres.push(ret);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn ret;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (filter.test(key)) {\n\t\t\t\t\tlet ret = isTypeId ? key : val;\n\n\t\t\t\t\tif (opts.multi) {\n\t\t\t\t\t\tres.push(ret);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn ret;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn opts.multi ? res : null;\n\t}\n\n\n\tinsert(data, expiresDate?, opts?) {\n\t\tlet arrayInsert = data instanceof Array;\n\n\t\tif (arrayInsert) {\n\t\t\tif (data.length === 0) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t} else {\n\t\t\tdata = [data];\n\t\t}\n\n\t\tlet pk = this.primaryKey;\n\t\tlet cacheable = this.cacheable;\n\n\t\tfor (let row of data) {\n\t\t\tif (!isObject(row)) {\n\t\t\t\tthrow new Error('TypeError: insert data must be an object or an object array');\n\t\t\t}\n\n\t\t\tif (typeof row[pk] === 'undefined') {\n\t\t\t\trow[pk] = new ID().toString();\n\t\t\t}\n\n\t\t\tlet now = new Date();\n\n\t\t\tif (cacheable) {\n\t\t\t\tthis.cache[this.path + row[pk]] = {\n\t\t\t\t\tofflineDate: now,\n\t\t\t\t\tofflineDateExpires: expiresDate ? expiresDate : new Date(now.getTime() + 604800000),\n\t\t\t\t\tdata: row\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tthis.storage.setItem(this.path + row[pk], JSON.stringify({\n\t\t\t\tofflineDate: now,\n\t\t\t\tofflineDateExpires: expiresDate ? expiresDate : new Date(now.getTime() + 604800000),\n\t\t\t\tdata: row\n\t\t\t}));\n\t\t}\n\n\t\treturn arrayInsert ? data.map(a => a._id) : data[0]._id;\n\t}\n\n\n\tfind(query, opts?, total?) {\n\t\tquery = query || {};\n\t\topts = opts || {};\n\t\topts.skip = opts.skip || 0;\n\t\topts.limit = opts.limit;\n\t\topts.sort = opts.sort;\n\n\t\tif (opts.sort instanceof Array) {\n\t\t\topts.sort = opts.sort.reduce((res, item) => {\n\t\t\t\tif (typeof item === 'string') {\n\t\t\t\t\tres[item] = 1;\n\t\t\t\t} else if (item instanceof Array && item.length) {\n\t\t\t\t\tres[item[0]] = item[1] || 1;\n\t\t\t\t}\n\t\t\t\treturn res;\n\t\t\t}, {});\n\t\t}\n\n\t\tlet data;\n\t\tlet ids = isObject(query) ? null : (query instanceof Array ? query : [query]);\n\t\tlet filterOpts = {\n\t\t\ttype: opts._filterType || 'data',\n\t\t\tmulti: true\n\t\t};\n\n\t\tif (ids) {\n\t\t\t// by id array\n\t\t\tlet filterRegExp = new RegExp('^' + this.path + '(' + ids.join('|') + ')$');\n\t\t\tdata = this._filter(filterRegExp, filterOpts);\n\n\t\t} else if (Object.keys(query).length) {\n\t\t\t// by query\n\t\t\tdata = this._filter((key, val) => {\n\t\t\t\treturn queryMatch(query, val);\n\t\t\t}, filterOpts);\n\t\t} else {\n\t\t\tdata = this._filter(null, filterOpts);\n\t\t}\n\n\t\tif (!total) {\n\t\t\tdata = data.map(a => a.data);\n\t\t}\n\n\t\t// sort\n\t\tif (opts.sort) {\n\t\t\tdata.sort((a, b) => {\n\t\t\t\treturn sortCompare(opts.sort, a, b);\n\t\t\t});\n\t\t}\n\n\t\tif (opts.limit) {\n\t\t\tdata = data.slice(opts.skip, opts.skip + opts.limit);\n\t\t} else if (opts.skip) {\n\t\t\tdata = data.slice(opts.skip);\n\t\t}\n\n\t\treturn data;\n\t}\n\n\n\tfindOne(query, opts?) {\n\t\tquery = query || {};\n\t\topts = opts || {};\n\n\t\tlet data;\n\t\tlet id = isObject(query) ? null : query;\n\t\tlet queryFields = isObject(query) ? Object.keys(query) : [];\n\t\tlet quickTarget = false;\n\t\tlet needsSort = !!opts.sort;\n\t\tlet filterOpts = {\n\t\t\ttype: opts._filterType || 'data',\n\t\t\tmulti: false\n\t\t};\n\n\t\tif (queryFields.length && queryFields.includes(this.primaryKey)) {\n\t\t\tid = query[this.primaryKey];\n\t\t\tquickTarget = true;\n\t\t}\n\n\t\tif (id) {\n\t\t\t// by id\n\t\t\tdata = this.storage.getItem(this.path + id);\n\t\t\tdata = data ? JSON.parse(data, dateReviver).data : null;\n\n\t\t\tif (data && quickTarget && !queryMatch(query, data)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} else if (queryFields.length) {\n\t\t\t// by query\n\t\t\tif (needsSort) {\n\t\t\t\tdata = this.find(query, opts);\n\t\t\t} else {\n\t\t\t\tdata = this._filter((key, val) => {\n\t\t\t\t\treturn queryMatch(query, val);\n\t\t\t\t}, filterOpts);\n\n\t\t\t\tif (Array.isArray(data)) {\n\t\t\t\t\tdata = data.map(a => a.data);\n\t\t\t\t}\n\t\t\t\telse if (data) {\n\t\t\t\t\tdata = data.data;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (needsSort) {\n\t\t\t\tdata = this.find(query, opts);\n\t\t\t} else {\n\t\t\t\tdata = this._filter(null, filterOpts);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!id && needsSort && data) {\n\t\t\tdata = data[0].data || null;\n\t\t}\n\n\t\tif (data && filterOpts.type === 'id') {\n\t\t\tdata = this.path + data[this.primaryKey];\n\t\t}\n\n\t\treturn data;\n\t}\n\n\n\tremove(query, opts?) {\n\t\tif (!query) {\n\t\t\tthrow new Error('remove needs a query');\n\t\t}\n\n\t\topts = opts || {};\n\t\topts.multi = (typeof opts.multi === 'undefined') ? true : opts.multi;\n\n\t\tlet findMethod = opts.multi ? 'find' : 'findOne';\n\t\tlet ids = null;\n\t\tif (findMethod === 'find') {\n\t\t\tids = this[findMethod](query, {\n\t\t\t\t_filterType: 'id'\n\t\t\t}, true);\n\t\t}\n\t\telse {\n\t\t\tids = this[findMethod](query, {\n\t\t\t\t_filterType: 'id'\n\t\t\t});\n\t\t}\n\t\tlet cacheable = this.cacheable;\n\n\t\tif ((opts.multi && !ids.length) || (!opts.multi && !ids)) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (!opts.multi) {\n\t\t\tids = [ids];\n\t\t}\n\n\t\tfor (let id of ids) {\n\t\t\tif (cacheable) {\n\t\t\t\tdelete this.cache[id];\n\t\t\t}\n\n\t\t\tthis.storage.removeItem(id);\n\t\t}\n\n\t\treturn ids.length;\n\t}\n\n\n\tupdate(query, values, opts?) {\n\t\tif (!query) {\n\t\t\tthrow new Error('update needs a query');\n\t\t}\n\t\tif (!values || !isObject(values)) {\n\t\t\tthrow new Error('update needs an object');\n\t\t}\n\n\t\topts = opts || {};\n\t\topts.multi = (typeof opts.multi === 'undefined') ? false : opts.multi;\n\n\t\tlet findMethod = opts.multi ? 'find' : 'findOne';\n\t\tlet ids = this[findMethod](query, {\n\t\t\t_filterType: 'id'\n\t\t});\n\t\tlet pk = this.primaryKey;\n\t\tlet cacheable = this.cacheable;\n\n\t\tif ((opts.multi && !ids.length) || (!opts.multi && !ids)) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (!opts.multi) {\n\t\t\tlet id = ids;\n\t\t\tlet row = cacheable ? this.cache[id] : JSON.parse(this.storage.getItem(id), dateReviver);\n\t\t\tlet isIdUpdated = values[pk] && values[pk] !== row.data[pk];\n\t\t\tlet newId = isIdUpdated ? this.path + values[pk] : id;\n\n\t\t\t// check exist\n\t\t\tif (isIdUpdated && this.findOne(values[pk])) {\n\t\t\t\tthrow new Error('Duplicate value \\'' + values[pk] + '\\' for unique field \\'' + pk + '\\'');\n\t\t\t}\n\n\t\t\tlet data = Object.assign({}, row.data, values);\n\n\t\t\tif (cacheable) {\n\t\t\t\tthis.cache[newId] = {\n\t\t\t\t\tofflineDate: row.offlineDate,\n\t\t\t\t\tofflineDateExpires: row.offlineDateExpires,\n\t\t\t\t\tdata: data\n\t\t\t\t};\n\t\t\t\tif (isIdUpdated) {\n\t\t\t\t\tdelete this.cache[id];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.storage.setItem(newId, JSON.stringify({\n\t\t\t\tofflineDate: row.offlineDate,\n\t\t\t\tofflineDateExpires: row.offlineDateExpires,\n\t\t\t\tdata: data\n\t\t\t}));\n\n\t\t\tif (isIdUpdated) {\n\t\t\t\tthis.storage.removeItem(id);\n\t\t\t}\n\n\t\t\treturn data;\n\n\t\t} else {\n\t\t\tdelete values[pk];\n\n\t\t\tif (!Object.keys(values).length) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tfor (let id of ids) {\n\t\t\t\tlet row = cacheable ? this.cache[id] : JSON.parse(this.storage.getItem(id), dateReviver);\n\n\t\t\t\tlet data = Object.assign({}, row.data, values);\n\n\t\t\t\tif (cacheable) {\n\t\t\t\t\tthis.cache[id] = {\n\t\t\t\t\t\tofflineDate: row.offlineDate,\n\t\t\t\t\t\tofflineDateExpires: row.offlineDateExpires,\n\t\t\t\t\t\tdata: data\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tthis.storage.setItem(id, JSON.stringify({\n\t\t\t\t\tofflineDate: row.offlineDate,\n\t\t\t\t\tofflineDateExpires: row.offlineDateExpires,\n\t\t\t\t\tdata: data\n\t\t\t\t}));\n\t\t\t}\n\n\t\t\treturn ids.length;\n\t\t}\n\t}\n\n\tdrop() {\n\t\tthis.remove({});\n\t\treturn true;\n\t}\n}\n\nclass ID {\n\tconstructor() {\n\t}\n\n\ttoString() {\n\t\treturn (new Date().getTime() / 1000).toString(16).substr(-4) + Math.random().toString(16).substr(2, 12);\n\t}\n}\n\nclass MockStorage {\n\tlength = 0;\n\n\tconstructor () {\n\t\tthis.length = 0;\n\t}\n\n\tkey() {}\n\tsetItem() {}\n\tgetItem() {}\n\tremoveItem() {}\n}\n\nconst isSupported = (storage) => {\n\tif (!storage || !(storage instanceof Object)) {\n\t\treturn false;\n\t}\n\n\ttry {\n\t\tstorage.setItem('_supported', '1');\n\t\tstorage.removeItem('_supported');\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nconst isObject = (object) => {\n\treturn object instanceof Object && object.constructor.name === 'Object';\n};\n\nconst queryMatch = (query, target) => {\n\tif (!query || !Object.keys(query).length) {\n\t\treturn true;\n\t}\n\n\tfor (let field of Object.keys(query)) {\n\t\tlet val = query[field];\n\t\tlet tar = target[field];\n\n\t\tif (!tar) {\n\t\t\tfield.split('.').forEach(path => {\n\t\t\t\tif (!tar) {\n\t\t\t\t\ttar = target[path];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttar = tar[path];\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (val instanceof RegExp) {\n\t\t\tif (!val.test(tar)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (isObject(val)) {\n\t\t\tfor (let op of Object.keys(val)) {\n\t\t\t\tif (Operator._checkExist(op) && !Operator[op](val[op], tar)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (val !== tar) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n};\n\nconst sortCompare = (sort, a, b, i?, fields?) => {\n\ti = i || 0;\n\tfields = fields || Object.keys(sort);\n\n\tlet field = fields[i];\n\n\tif (!field) {\n\t\treturn 0;\n\t}\n\n\tif (a[field] === b[field]) {\n\t\ti++;\n\t\treturn sortCompare(sort, a, b, i, fields);\n\t}\n\n\tif (sort[field] === 1) {\n\t\treturn a[field] - b[field];\n\t}\n\n\tif (sort[field] === -1) {\n\t\treturn b[field] - a[field];\n\t}\n};\n\n/*\n\tQuery Selectors\n\n\t$eq\t\tMatches vals that are equal to a specified val.\n\t$gt\t\tMatches vals that are greater than a specified val.\n\t$gte\tMatches vals that are greater than or equal to a specified val.\n\t$in\t\tMatches any of the vals specified in an array.\n\t$lt\t\tMatches vals that are less than a specified val.\n\t$lte\tMatches vals that are less than or equal to a specified val.\n\t$ne\t\tMatches all vals that are not equal to a specified val.\n\t$nin\tMatches none of the vals specified in an array.\n*/\n\nconst ops = ['$eq', '$gt', '$gte', '$in', '$lt', '$lte', '$ne', '$nin'];\n\nconst isNotNumber = (val) => {\n\treturn typeof val !== 'number';\n};\n\nclass Operator {\n\tstatic $eq(val, tar) {\n\t\treturn tar === val;\n\t}\n\n\tstatic $gt(val, tar) {\n\t\tif (isNotNumber(val)) {\n\t\t\tthrow new Error('\\'$gt\\' value must be a number');\n\t\t}\n\t\treturn tar > val;\n\t}\n\n\tstatic $gte(val, tar) {\n\t\tif (isNotNumber(val)) {\n\t\t\tthrow new Error('\\'$gte\\' value must be a number');\n\t\t}\n\t\treturn tar >= val;\n\t}\n\n\tstatic $in(val, tar) {\n\t\tif (!(val instanceof Array)) {\n\t\t\tthrow new Error('\\'$in\\' value must be an array');\n\t\t}\n\t\treturn val.includes(tar);\n\t}\n\n\tstatic $lt(val, tar) {\n\t\tif (isNotNumber(val)) {\n\t\t\tthrow new Error('\\'$lt\\' value must be a number');\n\t\t}\n\t\treturn tar < val;\n\t}\n\n\tstatic $lte(val, tar) {\n\t\tif (isNotNumber(val)) {\n\t\t\tthrow new Error('\\'$lte\\' value must be a number');\n\t\t}\n\t\treturn tar <= val;\n\t}\n\n\tstatic $ne(val, tar) {\n\t\treturn tar !== val;\n\t}\n\n\tstatic $nin(val, tar) {\n\t\tif (!(val instanceof Array)) {\n\t\t\tthrow new Error('\\'$nin\\' value must be an array');\n\t\t}\n\t\treturn !val.includes(tar);\n\t}\n\n\tstatic _checkExist(op) {\n\t\tif (ops.includes(op)) {\n\t\t\treturn true;\n\t\t}\n\t\tthrow new Error('unknown operator: \\'' + op + '\\'');\n\t}\n}","import { Injectable } from '@angular/core';\nimport { LocalStorageService } from 'ngx-localstorage';\nimport { UserModel } from './models/user.model';\nimport { BehaviorSubject } from 'rxjs';\nimport { StorageDB } from './offline-db';\n\n@Injectable()\nexport class OfflineManagerService {\n\n\tpublic offlineMode = new BehaviorSubject<boolean>(true);\n\n\tprivate _offlineDB;\n\n\tconstructor(private _storage: LocalStorageService) {\n\t\tthis._offlineDB = new StorageDB({\n\t\t\tstorage: window.localStorage,\n\t\t\tdatabase: 'offlineDB',\n\t\t\tprimaryKey: '_id'\n\t\t});\n\n\t\tlet now = new Date();\n\n\t\tlet collections = this._offlineDB.getCollections();\n\t\tcollections.forEach(collection => {\n\t\t\tlet entries = this.find(collection, {}, {}, true);\n\t\t\tentries.forEach(entry => {\n\t\t\t\tif (!entry.hasOwnProperty('offlineDate') || !entry.hasOwnProperty('offlineDateExpires')) {\n\t\t\t\t\tthis.removeDocument(collection, entry._id);\n\t\t\t\t}\n\t\t\t\telse if (now.getTime() >= entry.offlineDateExpires.getTime()) {\n\t\t\t\t\tthis.removeDocument(collection, entry.data._id);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\tpublic setOffline(value: boolean) {\n\t\tthis.offlineMode.next(value);\n\t}\n\n\tpublic saveUser(user: UserModel) {\n\t\treturn this._storage.set('user', JSON.stringify(user));\n\t}\n\n\tpublic getUser() {\n\t\treturn this._storage.get('user');\n\t}\n\n\tpublic removeUser() {\n\t\tthis._storage.remove('user');\n\t}\n\n\tpublic find(collectionName: string, query: Object, options = {}, total = false) {\n\t\tconst collection = this._offlineDB.get(collectionName);\n\n\t\tif (collection) {\n\t\t\treturn collection.find(query, options, total);\n\t\t}\n\n\t\treturn [];\n\t}\n\n\tpublic findOne(collectionName: string, query: Object) {\n\t\tconst collection = this._offlineDB.get(collectionName);\n\n\t\tif (collection) {\n\t\t\treturn collection.findOne(query);\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tpublic insertDocument(collectionName: string, data: Object, expiresDate?: Date) {\n\t\tconst collection = this._offlineDB.get(collectionName);\n\n\t\tlet id = '';\n\n\t\tif (collection && data && (!Array.isArray(data) || data.length)) {\n\t\t\tid = collection.insert(data, expiresDate);\n\t\t}\n\n\t\treturn id;\n\t}\n\n\tpublic updateDocument(collectionName: string, data: Object) {\n\t\tconst collection = this._offlineDB.get(collectionName);\n\n\t\tif (collection) {\n\t\t\tlet doc = collection.findOne({_id: data['_id']});\n\n\t\t\tif (doc) {\n\t\t\t\tdata['__v'] += 1;\n\t\t\t\tcollection.update(data['_id'], data);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\tpublic updateDocumentProps(collectionName: string, doc_id: string, updateParams: any[], doc__v: number) {\n\t\tconst collection = this._offlineDB.get(collectionName);\n\n\t\tif (collection) {\n\t\t\tlet doc = collection.findOne({_id: doc_id});\n\n\t\t\tif (doc) {\n\t\t\t\tupdateParams.forEach(data => {\n\t\t\t\t\tdoc[data.prop] = data.data;\n\t\t\t\t});\n\n\t\t\t\tdoc.__v += 1;\n\n\t\t\t\tcollection.update({_id: doc_id}, doc);\n\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}\n\t\n\tpublic removeDocument(collectionName: string, id: string) {\n\t\tconst collection = this._offlineDB.get(collectionName);\n\n\t\tif (collection) {\n\t\t\tcollection.remove(id);\n\t\t}\n\t}\n\n\tpublic dropCollection(collectionName) {\n\t\tconst collection = this._offlineDB.get(collectionName);\n\n\t\tcollection.drop();\n\t}\n\n\t// public saveDataWithKey(key: string, value: string) {\n\t// \tconsole.log('Saving', JSON.stringify(value));\n\t// \tthis._storage.set(key, JSON.stringify(value));\n\t// }\n\n\t// public getDataWithKey(key: string) {\n\t// \treturn JSON.parse(this._storage.get(key), dateReviver);\n\t// }\n}\n","import { SocketService } from './socket.service';\nimport { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { finalize } from 'rxjs/operators';\nimport { ActiveClientSubscriptionModel } from './models/subscription.model';\nimport { dateReviver, deepCopy } from './util/common.helper';\nimport { OfflineManagerService } from './offline-manager.service';\nimport { AlertService } from './widgets/alert/alert.service';\nimport { Router } from '@angular/router';\n\n@Injectable()\nexport class SocketManagerService {\n\tprivate socketStatus;\n\n\tprivate messageId = 0;\n\tprivate _cbArray = [];\n\tprivate _subArray: ActiveClientSubscriptionModel[] = [];\n\tprivate _sendQueue = [];\n\tprivate _offlineUpdates = [];\n\n\tprivate _runningQueue = false;\n\tprivate initConnection = false;\n\n\tprivate _connectionDelayTimeout = null;\n\n\tpublic onerror: () => void = function () {};\n\n\tconstructor(private _socket: SocketService, private _offline: OfflineManagerService, private _alert: AlertService, private _router: Router) {}\n\n\tpublic initSocketManager(): void {\n\t\tthis._socket.readyState$.subscribe(socketStatus => {\n\t\t\tthis.socketStatus = socketStatus;\n\t\t});\n\n\t\tthis._socket.onmessage = (event: MessageEvent) => {\n\t\t\tlet resData = JSON.parse(event.data, dateReviver);\n\n\t\t\tif (resData.data === 'reloadWSCommand') {\n\t\t\t\twindow.location.href = window.location.href + '?forceReload=true';\n\t\t\t}\n\t\t\telse if (resData.data === 'reconnectWSCommand') {\n\t\t\t\tthis._socket.reconnect();\n\t\t\t}\n\t\t\telse if (resData.data === 'disconnectWSCommand') {\n\t\t\t\tthis.closeSocket();\n\t\t\t}\n\n\t\t\tlet offlineIndex = this._offlineUpdates.findIndex(a => a.messageId === resData.messageId);\n\t\t\tif (offlineIndex >= 0) {\n\t\t\t\tthis._offline.removeDocument(this._offlineUpdates[offlineIndex].type, this._offlineUpdates[offlineIndex].id_offline_doc);\n\t\t\t\tthis._offlineUpdates.splice(offlineIndex, 1);\n\t\t\t}\n\n\t\t\tif (resData.data !== 'ACK' && resData.data !== 'NACK') {\n\t\t\t\tif (this._cbArray.map(a => a.messageId).includes(resData.messageId)) {\t\n\t\t\t\t\tlet index = this._cbArray.findIndex(a => a.messageId === resData.messageId);\n\t\t\t\t\t\n\t\t\t\t\tif (index >= 0) {\n\t\t\t\t\t\tclearInterval(this._cbArray[index].timerId);\n\n\t\t\t\t\t\tif (this._cbArray[index].cb) {\n\t\t\t\t\t\t\tthis._cbArray[index].cb(resData.hasError ? resData.data : null, resData.hasError ? null : resData.data);\n\t\t\t\t\t\t\tthis._cbArray[index].resolveFn(resData.hasError ? resData.data : null);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (resData.hasError) {\n\t\t\t\t\t\t\t\tthis._cbArray[index].rejectFn(resData.data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tthis._cbArray[index].resolveFn(resData.data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis._cbArray.splice(index, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (this._subArray.map(a => a.messageId).includes(resData.messageId)) {\t\n\t\t\t\t\tlet index = this._subArray.findIndex(a => a.messageId === resData.messageId);\n\t\t\t\t\t\n\t\t\t\t\tif (index >= 0) {\n\t\t\t\t\t\tthis._subArray[index].subject.next(resData.data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis._socket.onopen = (event: Event) => {\n\t\t\tthis._connectionDelayTimeout = setTimeout(() => {\n\t\t\t\tthis._connectionDelayTimeout = null;\n\n\t\t\t\tthis._offline.setOffline(false);\n\t\t\t\t\n\t\t\t\tlet collectionUpdates = this._offline.find('collectionUpdate', {});\n\n\t\t\t\tcollectionUpdates.forEach(update => {\n\t\t\t\t\tlet messageId = this.messageId++;\n\n\t\t\t\t\tthis._offlineUpdates.push({\n\t\t\t\t\t\tid_offline_doc: update._id,\n\t\t\t\t\t\tmessageId: messageId,\n\t\t\t\t\t\ttype: 'collectionUpdate'\n\t\t\t\t\t});\n\n\t\t\t\t\tupdate.data[2] = messageId;\n\n\t\t\t\t\tif (update.type === 'updateDocument' && update.oldData) {\n\t\t\t\t\t\tupdate.data[4] = 'updateDocumentOffline';\n\t\t\t\t\t\tupdate.data[0] = 'Offline - ' + update.data[0];\n\t\t\t\t\t}\n\t\t\t\t\telse if (update.type === 'updateDocumentProps' && update.oldData) {\n\t\t\t\t\t\tupdate.data[4] = 'updateDocumentPropsOffline';\n\t\t\t\t\t\tupdate.data[0] = 'Offline - ' + update.data[0];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tupdate.data[0] = 'Offline - ' + update.data[0];\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (collectionUpdates.length) {\n\t\t\t\t\tthis.send('Offline Updates', new Date(), this.messageId++, 'offline', collectionUpdates.sort((a, b) => a.date.getTime() - b.date.getTime()));\n\t\t\t\t}\n\n\t\t\t\tif (this.initConnection) {\n\t\t\t\t\tthis._subArray.forEach(sub => {\n\t\t\t\t\t\tthis.send(sub.messageRoute, new Date(), sub.messageId, 'subscription', 'sub', sub.subscription, ...sub.parameters);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tthis.initConnection = true;\n\t\t\t}, 1000);\n\t\t};\n\n\t\tthis._socket.onerror = (ev: ErrorEvent) => {\n\t\t\tif (this._connectionDelayTimeout) {\n\t\t\t\tclearTimeout(this._connectionDelayTimeout);\n\t\t\t}\n\t\t\tconsole.log(new Date(), 'SOCKET ERROR', ev);\n\t\t\tthis.onerror();\n\t\t};\n\n\t\tthis._socket.onclose = (ev: CloseEvent) => {\n\t\t\tif (this._connectionDelayTimeout) {\n\t\t\t\tclearTimeout(this._connectionDelayTimeout);\n\t\t\t}\n\t\t}\n\n\t\tsetInterval(() => {\n\t\t\tif (this.initConnection) {\n\t\t\t\tif (!this._runningQueue) {\n\t\t\t\t\tif (this._sendQueue.length) {\n\t\t\t\t\t\tthis._runningQueue = true;\n\t\t\t\t\t\tfor (let i = this._sendQueue.length - 1; i >= 0; i--) {\n\t\t\t\t\t\t\tif (this._socket && this._socket.ws) {\n\t\t\t\t\t\t\t\tif (this.socketStatus === WebSocket.OPEN) {\n\t\t\t\t\t\t\t\t\tlet nextSendItem = this._sendQueue.pop();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tthis._socket.send(...nextSendItem);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._runningQueue = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}, 25);\n\t}\n\n\tpublic openSocket(environment, protocols) {\n\t\tthis._socket.openSocket(environment, protocols);\n\t}\n\n\tpublic closeSocket() {\n\t\tthis._socket.close();\n\t}\n\n\tpublic call(method: string, ...parameters: any[]) {\n\t\tlet resolveFn = null;\n\t\tlet rejectFn = null;\n\n\t\tlet promise = new Promise((resolve, reject) => {\n\t\t\tresolveFn = resolve;\n\t\t\trejectFn = reject;\n\t\t});\n\n\t\tlet messageId = this.messageId++;\n\n\t\tlet timerId = setInterval(() => {\n\t\t\tif (this._cbArray.filter(a => a.messageId === messageId)[0]) {\n\t\t\t\tthis.send((this._router.url.includes('?') ? this._router.url.substring(0, this._router.url.indexOf('?')) : this._router.url), new Date(), messageId, 'methodResponse', method, ...parameters);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tclearInterval(timerId);\n\t\t\t}\n\t\t}, 5000);\n\n\t\tif (parameters[parameters.length - 1] && typeof(parameters[parameters.length - 1]) === 'function') {\n\t\t\tthis._cbArray.push({\n\t\t\t\tmessageId: messageId,\n\t\t\t\tcb: parameters.pop(),\n\t\t\t\tresolveFn: resolveFn,\n\t\t\t\trejectFn: rejectFn,\n\t\t\t\ttimerId: timerId,\n\t\t\t\tretryCnt: 0\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tthis._cbArray.push({\n\t\t\t\tmessageId: messageId,\n\t\t\t\tcb: null,\n\t\t\t\tresolveFn: resolveFn,\n\t\t\t\trejectFn: rejectFn,\n\t\t\t\ttimerId: timerId,\n\t\t\t\tretryCnt: 0\n\t\t\t});\n\t\t}\n\n\t\tlet cnt = parameters.length;\n\t\twhile ((parameters[parameters.length - 1] === undefined || parameters[parameters.length - 1] === null) && cnt > 0) {\n\t\t\tparameters.pop();\n\t\t\tcnt = parameters.length;\n\t\t}\n\n\t\tthis.send((this._router.url.includes('?') ? this._router.url.substring(0, this._router.url.indexOf('?')) : this._router.url), new Date(), messageId, 'method', method, ...parameters);\n\n\t\treturn promise;\n\t}\n\n\tpublic subscribe(subscription: string, ...parameters) {\n\t\tconst copyParameters = deepCopy(parameters);\n\t\tconst newSubject = new Subject<any>();\n\n\t\tlet messageId = this.messageId++;\n\n\t\tthis._subArray.push({\n\t\t\tmessageId: messageId,\n\t\t\tmessageRoute: (this._router.url.includes('?') ? this._router.url.substring(0, this._router.url.indexOf('?')) : this._router.url),\n\t\t\tsubscription: subscription,\n\t\t\tparameters: copyParameters,\n\t\t\tsubject: newSubject\n\t\t});\n\n\t\tconst observable = newSubject.pipe(finalize(() => {\n\t\t\tthis.unsubscribe(messageId, subscription, ...copyParameters);\n\t\t\tthis._subArray.splice(this._subArray.map(a => a.messageId).indexOf(messageId), 1);\n\t\t}));\n\n\t\tthis.send((this._router.url.includes('?') ? this._router.url.substring(0, this._router.url.indexOf('?')) : this._router.url), new Date(), messageId, 'subscription', 'sub', subscription, ...copyParameters);\n\n\t\treturn observable;\n\t}\n\n\tpublic subscribeBypassRoute(subscription: string, ...parameters) {\n\t\tconst copyParameters = deepCopy(parameters);\n\t\tconst newSubject = new Subject<any>();\n\n\t\tlet messageId = this.messageId++;\n\n\t\tthis._subArray.push({\n\t\t\tmessageId: messageId,\n\t\t\tmessageRoute: 'Bypass',\n\t\t\tsubscription: subscription,\n\t\t\tparameters: copyParameters,\n\t\t\tsubject: newSubject\n\t\t});\n\n\t\tconst observable = newSubject.pipe(finalize(() => {\n\t\t\tthis.unsubscribe(messageId, subscription, ...copyParameters);\n\t\t\tthis._subArray.splice(this._subArray.map(a => a.messageId).indexOf(messageId), 1);\n\t\t}));\n\n\t\tthis.send('Bypass', new Date(), messageId, 'subscription', 'sub', subscription, ...copyParameters);\n\n\t\treturn observable;\n\t}\n\n\tpublic unsubscribe(messageId, subscription: string, ...parameters) {\n\t\tthis.send((this._router.url.includes('?') ? this._router.url.substring(0, this._router.url.indexOf('?')) : this._router.url), new Date(), messageId, 'subscription', 'unsub', subscription, ...parameters);\n\t}\n\t\n\tprivate send(...data: any[]) {\n\t\tif (data[3] === 'subscription') {\n\t\t\tif (this.socketStatus === WebSocket.OPEN) {\n\t\t\t\tthis._socket.send(...data);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!this._sendQueue.filter(a => JSON.stringify(a) === JSON.stringify(data)).length) {\n\t\t\t\t\tthis._sendQueue.splice(0, 0, data);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (data[3] === 'method') {\n\t\t\tif (this.socketStatus === WebSocket.OPEN) {\n\t\t\t\tif (!this._sendQueue.filter(a => JSON.stringify(a) === JSON.stringify(data)).length) {\n\t\t\t\t\tthis._sendQueue.splice(0, 0, data);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (data[4] === 'insertDocument') {\n\t\t\t\t\tthis._alert.setAlert('warning', 'This insert command has not taken place on the server yet because you are offline. It will automatically sync up next time you are online as long as you do not clear your cache!');\n\n\t\t\t\t\tthis._offline.insertDocument('collectionUpdate', {\n\t\t\t\t\t\ttype: 'insert',\n\t\t\t\t\t\tdata: data,\n\t\t\t\t\t\toldData: null,\n\t\t\t\t\t\tdate: new Date()\n\t\t\t\t\t});\n\n\t\t\t\t\tlet res = this._offline.insertDocument(data[5], data[6]);\n\n\t\t\t\t\tlet cb = this._cbArray.filter(a => a.messageId === data[2])[0];\n\t\t\t\t\tif (cb && cb.cb) {\n\t\t\t\t\t\tcb.cb(null, res);\n\n\t\t\t\t\t\tthis._cbArray.splice(this._cbArray.findIndex(a => a.messageId === data[2]), 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (data[4] === 'updateDocument') {\n\t\t\t\t\tthis._alert.setAlert('warning', 'This update command has not taken place on the server yet because you are offline. It will automatically sync up next time you are online as long as you do not clear your cache!');\n\t\t\t\t\tthis._offline.insertDocument('collectionUpdate', {\n\t\t\t\t\t\ttype: 'updateDocument',\n\t\t\t\t\t\tdata: data,\n\t\t\t\t\t\toldData: this._offline.findOne(data[5], data[6]._id),\n\t\t\t\t\t\tdate: new Date()\n\t\t\t\t\t});\n\n\t\t\t\t\tif (this._offline.findOne(data[5], {_id: data[6]._id})) {\n\t\t\t\t\t\tthis._offline.updateDocument(data[5], data[6]);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tconsole.log('Could not find Offline data', data[5], data[6]);\n\t\t\t\t\t}\n\n\t\t\t\t\tlet cb = this._cbArray.filter(a => a.messageId === data[2])[0];\n\t\t\t\t\tif (cb && cb.cb) {\n\t\t\t\t\t\tcb.cb(null, 1);\n\t\t\t\t\t\tthis._cbArray.splice(this._cbArray.findIndex(a => a.messageId === data[2]), 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (data[4] === 'updateDocumentProps') {\n\t\t\t\t\tthis._alert.setAlert('warning', 'This update command has not taken place on the server yet because you are offline. It will automatically sync up next time you are online as long as you do not clear your cache!');\n\t\t\t\t\tthis._offline.insertDocument('collectionUpdate', {\n\t\t\t\t\t\ttype: 'updateDocumentProps',\n\t\t\t\t\t\tdata: data,\n\t\t\t\t\t\toldData: this._offline.findOne(data[5], data[6]),\n\t\t\t\t\t\tdate: new Date()\n\t\t\t\t\t});\n\n\t\t\t\t\tif (this._offline.findOne(data[5], {_id: data[6]})) {\n\t\t\t\t\t\tthis._offline.updateDocumentProps(data[5], data[6], data[7], data[8]);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tconsole.log('Could not find Offline data', data[5], data[6]);\n\t\t\t\t\t}\n\n\t\t\t\t\tlet cb = this._cbArray.filter(a => a.messageId === data[2])[0];\n\t\t\t\t\tif (cb && cb.cb) {\n\t\t\t\t\t\tcb.cb(null, 1);\n\t\t\t\t\t\tthis._cbArray.splice(this._cbArray.findIndex(a => a.messageId === data[2]), 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (data[4] === 'removeDocument') {\n\t\t\t\t\tthis._alert.setAlert('warning', 'This remove command has not taken place on the server yet because you are offline. It will automatically sync up next time you are online as long as you do not clear your cache!');\n\t\t\t\t\tthis._offline.insertDocument('collectionUpdate', {\n\t\t\t\t\t\ttype: 'removeDocument',\n\t\t\t\t\t\tdata: data,\n\t\t\t\t\t\toldData: null,\n\t\t\t\t\t\tdate: new Date()\n\t\t\t\t\t});\n\n\t\t\t\t\tif (this._offline.findOne(data[5], {_id: data[6]})) {\n\t\t\t\t\t\tthis._offline.removeDocument(data[5], data[6]);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tconsole.log('Could not find Offline data', data[5], data[6]);\n\t\t\t\t\t}\n\n\t\t\t\t\tlet cb = this._cbArray.filter(a => a.messageId === data[2])[0];\n\t\t\t\t\tif (cb && cb.cb) {\n\t\t\t\t\t\tcb.cb(null, 1);\n\t\t\t\t\t\tthis._cbArray.splice(this._cbArray.findIndex(a => a.messageId === data[2]), 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (data[3] === 'offline') {\n\t\t\tif (this.socketStatus === WebSocket.OPEN) {\n\t\t\t\tthis._socket.send(...data);\n\t\t\t}\n\t\t}\n\t}\n\n\tgetStatus() {\n\t\treturn this._socket.readyState$;\n\t}\n}\n","import { Injectable } from '@angular/core';\nimport { LocalStorageService } from 'ngx-localstorage';\n\n@Injectable()\nexport class TokenManagerService {\n\n\tconstructor(private _storage: LocalStorageService) {}\n\n\tpublic getToken(tokenKey: string) {\n\t\treturn this._storage.get(tokenKey);\n\t}\n\t\n\tpublic setToken(tokenKey: string, tokenValue: string) {\n\t\tthis._storage.set(tokenKey, tokenValue);\n\t}\n\n\tpublic removeToken(tokenKey: string) {\n\t\tthis._storage.remove(tokenKey);\n\t}\n}\n","import { BehaviorSubject, Subscription } from 'rxjs';\nimport { UserModel } from './models/user.model';\nimport { Injectable } from '@angular/core';\nimport { SocketManagerService } from './socket-manager.service';\nimport { TokenManagerService } from './token-manager.service';\nimport { AlertService } from './widgets/alert/alert.service';\nimport { OfflineManagerService } from './offline-manager.service';\nimport { dateReviver } from './util/common.helper';\nimport { Router } from '@angular/router';\nimport { HttpClient } from '@angular/common/http';\n\n@Injectable()\nexport class AccountManagerService {\n\n\tuser = new BehaviorSubject<UserModel>(null);\n\tinitCompleted = new BehaviorSubject<boolean>(false);\n\tloginCompleted = new BehaviorSubject<boolean>(false);\n\tuser$: Subscription;\n\n\tenvironment = null;\n\n\tconstructor(private _router: Router, private _socket: SocketManagerService, private _token: TokenManagerService, private _http: HttpClient, private _alert: AlertService, private _offline: OfflineManagerService) {\n\t\t\n\t}\n\n\tpublic initLoginManager(environment): void {\n\t\tthis.environment = environment;\n\t\t\n\t\tthis._socket.initSocketManager();\n\n\t\tlet token = this._token.getToken('refreshToken');\n\n\t\tif (token) {\n\t\t\tthis.initLogin(token);\n\n\t\t\tsetInterval(() => {\n\t\t\t\tthis.initLogin(token);\n\t\t\t}, 3000);\n\t\t}\n\t\telse {\n\t\t\tthis.initCompleted.next(true);\n\t\t}\n\t}\n\n\tprivate initLogin(token: string) {\n\t\tif (navigator.onLine) {\n\t\t\tif (this._offline.offlineMode.getValue()) {\n\t\t\t\tthis._offline.setOffline(false);\n\t\t\t\tthis.getAccessToken(token);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (!this._offline.offlineMode.getValue() || !this.initCompleted.getValue()) {\n\n\t\t\t\tthis.closeSocket();\n\t\t\t\tthis._offline.setOffline(true);\n\n\t\t\t\tlet user = JSON.parse(this._offline.getUser(), dateReviver);\n\n\t\t\t\tif (user) {\n\t\t\t\t\tthis.user.next(user);\n\t\t\t\t}\n\n\t\t\t\tif (!this.initCompleted.getValue()) {\n\t\t\t\t\tthis.initCompleted.next(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic getAccessToken(refreshToken) {\n\t\tif (refreshToken) {\n\t\t\tthis._http.post(this.environment.SERVER_URL + '/accessToken', {refreshToken: refreshToken}).toPromise().then((res: any) => {\n\t\t\t\tif (res.error) {\n\t\t\t\t\tthis.initCompleted.next(true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._token.setToken('accessToken', res.result.token);\n\t\t\t\t\tthis.user.next(res.result.user);\n\n\t\t\t\t\tthis.openSocket(res.result.token);\n\n\t\t\t\t\tif (this.user$) {\n\t\t\t\t\t\tthis.user$.unsubscribe();\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.user$ = this._socket.subscribeBypassRoute('userWithId', res.result.user._id).subscribe(resUser => {\n\t\t\t\t\t\tif (resUser) {\n\t\t\t\t\t\t\tthis.user.next(resUser);\n\t\t\t\t\t\t\tthis.loginCompleted.next(true);\n\t\t\t\t\t\t\tthis.initCompleted.next(true);\n\t\t\t\t\t\t\tthis._offline.saveUser(resUser);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}, err => {\n\t\t\t\tthis.initCompleted.next(true);\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic logIn(username: string, password: string) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._http.post(this.environment.SERVER_URL + '/login', {username: username, password: password}).toPromise().then((res: any) => {\t\n\t\t\t\tif (res.error) {\n\t\t\t\t\tthis._alert.setAlert('error', res.result);\n\t\t\t\t\treject(res.result);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._token.setToken('refreshToken', res.result.token);\n\t\t\t\t\tthis.getAccessToken(res.result.token);\n\t\t\t\t\tresolve(res.result.token); //should be resolving user\n\t\t\t\t}\n\t\t\t}, err => {});\n\t\t});\n\t}\n\n\tpublic logIn365(azure_token: string) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._http.post(this.environment.SERVER_URL + '/login365', {id_token: azure_token}).toPromise().then((res: any) => {\t\n\t\t\t\tif (res.error) {\n\t\t\t\t\tthis._alert.setAlert('error', res.result);\n\t\t\t\t\treject(res.result);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._token.setToken('refreshToken', res.result.token);\n\t\t\t\t\tthis.getAccessToken(res.result.token);\n\t\t\t\t\tresolve(res.result.token); //should be resolving user\n\t\t\t\t}\n\t\t\t}, err => {});\n\t\t});\n\t}\n\n\tpublic resetUserPassword(username: string) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._http.post(this.environment.SERVER_URL + '/resetPassword', {username: username}).toPromise().then((res: any) => {\t\n\t\t\t\tresolve(true);\n\t\t\t}, err => {});\n\t\t});\n\t}\n\n\tpublic logOut() {\n\t\tthis._router.navigateByUrl('/home');\n\n\t\tsetTimeout(() => {\n\t\t\tthis.user.next(null);\n\t\t\tthis._token.removeToken('refreshToken');\n\t\t\tthis._token.removeToken('accessToken');\n\t\t\tthis._offline.removeUser();\n\t\t\tthis.closeSocket();\n\t\t}, 500);\n\t}\n\n\tpublic openSocket(token) {\n\t\tthis._socket.openSocket(this.environment, [token]);\n\t}\n\n\tpublic closeSocket() {\n\t\tthis._socket.closeSocket();\n\t}\n\n\tpublic setUser(user: UserModel) {\n\t\tthis.user.next(user);\n\t}\n\n\tpublic getUser(): UserModel {\n\t\treturn this.user.getValue();\n\t}\n\n\tpublic getSocketStatus() {\n\t\treturn this._socket.getStatus();\n\t}\n\n\tpublic isUserInView(view: string) {\n\t\tlet res = false;\n\n\t\tif (this.isUserSuperAdmin()) {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet user = this.user.getValue();\n\n\t\tif (user) {\n\t\t\tuser.roles.groups.forEach(group => {\n\t\t\t\tif (group.views.filter(a => a.startsWith(view)).length) {\n\t\t\t\t\tres = true;\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\tif (user.roles.miscs.filter(a => a.startsWith(view)).length) {\n\t\t\t\tres = true;\n\t\t\t}\n\t\n\t\t\tif (user.roles.groups.filter(a => a.name === view).length) {\n\t\t\t\tres = true;\n\t\t\t}\n\t\t}\n\n\t\treturn res;\n\t}\n\n\tpublic isUserSuperAdmin() {\n\t\treturn this.user.getValue() && this.user.getValue().roles.super_admin; //Remove any later\n\t}\n\n\tpublic isInitCompleted() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tif (this.initCompleted.value) {\n\t\t\t\tresolve(true);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlet initSub$ = this.initCompleted.subscribe((data) => {\n\t\t\t\t\tif (data) {\n\t\t\t\t\t\tinitSub$.unsubscribe();\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t}\n\t\t\t\t}, () => {});\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic isLoginCompleted() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tif (this.loginCompleted.value) {\n\t\t\t\tresolve(true);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlet initSub$ = this.loginCompleted.subscribe((data) => {\n\t\t\t\t\tif (data) {\n\t\t\t\t\t\tinitSub$.unsubscribe();\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n","import { FormControl, FormGroup, AbstractControl } from '@angular/forms';\nimport {Injectable} from '@angular/core';\n\n@Injectable()\nexport class ValidationService {\n\n\tconstructor() { }\n\n\twholeNumbersAllowNegative(c: FormControl) {\n\t\tlet regEx = /^[\\-]?\\d+$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\twholeNumbersAllowNegative: { valid: false }\n\t\t};\n\t}\n\n\twholeNumbersWithZero(c: FormControl) {\n\t\tlet regEx = /^[0-9]*$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\twholeNumbersWithZero: { valid: false }\n\t\t};\n\t}\n\n\twholeNumbersGreaterThanZero(c: FormControl) {\n\t\tlet regEx = /^[1-9]+[0-9]*$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\twholeNumbersGreaterThanZero: { valid: false }\n\t\t};\n\t}\n\n\tdecimalWithZero(c: FormControl) {\n\t\tlet regEx = /^\\d*\\.?\\d*$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\tdecimalWithZero : { valid: false }\n\t\t};\n\t}\n\n\tdecimalGreaterThanZero(c: FormControl) {\n\t\tlet regEx = /^\\s*(?=.*[1-9])\\d*(?:\\.\\d{1,10})?\\s*$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\tdecimalGreaterThanZero : { valid: false }\n\t\t};\n\t}\n\n\tcurrency(c: FormControl) {\n\t\tlet regEx = /^[0-9]\\d*(\\.\\d+)?$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\tcurrency: { valid: false }\n\t\t};\n\t}\n\n\tcurrencyGreaterThanZero(c: FormControl) {\n\t\tlet regEx = /^[0-9]\\d*(\\.\\d+)?$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn regEx.test(c.value) && c.value > 0 ? null : {\n\t\t\tcurrency: { valid: false }\n\t\t};\n\t}\n\n\tcurrencyAllowNegative(c: FormControl) {\n\t\tlet regEx = /^[\\-]?[0-9]\\d*(\\.\\d+)?$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\tcurrency: { valid: false }\n\t\t};\n\t}\n\n\tphoneNumber(c: FormControl) {\n\t\t//let regEx = /^(?:(?:\\+?1\\s*(?:[.-]\\s*)?)?(?:\\(\\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\\s*\\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\\s*(?:[.-]\\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\\s*(?:[.-]\\s*)?([0-9]{4})(?:\\s*(?:#|x\\.?|ext\\.?|extension)\\s*(\\d+))?$/;\n\t\tlet regEx = /^1?([2-9])(\\d{9})/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\tphoneNumber: { valid: false }\n\t\t};\n\t}\n\n\temail(c: FormControl) {\n\t\tlet regEx = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\temail: { valid: false }\n\t\t};\n\t}\n\n\tmatchPassword(group: FormGroup): any {\n\t\tlet password = <FormControl>group.controls['password'];\n\t\tlet confirm_password = <FormControl>group.controls['confirm_password'];\n\n\t\tif (!password.value || !confirm_password.value) {\n\t\t\treturn null;\n\t\t} \n\n\t\treturn (password.value === confirm_password.value) ? null : {\n\t\t\tmatchPassword : { isValid: false }\n\t\t};\n\t}\n\n\tdensity(c: FormControl) {\n\t\tlet regEx = /^[\\-]?\\d*\\.?\\d*$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\tdensity: { valid: false }\n\t\t};\n\t}\n\n\tmaxValue(max: number) {\n\t\treturn (control: AbstractControl): {[key: string]: any} => {\n\t\t\tconst input = typeof(control.value) === 'string' ? parseFloat(control.value) : control.value;\n\t\t\tconst hasError = input > max;\n\n\t\t\tif (hasError) {\n\t\t\t\treturn { 'maxValue': {max} };\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t}; \n\t}\n\n\tminValue(min: number) {\n\t\treturn (control: AbstractControl): {[key: string]: any} => {\n\t\t\tconst input = typeof(control.value) === 'string' ? parseFloat(control.value) : control.value;\n\t\t\tconst hasError = input < min;\n\n\t\t\tif (hasError) {\n\t\t\t\treturn { 'minValue': {min} };\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t}; \n\t}\n\n\tmultipleOf(value: number) {\n\t\treturn (control: AbstractControl): {[key: string]: any} => {\n\t\t\tconst input = typeof(control.value) === 'string' ? parseFloat(control.value) : control.value;\n\t\t\tconst hasError = input % value !== 0;\n\n\t\t\tif (hasError) {\n\t\t\t\treturn { 'multipleOf': {value} };\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t}; \n\t}\n\n\tminLengthArray(min: number) {\n\t\treturn (c: AbstractControl): {[key: string]: any} => {\n\t\t\tif (c.value && c.value.length >= min) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t\treturn { 'minLengthArray': {valid: false }};\n\t\t};\n\t}\n\n\tvalidIPAddress(c: FormControl) {\n\t\tlet regEx = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\tvalidIPAddress : { valid: false }\n\t\t};\n\t}\n\n\talphaNumericWithDashes(c: FormControl) {\n\t\tlet regEx = /^[a-zA-Z0-9-_]+$/;\n\n\t\tif (c.value === '' || c.value === null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn regEx.test(c.value) ? null : {\n\t\t\talphaNumericWithDashes : { valid: false }\n\t\t};\n\t}\n}\n","import {Injectable} from '@angular/core';\nimport { SocketManagerService } from '../socket-manager.service';\n\n@Injectable()\nexport class AwsService {\n\n\tconstructor(private _socket: SocketManagerService) {}\n\n\tdataURItoFile(dataURI: string, filename: string): File {\n\t\t// convert base64 to raw binary data held in a string\n\t\t// doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this\n\t\tlet byteString = atob(dataURI.split(',')[1]);\n\n\t\t// separate out the mime component\n\t\tlet mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];\n\n\t\t// write the bytes of the string to an ArrayBuffer\n\t\tlet ab = new ArrayBuffer(byteString.length);\n\t\tlet ia = new Uint8Array(ab);\n\t\tfor (let i = 0; i < byteString.length; i++) {\n\t\t\tia[i] = byteString.charCodeAt(i);\n\t\t}\n\n\t\t// write the ArrayBuffer to a blob, and you're done\n\t\tlet blob = new Blob([ab], {type: mimeString});\n\t\t\n\t\tblob['lastModifiedDate'] = new Date();\n\t\tblob['name'] = filename;\n\n\t\treturn <File>blob;\n\t}\n\n\tuploadFile(file: File, type: string, order?: number, filename?: string) {\n\t\treturn new Promise ((resolve, reject) => {\n\t\t\tif (file.size) {\n\t\t\t\tthis.getBase64(file).then(data => {\n\t\t\t\t\tthis._socket.call('uploadFileAndSave', filename ? filename : file.name, data, file.size, order ? order : -1, type, true, (err, res) => {\n\t\t\t\t\t\tif (res) {\n\t\t\t\t\t\t\tresolve(res);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\treject('Invalid File');\n\t\t\t}\n\t\t});\n\t}\n\n\tgetFileWithKey(key: string, callback: Function) {\n\t\tthis._socket.call('getFile', key, callback);\n\t}\n\n\tgetFileWithId(id: string, callback: Function) {\n\t\tthis._socket.call('findOne', 'files', {_id: id}, (err, file) => {\n\t\t\tthis.getFileWithKey(file.key, callback);\n\t\t});\n\t}\n\n\tdeleteFile(key: string, callback: Function) {\n\t\tthis._socket.call('deleteFile', key, callback);\n\t}\n\n\tdeleteFileWithId(id: string, callback: Function) {\n\t\tthis._socket.call('findOne', 'files', {_id: id}, (err, file) => {\n\t\t\tthis.deleteFile(file.key, callback);\n\t\t});\n\t}\n\n\tdeleteFilesWithKeys(keys: string[], callback: Function) {\n\t\tthis._socket.call('deleteFiles', keys, callback);\n\t}\n\n\tgetBase64(file): Promise<string> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst reader = new FileReader();\n\t\t\treader.readAsDataURL(file);\n\t\t\treader.onload = () => resolve(<string>reader.result);\n\t\t\treader.onerror = error => reject(error);\n\t\t});\n\t}\n}\n","import { FormBuilder } from '@angular/forms';\nimport { AlertService } from './widgets/alert/alert.service';\nimport { AccountManagerService } from './account-manager.service';\nimport { Injectable } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { SocketManagerService } from './socket-manager.service';\nimport { CoreService } from './core.service';\nimport { ValidationService } from './util/validation.service';\nimport { AwsService } from './util/aws.service';\n\nexport class BaseComponent {\n\tconstructor(protected providerService: ProviderService) {}\n}\n\n@Injectable()\nexport class ProviderService {\n\tconstructor(\n\t\tpublic _app: CoreService,\n\t\tpublic _router: Router,\n\t\tpublic _socket: SocketManagerService,\n\t\tpublic _account: AccountManagerService,\n\t\tpublic _alert: AlertService,\n\t\tpublic _vs: ValidationService,\n\t\tpublic _aws: AwsService,\n\t\tpublic _fb: FormBuilder\n\t) {}\n}","import { Component, Input, HostListener } from '@angular/core';\nimport { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';\n\n@Component({\n\ttemplate: `\n\t\t<div class=\"modal-header\">\n\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-info-circle\" style=\"color: blue; font-size: 0.85em\" aria-hidden=\"true\"></i> {{ title }}</h4>\n\t \t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"activeModal.dismiss('Cross click')\">\n\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t \t\t</button>\n\t\t</div>\n\t\t<div class=\"modal-body\">\n\t \t \t<p>{{ body }}</p>\n\t\t</div>\n\t\t<div class=\"modal-footer\">\n\t \t\t<button type=\"button\" class=\"btn btn-secondary\" (click)=\"activeModal.close('Close click')\">Ok</button>\n\t\t</div>\n `\n})\n// tslint:disable-next-line:component-class-suffix\nexport class DialogNotifyContent {\n\t@Input() title: string;\n\t@Input() body: string;\n\n\t@HostListener('document:keypress', ['$event'])\n\t\thandleKeyboardEvent(event: KeyboardEvent) { \n\t\t\tif (event.keyCode === 13) {\n\t\t\t\tthis.activeModal.close();\n\t\t\t}\n\t\t}\n\n\tconstructor(public activeModal: NgbActiveModal) {}\n}","import { Component, Input, ViewChild } from '@angular/core';\nimport { FormGroup, FormArray } from '@angular/forms';\n\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\n\n@Component({\n\tproviders: [ProviderService],\n\tselector: 'form-button',\n\ttemplate: `\n\t\t<div style=\"position: relative; text-align: left; width: 100%\">\n\t\t\t<ng-template #tipContent>\n\t\t\t\t<span style=\"font-weight: bold\">Errors:<br></span>\n\t\t\t\t<ul>\n\t\t\t\t\t<li *ngFor=\"let error of getTipErrors()\">{{error}}</li>\n\t\t\t\t</ul>\n\t\t\t</ng-template>\n\t\t\t<div [ngbTooltip]=\"(getTipErrors().length ? tipContent : '')\" placement=\"top-left\" #t>\n\t\t\t\t<button type=\"submit\" [ngClass]=\"['btn', form && form.valid ? 'btn-success' : 'btn-danger']\" [disabled]=\"!form || !form.valid || disabled\" style=\"width: 200px\" [autofocus]=\"true\" #formButton>Submit</button>\n\t\t\t</div>\n\t\t</div>\n\t`\n})\n\nexport class FormButtonComponent extends BaseComponent { \n\t@Input() form: FormGroup;\n\t@Input() disabled = false;\n\n\t@ViewChild('formButton', {static: false}) public formButton;\n\n\tconstructor(private _services: ProviderService) {\n\t\tsuper(_services);\n\t}\n\n\tgetTipErrors() {\n\t\tlet res = [];\n\n\t\tif (this.form && this.form.invalid && typeof(this.form.controls) === 'object') {\n\t\t\tlet keys = Object.keys(this.form.controls);\n\n\t\t\tkeys.forEach(key => {\n\t\t\t\tlet ctrl = this.form.controls[key];\n\n\t\t\t\tif (ctrl.invalid) {\n\t\t\t\t\tres.push(key.replace('_id', '').replace('id_', '').replace('_', ' ').replace(/\\b\\S/g, function(t) { return t.toUpperCase(); }) + ' is invalid');\n\n\t\t\t\t\tif (this.isSuperAdmin()) {\n\t\t\t\t\t\tif (typeof(ctrl.value) === 'object' && Array.isArray(ctrl.value) && (<FormArray>ctrl).controls) {\n\t\t\t\t\t\t\tfor (let i = 0; i < (<FormArray>ctrl).controls.length; i++) {\n\t\t\t\t\t\t\t\tlet group = (<FormGroup>(<FormArray>ctrl).controls[i]);\n\n\t\t\t\t\t\t\t\tif (group.controls) {\n\t\t\t\t\t\t\t\t\tlet arrayKeys = Object.keys(group.controls);\n\n\t\t\t\t\t\t\t\t\tarrayKeys.forEach(arrayKey => {\n\t\t\t\t\t\t\t\t\t\tlet arrayCtrl = group.controls[arrayKey];\n\n\t\t\t\t\t\t\t\t\t\tif (arrayCtrl.invalid) {\n\t\t\t\t\t\t\t\t\t\t\tres.push('[' + i + '] -> ' + arrayKey.replace('_id', '').replace('id_', '').replace('_', ' ').replace(/\\b\\S/g, function(t) { return t.toUpperCase(); }) + ' is invalid');\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn res;\n\t}\n\n\tisSuperAdmin() {\n\t\tif (this._services._account.getUser() && this._services._account.getUser().roles.super_admin) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n}\n","import { Directive, Input, ElementRef } from '@angular/core';\n\n@Directive({\n\tselector : '[focus]'\n})\nexport class FocusDirective {\n\t@Input()\n\tfocus : boolean;\n\n\tconstructor(private element : ElementRef) {\n\t}\n\n\tprotected ngOnChanges() {\n\t\tif (this.focus)\n\t\t\tthis.element.nativeElement.focus();\n\t}\n}","import { Component, Input, OnInit } from '@angular/core';\nimport { NgbModal, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';\nimport { Validators, FormGroup, FormControl, FormBuilder } from '@angular/forms';\n\n@Component({\n\ttemplate: `\n\t\t<form [formGroup]=\"formInput\" novalidate (ngSubmit)=\"_activeModal.close(this.formInput.controls)\">\n\t\t\t<div class=\"modal-header\">\n\t\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-plus-circle\" style=\"color: green; font-size: 0.85em\" aria-hidden=\"true\"></i> {{ title }}</h4>\n\t\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"_activeModal.dismiss()\">\n\t\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class=\"modal-body\">\n\t\t\t\t<div *ngFor=\"let inputField of inputFields; let i = index\">\n\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"form-control-label\">{{inputField.label}}</label>\n\t\t\t\t\t\t<em *ngIf=\"formInput.controls[inputField.form].hasError('required') && inputField.required\">- Required</em>\n\t\t\t\t\t\t<em *ngIf=\"!formInput.controls[inputField.form].hasError('required') && formInput.controls[inputField.form].invalid\">- Invalid</em>\n\t\t\t\t\t\t<div *ngIf=\"inputField.type !== 'state' && inputField.type !== 'textarea' && inputField.type !== 'number' && inputField.type !== 'select' && inputField.type !== 'boolean'\">\n\t\t\t\t\t\t<input [autofocus]=\"i === 0 ? true : false\" [focus]=\"i === 0 ? true : false\" [formControlName]=\"inputField.form\" [ngClass]=\"['form-control', validateInput(inputField, formInput)]\" [type]=\"(inputField.type ? inputField.type : 'text')\">\n\t\t\t\t\t\t\t<ng-container *ngFor=\"let errorMsg of getErrorMessages(inputField, formInput);\">\n\t\t\t\t\t\t\t\t<div class=\"invalid-feedback\">{{errorMsg}}</div>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div *ngIf=\"inputField.type === 'select'\">\n\t\t\t\t\t\t\t<ng-select [formControlName]=\"inputField.form\" [ngClass]=\"[validateInput(inputField, formInput)]\" [placeholder]=\"inputField.placeholder\">\n\t\t\t\t\t\t\t\t<ng-option *ngFor=\"let opt of inputField.options\" [value]=\"opt.value\" [disabled]=\"opt.value === 'disabled'\">{{opt.text}}</ng-option>\n\t\t\t\t\t\t\t</ng-select>\n\t\t\t\t\t\t\t<ng-container *ngFor=\"let errorMsg of getErrorMessages(inputField, formInput);\">\n\t\t\t\t\t\t\t\t<div class=\"invalid-feedback\">{{errorMsg}}</div>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div *ngIf=\"inputField.type === 'state'\">\n\t\t\t\t\t\t\t<select [formControlName]=\"inputField.form\" [ngClass]=\"['form-control', validateInput(inputField, formInput)]\">\n\t\t\t\t\t\t\t\t<option value=\"\">Select State</option>\n\t\t\t\t\t\t\t\t<option *ngFor=\"let state of states\" [value]=\"state\">{{state}}</option>\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t<ng-container *ngFor=\"let errorMsg of getErrorMessages(inputField, formInput);\">\n\t\t\t\t\t\t\t\t<div class=\"invalid-feedback\">{{errorMsg}}</div>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div *ngIf=\"inputField.type === 'textarea'\">\n\t\t\t\t\t\t\t<textarea rows=\"4\" [formControlName]=\"inputField.form\" [ngClass]=\"['form-control', validateInput(inputField, formInput)]\"></textarea>\n\t\t\t\t\t\t\t<ng-container *ngFor=\"let errorMsg of getErrorMessages(inputField, formInput);\">\n\t\t\t\t\t\t\t\t<div class=\"invalid-feedback\">{{errorMsg}}</div>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div *ngIf=\"inputField.type === 'number'\">\n\t\t\t\t\t\t\t<input [formControlName]=\"inputField.form\" type=\"number\" [ngClass]=\"['form-control', validateInput(inputField, formInput)]\">\n\t\t\t\t\t\t\t<ng-container *ngFor=\"let errorMsg of getErrorMessages(inputField, formInput);\">\n\t\t\t\t\t\t\t\t<div class=\"invalid-feedback\">{{errorMsg}}</div>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div *ngIf=\"inputField.type === 'boolean'\" (click)=\"formInput.controls[inputField.form].setValue(!formInput.controls[inputField.form].value)\">\n\t\t\t\t\t\t\t<i *ngIf=\"formInput.controls[inputField.form].value\" class=\"fa fa-check\" style=\"color: green; font-size: 24px;\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t<i *ngIf=\"!formInput.controls[inputField.form].value\" class=\"fa fa-times\" style=\"color: red; font-size: 24px;\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"modal-footer\">\n\t\t\t\t<form-button [form]=\"formInput\"></form-button>\n\t\t\t\t<button type=\"button\" class=\"btn btn-secondary\" (click)=\"_activeModal.dismiss()\">Cancel</button>\n\t\t\t</div>\n\t\t</form>\n\t`\n})\n// tslint:disable-next-line:component-class-suffix\nexport class DialogInputContent implements OnInit {\n\t@Input() title = '';\n\t@Input() inputFields: any[] = [];\n\n\tformInput: FormGroup;\n\n\tstates: string[] = [\n\t\t'Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine',\n\t\t'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota', 'Ohio',\n\t\t'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming'];\n\n\tconstructor(public _activeModal: NgbActiveModal, private _fb: FormBuilder) {}\n\n\tngOnInit() {\n\t\tthis.formInput = this._fb.group({});\n\n\t\tfor (let i = 0; i < this.inputFields.length; i++) {\n\t\t\tif (this.inputFields[i].validators === null) {\n\t\t\t\tthis.formInput.addControl(this.inputFields[i].form, new FormControl({value: this.inputFields[i].data, disabled: this.inputFields[i].disabled}));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.formInput.addControl(this.inputFields[i].form, new FormControl({value: this.inputFields[i].data, disabled: this.inputFields[i].disabled}, this.inputFields[i].validators));\n\t\t\t}\n\t\t}\n\t}\n\n\tvalidateInput(inputField, formInput) {\n\n\t\tif (inputField.disabled) {\n\t\t\treturn '';\n\t\t}\n\n\t\tlet valid = true;\n\n\t\tfor (let i = 0; i < inputField.validators.length; i++) {\n\t\t\tif (formInput.controls[inputField.form].hasError([inputField.validatorErrors[i]])) {\n\t\t\t\tvalid = false;\n\t\t\t}\n\t\t}\n\n\t\tif (valid && formInput.controls[inputField.form].value !== null) {\n\t\t\treturn 'is-valid';\n\t\t}\n\t\telse if (!inputField.validators.length || (!inputField.required && valid)) {\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\treturn 'is-invalid';\n\t}\n\n\tgetErrorMessages(inputField, formInput) {\n\t\tlet res = [];\n\n\t\tfor (let i = 0; i < inputField.validators.length; i++) {\n\t\t\tif (formInput.controls[inputField.form].hasError([inputField.validatorErrors[i]])) {\n\t\t\t\tres.push(inputField.validatorMsg[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn res;\n\t}\n}\n","import {Component, Input, HostListener} from '@angular/core';\n\nimport {NgbModal, NgbActiveModal} from '@ng-bootstrap/ng-bootstrap';\n\n@Component({\n\ttemplate: `\n\t\t<div class=\"modal-header\">\n\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-times-circle\" style=\"color: red; font-size: 0.85em\" aria-hidden=\"true\"></i> {{ title }}</h4>\n\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"activeModal.dismiss('Cross click')\">\n\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t\t\t</button>\n\t\t</div>\n\t\t<div class=\"modal-body\">\n\t\t\t<p>{{ body }}</p>\n\t\t</div>\n\t\t<div class=\"modal-footer\">\n\t\t\t<button type=\"button\" class=\"btn btn-secondary\" (click)=\"activeModal.close('Close click')\">Ok</button>\n\t\t</div>\n \t`\n})\n\n// tslint:disable-next-line:component-class-suffix\nexport class DialogErrorContent {\n\t@Input() title: string;\n\t@Input() body: string;\n\n\t@HostListener('document:keypress', ['$event'])\n\thandleKeyboardEvent(event: KeyboardEvent) { \n\t\tif (event.keyCode === 13) {\n\t\t\tthis.activeModal.close();\n\t\t}\n\t}\n\n\tconstructor(public activeModal: NgbActiveModal) {}\n}","import {Component, Input, HostListener} from '@angular/core';\n\nimport {NgbActiveModal} from '@ng-bootstrap/ng-bootstrap';\n\n@Component({\n\ttemplate: `\n\t\t<div class=\"modal-header\">\n\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-question-circle\" style=\"color: blue; font-size: 0.85em\" aria-hidden=\"true\"></i> {{ title }}</h4>\n\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"activeModal.dismiss('Cross click')\">\n\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t\t\t</button>\n\t\t</div>\n\t\t<div class=\"modal-body\">\n\t\t\t<p>{{ body }}</p>\n\t\t\t<div [innerHTML]=\"html\"></div>\n\t\t</div>\n\t\t<div class=\"modal-footer\">\n\t\t\t<button type=\"button\" class=\"btn btn-success\" (click)=\"activeModal.close()\">Yes</button>\n\t\t\t<button type=\"button\" class=\"btn btn-danger\" (click)=\"activeModal.dismiss()\">No</button>\n\t\t</div>\n \t`\n})\n// tslint:disable-next-line:component-class-suffix\nexport class DialogConfirmContent {\n\t@Input() title: string;\n\t@Input() body: string;\n\t@Input() html: string;\n\n\t@HostListener('document:keypress', ['$event'])\n\thandleKeyboardEvent(event: KeyboardEvent) { \n\t\tif (event.keyCode === 13) {\n\t\t\tthis.activeModal.close();\n\t\t}\n\t}\n\n\tconstructor(public activeModal: NgbActiveModal) {}\n}","import { Component, Input, OnInit } from '@angular/core';\nimport { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\n\n@Component({\n\ttemplate: `\n\t \t<style>\n\t\t \ttable {\n\t\t\t\twidth: 100%;\n\t\t\t\ttable-layout: fixed;\n\t\t\t}\n\n\t\t\ttr {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\ttd {\n\t\t\t\twidth: 100%;\n\t\t\t\ttext-align: center;\n\t\t\t}\n\t\t</style>\n\t\t<form [formGroup]=\"form\" novalidate (ngSubmit)=\"submitForm()\">\n\t\t\t<div class=\"modal-header\">\n\t\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-question-circle\" style=\"color: blue; font-size: 0.85em\" aria-hidden=\"true\"></i> {{ title }}</h4>\n\t\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"_activeModal.dismiss()\">\n\t\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class=\"modal-body\">\n\t\t\t\t\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<div class=\"input-group\">\n\t\t\t\t\t\t\t\t<input class=\"form-control\" placeholder=\"yyyy-mm-dd\" name=\"dp\" formControlName=\"date\" ngbDatepicker #d=\"ngbDatepicker\">\n\t\t\t\t\t\t\t\t<div class=\"input-group-append\" (click)=\"d.toggle()\">\n\t\t\t\t\t\t\t\t\t<div class=\"input-group-text\">\n\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-calendar\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<div class=\"offset-3\">\n\t\t\t\t\t\t\t\t<ngb-timepicker formControlName=\"time\" meridian=\"ON\"></ngb-timepicker>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t\t<div class=\"modal-footer\">\n\t\t\t\t<form-button [form]=\"form\"></form-button>\n\t\t\t\t<button type=\"button\" class=\"btn btn-secondary\" (click)=\"_activeModal.dismiss()\">Cancel</button>\n\t\t\t</div>\n\t\t</form>\n\t`\n})\n// tslint:disable-next-line:component-class-suffix\nexport class DialogSelectDateTimeContent implements OnInit {\n\t@Input() title = '';\n\t@Input() date: Date;\n\n\tform: FormGroup;\n\n\tconstructor(public _activeModal: NgbActiveModal, private _fb: FormBuilder) {}\n\n\tngOnInit() {\t\t\t\n\t\tif (!this.date) {\n\t\t\tthis.date = new Date();\n\t\t}\n\n\t\tthis.form = this._fb.group({\n\t\t\ttime: [{hour: this.date.getHours(), minute: this.date.getMinutes(), second: 0}, [Validators.required]],\n\t\t\tdate: [{year: this.date.getFullYear(), month: this.date.getMonth() + 1, day: this.date.getDate()}, [Validators.required]]\n\t\t});\n\t}\n\n\tsubmitForm() {\n\t\tthis._activeModal.close(new Date(this.form.value.date.year, parseInt(this.form.value.date.month) - 1, this.form.value.date.day, this.form.value.time.hour, this.form.value.time.minute, this.form.value.time.second, 0));\n\t}\n}","import { Component, Input, OnInit } from '@angular/core';\nimport { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';\nimport { FormGroup, FormBuilder } from '@angular/forms';\nimport { SelectDataLabelModel } from '../../models/select-data-label.model';\n\n@Component({\n\ttemplate: `\n\t\t<div class=\"modal-header\">\n\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-question-circle\" style=\"color: blue; font-size: 0.75em\" aria-hidden=\"true\"></i> {{ title }} - {{ subtitle }}</h4>\n\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"_activeModal.dismiss()\">\n\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t\t\t</button>\n\t\t</div>\n\t\t<div class=\"modal-body\">\n\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t\t\t<ng-container *ngFor=\"let label of dialogData\">\n\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t<div *ngIf=\"label.subtype === null && label.type !== 'object'\" style=\"font-size: 12px;\">\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" [checked]=\"label.selected\" (click)=\"changeSelected(label)\" style=\"height: 20px; width: auto;\">&nbsp;&nbsp;&nbsp;{{ label.label }}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div *ngIf=\"label.subtype === null && label.type === 'object' && label.subLabel !== null\" style=\"font-size: 12px;\">\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" [checked]=\"label.selected\" (click)=\"changeSelected(label)\" style=\"height: 20px; width: auto;\">&nbsp;&nbsp;&nbsp;{{ label.subLabel }}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div *ngIf=\"label.subtype === null && label.type === 'object' && label.subLabel === null\" style=\"font-size: 12px;\">\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" [checked]=\"label.selected\" (click)=\"changeSelected(label)\" style=\"height: 20px; width: auto;\">&nbsp;&nbsp;&nbsp;{{ label.label }}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div *ngIf=\"label.subtype !== null\" style=\"font-size: 12px;\">\n\t\t\t\t\t\t\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"checkbox\" [checked]=\"label.selected\" (click)=\"changeSelected(label)\" style=\"height: 20px; width: auto;\">&nbsp;&nbsp;&nbsp;{{ label.subLabel }}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"modal-footer\">\n\t\t\t<button type=\"button\" class=\"btn btn-success\" (click)=\"_activeModal.close(dialogData)\">Submit</button>\n\t\t\t<button type=\"button\" class=\"btn btn-secondary\" (click)=\"_activeModal.dismiss()\">Cancel</button>\n\t\t</div>\n\t`\n})\n\n// tslint:disable-next-line:component-class-suffix\nexport class DialogSelectDataLabelsContent implements OnInit {\n\t@Input() title = '';\n\t@Input() subtitle = '';\n\t@Input() data;\n\t@Input() showArraySubData;\n\n\tform: FormGroup;\n\n\tdialogData: SelectDataLabelModel[] = [];\n\n\tconstructor(public _activeModal: NgbActiveModal, private _fb: FormBuilder) {}\n\n\tngOnInit () {\n\t\tthis.getKeys();\n\t}\n\n\tgetKeys() {\n\t\tlet dataKeys = Object.keys(this.data);\n\t\tlet type = '';\n\n\t\tdataKeys.filter(a => a !== '_id' && !a.startsWith('id_') && a !== '__v' && a !== 'createdAt' && a !== 'updatedAt').forEach(key => {\n\t\t\ttype = typeof(this.data[key]);\n\t\t\tif (type === 'object') {\n\t\t\t\tif (Array.isArray(this.data[key])) {\n\t\t\t\t\ttype = 'array';\n\t\t\t\t\tthis.dialogData.push({\n\t\t\t\t\t\tlabel: key.replace(new RegExp('_', 'g'), ' ').replace('string', '').replace(/\\w\\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }),\n\t\t\t\t\t\tdata: key,\n\t\t\t\t\t\tselected: true,\n\t\t\t\t\t\ttype: type,\n\t\t\t\t\t\tsubLabel: null,\n\t\t\t\t\t\tsubData: null,\n\t\t\t\t\t\tsubtype: null\n\t\t\t\t\t});\n\t\t\t\t\tif (this.showArraySubData === true) {\n\t\t\t\t\t\tlet subDataKeys = Object.keys(this.data[key][0]);\n\t\t\t\t\t\tsubDataKeys.filter(a => a !== '_id' && !a.startsWith('id_')).forEach(subKey => {\n\t\t\t\t\t\t\tthis.dialogData.push({\n\t\t\t\t\t\t\t\tlabel: key.replace(new RegExp('_', 'g'), ' ').replace('string', '').replace(/\\w\\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }),\n\t\t\t\t\t\t\t\tsubLabel: subKey.replace(new RegExp('_', 'g'), ' ').replace('string', '').replace(/\\w\\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }),\n\t\t\t\t\t\t\t\tdata: key,\n\t\t\t\t\t\t\t\ttype: type,\n\t\t\t\t\t\t\t\tsubData: subKey,\n\t\t\t\t\t\t\t\tselected: true,\n\t\t\t\t\t\t\t\tsubtype: typeof(subKey)\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlet subDataKeys = Object.keys(this.data[key]);\n\t\t\t\t\tif (subDataKeys.length) {\n\t\t\t\t\t\tsubDataKeys.filter(a => a !== '_id' && !a.startsWith('id_')).forEach(subKey => {\n\t\t\t\t\t\t\tthis.dialogData.push({\n\t\t\t\t\t\t\t\tlabel: key.replace(new RegExp('_', 'g'), ' ').replace('string', '').replace(/\\w\\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }),\n\t\t\t\t\t\t\t\tsubLabel: subKey.replace(new RegExp('_', 'g'), ' ').replace('string', '').replace(/\\w\\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }),\n\t\t\t\t\t\t\t\tdata: key,\n\t\t\t\t\t\t\t\tsubData: subKey,\n\t\t\t\t\t\t\t\tsubtype: null,\n\t\t\t\t\t\t\t\tselected: true,\n\t\t\t\t\t\t\t\ttype: type\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.dialogData.push({\n\t\t\t\t\t\t\tlabel: key.replace(new RegExp('_', 'g'), ' ').replace('string', '').replace(/\\w\\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }),\n\t\t\t\t\t\t\tdata: key,\n\t\t\t\t\t\t\tselected: true,\n\t\t\t\t\t\t\ttype: type,\n\t\t\t\t\t\t\tsubData: null,\n\t\t\t\t\t\t\tsubLabel: null,\n\t\t\t\t\t\t\tsubtype: null\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.dialogData.push({\n\t\t\t\t\tlabel: key.replace(new RegExp('_', 'g'), ' ').replace('string', '').replace(/\\w\\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }),\n\t\t\t\t\tdata: key,\n\t\t\t\t\tselected: true,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tsubData: null,\n\t\t\t\t\tsubLabel: null,\n\t\t\t\t\tsubtype: null\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tchangeSelected(label: SelectDataLabelModel) {\n\t\tlabel.selected = !label.selected;\n\n\t\tif (label.type === 'array' && label.subtype === null) {\n\t\t\tthis.dialogData.filter(a => a.label === label.label).forEach(subtype => {\n\t\t\t\tsubtype.selected = label.selected;\n\t\t\t});\n\t\t}\n\t}\n\n\tsubmit() {\n\t\treturn this.dialogData;\n\t}\n}","import { Component, Input, ChangeDetectorRef, OnInit, OnDestroy } from '@angular/core';\nimport { ResizeService } from '../../util/window-resize.service';\n\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\n\n@Component({\n\tproviders: [ProviderService],\n\tselector: 'responsive-button-group',\n\ttemplateUrl: './responsive-button-group.component.html'\n})\nexport class ResponsiveButtonGroupComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\t@Input() collapseSize = 900;\n\n\twindowSize: number = window.innerWidth;\n\twindowSizeSubscription: any = null;\n\n\tconstructor(private _cdRef: ChangeDetectorRef, private _resizeService: ResizeService, private _services: ProviderService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis.windowSizeSubscription = this._resizeService.onResize$.subscribe((val) => {\n\t\t\tif (val) {\n\t\t\t\tthis.windowSize = val.innerWidth;\n\t\t\t\tthis._cdRef.detectChanges();\n\t\t\t}\n\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis.windowSizeSubscription.unsubscribe();\n\t}\n}\n","<style>\n\t@media screen and (min-width: 900px) {\n\t\t:host /deep/ .xsBtnGroup {\n\t\t\tdisplay: none !important;\n\t\t}\n\n\t\t:host /deep/ .lgBtnGroup {\n\t\t\tdisplay: inline-flex !important;\n\t\t}\n\n\t\t:host /deep/ .lgBtnGroup button {\n\t\t\tmargin-left: 5px !important;\n\t\t}\n\n\t\t:host /deep/ .lgBtnGroup a {\n\t\t\tmargin-left: 5px !important;\n\t\t}\n\t}\n\n\t@media screen and (max-width: 900px) {\n\n\t\t:host /deep/ .xsBtnGroup {\n\t\t\tdisplay: inherit !important;\n\t\t}\n\n\t\t:host /deep/ .xsBtnGroup button {\n\t\t\tmargin-top: 5px !important;\n\t\t\twidth: 100% !important;\n\t\t}\n\n\t\t:host /deep/ .xsBtnGroup a {\n\t\t\tmargin-top: 5px !important;\n\t\t}\n\n\t\t:host /deep/ .lgBtnGroup {\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n</style>\n\n<div [ngClass]=\"windowSize <= collapseSize ? ['btn-group-vertical', 'xsBtnGroup'] : ['btn-group', 'lgBtnGroup']\">\n\t<ng-content></ng-content>\n</div>\n","import { Component, Input, OnInit } from '@angular/core';\nimport { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\n\n@Component({\n\ttemplate: `\n\t\t<style>\n\t\t\tcollapse-table {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t.navbar-light .navbar-nav .active>.nav-link, .navbar-light .navbar-nav .nav-link.active, .navbar-light .navbar-nav .nav-link.show, .navbar-light .navbar-nav .show>.nav-link {\n\t\t\t\tcolor: #0b4499;\n\t\t\t}\n\t\t\t.navbar-light .navbar-nav .nav-link {\n\t\t\t\tcolor:#333;\n\t\t\t}\n\t\t\ta.nav-link.loginreg {\n\t\t\t\tbackground-color: #0b4499;\n\t\t\t\tcolor: #fff !important;\n\t\t\t\tborder-radius: 40px;\n\t\t\t}\n\t\t\ta.nav-link.loginreg:hover {\n\t\t\t\tbackground: #1668e2;\n\t\t\t}\n\t\t\t.nav-link {\n\t\t\t\tcolor: #333333;\n\t\t\t\tfont-size: 150%\n\t\t\t}\n\t\t\t.nav-item a.nav-link.active {\n\t\t\t\tcolor: #0b4499;\n\t\t\t}\n\t\t\t.contactimg>img{\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t.log-box {\n\t\t\t\tpadding-top: 26px;\n\t\t\t\tpadding-bottom: 26px;\n\t\t\t}\n\t\t\t.loginform .form-control, .register-form .form-control {\n\t\t\t\tcolor: #000;\n\t\t\t\theight: 52px;\n\t\t\t}\n\t\t\t.loginform {\n\t\t\t\tmargin-top: 35px;\n\t\t\t}\n\t\t\t.loginform label {\n\t\t\t\tfont-size: 18px;\n\t\t\t\tfont-weight: 600;\n\t\t\t}\n\n\t\t\t.loginbtn {\n\t\t\t\tbackground: #0b4499;\n\t\t\t\twidth: 100%;\n\t\t\t\tmargin-top: 44px;\n\t\t\t\theight: 52px;\n\t\t\t\tfont-size: 22px;\n\t\t\t\tborder-radius: 2px;\n\t\t\t\tcolor: #fff !important;\n\t\t\t}\n\n\t\t\t.login365btn {\n\t\t\t\tbackground: orange;\n\t\t\t\twidth: 100%;\n\t\t\t\tmargin-top: 44px;\n\t\t\t\theight: 52px;\n\t\t\t\tfont-size: 22px;\n\t\t\t\tborder-radius: 2px;\n\t\t\t\tcolor: #fff !important;\n\t\t\t}\n\n\t\t\t.contactimg {\n\t\t\t\tposition: relative;\n\t\t\t}\n\t\t\t.login-logo {\n\t\t\t\tmargin-bottom: 20px;\n\t\t\t}\n\n\t\t\t.textbox {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 50%;\n\t\t\t\tcolor: #fff;\n\t\t\t\tpadding: 40px;\n\t\t\t\ttransform: translate(0%, -50%);\n\t\t\t\ttext-align: center;\n\t\t\t}\n\t\t\t.sign-btn {\n\t\t\t\tbackground: #0b4499;\n\t\t\t\twidth: 100%;\n\t\t\t\tmargin-top: 14px;\n\t\t\t\theight: 52px;\n\t\t\t\tfont-size: 22px;\n\t\t\t\tborder-radius: 2px;\n\t\t\t\tcolor: #fff !important;\n\t\t\t}\n\n\t\t\tbutton.btn.sign-btn:hover {\n\t\t\t\tbackground: #1668e2;\n\t\t\t}\n\t\t</style>\n\t\t<form [formGroup]=\"form\" novalidate>\n\t\t\t<div class=\"modal-header\">\n\t\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-question-circle\" style=\"color: blue; font-size: 0.85em\" aria-hidden=\"true\"></i> Login</h4>\n\t\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"_activeModal.dismiss()\">\n\t\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class=\"modal-body\" *ngIf=\"form\">\n\t\t\t\t<div class=\"row justify-content-md-center\">\n\t\t\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t\t\t<div class=\"row bg-white\">\n\t\t\t\t\t\t\t<div class=\"col-lg-6\">\n\t\t\t\t\t\t\t\t<div class=\"contactimg\">\n\t\t\t\t\t\t\t\t\t<img src=\"/assets/images/loginsignup/formimg.jpg\" alt=\"images\" class=\"img-fluid\">\n\t\t\t\t\t\t\t\t\t<div class=\"textbox\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"login-logo\"><img src=\"/assets/images/loginsignup/login-logo.png\" alt=\"images\"></div>\n\t\t\t\t\t\t\t\t\t\tThe All-in-One Solution for Tracking Inventory, Ordering, POs, Management, and Much More!\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-lg-6\">\n\t\t\t\t\t\t\t\t<div class=\"log-box\">\n\t\t\t\t\t\t\t\t\t<div class=\"loginform\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t\t\t<label>Username/Email</label>\n\t\t\t\t\t\t\t\t\t\t\t<em *ngIf=\"form.controls.username.hasError('required')\">- Required</em>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"email\" class=\"form-control\" [ngClass]=\"['form-control', form.controls.username.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"username\" [autofocus]=\"true\" [focus]=\"true\" aria-describedby=\"emailHelp\" placeholder=\"Your Username/Email\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t\t\t<label>Password</label>\n\t\t\t\t\t\t\t\t\t\t\t<em *ngIf=\"form.controls.password.hasError('required')\">- Required</em>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"password\" class=\"form-control\" [ngClass]=\"['form-control', form.controls.password.enabled ? (form.controls.password.valid ? 'is-valid' : 'is-invalid') : '']\" formControlName=\"password\" placeholder=\"Your Password\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-check text-right\">\n\t\t\t\t\t\t\t\t\t\t\t<label class=\"form-check-label\"><a href=\"javascript:void(0)\" (click)=\"toggleForgotPassword()\"> {{!form.controls.forgotPassword.value ? 'Forgot Password?' : 'Enter Password'}} </a></label>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn loginbtn\" (click)=\"close('ResolveIO')\">{{!form.controls.forgotPassword.value ? 'Login' : 'Submit'}}</button>\n\t\t\t\t\t\t\t\t\t\t<button *ngIf=\"msAllowed\" type=\"submit\" class=\"btn login365btn\" (click)=\"close('MS')\">Microsoft Single-Sign-On</button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"modal-footer\">\n\t\t\t\t<responsive-button-group>\n\t\t\t\t\t<button type=\"button\" class=\"btn btn-secondary\" (click)=\"_activeModal.dismiss()\">Cancel</button>\n\t\t\t\t</responsive-button-group>\n\t\t\t</div>\n\t\t</form>\n\t`\n})\n// tslint:disable-next-line:component-class-suffix\nexport class DialogLoginContent implements OnInit {\n\t@Input() msAllowed = false;\n\n\tform: FormGroup;\n\n\tconstructor(public _activeModal: NgbActiveModal, private _fb: FormBuilder) {}\n\n\tngOnInit() {\t\t\t\n\t\tthis.form = this._fb.group({\n\t\t\tusername: ['', [Validators.required]],\n\t\t\tpassword: ['', [Validators.required]],\n\t\t\tforgotPassword: [false],\n\t\t});\n\t}\n\n\ttoggleForgotPassword() {\n\t\tthis.form.controls.forgotPassword.setValue(!this.form.controls.forgotPassword.value);\n\n\t\tif (!this.form.controls.forgotPassword.value) {\n\t\t\tthis.form.controls.password.setValidators([Validators.required]);\n\t\t\tthis.form.controls.password.enable();\n\t\t}\n\t\telse {\n\t\t\tthis.form.controls.password.setValue('');\n\t\t\tthis.form.controls.password.clearValidators();\n\t\t\tthis.form.controls.password.disable();\n\t\t}\n\n\t\tthis.form.controls.password.updateValueAndValidity();\n\t}\n\n\tclose(type: string) {\n\t\tthis._activeModal.close({\n\t\t\tform: this.form,\n\t\t\ttype: type\n\t\t});\n\t}\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\n\n@Component({\n\ttemplate: `\n\t\t<style>\n\t\t\tcollapse-table {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t.navbar-light .navbar-nav .active>.nav-link, .navbar-light .navbar-nav .nav-link.active, .navbar-light .navbar-nav .nav-link.show, .navbar-light .navbar-nav .show>.nav-link {\n\t\t\t\tcolor: #0b4499;\n\t\t\t}\n\t\t\t.navbar-light .navbar-nav .nav-link {\n\t\t\t\tcolor:#333;\n\t\t\t}\n\t\t\ta.nav-link.loginreg {\n\t\t\t\tbackground-color: #0b4499;\n\t\t\t\tcolor: #fff !important;\n\t\t\t\tborder-radius: 40px;\n\t\t\t}\n\t\t\ta.nav-link.loginreg:hover {\n\t\t\t\tbackground: #1668e2;\n\t\t\t}\n\t\t\t.nav-link {\n\t\t\t\tcolor: #333333;\n\t\t\t\tfont-size: 150%\n\t\t\t}\n\t\t\t.nav-item a.nav-link.active {\n\t\t\t\tcolor: #0b4499;\n\t\t\t}\n\t\t\t.contactimg>img{\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t.log-box {\n\t\t\t\tpadding-top: 26px;\n\t\t\t\tpadding-bottom: 26px;\n\t\t\t}\n\t\t\t.loginform .form-control, .register-form .form-control {\n\t\t\t\tcolor: #000;\n\t\t\t\theight: 52px;\n\t\t\t}\n\t\t\t.loginform {\n\t\t\t\tmargin-top: 35px;\n\t\t\t}\n\t\t\t.loginform label {\n\t\t\t\tfont-size: 18px;\n\t\t\t\tfont-weight: 600;\n\t\t\t}\n\n\t\t\t.loginbtn {\n\t\t\t\tbackground: #0b4499;\n\t\t\t\twidth: 100%;\n\t\t\t\tmargin-top: 44px;\n\t\t\t\theight: 52px;\n\t\t\t\tfont-size: 22px;\n\t\t\t\tborder-radius: 2px;\n\t\t\t\tcolor: #fff !important;\n\t\t\t}\n\n\t\t\t.contactimg {\n\t\t\t\tposition: relative;\n\t\t\t}\n\t\t\t.login-logo {\n\t\t\t\tmargin-bottom: 20px;\n\t\t\t}\n\n\t\t\t.textbox {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 50%;\n\t\t\t\tcolor: #fff;\n\t\t\t\tpadding: 40px;\n\t\t\t\ttransform: translate(0%, -50%);\n\t\t\t\ttext-align: center;\n\t\t\t}\n\t\t\t.sign-btn {\n\t\t\t\tbackground: #0b4499;\n\t\t\t\twidth: 100%;\n\t\t\t\tmargin-top: 14px;\n\t\t\t\theight: 52px;\n\t\t\t\tfont-size: 22px;\n\t\t\t\tborder-radius: 2px;\n\t\t\t\tcolor: #fff !important;\n\t\t\t}\n\n\t\t\tbutton.btn.sign-btn:hover {\n\t\t\t\tbackground: #1668e2;\n\t\t\t}\n\t\t</style>\n\t\t<form [formGroup]=\"form\" novalidate (ngSubmit)=\"_activeModal.close(form)\">\n\t\t\t<div class=\"modal-header\">\n\t\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-question-circle\" style=\"color: blue; font-size: 0.85em\" aria-hidden=\"true\"></i> Register</h4>\n\t\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"_activeModal.dismiss()\">\n\t\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class=\"modal-body\" *ngIf=\"form\">\n\t\t\t\t<div class=\"row justify-content-md-center\">\n\t\t\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t\t\t<div class=\"row bg-white\">\n\t\t\t\t\t\t\t<div class=\"col-lg-6\">\n\t\t\t\t\t\t\t\t<div class=\"contactimg\">\n\t\t\t\t\t\t\t\t\t<img src=\"/assets/images/loginsignup/formimg.jpg\" alt=\"images\" class=\"img-fluid\">\n\t\t\t\t\t\t\t\t\t<div class=\"textbox\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"login-logo\"><img src=\"/assets/images/loginsignup/login-logo.png\" alt=\"images\"></div>\n\t\t\t\t\t\t\t\t\t\tThe All-in-One Solution for Tracking Inventory, Ordering, POs, Management, and Much More!\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-lg-6\">\n\t\t\t\t\t\t\t\t<div class=\"log-box\">\n\t\t\t\t\t\t\t\t\t<div class=\"register-form\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t\t\t<label>User Name</label>\n\t\t\t\t\t\t\t\t\t\t\t<em *ngIf=\"form.controls.username.hasError('required')\">- Required</em>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" [ngClass]=\"['form-control', form.controls.username.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"username\" [autofocus]=\"true\" [focus]=\"true\" aria-describedby=\"emailHelp\" placeholder=\"User Name\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t\t\t<label>Full Name</label>\n\t\t\t\t\t\t\t\t\t\t\t<em *ngIf=\"form.controls.name.hasError('required')\">- Required</em>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" [ngClass]=\"['form-control', form.controls.name.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"name\" aria-describedby=\"emailHelp\" placeholder=\"Name\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t\t\t<label>Phone Number</label>\n\t\t\t\t\t\t\t\t\t\t\t<em *ngIf=\"form.controls.phone.hasError('required')\">- Required</em>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" [ngClass]=\"['form-control', form.controls.phone.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"phone\" placeholder=\"Phone Number\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t\t\t<label>Company</label>\n\t\t\t\t\t\t\t\t\t\t\t<em *ngIf=\"form.controls.company.hasError('required')\">- Required</em>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" [ngClass]=\"['form-control', form.controls.company.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"company\" placeholder=\"Company Name\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t\t\t<label>Email</label>\n\t\t\t\t\t\t\t\t\t\t\t<em *ngIf=\"form.controls.email.hasError('required')\">- Required</em>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"email\" class=\"form-control\" [ngClass]=\"['form-control', form.controls.email.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"email\" placeholder=\"Email\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn sign-btn\">Signup</button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"modal-footer\">\n\t\t\t\t<responsive-button-group>\n\t\t\t\t\t<button type=\"button\" class=\"btn btn-secondary\" (click)=\"_activeModal.dismiss()\">Cancel</button>\n\t\t\t\t</responsive-button-group>\n\t\t\t</div>\n\t\t</form>\n\t`\n})\n// tslint:disable-next-line:component-class-suffix\nexport class DialogRegisterContent implements OnInit {\n\n\tform: FormGroup;\n\n\tconstructor(public _activeModal: NgbActiveModal, private _fb: FormBuilder) {}\n\n\tngOnInit() {\t\t\t\n\t\tthis.form = this._fb.group({\n\t\t\tusername: ['', [Validators.required]],\n\t\t\tname: ['', [Validators.required]],\n\t\t\tphone: ['', [Validators.required]],\n\t\t\tcompany: ['', [Validators.required]],\n\t\t\temail: ['', [Validators.required]]\n\t\t});\n\t}\n}\n","import { Component, Input, ViewChild, AfterViewInit, OnInit} from '@angular/core';\nimport { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';\nimport { AccountManagerService } from '../../account-manager.service';\n\n@Component({\n\ttemplate: `\n\t\t<style>\n\t\t\tcollapse-table tr:hover {\n\t\t\t\tbackground-color: lightblue;\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\n\t\t\t.selected {\n\t\t\t\tbackground-color: lightblue;\n\t\t\t}\n\n\t\t\tcollapse-table {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t</style>\n\t\t<div #allElements>\n\t\t\t<div class=\"modal-header\">\n\t\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-question-circle\" style=\"color: blue; font-size: 0.85em\" aria-hidden=\"true\"></i> {{ title }}</h4>\n\t\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"_activeModal.dismiss()\" #close>\n\t\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class=\"modal-body\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col\" *ngFor=\"let option of options\">\n\t\t\t\t\t\t<button style=\"width: 100%\" type=\"button\" [ngClass]=\"['btn', selectedType === option.value ? 'btn-success' : 'btn-warning']\" (click)=\"onSelectType(option.value)\">{{option.text}}</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t`\n})\n// tslint:disable-next-line:component-class-suffix\nexport class DialogSelectWithButtonsURLContent implements AfterViewInit, OnInit {\n\n\t@Input() url = '';\n\n\t@ViewChild ('close', {static: false}) public close;\n\t@ViewChild('allElements', {static: false}) public allElements;\n\n\ttitle = 'Select Window Type';\n\tselectedType = '';\n\n\toptions = [\t\n\t\t{value: 'same_tab', text: 'Same Tab'},\n\t\t{value: 'new_tab', text: 'New Tab'},\n\t\t{value: 'new_window', text: 'New Window'}\n\t];\n\n\tconstructor(public _activeModal: NgbActiveModal, private _account: AccountManagerService) {}\n\n\tngOnInit() {\t\n\t\tif (this._account.getUser().settings.routing_preference && this._account.getUser().settings.routing_preference !== 'alwaysAsk') {\n\t\t\tif (this._account.getUser().settings.routing_preference === 'sameTab') {\n\t\t\t\twindow.open(this.url, '_self');\n\t\t\t}\n\t\n\t\t\tif (this._account.getUser().settings.routing_preference === 'newTab') {\n\t\t\t\twindow.open(this.url, '_blank');\n\t\t\t}\n\t\n\t\t\tif (this._account.getUser().settings.routing_preference === 'newWindow') {\n\t\t\t\twindow.open(this.url, '_blank', 'toolbar=1,location=1,menubar=1');\n\t\t\t}\n\t\n\t\t\tthis._activeModal.close();\n\t\t}\n\t}\n\n\tngAfterViewInit() {\n\t\tsetTimeout(() => {\n\t\t\tlet foundElement = this.recursiveFindFirstElement(this.allElements.nativeElement);\n\t\t\tif (foundElement) {\n\t\t\t\tfoundElement.focus();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.close.nativeElement.focus();\n\t\t\t\tthis.close.nativeElement.blur();\n\t\t\t}\n\t\t}, 100);\n\t}\n\n\trecursiveFindFirstElement(element) {\n\t\tlet foundElement = null;\n\t\tlet htmlCol: HTMLCollection = element.children;\n\t\tfor (let i = 0; i < Object.keys(htmlCol).length; i++) {\n\t\t\tlet key = Object.keys(htmlCol)[i];\n\n\t\t\tlet htmlElem = htmlCol[key];\n\t\t\tif (htmlElem.children && htmlElem.children.length) {\n\t\t\t\tfoundElement = this.recursiveFindFirstElement(htmlElem);\n\t\t\t}\n\t\t\telse if (htmlElem.tagName === 'BUTTON' && htmlElem.classList.contains('close')) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if ((htmlElem.tagName === 'BUTTON' || htmlElem.tagName === 'INPUT' || htmlElem.tagName === 'SELECT' || htmlElem.tagName === 'TEXTAREA') && !htmlElem.hidden && !htmlElem.disabled) {\n\t\t\t\treturn htmlElem;\n\t\t\t}\n\n\t\t\tif (foundElement) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn foundElement;\n\t}\n\n\tonSelectType(type) {\n\t\tthis.selectedType = type;\n\n\t\tthis.submit();\n\t}\n\n\tsubmit() {\n\n\t\tif (this.selectedType === 'same_tab') {\n\t\t\twindow.open(this.url, '_self');\n\t\t}\n\n\t\tif (this.selectedType === 'new_tab') {\n\t\t\twindow.open(this.url, '_blank');\n\t\t}\n\n\t\tif (this.selectedType === 'new_window') {\n\t\t\twindow.open(this.url, '_blank', 'toolbar=1,location=1,menubar=1');\n\t\t}\n\n\t\tthis._activeModal.close();\n\t}\n}\n","import { Component, Input, OnInit, OnDestroy } from '@angular/core';\nimport { ResizeService } from '../../util/window-resize.service';\nimport { AccountManagerService } from '../../account-manager.service';\n\n@Component({\n\tselector: 'collapse-table',\n\ttemplateUrl: './collapse-table.component.html'\n})\n\nexport class CollapseTableComponent implements OnInit, OnDestroy {\n\n\t@Input() collapseSize: number;\n\t@Input() tableFixed: false;\n\t@Input() headerFixed = false;\n\t@Input() secondaryColor = false;\n\t@Input() tertiaryColor = false;\n\n\twindowSize: number = window.innerWidth;\n\twindowSizeSubscription: any = null;\n\n\tconstructor(private _resizeService: ResizeService, private _account: AccountManagerService) \n\t{}\n\n\tngOnInit() {\n\t\tthis.windowSizeSubscription = this._resizeService.onResize$.subscribe((val) => {\n\t\t\tthis.windowSize = val.innerWidth;\n\t\t});\n\n\t\tif (this._account.getUser() && this._account.getUser().settings) {\n\t\t\tdocument.documentElement.style.setProperty('--primary-table-color', this._account.getUser().settings.table_color);\n\t\t\tdocument.documentElement.style.setProperty('--primary-table-font-color', this._account.getUser().settings.table_font_color);\n\t\t\tdocument.documentElement.style.setProperty('--font-size', this._account.getUser().settings.font_size + 'px');\n\t\t\tdocument.documentElement.style.setProperty('--secondary-table-color', this._account.getUser().settings.secondary_table_color);\n\t\t\tdocument.documentElement.style.setProperty('--secondary-table-font-color', this._account.getUser().settings.secondary_table_font_color);\n\t\t\tdocument.documentElement.style.setProperty('--tertiary-table-color', this._account.getUser().settings.tertiary_table_color);\n\t\t\tdocument.documentElement.style.setProperty('--tertiary-table-font-color', this._account.getUser().settings.tertiary_table_font_color);\n\t\t}\n\t}\n\n\tngOnDestroy() {\n\t\tthis.windowSizeSubscription.unsubscribe();\n\t}\n\n\tonClick(event) {\n\t\t// if (event.target.localName === 'th') {\n\t\t// \tconsole.log('You Clicked Header: ' + event.target.innerHTML);\n\t\t// }\n\t}\n\n\tgetCollapseClass() {\t\t\n\t\tlet res = ['table'];\n\n\t\tif (this.secondaryColor) {\n\t\t\tres.push('collapseTable-sec');\n\t\t}\n\t\telse if (this.tertiaryColor) {\n\t\t\tres.push('collapseTable-tert');\n\t\t}\n\t\telse {\n\t\t\tres.push('collapseTable');\n\t\t}\n\n\t\t// if (this.tableFixed) {\n\t\t// \tres.push('fixed');\n\t\t// }\n\t\t// else if (this.headerFixed) {\n\t\t// \tres.push('headerFixed');\n\t\t// }\n\n\t\treturn res;\n\t}\n\n\tgetPrimaryColor() {\n\t\treturn this._account.getUser() ? this._account.getUser().settings.table_color : '#3b3ee3';\n\t}\n}\n","<style>\n ::ng-deep :root {\n --primary-table-color: #3b3ee3;\n --primary-table-font-color: white;\n --font-size: 12px;\n --secondary-table-color: #87ceeb;\n --secondary-table-font-color: #000000;\n --tertiary-table-color: #ff4500;\n --tertiary-table-font-color: #000000;\n }\n\n\t:host /deep/ .collapseTable {\n border: 1px solid #ccc;\n margin: 0;\n padding: 0;\n width: 100%;\n /*table-layout: fixed;*/ \n }\n :host /deep/ .collapseTable tr {\n border: 1px solid #ddd;\n padding: 0.35em;\n }\n :host /deep/ .collapseTable th, :host /deep/ .collapseTable td {\n padding: 0.625em;\n text-align: center;\n vertical-align: middle;\n }\n :host /deep/ .collapseTable th {\n letter-spacing: 0.1em;\n text-transform: uppercase;\n background-color: var(--primary-table-color);\n color: var(--primary-table-font-color);\n font-size: var(--font-size);\n position: sticky;\n z-index: 10;\n top: 0;\n } \n :host /deep/ .collapseTable-sec {\n border: 1px solid #ccc;\n margin: 0;\n padding: 0;\n width: 100%;\n }\n :host /deep/ .collapseTable-sec tr {\n border: 1px solid #ddd;\n padding: 0.35em;\n }\n :host /deep/ .collapseTable-sec th, :host /deep/ .collapseTable-sec td {\n padding: 0.625em;\n text-align: center;\n }\n :host /deep/ .collapseTable-sec th {\n letter-spacing: 0.1em;\n text-transform: uppercase;\n background-color: var(--secondary-table-color);\n color: var(--secondary-table-font-color);\n font-size: var(--font-size);\n position: sticky;\n z-index: 10;\n top: 0;\n } \n :host /deep/ .collapseTable-tert {\n border: 1px solid #ccc;\n margin: 0;\n padding: 0;\n width: 100%;\n }\n :host /deep/ .collapseTable-tert tr {\n border: 1px solid #ddd;\n padding: 0.35em;\n }\n :host /deep/ .collapseTable-tert th, :host /deep/ .collapseTable-tert td {\n padding: 0.625em;\n text-align: center;\n }\n :host /deep/ .collapseTable-tert th {\n letter-spacing: 0.1em;\n text-transform: uppercase;\n background-color: var(--tertiary-table-color);\n color: var(--tertiary-table-font-color);\n font-size: var(--font-size);\n position: sticky;\n z-index: 10;\n top: 0;\n }\n \n .fixed {\n table-layout: fixed;\n }\n\n :host /deep/ .headerFixed thead, :host /deep/ .headerFixed tbody tr {\n display:table;\n width:100%;\n table-layout:fixed;\n }\n\n .hide {\n display: none;\n }\n</style>\n\n<div class=\"table-responsive-xl\">\n <table [ngClass]=\"getCollapseClass()\" [style.border]=\"secondaryColor || tertiaryColor ? '3px solid black' : 'none'\" cellspacing=\"0\" cellpadding=\"0\">\n <ng-content></ng-content>\n </table>\n</div>","\nimport { Component, Input, ViewChild, AfterViewInit} from '@angular/core';\nimport { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';\nimport { DialogSelectWithButtonsOptionModel } from '../../models/dialog.model';\n\n@Component({\n\ttemplate: `\n\t\t<style>\n\t\t\tcollapse-table tr:hover {\n\t\t\t\tbackground-color: lightblue;\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\n\t\t\t.selected {\n\t\t\t\tbackground-color: lightblue;\n\t\t\t}\n\n\t\t\tcollapse-table {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t</style>\n\t\t<div #allElements>\n\t\t\t<div class=\"modal-header\">\n\t\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-question-circle\" style=\"color: blue; font-size: 0.85em\" aria-hidden=\"true\"></i> {{ title }}</h4>\n\t\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"_activeModal.dismiss()\" #close>\n\t\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class=\"modal-body\">\n\t\t\t\t<div style=\"height: 60vh; overflow-y: auto\">\n\t\t\t\t\t<collapse-table collapseSize=\"900\">\n\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th>List</th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t<tr *ngFor=\"let object of objects; let i = index\" (click)=\"onSelectItem(i)\" [ngClass]=\"{'selected' : i === selectedIndex || selectedIndexes.includes(i)}\">\n\t\t\t\t\t\t\t\t<td>{{object.text}}</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</collapse-table>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"modal-footer\">\n\t\t\t\t<ng-container *ngIf=\"!allowNone\">\n\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', (selectedItem || selectedItems.length) ? 'btn-success' : 'btn-danger']\" [disabled]=\"!selectedItem && !selectedItems.length\" (click)=\"_activeModal.close(selectedItem || selectedItems)\">Submit</button>\n\t\t\t\t</ng-container>\n\t\t\t\t<ng-container *ngIf=\"allowNone\">\n\t\t\t\t\t<button type=\"button\" class=\"btn btn-success\" (click)=\"_activeModal.close(selectedItem || selectedItems)\">Submit</button>\n\t\t\t\t</ng-container>\n\t\t\t\t<button type=\"button\" class=\"btn btn-secondary\" (click)=\"_activeModal.dismiss()\">Cancel</button>\n\t\t\t</div>\n\t\t</div>\n\t`\n})\n// tslint:disable-next-line:component-class-suffix\nexport class DialogSelectArrayObjsContent implements AfterViewInit{\n\t@Input() title = '';\n\t@Input() objects: DialogSelectWithButtonsOptionModel[] = [];\n\t@Input() multiple = false;\n\t@Input() allowNone = false;\n\n\t@ViewChild ('close', {static: false}) public close;\n\t@ViewChild('allElements', {static: false}) public allElements;\n\n\tselectedIndex: number = null;\n\tselectedItem: DialogSelectWithButtonsOptionModel = null;\n\n\tselectedIndexes: number[] = [];\n\tselectedItems: DialogSelectWithButtonsOptionModel[] = [];\n\n\tconstructor(public _activeModal: NgbActiveModal) {}\n\n\tngAfterViewInit() {\n\t\tsetTimeout(() => {\n\t\t\tlet foundElement = this.recursiveFindFirstElement(this.allElements.nativeElement);\n\t\t\tif (foundElement) {\n\t\t\t\tfoundElement.focus();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.close.nativeElement.focus();\n\t\t\t\tthis.close.nativeElement.blur();\n\t\t\t}\n\t\t}, 100);\n\n\t\tthis.objects.forEach((obj, objIdx) => {\n\t\t\tif (obj.selected) {\n\t\t\t\tthis.selectedIndexes.push(objIdx);\n\t\t\t\tthis.selectedItems.push(obj);\n\t\t\t}\n\t\t});\n\t}\n\n\trecursiveFindFirstElement(element) {\n\t\tlet foundElement = null;\n\t\tlet htmlCol: HTMLCollection = element.children;\n\t\tfor (let i = 0; i < Object.keys(htmlCol).length; i++) {\n\t\t\tlet key = Object.keys(htmlCol)[i];\n\n\t\t\tlet htmlElem = htmlCol[key];\n\t\t\tif (htmlElem.children && htmlElem.children.length) {\n\t\t\t\tfoundElement = this.recursiveFindFirstElement(htmlElem);\n\t\t\t}\n\t\t\telse if (htmlElem.tagName === 'BUTTON' && htmlElem.classList.contains('close')) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if ((htmlElem.tagName === 'BUTTON' || htmlElem.tagName === 'INPUT' || htmlElem.tagName === 'SELECT' || htmlElem.tagName === 'TEXTAREA') && !htmlElem.hidden && !htmlElem.disabled) {\n\t\t\t\treturn htmlElem;\n\t\t\t}\n\n\t\t\tif (foundElement) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn foundElement;\n\t}\n\n\tonSelectItem(index: number) {\n\t\tif (!this.multiple) {\n\t\t\tif (this.objects[index] === this.selectedItem) {\n\t\t\t\tthis.selectedItem = null;\n\t\t\t\tthis.selectedIndex = null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.selectedItem = this.objects[index];\n\t\t\t\tthis.selectedIndex = index;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (this.selectedItems.some(a => a.value === this.objects[index].value)) {\n\t\t\t\tthis.selectedIndexes.splice(this.selectedIndexes.indexOf(index), 1);\n\t\t\t\tthis.selectedItems.splice(this.selectedItems.map(a => a.value).indexOf(this.objects[index].value), 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.selectedIndexes.push(index);\n\t\t\t\tthis.selectedItems.push(this.objects[index]);\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Input, AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, OnInit, ViewChild} from '@angular/core';\nimport { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';\n\n@Component({\n\ttemplate: `\n\t\t<style>\n\t\t\tcollapse-table tr:hover {\n\t\t\t\tbackground-color: lightblue;\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\n\t\t\t.selected {\n\t\t\t\tbackground-color: lightblue;\n\t\t\t}\n\n\t\t\tcollapse-table {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t</style>\n\t\t<div #allElements>\n\t\t\t<div class=\"modal-header\">\n\t\t\t\t<h4 class=\"modal-title\"><i class=\"fa fa-question-circle\" style=\"color: blue; font-size: 0.85em\" aria-hidden=\"true\"></i> {{ title }}</h4>\n\t\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"_activeModal.dismiss()\" #close>\n\t\t\t\t\t<span aria-hidden=\"true\">&times;</span>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class=\"modal-body\" style=\"height: 60vh;\">\n\t\t\t\t<responsive-button-group>\n\t\t\t\t\t<ng-container *ngIf=\"multiple\">\n\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-primary\" (click)=\"selectAll()\">Select All</button>\n\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-danger\" (click)=\"removeAll()\">Remove All</button>\n\t\t\t\t\t</ng-container>\n\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', method === 'list' ? 'btn-success' : 'btn-warning']\" (click)=\"method = 'list'\">Use List</button>\n\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', method === 'dropdown' ? 'btn-success' : 'btn-warning']\" (click)=\"method = 'dropdown'\">Use Dropdown</button>\n\t\t\t\t</responsive-button-group>\n\t\t\t\t<div style=\"height: 50vh; overflow-y: auto; margin-top: 10px\">\n\t\t\t\t\t<ng-container *ngIf=\"method === 'list'\">\n\t\t\t\t\t\t<collapse-table collapseSize=\"900\">\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<th>List</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t<tr *ngFor=\"let data of array; let i = index\" (click)=\"onSelectItem(i)\" [ngClass]=\"{'selected' : isInSelectedIndex(i)}\">\n\t\t\t\t\t\t\t\t\t<td>{{data}}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</collapse-table>\n\t\t\t\t\t</ng-container>\n\t\t\t\t\t<ng-container *ngIf=\"method === 'dropdown'\">\n\t\t\t\t\t\t<collapse-table collapseSize=\"900\">\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<th>Item</th>\n\t\t\t\t\t\t\t\t\t<th>Remove</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t<tr *ngFor=\"let item of selectIndexes; let i = index\">\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<ng-select placeholder=\"Select Item\" [ngModel]=\"item\" (change)=\"onSelectDropdown($event, i)\">\n\t\t\t\t\t\t\t\t\t\t\t<ng-option *ngFor=\"let data of getFilteredArray(item)\" [value]=\"data.value\">{{data.text}}</ng-option>\n\t\t\t\t\t\t\t\t\t\t</ng-select>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-danger\" (click)=\"onSelectItem(item)\">Remove</button>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</collapse-table>\n\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-success\" *ngIf=\"multiple || !selectIndexes.length\" (click)=\"addDropDown()\" [disabled]=\"!availableAdd()\">Add</button>\n\t\t\t\t\t</ng-container>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"modal-footer\">\n\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', selectedIndexes.length ? 'btn-success' : 'btn-danger']\" [disabled]=\"!selectedIndexes.length || this.selectedIndexes.includes(null)\" (click)=\"_activeModal.close(this.multiple ? getArray() : array[selectedIndexes[0]])\">Submit</button>\n\t\t\t\t<button type=\"button\" class=\"btn btn-secondary\" (click)=\"_activeModal.dismiss()\">Cancel</button>\n\t\t\t</div>\n\t\t</div>\n\t`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\n// tslint:disable-next-line:component-class-suffix\nexport class DialogSelectArrayContent implements OnInit, AfterViewInit {\n\t@Input() title = '';\n\t@Input() array: any[] = [];\n\t@Input() multiple: boolean;\n\t@Input() selectedIndexes: number[] = [];\n\n\t@ViewChild ('close', {static: false}) public close;\n\t@ViewChild('allElements', {static: false}) public allElements;\n\n\tmethod = 'list';\n\tmappedArray = [];\n\tselectIndexes = [];\n\n\tconstructor(public _activeModal: NgbActiveModal, public _cdRef: ChangeDetectorRef) {}\n\n\tngOnInit() {\n\t\tthis.mappedArray = this.array.map((a, index) => {\n\t\t\treturn {\n\t\t\t\tvalue: index,\n\t\t\t\ttext: a\n\t\t\t};\n\t\t});\n\n\t\tthis.selectedIndexes.forEach(index => {\n\t\t\tthis.selectIndexes.push(index);\n\t\t});\n\t}\n\n\tngAfterViewInit() {\n\t\tsetTimeout(() => {\n\t\t\tlet foundElement = this.recursiveFindFirstElement(this.allElements.nativeElement);\n\t\t\tif (foundElement) {\n\t\t\t\tfoundElement.focus();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.close.nativeElement.focus();\n\t\t\t\tthis.close.nativeElement.blur();\n\t\t\t}\n\t\t}, 100);\n\t}\n\n\trecursiveFindFirstElement(element) {\n\t\tlet foundElement = null;\n\t\tlet htmlCol: HTMLCollection = element.children;\n\t\tfor (let i = 0; i < Object.keys(htmlCol).length; i++) {\n\t\t\tlet key = Object.keys(htmlCol)[i];\n\n\t\t\tlet htmlElem = htmlCol[key];\n\t\t\tif (htmlElem.children && htmlElem.children.length) {\n\t\t\t\tfoundElement = this.recursiveFindFirstElement(htmlElem);\n\t\t\t}\n\t\t\telse if (htmlElem.tagName === 'BUTTON' && htmlElem.classList.contains('close')) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if ((htmlElem.tagName === 'BUTTON' || htmlElem.tagName === 'INPUT' || htmlElem.tagName === 'SELECT' || htmlElem.tagName === 'TEXTAREA') && !htmlElem.hidden && !htmlElem.disabled) {\n\t\t\t\treturn htmlElem;\n\t\t\t}\n\n\t\t\tif (foundElement) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn foundElement;\n\t}\n\n\taddDropDown() {\n\t\tlet firstValue = this.array.filter((a, index) => !this.selectedIndexes.includes(index))[0];\n\t\tlet firstIndex = this.array.findIndex(a => a === firstValue);\n\t\tthis.selectedIndexes.push(firstIndex);\n\t\tthis.selectIndexes.push(firstIndex);\n\t}\n\n\tonSelectDropdown(val, index) {\n\t\tthis.onSelectItem(this.selectedIndexes[index]);\n\t\tthis.onSelectItem(val);\n\t}\n\n\tavailableAdd() {\n\t\treturn this.array.filter((a, index) => !this.selectedIndexes.includes(index))[0] ? true : false;\n\t}\n\n\tgetFilteredArray(item) {\n\t\treturn this.mappedArray.filter(a => a.value === item || !this.selectedIndexes.includes(a.value));\n\t}\n\n\tisInSelectedIndex(index: number) {\n\t\tif (this.selectedIndexes.includes(index)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tonSelectItem(index: number) {\n\t\tif (!this.multiple) {\n\t\t\tif (this.selectedIndexes.includes(index)) {\n\t\t\t\tthis.selectedIndexes = [];\n\t\t\t\tthis.selectIndexes = [];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.selectedIndexes = [index];\n\t\t\t\tthis.selectIndexes = [index];\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (this.selectedIndexes.includes(index)) {\n\t\t\t\tthis.selectedIndexes.splice(this.selectedIndexes.indexOf(index), 1);\n\t\t\t\tthis.selectIndexes.splice(this.selectIndexes.indexOf(index), 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.selectedIndexes.push(index);\n\t\t\t\tthis.selectIndexes.push(index);\n\t\t\t}\n\t\t}\n\t}\n\n\tgetArray() {\n\t\tlet res = [];\n\n\t\tthis.selectedIndexes.forEach(index => {\n\t\t\tres.push(this.array[index]);\n\t\t});\n\n\t\treturn res;\n\t}\n\n\tselectAll() {\n\t\tthis.selectedIndexes = [];\n\t\tthis.selectIndexes = [];\n\n\t\tthis.array.forEach((data, index) => {\n\t\t\tthis.selectedIndexes.push(index);\n\t\t\tthis.selectIndexes.push(index);\n\t\t});\n\t}\n\n\tremoveAll() {\n\t\tthis.selectedIndexes = [];\n\t\tthis.selectIndexes = [];\n\t}\n}\n","import { Injectable } from '@angular/core';\nimport { NgbModal, NgbModalOptions } from '@ng-bootstrap/ng-bootstrap';\nimport { DialogNotifyContent } from './dialog.notify.content';\nimport { DialogInputContent } from './dialog.input.content';\nimport { DialogErrorContent } from './dialog.error.content';\nimport { DialogConfirmContent } from './dialog.confirm.content';\nimport { DialogSelectDateTimeContent } from './dialog.select-datetime.content';\nimport { DialogInputFieldModel, DialogSelectWithButtonsOptionModel } from '../../models/dialog.model';\nimport { DialogSelectDataLabelsContent } from './dialog.select-data-labels.content';\nimport { DialogLoginContent } from './dialog.login.content';\nimport { DialogRegisterContent } from './dialog.register.content';\nimport { DialogSelectWithButtonsURLContent } from './dialog.select-with-buttons-url.content';\nimport { DialogSelectArrayObjsContent } from './dialog.select-array-objs.content';\nimport { UserModel } from '../../models/user.model';\nimport { DialogSelectArrayContent } from './dialog.select-array.content';\n\n@Injectable()\nexport class DialogService {\n\n\tconstructor(private modalService: NgbModal) { }\n\n\topenDialog(content, options: NgbModalOptions = {size: 'lg', backdrop: 'static'}) {\n\t\treturn this.modalService.open(content, options);\n\t}\n\n\tnotify(msg: string) {\n\t\tconst modalRef = this.openDialog(DialogNotifyContent);\n\t\tmodalRef.componentInstance.title = 'Notify';\n\t\tmodalRef.componentInstance.body = msg;\n\t}\n\n\tinput(title: string, inputFields: DialogInputFieldModel[]) {\n\t\tconst modalRef = this.openDialog(DialogInputContent);\n\t\tmodalRef.componentInstance.title = title;\n\t\tmodalRef.componentInstance.inputFields = inputFields;\n\t\treturn modalRef.result;\n\t}\n\n\terror(msg: string) {\n\t\tconst modalRef = this.openDialog(DialogErrorContent);\n\t\tmodalRef.componentInstance.title = 'Error';\n\t\tmodalRef.componentInstance.body = msg;\n\t}\n\n\tconfirm(msg: string, html?: string) {\n\t\tconst modalRef = this.openDialog(DialogConfirmContent);\n\t\tmodalRef.componentInstance.title = 'Confirm';\n\t\tmodalRef.componentInstance.body = msg;\n\t\tmodalRef.componentInstance.html = html;\n\t\treturn modalRef.result;\n\t}\n\n\tselectDateTime(date: Date) {\n\t\tconst modalRef = this.openDialog(DialogSelectDateTimeContent);\n\t\tmodalRef.componentInstance.title = 'Select Date and Time';\n\t\tmodalRef.componentInstance.date = date;\n\t\treturn modalRef.result;\n\t}\n\t\n\tselectDataLabel(data: any, showArraySubData = true) {\n\t\tconst modalRef = this.openDialog(DialogSelectDataLabelsContent, {size: 'sm', backdrop: 'static'});\n\t\tmodalRef.componentInstance.title = 'Select Data Labels';\n\t\tmodalRef.componentInstance.data = data;\n\t\tmodalRef.componentInstance.showArraySubData = showArraySubData;\n\t\treturn modalRef.result;\n\t}\n\n\tlogin(msAllowed: boolean) {\n\t\tconst modalRef = this.openDialog(DialogLoginContent);\n\t\tmodalRef.componentInstance.msAllowed = msAllowed;\n\t\treturn modalRef.result;\n\t}\n\n\tregister() {\n\t\tconst modalRef = this.openDialog(DialogRegisterContent);\n\t\treturn modalRef.result;\n\t}\n\n\tselectWithButtonsURL(url: string) {\n\t\tconst modalRef = this.openDialog(DialogSelectWithButtonsURLContent);\n\t\tmodalRef.componentInstance.url = url;\n\t\treturn modalRef.result;\n\t}\n\n\tselectWithArrayObjs(title: string, objects: DialogSelectWithButtonsOptionModel[], multiple = false, allowNone = false) {\n\t\tconst modalRef = this.openDialog(DialogSelectArrayObjsContent);\n\t\tmodalRef.componentInstance.title = title;\n\t\tmodalRef.componentInstance.objects = objects;\n\t\tmodalRef.componentInstance.multiple = multiple;\n\t\tmodalRef.componentInstance.allowNone = allowNone;\n\t\treturn modalRef.result;\n\t}\n\n\tselectArray(title: string, array: any[], multiple = false, selectedIndexes = []) {\n\t\tconst modalRef = this.openDialog(DialogSelectArrayContent);\n\t\tmodalRef.componentInstance.title = title;\n\t\tmodalRef.componentInstance.array = array;\n\t\tmodalRef.componentInstance.multiple = multiple;\n\t\tmodalRef.componentInstance.selectedIndexes = selectedIndexes;\n\t\treturn modalRef.result;\n\t}\n}","import { DialogService } from '../widgets/dialog/dialog.service';\nimport { AccountManagerService } from '../account-manager.service';\nimport { AlertService } from '../widgets/alert/alert.service';\nimport { Injectable } from '@angular/core';\nimport { Validators } from '@angular/forms';\n\nimport { UserModel } from '../models/user.model';\n\nimport { ValidationService } from '../util/validation.service';\nimport { SocketManagerService } from '../socket-manager.service';\n\nimport { UserAgentApplication } from 'msal';\n\n\n@Injectable()\nexport class AuthService {\n\tenvironment = null;\n\tuserHasPhoneNumber = false;\n\n\tuserData;\n userAgentApplication;\n\n\tconstructor(private _ds: DialogService, private _vs: ValidationService, private _alert: AlertService, private _account: AccountManagerService, private _socket: SocketManagerService) {}\n\n\tsetupMSSingleSignOn(environment) {\n\t\tthis.environment = environment;\n\n\t\tif (window.location.pathname === '/auth365' && window.location.hash && window.location.hash.startsWith('#id_token=')) {\n\t\t\tthis.environment.MS_id_token = window.location.hash.replace('#', '');\n\t\t} \n\n\t\tthis.userAgentApplication = new UserAgentApplication({\n\t\t\tauth: {\n\t\t\t\tclientId: this.environment.MS_clientId, \n\t\t\t\tauthority: this.environment.MS_authority,\n\t\t\t\tredirectUri: this.environment.MS_redirectUri,\n\t\t\t\tvalidateAuthority: false,\n\t\t\t\tnavigateToLoginRequestUrl: false\n\t\t\t},\n\t\t\tframework: {isAngular: true}\n\t\t});\n\t}\n\n\tsetUserHasPhoneNumber(value: boolean) {\n\t\tthis.userHasPhoneNumber = value;\n\t}\n\n\tregisterUser(other: Object, sendEnrollmentEmail = true) {\n\t\treturn new Promise((resolve, reject) => {\n\n\t\t\tlet inputProps: any[] = [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'User Name',\n\t\t\t\t\tform: 'username',\n\t\t\t\t\tdata: '',\n\t\t\t\t\tvalidators: [Validators.required],\n\t\t\t\t\tvalidatorErrors: ['required'],\n\t\t\t\t\tvalidatorMsg: ['Username is required'],\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Full Name',\n\t\t\t\t\tform: 'fullname',\n\t\t\t\t\tdata: '',\n\t\t\t\t\tvalidators: [Validators.required],\n\t\t\t\t\tvalidatorErrors: ['required'],\n\t\t\t\t\tvalidatorMsg: ['Full name is required'],\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Email',\n\t\t\t\t\tform: 'email',\n\t\t\t\t\tdata: '',\n\t\t\t\t\tvalidators: [Validators.required, this._vs.email],\n\t\t\t\t\tvalidatorErrors: ['required', 'email'],\n\t\t\t\t\tvalidatorMsg: ['Email is required', 'Email is invalid'],\n\t\t\t\t\trequired: true\n\t\t\t\t}\n\t\t\t];\n\n\t\t\tif (this.userHasPhoneNumber) {\n\t\t\t\tinputProps.push({\n\t\t\t\t\tlabel: 'Phone',\n\t\t\t\t\tform: 'phonenumber',\n\t\t\t\t\tdata: '',\n\t\t\t\t\tvalidators: [this._vs.phoneNumber],\n\t\t\t\t\tvalidatorErrors: ['phoneNumber'],\n\t\t\t\t\tvalidatorMsg: ['Phone number is invalid'],\n\t\t\t\t\ttype: 'text'\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis._ds.input('Register New User', inputProps).then(close => {\n\t\t\t\tlet user: UserModel = {\n\t\t\t\t\tusername: close.username.value.trim(),\n\t\t\t\t\temail: close.email.value.trim(),\n\t\t\t\t\tfullname: close.fullname.value.trim(),\n\t\t\t\t\troles: {\n\t\t\t\t\t\tsuper_admin: false,\n\t\t\t\t\t\tapprovals: [],\n\t\t\t\t\t\tgroups: [],\n\t\t\t\t\t\tnotifications: [],\n\t\t\t\t\t\tmiscs: []\n\t\t\t\t\t},\n\t\t\t\t\tactive: true,\n\t\t\t\t\treadonly: false,\n\t\t\t\t\tphonenumber: close.phonenumber ? close.phonenumber.value : '',\n\t\t\t\t\tother: other,\n\t\t\t\t\tattempts: 0,\n\t\t\t\t\tsalt: '',\n\t\t\t\t\thash: ''\n\t\t\t\t};\n\n\t\t\t\tthis._socket.call('createUserAndEmailEnrollment', user, sendEnrollmentEmail, (err, res) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\tthis._socket.call('insertErrorLog', 'AuthService - createUserAndEmailEnrollment', [\n\t\t\t\t\t\t\t{email: close.email.value, username: close.username.value, profile: {fullname: close.fullname.value, status: 'active'}},\n\t\t\t\t\t\t\terr\n\t\t\t\t\t\t]);\n\n\t\t\t\t\t\treject(err);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tresolve(res);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t\t\tdismiss => reject()\n\t\t\t);\n\t\t});\n\t}\n\n\teditUser(user: UserModel) {\n\n\t\tlet inputProps: any[] = [\n\t\t\t{\n\t\t\t\tlabel: 'User Name',\n\t\t\t\tform: 'username',\n\t\t\t\tdata: user.username,\n\t\t\t\tvalidators: [Validators.required],\n\t\t\t\tvalidatorErrors: ['required'],\n\t\t\t\tvalidatorMsg: ['Username is required'],\n\t\t\t\trequired: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'Full Name',\n\t\t\t\tform: 'fullname',\n\t\t\t\tdata: user.fullname,\n\t\t\t\tvalidators: [Validators.required],\n\t\t\t\tvalidatorErrors: ['required'],\n\t\t\t\tvalidatorMsg: ['Full name is required'],\n\t\t\t\trequired: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'Email',\n\t\t\t\tform: 'email',\n\t\t\t\tdata: user.email,\n\t\t\t\tvalidators: [Validators.required, this._vs.email],\n\t\t\t\tvalidatorErrors: ['required', 'email'],\n\t\t\t\tvalidatorMsg: ['Email is required', 'Email is invalid'],\n\t\t\t\trequired: true\n\t\t\t}\n\t\t];\n\n\t\tif (this.userHasPhoneNumber) {\n\t\t\tinputProps.push({\n\t\t\t\tlabel: 'Phone',\n\t\t\t\tform: 'phonenumber',\n\t\t\t\tdata: user['phonenumber'] || '',\n\t\t\t\tvalidators: [this._vs.phoneNumber],\n\t\t\t\tvalidatorErrors: ['phoneNumber'],\n\t\t\t\tvalidatorMsg: ['Phone number is invalid'],\n\t\t\t\ttype: 'text'\n\t\t\t});\n\t\t}\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._ds.input(\n\t\t\t\t'Edit User', inputProps\n\t\t\t).then(close => {\n\n\t\t\t\tif (close.phonenumber && close.phonenumber.value) {\n\t\t\t\t\tuser['phonenumber'] = close.phonenumber.value;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tuser['phonenumber'] = '';\n\t\t\t\t}\n\n\t\t\t\tuser.email = close.email.value.trim();\n\n\t\t\t\tthis._socket.call('editUser', user._id, close.username.value.trim(), close.fullname.value.trim(), close.email.value.trim(), user['phonenumber'], (err, res) => {\n\t\t\t\t\t\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\tthis._socket.call('insertErrorLog', 'AuthService - edituser', [\n\t\t\t\t\t\t\tuser,\n\t\t\t\t\t\t\terr\n\t\t\t\t\t\t]);\n\n\t\t\t\t\t\treject(err);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlet updatedData = {\n\t\t\t\t\t\t\tusername: close.username.value.trim(),\n\t\t\t\t\t\t\tfullname: close.fullname.value.trim(),\n\t\t\t\t\t\t\temail: close.email.value.trim()\n\t\t\t\t\t\t};\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis._alert.setAlert('success', 'User has been edited');\n\t\t\t\t\t\tresolve(updatedData);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t\t\tdismiss => { resolve(true); }\n\t\t\t);\n\t\t});\n\t}\n\n\tloginUser(): Promise<any> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.loginModal().then(\n\t\t\t\tclose => {\n\t\t\t\t\tif (close.type === 'MS') {\n\t\t\t\t\t\tthis.microsoftSignOn();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (!close.form.value.forgotPassword) {\n\t\t\t\t\t\t\tthis._account.logIn(close.form.value.username, close.form.value.password).then(user => {\n\t\t\t\t\t\t\t\tresolve(user);\n\t\t\t\t\t\t\t}, errUser => reject('Invalid login'));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis._account.resetUserPassword(close.form.value.username);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tdismiss => reject()\n\t\t\t);\n\t\t});\n\t}\n\n\tprivate microsoftSignOn() {\n var graphScopes = [\"user.read\", \"mail.send\"];\n this.userAgentApplication.loginRedirect(graphScopes);\n }\n\n\tprivate loginModal() {\n\t\treturn this._ds.login(!this.environment || !this.environment.MS_ALLOWED ? false : true);\n\t}\n\n\tremoveUser(id: string) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._socket.call('removeDocument', 'users', id, (err, res) => {\n\t\t\t\tif (err) {\n\t\t\t\t\tthis._ds.error('Could not remove user');\n\t\t\t\t\tthis._socket.call('insertErrorLog', 'AuthService - removeUser', [\n\t\t\t\t\t\tid,\n\t\t\t\t\t\terr\n\t\t\t\t\t]);\n\t\t\t\t\treject(err);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tresolve(true);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n}\n","import { Injectable } from '@angular/core';\nimport { ModulePermissionModel } from '../models/permission.model';\n\n@Injectable()\nexport class AuthPermissionService {\n\n\tmodules: ModulePermissionModel[] = [];\n\n\tconstructor() {}\n\t\n\tregisterModule(modulePermission: ModulePermissionModel) {\n\t\tthis.modules.push(modulePermission);\n\t\tthis.modules.sort((a, b) => {\n\t\t\tlet x = a.name;\n\t\t\tlet y = b.name;\n\t\t\treturn ((x < y) ? -1 : ((x > y ) ? 1 : 0));\n\t\t});\n\t}\n\n\tgetAllModulePermissions() {\n\t\treturn this.modules;\n\t}\n}\n","import { Directive, HostListener, Output, EventEmitter, Input } from '@angular/core';\n\nexport type ScrollEvent = {\n isReachingBottom: boolean,\n isReachingTop: boolean,\n originalEvent: Event,\n isWindowEvent: boolean\n};\n\ndeclare const window: Window;\n\n@Directive({\n selector: '[detect-scroll]'\n})\nexport class ScrollDirective {\n @Output() public onScroll = new EventEmitter<ScrollEvent>();\n @Input() public bottomOffset: number = 100;\n @Input() public topOffset: number = 100;\n\n constructor() { }\n\n // handle host scroll\n @HostListener('scroll', ['$event']) public scrolled($event: Event) {\n this.elementScrollEvent($event);\n }\n\n // handle window scroll\n @HostListener('window:scroll', ['$event']) public windowScrolled($event: Event) {\n this.windowScrollEvent($event);\n }\n\n protected windowScrollEvent($event: Event) {\n const target = <Document>$event.target;\n const scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;\n const isReachingTop = scrollTop < this.topOffset;\n const isReachingBottom = ( target.body.offsetHeight - (window.innerHeight + scrollTop) ) < this.bottomOffset;\n const emitValue: ScrollEvent = {isReachingBottom, isReachingTop, originalEvent: $event, isWindowEvent: true};\n this.onScroll.emit(emitValue);\n }\n\n protected elementScrollEvent($event: Event) {\n const target = <HTMLElement>$event.target;\n const scrollPosition = target.scrollHeight - target.scrollTop;\n const offsetHeight = target.offsetHeight;\n const isReachingTop = target.scrollTop < this.topOffset;\n const isReachingBottom = (scrollPosition - offsetHeight) < this.bottomOffset;\n const emitValue: ScrollEvent = {isReachingBottom, isReachingTop, originalEvent: $event, isWindowEvent: false};\n this.onScroll.emit(emitValue);\n }\n\n}","import { BaseComponent, ProviderService } from '../../resolveio-class';\nimport { UserModel } from '../../models/user.model';\nimport { Component, Input, QueryList, AfterViewInit, ViewChildren, ViewChild, ElementRef, OnInit } from '@angular/core';\n\nimport { AuthService } from '../../auth/auth.service';\nimport { Validators } from '@angular/forms';\nimport { NavbarMainTabModel } from '../../models/navbar-main-tab.model';\nimport { DialogService } from '../dialog/dialog.service';\nimport { CoreService } from '../../core.service';\n\n@Component({\n\tselector: 'navbar-main',\n\ttemplateUrl: './navbar-main.component.html',\n\tproviders: [ProviderService]\n})\nexport class NavbarMainComponent extends BaseComponent implements OnInit, AfterViewInit {\n\n\t@ViewChildren('dropdowns') dropdowns: QueryList<any>;\n\t@ViewChild('scrollable', {static: true}) scrollable: ElementRef;\n\n\t@Input('logo') logo = '';\n\t@Input('navTabs') navTabs: NavbarMainTabModel[] = [];\n\t@Input('fontSize') fontSize = 12;\n\n\tuser: UserModel = null;\n\tcollapseShowing = false;\n\n\tclient = '';\n\n\tisResolveIO = false;\n\tstandardProgram = false;\n\ttourStarted = false;\n\n\tscrollRightInterval = null;\n\tscrollLeftInterval = null;\n\tisDemo = false;\n\n\tconstructor(private _services: ProviderService, private auth: AuthService, private _ds: DialogService, private _app: CoreService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis._services._account.user.subscribe(user => {\n\t\t\tthis.user = user;\n\t\t});\n\n\t\tthis.client = this._app.client.getValue();\n\t\tthis.standardProgram = this._app.standardProgram.getValue();\n\t\tthis.tourStarted = this._services._app.tourStarted.getValue();\n\n\t\tif (!this.client) {\n\t\t\tthis.isResolveIO = true;\n\t\t}\n\n\t\tthis._services._app.tourStarted.subscribe(tourStarted => {\n\t\t\tthis.tourStarted = tourStarted;\n\t\t});\n\n\t\tthis._services._app.isDemo.subscribe(isDemo => {\n\t\t\tthis.isDemo = isDemo;\n\t\t});\n\t}\n\n\tngAfterViewInit() {\n\t\tsetInterval(() => {\n\t\t\tthis.calculateDropdownsLeft();\n\t\t}, 500);\n\t\tdocument.documentElement.style.setProperty('--font-size', this.fontSize + 'px');\n\t}\n\n\tlogout() {\n\t\tthis._app.isLoggingOut.next(true);\n\t\tthis._services._router.navigateByUrl('/home');\n\t\tthis._services._account.logOut();\n\t}\n\n\tlogin() {\n\t\tthis.auth.loginUser().then(() => {}, err => {});\n\t}\n\n\thasScrolled() {\n\t\tif (this.scrollable.nativeElement.scrollLeft <= 0) {\n\t\t\tthis.stopScrollRight();\n\t\t}\n\n\t\treturn this.scrollable.nativeElement.scrollLeft > 0 ? true : false;\n\t}\n\n\thasMoreScroll() {\n\t\tif (this.scrollable.nativeElement.scrollWidth <= this.scrollable.nativeElement.clientWidth + this.scrollable.nativeElement.scrollLeft) {\n\t\t\tthis.stopScrollLeft();\n\t\t}\n\n\t\treturn this.scrollable.nativeElement.scrollWidth > this.scrollable.nativeElement.clientWidth + this.scrollable.nativeElement.scrollLeft ? true : false;\n\t}\n\n\tstartScrollRight() {\n\t\tthis.scrollRightInterval = setInterval(() => {\n\t\t\tthis.scrollable.nativeElement.scrollLeft -= 1;\n\t\t}, 1);\n\t}\n\n\tstopScrollRight() {\n\t\tclearInterval(this.scrollRightInterval);\n\t}\n\n\tscrollRightOnce() {\n\t\tthis.scrollable.nativeElement.scrollLeft -= 50;\n\t}\n\n\tstartScrollLeft() {\n\t\tthis.scrollLeftInterval = setInterval(() => {\n\t\t\tthis.scrollable.nativeElement.scrollLeft += 1;\n\t\t}, 1);\n\t}\n\n\tstopScrollLeft() {\n\t\tclearInterval(this.scrollLeftInterval);\n\t}\n\n\tscrollLeftOnce() {\n\t\tthis.scrollable.nativeElement.scrollLeft += 50;\n\t}\n\t\n\tcalculateDropdownsLeft() {\n\t\tif (this.dropdowns && this.dropdowns.toArray() && this.dropdowns.toArray().length && this.scrollable) {\n\t\t\tthis.navTabs.filter(a => a.type === 'dropdown').forEach(tab => {\n\t\t\t\tlet dropDown = this.dropdowns.toArray().filter(a => a.nativeElement.innerText.split('\\n')[0].replace(/[^A-Za-z0-9]/g, '') === tab.label.replace(/[^A-Za-z0-9]/g, ''))[0];\n\n\t\t\t\tif (dropDown) {\n\t\t\t\t\ttab.left = Math.max(dropDown.nativeElement.offsetLeft - this.scrollable.nativeElement.scrollLeft, this.scrollable.nativeElement.offsetLeft);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttab.left = 0;\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tisInRole(role: any) {\n\t\tif (this.isSuperAdmin()) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (this.user) {\n\t\t\tif ((<any>this.user.roles).groups) {\n\t\t\t\tfor (let i = 0; i < (<any>this.user.roles).groups.length; i++) {\n\t\t\t\t\tlet group = (<any>this.user.roles).groups[i];\n\t\t\t\t\tfor (let j = 0; j < group.views.length; j++) {\t\n\t\t\t\t\t\tlet view = group.views[j];\n\t\t\t\t\t\tif (view === role || view.startsWith(role + '/')) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tisSuperAdmin() {\n\t\treturn this.user && this.user.roles ? (<any>this.user.roles).super_admin : false;\n\t}\n\n\tisInOneRole(roles: string[]) {\n\t\tif (this.isSuperAdmin()) {\n\t\t\treturn true;\n\t\t}\n\n\t\tfor (let i = 0; i < roles.length; i++) {\n\t\t\tlet role = roles[i];\n\n\t\t\tif (this._services._account.isUserInView(role)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tnavigateTo(route: string) {\n\t\tthis._services._router.navigateByUrl(route);\n\t}\n\n\thelp() {\n\t\tthis._ds.input('What do you need help with?', [\n\t\t\t{\n\t\t\t\tlabel: 'Title of Problem', \n\t\t\t\tform: 'problem_title', \n\t\t\t\tdata: '', \n\t\t\t\tvalidators: [Validators.required],\n\t\t\t\tvalidatorErrors: ['required'],\n\t\t\t\tvalidatorMsg: ['Problem title is required.'],\n\t\t\t\trequired: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'Description of Problem', \n\t\t\t\tform: 'problem_desc', \n\t\t\t\tdata: '', \n\t\t\t\tvalidators: [Validators.required],\n\t\t\t\tvalidatorErrors: ['required'],\n\t\t\t\tvalidatorMsg: ['Problem description is required.'],\n\t\t\t\trequired: true,\n\t\t\t\ttype: 'textarea'\n\t\t\t}\n\t\t]).then(helpRes => {\n\t\t\tthis._services._socket.call('getHelpNotification', this._services._account.getUser().fullname, helpRes.problem_title.value, helpRes.problem_desc.value);\n\t\t}, () => {});\n\t}\n\n\tisCustomer() {\n\t\treturn this._services._account.getUser().other.customers && this._services._account.getUser().other.customers.length ? true : false;\n\t}\n\n\tgetWindowWidth() {\n\t\treturn window.innerWidth;\n\t}\n\n\tprint() {\n\t\twindow.print();\n\t}\n}","<style>\n\t:root {\n --font-size: 12;\n }\n\n\t:host /deep/ * {\n\t\tfont-size: var(--font-size);\n\t}\n\n @media (max-width: 1200px) {\n .navbarMain a {\n font-size: 18px !important;\n }\n }\n @media (min-width: 1200px) {\n .scrollable-x {\n max-width: 60vw;\n overflow-x: auto;\n overflow-y: visible;\n align-items: center;\n }\n\n ::-webkit-scrollbar {\n display: none;\n }\n\n .verticalAlign {\n display: flex;\n align-items: center;\n }\n\n .dropdown {\n position: static;\n }\n }\n\n .navbar li {\n cursor: pointer;\n text-align: center;\n }\n\n .navbar-dark .navbar-nav .nav-link:hover, .navbar-dark .navbar-nav .nav-link:focus {\n color: gray;\n }\n</style>\n\n<div class=\"row\">\n <nav class=\"navbar navbar-expand-xl navbar-dark bg-dark navbarMain\" style=\"width: 100%\">\n <a class=\"navbar-brand\" href=\"#\">\n <img [src]=\"logo\" style=\"width: auto; height: 36px;\" *ngIf=\"!isDemo\">\n </a>\n <button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarMainNav\" aria-controls=\"navbarMainNav\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"navbar-collapse collapse\" id=\"navbarMainNav\">\n <ul class=\"navbar-nav\">\n <li class=\"nav-item\" data-toggle=\"collapse\" data-target=\"#navbarMainNav\" *ngIf=\"!standardProgram\" [style.border-right]=\"getWindowWidth() > 1200 ? '1px solid white' : ''\">\n <a class=\"nav-link\" routerLink=\"home\" [class.disabled]=\"tourStarted ? true : null\" routerLinkActive=\"active\">Home</a>\n </li>\n </ul>\n <div *ngIf=\"hasScrolled()\" (mouseover)=\"startScrollRight()\" (mouseout)=\"stopScrollRight()\" (click)=\"scrollRightOnce()\">\n <i class=\"fa fa-arrow-left\" style=\"color: white; font-size: 20px\"></i>\n </div>\n <ul [ngClass]=\"['navbar-nav', 'scrollable-x']\" #scrollable detect-scroll (onScroll)=\"calculateDropdownsLeft()\">\n <ng-container *ngFor=\"let tab of navTabs; let i = index;\">\n <ng-container *ngIf=\"tab.type === 'link'\">\n <li class=\"nav-item\" *ngIf=\"user && isInRole(tab.links[0].role)\" data-toggle=\"collapse\" [tourAnchor]=\"tab.tourAnchor\" data-target=\"#navbarMainNav\">\n <a class=\"nav-link\" [class.disabled]=\"tourStarted ? true : null\" [routerLink]=\"tab.links[0].routerLink\" routerLinkActive=\"active\">{{tab.links[0].label}}</a>\n </li>\n </ng-container>\n <ng-container *ngIf=\"tab.type === 'dropdown'\">\n <li #dropdowns class=\"nav-item dropdown\" *ngIf=\"user && isInOneRole(tab.roles)\">\n <a class=\"nav-link dropdown-toggle\" [class.disabled]=\"tourStarted ? true : null\" id=\"navbarDropdownAsset\" role=\"button\" [tourAnchor]=\"tab.tourAnchor\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n {{tab.label}}\n </a>\n <div class=\"dropdown-menu bg-dark\" aria-labelledby=\"navbarDropdownAsset\" data-toggle=\"collapse\" data-target=\"#navbarMainNav\" [style.left.px]=\"tab.left || 0\">\n <ng-container *ngFor=\"let link of tab.links\">\n <a class=\"dropdown-item nav-link\" *ngIf=\"user && isInRole(link.role)\" [routerLink]=\"link.routerLink\">{{link.label}}</a>\n </ng-container>\n </div>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n <div *ngIf=\"hasMoreScroll()\" (mouseover)=\"startScrollLeft()\" (mouseout)=\"stopScrollLeft()\" (click)=\"scrollLeftOnce()\">\n <i class=\"fa fa-arrow-right\" style=\"color: white; font-size: 20px\"></i>\n </div>\n <hr />\n <ul [ngClass]=\"['navbar-nav', getWindowWidth() > 1200 ? 'float-lg-right' : '']\">\n <li class=\"nav-item\" *ngIf=\"user\" data-toggle=\"collapse\" data-target=\"#navbarMainNav\" [style.border-left]=\"getWindowWidth() > 1200 ? '1px solid white' : ''\" style=\"height: 30px;\">\n <a class=\"nav-link\" [class.disabled]=\"tourStarted ? true : null\" (click)=\"print()\" style=\"cursor: pointer;\"><i style=\"font-size:20px; color: white;\" class=\"fa fa-print\" aria-hidden=\"true\"></i></a>\n </li>\n <li class=\"nav-item\" *ngIf=\"user && client\" data-toggle=\"collapse\" data-target=\"#navbarMainNav\" style=\"height: 30px;\" tourAnchor=\"supportSection\">\n <a class=\"nav-link\" [class.disabled]=\"tourStarted ? true : null\" routerLink=\"support-ticket\" routerLinkActive=\"active\">Support</a>\n </li>\n <li class=\"nav-item\" *ngIf=\"user && isInRole('super-admin')\" data-toggle=\"collapse\" data-target=\"#navbarMainNav\">\n <a class=\"nav-link\" routerLink=\"logs\" routerLinkActive=\"active\">Logs</a>\n </li>\n <li class=\"nav-item\" *ngIf=\"user && isInRole('super-admin')\" data-toggle=\"collapse\" data-target=\"#navbarMainNav\">\n <a class=\"nav-link\" routerLink=\"super-admin\" routerLinkActive=\"active\">Super Admin</a>\n </li>\n </ul>\n <hr />\n <ul [ngClass]=\"['navbar-nav', getWindowWidth() > 1200 ? 'float-lg-right' : '']\">\n <li class=\"nav-item\" *ngIf=\"!user\" data-toggle=\"collapse\" data-target=\"#navbarMainNav\">\n <a class=\"nav-link\" (click)=\"login()\" style=\"cursor: pointer;\" routerLinkActive=\"active\">Login</a>\n </li>\n <li class=\"nav-item\" *ngIf=\"user\" tourAnchor=\"userSettings\">\n <a class=\"nav-link\" [class.disabled]=\"tourStarted ? true : null\" routerLink=\"user-settings\">Hello {{user.fullname}}!</a>\n </li>\n <li class=\"nav-item\" *ngIf=\"user\" style=\"cursor: pointer\" (click)=\"logout()\" data-toggle=\"collapse\" data-target=\"#navbarMainNav\">\n <a class=\"nav-link\" [class.disabled]=\"tourStarted ? true : null\">Logout</a>\n <li>\n </ul>\n </div>\n </nav>\n</div>","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'filterEqual',\n\tpure: false\n})\nexport class FilterEqualPipe implements PipeTransform { \n\ttransform(items: any[], field: string, value: string): any[] { \n\t\tif (!items) { return []; } \n\t\treturn items.filter(it => it[field] === value);\n\t}\n}\n\n@Pipe({\n\tname: 'filterNotEqual'\n})\nexport class FilterNotEqualPipe implements PipeTransform { \n\ttransform(items: any[], field: string, value: string): any[] { \n\t\tif (!items) { return []; } \n\t\treturn items.filter(it => it[field] !== value);\n\t}\n}\n","import { Component, OnInit, OnDestroy, Input, ChangeDetectorRef } from '@angular/core';\nimport { NavigationEnd, NavigationCancel } from '@angular/router';\nimport { NavbarModel, NavbarTabModel } from './navbar-module.model';\nimport { Subscription } from 'rxjs';\n\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\n\n@Component({\n\tproviders: [ProviderService],\n\tselector: 'navbar-module',\n\ttemplateUrl: './navbar-module.component.html'\n})\n\nexport class NavbarModuleComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\t@Input() sideNavHeight: number;\n\t@Input() sideNavWidth: number;\n\n\tmenuData: NavbarModel = {\n\t\ttitle: '',\n\t\tmodule: null,\n\t\tdescription: null,\n\t\tdescription_name: 'Description',\n\t\ttabs: []\n\t};\n\n\tselectedTab: NavbarTabModel = null;\n\tcurrentRoute: String = '';\n\n\trouterEvents$: Subscription[] = [];\n\ttourStarted = false;\n\n\tconstructor(private _cdRef: ChangeDetectorRef, private _services: ProviderService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\n\t\tthis.tourStarted = this._services._app.tourStarted.getValue();\n\n\t\tthis.routerEvents$.push(this._services._router.events\n\t\t\t//.filter(event => event instanceof NavigationEnd)\n\t\t\t.subscribe((event: NavigationEnd) => {\n\t\t\t\tthis.selectTabFromRouter();\n\t\t\t})\n\t\t);\n\n\t\tthis.routerEvents$.push(this._services._router.events\n\t\t\t//.filter(event => event instanceof NavigationCancel)\n\t\t\t.subscribe((event: NavigationCancel) => {\n\t\t\t\tthis.selectTabFromRouter();\n\t\t\t})\n\t\t);\n\n\t\tthis.routerEvents$.push(this._services._app.navbarModuleData.subscribe(data => {\n\t\t\tthis.menuData = data;\n\n\t\t\tif (!this.selectedTab && this.menuData.tabs.length) {\n\t\t\t\tthis.selectedTab = this.menuData.tabs[0];\n\t\t\t}\n\n\t\t\tif (this.selectedTab) {\n\t\t\t\tfor (let i = 0; i < this.menuData.tabs.length; i++) {\n\t\t\t\t\tlet tabLink = '';\n\t\t\t\t\tif (this.menuData.tabs[i].link.startsWith('/customer-portal/frac') || this.menuData.tabs[i].link.startsWith('/customer-portal/production')) {\n\t\t\t\t\t\ttabLink = this.menuData.tabs[i].link;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttabLink = this.menuData.tabs[i].link.replace(/^(\\/[-a-z]+\\/[^\\/]+)\\/.*$/, '$1');\n\t\t\t\t\t}\n\t\t\t\t\tif (tabLink === this.currentRoute) {\n\t\t\t\t\t\tthis.selectedTab = this.menuData.tabs[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (this.selectedTab === null) {\n\t\t\t\t\tthis.selectedTab = this.menuData.tabs[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\tthis.routerEvents$.push(this._services._app.tourStarted.subscribe(tourStarted => {\n\t\t\tthis.tourStarted = tourStarted;\n\t\t}));\n\t}\n\n\tngOnDestroy() {\n\t\tthis.routerEvents$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\t}\n\n\tselectTabFromRouter() {\n\t\tif (this._services._router.url === '/') {\n\t\t\t\tthis.selectedTab = this.menuData.tabs[0];\n\t\t}\n\t\telse {\n\t\t\tthis.selectedTab = null;\n\t\t\tlet routerLink = '';\n\t\t\t\n\t\t\tif (this._services._router.url.startsWith('/customer-portal/frac') || this._services._router.url.startsWith('/customer-portal/production')) {\n\t\t\t\trouterLink = this._services._router.url;\n\t\t\t}\n\t\t\telse {\n\t\t\t\trouterLink = this._services._router.url.replace(/^(\\/[-a-z]+\\/[^\\/]+)\\/.*$/, '$1');\n\t\t\t}\n\n\t\t\tif (routerLink.includes('?')) {\n\t\t\t\trouterLink = routerLink.substring(0, routerLink.indexOf('?'));\n\t\t\t}\n\n\t\t\tthis.currentRoute = routerLink;\n\n\t\t\tfor (let i = 0; i < this.menuData.tabs.length; i++) {\n\t\t\t\tlet tabLink = '';\n if (this.menuData.tabs[i].link.startsWith('/customer-portal/frac') || this.menuData.tabs[i].link.startsWith('/customer-portal/production')) {\n tabLink = this.menuData.tabs[i].link;\n }\n else {\n tabLink = this.menuData.tabs[i].link.replace(/^(\\/[-a-z]+\\/[^\\/]+)\\/.*$/, '$1');\n }\n if (tabLink === routerLink) {\n this.selectedTab = this.menuData.tabs[i];\n break;\n }\n\t\t\t}\n\t\t\tif (this.selectedTab === null) {\n\t\t\t\tthis.selectedTab = this.menuData.tabs.filter(a => a.link === routerLink)[0] ? this.menuData.tabs.filter(a => a.link === routerLink)[0] : this.menuData.tabs[0];\n\t\t\t}\n\t\t}\n\t}\n\n\ttabClass(tab: NavbarTabModel) {\n\t\tif (this.selectedTab) {\n\t\t\tif (this.selectedTab.label === tab.label) {\n\t\t\t\treturn 'active';\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t}\n\t}\n\n\tnavigateTo(tab: NavbarTabModel) {\n\t\tif (this.selectedTab !== tab) {\n\t\t\tthis.selectedTab = tab;\n\n\t\t\tif (tab.params === null) {\n\t\t\t\tthis._services._router.navigateByUrl(tab.link);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._services._router.navigateByUrl(tab.link + '/' + tab.params);\n\t\t\t}\n\t\t}\n\t}\n}\n","<style>\n .navbarModule li {\n cursor: pointer;\n }\n .navbarModule li.active {\n border-left: 3px solid #d19b3d;\n }\n .navbarModule nav {\n width: 100%;\n }\n\n @media (min-width: 1200px) {\n .navbarModule {\n height: 95vh;\n margin-left: -10px;\n }\n\n hr {\n border-top: white 1px solid;\n }\n }\n\n @media (max-width: 1200px) {\n hr {\n display: none;\n }\n\n .navbarModule a {\n font-size: 18px !important;\n }\n }\n\n \n</style> \n\n<div style=\"margin-left: -15px; margin-right: -15px;\">\n <nav class=\"navbar navbar-expand-xl navbar-dark bg-dark flex-xl-column navbarModule\" [style.height]=\"sideNavHeight ? sideNavHeight + 'px' : ''\" [style.width]=\"sideNavWidth ? sideNavWidth : ''\">\n <div href=\"#\" style=\"color: white; font-size: 16px;\">\n {{ menuData.title }}\n </div>\n <button class=\"navbar-toggler\" type=\"button\" aria-controls=\"#navbarModuleNav\" data-target=\"#navbarModuleNav\" data-toggle=\"collapse\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"navbar-collapse collapse\" id=\"navbarModuleNav\" style=\"align-items:baseline; width: 100%; overflow-y: auto; overflow-x: hidden;\">\n <ul class=\"navbar-nav\" style=\"display: block; float: left; width: 100%;\">\n <div *ngFor=\"let tab of (menuData.tabs | filterNotEqual : 'params' : '0'); let i = index\">\n <div *ngIf=\"tab.params !== null && menuData.tabs[i - 1] && menuData.tabs[i - 1].params === null\">\n <hr>\n <div href=\"#\" style=\"color: white; font-size: 16px;\">\n Selected {{ menuData.module }}\n </div>\n <hr>\n <div style=\"color:white; margin-left: 5px; text-decoration: underline; font-size: 14px\">{{menuData.description_name}}:</div>\n <div style=\"color:white; margin-left: 8px; font-size: 12px\">{{menuData.description}}</div>\n <br />\n </div>\n <li [ngClass]=\"['nav-item', tabClass(tab)]\"data-toggle=\"collapse\" data-target=\"#navbarModuleNav\" [tourAnchor]=\"tab.tourAnchor\">\n <a class=\"nav-link\" [class.disabled]=\"tourStarted ? true : null\" [routerLink]=\"[tab.params ? tab.link + '/' + tab.params : tab.link]\" routerLinkActive=\"active\">{{ tab.label }}</a>\n </li>\n </div>\n </ul>\n </div>\n </nav>\n</div>\n","import { Component, OnInit, ElementRef, ViewChild, Input } from '@angular/core';\nimport { UserModel } from './models/user.model';\nimport { AppStatusModel } from './models/app-status.model';\nimport { DeviceDetectorService } from 'ngx-device-detector';\nimport { ResizeService } from './util/window-resize.service';\nimport { ProviderService, BaseComponent } from './resolveio-class';\nimport { OfflineManagerService } from './offline-manager.service';\nimport { LocalStorageService } from 'ngx-localstorage';\nimport { NavigationEnd } from '@angular/router';\nimport { AuthService } from './auth/auth.service';\nimport { AuthPermissionService } from './auth/auth-permissions.service';\nimport { DialogService } from './widgets/dialog/dialog.service';\nimport { ActiveToast } from 'ngx-toastr';\n\n@Component({\n\tproviders: [ProviderService],\n\tselector: 'resolveio-client-lib-core',\n\ttemplateUrl: './core.component.html'\n})\nexport class CoreComponent extends BaseComponent implements OnInit {\n\t@Input('environment') environment;\n\t@Input('logo') logo = '';\n\t@Input('navTabs') navTabs = '';\n\t@Input('userHasPhoneNumber') userHasPhoneNumber = false;\n\t@Input('client') client = '';\n\n\t@ViewChild('navBarMain', {read: ElementRef, static: true}) el_navBarMain: ElementRef;\n\t@ViewChild('navBarModule', {read: ElementRef, static: true}) el_navBarModule: ElementRef;\n\n\tyear: string = (new Date()).getFullYear().toString();\n\n\tfullScreen = false;\n\n\twindowSizeHeight = window.innerHeight;\n\twindowSizeWidth = window.innerWidth;\n\n\tnavbarMainHeight = 0;\n\tstatusHeight = 0;\n\tconnectedHeight = 0;\n\tisDevice = false;\n\tshowNavigationMenu = false;\n\n\tswFlagAlert: ActiveToast<any> = null;\n\t\n\tisConnected = false;\n\tisConnecting = false;\n\tsocketStatus: number;\n\n\tuser: UserModel;\n\tstatus: AppStatusModel;\n\n\tcollapsableMenu = true;\n\tfontSize = 12;\n\topenedWindow = false;\n\n\tisOffline = false;\n\tfoundUpdate = false;\n\n\torientation = 'portrait';\n\n\t// previousRouterErrorHandler = null;\n\n\tconstructor(private _deviceDet: DeviceDetectorService, private _ds: DialogService, private _resizeService: ResizeService, public _services: ProviderService, private _offline: OfflineManagerService, private _storage: LocalStorageService, private _auth: AuthService, private _aps: AuthPermissionService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis._services._app.setEnvironment(this.environment);\n\t\tthis._services._app.setClient(this.client);\n\t\tthis._services._app.setNavTabs(this.navTabs);\n\n\t\tthis._services._account.initLoginManager(this.environment);\n\t\t\n\t\tif (this.environment && this.environment.MS_ALLOWED) {\n\t\t\tthis._auth.setupMSSingleSignOn(this.environment);\n\t\t}\n\n\t\tthis._auth.setUserHasPhoneNumber(this.userHasPhoneNumber);\n\n\t\t// this._services._app.setCustomHomePage(this.customHomePage);\n\n\t\t// this._services._app.setLogo(this.logo);\n\n\t\tthis._resizeService.onResize$.subscribe((val) => {\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.windowSizeHeight = val.innerHeight;\n\t\t\t\tthis.windowSizeWidth = val.innerWidth;\n\t\t\t}, 100);\n\t\t});\n\t\t\n\t\tthis._services._app.fullScreen.subscribe(fullScreen => {\n\t\t\tthis.fullScreen = fullScreen;\n\t\t});\n\n\t\tthis._services._account.user.subscribe(user => {\n\t\t\tif (user && user.settings) {\n\t\t\t\tthis.collapsableMenu = user.settings.collapsable_menu;\n\t\t\t\tthis.fontSize = user.settings.font_size;\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-color', user.settings.warning_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-font-color', user.settings.warning_font_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-shadow-color', '0 0 0 0.2rem ' + hexToRGB(user.settings.warning_color, 0.5));\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-hover-color', user.settings.warning_hover_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--success-color', user.settings.success_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--success-font-color', user.settings.success_font_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--success-shadow-color', '0 0 0 0.2rem ' + hexToRGB(user.settings.success_color, 0.5));\n\t\t\t\tdocument.documentElement.style.setProperty('--success-hover-color', user.settings.success_hover_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-color', user.settings.danger_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-font-color', user.settings.danger_font_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-shadow-color', '0 0 0 0.2rem ' + hexToRGB(user.settings.danger_color, 0.5));\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-hover-color', user.settings.danger_hover_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--info-color', user.settings.info_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--info-font-color', user.settings.info_font_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--info-shadow-color', '0 0 0 0.2rem ' + hexToRGB(user.settings.info_color, 0.5));\n\t\t\t\tdocument.documentElement.style.setProperty('--info-hover-color', user.settings.info_hover_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-color', user.settings.primary_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-font-color', user.settings.primary_font_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-shadow-color', '0 0 0 0.2rem ' + hexToRGB(user.settings.primary_color, 0.5));\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-hover-color', user.settings.primary_hover_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-color', user.settings.secondary_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-font-color', user.settings.secondary_font_color);\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-shadow-color', '0 0 0 0.2rem ' + hexToRGB(user.settings.secondary_color, 0.5));\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-hover-color', user.settings.secondary_hover_color);\n\t\t\t}\n\t\t\telse if (user && (!user.other['customers'] || !user.other['customers'].length) && !user.other['id_customer'] && !user.settings && !this.openedWindow) {\n\t\t\t\tthis.openedWindow = true;\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-color', '#ffc107');\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-font-color', '#000000');\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-shadow-color', '0 0 0 0.2rem rgba(222, 170, 12, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-hover-color', '#e0a800');\n\t\t\t\tdocument.documentElement.style.setProperty('--success-color', '#28a745');\n\t\t\t\tdocument.documentElement.style.setProperty('--success-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--success-shadow-color', '0 0 0 0.2rem rgba(72, 180, 97, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--success-hover-color', '#218838');\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-color', '#dc3545');\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-shadow-color', '0 0 0 0.2rem rgba(225, 83, 97, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-hover-color', '#c82333');\n\t\t\t\tdocument.documentElement.style.setProperty('--info-color', '#17a2b8');\n\t\t\t\tdocument.documentElement.style.setProperty('--info-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--info-shadow-color', '0 0 0 0.2rem rgba(58, 176, 195, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--info-hover-color', '#138496');\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-color', '#007bff');\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-shadow-color', '0 0 0 0.2rem rgba(38, 143, 255, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-hover-color', '#0069d9');\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-color', '#868e96');\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-shadow-color', '0 0 0 0.2rem rgba(130, 138, 145, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-hover-color', '#5a6268');\n\t\t\t\tthis.fontSize = 12;\n\t\t\t\tthis._ds.notify('Hello, ' + user.fullname + ' it looks like there are no user settings saved for you. To adjust your user settings click your name at the top of the page next to the logout button, adjust any settings you want, then click submit to apply them.');\n\t\t\t\tthis._services._router.navigateByUrl(this._services._router.url.split('/')[0] + '/user-settings/settings')\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-color', '#ffc107');\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-font-color', '#000000');\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-shadow-color', '0 0 0 0.2rem rgba(222, 170, 12, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--warning-hover-color', '#e0a800');\n\t\t\t\tdocument.documentElement.style.setProperty('--success-color', '#28a745');\n\t\t\t\tdocument.documentElement.style.setProperty('--success-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--success-shadow-color', '0 0 0 0.2rem rgba(72, 180, 97, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--success-hover-color', '#218838');\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-color', '#dc3545');\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-shadow-color', '0 0 0 0.2rem rgba(225, 83, 97, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--danger-hover-color', '#c82333');\n\t\t\t\tdocument.documentElement.style.setProperty('--info-color', '#17a2b8');\n\t\t\t\tdocument.documentElement.style.setProperty('--info-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--info-shadow-color', '0 0 0 0.2rem rgba(58, 176, 195, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--info-hover-color', '#138496');\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-color', '#007bff');\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-shadow-color', '0 0 0 0.2rem rgba(38, 143, 255, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--primary-hover-color', '#0069d9');\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-color', '#868e96');\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-font-color', '#ffffff');\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-shadow-color', '0 0 0 0.2rem rgba(130, 138, 145, 0.5)');\n\t\t\t\tdocument.documentElement.style.setProperty('--secondary-hover-color', '#5a6268');\n\t\t\t\tthis.fontSize = 12;\n\t\t\t}\n\n\t\t\tthis.user = user;\n\t\t});\n\n\t\t// if (!this.previousRouterErrorHandler) {\n\t\t// \tthis.previousRouterErrorHandler = this._services._router.errorHandler;\n\t\t// \tthis._services._router.errorHandler = function (err: any) {\t\n\t\t// \t\treturn this.previousRouterErrorHandler.apply(this.previousRouterErrorHandler, arguments);\n\t\t// \t};\n\t\t// }\n\n\t\tif (this._deviceDet.isMobile() || this._deviceDet.isTablet()) {\n\t\t\tthis._services._app.setIsDevice(true);\n\t\t\tthis.isDevice = true;\n\t\t}\n\t\telse {\n\t\t\tthis._services._app.setIsDevice(false);\n\t\t\tthis.isDevice = false;\n\t\t}\n\n\t\tif (this.environment.IS_PRODUCTION) {\n\t\t\tthis._services._socket.subscribeBypassRoute('flagWithType', 'newSW').subscribe(flag => {\n\t\t\t\tif (flag) {\n\t\t\t\t\tthis.swFlagAlert = this._services._alert.setAlert('info', 'This page will reload once new version has been downloaded', 0);\n\t\t\t\t}\n\t\t\t\telse if (this.swFlagAlert) {\n\t\t\t\t\tthis._services._alert.clearAlert(this.swFlagAlert.toastId);\n\t\t\t\t\tthis.swFlagAlert = null;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tthis._offline.offlineMode.subscribe(offline => {\n\t\t\tthis.isOffline = offline;\n\t\t});\n\n\t\tthis._services._account.getSocketStatus().subscribe(status => {\n\t\t\tthis.socketStatus = status;\n\t\t\t\n\t\t\tif (!this.user) {\n\t\t\t\tthis.isConnected = false;\n\t\t\t\tthis.isConnecting = false;\n\n\t\t\t\tthis.connectedHeight = 40;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (this.socketStatus === WebSocket.OPEN) {\n\t\t\t\t\tthis.isConnected = true;\n\t\t\t\t\tthis.isConnecting = false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.isConnected = false;\n\n\t\t\t\t\tif (this.socketStatus === WebSocket.CONNECTING) {\n\t\t\t\t\t\tthis.isConnecting = true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.isConnecting = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!this.isConnected) {\n\t\t\t\t\tthis.connectedHeight = 40;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.connectedHeight = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tthis._services._socket.subscribeBypassRoute('appstatus').subscribe(appstatus => {\n\t\t\tthis.status = appstatus; //OK if not defined\n\t\t\tthis._services._app.setHasStatusMessage(this.status ? true : false);\n\t\t\tthis.statusHeight = this.status ? 40 : 0;\n\t\t});\n\n\t\tsetTimeout(() => {\n\t\t\tthis.navbarMainHeight = this.el_navBarMain.nativeElement.children[0].clientHeight;\n\t\t}, 100);\n\t\t\n\t\tsetTimeout(() => {\n\t\t\tthis.navbarMainHeight = this.el_navBarMain.nativeElement.children[0].clientHeight;\n\t\t}, 1000);\n\n\t\tsetTimeout(() => {\n\t\t\tthis.navbarMainHeight = this.el_navBarMain.nativeElement.children[0].clientHeight;\n\t\t}, 5000);\n\n\t\tif (this.isDevice) {\n\t\t\tlet firstRedirect = false;\n\t\t\tlet lastURL = this._storage.get('lastURL');\n\n\t\t\tthis._services._router.events.subscribe((event: NavigationEnd) => {\n\t\t\t\tif (lastURL && lastURL !== '/' && !firstRedirect) {\n\t\t\t\t\tif (event.url === '' || event.url === '/') {\n\t\t\t\t\t\tthis._services._router.navigateByUrl(lastURL);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfirstRedirect = true;\n\n\t\t\t\tif (event.url) {\n\t\t\t\t\tthis._storage.set('lastURL', event.url);\n\t\t\t\t}\n\t\t\t\telse if (event.urlAfterRedirects) {\n\t\t\t\t\tthis._storage.set('lastURL', event.urlAfterRedirects);\n\t\t\t\t}\t\t\t\t\n\t\t\t});\n\t\t}\n\n\t\tif (['iPad', 'iPhone', 'iPod'].indexOf(navigator.platform) >= 0 && ('standalone' in window.navigator) && (<any>window.navigator).standalone) {\n\t\t\tthis.showNavigationMenu = true;\n\t\t}\n\n\t\twindow.addEventListener('orientationchange', () => {\n\t\t\tif (window.orientation === -90) {\n\t\t\t\tthis.orientation = 'landscape';\n\t\t\t}\n\t\t\tif (window.orientation === 90) {\n\t\t\t\tthis.orientation = 'landscape';\n\t\t\t}\n\t\t\tif (window.orientation === 0) {\n\t\t\t\tthis.orientation = 'portrait';\n\t\t\t}\n\t\t}, true);\n\n\t\tlet mousewheelEvent;\n\n document.addEventListener('focus', function() {\n if (document.activeElement instanceof HTMLElement && document.activeElement.nodeName === 'INPUT' && document.activeElement['type'] === 'number') {\n mousewheelEvent = true;\n document.addEventListener('mousewheel', handleMousewheelEvent, { passive: true });\n }\n }, true);\n\n document.addEventListener('blur', function() {\n if (mousewheelEvent) {\n mousewheelEvent = false;\n document.removeEventListener('mousewheel', handleMousewheelEvent);\n }\n\t\t}, true);\n\t\t\n\t\twindow.addEventListener('dragover', (e) => {\n\t\t\tlet ev = e || event;\n\t\t\tev.preventDefault();\n\t\t}, false);\n\t\t\n\t\twindow.addEventListener('drop', (e) => {\n\t\t\tlet ev = e || event;\n\t\t\tev.preventDefault();\n\t\t}, false);\n\t}\n\n\tgetNavbarModuleHeight() {\n\t\treturn this.el_navBarModule.nativeElement.children[0].clientHeight;\n\t}\n\n\tonPushBackButton() {\n\t\twindow.history.back();\n\t}\n\n\tonPushReloadButton() {\n\t\twindow.location.reload();\n\t}\n\n\tonPushForwardButton() {\n\t\twindow.history.forward();\n\t}\n\n\topenNav() {\n\t\tlet x = document.getElementById('navSid');\n\t\tlet y = document.getElementById('main_cont');\n\t\tif (x.style.width === '40px' && y.style.paddingLeft === '55px') {\n\t\t\tx.style.width = '195px';\n\t\t\ty.style.paddingLeft = '210px';\n\t\t}\n\t\telse {\n\t\t\tx.style.width = '40px';\n\t\t\ty.style.paddingLeft = '55px';\n\t\t}\n\t}\n\t\t\n\tcloseNav() {\n\t\tdocument.getElementById('navSid').style.width = '40px';\n\t\tdocument.getElementById('main_cont').style.paddingLeft = '55px';\t\n\t}\n}\n\nfunction handleMousewheelEvent() {\n\t(<any>document.activeElement).blur();\n}\n\nfunction hexToRGB(hex, alpha) {\n let r = parseInt(hex.slice(1, 3), 16),\n g = parseInt(hex.slice(3, 5), 16),\n b = parseInt(hex.slice(5, 7), 16);\n\n if (alpha) {\n return \"rgba(\" + r + \", \" + g + \", \" + b + \", \" + alpha + \")\";\n } else {\n return \"rgb(\" + r + \", \" + g + \", \" + b + \")\";\n }\n}","<style>\n\t:root {\n --warning-color: #ffc107;\n --warning-font-color: #000000;\n --warning-hover-color: #e0a800;\n --warning-shadow-color: 0 0 0 0.2rem rgba(222, 170, 12, 0.5);\n --success-color: #28a745;\n --success-font-color: #ffffff;\n --success-hover-color: #218838;\n --success-shadow-color: 0 0 0 0.2rem rgba(72, 180, 97, 0.5);\n --danger-color: #dc3545;\n --danger-font-color: #ffffff;\n --danger-hover-color: #c82333;\n --danger-shadow-color: 0 0 0 0.2rem rgba(225, 83, 97, 0.5);\n --info-color: #17a2b8;\n --info-font-color: #ffffff;\n --info-hover-color: #138496;\n --info-shadow-color: 0 0 0 0.2rem rgba(58, 176, 195, 0.5);\n --primary-color: #007bff;\n --primary-font-color: #ffffff;\n --primary-hover-color: #0069d9;\n --primary-shadow-color: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);\n --secondary-color: #868e96;\n --secondary-font-color: #ffffff;\n --secondary-hover-color: #5a6268;\n --secondary-shadow-color: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);\n }\n\n\t:host /deep/ .btn-warning {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-color);\n\t\tborder-color: var(--warning-color);\n\t}\n\t:host /deep/ .btn-warning:focus, .btn-warning.focus {\n\t\tbox-shadow: var(--warning-shadow-color);\n\t}\n\t:host /deep/ .btn-warning:hover {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-hover-color);\n\t\tborder-color: var(--warning-hover-color);\n\t}\n\n\t:host /deep/ .btn-success {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-color);\n\t\tborder-color: var(--success-color);\n\t}\n\t:host /deep/ .btn-success:focus, .btn-success.focus {\n\t\tbox-shadow: var(--success-shadow-color);\n\t}\n\t:host /deep/ .btn-success:hover {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-hover-color);\n\t\tborder-color: var(--success-hover-color);\n\t}\n\n\t:host /deep/ .btn-danger {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-color);\n\t\tborder-color: var(--danger-color);\n\t}\n\t:host /deep/ .btn-danger:focus, .btn-danger.focus {\n\t\tbox-shadow: var(--danger-shadow-color);\n\t}\n\t:host /deep/ .btn-danger:hover {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-hover-color);\n\t\tborder-color: var(--danger-hover-color);\n\t}\n\n\t:host /deep/ .btn-info {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-color);\n\t\tborder-color: var(--info-color);\n\t}\n\t:host /deep/ .btn-info:focus, .btn-info.focus {\n\t\tbox-shadow: var(--info-shadow-color);\n\t}\n\t:host /deep/ .btn-info:hover {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-hover-color);\n\t\tborder-color: var(--info-hover-color);\n\t}\n\n\t:host /deep/ .btn-primary {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-color);\n\t\tborder-color: var(--primary-color);\n\t}\n\t:host /deep/ .btn-primary:focus, .btn-primary.focus {\n\t\tbox-shadow: var(--primary-shadow-color);\n\t}\n\t:host /deep/ .btn-primary:hover {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-hover-color);\n\t\tborder-color: var(--primary-hover-color);\n\t}\n\n\t:host /deep/ .btn-secondary {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-color);\n\t\tborder-color: var(--secondary-color);\n\t}\n\t:host /deep/ .btn-secondary:focus, .btn-secondary.focus {\n\t\tbox-shadow: var(--secondary-shadow-color);\n\t}\n\t:host /deep/ .btn-secondary:hover {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-hover-color);\n\t\tborder-color: var(--secondary-hover-color);\n\t}\n\t\n \t@media print {\n\t \t.dontPrint * {\n\t\t \tdisplay: none !important;\n\t \t}\n\n\t\t.myDivToPrintCs {\n\t\t\tbackground-color: white;\n\t\t\theight: 100%;\n\t\t\twidth: 100%;\n\t\t\tfont-size: 12px;\n\t\t\tline-height: 12px;\n\t\t\tpage-break-after: avoid;\n\t\t\tdisplay: initial;\n\t\t}\n\n\t\t.removeOverflow {\n\t\t\toverflow-y: hidden !important; \n\t\t\theight: 100% !important;\n\t\t}\n \t}\n\n \t.hideThis {\n\t\tdisplay: none !important;\n\t}\n\n\t.navSidbar {\n\t\twidth: 0px;\n\t\tposition: fixed;\n\t\tz-index: 1;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tbackground-color: #343a40;\n\t\toverflow: hidden;\n\t\ttransition: 0.5s;\n\t\tpadding-top: 0px;\n\t}\n\n\t.navSidbar a {\n\t\tpadding: 8px 8px 8px 32px;\n\t\ttext-decoration: none;\n\t\tfont-size: 25px;\n\t\tcolor: #818181;\n\t\tdisplay: block;\n\t\ttransition: 0.3s;\n\t}\n\n\t.navSidbar a:hover {\n\t\tcolor: #f1f1f1;\n\t}\n\n\t.openbtn {\n\t\tbackground-color: #343a40;\n\t\tborder: none;\n\t\tcolor: #fff;\n\t\tpadding: 5px 20px;\n\t\tfont-size: 18px;\n\t\tright: 0;\n\t\ttop: 0px;\n\t\tposition: absolute;\n\t\tz-index: 999999;\n\t\tcursor: pointer;\n\t\tfloat: right;\n\t\theight: 100%;\n\t}\n\n\t.openbtn span {\n\t\tfont-size: 20px;\n\t\tdisplay: block;\n\t\theight: auto;\n\t\twidth: auto;\n\t\ttext-align: center;\n\t\tposition: absolute;\n\t\tleft: 50%;\n\t\ttop: 50%;\n\t\ttransform: translate(-50%, -50%) rotate(-90deg);\n\t\tmargin-top: -55px;\n\t\tletter-spacing: 30px;\n\t}\n\t#main_cont {\n\t\ttransition: padding-left .5s;\n\t}\n\n\t.sid_inr {\n\t\tpadding-left: 25px;\n\t}\n\n</style>\n<div *ngIf=\"isDevice\">\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"/assets/css/tablet.css\">\n</div>\n<div #shell>\n\t<div *ngIf=\"user && (!isConnected || isOffline)\">\n\t\t<div style=\"height: 40px; text-align: center; vertical-align: middle; background-color: red; color: white;\">\n\t\t\t<div style=\"padding-top: 9px; padding-bottom: 9px;\">*** OFFLINE MODE ***</div>\n\t\t</div>\n\t</div>\n\t<div *ngIf=\"!user && (!isConnected || isOffline)\">\n\t\t<div style=\"height: 40px; text-align: center; vertical-align: middle; background-color: red; color: white;\">\n\t\t\t<div style=\"padding-top: 9px; padding-bottom: 9px;\">*** PLEASE LOGIN ***</div>\n\t\t</div>\n\t</div>\n\t<div *ngIf=\"status\">\n\t\t<div style=\"height: 40px; text-align: center; vertical-align: middle; background-color: red; color: white;\">\n\t\t\t<div style=\"padding-top: 9px; padding-bottom: 9px;\">*** {{ status.message }} ***</div>\n\t\t</div>\n\t</div>\n\t<div *ngIf=\"fullScreen\">\n\t\t<router-outlet name=\"jobboardfsoutlet\"></router-outlet>\n\t</div>\n\t<div [ngClass]=\"['container-fluid', fullScreen ? 'hideThis' : '']\" [style.font-size.px]=\"fontSize\">\n\t\t<div class=\"dontPrint\">\n\t\t\t<navbar-main style=\"width: 100%\" tourAnchor=\"navBarMain\" #navBarMain [logo]=\"logo\" [navTabs]=\"navTabs\" [fontSize]=\"fontSize\"></navbar-main>\n\t\t</div>\n\t\t<ng-template ngbModalContainer></ng-template>\n\t\t<div class=\"row\">\n\t\t\t<div id=\"navSid\" [ngClass]=\"['dontPrint', windowSizeWidth > 1200 && collapsableMenu ? 'navSidbar' : 'col-xl-1']\" [style.width]=\"windowSizeWidth > 1200 && collapsableMenu ? 40 + 'px' : 100 + '%'\" [style.margin-top.px]=\"windowSizeWidth > 1200 && collapsableMenu ? navbarMainHeight + statusHeight + connectedHeight : 0\" >\n\t\t\t\t<div class=\"openbtn\" *ngIf=\"windowSizeWidth > 1200 && collapsableMenu\" (mouseenter)=\"openNav()\"><span>MENU</span></div>\n\t\t\t\t<div [ngClass]=\"windowSizeWidth > 1200 && collapsableMenu ? 'sid_inr' : ''\">\n\t\t\t\t\t<navbar-module #navBarModule tourAnchor=\"navBarModule\" [sideNavWidth]=\"windowSizeWidth > 1200 && collapsableMenu ? '90%' : 'auto'\" [sideNavHeight]=\"windowSizeWidth > 1200 && collapsableMenu ? windowSizeHeight - navbarMainHeight - statusHeight - connectedHeight - (showNavigationMenu ? (54 + getNavbarModuleHeight()) : 0) - ((!isDevice || (isDevice && showNavigationMenu)) ? 20 : 0) : ''\"></navbar-module>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div [id]=\"windowSizeWidth > 1200 ? 'main_cont' : 'main_cont_mobile'\" [ngClass]=\"[windowSizeWidth > 1200 && collapsableMenu ? 'col-xl-12' : 'col-xl-11']\" [style.padding-left.px]=\"windowSizeWidth > 1200 && collapsableMenu ? 55 : 0\" (mouseenter)=\"windowSizeWidth > 1200 && collapsableMenu ? closeNav() : null\">\n\t\t\t\t<div style=\"padding-top: 15px; -webkit-overflow-scrolling: touch\" [style.overflow-y]=\"(isDevice && !showNavigationMenu) ? 'initial' : 'scroll'\" [style.height.px]=\"windowSizeHeight - ((isDevice || windowSizeWidth <= 1200) && !showNavigationMenu ? (getNavbarModuleHeight() > 100 ? 0 : getNavbarModuleHeight()) : 0) - navbarMainHeight - statusHeight - connectedHeight - (isDevice && showNavigationMenu ? (54 + (getNavbarModuleHeight() > 100 ? 0 : getNavbarModuleHeight())) : 0) - ((!isDevice || (isDevice && showNavigationMenu)) ? 20 : 0)\" class=\"removeOverflow\">\n\t\t\t\t\t<div [style.height.px]=\"windowSizeHeight + 1 - ((isDevice || windowSizeWidth <= 1200) && !showNavigationMenu ? (getNavbarModuleHeight() > 100 ? 0 : getNavbarModuleHeight()) : 0) - navbarMainHeight - statusHeight - connectedHeight - (isDevice && showNavigationMenu ? (54 + (getNavbarModuleHeight() > 100 ? 0 : getNavbarModuleHeight())) : 0) - ((!isDevice || (isDevice && showNavigationMenu)) ? 60 : 0)\" class=\"removeOverflow\">\n\t\t\t\t\t\t<router-outlet></router-outlet>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div *ngIf=\"isDevice && showNavigationMenu\" style=\"height: 54px; background-color: lightgray; margin-left: -15px; margin-right: -15px;\" class=\"dontPrint\">\n\t\t\t<table style=\"width: 100%\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td style=\"text-align: center\">\n\t\t\t\t\t\t<button type=\"button\" class=\"btn\" style=\"background-color: lightgray\" (click)=\"onPushBackButton()\"><i class=\"fa fa-arrow-left\" style=\"color: black; font-size: 20px\"></i></button>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style=\"text-align: center\">\n\t\t\t\t\t\t<button type=\"button\" class=\"btn\" style=\"background-color: lightgray\" (click)=\"onPushReloadButton()\"><i class=\"fa fa-refresh\" style=\"color: black; font-size: 20px\"></i></button>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style=\"text-align: center\">\n\t\t\t\t\t\t<button type=\"button\" class=\"btn\" style=\"background-color: lightgray\" (click)=\"onPushForwardButton()\"><i class=\"fa fa-arrow-right\" style=\"color: black; font-size: 20px\"></i></button>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</div>\n\t\t<div *ngIf=\"!isDevice\" style=\"text-align: center; height: 20px; font-style: italic; font-weight: bold; background-color: lightgray; margin-left: -15px; margin-right: -15px;\">&copy; {{year}} RESOLVEIO ALL RIGHTS RESERVED</div>\n\t</div>\n</div>\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { dateReviver } from '../util/common.helper';\n\n@Pipe({\n\tname: 'jsonParse',\n\tpure: false\n})\nexport class JsonParsePipe implements PipeTransform { \n\ttransform(value: string): string { \n\t\tlet parse = null;\n\t\tlet error = false;\n\n\t\ttry {\n\t\t\tparse = JSON.parse(value, dateReviver);\n\t\t}\n\t\tcatch (e) {\n\t\t\terror = true;\n\t\t}\n\n\t\tif (error) {\n\t\t\treturn value;\n\t\t}\n\t\t\n\t\treturn JSON.stringify(parse, null, 2);\n\t}\n}","import { Component, OnInit, OnDestroy, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { ProviderService, BaseComponent } from '../resolveio-class';\nimport moment from 'moment';\nimport { DialogService } from '../widgets/dialog/dialog.service';\n\n@Component({\n\tproviders: [ProviderService],\n\ttemplateUrl: './logger.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\n\nexport class LoggerComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\tsubscription$: Subscription[] = [];\n\tlogs: any[] = [];\n\n\tentries_per_page = 25;\n\tpage_num = 1;\n\tlog_cnt = 0;\n\n\tuser = null;\n\tusers = [];\n\n\tdateStartElem;\n\tdateEndElem;\n\ttimeStartElem;\n\ttimeEndElem;\n\tdateStart: Date;\n\tdateEnd: Date;\n\n\tselectedTypes = [];\n\n\tcollection = '';\n\tmethod = '';\n\troute = '';\n\tid_document = '';\n\n\tconstructor(private _services: ProviderService, private _ds: DialogService, private _cd: ChangeDetectorRef) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tif (!this._services._account.getUser().roles.super_admin) {\n\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t}\n\n\t\tthis.subscription$.push(this._services._socket.subscribe('allUsers').subscribe(users => {\n\t\t\tthis.users = users;\n\n\t\t\tthis._cd.detectChanges();\n\t\t}));\n\n\t\tlet jsDateStart = new Date();\n\t\tjsDateStart.setHours(0, 0, 0, 0);\n\t\tlet date_start = new Date(moment(jsDateStart).subtract(10, 'days').toDate());\n\t\tthis.dateStartElem = {year: date_start.getFullYear(), month: date_start.getMonth() + 1, day: date_start.getDate()};\n\t\tthis.timeStartElem = {hour: 0, minute: 0, second: 0};\n\n\t\tlet jsDateEnd = new Date();\n\t\tjsDateEnd.setHours(23, 59, 59, 999);\n\t\tlet date_end = jsDateEnd;\n\t\tthis.dateEndElem = {year: date_end.getFullYear(), month: date_end.getMonth() + 1, day: date_end.getDate()};\n\t\tthis.timeEndElem = {hour: 23, minute: 59, second: 59};\n\n\t\tthis.getLogData();\n\t}\n\n\tngOnDestroy() {\n\t\tthis.subscription$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\t}\n\n\tgetLogData() {\n\t\tthis.dateStart = new Date(this.dateStartElem.year, this.dateStartElem.month - 1, this.dateStartElem.day, this.timeStartElem.hour, this.timeStartElem.minute, this.timeStartElem.second, 0);\n\t\tthis.dateEnd = new Date(this.dateEndElem.year, this.dateEndElem.month - 1, this.dateEndElem.day, this.timeEndElem.hour, this.timeEndElem.minute, this.timeEndElem.second, 999);\n\n\t\tlet query: any = {\n\t\t\t$and: [\n\t\t\t\t{createdAt: {$gte: this.dateStart}},\n\t\t\t\t{createdAt: {$lte: this.dateEnd}}\n\t\t\t]\n\t\t};\n\n\t\tif (!this.selectedTypes.length) {\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tquery.$and.push({type: {$in: this.selectedTypes}});\n\t\t}\n\n\t\tif (this.collection) {\n\t\t\tif (this.collection.includes(',')) {\n\t\t\t\tlet collections = this.collection.split(',').map(a => a.trim()).filter(a => !a.startsWith('!'));\n\t\t\t\tif (collections.length) {\n\t\t\t\t\tquery.$and.push({collection: {$in: collections}});\n\t\t\t\t}\n\n\t\t\t\tlet notCollections = this.collection.split(',').map(a => a.trim()).filter(a => a.startsWith('!'));\n\t\t\t\tnotCollections.forEach(not => {\n\t\t\t\t\tquery.$and.push({collection: {$ne: not.replace('!', '')}});\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (this.collection.startsWith('!')) {\n\t\t\t\t\tquery.$and.push({collection: {$ne: this.collection.replace('!', '').trim()}});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tquery.$and.push({collection: this.collection.trim()});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.method) {\n\t\t\tif (this.method.includes(',')) {\n\t\t\t\tlet methods = this.method.split(',').map(a => a.trim()).filter(a => !a.startsWith('!'));\n\t\t\t\tif (methods.length) {\n\t\t\t\t\tquery.$and.push({method: {$in: methods}});\n\t\t\t\t}\n\n\t\t\t\tlet notMethods = this.method.split(',').map(a => a.trim()).filter(a => a.startsWith('!'));\n\t\t\t\tnotMethods.forEach(not => {\n\t\t\t\t\tquery.$and.push({method: {$ne: not.replace('!', '')}});\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (this.method.startsWith('!')) {\n\t\t\t\t\tquery.$and.push({method: {$ne: this.method.replace('!', '').trim()}});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tquery.$and.push({method: this.method.trim()});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.route) {\n\t\t\tif (this.route.includes(',')) {\n\t\t\t\tlet routes = this.route.split(',').map(a => a.trim()).filter(a => !a.startsWith('!'));\n\t\t\t\tif (routes.length) {\n\t\t\t\t\tquery.$and.push({route: {$in: routes}});\n\t\t\t\t}\n\n\t\t\t\tlet notRoutes = this.route.split(',').map(a => a.trim()).filter(a => a.startsWith('!'));\n\t\t\t\tnotRoutes.forEach(not => {\n\t\t\t\t\tquery.$and.push({route: {$ne: not.replace('!', '')}});\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (this.route.startsWith('!')) {\n\t\t\t\t\tquery.$and.push({route: {$ne: this.route.replace('!', '').trim()}});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tquery.$and.push({route: this.route.trim()});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (this.id_document) {\n\t\t\tif (this.id_document.includes(',')) {\n\t\t\t\tlet id_documents = this.id_document.split(',').map(a => a.trim()).filter(a => !a.startsWith('!'));\n\t\t\t\tif (id_documents.length) {\n\t\t\t\t\tquery.$and.push({id_document: {$in: id_documents}});\n\t\t\t\t}\n\n\t\t\t\tlet notIds = this.id_document.split(',').map(a => a.trim()).filter(a => a.startsWith('!'));\n\t\t\t\tnotIds.forEach(not => {\n\t\t\t\t\tquery.$and.push({id_document: {$ne: not.replace('!', '')}});\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (this.id_document.startsWith('!')) {\n\t\t\t\t\tquery.$and.push({id_document: {$ne: this.id_document.replace('!', '').trim()}});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tquery.$and.push({id_document: this.id_document.trim()});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.user) {\n\t\t\tquery.$and.push({user: this.user});\n\t\t}\n\n\t\tif (typeof(this.entries_per_page) === 'string') {\n\t\t\tthis.entries_per_page = parseInt(this.entries_per_page);\n\t\t}\n\t\t\n\t\tthis._services._socket.call('findWithOptions', 'logs', query, {sort: {createdAt: -1}, limit: this.entries_per_page, skip: this.entries_per_page * (this.page_num - 1)}, (err, res) => {\n\t\t\tthis.logs = res;\n\n\t\t\tthis._cd.detectChanges();\n\t\t});\n\n\t\tthis._services._socket.call('countCollectionWithQuery', 'logs', query, (err, res) => {\n\t\t\tthis.log_cnt = res;\n\n\t\t\tthis._cd.detectChanges();\n\t\t});\n\n\t\tthis._cd.detectChanges();\n\t}\n\n\tselectType(type: string) {\n\t\tif (type !== 'all') {\n\t\t\tif (this.selectedTypes.includes(type)) {\n\t\t\t\tthis.selectedTypes.splice(this.selectedTypes.indexOf(type), 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.selectedTypes.push(type);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (this.selectedTypes.length === 7) {\n\t\t\t\tthis.selectedTypes = [];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.selectedTypes = ['error', 'document', 'query', 'queryResponse', 'client-request', 'client-response', 'callMethodInternal'];\n\t\t\t}\n\t\t}\n\n\t\tthis.logs = [];\n\n\t\tif (this.selectedTypes.length) {\n\t\t\tthis.getLogData();\n\t\t}\n\t}\n\n\ticon(type) {\n\t\tif (type === 'error') {\n\t\t\treturn 'danger';\n\t\t}\n\t\telse if (type === 'document') {\n\t\t\treturn 'info';\n\t\t}\n\t\telse if (type === 'client-response') {\n\t\t\treturn 'success';\n\t\t}\n\t\telse if (type === 'client-request') {\n\t\t\treturn 'primary';\n\t\t}\n\t\telse {\n\t\t\treturn 'secondary';\n\t\t}\n\t}\n\n\tremoveAllLogs() {\n\t\tthis._ds.confirm('Are you sure you want to delete all logs?').then(() => {\n\t\t\tthis._services._socket.call('removeAllDocuments', 'logs');\n\t\t}, () => { });\n\t}\n}\n","<style>\n\t.label-accordion {\n\t\tfont-weight: bold;\n\t\tcolor: black;\n\t\tmargin-bottom: 0px;\n\t}\n\tngb-accordion {\n\t\twidth: 100%;\n\t}\n\t.hoverThis:hover {\n\t\tbackground: lightblue;\n\t\tcursor: pointer;\n\t}\n\t\n\t.fa-plus {\n\t\tcolor: black;\n\t}\n\t.fa-minus {\n\t\tcolor: black;\n\t}\n\t\n\t.selected {\n\t\tbackground-color: orange;\n\t}\n\t.selected:hover {\n\t\tcursor: pointer;\n\t}\n\t.card {\n\t\twidth: 100%;\n\t}\n</style>\n\n<div class=\"row\">\n\t<div class=\"col-lg-12\">\n\t\t<div class=\"card\">\n\t\t\t<div class=\"card-header\"><b>Filters</b></div>\n\t\t\t<div class=\"card-body\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t\t\t<responsive-button-group collapseSize=\"900\">\n\t\t\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', selectedTypes.includes('error') && selectedTypes.includes('document') && selectedTypes.includes('query') && selectedTypes.includes('client-request') && selectedTypes.includes('client-response') ? 'btn-success' : 'btn-warning']\" (click)=\"selectType('all')\">All</button>\n\t\t\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', selectedTypes.includes('error') ? 'btn-success' : 'btn-warning']\" (click)=\"selectType('error')\">Errors</button>\n\t\t\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', selectedTypes.includes('document') ? 'btn-success' : 'btn-warning']\" (click)=\"selectType('document')\">Document</button>\n\t\t\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', selectedTypes.includes('query') ? 'btn-success' : 'btn-warning']\" (click)=\"selectType('query')\">Query</button>\n\t\t\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', selectedTypes.includes('queryResponse') ? 'btn-success' : 'btn-warning']\" (click)=\"selectType('queryResponse')\">Query Response</button>\n\t\t\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', selectedTypes.includes('client-request') ? 'btn-success' : 'btn-warning']\" (click)=\"selectType('client-request')\">Client Requests</button>\n\t\t\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', selectedTypes.includes('client-response') ? 'btn-success' : 'btn-warning']\" (click)=\"selectType('client-response')\">Client Responses</button>\n\t\t\t\t\t\t\t<button type=\"button\" [ngClass]=\"['btn', selectedTypes.includes('callMethodInternal') ? 'btn-success' : 'btn-warning']\" (click)=\"selectType('callMethodInternal')\">Call Method Internal</button>\n\t\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-danger\" (click)=\"removeAllLogs()\">REMOVE ALL LOGS</button>\n\t\t\t\t\t\t</responsive-button-group>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"row\" style=\"margin-top: 10px;\">\n\t\t\t\t\t<div class=\"col-lg-2\">\n\t\t\t\t\t\t<label class=\"form-control-label\">User</label>\n\t\t\t\t\t\t<ng-select [(ngModel)]=\"user\" (change)=\"getLogData()\" placeholder=\"Select User\">\n\t\t\t\t\t\t\t<ng-option *ngFor=\"let user of users\" [value]=\"user.fullname\">{{user.fullname}}</ng-option>\n\t\t\t\t\t\t</ng-select>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"col-lg-2\">\n\t\t\t\t\t\t<label class=\"form-control-label\">Collection</label>\n\t\t\t\t\t\t<input class=\"form-control\" [(ngModel)]=\"collection\" (change)=\"getLogData()\" placeholder=\"Input Colls Sep By , & ! for !Not\">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"col-lg-2\">\n\t\t\t\t\t\t<label class=\"form-control-label\">Method</label>\n\t\t\t\t\t\t<input class=\"form-control\" [(ngModel)]=\"method\" (change)=\"getLogData()\" placeholder=\"Input Methods Sep By , & ! for !Not\">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"col-lg-2\">\n\t\t\t\t\t\t<label class=\"form-control-label\">Route</label>\n\t\t\t\t\t\t<input class=\"form-control\" [(ngModel)]=\"route\" (change)=\"getLogData()\" placeholder=\"Input Routes Sep By , & ! for !Not\">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"col-lg-2\">\n\t\t\t\t\t\t<label class=\"form-control-label\">Document</label>\n\t\t\t\t\t\t<input class=\"form-control\" [(ngModel)]=\"id_document\" (change)=\"getLogData()\" placeholder=\"Input Ids Sep By , & ! for !Not\">\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"row\" style=\"margin-top: 10px;\">\n\t\t\t\t\t<div class=\"col-lg-3\">\n\t\t\t\t\t\t<label class=\"form-control-label\">Date Start</label>\n\t\t\t\t\t\t<div class=\"input-group\">\n\t\t\t\t\t\t\t<input class=\"form-control\" [(ngModel)]=\"dateStartElem\" ngbDatepicker #dStart=\"ngbDatepicker\" (change)=\"getLogData()\">\n\t\t\t\t\t\t\t<div class=\"input-group-append\" (click)=\"dStart.toggle()\">\n\t\t\t\t\t\t\t\t<div class=\"input-group-text\">\n\t\t\t\t\t\t\t\t\t<i class=\"fa fa-calendar\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"col-lg-3\">\n\t\t\t\t\t\t<label class=\"form-control-label\">Time Start</label>\n\t\t\t\t\t\t<ngb-timepicker [(ngModel)]=\"timeStartElem\" meridian=\"ON\" [seconds]=\"true\" (change)=\"getLogData()\"></ngb-timepicker>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"col-lg-3\">\n\t\t\t\t\t\t<label class=\"form-control-label\">Date End</label>\n\t\t\t\t\t\t<div class=\"input-group\">\n\t\t\t\t\t\t\t<input class=\"form-control\" [(ngModel)]=\"dateEndElem\" ngbDatepicker #dEnd=\"ngbDatepicker\" (change)=\"getLogData()\">\n\t\t\t\t\t\t\t<div class=\"input-group-append\" (click)=\"dEnd.toggle()\">\n\t\t\t\t\t\t\t\t<div class=\"input-group-text\">\n\t\t\t\t\t\t\t\t\t<i class=\"fa fa-calendar\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"col-lg-3\">\n\t\t\t\t\t\t<label class=\"form-control-label\">Time End</label><br>\n\t\t\t\t\t\t<ngb-timepicker [(ngModel)]=\"timeEndElem\" meridian=\"ON\" [seconds]=\"true\" (change)=\"getLogData()\"></ngb-timepicker>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n<div class=\"row\">\n\t<div class=\"col-lg-8\">\n\t\t<label class=\"form-control-label\">Entries Per Page</label>\n\t\t<select class=\"form-control\" [(ngModel)]=\"entries_per_page\" (change)=\"getLogData()\">\n\t\t\t<option value=\"10\">10</option>\n\t\t\t<option value=\"25\">25</option>\n\t\t\t<option value=\"50\">50</option>\n\t\t\t<option value=\"100\">100</option>\n\t\t\t<option value=\"250\">250</option>\n\t\t\t<option value=\"500\">500</option>\n\t\t\t<option value=\"1000\">1000</option>\n\t\t\t<option value=\"5000\">5000</option>\n\t\t</select>\n\t</div>\n\t<div class=\"col-lg-4\">\n\t\t<ngb-pagination class=\"float-right\"\n\t\tboundaryLinks=\"true\"\n\t\t[collectionSize]=\"log_cnt\"\n\t\tdirectionLinks=\"true\"\n\t\tellipses=\"false\"\n\t\t[(page)]=\"page_num\"\n\t\tmaxSize=\"6\"\n\t\t[pageSize]=\"entries_per_page\"\n\t\trotate=\"true\"\n\t\t(pageChange)=\"getLogData()\"\n\t\t>\n\t\t</ngb-pagination>\n\t</div>\n</div>\n<div class=\"row\" style=\"margin-top: 10px\">\n\t<ngb-accordion #acc=\"ngbAccordion\" activeIds=\"\">\n\t\t<ngb-panel *ngFor=\"let log of logs; let i = index\" [id]=\"'log_' + i\">\n\t\t\t<ng-template ngbPanelTitle>\n\t\t\t\t<div> \n\t\t\t\t\t<label class=\"label-accordion\" style=\"width: 90%; height: 22px\">\n\t\t\t\t\t\t<strong class=\"pull-left\">Type: {{ log.type }}{{log.method ? ' - Method: ' + log.method : '' }}{{log.collection ? ' - Collection: ' + log.collection : '' }}{{log.user ? ' - User: ' + log.user : '' }}{{log.route ? ' - Route: ' + log.route : '' }}{{log.id_document ? ' - id_document: ' + log.id_document : '' }}{{log.messageId ? ' - messageId: ' + log.messageId : '' }}</strong>\n\t\t\t\t\t\t<p class=\"pull-right\">{{ log.createdAt | date : 'medium' }}</p>\n\t\t\t\t\t</label>\n\t\t\t\t\t<i *ngIf=\"!acc.activeIds.includes('log_' + i)\" class=\"fa fa-plus pull-right\" aria-hidden=\"true\"></i>\n\t\t\t\t\t<i *ngIf=\"acc.activeIds.includes('log_' + i)\" class=\"fa fa-minus pull-right\" aria-hidden=\"true\"></i>\n\t\t\t\t</div>\n\t\t\t</ng-template>\n\t\t\t<ng-template ngbPanelContent>\n\t\t\t\t<div *ngIf=\"log.payload\">\n\t\t\t\t\t<pre>{{ log.payload | jsonParse }}</pre>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf=\"!log.payload\">\n\t\t\t\t\tNo Data\n\t\t\t\t</div>\n\t\t\t</ng-template>\n\t\t</ngb-panel>\n\t</ngb-accordion>\n</div>\n<div class=\"row\" style=\"margin-top: 10px\">\n\t<div class=\"col-lg-4\">\n\t\t<div class=\"row\"> \n\t\t\t<div class=\"col-lg-8\">\n\t\t\t\t<label class=\"form-control-label\">Entries Per Page</label>\n\t\t\t\t<select class=\"form-control\" [(ngModel)]=\"entries_per_page\" (change)=\"getLogData()\">\n\t\t\t\t\t<option value=\"10\">10</option>\n\t\t\t\t\t<option value=\"25\">25</option>\n\t\t\t\t\t<option value=\"50\">50</option>\n\t\t\t\t\t<option value=\"100\">100</option>\n\t\t\t\t\t<option value=\"250\">250</option>\n\t\t\t\t\t<option value=\"500\">500</option>\n\t\t\t\t\t<option value=\"1000\">1000</option>\n\t\t\t\t\t<option value=\"5000\">5000</option>\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class=\"col-lg-8\">\n\t\t<ngb-pagination class=\"float-right\"\n\t\tboundaryLinks=\"true\"\n\t\t[collectionSize]=\"log_cnt\"\n\t\tdirectionLinks=\"true\"\n\t\tellipses=\"false\"\n\t\t[(page)]=\"page_num\"\n\t\tmaxSize=\"6\"\n\t\t[pageSize]=\"entries_per_page\"\n\t\trotate=\"true\"\n\t\t(pageChange)=\"getLogData()\"\n\t\t>\n\t\t</ngb-pagination>\n\t</div>\n</div>","import { AccountManagerService } from '../account-manager.service';\nimport { Injectable } from '@angular/core';\nimport { CanActivate, Router, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\nimport { AuthService } from './auth.service';\nimport { DialogService } from '../widgets/dialog/dialog.service';\nimport { OfflineManagerService } from '../offline-manager.service';\nimport { dateReviver } from '../util/common.helper';\nimport { CoreService } from '../core.service';\nimport { AuthPermissionService } from './auth-permissions.service';\nimport { AlertService } from '../widgets/alert/alert.service';\n\n@Injectable()\nexport class AuthGuard implements CanActivate {\n\n\tredirectUrl: string;\n\n\tconstructor(private _router: Router, \n\t\t\t\tprivate _auth: AuthService, \n\t\t\t\tprivate _ds: DialogService,\n\t\t\t\tprivate _account: AccountManagerService,\n\t\t\t\tprivate _app: CoreService,\n\t\t\t\tprivate _offline: OfflineManagerService,\n\t\t\t\tprivate _aps: AuthPermissionService,\n\t\t\t\tprivate _alert: AlertService) \n\t{}\n\t\n\tcanActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean>|boolean {\n\t\treturn new Promise((resolve) => {\n\t\t\tthis._account.isInitCompleted().then(() => {\n\t\t\t\tlet user = this._account.getUser();\n\n\t\t\t\tif (!user) {\n\t\t\t\t\tuser = JSON.parse(this._offline.getUser(), dateReviver);\n\t\t\t\t\tif (user) {\n\t\t\t\t\t\tthis._account.setUser(user);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!user) {\n\t\t\t\t\tif (navigator.onLine) {\n\t\t\t\t\t\tthis._auth.loginUser().then(newUser => {\n\t\t\t\t\t\t\tthis._account.isLoginCompleted().then(() => {\n\t\t\t\t\t\t\t\tuser = this._account.getUser();\n\n\t\t\t\t\t\t\t\tif (!user.active) {\n\t\t\t\t\t\t\t\t\tthis._router.navigateByUrl('/home');\n\t\t\t\t\t\t\t\t\tresolve(false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tlet view = state.url.replace(/^(\\/[-a-z]+\\/[^\\/]+)\\/.*$/, '$1').replace(/\\?.+/, '');\n\t\t\t\t\t\t\t\t\tlet moduleView = view.replace(/^(\\/.*\\/).*/, '$1');\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ((<any>user.roles).super_admin) {\n\t\t\t\t\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (!(<any>user.roles).groups.filter(a => a.views.filter(b => b.startsWith(view)).length).length) {\n\t\t\t\t\t\t\t\t\t\tif ((<any>user.roles).groups.filter(a => a.views.filter(b => b.startsWith(moduleView) && !this.doesLinkHaveParameter(b)).length).length) {\n\t\t\t\t\t\t\t\t\t\t\tlet link = (<any>user.roles).groups.filter(a => a.views.filter(b => b.startsWith(moduleView) && !this.doesLinkHaveParameter(b)).length)[0].views.filter(a => a.startsWith(moduleView) && !this.doesLinkHaveParameter(a))[0];\n\t\t\t\t\t\t\t\t\t\t\tthis._router.navigateByUrl(link);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tthis._router.navigateByUrl('/home');\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tresolve(false);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}, () => {\n\t\t\t\t\t\t\tthis._router.navigateByUrl('/home');\n\t\t\t\t\t\t\tresolve(false);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (!user.active) {\n\t\t\t\t\t\tthis._router.navigateByUrl('/home');\n\t\t\t\t\t\tresolve(false);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlet view = state.url.replace(/^(\\/[-a-z]+\\/[^\\/]+)\\/.*$/, '$1').replace(/\\?.+/, '');\n\t\t\t\t\t\tlet moduleView = view.replace(/^(\\/.*\\/).*/, '$1');\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ((<any>user.roles).super_admin) {\n\t\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (!(<any>user.roles).groups.filter(a => a.views.filter(b => b.startsWith(view)).length).length) {\n\t\t\t\t\t\t\tif ((<any>user.roles).groups.filter(a => a.views.filter(b => b.startsWith(moduleView) && !this.doesLinkHaveParameter(b)).length).length) {\n\t\t\t\t\t\t\t\tlet link = (<any>user.roles).groups.filter(a => a.views.filter(b => b.startsWith(moduleView) && !this.doesLinkHaveParameter(b)).length)[0].views.filter(a => a.startsWith(moduleView) && !this.doesLinkHaveParameter(a))[0];\n\t\t\t\t\t\t\t\tthis._router.navigateByUrl(link);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tthis._router.navigateByUrl('/home');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tresolve(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, () => {});\n\t\t});\n\t}\n\n\tdoesLinkHaveParameter(link: string) {\n\t\tlet permissions = this._aps.getAllModulePermissions();\n\n\t\tfor (let i = 0; i < permissions.length; i++) {\n\t\t\tlet permission = permissions[i];\n\t\t\tfor (let j = 0; j < permission.views.length; j++) {\n\t\t\t\tlet view = permission.views[j];\n\n\t\t\t\tif (view.link === link) {\n\t\t\t\t\tif (view.has_parameter) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n}","import { Injectable } from '@angular/core';\nimport { CanDeactivate } from '@angular/router';\nimport { Observable } from 'rxjs';\n\nexport interface CanComponentDeactivate {\n\tcanDeactivate: () => Observable<boolean> | Promise<boolean> | boolean;\n}\n\n@Injectable()\nexport class CanDeactivateGuard implements CanDeactivate<CanComponentDeactivate> {\n\n\tcanDeactivate(component: CanComponentDeactivate) {\n\t\treturn component.canDeactivate ? component.canDeactivate() : true;\n\t}\n}\n","import { Injectable } from '@angular/core';\n\nfunction getWindow (): any {\n\treturn window;\n}\n\n@Injectable()\nexport class WindowRefService {\n\tget nativeWindow(): any {\n\t\treturn getWindow();\n\t}\n}\n","import { Component, Input } from '@angular/core';\n\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\n\n@Component({\n\tproviders: [ProviderService],\n\tselector: 'user-role',\n\ttemplate: '<ng-container *ngIf=\"userInRole()\"><ng-content></ng-content></ng-container>'\n})\n\nexport class UserRoleComponent extends BaseComponent { \n\t@Input() role: string;\n\n\tconstructor(private _services: ProviderService) {\n\t\tsuper(_services);\n\t}\n\n\tuserInRole() {\n\t\treturn this._services._account.isUserInView(this.role);\n\t}\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { UserRoleComponent } from './user-role.component';\t\t\t\n\n@NgModule({\n\timports: [\n\t\tCommonModule\n\t],\n\texports: [\n\t\tUserRoleComponent\n\t],\n\tdeclarations: [\n\t\tUserRoleComponent\n\t]\n})\nexport class UserRoleModule { }\n","import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common'; \n\nimport { FormButtonComponent } from './form-button.component';\t\t\t\n\n@NgModule({\n\timports: [\n\t\tCommonModule,\n\t\tNgbTooltipModule\n\t],\n\texports: [\n\t\tFormButtonComponent\n\t],\n\tdeclarations: [\n\t\tFormButtonComponent\n\t]\n})\nexport class FormButtonModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ResponsiveButtonGroupComponent } from './responsive-button-group.component';\n\n@NgModule({\n\timports: [\n\t\tCommonModule\n\t],\n\tdeclarations: [\n\t\tResponsiveButtonGroupComponent\n\t],\n\texports: [\n\t\tResponsiveButtonGroupComponent\n\t]\n})\nexport class ResponsiveButtonGroupModule { }\n","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\t\nimport { CommonModule } from '@angular/common';\n\nimport { CollapseTableComponent } from './collapse-table.component';\t\n\nimport { ResizeService } from '../../util/window-resize.service';\n\n@NgModule({\n\timports: [\n\t\tFormsModule,\n\t\tCommonModule\n\t],\n\texports: [\n\t\tCollapseTableComponent\n\t],\n\tdeclarations: [\n\t\tCollapseTableComponent\n\t],\n\tproviders: [\n\t\tResizeService\n\t]\n})\nexport class CollapseTableModule { }\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'phone'\n})\nexport class PhonePipe implements PipeTransform { \n\ttransform(tel: string): string {\n\n\t\tif (!tel) {\n\t\t\treturn '';\n\t\t}\n\n\t\tlet country, city, number;\n\n\t\ttel = tel.replace(new RegExp('-', 'g'), '');\n\t\ttel = tel.replace(new RegExp(' ', 'g'), '');\n\t\ttel = tel.replace('(', '');\n\t\ttel = tel.replace(')', '');\n\n\t\tswitch (tel.length) {\n\t\t\tcase 10: // +1PPP####### -> C (PPP) ###-####\n\t\t\t\tcountry = 1;\n\t\t\t\tcity = tel.slice(0, 3);\n\t\t\t\tnumber = tel.slice(3);\n\t\t\t\tbreak;\n\n\t\t\tcase 11: // +CPPP####### -> CCC (PP) ###-####\n\t\t\t\tcountry = tel[0];\n\t\t\t\tcity = tel.slice(1, 4);\n\t\t\t\tnumber = tel.slice(4);\n\t\t\t\tbreak;\n\n\t\t\tcase 12: // +CCCPP####### -> CCC (PP) ###-####\n\t\t\t\tcountry = tel.slice(0, 3);\n\t\t\t\tcity = tel.slice(3, 5);\n\t\t\t\tnumber = tel.slice(5);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\treturn tel;\n\t\t}\n\n\t\tif (country === 1) {\n\t\t\tcountry = '';\n\t\t}\n\n\t\tnumber = number.slice(0, 3) + '-' + number.slice(3);\n\n\t\treturn (country + ' (' + city + ') ' + number).trim();\n\t}\n}\n","import { Pipe } from '@angular/core';\n\n// tslint:disable-next-line:use-pipe-transform-interface\n@Pipe({\n\tname: 'reverse'\n})\nexport class ReversePipe { \n\ttransform(value) {\n\t\treturn value.slice(0).reverse();\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'minusCurrency'\n})\nexport class MinusCurrencyPipe implements PipeTransform { \n\ttransform(value: any, args?: any): any {\n\t\treturn value.charAt(0) === '-' ? '(' + value.substring(1, value.length) + ')' : value;\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml, SafeStyle, SafeScript, SafeUrl, SafeResourceUrl } from '@angular/platform-browser';\n\n@Pipe({\n\tname: 'safe'\n})\nexport class DomSanitizorPipe implements PipeTransform {\n\tconstructor(private _sanitizer: DomSanitizer) {}\n\n\ttransform(value: string, type: string = 'html'): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl {\n\t\tswitch (type) {\n\t\t\tcase 'html': return this._sanitizer.bypassSecurityTrustHtml(value);\n\t\t\tcase 'style': return this._sanitizer.bypassSecurityTrustStyle(value);\n\t\t\tcase 'script': return this._sanitizer.bypassSecurityTrustScript(value);\n\t\t\tcase 'url': return this._sanitizer.bypassSecurityTrustUrl(value);\n\t\t\tcase 'resourceUrl': return this._sanitizer.bypassSecurityTrustResourceUrl(value);\n\t\t\tdefault: throw new Error(`Invalid safe type specified: ${type}`);\n\t\t}\n\t}\n\n}","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'titleCase',\n\tpure: false\n})\nexport class TitleCaseAndUnderscorePipe implements PipeTransform { \n\ttransform(value: string): string { \n\t\tlet str = value.replace('_', ' ');\n\t\t\n\t\tlet strArray = str.toLowerCase().split(' ');\n\t\tfor (let i = 0; i < strArray.length; i++) {\n\t\t\tstrArray[i] = strArray[i].charAt(0).toUpperCase() + strArray[i].slice(1); \n\t\t}\n\t\treturn strArray.join(' ');\n\t}\n}","import { NgModule } from '@angular/core';\nimport { FilterEqualPipe, FilterNotEqualPipe } from './filter.pipe';\nimport { PhonePipe } from './phone.pipe';\nimport { ReversePipe } from './reverse-list.pipe';\nimport { MinusCurrencyPipe } from './minus-currency.pipe';\nimport { DomSanitizorPipe } from './domsanitizor.pipe';\nimport { TitleCaseAndUnderscorePipe } from './titlecase.pipe';\nimport { JsonParsePipe } from './json-parse.pipe';\n\n@NgModule({\n\tdeclarations: [\n\t\tFilterEqualPipe,\n\t\tFilterNotEqualPipe,\n\t\tPhonePipe,\n\t\tReversePipe,\n\t\tMinusCurrencyPipe,\n\t\tDomSanitizorPipe,\n\t\tTitleCaseAndUnderscorePipe,\n\t\tJsonParsePipe\n\t],\n\texports: [ \n\t\tFilterEqualPipe,\n\t\tFilterNotEqualPipe,\n\t\tPhonePipe,\n\t\tReversePipe,\n\t\tMinusCurrencyPipe,\n\t\tDomSanitizorPipe,\n\t\tTitleCaseAndUnderscorePipe,\n\t\tJsonParsePipe\n\t]\n})\nexport class PipeModule { }\n","import { Directive, Input, Output, EventEmitter, ElementRef, Renderer2, HostBinding } from '@angular/core';\nimport { Subject, BehaviorSubject, Observable } from 'rxjs';\n\nexport type SortDirectionType = 1 | 0 | -1;\n\nexport interface Sortable {\n\t/** The id of the column being sorted. */\n\tid: string;\n \n\t/** Starting sort direction. */\n\tstart: SortDirectionType;\n\n\tdisabled: boolean;\n }\n \n /** The current sort state. */\n export interface Sort {\n\t/** The id of the column being sorted. */\n\tactive: string;\n \n\t/** The sort direction. */\n\tdirection: SortDirectionType;\n }\n\n@Directive({\n\tselector : '[sortable]'\n})\nexport class SortTableDirective {\n\tsortables = new Map<string, Sortable>();\n\n\t/** Used to notify any child components listening to state changes. */\n\tpublic readonly _stateChanges = new Subject<void>();\n\n\t/** The id of the most recently sorted Sortable. */\n\t@Input('sortActive') active: string;\n\t@Input('sortStart') start: SortDirectionType = 1;\n\t@Input('sortDisabled') disabled = false;\n\t\n\t@Input() tableFixed = false;\n\t@Input() headerFixed = false;\n\t@Input() secondaryColor = false;\n\t@Input() tertiaryColor = false;\n\n\n\tget direction(): SortDirectionType { return this._direction; }\n\tset direction(direction: SortDirectionType) {\n\t if (direction && direction !== -1 && direction !== 1) {\n\t\tthrow Error(direction + ' is not a valid sort direction (0 or 1).');\n\t }\n\t this._direction = direction;\n\t}\n\tprivate _direction: SortDirectionType = 0;\n\n\tprivate _data = new BehaviorSubject([]);\n\n\t@Output('sortChange') readonly sortChange: EventEmitter<Sort> = new EventEmitter<Sort>();\n\n\t// @HostBinding('class') elementClass = '';\n\n\tconstructor(private element: ElementRef) {\n\t\t// if (this.secondaryColor) {\n\t\t// \tthis.elementClass = 'collapseTable-sec';\n\t\t// }\n\t\t// else if (this.tertiaryColor) {\n\t\t// \tthis.elementClass = 'collapseTable-tert';\n\t\t// }\n\t\t// else {\n\t\t// \tthis.elementClass = 'collapseTable';\n\t\t// }\n\t}\n\n\tregister(sortable: Sortable): void {\n\t\tif (!sortable.id) {\n\t\t \tthrow Error('CTSortHeader must be provided with a unique id');\n\t\t}\n\t\n\t\tif (this.sortables.has(sortable.id)) {\n\t\t\tthrow Error('Cannot have two CTSortables with the same id ' + sortable.id);\n\t\t}\n\n\t\t// console.log('Register', sortable);\n\t\tthis.sortables.set(sortable.id, sortable);\n\t}\n\t\n\tderegister(sortable: Sortable): void {\n\t\t// console.log('Unregister', sortable);\n\t\tthis.sortables.delete(sortable.id);\n\t}\n\n\tsort(sortable: Sortable): void {\n\t\tif (this.active != sortable.id) {\n\t\t\tthis.active = sortable.id;\n\t\t\tthis.direction = sortable.start ? sortable.start : this.start;\n\t\t} \n\t\telse {\n\t\t\tthis.direction *= -1;\n\t\t}\n\t\n\t\tthis.sortChange.emit({active: this.active, direction: this.direction});\n\n\t\tif (this._data.value.length) {\n\t\t\tlet value = null;\n\t\t\t\n\t\t\tfor (let i = 0; i < this._data.value.length; i++) {\n\t\t\t\tif (sortable.id.split('.').reduce((o, i) => o[i], this._data.value[i])) {\n\t\t\t\t\tvalue = sortable.id.split('.').reduce((o, i) => o[i], this._data.value[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value !== null && value !== undefined) {\n\n if (typeof(value) === 'string') {\n\t\t\t\t\tlet digitRegex = new RegExp(/^[\\d.,$]+$/);\n\t\t\t\t\tif (!this._data.value.filter(a => sortable.id.split('.').reduce((o, i) => o[i], a)).some(a => !digitRegex.test(sortable.id.split('.').reduce((o, i) => o[i], a)))) {\n\t\t\t\t\t\tif (this.direction === 1) {\n\t\t\t\t\t\t\tthis._data.next(this._data.value.sort((a, b) => ((sortable.id.split('.').reduce((o, i) => o[i], a) !== null ? parseFloat((sortable.id.split('.').reduce((o, i) => o[i], a).replace(/\\$/g, '').replace(',', ''))) : 999999999999)) - ((sortable.id.split('.').reduce((o, i) => o[i], b) !== null ? parseFloat((sortable.id.split('.').reduce((o, i) => o[i], b)).replace(/\\$/g, '').replace(',', '')) : 999999999999))));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis._data.next(this._data.value.sort((a, b) => (sortable.id.split('.').reduce((o, i) => o[i], b) !== null ? parseFloat((sortable.id.split('.').reduce((o, i) => o[i], b)).replace(/\\$/g, '').replace(',', '')) : -999999999999) - (sortable.id.split('.').reduce((o, i) => o[i], a) !== null ? parseFloat((sortable.id.split('.').reduce((o, i) => o[i], a)).replace(/\\$/g, '').replace(',', '')) : -999999999999)));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (this.direction === 1) {\n\t\t\t\t\t\t\tthis._data.next(this._data.value.sort((a, b) => (sortable.id.split('.').reduce((o, i) => o[i], a) || 'zzzzzz').localeCompare(sortable.id.split('.').reduce((o, i) => o[i], b) || 'zzzzzz')));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis._data.next(this._data.value.sort((a, b) => (sortable.id.split('.').reduce((o, i) => o[i], b) || 'AAAAAAA').localeCompare(sortable.id.split('.').reduce((o, i) => o[i], a) || 'AAAAAAA')));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n }\n else if (typeof(value) === 'number') {\n if (this.direction === 1) {\n this._data.next(this._data.value.sort((a, b) => ((sortable.id.split('.').reduce((o, i) => o[i], a) !== null ? sortable.id.split('.').reduce((o, i) => o[i], a) : 999999999999)) - ((sortable.id.split('.').reduce((o, i) => o[i], b) !== null ? sortable.id.split('.').reduce((o, i) => o[i], b) : 999999999999))));\n }\n else {\n this._data.next(this._data.value.sort((a, b) => (sortable.id.split('.').reduce((o, i) => o[i], b) !== null ? sortable.id.split('.').reduce((o, i) => o[i], b) : -999999999999) - (sortable.id.split('.').reduce((o, i) => o[i], a) !== null ? sortable.id.split('.').reduce((o, i) => o[i], a) : -999999999999)));\n }\n }\n else if (value instanceof Date) {\n if (this.direction === 1) {\n this._data.next(this._data.value.sort((a, b) => (sortable.id.split('.').reduce((o, i) => o[i], a) ? sortable.id.split('.').reduce((o, i) => o[i], a).getTime() : 0) - (sortable.id.split('.').reduce((o, i) => o[i], b) ? sortable.id.split('.').reduce((o, i) => o[i], b).getTime() : 0)));\n }\n else {\n this._data.next(this._data.value.sort((a, b) => (sortable.id.split('.').reduce((o, i) => o[i], b) ? sortable.id.split('.').reduce((o, i) => o[i], b).getTime() : 0) - (sortable.id.split('.').reduce((o, i) => o[i], a) ? sortable.id.split('.').reduce((o, i) => o[i], a).getTime() : 0)));\n }\n\t\t\t\t}\n\t\t\t\telse if (typeof(value) === 'boolean') {\n\t\t\t\t\tthis._data.next(this._data.value.sort((a, b) => {\n if (sortable.id.split('.').reduce((o, i) => o[i], a) === sortable.id.split('.').reduce((o, i) => o[i], b)) {\n return 0;\n }\n else if (sortable.id.split('.').reduce((o, i) => o[i], a)) {\n if (this.direction === 1) {\n return -1;\n }\n\n return 1;\n }\n else {\n if (this.direction === 1) {\n return 1;\n }\n\n return -1;\n }\n }));\n }\n\t\t\t\telse {\n\t\t\t\t\tthis._data.next(this._data.value.sort((a, b) => sortable.id.split('.').reduce((o, i) => o[i], a) === sortable.id.split('.').reduce((o, i) => o[i], b) ? 0 : (sortable.id.split('.').reduce((o, i) => o[i], a) > sortable.id.split('.').reduce((o, i) => o[i], b) ? -1 : 1)));\n\t\t\t\t}\n }\n\t\t}\n\t}\n\n\tgetData(): Observable<any[]> {\n\t\treturn this._data.asObservable();\n\t}\n\t\n\tsetData(data) {\n\t\tthis._data.next(data);\n\t}\n\n\tngOnInit() {\n\t\t// this._markInitialized();\n\n\t\t// console.log('test');\n\n\t\t\n\t}\n\t\n\tngOnChanges() {\n\t\tthis._stateChanges.next();\n\t}\n\n\tngOnDestroy() {\n\t\tthis._stateChanges.complete();\n\t}\n}","import { Component, ViewEncapsulation, ChangeDetectionStrategy, OnDestroy, OnInit, Input, ChangeDetectorRef, Optional } from '@angular/core';\nimport { Sortable, SortDirectionType, SortTableDirective } from './sort-table.directive';\nimport { merge, Subscription } from 'rxjs';\n\n@Component({\n\tselector: '[sort-table-header]',\n\ttemplateUrl: './sort-table-header.component.html',\n\t// host: {\n\t// '(click)': '_handleClick()',\n\t// '(mouseenter)': '_setIndicatorHintVisible(true)',\n\t// '(longpress)': '_setIndicatorHintVisible(true)',\n\t// '(mouseleave)': '_setIndicatorHintVisible(false)',\n\t// '[attr.aria-sort]': '_getAriaSortAttribute()',\n\t// '[class.mat-sort-header-disabled]': '_isDisabled()',\n\t// },\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tinputs: ['disabled'],\n\t// animations: [\n\t// matSortAnimations.indicator,\n\t// matSortAnimations.leftPointer,\n\t// matSortAnimations.rightPointer,\n\t// matSortAnimations.arrowOpacity,\n\t// matSortAnimations.arrowPosition,\n\t// matSortAnimations.allowChildren,\n\t// ]\n})\nexport class SortTableHeaderComponent implements Sortable, OnDestroy, OnInit {\n\t_arrowDirection: SortDirectionType = 0;\n\t@Input('sort-table-header') id: string;\n\t@Input() arrowPosition: 'before' | 'after' = 'after';\n\t@Input() start: SortDirectionType;\n\t_rerenderSubscription: Subscription;\n\t@Input() disabled: boolean;\n\n\tconstructor(changeDetectorRef: ChangeDetectorRef, @Optional() public _sort: SortTableDirective) {\n\n\t\tif (!_sort) {\n\t\t\tthrow Error(`SortTableSortHeader must be placed within a parent element with the CTSortable directive.`);\n\t\t}\n\n\t\tthis._rerenderSubscription = merge(_sort.sortChange, _sort._stateChanges).subscribe(() => {\n\t\t\tif (this._isSorted()) {\n\t\t\t\tthis._updateArrowDirection();\n\t\t\t}\n\n\t\t\tchangeDetectorRef.markForCheck();\n\t\t});\n\t}\n\n\tngOnInit() {\n\t\t// console.log('Init Sort Header');\n\t\tthis._sort.register(this);\n\t}\n\n\tngOnDestroy() {\n\t\tthis._sort.deregister(this);\n\t\tthis._rerenderSubscription.unsubscribe();\n\t}\n\n\t_isSorted() {\n\t\treturn this._sort.active === this.id;\n\t}\n\n\t_getSortDirection() {\n\t\treturn this._sort.direction;\n\t}\n\n\t_updateArrowDirection() {\n\t\tthis._arrowDirection = this._isSorted() ? this._sort.direction : (this.start || this._sort.start);\n\t}\n\n\t_isDisabled() {\n\t\treturn this._sort.disabled || this.disabled;\n\t}\n\n\tonClick(event) {\n\t\t// console.log('Clicked on', this.id, event);\n\t\t\n\t\tif (this._isDisabled()) { return; }\n\n\t\tthis._sort.sort(this);\n\t}\n}","<div (click)=\"onClick($event)\">\n <ng-content></ng-content>\n <i *ngIf=\"_isSorted() && _getSortDirection() === -1\" class=\"fa fa-arrow-down\" style=\"margin-left: 10px; font-size: 14px\"></i>\n <i *ngIf=\"_isSorted() && _getSortDirection() === 1\" class=\"fa fa-arrow-up\" style=\"margin-left: 10px; font-size: 14px\"></i>\n</div>","import { Component, Input, Optional, OnChanges, OnInit, Output, EventEmitter, OnDestroy } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { SortTableDirective } from './sort-table.directive';\n\n@Component({\n\tselector: '[sort-table-ngfor]',\n\ttemplate: '<ng-content></ng-content>'\n})\nexport class SortTableNgForComponent implements OnInit, OnChanges, OnDestroy {\n\t@Input('sort-table-ngfor') data = [];\n\t@Output() dataChanged = new EventEmitter<any[]>();\n\n\tsortSub$: Subscription = null;\n\tsortedData = [];\n\n\tconstructor(@Optional() public _sort: SortTableDirective) {\n\t\t// console.log('NgFor Const');\n\t\tif (!_sort) {\n\t\t\tthrow Error(`SortTableNgFor must be placed within a parent element with the CTSortable directive.`);\n\t\t}\n\t}\n\n\tngOnInit() {\n\t\tthis.sortSub$ = this._sort.getData().subscribe(data => {\n\t\t\tthis.sortedData = data;\n\t\t\tthis.dataChanged.emit(this.sortedData);\n\n\t\t\t// console.log('Sorted Data', this.sortedData);\n\t\t});\n\t}\n\n\tngOnChanges() {\n\t\t// console.log('NgFor Changed', this.data);\n\t\tthis._sort.setData(this.data);\n\t}\n\n\tngOnDestroy() {\n\t\tthis.sortSub$.unsubscribe();\n\t}\n}","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\t\nimport { CommonModule } from '@angular/common';\nimport { SortTableDirective } from './sort-table.directive';\nimport { SortTableHeaderComponent } from './sort-table-header.component';\nimport { SortTableNgForComponent } from './sort-table-ngfor.component';\n\n@NgModule({\n\timports: [\n\t\tFormsModule,\n\t\tCommonModule\n\t],\n\texports: [\n\t\tSortTableDirective,\n\t\tSortTableHeaderComponent,\n\t\tSortTableNgForComponent\n\t],\n\tdeclarations: [\n\t\tSortTableDirective,\n\t\tSortTableHeaderComponent,\n\t\tSortTableNgForComponent\n\t]\n})\nexport class SortTableModule { }\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { UserRoleModule } from '../widgets/user-role/user-role.module';\nimport { FormButtonModule } from '../widgets/form-button/form-button.module';\nimport { ResponsiveButtonGroupModule } from '../widgets/responsive-button-group/responsive-button-group.module';\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\nimport { NgbModule } from '@ng-bootstrap/ng-bootstrap';\nimport { CollapseTableModule } from '../widgets/collapse-table/collapse-table.module';\nimport { PipeModule } from '../pipes/pipe.module';\n\nimport { NgSelectModule } from '@ng-select/ng-select';\nimport { SortTableModule } from '../widgets/sort-table/sort-table.module';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n\timports: [\n\t\tReactiveFormsModule,\n\t\tFormsModule,\n\t\tCollapseTableModule,\n\t\tRouterModule,\n\t\tNgbModule,\n\t\tFormButtonModule,\n\t\tResponsiveButtonGroupModule,\n\t\tPipeModule,\n\t\tUserRoleModule,\n\t\tNgSelectModule,\n\t\tSortTableModule,\n\t\tCommonModule\n\t],\n\texports: [\n\t\tReactiveFormsModule,\n\t\tFormsModule,\n\t\tCollapseTableModule,\n\t\tRouterModule,\n\t\tNgbModule,\n\t\tFormButtonModule,\n\t\tResponsiveButtonGroupModule,\n\t\tPipeModule,\n\t\tUserRoleModule,\n\t\tNgSelectModule,\n\t\tSortTableModule,\n\t\tCommonModule\n\t]\n})\nexport class SharedModule { }\n","import { BaseComponent } from '../resolveio-class';\nimport { Component, OnInit, OnDestroy } from '@angular/core';\nimport { FormGroup, Validators } from '@angular/forms';\nimport { ActivatedRoute } from '@angular/router';\n\nimport { Subscription } from 'rxjs';\nimport { UserModel } from '../models/user.model';\nimport { ProviderService } from '../resolveio-class';\nimport { DialogService } from '../widgets/dialog/dialog.service';\nimport { HttpClient } from '@angular/common/http';\n\n@Component({\n\ttemplateUrl: './forgot-password.component.html',\n\tproviders: [ProviderService]\n})\nexport class ForgotPasswordComponent extends BaseComponent implements OnInit, OnDestroy {\n\t\n\tserverURL = '';\n\n\tform: FormGroup;\n\tuser: UserModel;\n\tsubscription$: Subscription[] = [];\n\ttoken: string;\n\tdisableFormButton = false;\n\t\n\tconstructor(private _route: ActivatedRoute, private _services: ProviderService, private _http: HttpClient, private _ds: DialogService) {\n\t\tsuper(_services);\n\t}\n\t\n\tngOnInit() {\n\n\t\tif (this._route.snapshot.queryParamMap.keys.length !== 2) {\n\t\t\tthis._ds.error('Invalid params');\n\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t}\n\t\telse {\n\t\t\tthis.serverURL = this._route.snapshot.queryParamMap.keys[0];\n\t\t\tthis.token = this._route.snapshot.queryParamMap.keys[1];\n\t\t}\n\n\t\tthis.form = this._services._fb.group({\n\t\t\tpassword: ['', [Validators.compose([Validators.required, Validators.minLength(6)])]],\n\t\t\tconfirm_password: ['', [Validators.compose([Validators.required, Validators.minLength(6)])]]\n\t\t}, {validator: this._services._vs.matchPassword});\n\n\t\tthis._http.post(this.serverURL + '/userWithForgotPasswordToken', {forgotPasswordToken: this.token}).toPromise().then((res: any) => {\n\t\t\tif (res.error) {\n\t\t\t\tthis._ds.error('Invalid token');\n\t\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.user = res.result.user;\n\t\t\t}\n\t\t}, err => {\n\t\t\tthis._ds.error('Invalid token');\n\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis.subscription$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\t}\n\n\tsubmit() {\n\n\t\tthis.disableFormButton = true;\n\n\t\tthis._http.post(this.serverURL + '/setUserWithForgotPasswordToken', {forgotPasswordToken: this.token, password: this.form.value.password}).toPromise().then((res: any) => {\n\t\t\tif (res.error) {\n\t\t\t\tthis._ds.error('Could not update user');\n\t\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._services._alert.setAlert('success', 'User has been updated, please log in');\n\t\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t\t}\n\t\t}, err => {\n\t\t\tthis._ds.error('Invalid token');\n\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t});\n\n\t\tthis._services._router.navigateByUrl('/home');\t\n\t}\n}","<style>\n input {\n width: 100%;\n }\n</style>\n\n<div *ngIf=\"user\">\n\t<h4>Welcome to ResolveIO.<br><br>Your username will be {{user.username}}. Please create a password for your account.</h4>\n\t<form [formGroup]=\"form\" novalidate (ngSubmit)=\"submit()\">\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<label class=\"form-control-label\">Password</label>\n\t\t\t\t\t<em *ngIf=\"form.controls.password.hasError('required')\">- Required</em>\n\t\t\t\t\t<em *ngIf=\"form.controls.password.hasError('minlength') || form.hasError('matchPassword')\">- Invalid</em>\n\t\t\t\t\t<input type=\"text\" [ngClass]=\"['form-control', (form.controls.password.valid && form.valid) ? 'is-valid' : 'is-invalid']\" formControlName=\"password\" type=\"password\">\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"form.controls.password.hasError('required')\">Password is required</div>\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"form.controls.password.hasError('minlength')\">Password must be 6 or more characters</div>\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"!form.controls.password.hasError('minlength') && form.hasError('matchPassword')\" align=\"start\">Passwords do not match</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<label class=\"form-control-label\">Confirm Password</label>\n\t\t\t\t\t<em *ngIf=\"form.controls.confirm_password.hasError('required')\">- Required</em>\n\t\t\t\t\t<em *ngIf=\"form.hasError('matchPassword')\">- Invalid</em>\n\t\t\t\t\t<input type=\"text\" [ngClass]=\"['form-control', form.controls.confirm_password.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"confirm_password\" type=\"password\">\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"form.controls.confirm_password.hasError('required')\">Password is required</div>\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"form.hasError('matchPassword')\" align=\"start\">Passwords do not match</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"row\" style=\"margin-top: 30px;\">\n\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t<form-button [form]=\"form\" [disabled]=\"disableFormButton\"></form-button>\n\t\t\t</div>\n\t\t</div>\n\t</form>\n</div>","import { BaseComponent } from '../resolveio-class';\nimport { Component, OnInit, OnDestroy } from '@angular/core';\nimport { FormGroup, Validators } from '@angular/forms';\nimport { ActivatedRoute } from '@angular/router';\n\nimport { Subscription } from 'rxjs';\nimport { UserModel } from '../models/user.model';\nimport { ProviderService } from '../resolveio-class';\nimport { DialogService } from '../widgets/dialog/dialog.service';\nimport { HttpClient } from '@angular/common/http';\n\n@Component({\n\ttemplateUrl: './enroll.component.html',\n\tproviders: [ProviderService]\n})\nexport class EnrollComponent extends BaseComponent implements OnInit, OnDestroy {\n\n\tserverURL = '';\n\n\tform: FormGroup;\n\tuser: UserModel;\n\tsubscription$: Subscription[] = [];\n\ttoken: string;\n\tdisableFormButton = false;\n\t\n\tconstructor(private _route: ActivatedRoute, private _services: ProviderService, private _http: HttpClient, private _ds: DialogService) {\n\t\tsuper(_services);\n\t}\n\t\n\tngOnInit() {\n\t\tif (this._route.snapshot.queryParamMap.keys.length !== 2) {\n\t\t\tthis._ds.error('Invalid params');\n\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t}\n\t\telse {\n\t\t\tthis.serverURL = this._route.snapshot.queryParamMap.keys[0];\n\t\t\tthis.token = this._route.snapshot.queryParamMap.keys[1];\n\t\t}\n\n\t\tthis.form = this._services._fb.group({\n\t\t\tpassword: ['', [Validators.compose([Validators.required, Validators.minLength(6)])]],\n\t\t\tconfirm_password: ['', [Validators.compose([Validators.required, Validators.minLength(6)])]]\n\t\t}, {validator: this._services._vs.matchPassword});\n\n\t\tthis._http.post(this.serverURL + '/userWithEnrollmentToken', {enrollmentToken: this.token}).toPromise().then((res: any) => {\n\t\t\tif (res.error) {\n\t\t\t\tthis._ds.error('Invalid token');\n\t\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.user = res.result.user;\n\t\t\t}\n\t\t}, err => {\n\t\t\tthis._ds.error('Invalid token');\n\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis.subscription$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\t}\n\n\tsubmit() {\n\n\t\tthis.disableFormButton = true;\n\n\t\tthis._http.post(this.serverURL + '/setUserWithEnrollmentToken', {enrollmentToken: this.token, password: this.form.value.password}).toPromise().then((res: any) => {\n\n\t\t\tif (res.error) {\n\t\t\t\tthis._ds.error('Could not update user');\n\t\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._services._alert.setAlert('success', 'User has been updated, please log in');\n\t\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t\t}\n\t\t}, err => {\n\t\t\tthis._ds.error('Invalid token');\n\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t});\t\n\t}\n}","<style>\n input {\n width: 100%;\n }\n</style>\n\n<div *ngIf=\"user\">\n\t<h4>Welcome to ResolveIO.<br><br>Your username will be {{user.username}}. Please create a password for your account.</h4>\n\t<form [formGroup]=\"form\" novalidate (ngSubmit)=\"submit()\">\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<label class=\"form-control-label\">Password</label>\n\t\t\t\t\t<em *ngIf=\"form.controls.password.hasError('required')\">- Required</em>\n\t\t\t\t\t<em *ngIf=\"form.controls.password.hasError('minlength') || form.hasError('matchPassword')\">- Invalid</em>\n\t\t\t\t\t<input type=\"text\" [ngClass]=\"['form-control', form.controls.password.valid && !form.hasError('matchPassword') ? 'is-valid' : 'is-invalid']\" formControlName=\"password\" type=\"password\">\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"form.controls.password.hasError('required')\">Password is required</div>\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"form.controls.password.hasError('minlength')\">Password must be 6 or more characters</div>\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"!form.controls.password.hasError('minlength') && form.hasError('matchPassword')\" align=\"start\">Passwords do not match</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<label class=\"form-control-label\">Confirm Password</label>\n\t\t\t\t\t<em *ngIf=\"form.controls.confirm_password.hasError('required')\">- Required</em>\n\t\t\t\t\t<em *ngIf=\"form.hasError('matchPassword')\">- Invalid</em>\n\t\t\t\t\t<input type=\"text\" [ngClass]=\"['form-control', form.controls.confirm_password.valid && !form.hasError('matchPassword') ? 'is-valid' : 'is-invalid']\" formControlName=\"confirm_password\" type=\"password\">\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"form.controls.confirm_password.hasError('required')\">Password is required</div>\n\t\t\t\t\t<div class=\"invalid-feedback\" *ngIf=\"form.hasError('matchPassword')\" align=\"start\">Passwords do not match</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"row\" style=\"margin-top: 30px;\">\n\t\t\t<div class=\"col-lg-12\">\n\t\t\t\t<form-button [form]=\"form\" [disabled]=\"disableFormButton\"></form-button>\n\t\t\t</div>\n\t\t</div>\n\t</form>\n</div>","import { BaseComponent } from '../resolveio-class';\nimport { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { ProviderService } from '../resolveio-class';\nimport { DialogService } from '../widgets/dialog/dialog.service';\nimport { HttpClient } from '@angular/common/http';\nimport { SocketManagerService } from '../socket-manager.service';\nimport { CoreService } from '../core.service';\n\n@Component({\n\tproviders: [ProviderService],\n\ttemplate: '<router-outlet></router-outlet>'\n})\nexport class Auth365Component extends BaseComponent {\n\ttoken: string;\n\t\n\tconstructor(private _app: CoreService, private _route: ActivatedRoute, private _services: ProviderService, private _http: HttpClient, private _ds: DialogService, private _socket: SocketManagerService) {\n\t\tsuper(_services);\n\n\t\tif (this._app.environment.value.MS_id_token) {\n\t\t\tthis._services._account.logIn365(this._app.environment.value.MS_id_token).then(() => {\n\t\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t\t}, () => {});\n\t\t}\n\t\telse {\n\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t}\n\t}\n}","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable()\nexport class UserSettingsService {\n\n\tselectedUser = new BehaviorSubject('0');\n\n\tconstructor() {}\n\n\tsetSelectedUser(id: string) {\n\t\tthis.selectedUser.next(id);\n\t}\n}\n","import { ModulePermissionModel } from '../models/permission.model';\n\nexport const UserSettingsModulePermission: ModulePermissionModel = {\n\tname: 'user-settings',\n\tviews: [\n\t\t{link: '/user-settings/settings', label: 'Settings', has_parameter: false}\n\t],\n\tapproval: {\n\t\ttype: 'user-settings'\n\t}\n};\n","import { Component, OnInit, OnDestroy } from '@angular/core';\nimport { NavbarModel } from '../widgets/navbar-module/navbar-module.model';\nimport { UserSettingsService } from './user-settings.service';\nimport { Subscription } from 'rxjs';\nimport { UserSettingsModulePermission } from './user-settings.permission';\nimport { ProviderService, BaseComponent } from '../resolveio-class';\nimport { UserModel } from '../models/user.model';\n\n@Component({\n\tproviders: [ProviderService],\n\ttemplate: '<router-outlet></router-outlet>'\n})\n\nexport class UserSettingsComponent extends BaseComponent implements OnInit, OnDestroy { \n\tselectedUserSettings$: Subscription;\n\n\tmenuData: NavbarModel;\n\t\n\tconstructor(private _us: UserSettingsService, private _services: ProviderService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis.selectedUserSettings$ = this._us.selectedUser.subscribe(\n\t\t\tval => this.selectedUserSettingsChanged(val)\n\t\t);\n\t}\n\n\tngOnDestroy() {\n\t\tthis._us.setSelectedUser('0');\n\n\t\tthis.selectedUserSettings$.unsubscribe();\n\t}\n\n\tselectedUserSettingsChanged(id: string) {\n\t\tthis.setUserSettingsMenuData();\n\t}\n\n\tsetUserSettingsMenuData(id?: string, user?: UserModel) {\n\t\tlet tabs = [];\n\n\t\tUserSettingsModulePermission.views.forEach(view => {\n\t\t\tif (this._services._account.isUserInView(view.link) || this._services._account.isUserSuperAdmin()) {\n\t\t\t\tswitch (view.link) {\n\t\t\t\t\tcase '/user-settings/settings': \n\t\t\t\t\t\ttabs.push({link: '/user-settings/settings', params: null, label: 'Settings'});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tthis.menuData = {\n\t\t\ttitle: 'User Settings',\n\t\t\tmodule: 'User Settings',\n\t\t\tdescription_name: 'User: ',\n\t\t\tdescription: user ? user.fullname : '',\n\t\t\ttabs: tabs\n\t\t};\n\n\t\tthis._services._app.setNavbarModuleData(this.menuData);\n\t}\n}\n","import { Component, OnInit, OnDestroy } from '@angular/core';\nimport { UserSettingsService } from '../user-settings.service';\nimport { Subscription } from 'rxjs';\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\nimport { AuthPermissionService } from '../../auth/auth-permissions.service';\nimport { DialogService } from '../../widgets/dialog/dialog.service';\nimport { FormGroup, Validators } from '@angular/forms';\nimport { UserModel } from '../../models/user.model';\nimport { toTitleCase } from '../../util/common.helper';\n\n@Component({\n\tproviders: [ProviderService],\n\ttemplateUrl: './users-settings.component.html'\n})\nexport class UsersSettingsComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\tsubscription$: Subscription[] = [];\n\n\tform: FormGroup;\n\n\tdisableFormButton = false;\n\tuser: UserModel;\n\tclient = '';\n\tviews = [];\n\n\thasSubmit = false;\n\n\tconstructor(private _aps: AuthPermissionService, private _us: UserSettingsService, private _services: ProviderService, private _ds: DialogService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis._us.setSelectedUser('0');\n\n\t\tthis.client = this._services._app.client.getValue();\n\n\t\tthis.form = this._services._fb.group({\n\t\t\ttable_color: ['#3b3ee3', [Validators.required]],\n\t\t\ttable_font_color: ['#ffffff', [Validators.required]],\n\t\t\tfont_size: [12, [Validators.required, this._services._vs.wholeNumbersGreaterThanZero, this._services._vs.maxValue(18), this._services._vs.minValue(8)]],\n\t\t\tsecondary_table_color: ['#87ceeb', [Validators.required]],\n\t\t\tsecondary_table_font_color: ['#000000', [Validators.required]],\n\t\t\ttertiary_table_color: ['#ff4500', [Validators.required]],\n\t\t\ttertiary_table_font_color: ['#000000', [Validators.required]],\n\t\t\tcollapsable_menu: [true],\n\t\t\tentries_per_page: ['25', [Validators.required]],\n\t\t\twarning_color: ['#ffc107', [Validators.required]],\n\t\t\twarning_font_color: ['#000000', [Validators.required]],\n\t\t\twarning_hover_color: ['#e0a800', [Validators.required]],\n\t\t\tsuccess_color: ['#28a745', [Validators.required]],\n\t\t\tsuccess_font_color: ['#ffffff', [Validators.required]],\n\t\t\tsuccess_hover_color: ['#218838', [Validators.required]],\n\t\t\tdanger_color: ['#dc3545', [Validators.required]],\n\t\t\tdanger_font_color: ['#ffffff', [Validators.required]],\n\t\t\tdanger_hover_color: ['#c82333', [Validators.required]],\n\t\t\tinfo_color: ['#17a2b8', [Validators.required]],\n\t\t\tinfo_font_color: ['#ffffff', [Validators.required]],\n\t\t\tinfo_hover_color: ['#138496', [Validators.required]],\n\t\t\tprimary_color: ['#007bff', [Validators.required]],\n\t\t\tprimary_font_color: ['#ffffff', [Validators.required]],\n\t\t\tprimary_hover_color: ['#0069d9', [Validators.required]],\n\t\t\tsecondary_color: ['#868e96', [Validators.required]],\n\t\t\tsecondary_font_color: ['#ffffff', [Validators.required]],\n\t\t\tsecondary_hover_color: ['#5a6268', [Validators.required]],\n\t\t\trouting_preference: ['alwaysAsk'],\n\t\t\topening_route: ['/home']\n\t\t});\n\n\t\tif (this._services._account.getUser() && this._services._account.getUser().settings) {\n\t\t\tthis.form.patchValue(this._services._account.getUser().settings);\n\n\t\t\tthis._services._account.getUser().roles.groups.forEach(group => {\n\t\t\t\tgroup.views.forEach(view => {\n\t\t\t\t\tif (!this.views.some(a => a.value === view)) {\n\t\t\t\t\t\tthis.views.push({\n\t\t\t\t\t\t\tvalue: view,\n\t\t\t\t\t\t\tdisplay: toTitleCase(view.replace('/', '').replace(new RegExp('/', 'g'), ' - '))\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tdocument.documentElement.style.setProperty('--primary-table-color', this.form.controls.table_color.value);\n\t\tdocument.documentElement.style.setProperty('--primary-table-font-color', this.form.controls.table_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--font-size', this.form.controls.font_size.value + 'px');\n\t\tdocument.documentElement.style.setProperty('--secondary-table-color', this.form.controls.secondary_table_color.value);\n\t\tdocument.documentElement.style.setProperty('--secondary-table-font-color', this.form.controls.secondary_table_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--tertiary-table-color', this.form.controls.tertiary_table_color.value);\n\t\tdocument.documentElement.style.setProperty('--tertiary-table-font-color', this.form.controls.tertiary_table_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--warning-color', this.form.controls.warning_color.value);\n\t\tdocument.documentElement.style.setProperty('--warning-font-color', this.form.controls.warning_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--warning-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.warning_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--warning-hover-color', this.form.controls.warning_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--success-color', this.form.controls.success_color.value);\n\t\tdocument.documentElement.style.setProperty('--success-font-color', this.form.controls.success_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--success-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.success_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--success-hover-color', this.form.controls.success_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--danger-color', this.form.controls.danger_color.value);\n\t\tdocument.documentElement.style.setProperty('--danger-font-color', this.form.controls.danger_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--danger-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.danger_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--danger-hover-color', this.form.controls.danger_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--info-color', this.form.controls.info_color.value);\n\t\tdocument.documentElement.style.setProperty('--info-font-color', this.form.controls.info_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--info-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.info_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--info-hover-color', this.form.controls.info_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--primary-color', this.form.controls.primary_color.value);\n\t\tdocument.documentElement.style.setProperty('--primary-font-color', this.form.controls.primary_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--primary-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.primary_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--primary-hover-color', this.form.controls.primary_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--secondary-color', this.form.controls.secondary_color.value);\n\t\tdocument.documentElement.style.setProperty('--secondary-font-color', this.form.controls.secondary_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--secondary-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.secondary_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--secondary-hover-color', this.form.controls.secondary_hover_color.value);\n\n\t\tthis.subscription$.push(this._services._account.user.subscribe(user => {\n\t\t\tthis.user = user;\n\t\t}));\n\t}\n\n\tngOnDestroy() {\n\t\tthis.subscription$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\n\t\tif (!this.hasSubmit) {\n\t\t\tthis.submitForm(this.form);\n\t\t}\n\t}\n\n\tchangePrimaryColor() {\n\t\tdocument.documentElement.style.setProperty('--primary-table-color', this.form.controls.table_color.value);\n\t}\n\n\tchangePrimaryFontColor() {\n\t\tdocument.documentElement.style.setProperty('--primary-table-font-color', this.form.controls.table_font_color.value);\n\t}\n\n\tchangePrimaryFontSize() {\n\t\tdocument.documentElement.style.setProperty('--font-size', this.form.controls.font_size.value + 'px');\n\t}\n\n\tchangeSecondaryColor() {\n\t\tdocument.documentElement.style.setProperty('--secondary-table-color', this.form.controls.secondary_table_color.value);\n\t}\n\n\tchangeSecondaryFontColor() {\n\t\tdocument.documentElement.style.setProperty('--secondary-table-font-color', this.form.controls.secondary_table_font_color.value);\n\t}\n\n\tchangeTertiaryColor() {\n\t\tdocument.documentElement.style.setProperty('--tertiary-table-color', this.form.controls.tertiary_table_color.value);\n\t}\n\n\tchangeTertiaryFontColor() {\n\t\tdocument.documentElement.style.setProperty('--tertiary-table-font-color', this.form.controls.tertiary_table_font_color.value);\n\t}\n\n\tchangeWarningColor() {\n\t\tdocument.documentElement.style.setProperty('--warning-color', this.form.controls.warning_color.value);\n\t\tdocument.documentElement.style.setProperty('--warning-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.warning_color.value, .5));\n\t}\n\n\tchangeWarningHoverColor() {\n\t\tdocument.documentElement.style.setProperty('--warning-hover-color', this.form.controls.warning_hover_color.value);\n\t}\n\n\tchangeWarningFontColor() {\n\t\tdocument.documentElement.style.setProperty('--warning-font-color', this.form.controls.warning_font_color.value);\n\t}\n\n\tchangeSuccessColor() {\n\t\tdocument.documentElement.style.setProperty('--success-color', this.form.controls.success_color.value);\n\t\tdocument.documentElement.style.setProperty('--success-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.success_color.value, .5));\n\t}\n\n\tchangeSuccessHoverColor() {\n\t\tdocument.documentElement.style.setProperty('--success-hover-color', this.form.controls.success_hover_color.value);\n\t}\n\n\tchangeSuccessFontColor() {\n\t\tdocument.documentElement.style.setProperty('--success-font-color', this.form.controls.success_font_color.value);\n\t}\n\n\tchangeDangerColor() {\n\t\tdocument.documentElement.style.setProperty('--danger-color', this.form.controls.danger_color.value);\n\t\tdocument.documentElement.style.setProperty('--danger-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.danger_color.value, .5));\n\t}\n\n\tchangeDangerHoverColor() {\n\t\tdocument.documentElement.style.setProperty('--danger-hover-color', this.form.controls.danger_hover_color.value);\n\t}\n\n\tchangeDangerFontColor() {\n\t\tdocument.documentElement.style.setProperty('--danger-font-color', this.form.controls.danger_font_color.value);\n\t}\n\n\tchangeInfoColor() {\n\t\tdocument.documentElement.style.setProperty('--info-color', this.form.controls.info_color.value);\n\t\tdocument.documentElement.style.setProperty('--info-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.info_color.value, .5));\n\t}\n\n\tchangeInfoHoverColor() {\n\t\tdocument.documentElement.style.setProperty('--info-hover-color', this.form.controls.info_hover_color.value);\n\t}\n\n\tchangeInfoFontColor() {\n\t\tdocument.documentElement.style.setProperty('--info-font-color', this.form.controls.info_font_color.value);\n\t}\n\n\tchangePrimaryButtonColor() {\n\t\tdocument.documentElement.style.setProperty('--primary-color', this.form.controls.primary_color.value);\n\t\tdocument.documentElement.style.setProperty('--primary-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.primary_color.value, .5));\n\t}\n\n\tchangePrimaryHoverColor() {\n\t\tdocument.documentElement.style.setProperty('--primary-hover-color', this.form.controls.primary_hover_color.value);\n\t}\n\n\tchangePrimaryButtonFontColor() {\n\t\tdocument.documentElement.style.setProperty('--primary-font-color', this.form.controls.primary_font_color.value);\n\t}\n\n\tchangeSecondaryButtonColor() {\n\t\tdocument.documentElement.style.setProperty('--secondary-color', this.form.controls.secondary_color.value);\n\t\tdocument.documentElement.style.setProperty('--secondary-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.secondary_color.value, .5));\n\t}\n\n\tchangeSecondaryHoverColor() {\n\t\tdocument.documentElement.style.setProperty('--secondary-hover-color', this.form.controls.secondary_hover_color.value);\n\t}\n\n\tchangeSecondaryButtonFontColor() {\n\t\tdocument.documentElement.style.setProperty('--secondary-font-color', this.form.controls.secondary_font_color.value);\n\t}\n\n\treset() {\n\t\tthis.form.controls.table_color.setValue('#3b3ee3');\n\t\tthis.form.controls.table_font_color.setValue('#ffffff');\n\t\tthis.form.controls.font_size.setValue(12);\n\t\tthis.form.controls.secondary_table_color.setValue('#87ceeb');\n\t\tthis.form.controls.secondary_table_font_color.setValue('#000000');\n\t\tthis.form.controls.tertiary_table_color.setValue('#ff4500');\n\t\tthis.form.controls.tertiary_table_font_color.setValue('#000000');\n\t\tthis.form.controls.collapsable_menu.setValue(true);\n\t\tthis.form.controls.entries_per_page.setValue('25');\n\t\tthis.form.controls.warning_color.setValue('#ffc107');\n\t\tthis.form.controls.warning_font_color.setValue('#000000');\n\t\tthis.form.controls.warning_hover_color.setValue('#e0a800');\n\t\tthis.form.controls.success_color.setValue('#28a745');\n\t\tthis.form.controls.success_font_color.setValue('#ffffff');\n\t\tthis.form.controls.success_hover_color.setValue('#218838');\n\t\tthis.form.controls.danger_color.setValue('#dc3545');\n\t\tthis.form.controls.danger_font_color.setValue('#ffffff');\n\t\tthis.form.controls.danger_hover_color.setValue('#c82333');\n\t\tthis.form.controls.info_color.setValue('#17a2b8');\n\t\tthis.form.controls.info_font_color.setValue('#ffffff');\n\t\tthis.form.controls.info_hover_color.setValue('#138496');\n\t\tthis.form.controls.primary_color.setValue('#007bff');\n\t\tthis.form.controls.primary_font_color.setValue('#ffffff');\n\t\tthis.form.controls.primary_hover_color.setValue('#0069d9');\n\t\tthis.form.controls.secondary_color.setValue('#868e96');\n\t\tthis.form.controls.secondary_font_color.setValue('#ffffff');\n\t\tthis.form.controls.secondary_hover_color.setValue('#5a6268');\n\n\t\tdocument.documentElement.style.setProperty('--primary-table-color', this.form.controls.table_color.value);\n\t\tdocument.documentElement.style.setProperty('--primary-table-font-color', this.form.controls.table_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--font-size', this.form.controls.font_size.value + 'px');\n\t\tdocument.documentElement.style.setProperty('--secondary-table-color', this.form.controls.secondary_table_color.value);\n\t\tdocument.documentElement.style.setProperty('--secondary-table-font-color', this.form.controls.secondary_table_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--tertiary-table-color', this.form.controls.tertiary_table_color.value);\n\t\tdocument.documentElement.style.setProperty('--tertiary-table-font-color', this.form.controls.tertiary_table_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--warning-color', this.form.controls.warning_color.value);\n\t\tdocument.documentElement.style.setProperty('--warning-font-color', this.form.controls.warning_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--warning-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.warning_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--warning-hover-color', this.form.controls.warning_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--success-color', this.form.controls.success_color.value);\n\t\tdocument.documentElement.style.setProperty('--success-font-color', this.form.controls.success_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--success-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.success_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--success-hover-color', this.form.controls.success_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--danger-color', this.form.controls.danger_color.value);\n\t\tdocument.documentElement.style.setProperty('--danger-font-color', this.form.controls.danger_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--danger-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.danger_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--danger-hover-color', this.form.controls.danger_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--info-color', this.form.controls.info_color.value);\n\t\tdocument.documentElement.style.setProperty('--info-font-color', this.form.controls.info_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--info-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.info_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--info-hover-color', this.form.controls.info_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--primary-color', this.form.controls.primary_color.value);\n\t\tdocument.documentElement.style.setProperty('--primary-font-color', this.form.controls.primary_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--primary-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.primary_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--primary-hover-color', this.form.controls.primary_hover_color.value);\n\t\tdocument.documentElement.style.setProperty('--secondary-color', this.form.controls.secondary_color.value);\n\t\tdocument.documentElement.style.setProperty('--secondary-font-color', this.form.controls.secondary_font_color.value);\n\t\tdocument.documentElement.style.setProperty('--secondary-shadow-color', '0 0 0 0.2rem ' + hexToRGB(this.form.controls.secondary_color.value, .5));\n\t\tdocument.documentElement.style.setProperty('--secondary-hover-color', this.form.controls.secondary_hover_color.value);\n\t}\n\n\tsubmitForm(form) {\n\t\tthis.hasSubmit = true;\n\n\t\tthis._services._socket.call('updateDocumentProps', 'users', this._services._account.getUser()._id, [\n\t\t\t{prop: 'settings', data: this.form.value}\n\t\t], this._services._account.getUser().__v, (err, res) => {\n\t\t\tif (res) {\n\t\t\t\tthis._services._alert.setAlert('success', 'Settings have been updated');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._ds.error('Could not update settings');\n\t\t\t\tthis._services._socket.call('insertErrorLog', 'user settings - update user', [\n\t\t\t\t\tthis._services._account.getUser(), err\n\t\t\t\t]);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction hexToRGB(hex, alpha) {\n let r = parseInt(hex.slice(1, 3), 16),\n g = parseInt(hex.slice(3, 5), 16),\n b = parseInt(hex.slice(5, 7), 16);\n\n if (alpha) {\n return \"rgba(\" + r + \", \" + g + \", \" + b + \", \" + alpha + \")\";\n } else {\n return \"rgb(\" + r + \", \" + g + \", \" + b + \")\";\n }\n}","<style>\n ::ng-deep :root {\n --primary-table-color: #3b3ee3;\n --primary-table-font-color: #ffffff;\n --font-size: 12px;\n --secondary-table-color: #87ceeb;\n --secondary-table-font-color: #000000;\n --tertiary-table-color: #ff4500;\n --tertiary-table-font-color: #000000;\n --warning-color: #ffc107;\n --warning-font-color: #000000;\n --warning-hover-color: #e0a800;\n --warning-shadow-color: 0 0 0 0.2rem rgba(222, 170, 12, 0.5);\n --success-color: #28a745;\n --success-font-color: #ffffff;\n --success-hover-color: #218838;\n --success-shadow-color: 0 0 0 0.2rem rgba(72, 180, 97, 0.5);\n --danger-color: #dc3545;\n --danger-font-color: #ffffff;\n --danger-hover-color: #c82333;\n --danger-shadow-color: 0 0 0 0.2rem rgba(225, 83, 97, 0.5);\n --info-color: #17a2b8;\n --info-font-color: #ffffff;\n --info-hover-color: #138496;\n --info-shadow-color: 0 0 0 0.2rem rgba(58, 176, 195, 0.5);\n --primary-color: #007bff;\n --primary-font-color: #ffffff;\n --primary-hover-color: #0069d9;\n --primary-shadow-color: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);\n --secondary-color: #868e96;\n --secondary-font-color: #ffffff;\n --secondary-hover-color: #5a6268;\n --secondary-shadow-color: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);\n }\n\n .label-accordion {\n font-weight: bold;\n color: black;\n margin-bottom: 0px;\n }\n\n .fa-plus {\n color: black;\n }\n\n .fa-minus {\n color: black;\n } \n\n .btn-warning {\n color: var(--warning-font-color);\n background-color: var(--warning-color);\n border-color: var(--warning-color);\n }\n .btn-warning:focus, .btn-warning.focus {\n box-shadow: var(--warning-shadow-color);\n }\n .btn-warning:hover {\n color: var(--warning-font-color);\n background-color: var(--warning-hover-color);\n border-color: var(--warning-hover-color);\n }\n\n .btn-success {\n color: var(--success-font-color);\n background-color: var(--success-color);\n border-color: var(--success-color);\n }\n .btn-success:focus, .btn-success.focus {\n box-shadow: var(--success-shadow-color);\n }\n .btn-success:hover {\n color: var(--success-font-color);\n background-color: var(--success-hover-color);\n border-color: var(--success-hover-color);\n }\n\n .btn-danger {\n color: var(--danger-font-color);\n background-color: var(--danger-color);\n border-color: var(--danger-color);\n }\n .btn-danger:focus, .btn-danger.focus {\n box-shadow: var(--danger-shadow-color);\n }\n .btn-danger:hover {\n color: var(--danger-font-color);\n background-color: var(--danger-hover-color);\n border-color: var(--danger-hover-color);\n }\n\n .btn-info {\n color: var(--info-font-color);\n background-color: var(--info-color);\n border-color: var(--info-color);\n }\n .btn-info:focus, .btn-info.focus {\n box-shadow: var(--info-shadow-color);\n }\n .btn-info:hover {\n color: var(--info-font-color);\n background-color: var(--info-hover-color);\n border-color: var(--info-hover-color);\n }\n\n .btn-primary {\n color: var(--primary-font-color);\n background-color: var(--primary-color);\n border-color: var(--primary-color);\n }\n .btn-primary:focus, .btn-primary.focus {\n box-shadow: var(--primary-shadow-color);\n }\n .btn-primary:hover {\n color: var(--primary-font-color);\n background-color: var(--primary-hover-color);\n border-color: var(--primary-hover-color);\n }\n\n .btn-secondary {\n color: var(--secondary-font-color);\n background-color: var(--secondary-color);\n border-color: var(--secondary-color);\n }\n .btn-secondary:focus, .btn-secondary.focus {\n box-shadow: var(--secondary-shadow-color);\n }\n .btn-secondary:hover {\n color: var(--secondary-font-color);\n background-color: var(--secondary-hover-color);\n border-color: var(--secondary-hover-color);\n }\n\n .fa-minus {\n color: black;\n } \n\n :host /deep/ .card .card-body .collapseTable th {\n background-color: var(--primary-table-color);\n color: var(--primary-table-font-color);\n font-size: var(--font-size);\n }\n\n :host /deep/ .card .card-body .collapseTable-sec th {\n background-color: var(--secondary-table-color);\n color: var(--secondary-table-font-color);\n font-size: var(--font-size);\n }\n\n :host /deep/ .card .card-body .collapseTable-tert th {\n background-color: var(--tertiary-table-color);\n color: var(--tertiary-table-font-color);\n font-size: var(--font-size);\n }\n</style>\n\n<div class=\"col-lg-12\">\n <form [formGroup]=\"form\" novalidate (ngSubmit)=\"submitForm(form)\">\n <div class=\"row\">\n <ngb-accordion #acc=\"ngbAccordion\" activeIds=\"miscOptions, tableOptions, buttonOptions\">\n <ngb-panel id=\"miscOptions\">\n <ng-template ngbPanelTitle>\n <div> \n <label class=\"label-accordion\">Misc. Options</label>\n <i *ngIf=\"!acc.activeIds.includes('miscOptions')\" class=\"fa fa-plus pull-right\" aria-hidden=\"true\"></i>\n <i *ngIf=\"acc.activeIds.includes('miscOptions')\" class=\"fa fa-minus pull-right\" aria-hidden=\"true\"></i>\n </div>\n </ng-template>\n <ng-template ngbPanelContent>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <responsive-button-group>\n <button type=\"button\" class=\"btn btn-success\" (click)=\"reset()\">Reset Default Settings</button>\n </responsive-button-group>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-4\">\n\t\t\t\t\t\t\t\t<b>Collapsable Menu</b><br>\n\t\t\t\t\t\t\t\t<div class=\"form-check\">\n\t\t\t\t\t\t\t\t\t<label class=\"form-check-label\">\n\t\t\t\t\t\t\t\t\t\t<input class=\"form-check-input\" type=\"checkbox\" hidden formControlName=\"collapsable_menu\">\n\t\t\t\t\t\t\t\t\t\t<i *ngIf=\"form.controls.collapsable_menu.value\" class=\"fa fa-check\" style=\"color: green; font-size: 24px;\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t\t\t\t<i *ngIf=\"!form.controls.collapsable_menu.value\" class=\"fa fa-times\" style=\"color: red; font-size: 24px;\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Default Entries Per Page</label>\n <em *ngIf=\"!form.controls.entries_per_page.valid\">- Required</em>\n <select [ngClass]=\"['form-control', form.controls.entries_per_page.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"entries_per_page\">\n <option value=\"25\">25</option>\n <option value=\"50\">50</option>\n <option value=\"100\">100</option>\n <option value=\"250\">250</option>\n </select>\n <div class=\"invalid-feedback\" *ngIf=\"!form.controls.entries_per_page.valid\">Entries per page is required</div>\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Font Size (Recommended 11-14)</label>\n <em *ngIf=\"form.controls.font_size.hasError('required')\">- Required</em>\n <em *ngIf=\"form.controls.font_size.hasError('wholeNumbersGreaterThanZero')\">- Invalid</em>\n <em *ngIf=\"form.controls.font_size.hasError('maxValue')\">- Invalid</em>\n <em *ngIf=\"form.controls.font_size.hasError('minValue')\">- Invalid</em>\n <input [ngClass]=\"['form-control', form.controls.font_size.valid ? 'is-valid' : 'is-invalid']\" type=\"number\" formControlName=\"font_size\" (keyup)=\"changePrimaryFontSize()\">\n <div class=\"invalid-feedback\" *ngIf=\"form.controls.font_size.hasError('required')\">Font size is required</div>\n <div class=\"invalid-feedback\" *ngIf=\"form.controls.font_size.hasError('wholeNumbersGreaterThanZero')\">Font size is invalid</div>\n <div class=\"invalid-feedback\" *ngIf=\"form.controls.font_size.hasError('maxValue')\">Font size can not exceed 18</div>\n <div class=\"invalid-feedback\" *ngIf=\"form.controls.font_size.hasError('minValue')\">Font size can not be less than 8</div>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-6\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Starting Page</label>\n <select [ngClass]=\"['form-control', form.controls.opening_route.valid ? 'is-valid' : '']\" formControlName=\"opening_route\">\n <option value=\"/home\">Home</option>\n <option *ngFor=\"let view of views\" [value]=\"view.value\">{{view.display | titleCase}}</option>\n </select>\n </div>\n </div>\n <div class=\"col-lg-6\" *ngIf=\"client === 'Ace Completions'\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Routing Preference</label>\n <select [ngClass]=\"['form-control', form.controls.routing_preference.valid ? 'is-valid' : '']\" formControlName=\"routing_preference\">\n <option value=\"alwaysAsk\">Always Ask</option>\n <option value=\"sameTab\">Same Tab</option>\n <option value=\"newTab\">New Tab</option>\n <option value=\"newWindow\">New Window</option>\n </select>\n </div>\n </div>\n </div>\n </ng-template>\n </ngb-panel>\n <ngb-panel id=\"tableOptions\">\n <ng-template ngbPanelTitle>\n <div> \n <label class=\"label-accordion\">Table Options</label>\n <i *ngIf=\"!acc.activeIds.includes('tableOptions')\" class=\"fa fa-plus pull-right\" aria-hidden=\"true\"></i>\n <i *ngIf=\"acc.activeIds.includes('tableOptions')\" class=\"fa fa-minus pull-right\" aria-hidden=\"true\"></i>\n </div>\n </ng-template>\n <ng-template ngbPanelContent>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <collapse-table> \n <thead>\n <tr>\n <th>\n Primary Table\n </th>\n </tr>\n </thead>\n </collapse-table>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-6\">\n <dl>\n <dt>Primary Table Background:</dt>\n <dd>\n <div class=\"form-group\">\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.table_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"table_color\" (ngModelChange)=\"changePrimaryColor()\">\n </div>\n </dd>\n </dl>\n </div>\n <div class=\"col-lg-6\">\n <dl>\n <dt>Primary Table Font:</dt>\n <dd>\n <div class=\"form-group\">\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.table_font_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"table_font_color\" (ngModelChange)=\"changePrimaryFontColor()\">\n </div>\n </dd>\n </dl>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <collapse-table secondaryColor=\"true\"> \n <thead>\n <tr>\n <th>\n Secondary Table\n </th>\n </tr>\n </thead>\n </collapse-table>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-6\">\n <dl>\n <dt>Secondary Table Background:</dt>\n <dd>\n <div class=\"form-group\">\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.secondary_table_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"secondary_table_color\" (ngModelChange)=\"changeSecondaryColor()\">\n </div>\n </dd>\n </dl>\n </div>\n <br>\n <div class=\"col-lg-6\">\n <dl>\n <dt>Secondary Table Font:</dt>\n <dd>\n <div class=\"form-group\">\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.secondary_table_font_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"secondary_table_font_color\" (ngModelChange)=\"changeSecondaryFontColor()\">\n </div>\n </dd>\n </dl>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <collapse-table tertiaryColor=\"true\"> \n <thead>\n <tr>\n <th>\n Tertiary Table\n </th>\n </tr>\n </thead>\n </collapse-table>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-6\">\n <dl>\n <dt>Tertiary Table Background:</dt>\n <dd>\n <div class=\"form-group\">\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.tertiary_table_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"tertiary_table_color\" (ngModelChange)=\"changeTertiaryColor()\">\n </div>\n </dd>\n </dl>\n </div>\n <div class=\"col-lg-6\">\n <dl>\n <dt>Tertiary Table Font:</dt>\n <dd>\n <div class=\"form-group\">\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.tertiary_table_font_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"tertiary_table_font_color\" (ngModelChange)=\"changeTertiaryFontColor()\">\n </div>\n </dd>\n </dl>\n </div>\n </div>\n </ng-template>\n </ngb-panel>\n <ngb-panel id=\"buttonOptions\">\n <ng-template ngbPanelTitle>\n <div> \n <label class=\"label-accordion\">Button Options</label>\n <i *ngIf=\"!acc.activeIds.includes('buttonOptions')\" class=\"fa fa-plus pull-right\" aria-hidden=\"true\"></i>\n <i *ngIf=\"acc.activeIds.includes('buttonOptions')\" class=\"fa fa-minus pull-right\" aria-hidden=\"true\"></i>\n </div>\n </ng-template>\n <ng-template ngbPanelContent>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <button type=\"button\" class=\"btn btn-success\">Success</button>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Success Button Background:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.success_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"success_color\" (ngModelChange)=\"changeSuccessColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Success Button Font:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.success_font_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"success_font_color\" (ngModelChange)=\"changeSuccessFontColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Success Button Hover:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.success_hover_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"success_hover_color\" (ngModelChange)=\"changeSuccessHoverColor()\">\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <button type=\"button\" class=\"btn btn-warning\">Warning</button>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Warning Button Background:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.warning_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"warning_color\" (ngModelChange)=\"changeWarningColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Warning Button Font:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.warning_font_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"warning_font_color\" (ngModelChange)=\"changeWarningFontColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Warning Button Hover:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.warning_hover_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"warning_hover_color\" (ngModelChange)=\"changeWarningHoverColor()\">\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <button type=\"button\" class=\"btn btn-danger\">Danger</button>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Danger Button Background:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.danger_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"danger_color\" (ngModelChange)=\"changeDangerColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Danger Button Font:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.danger_font_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"danger_font_color\" (ngModelChange)=\"changeDangerFontColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Danger Button Hover:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.danger_hover_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"danger_hover_color\" (ngModelChange)=\"changeDangerHoverColor()\">\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <button type=\"button\" class=\"btn btn-info\">Info</button>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Info Button Background:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.info_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"info_color\" (ngModelChange)=\"changeInfoColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Info Button Font:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.info_font_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"info_font_color\" (ngModelChange)=\"changeInfoFontColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Info Button Hover:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.info_hover_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"info_hover_color\" (ngModelChange)=\"changeInfoHoverColor()\">\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <button type=\"button\" class=\"btn btn-primary\">Primary</button>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Primary Button Background:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.primary_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"primary_color\" (ngModelChange)=\"changePrimaryButtonColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Primary Button Font:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.primary_font_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"primary_font_color\" (ngModelChange)=\"changePrimaryButtonFontColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Primary Button Hover:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.primary_hover_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"primary_hover_color\" (ngModelChange)=\"changePrimaryHoverColor()\">\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <button type=\"button\" class=\"btn btn-secondary\">Secondary</button>\n </div>\n </div>\n <br>\n <div class=\"row\">\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Secondary Button Background:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.secondary_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"secondary_color\" (ngModelChange)=\"changeSecondaryButtonColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Secondary Button Font:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.secondary_font_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"secondary_font_color\" (ngModelChange)=\"changeSecondaryButtonFontColor()\">\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Secondary Button Hover:</label>\n <input type=\"color\" style=\"height: 40px\" [ngClass]=\"['form-control', form.controls.secondary_hover_color.value ? 'is-valid' : 'is-invalid']\" formControlName=\"secondary_hover_color\" (ngModelChange)=\"changeSecondaryHoverColor()\">\n </div>\n </div>\n </div>\n </ng-template>\n </ngb-panel>\n </ngb-accordion>\n </div>\n <div class=\"row\" style=\"padding-top: 15px;\">\n <form-button [form]=\"form\" [disabled]=\"disableFormButton\"></form-button>\n </div>\n </form>\n</div>","\nimport { ModuleWithProviders } from '@angular/core';\nimport { Routes, RouterModule, Route } from '@angular/router';\nimport { UserSettingsComponent } from './user-settings.component';\nimport { UsersSettingsComponent } from './settings/users-settings.component';\n\nconst routes: Routes = [{ \n\tpath: 'user-settings',\n\tcomponent: UserSettingsComponent,\n\tchildren: [\n\t\t{ path: 'settings', component: UsersSettingsComponent },\n\t\t{ path: '**', redirectTo: 'settings' }\n\t]}\n];\n\nexport const UserSettingsRouting: ModuleWithProviders<Route> = RouterModule.forChild(routes);\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { DatatableModel, DatatableColumn } from './data-table.model';\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\n\n@Component({\n\tproviders: [ProviderService],\n\tselector: 'data-table',\n\ttemplateUrl: './data-table.component.html'\n})\n\nexport class DatatableComponent extends BaseComponent { \n\t@Input() urlClick: string;\n\t@Input() columns: Array<DatatableColumn[]>;\n\t@Input() data: any[];\n\t@Input() collapseSize: number;\n\t@Input() searchTitle: string;\n\t@Input() totalItems = 1000;\n\t@Output() onChangeTableData = new EventEmitter<Object>();\n\t@Input() tableData: DatatableModel;\n\n\tconstructor(private _services: ProviderService) {\n\t\tsuper(_services);\n\t}\n\n\tchangeTableData() {\n\t\tthis.onChangeTableData.emit();\n\t}\n\n\tsortColumn(colName) {\n\t\tif (this.tableData.sortColumn === colName) {\n\t\t\tif (this.tableData.sortOrder === 'desc') {\n\t\t\t\tthis.tableData.sortOrder = 'asc';\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.tableData.sortOrder = 'desc';\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.tableData.sortOrder = 'asc';\n\t\t\tthis.tableData.sortColumn = colName;\n\t\t}\n\n\t\tthis.changeTableData();\n\t}\n\n\tnavigateTo(id: string, column: string) {\n\t\tif (column !== 'file_key' && id && this.urlClick) {\n\t\t\tthis._services._router.navigateByUrl(this.urlClick + id);\n\t\t}\n\t}\n\n\topenFile(file_key: string) {\n\t\tthis._services._socket.call('getSignedUrl', file_key, 900, (err, res) => {\n\t\t\tif (res) {\n\t\t\t\twindow.open(res);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._services._socket.call('insertErrorLog', 'Widgets-datatable - getsignedurl', [\n\t\t\t\t\tfile_key, err\n\t\t\t\t]);\n\t\t\t}\n\t\t});\n\t}\n\n\ttypeOf(data) {\n\t\treturn typeof(data);\n\t}\n}\n","<style>\n .orangeRow { \n background-color: orangered;\n }\n\n collapse-table tr:hover {\n background-color: lightblue;\n cursor: pointer;\n }\n\n collapse-table {\n width: 100%;\n }\n</style>\n\n<div class=\"row\">\n <div class=\"input-group\">\n <span class=\"input-group-btn\">\n <button class=\"btn btn-primary\" type=\"button\" (click)=\"changeTableData()\">Search!</button>\n </span>\n <input type=\"text\" class=\"form-control\" placeholder=\"{{searchTitle}}\" [(ngModel)]=\"tableData.searchString\" (keyup.enter)=\"changeTableData()\" style=\"z-index: 0\">\n </div>\n</div>\n<div class=\"row\" style=\"padding-top: 20px;\">\n <collapse-table [collapseSize]=\"collapseSize\" headerFixed=\"true\">\n <thead>\n <tr>\n <th *ngFor=\"let column of columns\" (click)=\"sortColumn(column.data)\" style=\"cursor:pointer\">\n {{column.name}}\n <i *ngIf=\"tableData.sortColumn == column.data && tableData.sortOrder === 'desc'\" class=\"fa fa-caret-down\"></i>\n <i *ngIf=\"tableData.sortColumn == column.data && tableData.sortOrder === 'asc'\" class=\"fa fa-caret-up\"></i>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let item of data\" [ngClass]=\"{'orangeRow': item['color_red']}\">\n <td *ngFor=\"let column of columns\" (click)=\"navigateTo(item['_id'], column.data)\" [attr.data-label]=\"column.name\">\n <span *ngIf=\"typeOf(item[column.data]) !== 'boolean' && column.data !== 'cost' && column.data !== 'wells' && column.data !== 'cost_total' && column.data !== 'price' && column.data !== 'date' && column.data !== 'date_created' && column.data !== 'date_delivered' && column.data !== 'quantity' && column.data !== 'quantity_string' && column.data !== 'min_stock' && column.data !== 'max_stock' && column.data !== 'file_key' && column.data !== 'date_in'\">{{column.subData ? item[column.data][column.subData] : item[column.data]}}</span>\n <span *ngIf=\"column.data === 'cost' || column.data === 'price' || column.data === 'cost_total'\">{{item[column.data] | currency:'USD':'symbol':\"1.2-2\"}}</span>\n <span *ngIf=\"column.data === 'date' || column.data === 'date_created' || column.data === 'date_delivered'\">{{item[column.data] | date:'short'}}</span>\n <span *ngIf=\"column.data === 'quantity' || column.data === 'min_stock' || column.data === 'max_stock'\">{{item[column.data] | number}}</span>\n <span *ngIf=\"column.data === 'quantity_string'\">{{item[column.data] | number}}</span>\n <span *ngIf=\"column.data === 'wells'\"><pre>{{item[column.data]}}</pre></span>\n <span *ngIf=\"column.data === 'file_key'\">\n <button type=\"button\" (click)=\"openFile(item[column.data])\" class=\"btn btn-secondary\">Open File</button>\n <!-- <button type=\"button\" class=\"btn btn-warning\" (click)=\"viewDeletedReason(item)\" *ngIf=\"item.deleted.is_deleted\">View Deleted Reason</button> -->\n </span>\n <span *ngIf=\"typeOf(item[column.data]) === 'boolean'\">\n <i *ngIf=\"item[column.data]\" class=\"fa fa-check\" style=\"color: green; font-size: 18px;\" aria-hidden=\"true\"></i>\n <i *ngIf=\"!item[column.data]\" class=\"fa fa-times\" style=\"color: red; font-size: 18px;\" aria-hidden=\"true\"></i>\n </span>\n </td>\n </tr>\n </tbody>\n </collapse-table> \n</div>\n<hr />\n<div class=\"row\">\n <div class=\"col-lg-4\">\n <div class=\"row\"> \n <div class=\"col-lg-8\">\n <label class=\"form-control-label\">Entries Per Page</label>\n <select class=\"form-control\" [(ngModel)]=\"tableData.entriesPerPage\" (ngModelChange)=\"changeTableData()\">\n <option value=\"25\">25</option>\n <option value=\"50\">50</option>\n <option value=\"100\">100</option>\n <option value=\"250\">250</option>\n </select>\n </div>\n </div>\n </div>\n <div class=\"col-lg-8\" style=\"margin-top: 16px;\">\n <ngb-pagination class=\"float-right\"\n boundaryLinks=\"true\"\n [collectionSize]=\"totalItems\"\n directionLinks=\"true\"\n ellipses=\"false\"\n [(page)]=\"tableData.pageNum\"\n maxSize=\"6\"\n [pageSize]=\"tableData.entriesPerPage\"\n rotate=\"true\"\n (pageChange)=\"changeTableData()\"\n >\n </ngb-pagination>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { NgbModule } from '@ng-bootstrap/ng-bootstrap';\nimport { FormsModule } from '@angular/forms';\t\nimport { CommonModule } from '@angular/common';\n\nimport { RouterModule } from '@angular/router';\n\nimport { CollapseTableModule } from '../collapse-table/collapse-table.module';\n\n\nimport { DatatableComponent } from './data-table.component';\t\t\t\n\n@NgModule({\n\timports: [\n\t\tNgbModule,\n\t\tFormsModule,\n\t\tCommonModule,\n\t\tRouterModule,\n\t\tCollapseTableModule\n\t],\n\texports: [\n\t\tDatatableComponent\n\t],\n\tdeclarations: [\n\t\tDatatableComponent\n\t],\n\tproviders: [ ]\n})\nexport class DatatableModule { }\n","import { Component, Input, Output, OnInit, OnDestroy, EventEmitter, ViewChild } from '@angular/core';\nimport { Validators } from '@angular/forms';\nimport { DialogService } from '../dialog/dialog.service';\nimport { HttpClient } from '@angular/common/http';\nimport { FileModel } from '../../models/file.model';\nimport { BaseComponent, ProviderService } from '../../resolveio-class';\nimport { ResizeService } from '../../util/window-resize.service';\n\n@Component({\n\tselector: 'file-upload',\n\ttemplateUrl: './file-upload.component.html'\n})\nexport class FileUploadComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\tconstructor(private _resize: ResizeService, private _services: ProviderService, private _ds: DialogService, private _http: HttpClient) {\n\t\tsuper(_services);\n\t}\n\n\t@Input() files: FileModel[] = [];\n\t@Input() allowDelete = false;\n\t@Input() allowReplace = false;\n\t@Input() showFileUpload = true;\n\t@Output() filesChanged = new EventEmitter();\n\t@Output() fileAdded = new EventEmitter();\n\t@Output() fileRemoved = new EventEmitter();\n\t@Input() fileType: string; \n\n\t@ViewChild('download_link', {static: true}) download_link;\n\n\tsupportedFileTypes: string[] = ['application/pdf', 'text/plain', 'image/gif', 'image/png', 'image/jpeg', 'image/bmp'];\n\n\tpdfSrc = '';\n\treplaceFileIndex = 0;\n\n\tisUploading = false;\n\tprogressMsg = '';\n\n\twindowSize$;\n\twindowSize = 0;\n\n\tngOnInit() {\n\t\tthis.windowSize$ = this._resize.onResize$.subscribe((val) => {\n\t\t\tif (val) {\n\t\t\t\tthis.windowSize = val.innerWidth;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.windowSize = window.innerWidth;\n\t\t\t}\n\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis.windowSize$.unsubscribe();\n\t}\n\n\tdragFileAccepted(file) {\n\t\tif (this.supportedFileTypes.indexOf(file.type) >= 0) {\n\t\t\tthis.uploadWithEmit(file, 'misc').then(() => {}, (err) => {\n\t\t\t\tthis._ds.error('Could not upload file, incorrect type');\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tthis._ds.error('Invalid format, the supported file types are: ' + this.supportedFileTypes);\n\t\t}\n\t}\n\n\tupload(file: File, type: string, order?: number, fileName?: string, status?: string) {\n\n\t\treturn new Promise ((resolve, reject) => {\n\n\t\t\tthis.progressMsg = 'Uploading ' + (fileName ? fileName : file.name);\n\n\t\t\tthis._services._aws.uploadFile(file, type, order, fileName).then((res: FileModel) => {\n\t\t\t\tconst item = {\n\t\t\t\t\t_id: res._id,\n\t\t\t\t\tname: fileName ? fileName : file.name,\n\t\t\t\t\tsize: file.size, \n\t\t\t\t\tstatus: status ? status : 'Uploaded',\n\t\t\t\t\tkey: res.key,\n\t\t\t\t\torder: order ? order : -1, \n\t\t\t\t\ttype: type\n\t\t\t\t};\n\n\t\t\t\tthis.isUploading = false;\n\n\t\t\t\tthis.files.push(item);\n\n\t\t\t\tthis.files = this.files.sort((a, b) => {\n\t\t\t\t\treturn a.order - b.order;\n\t\t\t\t});\n\n\t\t\t\tresolve(item);\n\t\t\t}, rej => {reject(rej); });\n\n\t\t\tthis.isUploading = true;\n\t\t});\n\t}\n\n\tuploadWithEmit(file: File, type: string, order?: number, fileName?: string, status?: string) {\n\n\t\treturn new Promise ((resolve, reject) => {\n\n\t\t\tthis.progressMsg = 'Uploading ' + (fileName ? fileName : file.name);\n\n\t\t\tthis._services._aws.uploadFile(file, type, order, fileName).then((res: FileModel) => {\n\n\t\t\t\tconst item = {\n\t\t\t\t\t_id: res._id,\n\t\t\t\t\tname: fileName ? fileName : file.name,\n\t\t\t\t\tsize: file.size, \n\t\t\t\t\tstatus: status ? status : 'Uploaded',\n\t\t\t\t\tkey: res.key,\n\t\t\t\t\torder: order ? order : -1, \n\t\t\t\t\ttype: type\n\t\t\t\t};\n\n\t\t\t\tthis.isUploading = false;\n\n\t\t\t\tthis.files = this.files.sort((a, b) => {\n\t\t\t\t\treturn a.order - b.order;\n\t\t\t\t});\n\n\t\t\t\tthis.fileAdded.emit(item);\n\n\t\t\t\tresolve(item);\n\t\t\t}, rej => {reject(rej); });\n\n\t\t\tthis.isUploading = true;\n\t\t});\n\t}\n\n\tdelete(index: number, confirm: boolean = true) {\n\t\tthis.pdfSrc = '';\n\t\tif (confirm) {\n\t\t\tthis._ds.confirm('Are you sure you want to delete this file?').then(yes => {\n\n\t\t\t\tthis._services._aws.deleteFile(this.files[index].key, (err, res) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\tthis._ds.error('Could not delete file');\n\t\t\t\t\t\tthis._services._socket.call('insertErrorLog', 'Widgets.File-Upload - Delete File', [\n\t\t\t\t\t\t\tthis.files[index].key,\n\t\t\t\t\t\t\terr\n\t\t\t\t\t\t]);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tthis.files.splice(index, 1);\n\t\t\t}, cancel => {});\n\t\t}\n\t\telse {\n\t\t\tthis._services._aws.deleteFile(this.files[index].key, (err, res) => {\n\t\t\t\tif (err) {\n\t\t\t\t\tthis._services._socket.call('insertErrorLog', 'Widgets.File-Upload - Delete File', [\n\t\t\t\t\t\tthis.files[index].key,\n\t\t\t\t\t\terr\n\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.files.splice(index, 1);\n\t\t}\n\t}\n\n\tdeleteWithEmit(index: number, confirm: boolean = true) {\n\t\tthis.pdfSrc = '';\n\n\t\tlet file = Object.assign({}, this.files[index]);\n\t\t\n\t\tif (confirm) {\n\t\t\tthis._ds.confirm('Are you sure you want to delete this file?').then(yes => {\n\n\t\t\t\tthis._services._aws.deleteFile(this.files[index].key, (err, res) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\tthis._ds.error('Could not delete file');\n\t\t\t\t\t\tthis._services._socket.call('insertErrorLog', 'Widgets.File-Upload - Delete File', [\n\t\t\t\t\t\t\tthis.files[index].key,\n\t\t\t\t\t\t\terr\n\t\t\t\t\t\t]);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.fileRemoved.emit(file);\n\t\t\t\t});\n\t\t\t}, cancel => {});\n\t\t}\n\t\telse {\n\t\t\tthis._services._aws.deleteFile(this.files[index].key, (err, res) => {\n\t\t\t\tif (err) {\n\t\t\t\t\tthis._services._socket.call('insertErrorLog', 'Widgets.File-Upload - Delete File', [\n\t\t\t\t\t\tthis.files[index].key,\n\t\t\t\t\t\terr\n\t\t\t\t\t]);\n\t\t\t\t}\n\n\t\t\t\tthis.fileRemoved.emit(file);\n\t\t\t});\n\t\t}\n\t}\n\n\tdeleteFileWithId(id: string) {\n\t\tthis.delete(this.files.map(a => a._id).indexOf(id), false);\n\t}\n\n\topen(file) {\n\t\tthis._services._socket.call('getSignedUrl', file.key, 900, (err, res) => {\n\t\t\tif (res) {\n\t\t\t\twindow.open(res);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._services._socket.call('insertErrorLog', 'Widgets-file - getsignedurl', [\n\t\t\t\t\tfile.key, err\n\t\t\t\t]);\n\t\t\t}\n\t\t});\n\t}\n\n\tsetPDFViewerSrc(file) {\n\t\tthis._services._socket.call('getSignedUrl', file.key, 900, (err, res) => {\n\t\t\tif (res) {\n\t\t\t\tthis.pdfSrc = res;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._ds.error('Could not get signed url for file');\n\t\t\t\tthis._services._socket.call('insertErrorLog', 'Widgets-file - getsignedurl pdfviewer', [\n\t\t\t\t\tfile.key, err\n\t\t\t\t]);\n\t\t\t}\n\t\t});\n\t}\n\n\tonFileSelect(data) {\n\t\tthis.uploadWithEmit(data.target.files[0], this.fileType ? this.fileType : 'misc').then(() => {}, () => {});\n\n\t\tdata.srcElement.value = '';\n\t}\n\n\tonFileSelectReplace(data) { // TODO: If BOL file replaced, change BOL id_file\n\t\tif (data.target.files[0]) {\n\t\t\tlet oldFileId = this.files[this.replaceFileIndex]._id;\n\t\t\t\n\t\t\tlet type = this.files[this.replaceFileIndex].type;\n\t\t\tlet order = this.files[this.replaceFileIndex].order;\n\t\t\tlet fileExtension = this.files[this.replaceFileIndex].name.replace(/\\.[^\\.]+$/, '') + '.' + data.target.files[0].name.split('.')[data.target.files[0].name.split('.').length - 1];\n\t\t\tlet status = this.files[this.replaceFileIndex].status;\n\n\t\t\tthis.deleteWithEmit(this.replaceFileIndex, false);\n\n\t\t\tif (status === 'Unsigned') {\n\t\t\t\tthis._ds.confirm('Are you replacing this file with a signed copy?').then(yes => {\n\t\t\t\t\tthis.uploadWithEmit(data.target.files[0], type, order, fileExtension, 'Signed').then(res => {\n\t\t\t\t\t\tlet newFileKey = res['key'];\n\t\t\t\t\t\tlet newFileId = res['_id'];\n\n\t\t\t\t\t\tif (type === 'BOL') {\t\t\t\t\t\t\n\t\t\t\t\t\t\t// MeteorObservable.subscribe('bolWithFileId', oldFileId).first().subscribe(() => {\n\t\t\t\t\t\t\t// \tlet bol = BOLs.findOne({id_file: oldFileId});\n\n\t\t\t\t\t\t\t// \tif (!bol) {\n\t\t\t\t\t\t\t// \t\tthis._zone.run(() => {\n\t\t\t\t\t\t\t// \t\t\tthis._ds.error('Could not find BOL to update file');\n\t\t\t\t\t\t\t// \t\t});\n\t\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t\t// \telse {\n\t\t\t\t\t\t\t// \t\t// bol.id_file = newFileId;\n\t\t\t\t\t\t\t// \t\t// bol.file_key = newFileKey;\n\n\t\t\t\t\t\t\t// \t\t// Meteor.call('updateDocumentProps', 'bols', bol._id, \n\t\t\t\t\t\t\t// \t\t// [\n\t\t\t\t\t\t\t// \t\t// \t{prop: 'id_file', data: bol.id_file},\n\t\t\t\t\t\t\t// \t\t// \t{prop: 'file_key', data: bol.file_key},\n\t\t\t\t\t\t\t// \t\t// \t{prop: 'file_status', data: 'Signed'}\n\t\t\t\t\t\t\t// \t\t// ], 'BOL', (errBOL, resBOL) => {\n\t\t\t\t\t\t\t// \t\t// \tthis._zone.run(() => {\n\t\t\t\t\t\t\t// \t\t// \t\tif (resBOL) {\n\t\t\t\t\t\t\t// \t\t// \t\t\tthis._alert.setAlert('success', 'BOL file has been replaced');\n\t\t\t\t\t\t\t// \t\t// \t\t\tMeteor.call('replaceBOLNotificationJob', bol, (errNot, resNot) => {\n\t\t\t\t\t\t\t// \t\t// \t\t\t\tif (errNot) {\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t\tMeteor.call('insertErrorLog', 'Widgets-file - method replacebolnotification', [\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t\t\tbol, this.job, errNot\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t\t]);\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t}\n\t\t\t\t\t\t\t// \t\t// \t\t\t});\n\t\t\t\t\t\t\t// \t\t// \t\t\tdata.srcElement.value = '';\n\t\t\t\t\t\t\t// \t\t// \t\t}\n\t\t\t\t\t\t\t// \t\t// \t\telse {\n\t\t\t\t\t\t\t// \t\t// \t\t\tthis._ds.error('Could not update BOL file');\n\t\t\t\t\t\t\t// \t\t// \t\t\tMeteor.call('insertErrorLog', 'Widgets-file - update bol', [\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t{prop: 'id_file', data: bol.id_file},\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t{prop: 'file_key', data: bol.file_key},\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t{prop: 'file_status', data: bol.file_status}, \n\t\t\t\t\t\t\t// \t\t// \t\t\t\terrBOL\n\t\t\t\t\t\t\t// \t\t// \t\t\t]);\n\t\t\t\t\t\t\t// \t\t// \t\t\tdata.srcElement.value = '';\n\t\t\t\t\t\t\t// \t\t// \t\t}\n\t\t\t\t\t\t\t// \t\t// \t});\n\t\t\t\t\t\t\t// \t\t// });\n\t\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t\t// });\n\t\t\t\t\t\t}\n\t\t\t\t\t}, err => {});\n\t\t\t\t}, no => {\n\t\t\t\t\tthis.uploadWithEmit(data.target.files[0], type, order, fileExtension).then(res => {\n\t\t\t\t\t\tlet newFileKey = res['key'];\n\t\t\t\t\t\tlet newFileId = res['_id'];\n\n\t\t\t\t\t\tif (type === 'BOL') {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// MeteorObservable.subscribe('bolWithFileId', oldFileId).first().subscribe(() => {\n\t\t\t\t\t\t\t// \tlet bol = BOLs.findOne({id_file: oldFileId});\n\n\t\t\t\t\t\t\t// \tif (!bol) {\n\t\t\t\t\t\t\t// \t\tthis._zone.run(() => {\n\t\t\t\t\t\t\t// \t\t\tthis._ds.error('Could not find BOL to update file');\n\t\t\t\t\t\t\t// \t\t});\n\t\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t\t// \telse {\n\t\t\t\t\t\t\t// \t\t// bol.id_file = newFileId;\n\t\t\t\t\t\t\t// \t\t// bol.file_key = newFileKey;\n\n\t\t\t\t\t\t\t// \t\t// Meteor.call('updateDocumentProps', 'bols', bol._id, \n\t\t\t\t\t\t\t// \t\t// [\n\t\t\t\t\t\t\t// \t\t// \t{prop: 'id_file', data: bol.id_file},\n\t\t\t\t\t\t\t// \t\t// \t{prop: 'file_key', data: bol.file_key}\n\t\t\t\t\t\t\t// \t\t// ], 'BOL', (errUpBOL, resUpBOL) => {\n\t\t\t\t\t\t\t// \t\t// \tthis._zone.run(() => {\n\t\t\t\t\t\t\t// \t\t// \t\tif (resUpBOL) {\n\t\t\t\t\t\t\t// \t\t// \t\t\tthis._alert.setAlert('success', 'BOL file has been replaced');\n\t\t\t\t\t\t\t// \t\t// \t\t\tMeteor.call('replaceBOLNotificationJob', bol, (errNot, resNot) => {\n\t\t\t\t\t\t\t// \t\t// \t\t\t\tif (errNot) {\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t\tMeteor.call('insertErrorLog', 'Widgets-file - method replacebolnotification', [\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t\t\tbol, this.job, errNot\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t\t]);\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t}\n\t\t\t\t\t\t\t// \t\t// \t\t\t});\n\t\t\t\t\t\t\t// \t\t// \t\t\tdata.srcElement.value = '';\n\t\t\t\t\t\t\t// \t\t// \t\t}\n\t\t\t\t\t\t\t// \t\t// \t\telse {\n\t\t\t\t\t\t\t// \t\t// \t\t\tthis._ds.error('Could not update BOL file');\n\t\t\t\t\t\t\t// \t\t// \t\t\tMeteor.call('insertErrorLog', 'Widgets-file - update bol', [\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t{prop: 'id_file', data: bol.id_file},\n\t\t\t\t\t\t\t// \t\t// \t\t\t\t{prop: 'file_key', data: bol.file_key}, errUpBOL\n\t\t\t\t\t\t\t// \t\t// \t\t\t]);\n\t\t\t\t\t\t\t// \t\t// \t\t\tdata.srcElement.value = '';\n\t\t\t\t\t\t\t// \t\t// \t\t}\n\t\t\t\t\t\t\t// \t\t// \t});\n\t\t\t\t\t\t\t// \t\t// });\n\t\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t\t// });\n\t\t\t\t\t\t}\n\t\t\t\t\t}, err => {});\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.uploadWithEmit(data.target.files[0], type, order, fileExtension).then(res => {\n\n\t\t\t\t\tlet newFileKey = res['key'];\n\t\t\t\t\tlet newFileId = res['_id'];\n\n\t\t\t\t\tif (type === 'BOL') {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// MeteorObservable.publications.bolWithFileId(oldFileId).first().subscribe(() => {\n\t\t\t\t\t\t// \tlet bol = BOLs.findOne({id_file: oldFileId});\n\n\t\t\t\t\t\t// \tif (!bol) {\n\t\t\t\t\t\t// \t\tthis._zone.run(() => {\n\t\t\t\t\t\t// \t\t\tthis._ds.error('Could not find BOL to update file');\n\t\t\t\t\t\t// \t\t});\n\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t// \telse {\n\t\t\t\t\t\t// \t\t// bol.id_file = newFileId;\n\t\t\t\t\t\t// \t\t// bol.file_key = newFileKey;\n\n\t\t\t\t\t\t// \t\t// Meteor.methods.updateDocumentProps('bols', bol._id, \n\t\t\t\t\t\t// \t\t// [\n\t\t\t\t\t\t// \t\t// \t{prop: 'id_file', data: bol.id_file},\n\t\t\t\t\t\t// \t\t// \t{prop: 'file_key', data: bol.file_key}\n\t\t\t\t\t\t// \t\t// ], 'BOL', (errUpBOL, resUpBOL) => {\n\t\t\t\t\t\t// \t\t// \tthis._zone.run(() => {\n\t\t\t\t\t\t// \t\t// \t\tif (resUpBOL) {\n\t\t\t\t\t\t// \t\t// \t\t\tthis._alert.setAlert('success', 'BOL file has been replaced');\n\t\t\t\t\t\t// \t\t// \t\t\tMeteor.methods.replaceBOLNotificationJob(bol, (errNot, resNot) => {\n\t\t\t\t\t\t// \t\t// \t\t\t\tif (errNot) {\n\t\t\t\t\t\t// \t\t// \t\t\t\t\tMeteor.methods.insertErrorLog('Widgets-file - method replacebolnotification', [\n\t\t\t\t\t\t// \t\t// \t\t\t\t\t\tbol, this.job, errNot\n\t\t\t\t\t\t// \t\t// \t\t\t\t\t]);\n\t\t\t\t\t\t// \t\t// \t\t\t\t}\n\t\t\t\t\t\t// \t\t// \t\t\t});\n\t\t\t\t\t\t// \t\t// \t\t\tdata.srcElement.value = '';\n\t\t\t\t\t\t// \t\t// \t\t}\n\t\t\t\t\t\t// \t\t// \t\telse {\n\t\t\t\t\t\t// \t\t// \t\t\tthis._ds.error('Could not update BOL file');\n\t\t\t\t\t\t// \t\t// \t\t\tMeteor.methods.insertErrorLog('Widgets-file - update bol', [\n\t\t\t\t\t\t// \t\t// \t\t\t\t{prop: 'id_file', data: bol.id_file},\n\t\t\t\t\t\t// \t\t// \t\t\t\t{prop: 'file_key', data: bol.file_key}, errUpBOL\n\t\t\t\t\t\t// \t\t// \t\t\t]);\n\t\t\t\t\t\t// \t\t// \t\t\tdata.srcElement.value = '';\n\t\t\t\t\t\t// \t\t// \t\t}\n\t\t\t\t\t\t// \t\t// \t});\n\t\t\t\t\t\t// \t\t// });\n\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t// });\n\t\t\t\t\t}\n\t\t\t\t}, err => {});\n\t\t\t}\n\t\t}\n\t}\n\n\tuserIsInRole(role) {\n\t\treturn this._services._account.isUserInView(role);\n\t}\n\n\tisMobile() {\n\t\t// return Meteor.isCordova;\n\t}\n\n\tprivate downloadResource(url: string): Promise<Blob> {\n\t\treturn this._http.get<Blob>(url, {responseType: 'blob' as 'json'}).toPromise();\n\t}\n\t\n\tdownload(file: FileModel) {\n\t\tthis._services._socket.call('getSignedUrl', file.key, 900, async (err, res) => {\n\t\t\tif (res) {\n\t\t\t\tconst blob = await this.downloadResource(res); // this.files[\"0\"]._id\n\t\t\t\tconst url = window.URL.createObjectURL(blob);\n\n\t\t\t\tconst link = this.download_link.nativeElement;\n\t\t\t\tlink.href = url;\n\t\t\t\tlink.download = file.name;\n\t\t\t\tlink.click();\n\t\t\t\t\n\t\t\t\twindow.URL.revokeObjectURL(url);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._services._socket.call('insertErrorLog', 'Widgets-file - update bol', [\n\t\t\t\t\terr\n\t\t\t\t]);\n\t\t\t}\n\t\t});\n\t}\n\n\n\temail(file: FileModel) {\n\t\tthis._ds.input(\n\t\t\t'Email file to which address?', [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Email Address', \n\t\t\t\t\tform: 'email', \n\t\t\t\t\tdata: '', \n\t\t\t\t\tvalidators: [Validators.required, this._services._vs.email],\n\t\t\t\t\tvalidatorErrors: ['required', 'email'],\n\t\t\t\t\tvalidatorMsg: ['Email is required', 'Email is invalid'],\n\t\t\t\t\trequired: true\n\t\t\t\t}\n\t\t\t]\n\t\t).then(\n\t\t\tresultDialog => {\n\t\t\t\tthis._services._socket.call('emailFile', file._id, resultDialog.email.value, (err, res) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\tthis._ds.error('Could not send email: ' + err);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis._services._alert.setAlert('success', 'Email has been sent');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t\tcancelled => { }\n\t\t);\n\t}\n}\n","<style>\n \n html, body { height: 100%; }\n\n collapse-table tr:hover {\n background-color: lightblue;\n cursor: pointer;\n }\n\n collapse-table {\n width: 100%;\n }\n \n /* Label container: */\n .file {\n display: inline-block;\n padding: 0 0 0 0.5em;\n cursor: pointer;\n position: relative;\n border: .075rem solid #ddd;\n border-radius: .25rem;\n }\n \n /* The pseudo input field: */\n .file::before {\n content: \"\";\n display: block;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n z-index: -1;\n \n /* Bootstrap appearance: */\n background-color: #fff;\n border: .075rem solid #ddd;\n border-radius: .25rem;\n -webkit-box-shadow: inset 0 .2rem .4rem rgba(0,0,0,.05);\n box-shadow: inset 0 .2rem .4rem rgba(0,0,0,.05);\n }\n \n /* The pseudo button: */\n .file::after {\n content: \"Browse\";\n display: inline-block;\n \n /* Bootstrap appearance: */\n background-color: #eee;\n border: .075rem solid #ddd;\n border-radius: 0 .25rem .25rem 0;\n padding: .5rem 1rem;\n line-height: 1.5;\n color: #555;\n }\n \n .file input[type=file] {\n cursor: pointer;\n border: 0 none;\n width: 12em;\n }\n \n /* -webkit hide the button: */\n .file input[type=file]::-webkit-file-upload-button {\n border: 0;\n padding: 0;\n margin: 0 ;\n width: 0;\n background: transparent;\n } \n \n /* IE10+ hide the button: */\n .file input[type=file]::-ms-browse {\n padding: 0;\n margin: -1px;\n width: 0;\n border: 0;\n background: transparent;\n }\n \n .file input[type=file]::-ms-value {\n background: #fff;\n border: 0;\n }\n\n card {\n width: 100%;\n }\n</style>\n\n<a style=\"display: none\" #download_link></a>\n<input hidden type=\"file\" #fileInputReplace (change)=\"onFileSelectReplace($event)\" />\n \n<div class=\"card\">\n <div class=\"card-header\">\n <strong class=\"pull-left\">Files</strong>\n </div>\n <div class=\"card-block\">\n <div class=\"row\">\n <div class=\"col-lg-6\">\n <div class=\"row\" *ngIf=\"showFileUpload\">\n <div class=\"col-lg-6\">\n <div class=\"container\">\n <div style=\"margin: 10px 0px; font-weight: bold;\">Upload File</div>\n <label class=\"file\">\n <input type=\"file\" #fileInput (change)=\"onFileSelect($event)\" />\n </label>\n <br>\n <ngx-file-drop dropZoneLabel=\"Drop files here\" style=\"width: 223px; height: 112px; border: 1px black dashed; border-radius: 5px; justify-content: center;\" class=\"vertical-align\" (onFileDrop)=\"dragFileAccepted($event)\"></ngx-file-drop>\n </div>\n </div>\n <div class=\"col-lg-6\">\n <div *ngIf=\"isUploading\">\n <b>{{progressMsg || 'N/A'}}</b>\n </div>\n </div>\n </div>\n <div class=\"row\" style=\"margin-top: 10px;\">\n <div class=\"col-lg-12\" *ngIf=\"windowSize > 980\">\n <div style=\"text-align: center;\" *ngIf=\"pdfSrc\">\n <ngx-doc-viewer [url]=\"pdfSrc\" style=\"display: block;\"></ngx-doc-viewer>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-lg-6\">\n <div *ngIf=\"files && files.length\">\n <b>Uploaded Files</b>\n <div [style.max-height]=\"windowSize > 900 ? '300px' : ''\" [style.overflow-y]=\"windowSize > 900 ? 'auto' : ''\">\n <collapse-table collapseSize=\"900\">\n <thead>\n <tr>\n <th>File Name</th>\n <th>Size</th>\n <th>Type</th>\n <th>Actions</th>\n </tr>\n </thead> \n <tbody>\n <tr *ngFor=\"let file of files; let i = index\">\n <td data-label=\"File Name\" (click)=\"setPDFViewerSrc(file)\">{{file.name}}</td>\n <td data-label=\"Size\" (click)=\"setPDFViewerSrc(file)\">{{ file.size/1024/1024 | number:'.2' }} MB</td>\n <td data-label=\"Type\" (click)=\"setPDFViewerSrc(file)\">{{file.type}}</td>\n <td data-label=\"Actions\">\n <responsive-button-group collapseSize=\"900\">\n <button type=\"button\" class=\"btn btn-success\" (click)=\"open(file)\">Open</button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"download(file)\">Download</button>\n <button [hidden]=\"!allowDelete || (file.type !== 'misc' && !userIsInRole('super-admin'))\" type=\"button\" class=\"btn btn-danger\" (click)=\"deleteWithEmit(i)\">Delete</button>\n <button [hidden]=\"!allowDelete || (file.type !== 'misc' && !userIsInRole('super-admin'))\" type=\"button\" class=\"btn btn-danger\" (click)=\"fileInputReplace.click(); replaceFileIndex = i;\">Replace</button>\n <button type=\"button\" class=\"btn btn-warning\" (click)=\"email(file)\">Email</button>\n </responsive-button-group>\n </td>\n </tr>\n </tbody>\n </collapse-table>\n </div>\n </div>\n <div *ngIf=\"!files || !files.length\">\n <b>No Uploaded Files</b>\n </div>\n </div>\n </div>\n </div>\n</div>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { FileUploadComponent } from './file-upload.component';\nimport { CollapseTableModule } from '../collapse-table/collapse-table.module';\nimport { NgbModule } from '@ng-bootstrap/ng-bootstrap';\nimport { ResponsiveButtonGroupModule } from '../responsive-button-group/responsive-button-group.module';\nimport { NgxFileDropModule } from 'ngx-file-drop';\nimport { NgxDocViewerModule } from 'ngx-doc-viewer';\n\n@NgModule({\n\timports: [\n\t\tCommonModule,\n\t\tFormsModule,\n\t\tCollapseTableModule,\n\t\tNgbModule,\n\t\tResponsiveButtonGroupModule,\n\t\tNgxFileDropModule,\n\t\tNgxDocViewerModule\n\t],\n\tdeclarations: [\n\t\tFileUploadComponent\n\t],\n\texports: [\n\t\tFileUploadComponent\n\t]\n})\nexport class FileModule { }","import { NgModule } from '@angular/core';\nimport { SharedModule } from '../shared/shared.module';\n\nimport { UserSettingsRouting } from './user-settings.routing';\nimport { UserSettingsComponent } from './user-settings.component';\nimport { UserSettingsService } from './user-settings.service';\nimport { DatatableModule } from '../widgets/data-table/data-table.module';\nimport { FileModule } from '../widgets/file/file-upload.module';\nimport { UsersSettingsComponent } from './settings/users-settings.component';\n\n@NgModule({\n\timports: [\n\t\tSharedModule,\n\t\tUserSettingsRouting,\n\t\tDatatableModule,\n\t\tFileModule\n\t],\n\tdeclarations: [ \n\t\tUserSettingsComponent,\n\t\tUsersSettingsComponent\n\t],\n\tproviders: [\n\t\tUserSettingsService\n\t]\n})\nexport class UserSettingsModule { }\n","import { Component, OnInit } from '@angular/core';\nimport { NavbarModel } from '../widgets/navbar-module/navbar-module.model';\nimport { AuthService } from '../auth/auth.service';\n\nimport { ProviderService, BaseComponent } from '../resolveio-class';\nimport { Subscription } from 'rxjs';\nimport { FormGroup } from '@angular/forms';\nimport { HttpClient } from '@angular/common/http';\nimport { ActivatedRoute } from '@angular/router';\nimport { CoreService } from '../core.service';\n@Component({\n\tproviders: [ProviderService],\n\ttemplateUrl: './home.component.html'\n})\nexport class HomeComponent extends BaseComponent implements OnInit {\n\tmenuData: NavbarModel = {\n\t\ttitle: 'Home',\n\t\tmodule: null,\n\t\tdescription: null,\n\t\tdescription_name: null,\n\t\ttabs: [\n\t\t\t{'link': 'home', 'params': null, 'label': 'Home'}\n\t\t]\n\t};\n\n\tselectedSolution = 'Asset';\n\tsubscription$: Subscription[] = [];\n\tisLoggedIn: boolean;\n\tform: FormGroup;\n\n\tconstructor(private _route: ActivatedRoute, private auth: AuthService, private _services: ProviderService, private _http: HttpClient, private _app: CoreService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis._services._app.setNavbarModuleData(this.menuData);\n\n\t\tif (!this._app.isLoggingOut.getValue()) {\n\t\t\tif (this._services._account.getUser()) {\n\t\t\t\tif (this._services._account.getUser().settings && this._services._account.getUser().settings.opening_route && this._services._account.getUser().settings.opening_route !== '/home') {\n\t\t\t\t\tthis._services._router.navigateByUrl(this._services._account.getUser().settings.opening_route);\n\t\t\t\t}\n\t\t\t\telse if (this._services._router.url !== '/home') {\n\t\t\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.subscription$.push(this._services._account.user.subscribe(user => {\n\t\t\t\t\tif (user && user.settings && user.settings.opening_route && user.settings.opening_route !== '/home') {\n\t\t\t\t\t\tthis._services._router.navigateByUrl(user.settings.opening_route);\n\t\t\t\t\t}\n\t\t\t\t\telse if (this._services._router.url !== '/home') {\n\t\t\t\t\t\tthis._services._router.navigateByUrl('/home');\n\t\t\t\t\t}\n\t\t\t\t}, () => {}));\n\t\t\t}\n\t\t}\n\t}\n\n\tngOnDestroy() {\n\t\tthis.subscription$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\t}\n}\n","<div style=\"height: 100%\">\n <div class=\"row\" style=\"margin-left: 0px; margin-right: 0px; height: 100%;\">\n <div class=\"col-lg-12\" style=\"height: 100%\">\n <div class=\"jumbotron jumbotron-fluid\" style=\"height: 100%; padding-bottom: 0px;\">\n <div class=\"container text-center\" style=\"height: 100%\">\n <img src=\"/assets/images/ResolveIO.png\" class=\"img-fluid\" alt=\"Responsive image\" style=\"height: 100%; width: auto; max-width: 750px; max-height: 525px;\">\n <p style=\"font-size: 24px; font-style: italic\">The All-in-One Solution for Tracking Inventory, Ordering, POs, Management, and Much More!</p>\n </div>\n </div>\n </div>\n </div> \n</div>","import { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { NgModule } from '@angular/core';\nimport { CoreComponent } from './core.component';\nimport { AccountManagerService } from './account-manager.service';\nimport { SocketManagerService } from './socket-manager.service';\nimport { DeviceDetectorService } from 'ngx-device-detector';\nimport { NgbModule } from '@ng-bootstrap/ng-bootstrap';\nimport { NavbarMainComponent } from './widgets/navbar-main/navbar-main.component';\nimport { NavbarModuleComponent } from './widgets/navbar-module/navbar-module.component';\nimport { LoggerComponent } from './logger/logger.component';\nimport { CoreService } from './core.service';\nimport { AuthService } from './auth/auth.service';\nimport { AuthGuard } from './auth/auth-guard.service';\nimport { CanDeactivateGuard } from './auth/can-deactivate-guard.service';\nimport { ValidationService } from './util/validation.service';\nimport { AuthPermissionService } from './auth/auth-permissions.service';\nimport { WindowRefService } from './util/window.service';\nimport { ToastrModule } from 'ngx-toastr';\nimport { AlertService } from './widgets/alert/alert.service';\nimport { AwsService } from './util/aws.service';\nimport { DialogService } from './widgets/dialog/dialog.service';\nimport { SocketService } from './socket.service';\nimport { TokenManagerService } from './token-manager.service';\nimport { NgxLocalStorageModule } from 'ngx-localstorage';\nimport { SharedModule } from './shared/shared.module';\nimport { OfflineManagerService } from './offline-manager.service';\nimport { FocusDirective } from './directive/focus';\nimport { ForgotPasswordComponent } from './auth/forgot-password.component';\nimport { EnrollComponent } from './auth/enroll.component';\nimport { DialogConfirmContent } from './widgets/dialog/dialog.confirm.content';\nimport { DialogErrorContent } from './widgets/dialog/dialog.error.content';\nimport { DialogInputContent } from './widgets/dialog/dialog.input.content';\nimport { DialogNotifyContent } from './widgets/dialog/dialog.notify.content';\nimport { DialogSelectDateTimeContent } from './widgets/dialog/dialog.select-datetime.content';\nimport { DialogSelectDataLabelsContent } from './widgets/dialog/dialog.select-data-labels.content';\nimport { DialogLoginContent } from './widgets/dialog/dialog.login.content';\nimport { HttpClientModule } from '@angular/common/http';\nimport { ScrollDirective } from './directive/scroll';\nimport { DialogRegisterContent } from './widgets/dialog/dialog.register.content';\nimport { Auth365Component } from './auth/auth365.component';\nimport { UserSettingsModule } from './user-settings/user-settings.module';\nimport { HomeComponent } from './home/home.component';\nimport { CollapseTableModule } from './widgets/collapse-table/collapse-table.module';\nimport { DialogSelectWithButtonsURLContent } from './widgets/dialog/dialog.select-with-buttons-url.content';\nimport { DialogSelectArrayObjsContent } from './widgets/dialog/dialog.select-array-objs.content';\nimport { DialogSelectArrayContent } from './widgets/dialog/dialog.select-array.content';\n\n@NgModule({\n imports: [\n SharedModule,\n HttpClientModule,\n NgbModule,\n ToastrModule.forRoot(),\n NgxLocalStorageModule.forRoot({\n prefix: 'ResolveIO'\n }),\n UserSettingsModule,\n BrowserAnimationsModule,\n CollapseTableModule\n ],\n declarations: [\n CoreComponent,\n HomeComponent,\n LoggerComponent,\n NavbarMainComponent,\n NavbarModuleComponent,\n ForgotPasswordComponent,\n EnrollComponent,\n Auth365Component,\n FocusDirective,\n ScrollDirective,\n DialogConfirmContent,\n DialogErrorContent,\n DialogInputContent,\n DialogNotifyContent,\n DialogSelectDateTimeContent,\n DialogSelectDataLabelsContent,\n DialogLoginContent,\n DialogRegisterContent,\n DialogSelectWithButtonsURLContent,\n DialogSelectArrayObjsContent,\n DialogSelectArrayContent\n ],\n providers: [\n CoreService,\n AuthService,\n AuthGuard,\n CanDeactivateGuard,\n DialogService,\n ValidationService,\n AwsService,\n AuthPermissionService,\n WindowRefService,\n AlertService,\n SocketService,\n SocketManagerService,\n TokenManagerService,\n AccountManagerService,\n OfflineManagerService,\n DeviceDetectorService\n ],\n exports: [\n CoreComponent,\n HomeComponent,\n LoggerComponent,\n NavbarMainComponent,\n NavbarModuleComponent,\n ForgotPasswordComponent,\n EnrollComponent,\n Auth365Component,\n FocusDirective,\n ScrollDirective\n ]\n})\nexport class CoreModule { }\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable()\nexport class SupportTicketService {\n\n\tselectedSupportTicket = new BehaviorSubject('0');\n\n\tconstructor() {}\n\n\tsetSelectedSupportTicket(id: string) {\n\t\tthis.selectedSupportTicket.next(id);\n\t}\n}\n","import { Component, OnInit, OnDestroy, Input } from '@angular/core';\nimport { NavbarModel } from '../widgets/navbar-module/navbar-module.model';\nimport { SupportTicketService } from './support-ticket.service';\nimport { Subscription } from 'rxjs';\nimport { ProviderService, BaseComponent } from '../resolveio-class';\nimport { SupportTicketModel } from '../models/support-ticket.model';\n\n@Component({\n\tproviders: [ProviderService],\n\ttemplate: '<router-outlet></router-outlet>'\n})\n\nexport class SupportTicketComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\tselectedResolveIOSupport$: Subscription;\n\n\tmenuData: NavbarModel;\n\t\n\tconstructor(private _sts: SupportTicketService, private _services: ProviderService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis.selectedResolveIOSupport$ = this._sts.selectedSupportTicket.subscribe(\n\t\t\tval => this.selectedResolveIOSupportChanged(val)\n\t\t);\n\t}\n\n\tngOnDestroy() {\n\t\tthis._sts.setSelectedSupportTicket('0');\n\n\t\tthis.selectedResolveIOSupport$.unsubscribe();\n\t}\n\n\tselectedResolveIOSupportChanged(id: string) {\n\t\tif (id !== '0') {\n\t\t\tthis._services._socket.call('supportGetSupportTicketWithId', id, (err, res) => {\n\t\t\t\tif (!res) {\n\t\t\t\t\tthis.setResolveIOSupportModuleMenuData();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.setResolveIOSupportModuleMenuData(id, res);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tthis.setResolveIOSupportModuleMenuData();\n\t\t}\n\t}\n\n\tsetResolveIOSupportModuleMenuData(id?: string, st?: SupportTicketModel) {\n\t\tlet tabs = [];\n\n\t\ttabs.push({link: '/support-ticket/list', params: null, label: 'List', tourAnchor: 'navBarModuleSupportList'});\n\t\ttabs.push({link: '/support-ticket/new', params: null, label: 'New', tourAnchor: 'navBarModuleSupportNew'});\n\t\ttabs.push({link: '/support-ticket/detail', params: id || '0', label: 'Details'});\n\t\tif (this._services._account.isUserSuperAdmin() || (st && st.id_user_created === this._services._account.getUser()._id)) {\n\t\t\ttabs.push({link: '/support-ticket/edit', params: id || '0', label: 'Edit'});\n\t\t}\n\n\t\tthis.menuData = {\n\t\t\ttitle: 'Support Center',\n\t\t\tmodule: 'Support Ticket',\n\t\t\tdescription_name: 'Support Ticket #',\n\t\t\tdescription: st ? st.support_ticket_number_string : '',\n\t\t\ttabs: tabs\n\t\t};\n\n\t\tthis._services._app.setNavbarModuleData(this.menuData);\n\t}\n}\n","import { Component, OnInit, OnDestroy } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { SupportTicketService } from '../support-ticket.service';\nimport { Subscription } from 'rxjs';\nimport { DatatableModel, DatatableColumn } from '../../widgets/data-table/data-table.model';\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\nimport { SupportTicketModel } from '../../models/support-ticket.model';\nimport { PaginationOptions } from '../../models/pagination.model';\n\n@Component({\n\tproviders: [ProviderService],\n\ttemplateUrl: './support-ticket-list.component.html'\n})\nexport class SupportTicketListComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\troute$: Subscription;\n\n\tsupport_tickets: SupportTicketModel;\n\n\tsubscription$: Subscription[] = [];\n\n\tcolumns: Array<DatatableColumn> = [\n\t\t{ name: 'Support Ticket #', data: 'support_ticket_number'},\n\t\t{ name: 'Date Created', data: 'date_created'},\n\t\t{ name: 'Type', data: 'type' },\n\t\t{ name: 'Issue', data: 'issue' },\n\t\t{ name: 'Status', data: 'status'},\n\t\t{ name: 'Created By', data: 'user_created'}\n\t];\n\n\ttableData: DatatableModel = {\n\t\tsearchString: '',\n\t\tentriesPerPage: '25',\n\t\tpageNum: 1,\n\t\tsortColumn: '',\n\t\tsortOrder: 'desc',\n\t\tfilters: {\n\t\t\tstatus: 'Opened',\n\t\t\tsubstatus: 'All'\n\t\t}\n\t};\n\n\ttotalItems = 1000;\n\n\tconstructor(private _sts: SupportTicketService, private _route: ActivatedRoute, private _services: ProviderService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis._sts.setSelectedSupportTicket('0');\n\n\t\tthis.route$ = this._route.queryParams.subscribe(() => {\n\n\t\t\tlet keys = Object.keys(this.tableData);\n\t\t\tlet filterKeys = Object.keys(this.tableData.filters);\n\n\t\t\tif (this._route.snapshot.queryParamMap.keys.length) {\n\t\t\t\tkeys.splice(keys.indexOf('filters', 1));\n\n\t\t\t\tfilterKeys.forEach(key => {\n\t\t\t\t\tkeys.push('filters.' + key);\n\t\t\t\t});\n\n\t\t\t\tkeys.filter(a => a in this._route.snapshot.queryParams).forEach(key => {\n\t\t\t\t\tif (key.includes('filters.')) {\n\t\t\t\t\t\tlet tmpKey = key;\n\t\t\t\t\t\ttmpKey = tmpKey.replace('filters.', '');\n\t\t\t\t\t\tthis.tableData.filters[tmpKey] = this._route.snapshot.queryParams[key];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.tableData[key] = this._route.snapshot.queryParams[key];\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.tableData = {\n\t\t\t\t\tsearchString: '',\n\t\t\t\t\tentriesPerPage: '25',\n\t\t\t\t\tpageNum: 1,\n\t\t\t\t\tsortColumn: '',\n\t\t\t\t\tsortOrder: 'desc',\n\t\t\t\t\tfilters: {\n\t\t\t\t\t\tstatus: 'Opened',\n\t\t\t\t\t\tsubstatus: 'All'\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tthis.queryData();\n\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis.subscription$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\n\t\tthis.route$.unsubscribe();\n\t}\n\n\tonQueryDataChanged() {\n\t\tlet queryParams = {};\n\n\t\tlet keys = Object.keys(this.tableData);\n\t\tlet filterKeys = Object.keys(this.tableData.filters);\n\n\t\tkeys.forEach(key => {\n\t\t\tif (key === 'filters') {\n\t\t\t\tfilterKeys.forEach(filterKey => {\n\t\t\t\t\tqueryParams['filters.' + filterKey] = this.tableData.filters[filterKey];\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tqueryParams[key] = this.tableData[key];\n\t\t\t}\n\t\t});\n\n\t\tthis._services._router.navigate(['/support-ticket/list'], { queryParams } );\n\t}\n\n\tqueryData() {\n\n\t\tlet fields = {};\n\n\t\tthis.columns.forEach(col => {\n\t\t\tfields[col.data] = 1;\n\t\t});\n\n\t\tconst options: PaginationOptions = {\n\t\t\tlimit: parseInt(this.tableData.entriesPerPage),\n\t\t\tskip: (this.tableData.pageNum - 1) * parseInt(this.tableData.entriesPerPage),\n\t\t\tsort: this.tableData.sortColumn ? { [this.tableData.sortColumn] : (this.tableData.sortOrder === 'asc' ? 1 : -1) } : { name: 1 },\n\t\t\tfields: fields\n\t\t};\n\n\t\tlet filters = [{prop: 'client', data: this._services._app.client.getValue()}];\n\t\tif (this.tableData.filters['status'] !== 'All') {\n\t\t\tfilters.push({prop: 'status', data: this.tableData.filters['status']});\n\t\t}\n\t\tif (this.tableData.filters['substatus'] !== 'All') {\n\t\t\tfilters.push({prop: 'substatus', data: this.tableData.filters['substatus']});\n\t\t}\n\t\t\n\t\tthis._services._socket.call('supportticketsWithOptions', options, this.tableData.searchString, filters, (err, res) => {\n\t\t\tthis.support_tickets = res;\n\t\t});\n\n\t\tthis._services._socket.call('supportticketCount', this.tableData.searchString, filters, (err, res) => {\n\t\t\tif (err) {\n\t\t\t\tthis._services._socket.call('insertErrorLog', 'countQuery - resolveioSupportList', [\n\t\t\t\t\terr\n\t\t\t\t]);\n\t\t\t} \n\t\t\telse {\n\t\t\t\tthis.totalItems = res;\n\t\t\t}\n\t\t});\n\t}\n}\n","<div class=\"row\">\n <div class=\"col-sm-6\">\n <b>Filter Support Ticket By Status</b><br>\n <select class=\"form-control\" [(ngModel)]=\"tableData.filters['status']\" (change)=\"onQueryDataChanged()\" tourAnchor=\"supportListFilter\">\n <option value=\"All\">All</option>\n <option value=\"Opened\">Opened</option>\n <option value=\"Resolved\">Resolved</option>\n </select>\n </div>\n <div class=\"col-sm-6\">\n <b>Filter Support Ticket By Sub-Status</b><br>\n <select class=\"form-control\" [(ngModel)]=\"tableData.filters['substatus']\" (change)=\"onQueryDataChanged()\">\n <option value=\"All\">All</option>\n <option value=\"Investigating\">Investigating</option>\n <option value=\"Awaiting Customer Interaction\">Awaiting Customer Interaction</option>\n <option value=\"Resolved\">Resolved</option>\n </select>\n </div>\n</div>\n<div class=\"row\">\n <div class=\"col-md-12\">\n <div style=\"padding-left: 15px; padding-right: 15px; padding-top: 15px;\">\n <data-table #dataTable\n [urlClick]=\"'/support-ticket/detail/'\"\n [columns]=\"columns\"\n [data]=\"support_tickets\"\n [collapseSize]=\"990\"\n [searchTitle]=\"'Search For Support Ticket...'\"\n [totalItems]=\"totalItems\"\n (onChangeTableData)=\"onQueryDataChanged()\"\n [tableData]=\"tableData\"\n tourAnchor=\"supportListDatatable\">\n </data-table>\n </div>\n </div>\n</div>\n ","import { Component, OnInit, OnDestroy, ChangeDetectorRef, ViewChild } from '@angular/core';\nimport { SupportTicketService } from '../support-ticket.service';\nimport { Validators, FormGroup } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\nimport { pad } from '../../util/common.helper';\nimport { DialogService } from '../../widgets/dialog/dialog.service';\n\n@Component({\n\tproviders: [ProviderService],\n\ttemplateUrl: './support-ticket-new.component.html'\n})\n\nexport class SupportTicketNewComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\t@ViewChild ('fileUpload', {static: true}) fileUpload;\n\t\n\tsubscription$: Subscription[] = [];\n\n\tform: FormGroup;\n\n\tdisableFormButton = false;\n\n\tsubmit = false;\n\n\tconstructor(private _sts: SupportTicketService, private _cd: ChangeDetectorRef, private _services: ProviderService, private _ds: DialogService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis._sts.setSelectedSupportTicket('0');\n\n\t\tthis.form = this._services._fb.group({\n\t\t\t__v: [0],\n\t\t\ttype: ['', [Validators.required]],\n\t\t\tpriority: ['', [Validators.required]],\n\t\t\tissue: ['', [Validators.required]],\n\t\t\tsupport_ticket_number: [0],\n\t\t\tsupport_ticket_number_string: ['0'],\n\t\t\tstatus: ['Opened'],\n\t\t\tsubstatus: ['New'],\n\t\t\tclient: [this._services._app.client.getValue()],\n\t\t\tid_client: [this._services._app.client.getValue()],\n\t\t\tmessages: [[]],\n\t\t\tdate_created: [null],\n\t\t\tdate_created_string: [''],\n\t\t\tid_user_created: [this._services._account.getUser()._id],\n\t\t\tuser_created: [this._services._account.getUser().fullname],\n\t\t\tbillable: [false, [Validators.required]],\n\t\t\tdate_investigation: [null],\n\t\t\tdate_closed: [null],\n\t\t\tfiles: [[]],\n\t\t\tcurrent_watchers: [[]],\n\t\t\tclient_user: [{\n\t\t\t\tid_user: this._services._account.getUser()._id,\n\t\t\t\tuser: this._services._account.getUser().fullname,\n\t\t\t\temail: this._services._account.getUser().email ? this._services._account.getUser().email : ''\n\t\t\t}],\n\t\t\ttasks: [[]],\n\t\t\tnotes: [[]],\n\t\t\tusers_assigned: [[]],\n\t\t\tbill_description: [''],\n\t\t\tdifficulty: [1]\n\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis.subscription$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\t}\n\n\tcanDeactivate() {\t\t\t\n\t\treturn true;\n\t}\n\n\tonTypeChange() {\n\t\tif (this.form.controls.type.value === 'System Impairment') {\n\t\t\tthis.form.controls.priority.setValue('High');\n\t\t\tthis.form.controls.billable.setValue(false);\n\t\t}\n\t\telse if (this.form.controls.type.value === 'Request New Feature') {\n\t\t\tthis.form.controls.priority.setValue('Low');\n\t\t\tthis.form.controls.billable.setValue(true);\n\t\t}\n\t\telse if (this.form.controls.type.value === 'General Inquery') {\n\t\t\tthis.form.controls.priority.setValue('Low');\n\t\t\tthis.form.controls.billable.setValue(true);\n\t\t}\n\t\telse {\n\t\t\tthis.form.controls.priority.setValue('');\n\t\t\tthis.form.controls.billable.setValue(false);\n\t\t}\n\t}\n\n\tsubmitForm(form) {\n\n\t\tthis.submit = true;\n\n\t\tthis.disableFormButton = true;\n\n\t\tlet now = new Date();\n\t\tthis.form.controls.date_created.setValue(now);\n\t\tthis.form.controls.date_created_string.setValue(now.getFullYear() + '/' + (now.getMonth() + 1) + '/' + now.getDate());\n\n\t\tthis._services._socket.call('supportInsertSupportTicket', this.form.value, (err, res) => {\n\t\t\tif (res) {\n\t\t\t\tthis._services._alert.setAlert('success', 'Support ticket has been created');\n\t\t\t\tthis._services._router.navigateByUrl('/support-ticket/detail/' + res);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._ds.error('Could not create new support ticket.');\n\t\t\t\tthis._services._socket.call('insertErrorLog', 'Support Ticket New - insert support ticket', [\n\t\t\t\t\tthis.form.value, err\n\t\t\t\t]);\n\t\t\t}\n\t\t});\n\t}\n}\n","<style>\n .label-accordion {\n font-weight: bold;\n color: black;\n margin-bottom: 0px;\n }\n\n .fa-plus {\n color: black;\n }\n\n .fa-minus {\n color: black;\n }\n</style>\n\n<div class=\"col-lg-12\">\n <form [formGroup]=\"form\" novalidate (ngSubmit)=\"submitForm(form)\">\n <div class=\"row\">\n <ngb-accordion #acc=\"ngbAccordion\" activeIds=\"supportTicketInfo\">\n <ngb-panel id=\"supportTicketInfo\">\n <ng-template ngbPanelTitle>\n <div> \n <label class=\"label-accordion\">Support Ticket Info</label>\n <i *ngIf=\"!acc.activeIds.includes('supportTicketInfo')\" class=\"fa fa-plus pull-right\" aria-hidden=\"true\"></i>\n <i *ngIf=\"acc.activeIds.includes('supportTicketInfo')\" class=\"fa fa-minus pull-right\" aria-hidden=\"true\"></i>\n </div>\n </ng-template>\n <ng-template ngbPanelContent>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Support Ticket Type</label>\n <em *ngIf=\"!form.controls.type.valid\">- Required</em>\n <select [ngClass]=\"['form-control', form.controls.type.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"type\" (change)=\"onTypeChange()\" tourAnchor=\"supportNewSelect\">\n <option value=\"\">Select Type</option>\n <option value=\"General Inquery\">General Inquery</option>\n <option value=\"System Impairment\">System Impairment</option>\n <option value=\"Request New Feature\">Request New Feature</option>\n </select>\n <div class=\"invalid-feedback\" *ngIf=\"!form.controls.type.valid\">Type is required</div>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Problem/Feature Description</label>\n <em *ngIf=\"!form.controls.issue.valid\">- Required</em>\n <textarea formControlName=\"issue\" [ngClass]=\"['form-control', form.controls.issue.valid ? 'is-valid' : 'is-invalid' ]\" [rows]=\"5\" style=\"overflow-x: hidden\" tourAnchor=\"supportNewInput\"></textarea>\n <div class=\"invalid-feedback\" *ngIf=\"!form.controls.issue.valid\">Description is required</div>\n </div>\n </div>\n </div>\n </ng-template>\n </ngb-panel>\n </ngb-accordion>\n </div>\n <div class=\"row\" style=\"padding-top: 15px;\">\n <form-button [form]=\"form\" [disabled]=\"disableFormButton\" tourAnchor=\"supportNewSubmit\"></form-button>\n </div>\n </form>\n</div>\n","import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { SupportTicketService } from '../support-ticket.service';\nimport { Subscription } from 'rxjs';\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\nimport { Validators } from '@angular/forms';\nimport { SupportTicketModel } from '../../models/support-ticket.model';\nimport { DialogService } from '../../widgets/dialog/dialog.service';\nimport { FileModel } from '../../models/file.model';;\n\n@Component({\n\tproviders: [ProviderService],\n\ttemplateUrl: './support-ticket-detail.component.html'\n})\n\nexport class SupportTicketDetailComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\t@ViewChild('fileUpload', {static: true}) fileUpload;\n\n\tsubscription$: Subscription[] = [];\n\n\tid: string;\n\tdata: SupportTicketModel;\n\n\tfiles: FileModel[] = [];\n\n\tconstructor(private _route: ActivatedRoute, private _sts: SupportTicketService, private _services: ProviderService, private _ds: DialogService) {\n\t\tsuper(_services);\n\t}\n\t\t\n\tngOnInit() {\n\t\tthis.id = this._route.snapshot.params['id'];\n\t\tthis._sts.setSelectedSupportTicket(this.id);\n\n\t\tthis._services._socket.call('supportGetSupportTicketWithId', this.id, (err, res) => {\n\t\t\tif (!res) {\n\t\t\t\tthis._services._router.navigateByUrl('/support-ticket/list');\n\t\t\t\tthis._ds.error('Could not find support ticket');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tthis.data = res;\n\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis.subscription$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\t}\n\n\tonFileAdded(file: FileModel) {\t\n\t\tthis.data.files.push(file._id);\n\n\t\tthis._services._socket.call('supportUpdateSupportTicket', this.data, (err, res) => {\n\t\t\tif (err || !res) {\n\t\t\t\tthis._ds.error('Could not update support ticket files');\n\t\t\t\tthis._services._socket.call('insertErrorLog', 'support-ticket-detail - update support-ticket files add', [\n\t\t\t\t\tthis.data.files, err\n\t\t\t\t]);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\t// this._services._alert.setAlert('info', 'Sending email(s).');\n\n\t\t\t\t// this._services._socket.callSupport('sendSupportTicketModifiedEmail', this.data, this.data.files, (errEmail, resEmail) => {\n\t\t\t\t// \tif (errEmail || !resEmail) {\n\t\t\t\t// \t\tthis._ds.error('Could not email support ticket');\n\t\t\t\t// \t\tthis._services._socket.call('insertErrorLog', 'support-ticket-detail - email support-ticket', [\n\t\t\t\t// \t\t\t{prop: 'status', data: this.data.status}, errEmail\n\t\t\t\t// \t\t]);\n\t\t\t\t// \t}\n\t\t\t\t// \telse {\n\t\t\t\t// \t\tthis._services._alert.setAlert('success', 'Support Ticket email has been sent');\n\t\t\t\t// \t}\n\t\t\t\t// });\n\t\t\t}\n\t\t});\n\t}\n\n\tonFilesRemoved(file: FileModel) {\n\t\tthis._ds.confirm('Are you sure you want to remove a file? This will email all current watchers?').then(yes => {\n\t\t\tif (this.data.files.indexOf(file._id) !== -1) {\n\t\t\t\tthis.data.files.splice(this.data.files.indexOf(file._id), 1);\n\n\t\t\t\tthis._services._socket.call('supportUpdateSupportTicket', this.data, (err, res) => {\n\t\t\t\t\tif (err || !res) {\n\t\t\t\t\t\tthis._ds.error('Could not update support-ticket files');\n\t\t\t\t\t\tthis._services._socket.call('insertErrorLog', 'support-ticket-detail - update files remove', [\n\t\t\t\t\t\t\t{prop: 'files', data: this.data.files}, err\n\t\t\t\t\t\t]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}, () => {});\n\t}\n\n\tedit() {\n\t\tthis._services._router.navigateByUrl('/support-ticket/edit/' + this.id);\n\t}\n\n\tnewMessage() {\n\t\tthis._ds.input('Input Message', [\n\t\t\t{\n\t\t\t\tlabel: 'Message',\n\t\t\t\tform: 'message',\n\t\t\t\tdata: '',\n\t\t\t\tvalidators: [Validators.required],\n\t\t\t\tvalidatorErrors: ['required'],\n\t\t\t\tvalidatorMsg: ['Message is required'],\n\t\t\t\trequired: true,\n\t\t\t\ttype: 'textarea'\n\t\t\t}\n\t\t]).then(close => {\n\t\t\tthis.data.messages.push({\n\t\t\t\tmessage: close.message.value,\n\t\t\t\tid_user: this._services._account.getUser()._id,\n\t\t\t\tuser: this._services._account.getUser().fullname,\n\t\t\t\tdate: new Date(),\n\t\t\t\ttype: 'Client'\n\t\t\t});\n\n\t\t\tthis._services._socket.call('supportUpdateSupportTicket', this.data, (err, res) => {\n\t\t\t\tif (res) {\n\t\t\t\t\t// this._services._alert.setAlert('success', 'Support ticket has been updated');\n\n\t\t\t\t\t// this._services._socket.callSupport('sendSupportTicketModifiedEmail', this.data, this.data.files, (errEmail, resEmail) => {\n\t\t\t\t\t// \tif (errEmail || !resEmail) {\n\t\t\t\t\t// \t\tthis._ds.error('Could not email support ticket');\n\t\t\t\t\t// \t\tthis._services._socket.call('insertErrorLog', 'support-ticket-detail - email support-ticket', [\n\t\t\t\t\t// \t\t\t{prop: 'status', data: this.data.status}, errEmail\n\t\t\t\t\t// \t\t]);\n\t\t\t\t\t// \t}\n\t\t\t\t\t// \telse {\n\t\t\t\t\t// \t\tthis._services._alert.setAlert('success', 'Support Ticket email has been sent');\n\t\t\t\t\t// \t}\n\t\t\t\t\t// });\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._services._socket.call('insertErrorLog', 'Support Ticket Detail - Add Message');\n\t\t\t\t\tthis._ds.error('Support ticket could not update');\n\t\t\t\t}\n\t\t\t});\n\t\t}, () => {});\n\t}\n\n\teditMessage(index) {\n\t\tlet message = this.data.messages[index];\n\t\tthis._ds.input('Input Message', [\n\t\t\t{\n\t\t\t\tlabel: 'Message',\n\t\t\t\tform: 'message',\n\t\t\t\tdata: message.message,\n\t\t\t\tvalidators: [Validators.required],\n\t\t\t\tvalidatorErrors: ['required'],\n\t\t\t\tvalidatorMsg: ['Message is required'],\n\t\t\t\trequired: true,\n\t\t\t\ttype: 'textarea'\n\t\t\t}\n\t\t]).then(close => {\n\t\t\tmessage.message = close.message.value;\n\n\t\t\tthis._services._socket.call('supportUpdateSupportTicket', this.data, (err, res) => {\n\t\t\t\tif (res) {\n\t\t\t\t\t// this._services._alert.setAlert('success', 'Support ticket has been updated');\n\n\t\t\t\t\t// this._services._socket.callSupport('sendSupportTicketModifiedEmail', this.data, this.data.files, (errEmail, resEmail) => {\n\t\t\t\t\t// \tif (errEmail || !resEmail) {\n\t\t\t\t\t// \t\tthis._ds.error('Could not email support ticket');\n\t\t\t\t\t// \t\tthis._services._socket.call('insertErrorLog', 'support-ticket-detail - email support-ticket', [\n\t\t\t\t\t// \t\t\t{prop: 'status', data: this.data.status}, errEmail\n\t\t\t\t\t// \t\t]);\n\t\t\t\t\t// \t}\n\t\t\t\t\t// \telse {\n\t\t\t\t\t// \t\tthis._services._alert.setAlert('success', 'Support Ticket email has been sent');\n\t\t\t\t\t// \t}\n\t\t\t\t\t// });\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._services._socket.call('insertErrorLog', 'Support Ticket Detail - Add Message');\n\t\t\t\t\tthis._ds.error('Support ticket could not update');\n\t\t\t\t}\n\t\t\t});\n\t\t}, () => {});\n\t}\n\n\tdeleteMessage(index) {\n\t\tthis._ds.confirm('Are you sure you want to remove this message?').then(() => {\n\t\t\tthis.data.messages.splice(index, 1);\n\n\t\t\tthis._services._socket.call('supportUpdateSupportTicket', this.data, (err, res) => {\n\t\t\t\tif (res) {\n\t\t\t\t\t// this._services._alert.setAlert('success', 'Support ticket has been updated');\n\n\t\t\t\t\t// this._services._socket.callSupport('sendSupportTicketModifiedEmail', this.data, this.data.files, (errEmail, resEmail) => {\n\t\t\t\t\t// \tif (errEmail || !resEmail) {\n\t\t\t\t\t// \t\tthis._ds.error('Could not email support ticket');\n\t\t\t\t\t// \t\tthis._services._socket.call('insertErrorLog', 'support-ticket-detail - email support-ticket', [\n\t\t\t\t\t// \t\t\t{prop: 'status', data: this.data.status}, errEmail\n\t\t\t\t\t// \t\t]);\n\t\t\t\t\t// \t}\n\t\t\t\t\t// \telse {\n\t\t\t\t\t// \t\tthis._services._alert.setAlert('success', 'Support Ticket email has been sent');\n\t\t\t\t\t// \t}\n\t\t\t\t\t// });\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._services._socket.call('insertErrorLog', 'Support Ticket Detail - Add Message');\n\t\t\t\t\tthis._ds.error('Support ticket could not update');\n\t\t\t\t}\n\t\t\t});\n\t\t}, () => {});\n\t}\n\n\tisMyMessage(message) {\n\t\treturn this._services._account.getUser()._id === message.id_user;\n\t}\n}","<style>\n .label-accordion {\n font-weight: bold;\n color: black;\n margin-bottom: 0px;\n }\n\n .fa-plus {\n color: black;\n }\n\n .fa-minus {\n color: black;\n }\n\n ngb-accordion {\n width: 100%;\n }\n\n dl {\n margin-bottom: 0px;\n }\n\n .selected {\n background-color: lightblue;\n }\n</style>\n\n<div class=\"col-lg-12\" *ngIf=\"data\">\n <div class=\"row\">\n <ngb-accordion #acc=\"ngbAccordion\" activeIds=\"supportTicketInfo, supportTicketMessages, files\">\n <ngb-panel id=\"supportTicketInfo\">\n <ng-template ngbPanelTitle>\n <div> \n <label class=\"label-accordion\">Support Ticket Info</label>\n <i *ngIf=\"!acc.activeIds.includes('supportTicketInfo')\" class=\"fa fa-plus pull-right\" aria-hidden=\"true\"></i>\n <i *ngIf=\"acc.activeIds.includes('supportTicketInfo')\" class=\"fa fa-minus pull-right\" aria-hidden=\"true\"></i>\n </div>\n </ng-template>\n <ng-template ngbPanelContent>\n <div class=\"card\">\n <div class=\"card-header\"><b>General Info</b></div>\n <div class=\"card-body\">\n <div class=\"row\">\n <div class=\"col-lg-4\">\n <dl>\n <dt>Support Ticket #</dt>\n <dd>{{data.support_ticket_number | number}}</dd>\n <dt>Date Created</dt>\n <dd>{{data.date_created | date: 'short'}}</dd>\n </dl>\n </div>\n <div class=\"col-lg-4\">\n <dl>\n <dt>Type</dt>\n <dd>{{data.type}}</dd>\n <dt>User</dt>\n <dd>{{data.user_created}}</dd>\n </dl>\n </div>\n <div class=\"col-lg-4\">\n <dl>\n <dt>Status</dt>\n <dd>{{ data.status }}</dd>\n </dl>\n </div>\n </div>\n </div>\n </div>\n <div class=\"card\">\n <div class=\"card-header\"><b>Problem Description</b></div>\n <div class=\"card-body\">\n <pre>{{data.issue}}</pre>\n </div>\n </div>\n </ng-template>\n </ngb-panel>\n <ngb-panel id=\"supportTicketMessages\" *ngIf=\"data\">\n <ng-template ngbPanelTitle>\n <div> \n <label class=\"label-accordion\">Messages</label>\n <i *ngIf=\"!acc.activeIds.includes('supportTicketMessages')\" class=\"fa fa-plus pull-right\" aria-hidden=\"true\"></i>\n <i *ngIf=\"acc.activeIds.includes('supportTicketMessages')\" class=\"fa fa-minus pull-right\" aria-hidden=\"true\"></i>\n </div>\n </ng-template>\n <ng-template ngbPanelContent>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <div class=\"card\" *ngFor=\"let message of data.messages; let i = index;\">\n <div class=\"card-header\"><b>User: {{message.user}} - Date: {{message.date | date : 'short'}}</b></div>\n <div class=\"card-body\" [ngClass]=\"[message.type === 'ResolveIO' ? 'selected' : '']\">\n <div class=\"row\" style=\"width: 100%\">\n <div class=\"col-lg-10\">\n <pre>{{message.message}}</pre>\n </div>\n <div class=\"col-lg-2\">\n <responsive-button-group collapseSize=\"900\">\n <button type=\"button\" class=\"btn btn-warning\" (click)=\"editMessage(i)\" *ngIf=\"isMyMessage(message)\">Edit</button>\n <button type=\"button\" class=\"btn btn-danger\" (click)=\"deleteMessage(i)\" *ngIf=\"isMyMessage(message)\">Delete</button>\n </responsive-button-group>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"row\" style=\"margin-top: 10px;\">\n <div class=\"col-lg-12\">\n <button type=\"button\" class=\"btn btn-success\" (click)=\"newMessage()\">New Message</button>\n </div>\n </div>\n </ng-template>\n </ngb-panel>\n <ngb-panel id=\"files\">\n\t\t\t\t<ng-template ngbPanelTitle>\n\t\t\t\t\t<div> \n\t\t\t\t\t\t<label class=\"label-accordion\">Support Ticket Files</label>\n\t\t\t\t\t\t<i *ngIf=\"!acc.activeIds.includes('files')\" class=\"fa fa-plus pull-right\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t<i *ngIf=\"acc.activeIds.includes('files')\" class=\"fa fa-minus pull-right\" aria-hidden=\"true\"></i>\n\t\t\t\t\t</div>\n\t\t\t\t</ng-template>\n\t\t\t\t<ng-template ngbPanelContent>\n\t\t\t\t\t<file-upload #fileUpload (fileAdded)=\"onFileAdded($event)\" (fileRemoved)=\"onFilesRemoved($event)\" [files]=\"files\" [allowDelete]=\"true\" [allowReplace]=\"true\"></file-upload>\n\t\t\t\t</ng-template>\n\t\t\t</ngb-panel>\n </ngb-accordion>\n </div>\n <div class=\"row\" style=\"padding-top: 15px;\">\n <responsive-button-group collapseSize=\"900\">\n <button class=\"btn btn-warning\" type=\"button\" (click)=\"edit()\">Edit Support Ticket</button>\n </responsive-button-group>\n </div>\n</div>\n ","import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';\nimport { SupportTicketService } from '../support-ticket.service';\nimport { Validators, FormGroup } from '@angular/forms';\nimport { ActivatedRoute } from '@angular/router';\nimport { Subscription } from 'rxjs';\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\nimport { SupportTicketModel } from '../../models/support-ticket.model';\nimport { DialogService } from '../../widgets/dialog/dialog.service';\n\n@Component({\n\tproviders: [ProviderService],\n\ttemplateUrl: './support-ticket-edit.component.html'\n})\n\nexport class SupportTicketEditComponent extends BaseComponent implements OnInit, OnDestroy { \n\n\t@ViewChild ('fileUpload', {static: true}) fileUpload;\n\t@ViewChild ('selectType', {static: true}) selectType;\n\n\tid: string;\n\tdata: SupportTicketModel;\n\t\n\tsubscription$: Subscription[] = [];\n\n\tform: FormGroup;\n\n\tdisableFormButton = false;\n\n\tconstructor(private _route: ActivatedRoute, private _sts: SupportTicketService, private _services: ProviderService, private _ds: DialogService) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis.id = this._route.snapshot.params['id'];\n\t\tthis._sts.setSelectedSupportTicket(this.id.toString());\n\n\t\tthis.form = this._services._fb.group({\n\t\t\t_id: [''],\n\t\t\t__v: [0],\n\t\t\ttype: ['', [Validators.required]],\n\t\t\tpriority: ['', [Validators.required]],\n\t\t\tissue: ['', [Validators.required]],\n\t\t\tsupport_ticket_number: [null],\n\t\t\tsupport_ticket_number_string: [null],\n\t\t\tstatus: ['Opened'],\n\t\t\tsubstatus: ['New'],\n\t\t\tclient: [''],\n\t\t\tid_client: ['', [Validators.required]],\n\t\t\tmessages: [[]],\n\t\t\tdate_created: [null],\n\t\t\tdate_created_string: [''],\n\t\t\tid_user_created: [this._services._account.getUser()._id],\n\t\t\tuser_created: [this._services._account.getUser().fullname],\n\t\t\tbillable: [false, [Validators.required]],\n\t\t\tdate_investigation: [null],\n\t\t\tdate_closed: [null],\n\t\t\tfiles: [[]],\n\t\t\tcurrent_watchers: [[]],\n\t\t\tclient_user: [null],\n\t\t\tusers_assigned: [[]],\n\t\t\tbill_description: [''],\n\t\t\ttasks: [[]],\n\t\t\tnotes: [[]],\n\t\t\tdifficulty: [1]\n\t\t});\n\n\t\tthis._services._socket.call('supportGetSupportTicketWithId', this.id, (err, res) => {\n\t\t\tif (!res) {\n\t\t\t\tthis._services._router.navigateByUrl('/support-ticket/list');\n\t\t\t\tthis._ds.error('Could not find support ticket');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.data = res;\n\n\t\t\tthis.loadForm();\n\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis.subscription$.forEach(sub => {\n\t\t\tsub.unsubscribe();\n\t\t});\n\t}\n\n\tloadForm() {\n\t\tthis.form.patchValue(this.data);\n\t}\n\n\tonTypeChange() {\n\t\tif (this.form.controls.type.value === 'System Impairment') {\n\t\t\tthis.form.controls.priority.setValue('High');\n\t\t\tthis.form.controls.billable.setValue(false);\n\t\t}\n\t\telse if (this.form.controls.type.value === 'Request New Feature') {\n\t\t\tthis.form.controls.priority.setValue('Low');\n\t\t\tthis.form.controls.billable.setValue(true);\n\t\t}\n\t\telse if (this.form.controls.type.value === 'General Inquery') {\n\t\t\tthis.form.controls.priority.setValue('Low');\n\t\t\tthis.form.controls.billable.setValue(true);\n\t\t}\n\t\telse {\n\t\t\tthis.form.controls.priority.setValue('');\n\t\t\tthis.form.controls.billable.setValue(false);\n\t\t}\n\t}\n\n\tsubmitForm(form) {\n\t\tthis.disableFormButton = true;\n\n\t\tthis._services._socket.call('supportUpdateSupportTicket', this.form.value, (err, res) => {\n\t\t\tif (res) {\n\t\t\t\tthis._services._alert.setAlert('info', 'Editing support ticket, please wait');\n\t\t\t\tthis._services._router.navigateByUrl('/support-ticket/detail/' + this.id);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._ds.error('Could not edit support ticket');\n\t\t\t\tthis._services._socket.call('insertErrorLog', 'Support-ticket-edit - update support ticket', [\n\t\t\t\t\tthis.form.value, err\n\t\t\t\t]);\n\t\t\t}\n\t\t});\n\t}\n}\n","<style>\n .label-accordion {\n font-weight: bold;\n color: black;\n margin-bottom: 0px;\n }\n\n .fa-plus {\n color: black;\n }\n\n .fa-minus {\n color: black;\n }\n</style>\n\n<div class=\"col-lg-12\">\n <form [formGroup]=\"form\" novalidate (ngSubmit)=\"submitForm(form)\">\n <div class=\"row\">\n <ngb-accordion #acc=\"ngbAccordion\" activeIds=\"supportTicketInfo\">\n <ngb-panel id=\"supportTicketInfo\">\n <ng-template ngbPanelTitle>\n <div> \n <label class=\"label-accordion\">Support Ticket Info</label>\n <i *ngIf=\"!acc.activeIds.includes('supportTicketInfo')\" class=\"fa fa-plus pull-right\" aria-hidden=\"true\"></i>\n <i *ngIf=\"acc.activeIds.includes('supportTicketInfo')\" class=\"fa fa-minus pull-right\" aria-hidden=\"true\"></i>\n </div>\n </ng-template>\n <ng-template ngbPanelContent>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Support Ticket Type</label>\n <em *ngIf=\"!form.controls.type.valid\">- Required</em>\n <select [ngClass]=\"['form-control', form.controls.type.valid ? 'is-valid' : 'is-invalid']\" formControlName=\"type\" (change)=\"onTypeChange()\">\n <option value=\"\">Select Type</option>\n <option value=\"General Inquery\">General Inquery</option>\n <option value=\"System Impairment\">System Impairment</option>\n <option value=\"Request New Feature\">Request New Feature</option>\n </select>\n <div class=\"invalid-feedback\" *ngIf=\"!form.controls.type.valid\">Type is required</div>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <div class=\"form-group\">\n <label class=\"form-control-label\">Problem Description</label>\n <em *ngIf=\"!form.controls.issue.valid\">- Required</em>\n <textarea formControlName=\"issue\" [ngClass]=\"['form-control', form.controls.issue.valid ? 'is-valid' : 'is-invalid' ]\" [rows]=\"5\" style=\"overflow-x: hidden\"></textarea>\n <div class=\"invalid-feedback\" *ngIf=\"!form.controls.issue.valid\">Problem Description is required</div>\n </div>\n </div>\n </div>\n </ng-template>\n </ngb-panel>\n </ngb-accordion>\n </div>\n <div class=\"row\" style=\"padding-top: 15px;\">\n <form-button [form]=\"form\" [disabled]=\"disableFormButton\"></form-button>\n </div>\n </form>\n</div>\n ","\nimport { ModuleWithProviders } from '@angular/core';\nimport { Routes, RouterModule, Route } from '@angular/router';\nimport { SupportTicketComponent } from './support-ticket.component';\nimport { SupportTicketListComponent } from './list/support-ticket-list.component';\nimport { SupportTicketNewComponent } from './new/support-ticket-new.component';\nimport { SupportTicketDetailComponent } from './detail/support-ticket-detail.component';\nimport { SupportTicketEditComponent } from './edit/support-ticket-edit.component';\n\nconst routes: Routes = [{ \n\tpath: '',\n\tcomponent: SupportTicketComponent,\n\tchildren: [\n\t\t{ path: 'list', component: SupportTicketListComponent },\n\t\t{ path: 'new', component: SupportTicketNewComponent },\n\t\t{ path: 'detail/:id', component: SupportTicketDetailComponent },\n\t\t{ path: 'edit/:id', component: SupportTicketEditComponent },\n\t\t{ path: '**', redirectTo: 'list' }\n\t]}\n];\n\nexport const SupportTicketRouting: ModuleWithProviders<Route> = RouterModule.forChild(routes);\n","import { NgModule } from '@angular/core';\nimport { SharedModule } from '../shared/shared.module';\nimport { SupportTicketRouting } from './support-ticket.routing';\nimport { SupportTicketComponent } from './support-ticket.component';\nimport { SupportTicketListComponent } from './list/support-ticket-list.component';\nimport { SupportTicketNewComponent } from './new/support-ticket-new.component';\nimport { SupportTicketDetailComponent } from './detail/support-ticket-detail.component';\nimport { SupportTicketEditComponent } from './edit/support-ticket-edit.component';\nimport { SupportTicketService } from './support-ticket.service';\nimport { DatatableModule } from '../widgets/data-table/data-table.module';\nimport { FileModule } from '../widgets/file/file-upload.module';\n@NgModule({\n\timports: [\n\t\tSharedModule,\n\t\tSupportTicketRouting,\n\t\tDatatableModule,\n\t\tFileModule\n\t],\n\tdeclarations: [ \n\t\tSupportTicketComponent,\n\t\tSupportTicketListComponent,\n\t\tSupportTicketNewComponent,\n\t\tSupportTicketDetailComponent,\n\t\tSupportTicketEditComponent\n\t],\n\tproviders: [\n\t\tSupportTicketService\n\t]\n})\nexport class SupportTicketModule { }\n","let typeCache: { [label: string]: boolean } = {};\nexport function type<T>(label: T | ''): T {\n\tif (typeCache[<string>label]) {\n\t\tthrow new Error(`Action type \"${label}\" is not unqiue\"`);\n\t}\n\n\ttypeCache[<string>label] = true;\n\n\treturn <T>label;\n}\n","import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, ChangeDetectorRef, OnInit } from '@angular/core';\nimport moment from 'moment';\n\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\n\n@Component({\n\tproviders: [ProviderService],\n\tselector: 'date-shortcut',\n\ttemplate: `\n\t\t<label class=\"form-control-label\">Date Shortcuts</label>\n\t\t<ng-select [(ngModel)]=\"shortcutValue\" (change)=\"onSelectShortcut()\" placeholder=\"Select Shortcut\" [clearable]=\"false\">\n\t\t\t<ng-option value=\"Today\">Today</ng-option>\n\t\t\t<ng-option value=\"Yesterday\">Yesterday</ng-option>\n\t\t\t<ng-option value=\"Week\">This Week</ng-option>\n\t\t\t<ng-option value=\"Last Week\">Last Week</ng-option>\n\t\t\t<ng-option value=\"Month\">This Month</ng-option>\n\t\t\t<ng-option value=\"Last Month\">Last Month</ng-option>\n\t\t\t<ng-option value=\"Last 30 Days\">Last 30 Days</ng-option>\n\t\t\t<ng-option value=\"Quarter\">This Quarter</ng-option>\n\t\t\t<ng-option value=\"Last Quarter\">Last Quarter</ng-option>\n\t\t\t<ng-option value=\"Year\">This Year</ng-option>\n\t\t\t<ng-option value=\"Last Year\">Last Year</ng-option>\n\t\t\t<ng-option value=\"Q1\">Q1</ng-option>\n\t\t\t<ng-option value=\"Q2\">Q2</ng-option>\n\t\t\t<ng-option value=\"Q3\">Q3</ng-option>\n\t\t\t<ng-option value=\"Q4\">Q4</ng-option>\n\t\t\t<ng-option value=\"Last Q1\">Last Q1</ng-option>\n\t\t\t<ng-option value=\"Last Q2\">Last Q2</ng-option>\n\t\t\t<ng-option value=\"Last Q3\">Last Q3</ng-option>\n\t\t\t<ng-option value=\"Last Q4\">Last Q4</ng-option>\n\t\t\t<ng-option value=\"All\">All</ng-option>\n\t\t</ng-select>\n\t`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\n\nexport class DateShortcutComponent extends BaseComponent implements OnInit { \n\t@Input() startDateObj;\n\t@Input() endDateObj;\n\t@Output() startDateObjChange = new EventEmitter<Object>();\n\t@Output() endDateObjChange = new EventEmitter<Object>();\n\t@Output() datesChanged = new EventEmitter();\n\t@Input() shortcutValue = null;\n\t@Output() shortcutValueChange = new EventEmitter<String>();\n\n\tconstructor(private _services: ProviderService, private _cd: ChangeDetectorRef) {\n\t\tsuper(_services);\n\t}\n\n\tngOnInit() {\n\t\tthis.onSelectShortcut();\n\t}\n\n\treset() {\n\t\tthis.shortcutValue = null;\n\t\tthis.shortcutValueChange.emit(this.shortcutValue);\n\n\t\tthis._cd.detectChanges();\n\t}\n\n\tonSelectShortcut() {\n\t\tif (this.shortcutValue) {\n\t\t\tlet startDate = moment(new Date(this.startDateObj['year'], this.startDateObj['month'] - 1, this.startDateObj['day'])).toDate();\n\t\t\tlet endDate = moment(new Date(this.endDateObj['year'], this.endDateObj['month'] - 1, this.endDateObj['day'])).toDate();\n\n\t\t\tif (this.shortcutValue === 'Q1') {\n\t\t\t\tstartDate = moment().startOf('year').toDate();\n\t\t\t\tendDate = moment().startOf('year').quarter(2).subtract(1, 'days').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Q2') {\n\t\t\t\tstartDate = moment().startOf('year').quarter(2).toDate();\n\t\t\t\tendDate = moment().startOf('year').quarter(3).subtract(1, 'days').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Q3') {\n\t\t\t\tstartDate = moment().startOf('year').quarter(3).toDate();\n\t\t\t\tendDate = moment().startOf('year').quarter(4).subtract(1, 'days').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Q4') {\n\t\t\t\tstartDate = moment().startOf('year').quarter(4).toDate();\n\t\t\t\tendDate = moment().endOf('year').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Last Q1') {\n\t\t\t\tstartDate = moment().startOf('year').subtract(1, 'year').toDate();\n\t\t\t\tendDate = moment().startOf('year').subtract(1, 'year').quarter(2).subtract(1, 'days').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Last Q2') {\n\t\t\t\tstartDate = moment().startOf('year').subtract(1, 'year').quarter(2).toDate();\n\t\t\t\tendDate = moment().startOf('year').subtract(1, 'year').quarter(3).subtract(1, 'days').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Last Q3') {\n\t\t\t\tstartDate = moment().startOf('year').subtract(1, 'year').quarter(3).toDate();\n\t\t\t\tendDate = moment().startOf('year').subtract(1, 'year').quarter(4).subtract(1, 'days').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Last Q4') {\n\t\t\t\tstartDate = moment().startOf('year').subtract(1, 'year').quarter(4).toDate();\n\t\t\t\tendDate = moment().endOf('year').subtract(1, 'year').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Today') {\n\t\t\t\tstartDate = moment().startOf('day').toDate();\n\t\t\t\tendDate = new Date();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Yesterday') {\n\t\t\t\tstartDate = moment().subtract(1, 'days').startOf('day').toDate();\n\t\t\t\tendDate = moment().subtract(1, 'days').endOf('day').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Week') {\n\t\t\t\tstartDate = moment().startOf('isoWeek').toDate();\n\t\t\t\tendDate = new Date();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Last Week') {\n\t\t\t\tendDate = moment().startOf('isoWeek').subtract(1, 'days').toDate();\n\t\t\t\tstartDate = moment(endDate).startOf('isoWeek').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Month') {\n\t\t\t\tstartDate = moment().startOf('month').toDate();\n\t\t\t\tendDate = new Date();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Last Month') {\n\t\t\t\tendDate = moment().startOf('month').subtract(1, 'days').endOf('day').toDate();\n\t\t\t\tstartDate = moment(endDate).startOf('month').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Last 30 Days') {\n\t\t\t\tendDate = new Date();\n\t\t\t\tstartDate = moment().subtract(30, 'days').startOf('day').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Quarter') {\n\t\t\t\tstartDate = moment().startOf('year').quarter(moment().quarter()).toDate();\n\t\t\t\tendDate = new Date();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Last Quarter') {\n\t\t\t\tendDate = moment().startOf('year').quarter(moment().quarter()).subtract(1, 'days').endOf('day').toDate();\n\t\t\t\tstartDate = moment(endDate).startOf('quarter').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Year') {\n\t\t\t\tstartDate = moment().startOf('year').toDate();\n\t\t\t\tendDate = new Date();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'Last Year') {\n\t\t\t\tendDate = moment().startOf('year').subtract(1, 'days').endOf('day').toDate();\n\t\t\t\tstartDate = moment(endDate).startOf('year').toDate();\n\t\t\t}\n\t\t\telse if (this.shortcutValue === 'All') {\n\t\t\t\tstartDate = new Date(2017, 0, 1, 0, 0, 0, 0);\n\t\t\t\tendDate = new Date();\n\t\t\t}\n\n\t\t\tthis.startDateObj = {year: startDate.getFullYear(), month: startDate.getMonth() + 1, day: startDate.getDate()};\n\t\t\tthis.endDateObj = {year: endDate.getFullYear(), month: endDate.getMonth() + 1, day: endDate.getDate()};\n\n\t\t\tthis.startDateObjChange.emit(this.startDateObj);\n\t\t\tthis.endDateObjChange.emit(this.endDateObj);\n\n\t\t\tthis.datesChanged.emit([this.startDateObj, this.endDateObj]);\n\n\t\t\tthis.shortcutValueChange.emit(this.shortcutValue);\n\t\t}\n\n\t\tthis._cd.detectChanges();\n\t}\n}\n","import { FormsModule } from '@angular/forms';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { DateShortcutComponent } from './date-shortcut.component';\t\t\t\nimport { NgSelectModule } from '@ng-select/ng-select';\n\n@NgModule({\n\timports: [\n\t\tFormsModule,\n\t\tCommonModule,\n\t\tNgSelectModule\n\t],\n\texports: [\n\t\tDateShortcutComponent\n\t],\n\tdeclarations: [\n\t\tDateShortcutComponent\n\t]\n})\nexport class DateShortcutModule { }\n","import { Component, ViewChild, AfterViewInit, ElementRef, HostListener, OnDestroy } from '@angular/core';\nimport moment from 'moment';\nimport { ProviderService, BaseComponent } from '../../resolveio-class';\n\n@Component({\n\tproviders: [ProviderService],\n\tselector: 'scheduler',\n\ttemplateUrl: './scheduler.component.html'\n})\n\nexport class SchedulerComponent extends BaseComponent implements AfterViewInit, OnDestroy { \n\n\ttoday = new Date();\n\n\tover_forward = false;\n\tover_backwards = false;\n\t\n\tmouseDown = false;\n\tmouseLastEvent = null;\n\n\ttimer_sub = null;\n\n\tmonths = [\n\t\t'Jan',\n\t\t'Feb',\n\t\t'Mar',\n\t\t'Apr',\n\t\t'May',\n\t\t'Jun',\n\t\t'Jul',\n\t\t'Aug',\n\t\t'Sep',\n\t\t'Oct',\n\t\t'Nov',\n\t\t'Dec'\n\t];\n\n\tsize_svg = {\n\t\twidth: 0,\n\t\theight: 0\n\t};\n\n\tsize_cell = {\n\t\twidth: 30,\n\t\theight: 30\n\t};\n\t\n\t@ViewChild('svgChart', {static: true}) svgChart: ElementRef;\n\n\tconstructor(private _services: ProviderService) {\n\t\tsuper(_services);\n\t}\n\n\tngAfterViewInit() {\n\t\tthis.size_svg.width = this.svgChart.nativeElement.clientWidth;\n\t\tthis.size_svg.height = this.svgChart.nativeElement.clientHeight;\n\t}\n\n\tngOnDestroy() {\n\t\tif (this.timer_sub) {\n\t\t\tclearInterval(this.timer_sub);\n\t\t}\n\t}\n\n\t@HostListener('mouseup') onMouseup() {\n\t\tthis.mouseDown = false;\n\t}\n\n\t@HostListener('mousedown', ['$event']) onMousedown(event) {\n\t\tthis.mouseDown = true;\n\t\tthis.mouseLastEvent = event;\n\t}\n\n\t@HostListener('mousemove', ['$event']) onMousemove(event: MouseEvent) {\n\t\tif (this.mouseDown) {\n\n\t\t\tlet daysAdd = 0;\n\n\t\t\tif (this.mouseLastEvent.clientX - event.clientX > 1) {\n\t\t\t\tif (Math.floor((this.mouseLastEvent.clientX - event.clientX) / 15) > 0) {\n\t\t\t\t\tdaysAdd = Math.floor((this.mouseLastEvent.clientX - event.clientX + ((30 - this.size_cell.width) * 5)) / 20);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdaysAdd = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (this.mouseLastEvent.clientX - event.clientX < -1) {\n\t\t\t\tif (Math.floor((this.mouseLastEvent.clientX - event.clientX) / 15) < 0) {\n\t\t\t\t\tdaysAdd = Math.floor((this.mouseLastEvent.clientX - event.clientX - ((30 - this.size_cell.width) * 5)) / 20);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdaysAdd = -1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.today = moment(this.today).add(daysAdd, 'days').toDate();\t\t\n\t\t\tthis.mouseLastEvent = event;\n\t\t}\n\t}\n\n\t@HostListener('mouseleave', ['$event']) onMouseLeave(event: MouseEvent) {\n\t\tif (this.mouseDown) {\n\t\t\tthis.mouseDown = false;\n\t\t}\n\t}\n\n\tbuildDays() {\n\t\tlet days = [];\n\n\t\tfor (let i = 0; i < Math.floor(this.size_svg.width / this.size_cell.width); i++) {\n\t\t\tdays.push({\n\t\t\t\tindex: i,\n\t\t\t\tday: moment(this.today).add(i, 'days').toDate().getDate()\n\t\t\t});\n\t\t}\n\n\t\treturn days;\n\t}\n\n\tbuildMonths() {\n\t\tlet months = [{\n\t\t\tindex_start: 0,\n\t\t\tindex_end: null,\n\t\t\tmonth: this.months[this.today.getMonth()]\n\t\t}];\n\n\t\tfor (let i = 1; i < Math.floor(this.size_svg.width / this.size_cell.width); i++) {\n\t\t\tif (moment(this.today).add(i, 'days').toDate().getMonth() !== moment(this.today).add(i - 1, 'days').toDate().getMonth()) {\n\t\t\t\tmonths[months.length - 1].index_end = i;\n\t\t\t\tmonths.push({\n\t\t\t\t\tindex_start: i,\n\t\t\t\t\tindex_end: null,\n\t\t\t\t\tmonth: this.months[moment(this.today).add(i, 'days').toDate().getMonth()]\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tmonths[months.length - 1].index_end = Math.floor(this.size_svg.width / this.size_cell.width);\n\n\t\treturn months;\n\t}\n\n\tbuildYears() {\n\t\tlet years = [{\n\t\t\tindex_start: 0,\n\t\t\tindex_end: null,\n\t\t\tyear: this.today.getFullYear()\n\t\t}];\n\n\t\tfor (let i = 1; i < Math.floor(this.size_svg.width / this.size_cell.width); i++) {\n\t\t\tif (moment(this.today).add(i, 'days').toDate().getFullYear() !== moment(this.today).add(i - 1, 'days').toDate().getFullYear()) {\n\t\t\t\tyears[years.length - 1].index_end = i;\n\t\t\t\tyears.push({\n\t\t\t\t\tindex_start: i,\n\t\t\t\t\tindex_end: null,\n\t\t\t\t\tyear: moment(this.today).add(i, 'days').toDate().getFullYear()\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tyears[years.length - 1].index_end = Math.floor(this.size_svg.width / this.size_cell.width);\n\n\t\treturn years;\n\t}\n\n\tdecrementToday() {\n\t\tthis.today = moment(this.today).subtract(1, 'days').toDate();\n\t}\n\n\tincrementToday() {\n\t\tthis.today = moment(this.today).add(1, 'days').toDate();\n\t}\n\n\toverForward() {\n\t\tthis.timer_sub = setInterval(() => {\n\t\t\tthis.incrementToday()\n\t\t}, 50);\n\t}\n\n\tleftForward() {\n\t\tclearInterval(this.timer_sub);\n\t}\n\n\toverBackwards() {\n\t\tthis.timer_sub = setInterval(() => {\n\t\t\tthis.decrementToday()\n\t\t}, 50);\n\t}\n\n\tleftBackwards() {\n\t\tclearInterval(this.timer_sub);\n\t}\n\n\tzoomOut() {\n\t\tif (this.size_cell.width > 10) {\n\t\t\tthis.size_cell.width -= 10;\n\t\t}\n\t}\n\n\tzoomIn() {\n\t\tthis.size_cell.width += 10;\n\t}\n}\n","<style>\n\t.bar {\n\t\tfill: red; /* changes the background */\n\t\theight: 21px;\n\t\ttransition: fill .3s ease;\n\t\tcursor: pointer;\n\t\tfont-family: Helvetica, sans-serif;\n\t}\n\n\t.bar text {\n\t\tcolor: black;\n\t}\n\n\t.bar:hover,\n\t.bar:focus {\n\t\tfill: black;\n\t}\n\n\t.bar:hover text,\n\t.bar:focus text {\n\t\tfill: red;\n\t}\n\n\t.year {\n\t\tstroke:black;\n\t\tfill: white;\n\t}\n\n\t.month {\n\t\tstroke:black;\n\t\tfill: white;\n\t}\n\n\t.day {\n\t\tstroke:black;\n\t\tfill: white;\n\t}\n\n\t.smallText {\n\t\tfont-size: 4px;\n\t}\n</style>\n\n<div class=\"scheduler\">\n\n\t<button class=\"btn btn-warning\" type=\"button\" (mouseenter)=\"overBackwards()\" (mouseleave)=\"leftBackwards()\">Go Backwards</button>\n\t<button class=\"btn btn-success\" type=\"button\" (mouseenter)=\"overForward()\" (mouseleave)=\"leftForward()\">Go Forward</button>\n\n\t<button style=\"margin-left: 20px;\" class=\"btn btn-warning\" type=\"button\" (click)=\"zoomOut()\">Zoom Out</button>\n\t<button class=\"btn btn-success\" type=\"button\" (click)=\"zoomIn()\">Zoom In</button>\n\n\t<svg class=\"chart\" width=\"100%\" height=\"100%\" aria-labelledby=\"title desc\" role=\"img\" #svgChart>\n\t\t<title id=\"title\">Scheduler</title>\n\t\t<desc id=\"desc\">Scheduler</desc>\n\n\t\t<g class=\"year\">\n\t\t\t<ng-container *ngFor=\"let year of buildYears()\">\n\t\t\t\t<rect [attr.width]=\"(year.index_end - year.index_start) * size_cell.width\" [attr.height]=\"size_cell.height\" [attr.x]=\"year.index_start * size_cell.width\"></rect>\n\t\t\t\t<svg [attr.width]=\"(year.index_end - year.index_start) * size_cell.width\" [attr.height]=\"size_cell.height\" [attr.x]=\"year.index_start * size_cell.width\">\n\t\t\t\t\t<text x=\"50%\" y=\"50%\" alignment-baseline=\"middle\" text-anchor=\"middle\">{{year.year}}</text>\n\t\t\t\t</svg>\n\t\t\t</ng-container>\n\t\t</g>\n\t\t<g class=\"month\">\n\t\t\t<ng-container *ngFor=\"let month of buildMonths()\">\n\t\t\t\t<rect [attr.width]=\"(month.index_end - month.index_start) * size_cell.width\" [attr.height]=\"size_cell.height\" [attr.x]=\"month.index_start * size_cell.width\" [attr.y]=\"size_cell.height\"></rect>\n\t\t\t\t<svg [attr.width]=\"(month.index_end - month.index_start) * size_cell.width\" [attr.height]=\"size_cell.height\" [attr.x]=\"month.index_start * size_cell.width\" [attr.y]=\"size_cell.height\">\n\t\t\t\t\t<text x=\"50%\" y=\"50%\" alignment-baseline=\"middle\" text-anchor=\"middle\">{{month.month}}</text>\n\t\t\t\t</svg>\n\t\t\t</ng-container>\n\t\t</g>\n\t\t<g class=\"day\">\n\t\t\t<ng-container *ngFor=\"let day of buildDays()\">\n\t\t\t\t<rect [attr.width]=\"size_cell.width\" [attr.height]=\"size_cell.height\" [attr.x]=\"day.index * size_cell.width\" [attr.y]=\"size_cell.height * 2\"></rect>\n\t\t\t\t<svg [attr.width]=\"size_cell.width\" [attr.height]=\"size_cell.height\" [attr.x]=\"day.index * size_cell.width\" [attr.y]=\"size_cell.height * 2\">\n\t\t\t\t\t<text x=\"50%\" y=\"50%\" alignment-baseline=\"middle\" text-anchor=\"middle\" [style.font-size.px]=\"[size_cell.width > 10 ? 12 : 6]\">{{day.day}}</text>\n\t\t\t\t</svg>\n\t\t\t</ng-container>\n\t\t</g>\n\n\n\t\t<!-- <g class=\"bar\">\n\t\t\t<rect width=\"40\" height=\"19\"></rect>\n\t\t\t<text x=\"45\" y=\"9.5\" dy=\".35em\">4 apples</text>\n\t\t</g>\n\t\t<g class=\"bar\">\n\t\t\t<rect width=\"80\" height=\"19\" y=\"20\"></rect>\n\t\t\t<text x=\"85\" y=\"28\" dy=\".35em\">8 bananas</text>\n\t\t</g>\n\t\t<g class=\"bar\">\n\t\t\t<rect width=\"150\" height=\"19\" y=\"40\"></rect>\n\t\t\t<text x=\"150\" y=\"48\" dy=\".35em\">15 kiwis</text>\n\t\t</g>\n\t\t<g class=\"bar\">\n\t\t\t<rect width=\"160\" height=\"19\" y=\"60\"></rect>\n\t\t\t<text x=\"161\" y=\"68\" dy=\".35em\">16 oranges</text>\n\t\t</g>\n\t\t<g class=\"bar\">\n\t\t\t<rect width=\"230\" height=\"19\" y=\"80\"></rect>\n\t\t\t<text x=\"235\" y=\"88\" dy=\".35em\">23 lemons</text>\n\t\t</g> -->\n\t</svg>\n</div>\n","import { NgModule } from '@angular/core';\nimport { NgbModule } from '@ng-bootstrap/ng-bootstrap';\nimport { FormsModule } from '@angular/forms';\t\nimport { CommonModule } from '@angular/common';\n\nimport { RouterModule } from '@angular/router';\t\n\nimport { SchedulerComponent } from './scheduler.component';\n\n@NgModule({\n\timports: [\n\t\tNgbModule,\n\t\tFormsModule,\n\t\tCommonModule,\n\t\tRouterModule\n\t],\n\texports: [\n\t\tSchedulerComponent\n\t],\n\tdeclarations: [\n\t\tSchedulerComponent\n\t],\n\tproviders: [ ]\n})\nexport class SchedulerModule { }\n","import { ModulePermissionModel } from './models/permission.model';\n\nexport const ReportBuilderModulePermission: ModulePermissionModel = {\n\tname: 'report-builder',\n\tviews: [\n\t\t{link: '/report-builder/list', label: 'List', has_parameter: false},\n\t\t{link: '/report-builder/new', label: 'New', has_parameter: false},\n\t\t{link: '/report-builder/scheduled-job', label: 'Scheduled Job', has_parameter: false},\n\t\t{link: '/report-builder/dashboard-builder', label: 'Dashboard Builder', has_parameter: false},\n\t\t{link: '/report-builder/detail', label: 'Detail', has_parameter: true},\n\t\t{link: '/report-builder/edit', label: 'Edit', has_parameter: true},\n\t\t{link: '/report-builder/delete', label: 'Delete', has_parameter: true},\n\t]\n};\n","import { ModulePermissionModel } from './models/permission.model';\n\nexport const SuperAdminModulePermission: ModulePermissionModel = {\n\tname: 'super-admin',\n\tviews: [\n\t\t{link: '/super-admin/dashboard', label: 'Dashboard', has_parameter: false},\n\t\t{link: '/super-admin/apm', label: 'APM', has_parameter: false},\n\t\t{link: '/super-admin/monitor', label: 'Monitor', has_parameter: false}\n\t]\n};\n","/*\n * Public API Surface of @resolveio/client-lib-core\n */\n\nexport * from './lib/core.service';\nexport * from './lib/core.component';\nexport * from './lib/core.module';\nexport * from './lib/resolveio-class';\nexport * from './lib/auth/auth-guard.service';\nexport * from './lib/auth/auth-permissions.service';\nexport * from './lib/auth/auth.service';\nexport * from './lib/auth/auth365.component';\nexport * from './lib/auth/can-deactivate-guard.service';\nexport * from './lib/auth/enroll.component';\nexport * from './lib/auth/forgot-password.component';\nexport * from './lib/directive/focus';\nexport * from './lib/home/home.component';\nexport * from './lib/support-ticket/support-ticket.component';\nexport * from './lib/support-ticket/support-ticket.module';\nexport * from './lib/support-ticket/support-ticket.routing';\nexport * from './lib/support-ticket/support-ticket.service';\nexport * from './lib/support-ticket/detail/support-ticket-detail.component';\nexport * from './lib/support-ticket/edit/support-ticket-edit.component';\nexport * from './lib/support-ticket/list/support-ticket-list.component';\nexport * from './lib/support-ticket/new/support-ticket-new.component';\nexport * from './lib/logger/logger.component';\nexport * from './lib/pipes/filter.pipe';\nexport * from './lib/pipes/minus-currency.pipe';\nexport * from './lib/pipes/phone.pipe';\nexport * from './lib/pipes/pipe.module';\nexport * from './lib/pipes/reverse-list.pipe';\nexport * from './lib/pipes/domsanitizor.pipe';\nexport * from './lib/pipes/json-parse.pipe';\nexport * from './lib/pipes/titlecase.pipe';\nexport * from './lib/shared/shared.module';\nexport * from './lib/util/action-name.helper';\nexport * from './lib/util/aws.service';\nexport * from './lib/util/common.helper';\nexport * from './lib/util/validation.service';\nexport * from './lib/util/window-resize.service';\nexport * from './lib/util/window.service';\nexport * from './lib/widgets/alert/alert.model';\nexport * from './lib/widgets/alert/alert.service';\nexport * from './lib/widgets/collapse-table/collapse-table.component';\nexport * from './lib/widgets/collapse-table/collapse-table.module';\nexport * from './lib/widgets/data-table/data-table.model';\nexport * from './lib/widgets/data-table/data-table.module';\nexport * from './lib/widgets/data-table/data-table.component';\nexport * from './lib/widgets/date-shortcut/date-shortcut.component';\nexport * from './lib/widgets/date-shortcut/date-shortcut.module';\nexport * from './lib/widgets/form-button/form-button.component';\nexport * from './lib/widgets/form-button/form-button.module';\nexport * from './lib/widgets/navbar-main/navbar-main.component';\nexport * from './lib/widgets/navbar-module/navbar-module.component';\nexport * from './lib/widgets/navbar-module/navbar-module.model';\nexport * from './lib/widgets/responsive-button-group/responsive-button-group.component';\nexport * from './lib/widgets/responsive-button-group/responsive-button-group.module';\nexport * from './lib/widgets/scheduler/scheduler.component';\nexport * from './lib/widgets/scheduler/scheduler.module';\nexport * from './lib/widgets/sort-table/sort-table.module';\nexport * from './lib/widgets/sort-table/sort-table.directive';\nexport * from './lib/widgets/sort-table/sort-table-ngfor.component';\nexport * from './lib/widgets/sort-table/sort-table-header.component';\nexport * from './lib/widgets/user-role/user-role.component';\nexport * from './lib/widgets/user-role/user-role.module';\nexport * from './lib/account-manager.service';\nexport * from './lib/offline-db';\nexport * from './lib/offline-manager.service';\nexport * from './lib/socket-manager.service';\nexport * from './lib/socket.service';\nexport * from './lib/token-manager.service';\nexport * from './lib/directive/scroll';\nexport * from './lib/widgets/dialog/dialog.service';\nexport * from './lib/models/app-status.model';\nexport * from './lib/models/collection-document.model';\nexport * from './lib/models/cron-job.model';\nexport * from './lib/models/dialog.model';\nexport * from './lib/models/file.model';\nexport * from './lib/widgets/file/file-upload.component';\nexport * from './lib/widgets/file/file-upload.module';\nexport * from './lib/models/log-method-latency.model';\nexport * from './lib/models/navbar-main-tab.model';\nexport * from './lib/models/pagination.model';\nexport * from './lib/models/permission.model';\nexport * from './lib/models/select-data-label.model';\nexport * from './lib/models/subscription.model';\nexport * from './lib/models/support-ticket.model';\nexport * from './lib/models/user-group.model';\nexport * from './lib/models/user.model';\nexport * from './lib/report-builder.permission';\nexport * from './lib/super-admin.permission';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["isObject","hexToRGB","routes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAOa,WAAW;;;IA+BvB;QA9BE,aAAQ,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;QACxC,eAAU,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;QACxC,gBAAW,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;QACzC,iBAAY,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;QAC1C,qBAAgB,GAAG,IAAI,eAAe,CAAC;YACtC,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,WAAW,EAAE,EAAE;YACf,gBAAgB,EAAE,EAAE;YACpB,IAAI,EAAE,EAAE;SACR,CAAC,CAAC;QACH,qBAAgB,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;QAC9C,cAAS,GAAG,IAAI,eAAe,CAAC;YAC/B,IAAI,EAAE,EAAE;YACR,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,CAAC;YACR,OAAO,EAAE,KAAK;SACd,CAAC,CAAC;QACH,gBAAW,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;QACzC,gBAAW,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;QACxC,WAAM,GAAG,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;QACjC,oBAAe,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;QAC7C,YAAO,GAAG,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;QAClC,cAAS,GAAG,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;QACpC,gBAAW,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;QACzC,WAAM,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;QACpC,iBAAY,GAAG,IAAI,eAAe,CAAC,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